smoothly 1.1.1-alpha.21 → 1.1.1-alpha.23
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/smoothly-app_95.cjs.entry.js +6 -6
- package/dist/cjs/smoothly-app_95.cjs.entry.js.map +1 -1
- package/dist/collection/components/calendar/style.css +36 -22
- package/dist/collection/components/filter/style.css +6 -4
- package/dist/collection/components/input/date/range/style.css +1 -0
- package/dist/collection/components/input/date/style.css +1 -0
- package/dist/collection/components/input/style.css +0 -1
- package/dist/collection/components/item/style.css +5 -2
- package/dist/components/{p-d4a36c0e.js → p-1dfa73db.js} +3 -3
- package/dist/components/{p-d4a36c0e.js.map → p-1dfa73db.js.map} +1 -1
- package/dist/components/{p-c6e5608f.js → p-38ef76a8.js} +5 -5
- package/dist/components/{p-c6e5608f.js.map → p-38ef76a8.js.map} +1 -1
- package/dist/components/{p-0c409b98.js → p-395f2d30.js} +4 -4
- package/dist/components/{p-0c409b98.js.map → p-395f2d30.js.map} +1 -1
- package/dist/components/{p-64342f9c.js → p-48fcebd3.js} +3 -3
- package/dist/components/{p-64342f9c.js.map → p-48fcebd3.js.map} +1 -1
- package/dist/components/{p-9fa4b6d0.js → p-533b5124.js} +2 -2
- package/dist/components/{p-9fa4b6d0.js.map → p-533b5124.js.map} +1 -1
- package/dist/components/{p-e73096f5.js → p-553d66f2.js} +5 -5
- package/dist/components/p-553d66f2.js.map +1 -0
- package/dist/components/{p-b95284aa.js → p-59c5dec0.js} +2 -2
- package/dist/components/{p-b95284aa.js.map → p-59c5dec0.js.map} +1 -1
- package/dist/components/{p-1743a7e2.js → p-6e1d34f1.js} +3 -3
- package/dist/components/{p-1743a7e2.js.map → p-6e1d34f1.js.map} +1 -1
- package/dist/components/{p-342939e0.js → p-70aee140.js} +4 -4
- package/dist/components/{p-342939e0.js.map → p-70aee140.js.map} +1 -1
- package/dist/components/{p-798e9f7c.js → p-84425325.js} +2 -2
- package/dist/components/{p-798e9f7c.js.map → p-84425325.js.map} +1 -1
- package/dist/components/{p-5569639d.js → p-bfa3193e.js} +2 -2
- package/dist/components/{p-5569639d.js.map → p-bfa3193e.js.map} +1 -1
- package/dist/components/{p-fe55a54e.js → p-c8cfe6cd.js} +7 -7
- package/dist/components/p-c8cfe6cd.js.map +1 -0
- package/dist/components/{p-229cf51b.js → p-d6ba71a4.js} +2 -2
- package/dist/components/{p-229cf51b.js.map → p-d6ba71a4.js.map} +1 -1
- package/dist/components/{p-50d5fb98.js → p-d7242817.js} +2 -2
- package/dist/components/{p-50d5fb98.js.map → p-d7242817.js.map} +1 -1
- package/dist/components/{p-488297a3.js → p-df721dfc.js} +2 -2
- package/dist/components/p-df721dfc.js.map +1 -0
- package/dist/components/{p-e23bc122.js → p-e13d98d0.js} +8 -8
- package/dist/components/{p-e23bc122.js.map → p-e13d98d0.js.map} +1 -1
- package/dist/components/{p-db26a36c.js → p-e15ce98c.js} +7 -7
- package/dist/components/p-e15ce98c.js.map +1 -0
- package/dist/components/{p-9f010bc0.js → p-e4d90d09.js} +4 -4
- package/dist/components/p-e4d90d09.js.map +1 -0
- package/dist/components/{p-67e3f6ba.js → p-e584d156.js} +2 -2
- package/dist/components/p-e584d156.js.map +1 -0
- package/dist/components/{p-6b68c185.js → p-e79dc7fb.js} +2 -2
- package/dist/components/{p-6b68c185.js.map → p-e79dc7fb.js.map} +1 -1
- package/dist/components/{p-88e2b22e.js → p-f2914f55.js} +10 -10
- package/dist/components/{p-88e2b22e.js.map → p-f2914f55.js.map} +1 -1
- package/dist/components/{p-b75ab804.js → p-f2d454ba.js} +13 -13
- package/dist/components/{p-b75ab804.js.map → p-f2d454ba.js.map} +1 -1
- package/dist/components/{p-499be380.js → p-f7b7b902.js} +3 -3
- package/dist/components/{p-499be380.js.map → p-f7b7b902.js.map} +1 -1
- package/dist/components/smoothly-address-display.js +1 -1
- package/dist/components/smoothly-address.js +1 -1
- package/dist/components/smoothly-addresses.js +3 -3
- package/dist/components/smoothly-app-demo.js +21 -21
- package/dist/components/smoothly-calendar.js +1 -1
- package/dist/components/smoothly-filter-field.js +1 -1
- package/dist/components/smoothly-filter-input.js +1 -1
- package/dist/components/smoothly-filter-picker.js +1 -1
- package/dist/components/smoothly-filter.js +1 -1
- package/dist/components/smoothly-input-color.js +1 -1
- package/dist/components/smoothly-input-date-range.js +1 -1
- package/dist/components/smoothly-input-date.js +1 -1
- package/dist/components/smoothly-input-demo-controlled-form.js +1 -1
- package/dist/components/smoothly-input-demo.js +1 -1
- package/dist/components/smoothly-input-month.js +1 -1
- package/dist/components/smoothly-input-select.js +1 -1
- package/dist/components/smoothly-input.js +1 -1
- package/dist/components/smoothly-item.js +1 -1
- package/dist/components/smoothly-picker-demo.js +1 -1
- package/dist/components/smoothly-picker-menu.js +1 -1
- package/dist/components/smoothly-picker.js +1 -1
- package/dist/components/smoothly-table-demo-filtered.js +1 -1
- package/dist/components/smoothly-table-demo.js +1 -1
- package/dist/components/smoothly-table-testing.js +1 -1
- package/dist/components/smoothly-theme-picker.js +1 -1
- package/dist/esm/smoothly-app_95.entry.js +6 -6
- package/dist/esm/smoothly-app_95.entry.js.map +1 -1
- package/dist/smoothly/p-535d2b01.entry.js +2 -0
- package/dist/smoothly/p-535d2b01.entry.js.map +1 -0
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-488297a3.js.map +0 -1
- package/dist/components/p-67e3f6ba.js.map +0 -1
- package/dist/components/p-9f010bc0.js.map +0 -1
- package/dist/components/p-db26a36c.js.map +0 -1
- package/dist/components/p-e73096f5.js.map +0 -1
- package/dist/components/p-fe55a54e.js.map +0 -1
- package/dist/smoothly/p-84da94cd.entry.js +0 -2
- package/dist/smoothly/p-84da94cd.entry.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-a089461a.js";export{s as setNonce}from"./p-a089461a.js";import{g as l}from"./p-8661963e.js";import"./p-7e394c6a.js";var t=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};t().then((async e=>{await l();return o(JSON.parse('[["p-9fc75fa6",[[2,"smoothly-addresses",{"value":[16],"editable":[16]}]]],["p-5cd2660f",[[6,"smoothly-checkbox",{"size":[1],"checked":[1540],"intermediate":[1540],"unavailable":[516],"disabled":[516],"name":[1],"value":[8],"t":[32],"toggle":[64],"clear":[64]},null,{"checked":["unavailableChanged"],"unavailable":["unavailableChanged"]}]]],["p-c2c08533",[[6,"smoothly-accordion",{"value":[1025],"removeItem":[64]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemWillLoad","onAccordionItemDidLoad"]],{"value":["valueChanged"]}]]],["p-71e89cb6",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]},null,{"open":["openChanged"]}]]],["p-399cd405",[[6,"smoothly-color",{"color":[513]}]]],["p-54a0cea2",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["p-4d7d2520",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["p-a8d13623",[[2,"smoothly-google-font",{"value":[1]}]]],["p-31257002",[[0,"smoothly-reorder"]]],["p-07143277",[[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]]],["p-c8179563",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["p-cad42990",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["p-84da94cd",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo",{"duration":[32]}],[2,"smoothly-table-demo"],[2,"smoothly-next-demo"],[0,"smoothly-display-demo",{"downloadingSpinner":[32]}],[0,"smoothly-button-demo"],[4,"smoothly-app",{"label":[1],"color":[1],"home":[1],"menuOpen":[1540,"menu-open"],"selected":[32],"selectRoom":[64]},[[8,"popstate","locationChangeHandler"],[0,"smoothlyRoomSelected","roomSelectedHandler"],[0,"smoothlyRoomLoaded","roomLoadedHandler"],[8,"click","clickHandler"]],{"selected":["selectedChanged"]}],[0,"smoothly-dialog-demo"],[6,"smoothly-app-room",{"label":[513],"icon":[513],"disabled":[516],"path":[1],"to":[1],"selected":[1540],"content":[16],"getContent":[64],"setSelected":[64]}],[6,"smoothly-theme-picker",{"element":[1]}],[2,"smoothly-select-demo"],[2,"smoothly-theme-colors"],[2,"smoothly-icon-demo"],[2,"smoothly-table-demo-filtered",{"criteria":[32],"cats":[32],"selector":[32]},[[0,"smoothlyFilter","onFilterUpdate"],[0,"smoothlyInput","smoothlyInputHandler"]]],[2,"smoothly-table-testing",{"counter":[32]}],[2,"smoothly-input-demo-controlled-form",{"name":[32],"currency":[32],"date":[32]},null,{"name":["nameChanged"]}],[2,"smoothly-picker-demo",{"counter":[32],"data":[32],"change":[32]},[[0,"smoothlyFormSubmit","submitHandler"]]],[2,"smoothly-next-demo-group"],[2,"smoothly-next-demo-colspan"],[2,"smoothly-next-demo-nested"],[2,"smoothly-next-demo-simple"],[6,"smoothly-input-date",{"color":[1537],"looks":[1537],"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"showLabel":[516,"show-label"],"disabled":[1028],"clear":[64]},[[0,"smoothlyInput","smoothlyInputHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyDateSet","dateSetHandler"]],{"value":["onStart"]}],[2,"smoothly-input-date-range",{"name":[1],"color":[1537],"looks":[1537],"showLabel":[516,"show-label"],"start":[1025],"end":[1025],"max":[1],"min":[1],"open":[32],"clear":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]]],[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-input-color",{"value":[1025],"looks":[1537],"name":[1],"clear":[64]},[[0,"smoothlyInput","smoothlyInputHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"]],{"value":["valueChanged"]}],[2,"smoothly-burger",{"visible":[1540],"open":[1540],"mediaQuery":[513,"media-query"],"history":[32]},[[0,"click","clickHandler"],[9,"resize","resizeHandler"]],{"open":["openChanged"]}],[6,"smoothly-input-checkbox",{"name":[1],"changed":[1028],"readonly":[1540],"checked":[1028],"value":[4],"looks":[1537],"disabled":[516],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},null,{"checked":["elementCheck"]}],[6,"smoothly-input-file",{"changed":[1028],"readonly":[1540],"accept":[1],"color":[1537],"looks":[1537],"camera":[513],"name":[513],"showLabel":[516,"show-label"],"value":[1040],"placeholder":[1537],"dragging":[32],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64],"binary":[64]},null,{"value":["valueChanged"]}],[6,"smoothly-input-radio-item",{"value":[1032],"selected":[1028],"looks":[1537],"name":[1025]}],[6,"smoothly-summary",{"open":[1540],"color":[1],"fill":[1],"size":[1]}],[2,"smoothly-theme-color",{"color":[1]}],[1,"smoothly-toggle-switch",{"checkmark":[516],"selected":[1540],"disabled":[516],"size":[513],"color":[513],"fill":[513]}],[0,"smoothly-urlencoded",{"data":[1]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-input-radio",{"changed":[1028],"value":[1032],"looks":[1537],"clearable":[4],"readonly":[1540],"name":[1],"listen":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyRadioButtonRegister","handleRegister"],[0,"smoothlyInputLoad","SmoothlyInputLoadHandler"],[0,"smoothlySelect","smoothlyRadioInputHandler"]],{"value":["valueChanged"],"readonly":["watchingReadonly"]}],[6,"smoothly-input-range",{"value":[1026],"looks":[1537],"changed":[1028],"readonly":[1540],"min":[2],"max":[2],"name":[1],"labelText":[1,"label-text"],"step":[8],"outputSide":[1,"output-side"],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},null,{"value":["valueChanged"]}],[6,"smoothly-label",{"hue":[2],"description":[1],"shape":[513]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[6,"smoothly-toggle",{"selected":[1540],"shape":[513],"disabled":[516],"name":[1],"value":[8]},[[0,"click","onClick"]]],[6,"smoothly-filter-picker",{"label":[1],"property":[1],"multiple":[4],"type":[1],"looks":[1]},[[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]]],[2,"smoothly-next-demo-nested-inner",{"data":[16]}],[6,"smoothly-filter",{"detailChildren":[32],"criteria":[32],"expanded":[32]},[[0,"smoothlyFilterUpdate","updateHandler"],[0,"smoothlyFilterManipulate","manipulateHandler"],[0,"smoothlyFilterField","filterFieldHandler"]]],[6,"smoothly-input-submit",{"delete":[516],"color":[1],"expand":[513],"fill":[513],"disabled":[1540],"display":[1540],"shape":[513],"type":[513],"size":[513],"toolTip":[1,"tool-tip"]}],[6,"smoothly-filter-input",{"property":[1],"placeholder":[1],"needle":[32]}],[2,"smoothly-notification",{"notice":[16],"closable":[4],"icon":[4],"tick":[32]},[[0,"trigger","onTrigger"]],{"notice":["onUpdatedNotice"]}],[2,"smoothly-back-to-top",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-filter-toggle",{"icon":[1],"properties":[16],"toolTip":[1,"tool-tip"],"not":[4],"flip":[516],"active":[1028]}],[6,"smoothly-input-edit",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"display":[1540],"shape":[513],"type":[513],"size":[513],"toolTip":[1,"tool-tip"]},[[0,"click","clickHandler"]]],[6,"smoothly-input-reset",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"size":[513],"shape":[513],"display":[1540],"type":[513],"tooltip":[1]},[[0,"click","clickHandler"]]],[6,"smoothly-input-clear",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"size":[513],"shape":[513],"display":[1540],"type":[513]},[[0,"click","clickHandler"]]],[6,"smoothly-next-table-row-group",{"align":[516],"open":[1540]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]],{"open":["openHandler"]}],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]],{"selectedElement":["onSelectedChange"]}],[6,"smoothly-table-expandable-row",{"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"smoothlyTableLoad","handleTableLoaded"]],{"open":["handleSpotlight"],"allowSpotlight":["handleSpotlight"]}],[2,"smoothly-theme-color-variant",{"color":[513],"variant":[513]}],[0,"smoothly-tuple",{"tuple":[16]}],[6,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]},null,{"start":["onStart"],"end":["onEnd"]}],[2,"smoothly-filter-field",{"criteria":[8],"clear":[64]}],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"smoothlyTableLoad","handleTableLoaded"]],{"open":["openChanged","handleSpotlight"],"allowSpotlight":["handleSpotlight"]}],[6,"smoothly-next-table-expandable-cell",{"span":[514],"open":[1540],"close":[64]}],[6,"smoothly-next-table-foot"],[6,"smoothly-table",{"root":[1540],"color":[1537],"align":[513],"open":[1540]},[[0,"smoothlyExpandableLoad","handleExpandableLoaded"],[0,"smoothlyExpandableChange","handleExpandableState"],[0,"smoothlySpotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"smoothlyExpansionLoad","handleEvents"],[0,"smoothlyExpansionOpen","handleEvents"]]],[6,"smoothly-table-footer"],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",{"open":[1540]},[[0,"smoothlyExpansionLoad","onExpansionLoad"],[0,"smoothlyExpandableChange","onExpansionChange"],[0,"smoothlyExpansionOpen","onExpansionOpen"]]],[6,"smoothly-button-confirm",{"color":[1],"name":[513],"doubleClickTime":[2,"double-click-time"],"expand":[513],"fill":[1],"disabled":[516],"shape":[1],"type":[1],"size":[1],"clickTimeStamp":[32]}],[6,"smoothly-next-table-expandable-row",{"open":[1540]}],[6,"smoothly-submit",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"size":[513],"shape":[513],"prevent":[4]},[[0,"click","clickHandler"]]],[6,"smoothly-picker",{"looks":[1537],"name":[513],"changed":[1028],"open":[1540],"mutable":[516],"multiple":[516],"readonly":[1540],"validator":[16],"selected":[32],"display":[32],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyPickerMenuLoaded","menuLoadedHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[8,"click","clickHandler"],[8,"focusin","focusHandler"]],{"selected":["selectedChanged"]}],[6,"smoothly-input-month",{"readonly":[1540],"color":[513],"looks":[1537],"name":[1],"value":[1025],"next":[516],"previous":[516],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"]],{"value":["valueChanged"]}],[6,"smoothly-lazy",{"show":[1028],"content":[16]}],[6,"smoothly-trigger",{"color":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[6,"smoothly-picker-menu",{"looks":[1],"open":[516],"multiple":[516],"mutable":[516],"readonly":[516],"validator":[16],"backend":[32],"options":[32],"created":[32],"search":[32],"valid":[32],"display":[32],"flip":[32],"flipChecked":[32]},[[9,"scroll","scrollHandler"],[0,"smoothlyPickerOptionLoad","optionLoadHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlySlotEmpty","emptyDisplayHandler"]],{"open":["openChange"],"readonly":["readonlyChanged"]}],[4,"smoothly-form",{"color":[1537],"value":[1040],"action":[1],"type":[1],"readonly":[1028],"looks":[513],"name":[1],"prevent":[4],"changed":[1028],"processing":[32],"listen":[64],"submit":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInput","smoothlyInputHandler"],[8,"smoothlyFormSubmit","windowSubmitHandler"],[0,"smoothlyFormSubmit","submitHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[0,"smoothlyFormDisable","smoothlyFormDisableHandler"]],{"value":["watchValue"],"readonly":["watchReadonly"]}],[2,"smoothly-load-more",{"offset":[1],"name":[1],"multiple":[4]}],[6,"smoothly-next-table",{"columns":[2]}],[6,"smoothly-next-table-body"],[6,"smoothly-next-table-cell",{"span":[514]}],[6,"smoothly-next-table-head"],[6,"smoothly-next-table-row",null,[[0,"smoothlyNextTableExpandableCellRegister","smoothlyNextTableExpandableCellRegisterHandler"],[0,"smoothlyNextTableExpandableCellOpened","smoothlyNextTableExpandableCellOpenedHandler"]]],[6,"smoothly-input-select",{"name":[1],"color":[1537],"looks":[1537],"showSelected":[1540,"show-selected"],"readonly":[1540],"multiple":[4],"clearable":[4],"changed":[1028],"placeholder":[520],"menuHeight":[1,"menu-height"],"required":[4],"searchDisabled":[4,"search-disabled"],"open":[32],"selected":[32],"filter":[32],"listen":[64],"reset":[64],"clear":[64],"edit":[64],"setInitialValue":[64]},[[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[8,"click","onWindowClick"],[0,"smoothlyItemSelect","onItemSelect"],[0,"keydown","onKeyDown"]],{"selected":["onSelectedChange"],"required":["onRequiredChange"],"filter":["onFilterChange"],"readonly":["watchingReadonly"],"open":["onClosed"]}],[1,"smoothly-picker-option",{"selected":[1540],"visible":[1540],"value":[1032],"search":[1040],"position":[514],"required":[516],"readonly":[32],"slotted":[32],"clickHandler":[64]},null,{"position":["emitChange"],"selected":["emitChange"],"slotted":["emitChange"]}],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[6,"smoothly-slot-elements",{"clone":[4],"nodes":[1040]},null,{"nodes":["componentDidLoad"]}],[6,"smoothly-item",{"value":[8],"selected":[1540],"marked":[1540],"selectable":[516],"deselectable":[4],"filter":[64]},[[0,"click","clickHandler"]],{"selected":["selectedWatcher"]}],[6,"smoothly-slotted-elements",{"clone":[4]}],[2,"smoothly-spinner",{"size":[513],"overlay":[516]}],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"size":[513],"shape":[513],"link":[1]}],[6,"smoothly-input",{"color":[1537],"delay":[2],"looks":[1537],"name":[513],"value":[1032],"type":[513],"required":[516],"showLabel":[516,"show-label"],"autocomplete":[4],"placeholder":[513],"disabled":[4],"readonly":[1540],"currency":[513],"changed":[1028],"formatter":[32],"initialValue":[32],"listen":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]},[[0,"smoothlyInputLoad","SmoothlyInputLoadHandler"]],{"type":["typeChange"],"value":["valueWatcher"],"readonly":["watchingReadonly"],"currency":["onCurrency"]}],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[513],"size":[513],"rotate":[514],"flip":[513],"toolTip":[1,"tool-tip"],"latestPromise":[32],"document":[32]},null,{"name":["nameChanged"]}]]],["p-b7b626db",[[2,"smoothly-address-display",{"value":[16],"editable":[4]}]]],["p-c059100f",[[2,"smoothly-address",{"value":[16],"editable":[4]}]]]]'),e)}));
|
|
1
|
+
import{p as e,b as o}from"./p-a089461a.js";export{s as setNonce}from"./p-a089461a.js";import{g as l}from"./p-8661963e.js";import"./p-7e394c6a.js";var t=()=>{const o=import.meta.url;const l={};if(o!==""){l.resourcesUrl=new URL(".",o).href}return e(l)};t().then((async e=>{await l();return o(JSON.parse('[["p-9fc75fa6",[[2,"smoothly-addresses",{"value":[16],"editable":[16]}]]],["p-5cd2660f",[[6,"smoothly-checkbox",{"size":[1],"checked":[1540],"intermediate":[1540],"unavailable":[516],"disabled":[516],"name":[1],"value":[8],"t":[32],"toggle":[64],"clear":[64]},null,{"checked":["unavailableChanged"],"unavailable":["unavailableChanged"]}]]],["p-c2c08533",[[6,"smoothly-accordion",{"value":[1025],"removeItem":[64]},[[0,"smoothlyOpen","handleOpenClose"],[0,"smoothlyClose","handleOpenClose"],[0,"smoothlyAccordionItemWillLoad","onAccordionItemDidLoad"]],{"value":["valueChanged"]}]]],["p-71e89cb6",[[6,"smoothly-accordion-item",{"name":[1],"brand":[1],"open":[1540]},null,{"open":["openChanged"]}]]],["p-399cd405",[[6,"smoothly-color",{"color":[513]}]]],["p-54a0cea2",[[2,"smoothly-country",{"value":[1],"text":[1],"language":[32]}]]],["p-4d7d2520",[[2,"smoothly-display-date-time",{"datetime":[1]}]]],["p-a8d13623",[[2,"smoothly-google-font",{"value":[1]}]]],["p-31257002",[[0,"smoothly-reorder"]]],["p-07143277",[[2,"smoothly-svg",{"url":[513],"size":[513],"color":[1]}]]],["p-c8179563",[[6,"smoothly-trigger-sink",{"context":[16],"destination":[1],"filter":[1]},[[0,"trigger","TriggerListener"]]]]],["p-cad42990",[[6,"smoothly-trigger-source",{"listen":[1]}]]],["p-535d2b01",[[0,"smoothly-app-demo",{"baseUrl":[1,"base-url"]}],[0,"smoothly-input-demo",{"duration":[32]}],[2,"smoothly-table-demo"],[2,"smoothly-next-demo"],[0,"smoothly-display-demo",{"downloadingSpinner":[32]}],[0,"smoothly-button-demo"],[4,"smoothly-app",{"label":[1],"color":[1],"home":[1],"menuOpen":[1540,"menu-open"],"selected":[32],"selectRoom":[64]},[[8,"popstate","locationChangeHandler"],[0,"smoothlyRoomSelected","roomSelectedHandler"],[0,"smoothlyRoomLoaded","roomLoadedHandler"],[8,"click","clickHandler"]],{"selected":["selectedChanged"]}],[0,"smoothly-dialog-demo"],[6,"smoothly-app-room",{"label":[513],"icon":[513],"disabled":[516],"path":[1],"to":[1],"selected":[1540],"content":[16],"getContent":[64],"setSelected":[64]}],[6,"smoothly-theme-picker",{"element":[1]}],[2,"smoothly-select-demo"],[2,"smoothly-theme-colors"],[2,"smoothly-icon-demo"],[2,"smoothly-table-demo-filtered",{"criteria":[32],"cats":[32],"selector":[32]},[[0,"smoothlyFilter","onFilterUpdate"],[0,"smoothlyInput","smoothlyInputHandler"]]],[2,"smoothly-table-testing",{"counter":[32]}],[2,"smoothly-input-demo-controlled-form",{"name":[32],"currency":[32],"date":[32]},null,{"name":["nameChanged"]}],[2,"smoothly-picker-demo",{"counter":[32],"data":[32],"change":[32]},[[0,"smoothlyFormSubmit","submitHandler"]]],[2,"smoothly-next-demo-group"],[2,"smoothly-next-demo-colspan"],[2,"smoothly-next-demo-nested"],[2,"smoothly-next-demo-simple"],[6,"smoothly-input-date",{"color":[1537],"looks":[1537],"name":[513],"value":[1025],"open":[1028],"max":[1025],"min":[1025],"showLabel":[516,"show-label"],"disabled":[1028],"clear":[64]},[[0,"smoothlyInput","smoothlyInputHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyDateSet","dateSetHandler"]],{"value":["onStart"]}],[2,"smoothly-input-date-range",{"name":[1],"color":[1537],"looks":[1537],"showLabel":[516,"show-label"],"start":[1025],"end":[1025],"max":[1],"min":[1],"open":[32],"clear":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]]],[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-input-color",{"value":[1025],"looks":[1537],"name":[1],"clear":[64]},[[0,"smoothlyInput","smoothlyInputHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"]],{"value":["valueChanged"]}],[2,"smoothly-burger",{"visible":[1540],"open":[1540],"mediaQuery":[513,"media-query"],"history":[32]},[[0,"click","clickHandler"],[9,"resize","resizeHandler"]],{"open":["openChanged"]}],[6,"smoothly-input-checkbox",{"name":[1],"changed":[1028],"readonly":[1540],"checked":[1028],"value":[4],"looks":[1537],"disabled":[516],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},null,{"checked":["elementCheck"]}],[6,"smoothly-input-file",{"changed":[1028],"readonly":[1540],"accept":[1],"color":[1537],"looks":[1537],"camera":[513],"name":[513],"showLabel":[516,"show-label"],"value":[1040],"placeholder":[1537],"dragging":[32],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64],"binary":[64]},null,{"value":["valueChanged"]}],[6,"smoothly-input-radio-item",{"value":[1032],"selected":[1028],"looks":[1537],"name":[1025]}],[6,"smoothly-summary",{"open":[1540],"color":[1],"fill":[1],"size":[1]}],[2,"smoothly-theme-color",{"color":[1]}],[1,"smoothly-toggle-switch",{"checkmark":[516],"selected":[1540],"disabled":[516],"size":[513],"color":[513],"fill":[513]}],[0,"smoothly-urlencoded",{"data":[1]}],[2,"smoothly-display-amount",{"amount":[8],"currency":[1],"toInteger":[4,"to-integer"]}],[2,"smoothly-frame",{"url":[1],"name":[1],"origin":[1],"send":[64]}],[6,"smoothly-input-radio",{"changed":[1028],"value":[1032],"looks":[1537],"clearable":[4],"readonly":[1540],"name":[1],"listen":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyRadioButtonRegister","handleRegister"],[0,"smoothlyInputLoad","SmoothlyInputLoadHandler"],[0,"smoothlySelect","smoothlyRadioInputHandler"]],{"value":["valueChanged"],"readonly":["watchingReadonly"]}],[6,"smoothly-input-range",{"value":[1026],"looks":[1537],"changed":[1028],"readonly":[1540],"min":[2],"max":[2],"name":[1],"labelText":[1,"label-text"],"step":[8],"outputSide":[1,"output-side"],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},null,{"value":["valueChanged"]}],[6,"smoothly-label",{"hue":[2],"description":[1],"shape":[513]}],[6,"smoothly-popup",{"visible":[1540],"direction":[1537],"cssVariables":[32]}],[6,"smoothly-quiet",{"color":[1]}],[2,"smoothly-skeleton",{"widths":[16],"width":[1025],"color":[1],"period":[2],"distance":[1],"align":[513]}],[6,"smoothly-toggle",{"selected":[1540],"shape":[513],"disabled":[516],"name":[1],"value":[8]},[[0,"click","onClick"]]],[6,"smoothly-filter-picker",{"label":[1],"property":[1],"multiple":[4],"type":[1],"looks":[1]},[[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlyInputLooks","smoothlyInputLooksHandler"]]],[2,"smoothly-next-demo-nested-inner",{"data":[16]}],[6,"smoothly-filter",{"detailChildren":[32],"criteria":[32],"expanded":[32]},[[0,"smoothlyFilterUpdate","updateHandler"],[0,"smoothlyFilterManipulate","manipulateHandler"],[0,"smoothlyFilterField","filterFieldHandler"]]],[6,"smoothly-input-submit",{"delete":[516],"color":[1],"expand":[513],"fill":[513],"disabled":[1540],"display":[1540],"shape":[513],"type":[513],"size":[513],"toolTip":[1,"tool-tip"]}],[6,"smoothly-filter-input",{"property":[1],"placeholder":[1],"needle":[32]}],[2,"smoothly-notification",{"notice":[16],"closable":[4],"icon":[4],"tick":[32]},[[0,"trigger","onTrigger"]],{"notice":["onUpdatedNotice"]}],[2,"smoothly-back-to-top",{"opacity":[1],"bottom":[1],"right":[1],"visible":[32]}],[2,"smoothly-filter-toggle",{"icon":[1],"properties":[16],"toolTip":[1,"tool-tip"],"not":[4],"flip":[516],"active":[1028]}],[6,"smoothly-input-edit",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"display":[1540],"shape":[513],"type":[513],"size":[513],"toolTip":[1,"tool-tip"]},[[0,"click","clickHandler"]]],[6,"smoothly-input-reset",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"size":[513],"shape":[513],"display":[1540],"type":[513],"tooltip":[1]},[[0,"click","clickHandler"]]],[6,"smoothly-input-clear",{"color":[513],"expand":[513],"fill":[513],"disabled":[1540],"size":[513],"shape":[513],"display":[1540],"type":[513]},[[0,"click","clickHandler"]]],[6,"smoothly-next-table-row-group",{"align":[516],"open":[1540]}],[6,"smoothly-tab",{"label":[1],"open":[1540]},[[0,"click","onClick"]],{"open":["openHandler"]}],[6,"smoothly-tab-switch",{"selectedElement":[32]},[[0,"expansionOpen","openChanged"]],{"selectedElement":["onSelectedChange"]}],[6,"smoothly-table-expandable-row",{"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"smoothlyTableLoad","handleTableLoaded"]],{"open":["handleSpotlight"],"allowSpotlight":["handleSpotlight"]}],[2,"smoothly-theme-color-variant",{"color":[513],"variant":[513]}],[0,"smoothly-tuple",{"tuple":[16]}],[6,"smoothly-calendar",{"month":[1025],"value":[1025],"start":[1025],"end":[1025],"max":[1025],"min":[1025],"doubleInput":[516,"double-input"],"firstSelected":[32]},null,{"start":["onStart"],"end":["onEnd"]}],[2,"smoothly-filter-field",{"criteria":[8],"clear":[64]}],[6,"smoothly-table-cell"],[6,"smoothly-table-expandable-cell",{"open":[1540],"allowSpotlight":[32],"spotlight":[32]},[[0,"click","onClick"],[0,"smoothlyTableLoad","handleTableLoaded"]],{"open":["openChanged","handleSpotlight"],"allowSpotlight":["handleSpotlight"]}],[6,"smoothly-next-table-expandable-cell",{"span":[514],"open":[1540],"close":[64]}],[6,"smoothly-next-table-foot"],[6,"smoothly-table",{"root":[1540],"color":[1537],"align":[513],"open":[1540]},[[0,"smoothlyExpandableLoad","handleExpandableLoaded"],[0,"smoothlyExpandableChange","handleExpandableState"],[0,"smoothlySpotlightChange","handleSpotlightState"],[0,"smoothlyNestedTable","handleNestedTable"],[0,"smoothlyExpansionLoad","handleEvents"],[0,"smoothlyExpansionOpen","handleEvents"]]],[6,"smoothly-table-footer"],[6,"smoothly-table-header",{"name":[1]}],[6,"smoothly-table-row",{"open":[1540]},[[0,"smoothlyExpansionLoad","onExpansionLoad"],[0,"smoothlyExpandableChange","onExpansionChange"],[0,"smoothlyExpansionOpen","onExpansionOpen"]]],[6,"smoothly-button-confirm",{"color":[1],"name":[513],"doubleClickTime":[2,"double-click-time"],"expand":[513],"fill":[1],"disabled":[516],"shape":[1],"type":[1],"size":[1],"clickTimeStamp":[32]}],[6,"smoothly-next-table-expandable-row",{"open":[1540]}],[6,"smoothly-submit",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"size":[513],"shape":[513],"prevent":[4]},[[0,"click","clickHandler"]]],[6,"smoothly-picker",{"looks":[1537],"name":[513],"changed":[1028],"open":[1540],"mutable":[516],"multiple":[516],"readonly":[1540],"validator":[16],"selected":[32],"display":[32],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyPickerMenuLoaded","menuLoadedHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[8,"click","clickHandler"],[8,"focusin","focusHandler"]],{"selected":["selectedChanged"]}],[6,"smoothly-input-month",{"readonly":[1540],"color":[513],"looks":[1537],"name":[1],"value":[1025],"next":[516],"previous":[516],"clear":[64],"listen":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"]],{"value":["valueChanged"]}],[6,"smoothly-lazy",{"show":[1028],"content":[16]}],[6,"smoothly-trigger",{"color":[513],"fill":[513],"disabled":[516],"type":[513],"name":[1],"value":[8]},[[0,"click","onClick"]]],[6,"smoothly-picker-menu",{"looks":[1],"open":[516],"multiple":[516],"mutable":[516],"readonly":[516],"validator":[16],"backend":[32],"options":[32],"created":[32],"search":[32],"valid":[32],"display":[32],"flip":[32],"flipChecked":[32]},[[9,"scroll","scrollHandler"],[0,"smoothlyPickerOptionLoad","optionLoadHandler"],[0,"smoothlyPickerOptionLoaded","optionLoadedHandler"],[0,"smoothlyPickerOptionChange","optionChangeHandler"],[0,"smoothlySlotEmpty","emptyDisplayHandler"]],{"open":["openChange"],"readonly":["readonlyChanged"]}],[4,"smoothly-form",{"color":[1537],"value":[1040],"action":[1],"type":[1],"readonly":[1028],"looks":[513],"name":[1],"prevent":[4],"changed":[1028],"processing":[32],"listen":[64],"submit":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64]},[[0,"smoothlyInputLooks","smoothlyInputLooksHandler"],[0,"smoothlyInput","smoothlyInputHandler"],[8,"smoothlyFormSubmit","windowSubmitHandler"],[0,"smoothlyFormSubmit","submitHandler"],[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[0,"smoothlyFormDisable","smoothlyFormDisableHandler"]],{"value":["watchValue"],"readonly":["watchReadonly"]}],[2,"smoothly-load-more",{"offset":[1],"name":[1],"multiple":[4]}],[6,"smoothly-next-table",{"columns":[2]}],[6,"smoothly-next-table-body"],[6,"smoothly-next-table-cell",{"span":[514]}],[6,"smoothly-next-table-head"],[6,"smoothly-next-table-row",null,[[0,"smoothlyNextTableExpandableCellRegister","smoothlyNextTableExpandableCellRegisterHandler"],[0,"smoothlyNextTableExpandableCellOpened","smoothlyNextTableExpandableCellOpenedHandler"]]],[6,"smoothly-input-select",{"name":[1],"color":[1537],"looks":[1537],"showSelected":[1540,"show-selected"],"readonly":[1540],"multiple":[4],"clearable":[4],"changed":[1028],"placeholder":[520],"menuHeight":[1,"menu-height"],"required":[4],"searchDisabled":[4,"search-disabled"],"open":[32],"selected":[32],"filter":[32],"listen":[64],"reset":[64],"clear":[64],"edit":[64],"setInitialValue":[64]},[[0,"smoothlyInputLoad","smoothlyInputLoadHandler"],[8,"click","onWindowClick"],[0,"smoothlyItemSelect","onItemSelect"],[0,"keydown","onKeyDown"]],{"selected":["onSelectedChange"],"required":["onRequiredChange"],"filter":["onFilterChange"],"readonly":["watchingReadonly"],"open":["onClosed"]}],[1,"smoothly-picker-option",{"selected":[1540],"visible":[1540],"value":[1032],"search":[1040],"position":[514],"required":[516],"readonly":[32],"slotted":[32],"clickHandler":[64]},null,{"position":["emitChange"],"selected":["emitChange"],"slotted":["emitChange"]}],[2,"smoothly-display",{"type":[1],"value":[8],"currency":[1],"country":[1],"format":[16]}],[6,"smoothly-slot-elements",{"clone":[4],"nodes":[1040]},null,{"nodes":["componentDidLoad"]}],[6,"smoothly-item",{"value":[8],"selected":[1540],"marked":[1540],"selectable":[516],"deselectable":[4],"filter":[64]},[[0,"click","clickHandler"]],{"selected":["selectedWatcher"]}],[6,"smoothly-slotted-elements",{"clone":[4]}],[2,"smoothly-spinner",{"size":[513],"overlay":[516]}],[6,"smoothly-button",{"color":[513],"expand":[513],"fill":[513],"disabled":[516],"type":[513],"size":[513],"shape":[513],"link":[1]}],[6,"smoothly-input",{"color":[1537],"delay":[2],"looks":[1537],"name":[513],"value":[1032],"type":[513],"required":[516],"showLabel":[516,"show-label"],"autocomplete":[4],"placeholder":[513],"disabled":[4],"readonly":[1540],"currency":[513],"changed":[1028],"formatter":[32],"initialValue":[32],"listen":[64],"clear":[64],"edit":[64],"reset":[64],"setInitialValue":[64],"getFormData":[64],"setKeepFocusOnReRender":[64],"setSelectionRange":[64]},[[0,"smoothlyInputLoad","SmoothlyInputLoadHandler"]],{"type":["typeChange"],"value":["valueWatcher"],"readonly":["watchingReadonly"],"currency":["onCurrency"]}],[2,"smoothly-icon",{"color":[513],"fill":[513],"name":[513],"size":[513],"rotate":[514],"flip":[513],"toolTip":[1,"tool-tip"],"latestPromise":[32],"document":[32]},null,{"name":["nameChanged"]}]]],["p-b7b626db",[[2,"smoothly-address-display",{"value":[16],"editable":[4]}]]],["p-c059100f",[[2,"smoothly-address",{"value":[16],"edit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AAQ,EAAE,CAAC,CAAC,IACjB,8DAAQ,CACF,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/item/style.css?tag=smoothly-item&encapsulation=scoped","src/components/item/index.tsx"],"sourcesContent":[":host([selected]) {\n\tbackground-color: rgb(var(--smoothly-primary-shade));\n\tcolor: rgb(var(--smoothly-primary-contrast));\n}\n:host {\n\tpadding: 0.5em;\n\tcursor: pointer;\n\tcolor: rgb(var(--smoothly-default-contrast));\n\tborder: rgb(var(--smoothly-default-shade) solid 1px);\n}\n:host([marked]),\n:host:hover {\n\tbackground-color: rgba(var(--smoothly-primary-tint), .3);\n}\n","import {\n\tComponent,\n\tComponentDidLoad,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tMethod,\n\tProp,\n\tVNode,\n\tWatch,\n} from \"@stencil/core\"\nimport { Item } from \"./Item\"\n\n@Component({\n\ttag: \"smoothly-item\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyItem implements Item, ComponentWillLoad, ComponentDidLoad {\n\t@Element() element: HTMLSmoothlyItemElement\n\t@Prop() value: any\n\t@Prop({ reflect: true, mutable: true }) selected: boolean\n\t@Prop({ reflect: true, mutable: true }) marked: boolean\n\t@Prop({ reflect: true }) selectable = true\n\t@Prop() deselectable = true\n\t@Event() smoothlyItemSelect: EventEmitter<HTMLSmoothlyItemElement>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\n\t@Listen(\"click\")\n\tclickHandler(): void {\n\t\tif (this.selectable && (!this.selected || this.deselectable))\n\t\t\tthis.selected = !this.selected\n\t}\n\t@Watch(\"selected\")\n\tselectedWatcher(): void {\n\t\tthis.smoothlyItemSelect.emit(this.element)\n\t}\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t}\n\tcomponentDidLoad(): void {\n\t\tif (this.selected && this.selectable)\n\t\t\tthis.smoothlyItemSelect.emit(this.element)\n\t}\n\t@Method()\n\tasync filter(filter: string): Promise<void> {\n\t\tconst value = typeof this.value === \"string\" ? this.value : JSON.stringify(this.value ?? \"\")\n\t\tthis.element.hidden =\n\t\t\tfilter && this.selectable\n\t\t\t\t? !(value.includes(filter) || this.element.innerText.toLowerCase().includes(filter))\n\t\t\t\t: false\n\t}\n\trender(): VNode | VNode[] {\n\t\treturn (\n\t\t\t<Host tabIndex={-1}>\n\t\t\t\t<slot />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-67e3f6ba.js","mappings":";;;;;AAAA,MAAM,QAAQ,GAAG,unIAAunI,CAAC;AACzoI,4BAAe,QAAQ;;MCaV,aAAa;;;;;;;;;;QAmBjB,wBAAmB,GAAG,KAAK,CAAA;QAI3B,eAAU,GAAG,IAAI,CAAC,QAAQ,CAAA;QAC1B,aAAQ,GAAsD,EAAE,CAAA;;qBAtBxD,CAAC;qBACsC,OAAO;;;oBAGjB,MAAM;wBACf,KAAK;yBACJ,IAAI;4BAClB,IAAI;;wBAER,KAAK;wBAC2B,KAAK;;uBAErB,KAAK;;;;IAmBxC,MAAM,MAAM,CAAC,QAAmB,EAAE,QAA6C;QAC9E,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAA;QAClC,QAAQ,CAAC,IAAI,CAAC,CAAA;KACd;IAED,MAAM,wBAAwB,CAAC,KAAmD;QACjF,IAAI,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE;YAChF,KAAK,CAAC,eAAe,EAAE,CAAA;YACvB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;SAClB;KACD;IAED,UAAU;QACT,IAAI,MAA8D,C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CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,GAAGC,QAAc,CAAC,EAAE,CAAC,MAAM,CAAC,GAAGD,MAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;AAChH,CAAC;;;;;;;;;;;;;;;;;;;;;;;","names":["tidily.get","tidily.StateEditor","tidily.Action","isoly.Locale","isoly.Language"],"sources":["src/components/input/style.css?tag=smoothly-input&encapsulation=scoped","src/components/input/index.tsx"],"sourcesContent":["@import \"./shared.css\";\n\n:host {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tfont-weight: var(--smoothly-font-weight);\n\toverflow: hidden;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tcolor: rgb(var(--text-color, var(--smoothly-color-contrast)));\n}\n:host[hidden] {\n\tdisplay: none;\n}\n:host > div:nth-child(2) {\n\tmargin-left: 0.2em;\n}\n:host > div {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n}\n:host > div > label {\n\tposition: absolute;\n\tleft: 0.4em;\n\ttop: 0.6em;\n\topacity: 0.8;\n\tuser-select: none;\n\tcursor: inherit;\n\ttransform-origin: top left;\n\ttransition: transform 100ms ease;\n}\n:host:not([show-label]) > div > label {\n\tdisplay: none;\n}\n:host:not([show-label]) > div > input {\n\tpadding: 0.7em 0.7em 0.7em 0.8em;\n}\n:host > div > input {\n\tpadding: 1.2em 0.7em 0.2em 0.8em;\n\tbox-sizing: border-box;\n\twidth: 100%;\n\theight: 100%;\n\tborder: 0;\n\tz-index: 1;\n\tposition: relative;\n\tfont-size: 1rem;\n\tfont-family: var(--smoothly-font-family);\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n:host > div > smoothly-icon {\n\tdisplay: none;\n\tposition: absolute;\n\tright: 0.2em;\n\ttop: 0.6em;\n}\n\n:host > div > input:invalid + label + smoothly-icon {\n\tdisplay: block;\n}\n:host > div > label {\n\tz-index: 1;\n\tpointer-events: none;\n}\n:host:not([readonly]):not(.has-value)[placeholder] > div > label,\n:host.has-value > div > label,\n:host:not([readonly]):not(.has-value):focus-within > div > label {\n\ttop: 0.4em;\n\ttransform: scale(0.6);\n}\n:host > div > input:focus {\n\toutline: none;\n}\n:host > div > input:-webkit-autofill,\n:host > div > input:-webkit-autofill:hover,\n:host > div > input:-webkit-autofill:focus,\n:host > div > input:-webkit-autofill:active {\n\tbox-shadow: 0 0 0 40em rgb(var(--background-color, var(--smoothly-color-shade))) inset;\n\t-webkit-box-shadow: 0 0 0 40em rgb(var(--background-color, var(--smoothly-color-shade))) inset;\n}\n:host > div > input:-webkit-autofill,\n:host > div > input:-webkit-autofill + label {\n\t-webkit-text-fill-color: rgb(var(--text-color, var(--smoothly-color-contrast)));\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, Method, Prop, State, Watch } from \"@stencil/core\"\nimport { isoly } from \"isoly\"\nimport { tidily } from \"tidily\"\nimport { Color } from \"../../model\"\nimport { Clearable } from \"./Clearable\"\nimport { Editable } from \"./Editable\"\nimport { Input } from \"./Input\"\nimport { Looks } from \"./Looks\"\n\n@Component({\n\ttag: \"smoothly-input\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyInput implements Clearable, Input, Editable {\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop() delay = 0\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true }) name: string\n\t@Prop({ mutable: true }) value: any\n\t@Prop({ reflect: true }) type: tidily.Type = \"text\"\n\t@Prop({ reflect: true }) required = false\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop() autocomplete = true\n\t@Prop({ reflect: true }) placeholder: string | undefined\n\t@Prop() disabled = false\n\t@Prop({ mutable: true, reflect: true }) readonly = false\n\t@Prop({ reflect: true }) currency?: isoly.Currency\n\t@Prop({ mutable: true }) changed = false\n\t@State() formatter: tidily.Formatter & tidily.Converter<any>\n\t@State() initialValue?: any\n\tprivate inputElement: HTMLInputElement\n\t/** On re-render the input will blur. This boolean is meant to keep track of if input should keep its focus. */\n\tprivate keepFocusOnReRender = false\n\tprivate lastValue: any\n\tprivate state: Readonly<tidily.State> & Readonly<tidily.Settings>\n\tprivate abortInputEvent?: () => void\n\tprivate uneditable = this.readonly\n\tprivate listener: { changed?: (parent: Editable) => Promise<void> } = {}\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyFormDisable: EventEmitter<(disabled: boolean) => void>\n\t@Event() smoothlyBlur: EventEmitter<void>\n\t@Event() smoothlyChange: EventEmitter<Record<string, any>>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\n\t@Method()\n\tasync listen(property: \"changed\", listener: (parent: Editable) => Promise<void>): Promise<void> {\n\t\tthis.listener[property] = listener\n\t\tlistener(this)\n\t}\n\t@Listen(\"smoothlyInputLoad\")\n\tasync SmoothlyInputLoadHandler(event: CustomEvent<(parent: SmoothlyInput) => void>): Promise<void> {\n\t\tif (!(event.target && \"name\" in event.target && event.target.name == this.name)) {\n\t\t\tevent.stopPropagation()\n\t\t\tevent.detail(this)\n\t\t}\n\t}\n\t@Watch(\"type\")\n\ttypeChange(): void {\n\t\tlet result: (tidily.Formatter & tidily.Converter<any>) | undefined\n\t\tswitch (this.type) {\n\t\t\tcase \"price\":\n\t\t\t\tresult = tidily.get(\"price\", this.currency)\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\t\tresult = tidily.get(this.type, getLocale())\n\t\t\t\tbreak\n\t\t}\n\n\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\tthis.formatter = result || tidily.get(\"text\")!\n\t}\n\tprivate newState(state: tidily.State) {\n\t\treturn this.formatter.format(tidily.StateEditor.copy(this.formatter.unformat(tidily.StateEditor.copy(state))))\n\t}\n\t@Watch(\"value\")\n\tvalueWatcher(value: any, before: any) {\n\t\tthis.changed = this.initialValue !== this.value\n\t\tif (this.lastValue != value) {\n\t\t\tthis.lastValue = value\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\tvalue: this.newState({ value: this.formatter.toString(value), selection: this.state.selection }).value,\n\t\t\t}\n\t\t}\n\t\tif (value != before) {\n\t\t\tif (typeof value == \"string\")\n\t\t\t\tvalue = value.trim()\n\t\t\tthis.smoothlyInputEmit(value)\n\t\t}\n\t\tthis.listener.changed?.(this)\n\t}\n\tasync smoothlyInputEmit(value: any): Promise<void> {\n\t\tthis.abortInputEvent?.()\n\t\tconst timeout = window.setTimeout(() => {\n\t\t\tthis.abortInputEvent = undefined\n\t\t\tthis.smoothlyInput.emit({ [this.name]: value })\n\t\t}, this.delay * 1000)\n\t\tthis.abortInputEvent = () => {\n\t\t\tthis.abortInputEvent = undefined\n\t\t\twindow.clearTimeout(timeout)\n\t\t}\n\t}\n\t@Watch(\"readonly\")\n\twatchingReadonly() {\n\t\tthis.listener.changed?.(this)\n\t}\n\t@Watch(\"currency\")\n\tonCurrency() {\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\tvalue: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).value,\n\t\t\tpattern: this.newState({ value: this.formatter.toString(this.value), selection: this.state.selection }).pattern,\n\t\t}\n\t}\n\tcomponentWillLoad() {\n\t\tthis.typeChange()\n\t\tconst value = this.formatter.toString(this.value) || \"\"\n\t\tthis.lastValue = this.initialValue = this.value\n\t\tconst start = value.length\n\t\tthis.state = this.newState({\n\t\t\tvalue,\n\t\t\tselection: { start, end: start, direction: \"none\" },\n\t\t})\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t\tthis.smoothlyInputLoad.emit(() => {\n\t\t\treturn\n\t\t})\n\t\t!this.readonly && this.smoothlyFormDisable.emit(readonly => (this.readonly = readonly))\n\t\tthis.listener.changed?.(this)\n\t}\n\tcomponentDidRender() {\n\t\tif (this.keepFocusOnReRender) {\n\t\t\tthis.inputElement.focus()\n\t\t\tthis.keepFocusOnReRender = false\n\t\t}\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\t!this.uneditable && (this.value = undefined)\n\t}\n\t@Method()\n\tasync edit(editable: boolean): Promise<void> {\n\t\t!this.uneditable && (this.readonly = !editable)\n\t}\n\t@Method()\n\tasync reset(): Promise<void> {\n\t\t!this.uneditable && (this.value = this.initialValue)\n\t}\n\t@Method()\n\tasync setInitialValue(): Promise<void> {\n\t\tthis.changed = false\n\t\tthis.initialValue = this.value\n\t\tthis.smoothlyInput.emit({ [this.name]: this.value })\n\t}\n\t@Method()\n\tasync getFormData(name: string): Promise<Record<string, any>> {\n\t\tconst result: Record<string, any> = {}\n\t\tconst form = document.forms.namedItem(name)\n\t\tif (form) {\n\t\t\tconst elements = form.elements\n\t\t\tfor (let i = 0; i < elements.length; i++) {\n\t\t\t\tconst element = elements.item(i)\n\t\t\t\tif (this.hasNameAndValue(element) && element.name)\n\t\t\t\t\tresult[element.name] = element.value\n\t\t\t}\n\t\t\t// Overwrite values with values from smoothly-input\n\t\t\tconst smoothlyInputs = form.getElementsByTagName(\"smoothly-input\")\n\t\t\tfor (let i = 0; i < smoothlyInputs.length; i++) {\n\t\t\t\tconst element = smoothlyInputs.item(i)\n\t\t\t\tif (this.hasNameAndValue(element) && element.name)\n\t\t\t\t\tresult[element.name] = element.value\n\t\t\t}\n\t\t}\n\t\treturn result\n\t}\n\thasNameAndValue(element: any): element is { name: string; value: string } {\n\t\treturn (\n\t\t\ttypeof (element as { name?: string }).name == \"string\" && typeof (element as { value?: string }).value == \"string\"\n\t\t)\n\t}\n\t@Method()\n\tasync setKeepFocusOnReRender(keepFocus: boolean) {\n\t\tthis.keepFocusOnReRender = keepFocus\n\t}\n\t@Method()\n\tasync setSelectionRange(start: number, end: number, direction?: tidily.Direction) {\n\t\tthis.state = this.newState({\n\t\t\t...this.state,\n\t\t\tselection: { start, end, direction: direction ?? this.state.selection.direction },\n\t\t})\n\t\tconst after = this.formatter.format(\n\t\t\ttidily.StateEditor.copy(this.formatter.unformat(tidily.StateEditor.copy({ ...this.state })))\n\t\t)\n\t\tthis.updateBackend(after, this.inputElement)\n\t}\n\tonBlur(event: FocusEvent) {\n\t\tthis.smoothlyBlur.emit()\n\t\tif (this.abortInputEvent) {\n\t\t\tthis.abortInputEvent()\n\t\t\tconst value = typeof this.value == \"string\" ? this.value.trim() : this.value\n\t\t\tthis.smoothlyInput.emit({ [this.name]: value })\n\t\t}\n\t\tif (this.initialValue != this.value)\n\t\t\tthis.smoothlyChange.emit({ [this.name]: this.value })\n\t}\n\tonFocus(event: FocusEvent) {\n\t\tconst after = this.formatter.format(\n\t\t\ttidily.StateEditor.copy(this.formatter.unformat(tidily.StateEditor.copy({ ...this.state })))\n\t\t)\n\t\tif (event.target)\n\t\t\tthis.updateBackend(after, event.target as HTMLInputElement, false)\n\t}\n\tonClick(event: MouseEvent) {\n\t\tconst backend = event.target as HTMLInputElement\n\t\tthis.state = {\n\t\t\t...this.state,\n\t\t\tvalue: backend.value,\n\t\t\tselection: {\n\t\t\t\tstart: backend.selectionStart ?? backend.value.length,\n\t\t\t\tend: backend.selectionEnd ?? backend.value.length,\n\t\t\t\tdirection: backend.selectionDirection ?? \"none\",\n\t\t\t},\n\t\t}\n\t\tconst after = this.newState({ ...this.state })\n\t\tthis.updateBackend(after, backend)\n\t}\n\tonKeyDown(event: KeyboardEvent) {\n\t\tif (event.key && !(event.key == \"Unidentified\")) {\n\t\t\tconst backend = event.target as HTMLInputElement\n\t\t\tthis.state = {\n\t\t\t\t...this.state,\n\t\t\t\tvalue: backend.value,\n\t\t\t\tselection: {\n\t\t\t\t\tstart: backend.selectionStart ?? backend.value.length,\n\t\t\t\t\tend: backend.selectionEnd ?? backend.value.length,\n\t\t\t\t\tdirection: backend.selectionDirection ?? \"none\",\n\t\t\t\t},\n\t\t\t}\n\t\t\tif (\n\t\t\t\t(!((event.ctrlKey || event.metaKey) && (event.key == \"v\" || event.key == \"x\" || event.key == \"c\")) &&\n\t\t\t\t\tevent.key.length == 1) ||\n\t\t\t\tevent.key == \"ArrowLeft\" ||\n\t\t\t\tevent.key == \"ArrowRight\" ||\n\t\t\t\tevent.key == \"Delete\" ||\n\t\t\t\tevent.key == \"Backspace\" ||\n\t\t\t\tevent.key == \"Home\" ||\n\t\t\t\tevent.key == \"End\"\n\t\t\t) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.processKey(event, backend)\n\t\t\t} else if (event.key == \"ArrowUp\" || event.key == \"ArrowDown\")\n\t\t\t\tevent.preventDefault()\n\t\t}\n\t}\n\tonPaste(event: ClipboardEvent) {\n\t\tevent.preventDefault()\n\t\tlet pasted = event.clipboardData ? event.clipboardData.getData(\"text\") : \"\"\n\t\tconst backend = event.target as HTMLInputElement\n\t\tpasted = this.expiresAutocompleteFix(backend, pasted)\n\t\tthis.processPaste(pasted, backend)\n\t}\n\tonInput(event: InputEvent) {\n\t\tif (event.inputType == \"insertReplacementText\") {\n\t\t\tthis.processKey({ key: \"a\", ctrlKey: true }, event.target as HTMLInputElement)\n\t\t\t;[...(event.data ?? \"\")].forEach(c => this.processKey({ key: c }, event.target as HTMLInputElement))\n\t\t} else {\n\t\t\tconst backend = event.target as HTMLInputElement\n\t\t\tlet data = backend.value\n\t\t\tif (data) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tthis.processKey({ key: \"a\", ctrlKey: true }, backend)\n\t\t\t\tdata = this.expiresAutocompleteFix(backend, data)\n\t\t\t\tfor (const letter of data)\n\t\t\t\t\tthis.processKey({ key: letter }, backend)\n\t\t\t}\n\t\t}\n\t}\n\tprivate expiresAutocompleteFix(backend: HTMLInputElement, value: string) {\n\t\tif (backend.attributes.getNamedItem(\"autocomplete\")?.value == \"cc-exp\")\n\t\t\tvalue = value.match(/^20\\d\\d[.\\D]*\\d\\d$/)\n\t\t\t\t? value.substring(value.length - 2, value.length) + value.substring(2, 4)\n\t\t\t\t: value.match(/^(1[3-9]|[2-9]\\d)[.\\D]*\\d\\d$/)\n\t\t\t\t? value.substring(value.length - 2, value.length) + value.substring(0, 2)\n\t\t\t\t: value.match(/^\\d\\d[.\\D]*20\\d\\d$/)\n\t\t\t\t? value.substring(0, 2) + value.substring(value.length - 2, value.length)\n\t\t\t\t: value\n\t\treturn value\n\t}\n\tprivate processPaste(pasted: string, backend: HTMLInputElement) {\n\t\tif (!this.readonly) {\n\t\t\tconst after = tidily.Action.paste(this.formatter, this.state, pasted)\n\t\t\tthis.updateBackend(after, backend)\n\t\t}\n\t}\n\tprivate processKey(event: tidily.Action, backend: HTMLInputElement) {\n\t\tif (!this.readonly) {\n\t\t\tconst after = tidily.Action.apply(this.formatter, this.state, event)\n\t\t\tthis.updateBackend(after, backend)\n\t\t}\n\t}\n\tupdateBackend(\n\t\tafter: Readonly<tidily.State> & Readonly<tidily.Settings>,\n\t\tbackend: HTMLInputElement,\n\t\tsetSelection = true\n\t) {\n\t\tif (after.value != backend.value)\n\t\t\tbackend.value = after.value\n\t\tif (setSelection) {\n\t\t\tif (backend.selectionStart != undefined && after.selection.start != backend.selectionStart)\n\t\t\t\tbackend.selectionStart = after.selection.start\n\t\t\tif (backend.selectionEnd != undefined && after.selection.end != backend.selectionEnd)\n\t\t\t\tbackend.selectionEnd = after.selection.end\n\t\t\tbackend.selectionDirection = after.selection.direction ?? backend.selectionDirection\n\t\t}\n\t\tthis.state = after\n\t\tthis.value = this.lastValue = this.formatter.fromString(\n\t\t\tthis.formatter.unformat(tidily.StateEditor.copy({ ...this.state })).value\n\t\t)\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={{ \"has-value\": this.state?.value != undefined && this.state?.value != \"\" }}\n\t\t\t\tonclick={() => this.inputElement?.focus()}>\n\t\t\t\t<slot name=\"start\"></slot>\n\t\t\t\t<div>\n\t\t\t\t\t<input\n\t\t\t\t\t\tcolor={this.color}\n\t\t\t\t\t\tname={this.name}\n\t\t\t\t\t\ttype={this.state?.type}\n\t\t\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\tautocomplete={this.autocomplete ? this.state?.autocomplete : \"off\"}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\treadOnly={this.readonly}\n\t\t\t\t\t\tpattern={this.state?.pattern && this.state?.pattern.source}\n\t\t\t\t\t\tvalue={this.state?.value}\n\t\t\t\t\t\tonInput={(e: InputEvent) => this.onInput(e)}\n\t\t\t\t\t\tonFocus={e => this.onFocus(e)}\n\t\t\t\t\t\tonClick={e => this.onClick(e)}\n\t\t\t\t\t\tonBlur={e => this.onBlur(e)}\n\t\t\t\t\t\tonKeyDown={e => this.onKeyDown(e)}\n\t\t\t\t\t\tref={(el: HTMLInputElement) => (this.inputElement = el)}\n\t\t\t\t\t\tonPaste={e => this.onPaste(e)}></input>\n\t\t\t\t\t<label htmlFor={this.name}>\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</label>\n\t\t\t\t\t<smoothly-icon name=\"alert-circle\" color=\"danger\" fill=\"clear\" size=\"small\"></smoothly-icon>\n\t\t\t\t</div>\n\t\t\t\t<slot name=\"end\"></slot>\n\t\t\t</Host>\n\t\t)\n\t}\n}\n\nfunction getLocale(): isoly.Locale | undefined {\n\tconst result = navigator.language\n\treturn isoly.Locale.is(result) ? result : isoly.Language.is(result) ? isoly.Locale.toLocale(result) : undefined\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-9f010bc0.js","mappings":";;;;;;;AAIA,MAAM,YAAY,GAAGA,MAAW,CAAe,EAAE,IAAI,EAAEC,YAAa,EAAwB,EAAE,CAAC,CAAA;IAK9E,MAAM,CAiBtB;AAjBD,WAAiB,MAAM;IAOtB,IAAiB,OAAO,CAKvB;IALD,WAAiB,OAAO;QACV,YAAI,GAAGD,MAAW,CAAU;YACxC,QAAQ,EAAEE,MAAW,EAAE,CAAC,QAAQ,EAAE;YAClC,UAAU,EAA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;gBACR,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAA;aAC9B,GACA,EACF,4DAAK,KAAK,EAAE,IAAI,CAAC,QAAQ,GAAG,OAAO,GAAG,QAAQ,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAI,CAC7F,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isly.object","isly.function","isly.string","isly.record","selectively.and"],"sources":["src/components/filter/Filter.ts","src/components/filter/style.css?tag=smoothly-filter&encapsulation=scoped","src/components/filter/index.tsx"],"sourcesContent":["import { EventEmitter } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { isly } from \"isly\"\n\nconst EventEmitter = isly.object<EventEmitter>({ emit: isly.function<EventEmitter[\"emit\"]>() })\nexport interface Filter extends Filter.Element {\n\tsmoothlyFilterUpdate: EventEmitter<Filter.Update>\n\tsmoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n}\nexport namespace Filter {\n\texport type Manipulate = (criteria: selectively.Criteria) => selectively.Criteria\n\texport type Update = (expression: selectively.Criteria) => void\n\texport interface Element {\n\t\tproperty?: string\n\t\tproperties?: Record<string, string>\n\t}\n\texport namespace Element {\n\t\texport const type = isly.object<Element>({\n\t\t\tproperty: isly.string().optional(),\n\t\t\tproperties: isly.record<Record<string, string>>(isly.string(), isly.string()).optional(),\n\t\t})\n\t}\n\texport const type = Element.type.extend<Filter>({\n\t\tsmoothlyFilterUpdate: EventEmitter,\n\t\tsmoothlyFilterManipulate: EventEmitter,\n\t})\n}\n",":host {\n\tposition: relative;\n\tborder: 1px solid rgb(var(--smoothly-medium-tint));\n\tmargin-left: 1rem;\n\tmargin-right: 1rem;\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n}\n\n:host>div::slotted([slot=detail]) {\n\tz-index: 5;\n}\n\n:host::slotted([slot=bar]) {\n\tpointer-events: auto;\n\tmargin-left: 0.3em;\n\tmargin-right: 0.3em;\n\t&>[looks=\"plain\"] {\n\t\tdisplay: flex;\n\t\talign-self: stretch;\n\t\talign-items: center;\n\t}\n}\n\n:host>div:empty+smoothly-icon {\n\tdisplay: none;\n}\n\n:host>smoothly-icon {\n\tcursor: pointer;\n\tmargin-left: 0.3em;\n\tmargin-right: 0.3em;\n\tflex-shrink: 0;\n}\n\n:host > div.close {\n\tposition: fixed;\n\tz-index: 3;\n\ttop: 0;\n\tleft: 0;\n\twidth: 100dvw;\n\theight: 100dvh;\n\tbackground: transparent;\n}\n\n:host > div.hidden {\n\tdisplay: none;\n}\n\n:host>.container {\n\tpadding: 2em;\n\tposition: absolute;\n\tright: 0.35em;\n\twidth: fit-content;\n\tdisplay: flex;\n\tjustify-content: center;\n\ttop: 100%;\n\twidth: fit-content;\n\tz-index: 4;\n\tbackground-color: rgb(var(--smoothly-color));\n\tmargin: 0.8em -2em;\n}\n\n/* arrow */\n:host > div.container:before {\n\tcontent: \"\";\n\twidth: 0.6em;\n\theight: 0.6em;\n\ttransform: rotate(45deg);\n\tborder-top: 1px solid rgb(var(--smoothly-medium-tint));\n\tborder-left: 1px solid rgb(var(--smoothly-medium-tint));\n\tbackground-color: rgb(var(--smoothly-color));\n\tposition: absolute;\n\tz-index: 3;\n}\n\n/* arrow placement */\n:host > div.container.arrow-top:before {\n\tleft: calc(91%);\n\ttop: -5px;\n}\n\n:host div.container:after {\n\tcontent: \"\";\n\theight: 100%;\n\twidth: 100%;\n\tborder: 1px solid rgb(var(--smoothly-medium-tint));\n\tborder-radius: 0.25em;\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n}\n","import { Component, Event, EventEmitter, h, Host, Listen, State } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { Filter } from \"./Filter\"\n\n@Component({\n\ttag: \"smoothly-filter\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilter {\n\tfield: HTMLSmoothlyFilterFieldElement | undefined\n\tupdating = false\n\tfilters: Set<Filter.Update> = new Set<Filter.Update>() // maybe set?\n\t@State() detailChildren?: boolean\n\t@State() criteria: selectively.Criteria = selectively.and()\n\t@State() expanded = false\n\t@Event() smoothlyFilter: EventEmitter<selectively.Criteria>\n\n\t@Listen(\"smoothlyFilterUpdate\")\n\tupdateHandler(event: CustomEvent<Filter.Update>) {\n\t\tevent.stopPropagation()\n\t\tif (Filter.Element.type.is(event.target))\n\t\t\tthis.filters.add(event.detail)\n\t}\n\t@Listen(\"smoothlyFilterManipulate\")\n\tmanipulateHandler(event: CustomEvent<Filter.Manipulate>) {\n\t\tevent.stopPropagation()\n\t\tthis.updating = true\n\t\tthis.criteria = event.detail(this.criteria)\n\t\tthis.smoothlyFilter.emit(this.criteria)\n\t\tthis.filters.forEach(update => update(this.criteria))\n\t\tthis.updating = false\n\t}\n\t@Listen(\"smoothlyFilterField\")\n\tfilterFieldHandler(event: CustomEvent<selectively.Criteria>) {\n\t\tevent.stopPropagation()\n\t\tif (!this.updating) {\n\t\t\tthis.smoothlyFilter.emit((this.criteria = selectively.and(event.detail)))\n\t\t\tthis.filters.forEach(update => update(this.criteria))\n\t\t}\n\t}\n\tclear(): void {\n\t\tthis.field?.clear()\n\t\tthis.smoothlyFilter.emit((this.criteria = selectively.and()))\n\t\tthis.filters.forEach(update => update(this.criteria))\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<slot name=\"bar\" />\n\t\t\t\t<smoothly-filter-field criteria={this.criteria} ref={e => (this.field = e)} />\n\t\t\t\t{this.criteria.toString() != \"\" && (\n\t\t\t\t\t<smoothly-icon\n\t\t\t\t\t\tname={\"close\"}\n\t\t\t\t\t\ttoolTip={\"Clear all filters\"}\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tthis.clear()\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t<div class={this.expanded ? \"container arrow-top\" : \"hidden\"}>\n\t\t\t\t\t<slot name=\"detail\" />\n\t\t\t\t</div>\n\t\t\t\t<smoothly-icon\n\t\t\t\t\tname={this.expanded ? \"options\" : \"options-outline\"}\n\t\t\t\t\ttoolTip={(this.expanded ? \"Hide\" : \"Show\") + \" additional filters\"}\n\t\t\t\t\tsize=\"small\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tthis.expanded = !this.expanded\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<div class={this.expanded ? \"close\" : \"hidden\"} onClick={() => (this.expanded = !this.expanded)} />\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-db26a36c.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,6+FAA6+F,CAAC;AAC//F,qCAAe,QAAQ;;MCWV,sBAAsB;;;;;;;oBAEX,WAAW;;qBAEqB,OAAO;yBACzB,IAAI;qBACgBA,IAAU,CAAC,GAAG,EAAE;mBAClBA,IAAU,CAAC,GAAG,EAAE;;;;;IAQvE,iBAAiB;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,OAAM,CAAC,CAAA;QACpC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;QAC3G,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;KACxG;IAED,YAAY,CAAC,IAAU;QACt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,CAAC,IAAI,GAAG,KAAK,CAAC,GAAI,EACxD,IAAI,CAAC,IAAI,KACT,8DACC,4DAAK,KAAK,EAAC,OAAO,GAAG,EACrB,0EACC,WAAW,EAAE,IAAI,EACjB,qBAAqB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC/C,qBAAqB,EAAE,CAAC;gBACvB,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAA;aACrB,EACD,mBAAmB,EAAE,CAAC;gBACrB,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,MAAM,CAAA;aACnB,EACD,iBAAiB,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAC3C,sBAAsB,EAAE,CAAC;gBACxB,CAAC,CAAC,eAAe,EAAE,CAAA;gBACnB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAA;gBACjB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,CAAA;aAClD,EACD,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,GACZ,CACG,CACN,CACK,EACP;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["isoly.Date"],"sources":["src/components/input/date/range/style.scss?tag=smoothly-input-date-range&encapsulation=scoped","src/components/input/date/range/index.tsx"],"sourcesContent":["@import \"../../shared.css\";\n\n:host {\n\tposition: relative;\n\tdisplay: block;\n\twidth: fit-content;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\n\t&:focus-within smoothly-input {\n\t\toutline: none;\n\t}\n}\n\n:host>nav {\n\tposition: absolute;\n\tz-index: 10;\n\ttop: 3.5em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tmax-width: 22em;\n\tmin-width: 18em;\n}\n\n:host>div {\n\tposition: fixed;\n\ttop: 0px;\n\tleft: 0px;\n\tright: 0px;\n\tbottom: 0px;\n\twidth: 100vw;\n\theight: 100vh;\n\tz-index: 2;\n}\n:host > nav > div.arrow {\n\tposition: absolute;\n\tz-index: 9;\n\ttransform: translate(10em, -0.55em) rotate(45deg);\n\twidth: 1em;\n\theight: 1em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n\n:host>section {\n\tdisplay: flex;\n\tbackground-color: var(--background-color, var(--smoothly-color-shade), transparent);\n\tborder-radius: 0.25rem;\n\tcursor: pointer;\n}\n:host > section > smoothly-input {\n\tborder-radius: var(--border-radius, none);\n\tbackground-color: transparent;\n}\n:host > section > span {\n\tpadding: 0.5em 0.2em 0.5em 0.2em;\n\talign-self: center;\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Listen, Method, Prop, State } from \"@stencil/core\"\nimport { isoly } from \"isoly\"\nimport { Clearable } from \"../../Clearable\"\nimport { Input } from \"../../Input\"\nimport { Looks } from \"../../Looks\"\nimport { Color, Data } from \"./../../../../model\"\n\n@Component({\n\ttag: \"smoothly-input-date-range\",\n\tstyleUrl: \"style.scss\",\n\tscoped: true,\n})\nexport class SmoothlyInputDateRange implements Clearable, Input {\n\t@Element() element: HTMLElement\n\t@Prop() name: string = \"dateRange\"\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ mutable: true }) start: isoly.Date | undefined = isoly.Date.now()\n\t@Prop({ mutable: true }) end: isoly.Date | undefined = isoly.Date.now()\n\t@Prop() max?: isoly.Date\n\t@Prop() min?: isoly.Date\n\t@State() open: boolean\n\t@Event() smoothlyInput: EventEmitter<{ [name: string]: isoly.DateRange }>\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\n\tcomponentWillLoad() {\n\t\tthis.smoothlyInputLoad.emit(_ => {})\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t\tthis.start && this.end && this.smoothlyInput.emit({ [this.name]: { start: this.start, end: this.end } })\n\t}\n\t// TODO: disable search fields in month selectors so that the input becomes typeable and then fix input handler\n\tinputHandler(data: Data) {\n\t\tconst split = \"dateRangeInput\" in data && typeof data.dateRangeInput == \"string\" && data.dateRangeInput.split(\" - \")\n\t\tif (split && split.length == 2 && isoly.Date.is(split[0]) && isoly.Date.is(split[1])) {\n\t\t\tthis.start = split[0]\n\t\t\tthis.end = split[1]\n\t\t}\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>) {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.start = undefined\n\t\tthis.end = undefined\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<Host tabindex={0}>\n\t\t\t\t<section onClick={() => (this.open = !this.open)}>\n\t\t\t\t\t<smoothly-input\n\t\t\t\t\t\ttype=\"text\" // TODO: date-range tidily thing\n\t\t\t\t\t\tname=\"dateRangeInput\"\n\t\t\t\t\t\tvalue={`${this.start} - ${this.end}`}\n\t\t\t\t\t\tlooks={this.looks}\n\t\t\t\t\t\tshowLabel={this.showLabel}\n\t\t\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\tthis.inputHandler(e.detail)\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</section>\n\t\t\t\t{this.open && <div onClick={() => (this.open = false)} />}\n\t\t\t\t{this.open && (\n\t\t\t\t\t<nav>\n\t\t\t\t\t\t<div class=\"arrow\" />\n\t\t\t\t\t\t<smoothly-calendar\n\t\t\t\t\t\t\tdoubleInput={true}\n\t\t\t\t\t\t\tonSmoothlyValueChange={e => e.stopPropagation()}\n\t\t\t\t\t\t\tonSmoothlyStartChange={e => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.start = e.detail\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonSmoothlyEndChange={e => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.end = e.detail\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tonSmoothlyDateSet={e => e.stopPropagation()}\n\t\t\t\t\t\t\tonSmoothlyDateRangeSet={e => {\n\t\t\t\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\t\t\tthis.open = false\n\t\t\t\t\t\t\t\tthis.smoothlyInput.emit({ [this.name]: e.detail })\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvalue={this.start}\n\t\t\t\t\t\t\tstart={this.start}\n\t\t\t\t\t\t\tend={this.end}\n\t\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\t\tmin={this.min}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</nav>\n\t\t\t\t)}\n\t\t\t</Host>\n\t\t)\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-e73096f5.js","mappings":";;;;;;;;AAAA,MAAM,QAAQ,GAAG,kuGAAkuG,CAAC;AACpvG,+BAAe,QAAQ;;MCQV,QAAQ;;;;;;;;;QAwBZ,iBAAY,GAAG,CAAC,CAAA;;qBApBe,IAAI,CAAC,GAAG,EAAE;;;;;;;;IAajD,OAAO,CAAC,IAAU;QACjB,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;KACnC;IAED,KAAK,CAAC,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src/components/calendar/style.css?tag=smoothly-calendar&encapsulation=scoped","src/components/calendar/index.tsx"],"sourcesContent":[":host {\n\tdisplay: block;\n\t--other-month-opacity: 0.5;\n\tmargin-bottom: 1rem;\n}\n:host > smoothly-input-month {\n\twidth: calc(100% - 1em);\n\tpadding: 0.5em 0.5em 0 0.5em;\n}\n:host > table {\n\ttable-layout: fixed;\n\twidth: 100%;\n}\n:host > table > thead > tr > th,\n:host > table > tr > td {\n\ttext-align: center;\n\tpadding: 0.5em;\n\tmin-width: 2em;\n\tbackground-color: rgb(var(--smoothly-default-shade));\n\tcursor: pointer;\n\tuser-select: none;\n}\n:host > table > tr > td.currentMonth {\n\tcolor: rgb(var(--smoothly-default-contrast));\n}\n:host > table > tr > td:not(.currentMonth) {\n\tcolor: rgba(var(--smoothly-default-contrast), var(--other-month-opacity));\n}\n:host > table > tr > td:nth-child(6):not(.currentMonth).selected,\n:host > table > tr > td:nth-child(6):not(.currentMonth).dateRange,\n:host > table > tr > td:nth-child(7):not(.currentMonth).selected,\n:host > table > tr > td:nth-child(7):not(.currentMonth).dateRange {\n\tcolor: rgba(var(--smoothly-default-contrast));\n}\n:host > table > tr > td:nth-child(6),\n:host > table > tr > td:nth-child(7) {\n\tcolor: rgb(var(--smoothly-danger-tint));\n}\n:host > table > tr > td:nth-child(6):not(.currentMonth),\n:host > table > tr > td:nth-child(7):not(.currentMonth) {\n\tcolor: rgba(var(--smoothly-danger-tint), var(--other-month-opacity));\n}\n:host > table > tr > td:not(.selected, .disable):hover {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-tint));\n}\n:host > table > tr > td.selected {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-color));\n}\n:host > table > tr > td:not(.selected, .dateRange):not(:hover).today {\n\tbackground: rgb(var(--smoothly-dark-tint));\n\tcolor: rgb(var(--smoothly-dark-contrast));\n}\n:host > table > tr > td.dateRange {\n\tcolor: rgb(var(--smoothly-primary-contrast));\n\tbackground: rgb(var(--smoothly-primary-tint));\n}\n:host > table > tr > td.disable {\n\tcursor: not-allowed;\n\tbackground-color: rgb(var(--smoothly-default-tint), 0.5);\n\tcolor: rgb(var(--smoothly-default-contrast), 0.5);\n}\n","import { Component, Element, Event, EventEmitter, h, Prop, State, Watch } from \"@stencil/core\"\nimport { Date, DateRange } from \"isoly\"\nimport * as generate from \"./generate\"\n\n@Component({\n\ttag: \"smoothly-calendar\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class Calendar {\n\tprivate frozenDate: Date\n\t@Element() element: HTMLTableRowElement\n\t@Prop({ mutable: true }) month?: Date\n\t@Prop({ mutable: true }) value: Date = Date.now()\n\t@Prop({ mutable: true }) start?: Date\n\t@Prop({ mutable: true }) end?: Date\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) doubleInput: boolean\n\t@Event() smoothlyValueChange: EventEmitter<Date>\n\t@Event() smoothlyStartChange: EventEmitter<Date>\n\t@Event() smoothlyEndChange: EventEmitter<Date>\n\t@Event() smoothlyDateSet: EventEmitter<Date>\n\t@Event() smoothlyDateRangeSet: EventEmitter<DateRange>\n\t@State() firstSelected: boolean\n\t@Watch(\"start\")\n\tonStart(next: Date) {\n\t\tthis.smoothlyStartChange.emit(next)\n\t}\n\t@Watch(\"end\")\n\tonEnd(next: Date) {\n\t\tthis.smoothlyEndChange.emit(next)\n\t}\n\tprivate clickCounter = 0\n\tprivate onClick(date: Date) {\n\t\tthis.smoothlyValueChange.emit((this.value = date))\n\t\tthis.clickCounter += 1\n\t\tif (this.doubleInput) {\n\t\t\tif (this.clickCounter % 2 == 1)\n\t\t\t\tthis.start = this.end = this.frozenDate = date\n\t\t\telse {\n\t\t\t\tif (this.start && date > this.start)\n\t\t\t\t\tthis.end = date\n\t\t\t\telse\n\t\t\t\t\tthis.start = date\n\t\t\t}\n\t\t}\n\t\t!this.doubleInput && this.smoothlyDateSet.emit(this.value)\n\t\tthis.doubleInput &&\n\t\t\tthis.clickCounter % 2 == 0 &&\n\t\t\tthis.start &&\n\t\t\tthis.end &&\n\t\t\tthis.smoothlyDateRangeSet.emit({ start: this.start, end: this.end })\n\t}\n\tprivate onHover(date: Date) {\n\t\tif (this.doubleInput && this.clickCounter % 2 == 1) {\n\t\t\tif (date < this.frozenDate) {\n\t\t\t\tthis.start = date\n\t\t\t\tthis.end = this.frozenDate\n\t\t\t} else {\n\t\t\t\tthis.start = this.frozenDate\n\t\t\t\tthis.end = date\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input-month\n\t\t\t\tname=\"month\"\n\t\t\t\tvalue={this.month ?? this.value}\n\t\t\t\tnext\n\t\t\t\tprevious\n\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\t\"month\" in e.detail && typeof e.detail.month == \"string\" && (this.month = e.detail.month)\n\t\t\t\t}}>\n\t\t\t\t<div slot={\"year-label\"}>\n\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t</div>\n\t\t\t\t<div slot={\"month-label\"}>\n\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t</div>\n\t\t\t</smoothly-input-month>,\n\t\t\t<table>\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{generate.weekdays().map(day => (\n\t\t\t\t\t\t\t<th>{day}</th>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t{generate.month(this.month ?? this.value).map(week => (\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t{week.map(date => (\n\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\ttabindex={1}\n\t\t\t\t\t\t\t\tonMouseOver={() => {\n\t\t\t\t\t\t\t\t\t!this.doubleInput && (this.min || this.max) && (date < this.min || date > this.max)\n\t\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t\t: this.onHover(date)\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\t\t\t(this.min || this.max) && (date < this.min || date > this.max) ? undefined : () => this.onClick(date)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclass={(date == this.value ? [\"selected\"] : [])\n\t\t\t\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\t\t\t\t...(date == Date.now() ? [\"today\"] : []),\n\t\t\t\t\t\t\t\t\t\tDate.firstOfMonth(this.month ?? this.value) == Date.firstOfMonth(date) ? [\"currentMonth\"] : [],\n\t\t\t\t\t\t\t\t\t\tthis.doubleInput\n\t\t\t\t\t\t\t\t\t\t\t? this.start == date || this.end == date\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"selected\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: date >= (this.start ?? \"\") && date <= (this.end ?? \"\")\n\t\t\t\t\t\t\t\t\t\t\t\t? [\"dateRange\"]\n\t\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t\t: \"\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t.concat(...(this.min || this.max ? (date < this.min || date > this.max ? [\"disable\"] : []) : \"\"))\n\t\t\t\t\t\t\t\t\t.join(\" \")}>\n\t\t\t\t\t\t\t\t{date.substring(8, 10)}\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tr>\n\t\t\t\t))}\n\t\t\t</table>,\n\t\t]\n\t}\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-fe55a54e.js","mappings":";;;;;;;;;;AAAA,MAAM,QAAQ,GAAG,q+EAAq+E,CAAC;AACv/E,gCAAe,QAAQ;;MCsBV,SAAS;;;;;;;;;qBAGkC,OAAO;;;;;;yBAMzB,IAAI;;;IAOzC,iBAAiB;QAChB,IAAI,CAAC,iBAAiB,CAAC,IAAI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,CAAC,KAAK,EACjB,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,eAAe,EAAE,CAAC,KAAK,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IACxD,8DAAa,CACG;YACjB,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ;kBACxB;oBACA,WAAK,OAAO,EAAE,OAAO,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,GAAQ;oBAC/C,eACC,WAAK,KAAK,EAAC,OAAO,GAAO,EACzB,yBACC,WAAW,EAAE,KAAK,EAClB,KAAK,EAAE,MAAA,IAAI,CAAC,KAAK,mCAAI,IAAI,CAAC,GAAG,EAAE,EAC/B,qBAAqB,EAAE,KAAK;4BAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAA;4BACzB,KAAK,CAAC,eAAe,EAAE,CAAA;yBACvB,EACD,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,GAAG,EAAE,IAAI,CAAC,GAAG,IACb,WAAK,IAAI,EAAE,YAAY,IACtB,YAAM,IAAI,EAAE,YAAY,GAAI,CACvB,EACN,WAAK,IAAI,EAAE,aAAa,IACvB,YAAM,IAAI,EAAE,aAAa,GAAI,CACxB,CACa,CACf;iBACL;kBACD,EAAE;SACL,CAAA;KACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/input/date/style.css?tag=smoothly-input-date&encapsulation=scoped","src/components/input/date/index.tsx"],"sourcesContent":["@import \"../shared.css\";\n\n:host {\n\tposition: relative;\n\tmax-width: 100vw;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n:host[looks=transparent] smoothly-input {\n\toutline: none;\n}\n:host > nav {\n\tposition: absolute;\n\tz-index: 10;\n\ttop: 3.5em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\tmin-width: 18em;\n}\n:host > div {\n\tposition: fixed;\n\ttop: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\twidth: 100vw;\n\theight: 100vh;\n\tz-index: 2;\n}\n:host > nav > div.arrow {\n\tposition: absolute;\n\tz-index: 9;\n\ttransform: translate(2em, -0.55em) rotate(45deg);\n\twidth: 1em;\n\theight: 1em;\n\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n}\n\n@media screen and (min-width: 400px){\n\t:host > nav {\n\t\tposition: absolute;\n\t\tz-index: 10;\n\t\ttop: 3.5em;\n\t\tbackground-color: rgb(var(--background-color, var(--smoothly-color-shade)));\n\t\tmax-width: 22em;\n\t\t\n\t}\n}\n","import {\n\tComponent,\n\tComponentWillLoad,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tListen,\n\tMethod,\n\tProp,\n\tWatch,\n} from \"@stencil/core\"\nimport { Date } from \"isoly\"\nimport { Color } from \"../../../model\"\nimport { Clearable } from \"../Clearable\"\nimport { Input } from \"../Input\"\nimport { Looks } from \"../Looks\"\n\n@Component({\n\ttag: \"smoothly-input-date\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class InputDate implements ComponentWillLoad, Clearable, Input {\n\t@Element() element: HTMLElement\n\t@Prop({ reflect: true, mutable: true }) color?: Color\n\t@Prop({ reflect: true, mutable: true }) looks: Looks = \"plain\"\n\t@Prop({ reflect: true }) name: string\n\t@Prop({ mutable: true }) value?: Date\n\t@Prop({ mutable: true }) open: boolean\n\t@Prop({ mutable: true }) max: Date\n\t@Prop({ mutable: true }) min: Date\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop({ mutable: true }) disabled: boolean\n\t@Event() smoothlyInputLoad: EventEmitter<(parent: HTMLElement) => void>\n\t@Event() smoothlyValueChange: EventEmitter<Date>\n\t@Event() smoothlyInput: EventEmitter<Record<string, any>>\n\t@Event() smoothlyInputLooks: EventEmitter<(looks: Looks, color: Color) => void>\n\n\tcomponentWillLoad(): void {\n\t\tthis.smoothlyInputLoad.emit(_ => {})\n\t\tthis.smoothlyInputLooks.emit((looks, color) => ((this.looks = looks), !this.color && (this.color = color)))\n\t}\n\n\t@Method()\n\tasync clear(): Promise<void> {\n\t\tthis.value = undefined\n\t}\n\t@Watch(\"value\")\n\tonStart(next: Date) {\n\t\tthis.smoothlyValueChange.emit(next)\n\t\tthis.smoothlyInput.emit({ [this.name]: next })\n\t}\n\t@Listen(\"smoothlyInput\")\n\tsmoothlyInputHandler(event: CustomEvent<Record<string, any>>) {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyInputLooks\")\n\tsmoothlyInputLooksHandler(event: CustomEvent<(looks: Looks) => void>) {\n\t\tif (event.target != this.element)\n\t\t\tevent.stopPropagation()\n\t}\n\t@Listen(\"smoothlyDateSet\")\n\tdateSetHandler(event: CustomEvent<Date>) {\n\t\tthis.open = false\n\t\tevent.stopPropagation()\n\t}\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input\n\t\t\t\tcolor={this.color}\n\t\t\t\tname={this.name}\n\t\t\t\tonFocus={() => (this.open = !this.open)}\n\t\t\t\tonClick={() => (this.open = !this.open)}\n\t\t\t\tdisabled={this.disabled}\n\t\t\t\ttype=\"date\"\n\t\t\t\tvalue={this.value}\n\t\t\t\tlooks={this.looks}\n\t\t\t\tshowLabel={this.showLabel}\n\t\t\t\tonSmoothlyInput={e => (this.value = e.detail[this.name])}>\n\t\t\t\t<slot></slot>\n\t\t\t</smoothly-input>,\n\t\t\tthis.open && !this.disabled\n\t\t\t\t? [\n\t\t\t\t\t\t<div onClick={() => (this.open = false)}></div>,\n\t\t\t\t\t\t<nav>\n\t\t\t\t\t\t\t<div class=\"arrow\"></div>\n\t\t\t\t\t\t\t<smoothly-calendar\n\t\t\t\t\t\t\t\tdoubleInput={false}\n\t\t\t\t\t\t\t\tvalue={this.value ?? Date.now()}\n\t\t\t\t\t\t\t\tonSmoothlyValueChange={event => {\n\t\t\t\t\t\t\t\t\tthis.value = event.detail\n\t\t\t\t\t\t\t\t\tevent.stopPropagation()\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\tmax={this.max}\n\t\t\t\t\t\t\t\tmin={this.min}>\n\t\t\t\t\t\t\t\t<div slot={\"year-label\"}>\n\t\t\t\t\t\t\t\t\t<slot name={\"year-label\"} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div slot={\"month-label\"}>\n\t\t\t\t\t\t\t\t\t<slot name={\"month-label\"} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</smoothly-calendar>\n\t\t\t\t\t\t</nav>,\n\t\t\t\t ]\n\t\t\t\t: [],\n\t\t]\n\t}\n}\n"],"version":3}
|