native-document 1.0.76 → 1.0.78

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 (154) hide show
  1. package/components.js +26 -1
  2. package/dist/native-document.components.min.js +6447 -1984
  3. package/dist/native-document.dev.js +309 -196
  4. package/dist/native-document.dev.js.map +1 -1
  5. package/dist/native-document.devtools.min.js +1 -1
  6. package/dist/native-document.min.js +1 -1
  7. package/package.json +1 -1
  8. package/rollup.config.js +0 -14
  9. package/src/components/$traits/HasItems.js +38 -0
  10. package/src/components/BaseComponent.js +70 -0
  11. package/src/components/accordion/Accordion.js +133 -0
  12. package/src/components/accordion/AccordionItem.js +119 -0
  13. package/src/components/accordion/index.js +7 -0
  14. package/src/components/alert/Alert.js +155 -0
  15. package/src/components/alert/index.js +6 -0
  16. package/src/components/avatar/Avatar.js +178 -0
  17. package/src/components/avatar/index.js +5 -0
  18. package/src/components/badge/Badge.js +103 -0
  19. package/src/components/badge/index.js +6 -0
  20. package/src/components/breadcrumb/BreadCrumb.js +70 -0
  21. package/src/components/breadcrumb/index.js +5 -0
  22. package/src/components/button/Button.js +174 -0
  23. package/src/components/button/index.js +5 -0
  24. package/src/components/card/Card.js +110 -0
  25. package/src/components/card/index.js +5 -0
  26. package/src/components/context-menu/ContextMenu.js +60 -0
  27. package/src/components/context-menu/ContextMenuGroup.js +16 -0
  28. package/src/components/context-menu/ContextMenuItem.js +16 -0
  29. package/src/components/context-menu/index.js +10 -0
  30. package/src/components/divider/Divider.js +126 -0
  31. package/src/components/divider/index.js +6 -0
  32. package/src/components/dropdown/Dropdown.js +170 -0
  33. package/src/components/dropdown/DropdownDivider.js +24 -0
  34. package/src/components/dropdown/DropdownGroup.js +44 -0
  35. package/src/components/dropdown/DropdownItem.js +71 -0
  36. package/src/components/dropdown/DropdownTrigger.js +64 -0
  37. package/src/components/dropdown/index.js +13 -0
  38. package/src/components/{fom-control → form}/FormControl.js +28 -20
  39. package/src/components/{fom-control → form}/field/DefaultRender.js +1 -15
  40. package/src/components/{fom-control → form}/field/Field.js +64 -137
  41. package/src/components/{fom-control → form}/field/FieldCollection.js +39 -19
  42. package/src/components/{fom-control → form}/field/types/AutocompleteField.js +11 -0
  43. package/src/components/form/field/types/CheckboxField.js +36 -0
  44. package/src/components/{fom-control → form}/field/types/CheckboxGroupField.js +10 -0
  45. package/src/components/{fom-control → form}/field/types/ColorField.js +10 -0
  46. package/src/components/{fom-control → form}/field/types/DateField.js +10 -0
  47. package/src/components/{fom-control → form}/field/types/EmailField.js +10 -0
  48. package/src/components/{fom-control → form}/field/types/FileField.js +10 -0
  49. package/src/components/form/field/types/HiddenField.js +18 -0
  50. package/src/components/{fom-control → form}/field/types/ImageField.js +10 -0
  51. package/src/components/{fom-control → form}/field/types/NumberField.js +10 -0
  52. package/src/components/{fom-control → form}/field/types/PasswordField.js +10 -0
  53. package/src/components/{fom-control → form}/field/types/RadioField.js +28 -2
  54. package/src/components/{fom-control → form}/field/types/RangeField.js +10 -0
  55. package/src/components/{fom-control → form}/field/types/SearchField.js +10 -0
  56. package/src/components/{fom-control → form}/field/types/SelectField.js +10 -0
  57. package/src/components/{fom-control → form}/field/types/StringField.js +10 -0
  58. package/src/components/{fom-control → form}/field/types/TelField.js +10 -1
  59. package/src/components/{fom-control → form}/field/types/TextAreaField.js +10 -0
  60. package/src/components/{fom-control → form}/field/types/TimeField.js +10 -1
  61. package/src/components/{fom-control → form}/field/types/UrlField.js +9 -1
  62. package/src/components/form/index.js +49 -0
  63. package/src/components/list/List.js +106 -0
  64. package/src/components/list/ListGroup.js +67 -0
  65. package/src/components/list/ListItem.js +103 -0
  66. package/src/components/list/index.js +10 -0
  67. package/src/components/menu/Menu.js +82 -0
  68. package/src/components/menu/MenuDivider.js +22 -0
  69. package/src/components/menu/MenuGroup.js +42 -0
  70. package/src/components/menu/MenuItem.js +71 -0
  71. package/src/components/menu/index.js +13 -0
  72. package/src/components/modal/Modal.js +153 -0
  73. package/src/components/modal/index.js +5 -0
  74. package/src/components/pagination/Pagination.js +229 -0
  75. package/src/components/pagination/index.js +5 -0
  76. package/src/components/popover/Popover.js +185 -0
  77. package/src/components/popover/PopoverFooter.js +37 -0
  78. package/src/components/popover/PopoverHeader.js +43 -0
  79. package/src/components/popover/index.js +10 -0
  80. package/src/components/progress/Progress.js +220 -0
  81. package/src/components/progress/index.js +6 -0
  82. package/src/components/skeleton/Skeleton.js +98 -0
  83. package/src/components/skeleton/SkeletonCard.js +0 -0
  84. package/src/components/skeleton/SkeletonList.js +0 -0
  85. package/src/components/skeleton/SkeletonParagraph.js +0 -0
  86. package/src/components/skeleton/SkeletonTable.js +0 -0
  87. package/src/components/skeleton/index.js +6 -0
  88. package/src/components/slider/Slider.js +183 -0
  89. package/src/components/slider/index.js +5 -0
  90. package/src/components/spinner/Spinner.js +160 -0
  91. package/src/components/spinner/index.js +5 -0
  92. package/src/components/splitter/Splitter.js +94 -0
  93. package/src/components/splitter/SplitterGutter.js +57 -0
  94. package/src/components/splitter/SplitterPanel.js +82 -0
  95. package/src/components/splitter/index.js +8 -0
  96. package/src/components/stepper/Stepper.js +229 -0
  97. package/src/components/stepper/StepperStep.js +103 -0
  98. package/src/components/stepper/index.js +8 -0
  99. package/src/components/switch/Switch.js +99 -0
  100. package/src/components/switch/index.js +0 -0
  101. package/src/components/table/SimpleTable.js +36 -32
  102. package/src/components/tabs/Tabs.js +110 -0
  103. package/src/components/tabs/index.js +6 -0
  104. package/src/components/toast/Toast.js +129 -0
  105. package/src/components/toast/ToastError.js +0 -0
  106. package/src/components/toast/ToastInfo.js +0 -0
  107. package/src/components/toast/ToastSuccess.js +0 -0
  108. package/src/components/toast/ToastWarning.js +0 -0
  109. package/src/components/toast/index.js +5 -0
  110. package/src/components/tooltip/Tooltip.js +98 -0
  111. package/src/components/tooltip/index.js +5 -0
  112. package/src/components/tooltip/prototypes.js +6 -0
  113. package/src/core/data/MemoryManager.js +1 -2
  114. package/src/core/data/Observable.js +1 -1
  115. package/src/core/data/ObservableArray.js +10 -4
  116. package/src/core/data/ObservableItem.js +5 -5
  117. package/src/core/data/observable-helpers/array.js +1 -1
  118. package/src/core/data/observable-helpers/batch.js +1 -1
  119. package/src/core/data/observable-helpers/computed.js +1 -1
  120. package/src/core/elements/control/for-each-array.js +37 -64
  121. package/src/core/elements/control/for-each.js +1 -1
  122. package/src/core/elements/control/show-if.js +1 -1
  123. package/src/core/elements/control/switch.js +1 -1
  124. package/src/core/utils/events.js +68 -0
  125. package/src/core/utils/filters/standard.js +1 -1
  126. package/src/core/utils/filters/utils.js +1 -1
  127. package/src/core/utils/helpers.js +10 -7
  128. package/src/core/utils/validator.js +1 -0
  129. package/src/core/wrappers/AttributesWrapper.js +18 -35
  130. package/src/core/wrappers/DocumentObserver.js +0 -1
  131. package/src/core/wrappers/ElementCreator.js +6 -11
  132. package/src/core/wrappers/NdPrototype.js +24 -31
  133. package/src/core/wrappers/TemplateCloner.js +60 -18
  134. package/src/core/wrappers/constants.js +32 -1
  135. package/src/core/wrappers/prototypes/attributes-extensions.js +16 -3
  136. package/src/core/wrappers/prototypes/bind-class-extensions.js +18 -0
  137. package/src/devtools/app/App.js +1 -1
  138. package/src/devtools/hrm/ComponentRegistry.js +1 -1
  139. package/src/router/Router.js +1 -1
  140. package/src/router/link.js +4 -4
  141. package/src/router/modes/HistoryRouter.js +0 -1
  142. package/types/control-flow.d.ts +0 -1
  143. package/types/filters/standard.d.ts +0 -1
  144. package/src/components/fom-control/default/DefaultLayout.js +0 -8
  145. package/src/components/fom-control/default/collection/DefaultCollectionLayout.js +0 -12
  146. package/src/components/fom-control/default/collection/DefaultCollectionTemplate.js +0 -6
  147. package/src/components/fom-control/field/types/CheckboxField.js +0 -17
  148. package/src/components/fom-control/field/types/HiddenField.js +0 -8
  149. package/src/components/fom-control/index.js +0 -8
  150. /package/src/components/{fom-control → form}/field/FieldFactory.js +0 -0
  151. /package/src/components/{fom-control → form}/merge +0 -0
  152. /package/src/components/{fom-control → form}/utils.js +0 -0
  153. /package/src/components/{fom-control → form}/validation/Validation.js +0 -0
  154. /package/src/{core → router}/errors/RouterError.js +0 -0
@@ -0,0 +1,37 @@
1
+ import BaseComponent from "../BaseComponent";
2
+
3
+ export default function PopoverFooter(content, config = {}) {
4
+ if(!(this instanceof PopoverFooter)) {
5
+ return new PopoverFooter(content, config);
6
+ }
7
+
8
+ this.$description = {
9
+ content: content || null,
10
+ data: null,
11
+ render: null,
12
+ ...config
13
+ };
14
+ }
15
+
16
+ BaseComponent.extends(PopoverFooter);
17
+
18
+ PopoverFooter.defaultTemplate = null;
19
+
20
+ PopoverFooter.use = function(template) {
21
+ PopoverFooter.defaultTemplate = template.popoverFooter;
22
+ };
23
+
24
+ PopoverFooter.prototype.content = function(content) {
25
+ this.$description.content = content;
26
+ return this;
27
+ };
28
+
29
+ PopoverFooter.prototype.data = function(data) {
30
+ this.$description.data = data;
31
+ return this;
32
+ };
33
+
34
+ PopoverFooter.prototype.render = function(renderFn) {
35
+ this.$description.render = renderFn;
36
+ return this;
37
+ };
@@ -0,0 +1,43 @@
1
+ import BaseComponent from "../BaseComponent";
2
+
3
+ export default function PopoverHeader(content, config = {}) {
4
+ if(!(this instanceof PopoverHeader)) {
5
+ return new PopoverHeader(content, config);
6
+ }
7
+
8
+ this.$description = {
9
+ content: content || null,
10
+ showClose: false,
11
+ data: null,
12
+ render: null,
13
+ ...config
14
+ };
15
+ }
16
+
17
+ BaseComponent.extends(PopoverHeader);
18
+
19
+ PopoverHeader.defaultTemplate = null;
20
+
21
+ PopoverHeader.use = function(template) {
22
+ PopoverHeader.defaultTemplate = template.popoverHeader;
23
+ };
24
+
25
+ PopoverHeader.prototype.content = function(content) {
26
+ this.$description.content = content;
27
+ return this;
28
+ };
29
+
30
+ PopoverHeader.prototype.showClose = function(show = true) {
31
+ this.$description.showClose = show;
32
+ return this;
33
+ };
34
+
35
+ PopoverHeader.prototype.data = function(data) {
36
+ this.$description.data = data;
37
+ return this;
38
+ };
39
+
40
+ PopoverHeader.prototype.render = function(renderFn) {
41
+ this.$description.render = renderFn;
42
+ return this;
43
+ };
@@ -0,0 +1,10 @@
1
+ import Popover from "./Popover";
2
+ import PopoverHeader from "./PopoverHeader";
3
+ import PopoverFooter from "./PopoverFooter";
4
+
5
+
6
+ export {
7
+ Popover,
8
+ PopoverHeader,
9
+ PopoverFooter
10
+ };
@@ -0,0 +1,220 @@
1
+ import BaseComponent from "../BaseComponent";
2
+ import EventEmitter from "../../../src/core/utils/EventEmitter";
3
+ import {Validator} from "../../../index";
4
+
5
+ export default function Progress(config = {}) {
6
+ if (!(this instanceof Progress)) {
7
+ return new Progress(config);
8
+ }
9
+
10
+ this.$description = {
11
+ value: null,
12
+ type: null,
13
+ variant: null,
14
+ max: 100,
15
+ size: null,
16
+ height: null,
17
+ showValue: null,
18
+ showPercentage: null,
19
+ label: null,
20
+ format: null,
21
+ indeterminate: null,
22
+ striped: null,
23
+ animated: null,
24
+ render: null,
25
+ ...config
26
+ };
27
+ }
28
+
29
+ BaseComponent.extends(Progress, EventEmitter);
30
+
31
+ Progress.defaultTemplate = null;
32
+
33
+ Progress.use = function(template) {};
34
+
35
+ Progress.prototype.model = function(observable) {
36
+ this.$description.value = observable;
37
+ return this;
38
+ };
39
+
40
+ Progress.prototype.setCurrentStep = function(step) {
41
+ this.$description.value?.set(step);
42
+ this.emit('change', step);
43
+ };
44
+
45
+ Progress.prototype.value = function() {
46
+ const value = this.$description.value;
47
+ if(Validator.isObservable(value)) {
48
+ return value.val();
49
+ }
50
+ return value;
51
+ };
52
+
53
+ Progress.prototype.setValue = function(newValue) {
54
+ const value = this.$description.value;
55
+ if(Validator.isObservable(value)) {
56
+ value.set(newValue);
57
+ return this;
58
+ }
59
+ this.$description.value = newValue;
60
+ return this;
61
+ };
62
+
63
+ Progress.prototype.max = function(max) {
64
+ this.$description.max = max;
65
+ return this;
66
+ };
67
+
68
+ Progress.prototype.type = function(type) {
69
+ this.$description.type = type;
70
+ return this;
71
+ };
72
+
73
+ Progress.prototype.bar = function() {
74
+ return this.type('bar');
75
+ };
76
+
77
+ Progress.prototype.circle = function() {
78
+ return this.type('circle');
79
+ };
80
+
81
+ Progress.prototype.line = function() {
82
+ return this.type('line');
83
+ };
84
+
85
+ // Variant
86
+ Progress.prototype.variant = function(name) {
87
+ this.$description.variant = name;
88
+ return this;
89
+ };
90
+
91
+ Progress.prototype.primary = function() {
92
+ return this.variant('primary');
93
+ };
94
+
95
+ Progress.prototype.secondary = function() {
96
+ return this.variant('secondary');
97
+ };
98
+
99
+ Progress.prototype.success = function() {
100
+ return this.variant('success');
101
+ };
102
+
103
+ Progress.prototype.warning = function() {
104
+ return this.variant('warning');
105
+ };
106
+
107
+ Progress.prototype.danger = function() {
108
+ return this.variant('danger');
109
+ };
110
+
111
+ Progress.prototype.info = function() {
112
+ return this.variant('info');
113
+ };
114
+
115
+
116
+ Progress.prototype.size = function(size) {
117
+ this.$description.size = size;
118
+ return this;
119
+ };
120
+
121
+ Progress.prototype.small = function() {
122
+ return this.size('small');
123
+ };
124
+
125
+ Progress.prototype.medium = function() {
126
+ return this.size('medium');
127
+ };
128
+
129
+ Progress.prototype.large = function() {
130
+ return this.size('large');
131
+ };
132
+
133
+ Progress.prototype.height = function(height) {
134
+ this.$description.height = height;
135
+ return this;
136
+ };
137
+
138
+
139
+ Progress.prototype.showValue = function(enabled = true) {
140
+ this.$description.showValue = enabled;
141
+ return this;
142
+ };
143
+
144
+ Progress.prototype.label = function(text) {
145
+ this.$description.label = text;
146
+ return this;
147
+ };
148
+
149
+ Progress.prototype.format = function(formatFn) {
150
+ this.$description.format = formatFn;
151
+ return this;
152
+ };
153
+
154
+ Progress.prototype.indeterminate = function(enabled = true) {
155
+ this.$description.indeterminate = enabled;
156
+ return this;
157
+ };
158
+
159
+ Progress.prototype.striped = function(enabled = true) {
160
+ this.$description.striped = enabled;
161
+ return this;
162
+ };
163
+
164
+ Progress.prototype.animated = function(enabled = true) {
165
+ this.$description.animated = enabled;
166
+ return this;
167
+ };
168
+
169
+
170
+ Progress.prototype.start = function() {
171
+ // TODO: Implementation
172
+ };
173
+
174
+ Progress.prototype.complete = function() {
175
+ this.setCurrentStep(100);
176
+ this.emit('complete');
177
+ };
178
+
179
+ Progress.prototype.increment = function(step) {
180
+ const current = this.value() || 0;
181
+ this.setCurrentStep(Math.min(this.$description.max, current + step));
182
+ return this;
183
+ };
184
+
185
+ Progress.prototype.reset = function() {
186
+ this.setCurrentStep(0);
187
+ this.emit('reset');
188
+ return this;
189
+ };
190
+
191
+ // Events
192
+ Progress.prototype.onChange = function(handler) {
193
+ this.on('change', handler);
194
+ return this;
195
+ };
196
+
197
+ Progress.prototype.onComplete = function(handler) {
198
+ this.on('complete', handler);
199
+ return this;
200
+ };
201
+
202
+ Progress.prototype.onReset = function(handler) {
203
+ this.on('reset', handler);
204
+ return this;
205
+ };
206
+
207
+
208
+ Progress.prototype.render = function(renderFn) {
209
+ this.$description.render = renderFn;
210
+ return this;
211
+ };
212
+
213
+ // Build & Render
214
+ Progress.prototype.$build = function() {
215
+ // TODO: Implementation
216
+ };
217
+
218
+ Progress.prototype.toNdElement = function() {
219
+ return this.$build();
220
+ };
@@ -0,0 +1,6 @@
1
+ import Progress from "./Progress";
2
+
3
+
4
+ export {
5
+ Progress
6
+ }
@@ -0,0 +1,98 @@
1
+
2
+ export default function Skeleton(type = 'rect', config = {}) {
3
+ if (!(this instanceof Skeleton)) {
4
+ return new Skeleton(config);
5
+ }
6
+ this.$description = {
7
+ type,
8
+ lines: null,
9
+ width: null,
10
+ height: null,
11
+ loading: null,
12
+ repeat: null,
13
+ ...config
14
+ };
15
+ }
16
+
17
+ Skeleton.defaultTemplate = null;
18
+
19
+ Skeleton.use = function(template) {};
20
+
21
+ Skeleton.prototype.type = function(type) {
22
+ this.$description.type = type;
23
+ return this;
24
+ };
25
+ Skeleton.prototype.text = function(lines = 1) {
26
+ this.$description.lines = lines;
27
+ return this.type('text');
28
+ };
29
+ Skeleton.prototype.circle = function() {
30
+ return this.type('circle');
31
+ };
32
+ Skeleton.prototype.rect = function() {
33
+ return this.type('rect');
34
+ };
35
+ Skeleton.prototype.avatar = function() {
36
+ return this.type('avatar');
37
+ };
38
+ Skeleton.prototype.image = function() {
39
+ return this.type('image');
40
+ };
41
+
42
+ Skeleton.prototype.width = function(width) {
43
+ this.$description.width = width;
44
+ return this;
45
+ };
46
+ Skeleton.prototype.height = function(height) {
47
+ this.$description.height = height;
48
+ return this;
49
+ };
50
+ Skeleton.prototype.size = function(width, height) {
51
+ this.width(width);
52
+ this.height(height);
53
+ return this;
54
+ };
55
+
56
+ Skeleton.prototype.variant = function(name) {
57
+ this.$description.variant = name;
58
+ return this;
59
+ };
60
+ Skeleton.prototype.wave = function() {
61
+ return this.variant('wave');
62
+ };
63
+ Skeleton.prototype.pulse = function() {
64
+ return this.variant('pulse');
65
+ };
66
+ Skeleton.prototype.rounded = function() {};
67
+
68
+ Skeleton.prototype.loading = function(isLoading) {
69
+ this.$description.loading = isLoading;
70
+ return this;
71
+ };
72
+ Skeleton.prototype.show = function() {};
73
+ Skeleton.prototype.hide = function() {};
74
+
75
+ Skeleton.prototype.repeat = function(times) {
76
+ this.$description.repeat = times;
77
+ return this;
78
+ };
79
+
80
+
81
+ Skeleton.prototype.render = function(renderFn) {
82
+ this.$description.render = renderFn;
83
+ return this;
84
+ };
85
+
86
+
87
+ Skeleton.prototype.$build = function() {
88
+
89
+ };
90
+ Skeleton.prototype.toNdElement = function() {
91
+ return this.$build();
92
+ };
93
+
94
+ // Presets
95
+ Skeleton.card = function() {}; // Preset pour card
96
+ Skeleton.list = function(items = 3) {}; // Preset pour liste
97
+ Skeleton.table = function(rows = 5, cols = 4) {}; // Preset pour tableau
98
+ Skeleton.paragraph = function(lines = 3) {}; // Preset pour paragraphe
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,6 @@
1
+ import Skeleton from './Skeleton'
2
+
3
+
4
+ export {
5
+ Skeleton
6
+ }
@@ -0,0 +1,183 @@
1
+ import BaseComponent from "../BaseComponent";
2
+ import EventEmitter from "../../../src/core/utils/EventEmitter";
3
+
4
+ export default function Slider(config = {}) {
5
+ if (!(this instanceof Slider)) {
6
+ return new Slider(config);
7
+ }
8
+
9
+ this.$description = {
10
+ value: null,
11
+ defaultValue: null,
12
+ range: null,
13
+ min: null,
14
+ max: null,
15
+ step: null,
16
+ showValue: null,
17
+ showTooltip: null,
18
+ tooltipFormat: null,
19
+ marks: null,
20
+ showMarks: null,
21
+ variant: null,
22
+ color: null,
23
+ trackColor: null,
24
+ vertical: null,
25
+ height: null,
26
+ disabled: null,
27
+ readonly: null,
28
+ reverse: null,
29
+ snapToMarks: null,
30
+ render: null,
31
+ renderCursor: null,
32
+ ...config
33
+ };
34
+ }
35
+
36
+ BaseComponent.extends(Slider, EventEmitter);
37
+
38
+ Slider.use = function(template) {};
39
+ Slider.defaultTemplate = null;
40
+
41
+
42
+ Slider.prototype.value = function(value) {
43
+ this.$description.value = value;
44
+ return this;
45
+ };
46
+
47
+ Slider.prototype.value = function() {
48
+ return this.$description.value?.val();
49
+ };
50
+
51
+ Slider.prototype.setCurrentStep = function(value) {
52
+ this.$description.value?.set(value);
53
+ this.emit('change', value);
54
+ return this;
55
+ };
56
+
57
+ Slider.prototype.range = function(min, max) {
58
+ this.$description.range = {min, max};
59
+ return this;
60
+ };
61
+
62
+ Slider.prototype.min = function(min) {
63
+ this.$description.min = min;
64
+ return this;
65
+ };
66
+
67
+ Slider.prototype.max = function(max) {
68
+ this.$description.max = max;
69
+ return this;
70
+ };
71
+
72
+ Slider.prototype.step = function(step) {
73
+ this.$description.step = step;
74
+ return this;
75
+ };
76
+
77
+ Slider.prototype.showValue = function(enabled = true) {
78
+ this.$description.showValue = enabled;
79
+ return this;
80
+ };
81
+
82
+ Slider.prototype.showTooltip = function(enabled = true) {
83
+ this.$description.showTooltip = enabled;
84
+ return this;
85
+ };
86
+
87
+ Slider.prototype.tooltipFormat = function(formatFn) {
88
+ this.$description.tooltipFormat = formatFn;
89
+ return this;
90
+ };
91
+
92
+ Slider.prototype.marks = function(marks) {
93
+ this.$description.marks = marks;
94
+ return this;
95
+ };
96
+
97
+ Slider.prototype.showMarks = function(enabled = true) {
98
+ this.$description.showMarks = enabled;
99
+ return this;
100
+ };
101
+
102
+ Slider.prototype.variant = function(name) {
103
+ this.$description.variant = name;
104
+ return this;
105
+ };
106
+
107
+ Slider.prototype.primary = function() {
108
+ return this.variant('primary');
109
+ };
110
+ Slider.prototype.secondary = function() {
111
+ return this.variant('secondary');
112
+ };
113
+ Slider.prototype.success = function() {
114
+ return this.variant('success');
115
+ };
116
+ Slider.prototype.warning = function() {
117
+ return this.variant('warning');
118
+ };
119
+ Slider.prototype.danger = function() {
120
+ return this.variant('danger');
121
+ };
122
+ Slider.prototype.info = function() {
123
+ return this.variant('info');
124
+ };
125
+
126
+ Slider.prototype.vertical = function(enabled = true) {
127
+ this.$description.vertical = enabled;
128
+ return this;
129
+ };
130
+
131
+ Slider.prototype.height = function(height) {
132
+ this.$description.height = height;
133
+ return this;
134
+ };
135
+
136
+ Slider.prototype.disabled = function(condition = true) {
137
+ this.$description.disabled = condition;
138
+ return this;
139
+ };
140
+
141
+ Slider.prototype.readonly = function(condition = true) {
142
+ this.$description.readonly = condition;
143
+ return this;
144
+ };
145
+
146
+ Slider.prototype.reverse = function(enabled = true) {
147
+ this.$description.reverse = enabled;
148
+ return this;
149
+ };
150
+
151
+ Slider.prototype.snapToMarks = function(enabled = true) {
152
+ this.$description.snapToMarks = enabled;
153
+ return this;
154
+ };
155
+
156
+ Slider.prototype.onChange = function(handler) {
157
+ this.on('change', handler);
158
+ return this;
159
+ };
160
+
161
+ Slider.prototype.onComplete = function(handler) {
162
+ this.on('complete', handler);
163
+ return this;
164
+ };
165
+
166
+
167
+ Slider.prototype.renderCursor = function(renderFn) {
168
+ this.$description.renderCursor = renderFn;
169
+ return this;
170
+ };
171
+
172
+ Slider.prototype.render = function(renderFn) {
173
+ this.$description.render = renderFn;
174
+ };
175
+
176
+
177
+ Slider.prototype.$build = function() {
178
+ // TODO: Implementation
179
+ };
180
+
181
+ Slider.prototype.toNdElement = function() {
182
+ return this.$build();
183
+ };
@@ -0,0 +1,5 @@
1
+ import Slider from "./Slider";
2
+
3
+ export {
4
+ Slider
5
+ };