ublo-lib 1.40.12 → 1.40.14

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.
@@ -1,5 +1,4 @@
1
- export default function Calendar({ date, display, stayDates, min, max, onSubmit, availabilities, close, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }: {
2
- date: any;
1
+ export default function Calendar({ display, stayDates, min, max, onSubmit, availabilities, close, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }: {
3
2
  display: any;
4
3
  stayDates?: any[];
5
4
  min: any;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/calendar.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;4CAuQC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/calendar.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;4CAqQC"}
@@ -11,18 +11,17 @@ import * as Messages from "./messages";
11
11
  import * as Data from "./data";
12
12
  import * as Utils from "./utils";
13
13
  import styles from "./calendar.module.css";
14
- export default function Calendar({ date, display, stayDates = [], min, max, onSubmit, availabilities, close, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }) {
15
- const isDateObject = Utils.isDate(date);
16
- const _date = isDateObject ? date : new Date();
14
+ export default function Calendar({ display, stayDates = [], min, max, onSubmit, availabilities, close, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }) {
15
+ const date = new Date();
17
16
  const { lang } = useUbloContext();
18
17
  const [selectedDates, setSelectedDates] = React.useState(stayDates);
19
18
  const firstRangeDate = selectedDates[0];
20
19
  const selectedMonth = firstRangeDate
21
20
  ? firstRangeDate.getMonth() + 1
22
- : _date.getMonth() + 1;
21
+ : date.getMonth() + 1;
23
22
  const selectedYear = firstRangeDate
24
23
  ? firstRangeDate.getFullYear()
25
- : _date.getFullYear();
24
+ : date.getFullYear();
26
25
  const [month, setMonth] = React.useState(selectedMonth);
27
26
  const [year, setYear] = React.useState(selectedYear);
28
27
  const [monthAlt, setMonthAlt] = React.useState(month);
@@ -64,7 +64,7 @@
64
64
  opacity: 0.5;
65
65
  }
66
66
 
67
- @media (min-width: 810px) {
67
+ @media (min-width: 745px) {
68
68
  [data-month]:nth-child(2) .dateNextMonth,
69
69
  [data-month]:nth-child(3) .datePastMonth {
70
70
  opacity: 0;
@@ -1,17 +1,18 @@
1
- export default function DatePicker({ stayDates, onSubmit, close, min, max, availabilities, popup, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }: {
2
- stayDates?: any[];
3
- onSubmit: any;
4
- close: any;
5
- min: any;
6
- max: any;
7
- availabilities: any;
8
- popup?: boolean;
9
- singleDate: any;
10
- submitOnSelectionEnd: any;
11
- disableConfirmModal: any;
12
- defaultSelecting: any;
13
- }): import("react/jsx-runtime").JSX.Element;
14
1
  import * as Data from "./data";
15
2
  import * as Utils from "./utils";
16
3
  export { Data, Utils };
4
+ type Props = {
5
+ stayDates?: Date[];
6
+ onSubmit: (dates: Date[]) => void;
7
+ close: () => void;
8
+ min?: string;
9
+ max?: string;
10
+ availabilities?: any;
11
+ popup?: boolean;
12
+ singleDate?: boolean;
13
+ submitOnSelectionEnd?: boolean;
14
+ disableConfirmModal?: boolean;
15
+ defaultSelecting?: boolean;
16
+ };
17
+ export default function DatePicker({ stayDates, onSubmit, close, min, max, availabilities, popup, singleDate, submitOnSelectionEnd, disableConfirmModal, defaultSelecting, }: Props): import("react/jsx-runtime").JSX.Element;
17
18
  //# sourceMappingURL=date-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/date-picker.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;4CAqDC;sBA3DqB,QAAQ;uBACP,SAAS"}
1
+ {"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/date-picker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAGjC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AAEvB,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,GAAG,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,SAAc,EACd,QAAQ,EACR,KAAK,EACL,GAAG,EACH,GAAG,EACH,cAAc,EACd,KAAY,EACZ,UAAU,EACV,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,GACjB,EAAE,KAAK,2CAyCP"}
@@ -1,4 +1,4 @@
1
- export default DatePicker;
2
1
  import DatePicker from "./date-picker";
3
2
  export { Data, Utils } from "./date-picker";
3
+ export default DatePicker;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/index.js"],"names":[],"mappings":";uBAAuB,eAAe"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5C,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.40.12",
3
+ "version": "1.40.14",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",