jsl-ui 9.28.7 → 10.0.0
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/docs/AutoSuggestComponent.md +17 -0
- package/docs/ButtonComponent.md +14 -0
- package/docs/CheckBoxComponent.md +12 -0
- package/docs/DateComponent.md +12 -0
- package/docs/DateRangeComponent.md +13 -0
- package/docs/DateTimeComponent.md +13 -0
- package/docs/DialogComponent.md +15 -0
- package/docs/ExpanderComponent.md +13 -0
- package/docs/FormComponent.md +15 -0
- package/docs/FormFieldComponent.md +15 -0
- package/docs/GridComponent.md +19 -0
- package/docs/InputComponent.md +15 -0
- package/docs/IntervalComponent.md +13 -0
- package/docs/LoadingComponent.md +12 -0
- package/docs/NavigationComponent.md +17 -0
- package/docs/Notification.md +14 -0
- package/docs/NotificationComponent.md +13 -0
- package/docs/NumberComponent.md +12 -0
- package/docs/OverlayComponent.md +12 -0
- package/docs/ProgressComponent.md +12 -0
- package/docs/README.md +24 -0
- package/docs/RibbonMenuComponent.md +14 -0
- package/docs/SelectComponent.md +15 -0
- package/docs/SplitterComponent.md +14 -0
- package/docs/StackPanelComponent.md +13 -0
- package/docs/TabsComponent.md +16 -0
- package/docs/TimeComponent.md +13 -0
- package/docs/TreeViewComponent.md +16 -0
- package/examples/showcase/checks-and-expanders.ts +163 -0
- package/examples/showcase/cultures.ts +39 -0
- package/examples/showcase/dates.ts +182 -0
- package/examples/showcase/dialogs.ts +184 -0
- package/examples/showcase/feedback-and-navigation.ts +174 -0
- package/examples/showcase/fields.ts +178 -0
- package/examples/showcase/fonts/Jost-Variable.ttf +0 -0
- package/examples/showcase/fonts/OFL-Jost.txt +93 -0
- package/examples/showcase/grids.ts +150 -0
- package/examples/showcase/index.html +60 -0
- package/examples/showcase/layout-and-navigation.ts +47 -0
- package/examples/showcase/nivona.css +98 -0
- package/examples/showcase/selects.ts +158 -0
- package/examples/showcase/showcase.css +231 -0
- package/examples/showcase/showcase.ts +214 -0
- package/examples/showcase/tabs.ts +161 -0
- package/examples/showcase/themes.css +83 -0
- package/examples/showcase/themes.ts +54 -0
- package/lib/components/IntervalComponent.d.ts +5 -0
- package/lib/components/IntervalComponent.js +29 -13
- package/lib/components/auto-suggest/AutoSuggestComponent.d.ts +11 -9
- package/lib/components/auto-suggest/AutoSuggestComponent.js +25 -38
- package/lib/components/button/ButtonComponent.d.ts +30 -1
- package/lib/components/button/ButtonComponent.js +85 -4
- package/lib/components/checkbox/CheckBoxComponent.d.ts +11 -1
- package/lib/components/checkbox/CheckBoxComponent.js +66 -56
- package/lib/components/checkbox/CheckBoxStyle.scss +72 -85
- package/lib/components/date/DateComponent.d.ts +10 -0
- package/lib/components/date/DateComponent.js +92 -44
- package/lib/components/date-range/DateRangeComponent.d.ts +14 -3
- package/lib/components/date-range/DateRangeComponent.js +96 -86
- package/lib/components/date-range/DateRangeStyle.scss +35 -11
- package/lib/components/date-time/DateTimeComponent.d.ts +8 -0
- package/lib/components/date-time/DateTimeComponent.js +64 -23
- package/lib/components/date-time/DateTimeStyle.scss +10 -7
- package/lib/components/dialog/DialogComponent.d.ts +21 -7
- package/lib/components/dialog/DialogComponent.js +179 -122
- package/lib/components/expander/ExpanderComponent.d.ts +15 -1
- package/lib/components/expander/ExpanderComponent.js +85 -64
- package/lib/components/expander/ExpanderStyle.scss +61 -47
- package/lib/components/form-field/FormFieldComponent.d.ts +45 -15
- package/lib/components/form-field/FormFieldComponent.js +249 -96
- package/lib/components/form-field/FormFieldStyle.scss +36 -87
- package/lib/components/form-field/create-control.d.ts +7 -0
- package/lib/components/form-field/create-control.js +48 -0
- package/lib/components/input/InputComponent.d.ts +18 -1
- package/lib/components/input/InputComponent.js +68 -93
- package/lib/components/loading/LoadingComponent.d.ts +9 -2
- package/lib/components/loading/LoadingComponent.js +13 -12
- package/lib/components/loading/LoadingStyle.css +19 -29
- package/lib/components/navigation/NavigationComponent.d.ts +34 -10
- package/lib/components/navigation/NavigationComponent.js +261 -33
- package/lib/components/navigation/NavigationStyle.scss +62 -226
- package/lib/components/notification/Notification.d.ts +37 -4
- package/lib/components/notification/Notification.js +160 -41
- package/lib/components/notification/Notification.scss +103 -19
- package/lib/components/number/NumberComponent.d.ts +16 -2
- package/lib/components/number/NumberComponent.js +54 -53
- package/lib/components/overlay/OverlayComponent.d.ts +13 -7
- package/lib/components/overlay/OverlayComponent.js +46 -114
- package/lib/components/overlay/overlay.css +18 -57
- package/lib/components/progress/ProgressComponent.d.ts +1 -0
- package/lib/components/progress/ProgressComponent.js +6 -6
- package/lib/components/progress/ProgressStyle.scss +5 -15
- package/lib/components/ribbon-menu/RibbonMenuComponent.js +2 -2
- package/lib/components/ribbon-menu/RibbonMenuStyle.scss +6 -76
- package/lib/components/select/SelectComponent.d.ts +33 -3
- package/lib/components/select/SelectComponent.js +312 -278
- package/lib/components/select/SelectDDAreaComponent.d.ts +13 -7
- package/lib/components/select/SelectDDAreaComponent.js +215 -256
- package/lib/components/select/SelectStyle.scss +204 -186
- package/lib/components/slider/nouislider.css +40 -54
- package/lib/components/stack-panel/SplitterComponent.d.ts +19 -3
- package/lib/components/stack-panel/SplitterComponent.js +94 -111
- package/lib/components/stack-panel/SplitterStyle.scss +9 -45
- package/lib/components/stack-panel/StackPanelComponent.js +3 -3
- package/lib/components/stack-panel/StackPanelStyle.scss +10 -52
- package/lib/components/tabs/TabsComponent.d.ts +17 -1
- package/lib/components/tabs/TabsComponent.js +247 -123
- package/lib/components/tabs/TabsStyle.scss +138 -75
- package/lib/components/time/TimeComponent.d.ts +5 -0
- package/lib/components/time/TimeComponent.js +61 -69
- package/lib/components/time/TimeComponent.scss +4 -4
- package/lib/components/tree-view/TreeViewComponent.d.ts +10 -4
- package/lib/components/tree-view/TreeViewComponent.js +65 -32
- package/lib/components/tree-view/TreeViewStyle.scss +12 -96
- package/lib/core/date.d.ts +2 -0
- package/lib/core/date.js +6 -0
- package/lib/core/jq.js +11 -8
- package/lib/grid/slick-default-theme.css +107 -31
- package/lib/grid/slick.creator.js +23 -5
- package/lib/grid/slick.formatters.js +4 -3
- package/lib/grid/slick.grid.css +38 -26
- package/lib/grid/slick.grid.d.ts +1 -0
- package/lib/grid/slick.grid.js +2 -3
- package/lib/grid.css +3413 -454
- package/lib/index.css +2500 -1031
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interaction/moveable.d.ts +1 -0
- package/lib/interaction/moveable.js +8 -0
- package/lib/interaction/resizable.d.ts +1 -0
- package/lib/interaction/resizable.js +9 -0
- package/lib/ui/auto.suggest.css +31 -14
- package/lib/ui/auto.suggest.d.ts +1 -0
- package/lib/ui/auto.suggest.js +88 -18
- package/lib/ui/base.css +2 -48
- package/lib/ui/button.css +134 -0
- package/lib/ui/date-input.css +11 -0
- package/lib/ui/date.picker/css/tiny-date-picker.css +124 -325
- package/lib/ui/date.picker/date-picker-options.js +4 -3
- package/lib/ui/date.picker/lib/date-manip.js +9 -0
- package/lib/ui/date.picker/mode/base-mode.d.ts +2 -1
- package/lib/ui/date.picker/mode/base-mode.js +112 -22
- package/lib/ui/date.picker/mode/dropdown-mode.d.ts +2 -4
- package/lib/ui/date.picker/mode/dropdown-mode.js +29 -42
- package/lib/ui/date.picker/mode/index.d.ts +2 -1
- package/lib/ui/date.picker/mode/modal-mode.d.ts +2 -1
- package/lib/ui/date.picker/mode/modal-mode.js +4 -2
- package/lib/ui/date.picker/mode/permanent-mode.d.ts +2 -1
- package/lib/ui/date.picker/views/day-picker.js +24 -15
- package/lib/ui/date.picker/views/month-picker.js +1 -1
- package/lib/ui/date.picker/views/year-picker.js +3 -2
- package/lib/ui/date.picker.d.ts +2 -1
- package/lib/ui/dialog.css +144 -108
- package/lib/ui/dialog.d.ts +19 -1
- package/lib/ui/dialog.js +178 -60
- package/lib/ui/input.css +35 -0
- package/lib/ui/number.input.js +50 -37
- package/lib/ui/theme.css +28 -0
- package/package.json +12 -8
- package/lib/components/drop-down/DropDownComponent.d.ts +0 -27
- package/lib/components/drop-down/DropDownComponent.js +0 -60
- package/lib/components/expander/OldExpanderStyle.scss +0 -37
- package/lib/ui/drop.down.d.ts +0 -52
- package/lib/ui/drop.down.js +0 -2112
package/lib/ui/number.input.js
CHANGED
|
@@ -3,54 +3,67 @@ import { numeric } from "../core/numeric";
|
|
|
3
3
|
import { EventHandler } from "../interaction/eventhandler";
|
|
4
4
|
const defaultOptions = { format: "0.###", formatOnBlur: true, commitOnEnter: true, placeholder: false, enabled: true };
|
|
5
5
|
export function NumberInput(input, options) {
|
|
6
|
-
|
|
6
|
+
const el = typeof input === "string" ? document.querySelector(input) : input;
|
|
7
7
|
const o = { ...defaultOptions, ...options };
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
el = document.querySelector(input);
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
el = input;
|
|
14
|
-
}
|
|
15
|
-
if (o.value || o.value === 0) {
|
|
8
|
+
const onChange = EventHandler.Create(o.onChange);
|
|
9
|
+
if (o.value != null) {
|
|
16
10
|
el.value = numeric.format(o.value, o.format);
|
|
17
11
|
}
|
|
18
|
-
if (o.placeholder !== false) {
|
|
19
|
-
|
|
20
|
-
el.placeholder = numeric.format(0, o.format);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
el.placeholder = o.placeholder;
|
|
24
|
-
}
|
|
12
|
+
if (o.placeholder !== false && o.placeholder != null) {
|
|
13
|
+
el.placeholder = o.placeholder === true ? numeric.format(0, o.format) : o.placeholder;
|
|
25
14
|
}
|
|
26
15
|
if (o.inputmode != null) {
|
|
27
16
|
el.inputMode = o.inputmode;
|
|
28
17
|
}
|
|
29
18
|
el.classList.add("jsl-number");
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
el.disabled = o.enabled === false;
|
|
20
|
+
if (!o.enabled) {
|
|
21
|
+
return el;
|
|
32
22
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
23
|
+
let notified = false;
|
|
24
|
+
let lastValue;
|
|
25
|
+
const parse = () => {
|
|
26
|
+
const value = numeric.parse(el.value);
|
|
27
|
+
const invalid = el.value.trim() !== "" && !Number.isFinite(value);
|
|
28
|
+
el.setCustomValidity(invalid ? "Enter a valid number." : "");
|
|
29
|
+
if (invalid) {
|
|
30
|
+
el.setAttribute("aria-invalid", "true");
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
el.removeAttribute("aria-invalid");
|
|
39
34
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
return { value, invalid };
|
|
36
|
+
};
|
|
37
|
+
const commit = () => {
|
|
38
|
+
if (el.readOnly || el.matches(":disabled")) {
|
|
39
|
+
return;
|
|
44
40
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
const result = parse();
|
|
42
|
+
if (!result.invalid && (!notified || !Object.is(lastValue, result.value))) {
|
|
43
|
+
notified = true;
|
|
44
|
+
lastValue = result.value;
|
|
45
|
+
onChange.notify(result.value);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
const format = () => {
|
|
49
|
+
const result = parse();
|
|
50
|
+
if (!result.invalid) {
|
|
51
|
+
el.value = numeric.format(result.value, o.format);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
if (o.formatOnBlur) {
|
|
55
|
+
el.addEventListener("blur", format);
|
|
54
56
|
}
|
|
57
|
+
el.addEventListener("input", () => { notified = false; });
|
|
58
|
+
el.addEventListener("change", commit);
|
|
59
|
+
el.addEventListener("keydown", event => {
|
|
60
|
+
if (event.key === "Enter" && o.commitOnEnter && !event.isComposing && !el.readOnly && !el.matches(":disabled")) {
|
|
61
|
+
if (o.formatOnBlur) {
|
|
62
|
+
format();
|
|
63
|
+
}
|
|
64
|
+
// Use a normal change event so wrappers observe the same commit.
|
|
65
|
+
el.dispatchEvent(new Event("change", { bubbles: true }));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
55
68
|
return el;
|
|
56
69
|
}
|
package/lib/ui/theme.css
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* Neutral base palette shared by redesigned components.
|
|
2
|
+
Override --jsl-color-* on :root or a container to theme an application.
|
|
3
|
+
These tokens do not change the host application's typography or background. */
|
|
4
|
+
:where(:root) {
|
|
5
|
+
--jsl-color-canvas: #f7f7f8;
|
|
6
|
+
--jsl-color-surface: #ffffff;
|
|
7
|
+
--jsl-color-surface-subtle: #fafafa;
|
|
8
|
+
--jsl-color-surface-hover: #f0f0f2;
|
|
9
|
+
--jsl-color-surface-selected: #e8e8eb;
|
|
10
|
+
--jsl-color-border: #d4d4d8;
|
|
11
|
+
--jsl-color-border-subtle: #e4e4e7;
|
|
12
|
+
--jsl-color-text: #27272a;
|
|
13
|
+
--jsl-color-text-secondary: #52525b;
|
|
14
|
+
--jsl-color-text-muted: #71717a;
|
|
15
|
+
--jsl-color-accent: #3f3f46;
|
|
16
|
+
--jsl-color-accent-hover: #27272a;
|
|
17
|
+
--jsl-color-accent-active: #18181b;
|
|
18
|
+
--jsl-color-on-accent: #ffffff;
|
|
19
|
+
--jsl-color-focus: #52525b;
|
|
20
|
+
--jsl-color-danger: #b42318;
|
|
21
|
+
--jsl-color-success: #15803d;
|
|
22
|
+
--jsl-color-warning: #b45309;
|
|
23
|
+
--jsl-color-info: #2563eb;
|
|
24
|
+
--jsl-color-disabled-surface: #f4f4f5;
|
|
25
|
+
--jsl-color-disabled-text: #71717a;
|
|
26
|
+
--jsl-color-overlay: rgba(24, 24, 27, 0.45);
|
|
27
|
+
--jsl-shadow-dialog: 0 24px 64px rgba(0, 0, 0, 0.18), 0 4px 16px rgba(0, 0, 0, 0.08);
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsl-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "javascript UI library",
|
|
3
|
+
"version": "10.0.0",
|
|
5
4
|
"main": "lib/index.js",
|
|
5
|
+
"description": "javascript UI library",
|
|
6
6
|
"files": [
|
|
7
|
-
"lib/**/*"
|
|
7
|
+
"lib/**/*",
|
|
8
|
+
"docs/**/*.md",
|
|
9
|
+
"examples/showcase/**/*"
|
|
8
10
|
],
|
|
9
11
|
"scripts": {
|
|
10
12
|
"copycss": "xcopy /sy ui\\*.css lib\\ui\\ && xcopy /sy components\\*.css lib\\components\\ && xcopy /sy grid\\*.css lib\\grid\\ && xcopy /sy interaction\\*.css lib\\interaction\\",
|
|
11
13
|
"copyscss": "xcopy /sy ui\\*.scss lib\\ui\\ && xcopy /sy components\\*.scss lib\\components\\ && xcopy /sy grid\\*.scss lib\\grid\\ && xcopy /sy interaction\\*.scss lib\\interaction\\",
|
|
12
|
-
"buildcss": "parcel build .\\grid.ts --no-scope-hoist && powershell
|
|
14
|
+
"buildcss": "parcel build .\\grid.ts --no-scope-hoist && powershell Move-Item -LiteralPath \"lib\\index.css\" -Destination \"lib\\grid.css\" -Force && parcel build .\\index.ts --no-scope-hoist",
|
|
13
15
|
"build": "npm run buildcss && npm run copycss && npm run copyscss && tsc",
|
|
14
|
-
"test": "parcel examples/
|
|
16
|
+
"test": "parcel examples/components/jsl-render.html",
|
|
17
|
+
"showcase": "parcel examples/showcase/index.html --port 1235"
|
|
15
18
|
},
|
|
16
19
|
"author": "Philipp P.",
|
|
17
20
|
"devDependencies": {
|
|
18
|
-
"@parcel/transformer-sass": "2.13.3",
|
|
19
|
-
"parcel": "2.13.3"
|
|
21
|
+
"@parcel/transformer-sass": "^2.13.3",
|
|
22
|
+
"parcel": "^2.13.3",
|
|
23
|
+
"typescript": "5.9.3"
|
|
20
24
|
},
|
|
21
25
|
"peerDependencies": {
|
|
22
|
-
"jsl-render": "^3.
|
|
26
|
+
"jsl-render": "^3.7.0"
|
|
23
27
|
}
|
|
24
28
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { IJSLComponent, IJSLVNode } from "jsl-render";
|
|
2
|
-
import { IDropDownOptions, IDropDown } from "../../ui/drop.down";
|
|
3
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
4
|
-
import { IDataConverter } from "../../interaction/dataconverter";
|
|
5
|
-
export interface IDropDownComponentOptions<T = any> extends IDropDownOptions {
|
|
6
|
-
class?: string;
|
|
7
|
-
placeholder?: string;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated
|
|
10
|
-
*/
|
|
11
|
-
onSelect?: (value: string | string[]) => void;
|
|
12
|
-
onChange?: EventHandler<string | string[]> | ((value?: string | string[]) => void);
|
|
13
|
-
value?: string | string[];
|
|
14
|
-
bindTo?: T;
|
|
15
|
-
property?: keyof T;
|
|
16
|
-
converter?: IDataConverter<any, string | string[]>;
|
|
17
|
-
enabled?: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare class DropDownComponent<T = any> implements IJSLComponent {
|
|
20
|
-
private ref;
|
|
21
|
-
private options;
|
|
22
|
-
constructor(options: IDropDownComponentOptions<T>);
|
|
23
|
-
render(): IJSLVNode;
|
|
24
|
-
getRef(): IDropDown;
|
|
25
|
-
onCreate(node: IJSLVNode): void;
|
|
26
|
-
onRemove(): void;
|
|
27
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { DropDown } from "../../ui/drop.down";
|
|
2
|
-
import { EventHandler } from "../../interaction/eventhandler";
|
|
3
|
-
export class DropDownComponent {
|
|
4
|
-
constructor(options) {
|
|
5
|
-
var _a;
|
|
6
|
-
this.options = { ...{ enabled: true }, ...options };
|
|
7
|
-
this.options.onChange = EventHandler.Create(this.options.onChange);
|
|
8
|
-
if (this.options.bindTo != null && this.options.property != null && this.options.value == null) {
|
|
9
|
-
this.options.value = (((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toUI) ?
|
|
10
|
-
this.options.converter.toUI(this.options.bindTo[this.options.property]) :
|
|
11
|
-
this.options.bindTo[this.options.property]);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
render() {
|
|
15
|
-
return {
|
|
16
|
-
tag: "select"
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
getRef() {
|
|
20
|
-
return this.ref;
|
|
21
|
-
}
|
|
22
|
-
onCreate(node) {
|
|
23
|
-
this.ref = DropDown(node.dom, this.options);
|
|
24
|
-
if (!this.options.enabled) {
|
|
25
|
-
this.ref.disable();
|
|
26
|
-
}
|
|
27
|
-
node.dom.parentElement.classList.add(this.options.class);
|
|
28
|
-
if (this.options.width) {
|
|
29
|
-
node.dom.parentElement.style.display = "inline-block";
|
|
30
|
-
}
|
|
31
|
-
node.dom.addEventListener("change", (evt) => {
|
|
32
|
-
var _a;
|
|
33
|
-
let value;
|
|
34
|
-
if (this.options.multiple) {
|
|
35
|
-
value = Array.prototype.slice.call(node.dom.querySelectorAll("option:checked"), 0).map((v) => v.value);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
value = node.dom.value;
|
|
39
|
-
}
|
|
40
|
-
if (this.options.bindTo != null && this.options.property != null) {
|
|
41
|
-
this.options.bindTo[this.options.property] =
|
|
42
|
-
((_a = this.options.converter) === null || _a === void 0 ? void 0 : _a.toData) ? this.options.converter.toData(value) : value;
|
|
43
|
-
}
|
|
44
|
-
if (this.options.onSelect != null) {
|
|
45
|
-
this.options.onSelect(value);
|
|
46
|
-
}
|
|
47
|
-
if (this.options.onChange != null) {
|
|
48
|
-
this.options.onChange.notify(value);
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
if (this.options.value != null) {
|
|
52
|
-
this.ref.setValue(this.options.value);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
onRemove() {
|
|
56
|
-
if (this.ref != null) {
|
|
57
|
-
this.ref.destroy();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.expander-comp {
|
|
2
|
-
|
|
3
|
-
margin: 1rem;
|
|
4
|
-
box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
|
|
5
|
-
|
|
6
|
-
.header {
|
|
7
|
-
position: relative;
|
|
8
|
-
padding: 0.5rem;
|
|
9
|
-
padding-left: 1.6rem;
|
|
10
|
-
border-bottom: 2px solid #cccccc;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
background: #3B99FF;
|
|
13
|
-
color: white;
|
|
14
|
-
font-weight: bold;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.body {
|
|
18
|
-
padding: 0.5rem;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.expand-collapse-icon {
|
|
22
|
-
position: absolute;
|
|
23
|
-
left: 0.2rem;
|
|
24
|
-
top: 0.4rem;
|
|
25
|
-
font-size: 0.9rem;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
padding: 0.1rem;
|
|
28
|
-
opacity: 0.6;
|
|
29
|
-
font-weight: bold;
|
|
30
|
-
color: black;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.header:hover .expand-collapse-icon {
|
|
34
|
-
opacity: 1;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
package/lib/ui/drop.down.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Selectr 2.4.12
|
|
3
|
-
* http://mobius.ovh/docs/selectr
|
|
4
|
-
*
|
|
5
|
-
* Released under the MIT license
|
|
6
|
-
*/
|
|
7
|
-
import "./drop.down.css";
|
|
8
|
-
export interface IDropDown {
|
|
9
|
-
setValue: (value: string | string[]) => void;
|
|
10
|
-
getValue: (toObject?: boolean, toJson?: boolean) => string | string[];
|
|
11
|
-
add: (data: {
|
|
12
|
-
value: string;
|
|
13
|
-
text: string;
|
|
14
|
-
} | Array<{
|
|
15
|
-
value: string;
|
|
16
|
-
text: string;
|
|
17
|
-
}>, skipDuplicate?: boolean) => void;
|
|
18
|
-
remove: (element: number | string | any[]) => void;
|
|
19
|
-
removeAll: () => void;
|
|
20
|
-
serialize: (toJson?: boolean) => any;
|
|
21
|
-
open: () => void;
|
|
22
|
-
close: () => void;
|
|
23
|
-
toggle: () => void;
|
|
24
|
-
clear: () => void;
|
|
25
|
-
disable: (submitValue?: boolean) => void;
|
|
26
|
-
enable: () => void;
|
|
27
|
-
destroy: () => void;
|
|
28
|
-
}
|
|
29
|
-
export interface IDropDownOptions {
|
|
30
|
-
defaultSelected?: boolean;
|
|
31
|
-
multiple?: boolean;
|
|
32
|
-
data?: any[];
|
|
33
|
-
pagination?: number;
|
|
34
|
-
sortSelected?: boolean;
|
|
35
|
-
searchable?: boolean;
|
|
36
|
-
clearable?: boolean;
|
|
37
|
-
allowDeselect?: boolean;
|
|
38
|
-
width?: number | string;
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
taggable?: boolean;
|
|
41
|
-
maxSelections?: number;
|
|
42
|
-
tagSeperators?: string[];
|
|
43
|
-
tagPlaceholder?: string;
|
|
44
|
-
renderOption?: (option: any) => string;
|
|
45
|
-
renderSelection?: (option: any) => string;
|
|
46
|
-
closeOnScroll?: boolean;
|
|
47
|
-
customClass?: string;
|
|
48
|
-
messages?: {
|
|
49
|
-
[index: string]: string;
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
export declare let DropDown: (input: string | HTMLElement, config?: IDropDownOptions) => IDropDown;
|