smoothly 0.2.2 → 0.2.5

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.
Files changed (30) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/smoothly-accordion_51.cjs.entry.js +71 -25
  3. package/dist/cjs/smoothly.cjs.js +1 -1
  4. package/dist/collection/components/menu-options/index.js +64 -3
  5. package/dist/collection/components/option/index.js +35 -1
  6. package/dist/collection/components/option/style.css +6 -0
  7. package/dist/collection/components/picker/index.js +149 -11
  8. package/dist/collection/components/select-demo/index.js +9 -1
  9. package/dist/collection/components/tab/style.css +7 -11
  10. package/dist/collection/components/tab-switch/style.css +2 -1
  11. package/dist/collection/components/table/cell/style.css +2 -2
  12. package/dist/collection/components/table/demo/index.js +11 -9
  13. package/dist/collection/components/table/expandable/cell/index.js +3 -2
  14. package/dist/collection/components/table/expandable/cell/style.css +22 -26
  15. package/dist/collection/components/table/expandable/row/index.js +1 -1
  16. package/dist/collection/components/table/expandable/row/style.css +26 -25
  17. package/dist/collection/components/table/header/style.css +0 -1
  18. package/dist/collection/components/table/row/style.css +1 -1
  19. package/dist/collection/components/table/style.css +3 -8
  20. package/dist/custom-elements/index.js +74 -28
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/smoothly-accordion_51.entry.js +71 -25
  23. package/dist/esm/smoothly.js +1 -1
  24. package/dist/smoothly/{p-9d6a20c4.entry.js → p-332b1c90.entry.js} +1 -1
  25. package/dist/smoothly/smoothly.esm.js +1 -1
  26. package/dist/types/components/menu-options/index.d.ts +5 -0
  27. package/dist/types/components/option/index.d.ts +5 -0
  28. package/dist/types/components/picker/index.d.ts +14 -3
  29. package/dist/types/components.d.ts +17 -0
  30. package/package.json +1 -1
@@ -1 +1 @@
1
- import{p as e,b as o}from"./p-0cba3e3d.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-eec1c703",[[2,"smoothly-google-font",{value:[1]}]]],["p-6f009ac9",[[4,"smoothly-radio-group",{orientation:[513]}]]],["p-0215b4da",[[0,"smoothly-reorder"]]],["p-8ae38136",[[6,"smoothly-trigger-sink",{context:[16],destination:[1],filter:[1]},[[0,"trigger","TriggerListener"]]]]],["p-993534fa",[[6,"smoothly-trigger-source",{listen:[1]}]]],["p-9d6a20c4",[[0,"smoothly-app-demo",{baseUrl:[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{color:[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{color:[513],expand:[513],fill:[513],disabled:[516],type:[513],link:[1],download:[4]}],[4,"smoothly-room",{label:[1],icon:[1],path:[1],to:[1]}],[2,"smoothly-input-date-range",{value:[1025],start:[1025],end:[1025],max:[1025],min:[1025],open:[1028],showLabel:[516,"show-label"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[6,"smoothly-notifier",{notices:[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[1,"smoothly-picker",{maxMenuHeight:[1,"max-menu-height"],maxHeight:[1,"max-height"],emptyMenuLabel:[1025,"empty-menu-label"],multiple:[516],optionStyle:[8,"option-style"],options:[16],labelSetting:[513,"label-setting"],label:[513],selections:[1040],selectNoneName:[1025,"select-none-name"],selectionName:[1025,"selection-name"],isOpen:[32]},[[0,"optionSelect","optionSelectHander"]]],[6,"smoothly-dialog",{color:[513],open:[1540],closable:[516],header:[513]},[[0,"trigger","TriggerListener"]]],[6,"smoothly-table-expandable-row",{align:[1],open:[1540]},[[0,"click","onClick"]]],[2,"smoothly-backtotop",{opacity:[1],bottom:[1],right:[1],visible:[32]}],[2,"smoothly-checkbox",{selectAll:[4,"select-all"],size:[1],intermediate:[1540],selected:[1540],disabled:[1540],t:[32]}],[6,"smoothly-submit",{processing:[1540],color:[513],expand:[513],fill:[513],disabled:[516],prevent:[4],submit:[64]},[[0,"click","handleSubmit"]]],[6,"smoothly-table-expandable-cell",{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]}],[2,"smoothly-display-amount",{amount:[8],currency:[1]}],[2,"smoothly-frame",{url:[1],name:[1],origin:[1],send:[64]}],[6,"smoothly-popup",{visible:[1540],direction:[1537],cssVariables:[32]}],[6,"smoothly-quiet",{color:[1]}],[6,"smoothly-radio",{name:[1],value:[1],checked:[1540],tabIndex:[2,"tab-index"]}],[6,"smoothly-select",{identifier:[1],background:[513],value:[1025]}],[2,"smoothly-skeleton",{widths:[16],width:[1],color:[1],period:[2],distance:[1],align:[513]}],[2,"smoothly-svg",{url:[513],size:[513],color:[1]}],[6,"smoothly-table",null,[[0,"expansionLoad","handleEvents"],[0,"expansionOpen","handleEvents"]]],[6,"smoothly-table-header",{name:[1]}],[6,"smoothly-table-row",null,[[0,"expansionLoad","onExpansionLoad"],[0,"expansionOpen","onExpansionOpen"]]],[6,"smoothly-input-date",{value:[1025],open:[1028],max:[1025],min:[1025],disabled:[1028]},[[0,"dateSet","dateSetHandler"]]],[2,"smoothly-notification",{notice:[16],tick:[32]},[[0,"trigger","onTrigger"]]],[1,"smoothly-menu-options",{emptyMenuLabel:[1025,"empty-menu-label"],maxMenuHeight:[1,"max-menu-height"],order:[4],optionStyle:[8,"option-style"],options:[1040],resetHighlightOnOptionsChange:[1028,"reset-highlight-on-options-change"],filteredOptions:[32],highlightIndex:[32],moveHighlight:[64],setHighlight:[64],getHighlighted:[64],filterOptions:[64]},[[0,"optionHover","optionHoverHandler"]]],[2,"smoothly-display-date-time",{datetime:[1]}],[6,"smoothly-tab",{label:[1],open:[1540]},[[0,"click","onClick"]]],[6,"smoothly-tab-switch",{selectedElement:[32]},[[0,"expansionOpen","openChanged"]]],[6,"smoothly-table-cell"],[0,"smoothly-tuple",{tuple:[16]}],[1,"smoothly-option",{aliases:[513],dataHighlight:[1540,"data-highlight"],name:[1537],value:[1537],divider:[1540]}],[2,"smoothly-spinner",{active:[516],size:[513]}],[2,"smoothly-calendar",{month:[1025],value:[1025],start:[1025],end:[1025],max:[1025],min:[1025],doubleInput:[516,"double-input"],firstSelected:[32]}],[6,"smoothly-input",{name:[513],value:[1032],type:[513],required:[1540],minLength:[1026,"min-length"],showLabel:[516,"show-label"],maxLength:[1026,"max-length"],autocomplete:[1028],pattern:[1040],placeholder:[1025],disabled:[1028],readonly:[1028],currency:[513],initialValue:[32],getFormData:[64],setKeepFocusOnReRender:[64],setSelectionRange:[64]}],[2,"smoothly-input-month",{value:[1025]}],[6,"smoothly-selector",{opened:[32],selectedElement:[32],missing:[32],filter:[32]},[[0,"click","onClick"],[0,"itemSelected","onItemSelected"],[0,"keydown","onKeyDown"]]],[6,"smoothly-item",{value:[8],selected:[1540],filter:[64]},[[0,"click","onClick"]]],[6,"smoothly-trigger",{color:[513],expand:[513],fill:[513],disabled:[516],type:[513],name:[1],value:[8]},[[0,"click","onClick"]]],[2,"smoothly-icon",{color:[513],fill:[513],name:[1],size:[513],toolTip:[1,"tool-tip"],document:[32]}]]]],e)));
1
+ import{p as e,b as o}from"./p-0cba3e3d.js";(()=>{const o=import.meta.url,t={};return""!==o&&(t.resourcesUrl=new URL(".",o).href),e(t)})().then((e=>o([["p-eec1c703",[[2,"smoothly-google-font",{value:[1]}]]],["p-6f009ac9",[[4,"smoothly-radio-group",{orientation:[513]}]]],["p-0215b4da",[[0,"smoothly-reorder"]]],["p-8ae38136",[[6,"smoothly-trigger-sink",{context:[16],destination:[1],filter:[1]},[[0,"trigger","TriggerListener"]]]]],["p-993534fa",[[6,"smoothly-trigger-source",{listen:[1]}]]],["p-332b1c90",[[0,"smoothly-app-demo",{baseUrl:[1,"base-url"]}],[0,"smoothly-input-demo"],[2,"smoothly-select-demo",null,[[0,"selectionChanged","handleSelectionChanged"]]],[0,"smoothly-display-demo"],[2,"smoothly-table-demo"],[4,"smoothly-app",{color:[1]}],[0,"smoothly-dialog-demo"],[2,"smoothly-icon-demo"],[6,"smoothly-button",{color:[513],expand:[513],fill:[513],disabled:[516],type:[513],link:[1],download:[4]}],[4,"smoothly-room",{label:[1],icon:[1],path:[1],to:[1]}],[2,"smoothly-input-date-range",{value:[1025],start:[1025],end:[1025],max:[1025],min:[1025],open:[1028],showLabel:[516,"show-label"]},[[0,"startChanged","onStartChanged"],[0,"endChanged","onEndChanged"],[0,"dateRangeSet","onDateRangeSet"]]],[6,"smoothly-notifier",{notices:[32]},[[0,"notice","onNotice"],[0,"remove","onRemove"]]],[1,"smoothly-picker",{maxMenuHeight:[1,"max-menu-height"],maxHeight:[1,"max-height"],emptyMenuLabel:[1025,"empty-menu-label"],multiple:[516],mutable:[4],optionStyle:[8,"option-style"],options:[16],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,"optionAdd","optionAddHandler"],[0,"menuEmpty","emptyHandler"]]],[6,"smoothly-dialog",{color:[513],open:[1540],closable:[516],header:[513]},[[0,"trigger","TriggerListener"]]],[2,"smoothly-backtotop",{opacity:[1],bottom:[1],right:[1],visible:[32]}],[2,"smoothly-checkbox",{selectAll:[4,"select-all"],size:[1],intermediate:[1540],selected:[1540],disabled:[1540],t:[32]}],[6,"smoothly-submit",{processing:[1540],color:[513],expand:[513],fill:[513],disabled:[516],prevent:[4],submit:[64]},[[0,"click","handleSubmit"]]],[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]}],[2,"smoothly-display-amount",{amount:[8],currency:[1]}],[2,"smoothly-frame",{url:[1],name:[1],origin:[1],send:[64]}],[6,"smoothly-popup",{visible:[1540],direction:[1537],cssVariables:[32]}],[6,"smoothly-quiet",{color:[1]}],[6,"smoothly-radio",{name:[1],value:[1],checked:[1540],tabIndex:[2,"tab-index"]}],[6,"smoothly-select",{identifier:[1],background:[513],value:[1025]}],[2,"smoothly-skeleton",{widths:[16],width:[1],color:[1],period:[2],distance:[1],align:[513]}],[2,"smoothly-svg",{url:[513],size:[513],color:[1]}],[6,"smoothly-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",{value:[1025],open:[1028],max:[1025],min:[1025],disabled:[1028]},[[0,"dateSet","dateSetHandler"]]],[1,"smoothly-menu-options",{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"]]],[2,"smoothly-display-date-time",{datetime:[1]}],[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],new:[4]}],[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-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]}]]]],e)));
@@ -1,15 +1,20 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
1
2
  import { OptionType } from "../../model";
2
3
  export declare class SmoothlyMenuOptions {
3
4
  private firstOptionsElement;
4
5
  element: HTMLElement;
5
6
  filteredOptions: OptionType[];
6
7
  highlightIndex: number;
8
+ keyword?: string;
7
9
  emptyMenuLabel: string;
10
+ newOptionLabel: string;
8
11
  maxMenuHeight: "inherit";
9
12
  order: boolean;
10
13
  optionStyle: any;
11
14
  options: OptionType[];
12
15
  resetHighlightOnOptionsChange: boolean;
16
+ mutable: boolean;
17
+ menuEmpty: EventEmitter<boolean>;
13
18
  optionsChangeHandler(newOptions: OptionType[]): void;
14
19
  optionHoverHandler(event: CustomEvent<{
15
20
  value: any;
@@ -6,6 +6,7 @@ export declare class SmoothlyOption {
6
6
  name: string;
7
7
  value: string;
8
8
  divider?: boolean;
9
+ new?: boolean;
9
10
  optionHover: EventEmitter<{
10
11
  value: any;
11
12
  name: string;
@@ -14,6 +15,10 @@ export declare class SmoothlyOption {
14
15
  value: any;
15
16
  name: string;
16
17
  }>;
18
+ optionAdd: EventEmitter<{
19
+ name: string;
20
+ value: string;
21
+ }>;
17
22
  onHover(event: MouseEvent): void;
18
23
  onSelect(event: UIEvent): void;
19
24
  render(): any;
@@ -1,26 +1,37 @@
1
1
  import { EventEmitter } from "../../stencil-public-runtime";
2
- import { OptionType } from "../../model";
2
+ import { Notice, OptionType } from "../../model";
3
3
  export declare class SmoothlyPicker {
4
4
  private inputElement;
5
5
  private keepFocusOnReRender;
6
6
  private menuElement;
7
7
  element: HTMLElement;
8
8
  isOpen: boolean;
9
+ empty: boolean;
9
10
  maxMenuHeight: "inherit";
10
11
  maxHeight: string;
11
12
  emptyMenuLabel: string;
12
13
  multiple: boolean;
14
+ mutable: boolean;
13
15
  optionStyle: any;
14
16
  options: OptionType[];
15
17
  labelSetting: "hide" | "default";
16
18
  label: string;
17
19
  selections: OptionType[];
18
20
  selectNoneName: string;
21
+ selectAllName: string;
19
22
  selectionName: string;
23
+ newOptionLabel: string;
24
+ valueValidator: (value: any) => [boolean, Notice | undefined];
20
25
  menuClose: EventEmitter<OptionType[]>;
21
- isOpenChangeHander(): void;
26
+ notice: EventEmitter<Notice>;
27
+ isOpenChangeHandler(): void;
22
28
  componentDidRender(): void;
23
- optionSelectHander(event: CustomEvent<OptionType>): void;
29
+ optionSelectHandler(event: CustomEvent<OptionType>): void;
30
+ optionAddHandler(event: CustomEvent<{
31
+ name: string;
32
+ value: string;
33
+ }>): void;
34
+ emptyHandler(event: CustomEvent<boolean>): void;
24
35
  toggle(option: OptionType): void;
25
36
  toggleAll(): void;
26
37
  unselect(selection: OptionType): void;
@@ -145,6 +145,8 @@ export namespace Components {
145
145
  "getHighlighted": () => Promise<OptionType | undefined>;
146
146
  "maxMenuHeight": "inherit";
147
147
  "moveHighlight": (step: number) => Promise<void>;
148
+ "mutable": boolean;
149
+ "newOptionLabel": string;
148
150
  "optionStyle": any;
149
151
  "options": OptionType[];
150
152
  "order": boolean;
@@ -161,6 +163,7 @@ export namespace Components {
161
163
  "dataHighlight": boolean;
162
164
  "divider"?: boolean;
163
165
  "name": string;
166
+ "new"?: boolean;
164
167
  "value": string;
165
168
  }
166
169
  interface SmoothlyPicker {
@@ -170,11 +173,15 @@ export namespace Components {
170
173
  "maxHeight": string;
171
174
  "maxMenuHeight": "inherit";
172
175
  "multiple": boolean;
176
+ "mutable": boolean;
177
+ "newOptionLabel": string;
173
178
  "optionStyle": any;
174
179
  "options": OptionType[];
180
+ "selectAllName": string;
175
181
  "selectNoneName": string;
176
182
  "selectionName": string;
177
183
  "selections": OptionType[];
184
+ "valueValidator": (value: any) => [boolean, Notice | undefined];
178
185
  }
179
186
  interface SmoothlyPopup {
180
187
  "direction": "up" | "down";
@@ -829,6 +836,9 @@ declare namespace LocalJSX {
829
836
  interface SmoothlyMenuOptions {
830
837
  "emptyMenuLabel"?: string;
831
838
  "maxMenuHeight"?: "inherit";
839
+ "mutable"?: boolean;
840
+ "newOptionLabel"?: string;
841
+ "onMenuEmpty"?: (event: CustomEvent<boolean>) => void;
832
842
  "optionStyle"?: any;
833
843
  "options"?: OptionType[];
834
844
  "order"?: boolean;
@@ -845,6 +855,8 @@ declare namespace LocalJSX {
845
855
  "dataHighlight"?: boolean;
846
856
  "divider"?: boolean;
847
857
  "name"?: string;
858
+ "new"?: boolean;
859
+ "onOptionAdd"?: (event: CustomEvent<{ name: string; value: string }>) => void;
848
860
  "onOptionHover"?: (event: CustomEvent<{ value: any; name: string }>) => void;
849
861
  "onOptionSelect"?: (event: CustomEvent<{ value: any; name: string }>) => void;
850
862
  "value"?: string;
@@ -856,12 +868,17 @@ declare namespace LocalJSX {
856
868
  "maxHeight"?: string;
857
869
  "maxMenuHeight"?: "inherit";
858
870
  "multiple"?: boolean;
871
+ "mutable"?: boolean;
872
+ "newOptionLabel"?: string;
859
873
  "onMenuClose"?: (event: CustomEvent<OptionType[]>) => void;
874
+ "onNotice"?: (event: CustomEvent<Notice>) => void;
860
875
  "optionStyle"?: any;
861
876
  "options"?: OptionType[];
877
+ "selectAllName"?: string;
862
878
  "selectNoneName"?: string;
863
879
  "selectionName"?: string;
864
880
  "selections"?: OptionType[];
881
+ "valueValidator"?: (value: any) => [boolean, Notice | undefined];
865
882
  }
866
883
  interface SmoothlyPopup {
867
884
  "direction"?: "up" | "down";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smoothly",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "description": "Web component library written in Stencil.",
5
5
  "author": "PayFunc",
6
6
  "license": "MIT",