@lemonadejs/calendar 3.0.5 → 3.1.1

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 CHANGED
@@ -44,7 +44,7 @@ import "@lemonadejs/calendar/dist/style.css"
44
44
  export default function App() {
45
45
  const self = this;
46
46
 
47
- return `<Calendar />`;
47
+ return `<Calendar type="inline" />`;
48
48
  }
49
49
  ```
50
50
 
@@ -57,19 +57,16 @@ You can configure things such as calendar starting date, calendar events, and cu
57
57
  | Property | Type | Description |
58
58
  | -------- | ---- | ----------- |
59
59
  | value | date | The value currently attached to the calendar. |
60
- | range | array | Defines a restricted range of selectable dates within the calendar. Example: ['2023-06-20', '2023-06-25']. |
61
- | closed | boolean | Control when the calendar modal is open or closed. |
62
- | time | boolean | Enables time selection into the calendar. |
63
- | type | string | |
60
+ | range | Boolean | Activates the range mode in the calendar, enabling users to select two dates and represent the range between them as a value. |
61
+ | type | string | Specifies the parameters for controlling the rendering behavior of the calendar. |
62
+ | numeric | boolean | Enables the use of numeric dates, treating them as serial numbers. |
63
+ | input? | HTML element | An optional reference to control the calendar opening. The value is automatically bound when using this property. |
64
64
 
65
65
  ### Calendar Events
66
66
 
67
67
  | Event | Type | Description |
68
68
  | -------- | ---- | ----------- |
69
- | onopen? | () => void | Called when modal opens. |
70
- | onclose? | () => void | Called when modal closes. |
71
- | onupdate? | (instance.value) => void | Called when value updates. |
72
- | onchange? | (instance.value) => void | Called when some state inside the component changes. |
69
+ | onupdate?: (self, value) => void | Called when a new date is selected. |
73
70
 
74
71
  ## License
75
72
 
package/dist/index.d.ts CHANGED
@@ -10,7 +10,7 @@ declare namespace Calendar {
10
10
  interface Options {
11
11
  /** Range picker */
12
12
  range?: boolean;
13
- /** Caqlendar type */
13
+ /** Calendar type */
14
14
  type?: 'default' | 'inline';
15
15
  /** Calendar value will be a excel-like number or a ISO string. Default false */
16
16
  numeric?: boolean;
@@ -21,6 +21,14 @@ declare namespace Calendar {
21
21
  }
22
22
 
23
23
  interface Instance {
24
+ /** Range picker */
25
+ range?: boolean;
26
+ /** Calendar type */
27
+ type?: 'default' | 'inline';
28
+ /** Calendar value will be a excel-like number or a ISO string. Default false */
29
+ numeric?: boolean;
30
+ /** Value */
31
+ value?: number | string;
24
32
  }
25
33
  }
26
34
 
package/dist/index.js CHANGED
@@ -683,6 +683,9 @@ if (! Modal && typeof (require) === 'function') {
683
683
  width: 300,
684
684
  closed: true,
685
685
  focus: false,
686
+ position: 'absolute',
687
+ 'auto-adjust': true,
688
+ 'auto-close': false,
686
689
  };
687
690
  // Generate modal
688
691
  Modal(self.el, self.modal);
package/dist/vue.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Official Type definitions for the LemonadeJS plugins
3
+ * https://lemonadejs.net
4
+ * Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
+ */
6
+ import Component from './index';
7
+
8
+ interface Calendar {
9
+ (): any
10
+ [key: string]: any
11
+ }
12
+
13
+ declare function Calendar<Calendar>(props: Component.Options): any;
14
+
15
+ export default Calendar;
package/package.json CHANGED
@@ -15,9 +15,9 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "lemonadejs": "^4.0.7",
18
- "@lemonadejs/modal": "^2.4.6"
18
+ "@lemonadejs/modal": "^2.7.1"
19
19
  },
20
20
  "main": "dist/index.js",
21
21
  "types": "dist/index.d.ts",
22
- "version": "3.0.5"
22
+ "version": "3.1.1"
23
23
  }