@dodlhuat/basix 1.2.4 → 1.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.
- package/README.md +1 -1
- package/css/calendar.css +928 -0
- package/css/calendar.scss +114 -63
- package/css/form.scss +224 -54
- package/css/style.css +284 -230
- package/js/calendar.js +276 -187
- package/js/calendar.ts +370 -307
- package/js/docs-nav.js +1 -0
- package/js/timepicker.js +2 -12
- package/package.json +1 -1
package/js/docs-nav.js
CHANGED
|
@@ -57,6 +57,7 @@ const NAV = [
|
|
|
57
57
|
{ label: 'Gallery', href: 'components/gallery.html' },
|
|
58
58
|
{ label: 'Scrollbar', href: 'components/scrollbar.html' },
|
|
59
59
|
{ label: 'Chat Bubbles', href: 'components/chat-bubbles.html' },
|
|
60
|
+
{ label: 'Calendar', href: 'components/calendar.html' },
|
|
60
61
|
{ label: 'Charts', href: 'components/charts.html' },
|
|
61
62
|
{ label: 'Group Picker', href: 'components/group-picker.html' },
|
|
62
63
|
{ label: 'Virtual Dropdown', href: 'components/virtual-dropdown.html' },
|
package/js/timepicker.js
CHANGED
|
@@ -13,6 +13,8 @@ class TimeSpanPicker {
|
|
|
13
13
|
this.container = element;
|
|
14
14
|
this.onChange = options?.onChange;
|
|
15
15
|
this.uid = `tsp-${Math.random().toString(36).slice(2, 9)}`;
|
|
16
|
+
this.fromString = options?.fromString ?? 'From';
|
|
17
|
+
this.toString = options?.toString ?? 'To';
|
|
16
18
|
this.render();
|
|
17
19
|
this.startTimeInput = this.queryInput('.timespan-start');
|
|
18
20
|
this.endTimeInput = this.queryInput('.timespan-end');
|
|
@@ -22,18 +24,6 @@ class TimeSpanPicker {
|
|
|
22
24
|
if (options?.defaultEnd) {
|
|
23
25
|
this.endTimeInput.value = options.defaultEnd;
|
|
24
26
|
}
|
|
25
|
-
if (options?.fromString) {
|
|
26
|
-
this.fromString = options.fromString;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
this.fromString = 'From';
|
|
30
|
-
}
|
|
31
|
-
if (options?.toString) {
|
|
32
|
-
this.toString = options.toString;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
this.toString = 'To';
|
|
36
|
-
}
|
|
37
27
|
this.attachEventListeners();
|
|
38
28
|
// Render initial state if defaults provided
|
|
39
29
|
if (options?.defaultStart || options?.defaultEnd) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodlhuat/basix",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Basix is intended as a starter for the rapid development of a design. Each design element can be added individually to include only the data required. It is using plain javascript / typescript and therefore is not dependent on any plugin.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./css/*": "./css/*",
|