@tenancy.nz/datepicker 1.9.0 → 1.9.2

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.
@@ -10,7 +10,7 @@ var InputAdornment = require('@mui/material/InputAdornment');
10
10
  var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
11
11
  var xDatePickers = require('@mui/x-date-pickers');
12
12
  var ui = require('@tenancy.nz/ui');
13
- var CalendarIcon = require('./CalendarIcon.cjs');
13
+ var CalendarOutlinedIcon = require('@tenancy.nz/icons/CalendarOutlined');
14
14
  var DatePicker_styled = require('./DatePicker.styled.cjs');
15
15
 
16
16
  var _excluded = ["color", "disabled", "edges", "errorMessage", "fullWidth", "format", "fromFormat", "helperText", "icon", "label", "name", "required", "showError", "size", "readOnly", "onChange", "toFormat", "value"];
@@ -110,8 +110,10 @@ function DatePicker(_ref) {
110
110
  color: color,
111
111
  onClick: function onClick() {
112
112
  return setOpen(true);
113
- }
114
- }, icon || /* @__PURE__ */React.createElement(CalendarIcon.default, null)))
113
+ },
114
+ disableFocus: true,
115
+ variant: "default"
116
+ }, icon || /* @__PURE__ */React.createElement(CalendarOutlinedIcon, null)))
115
117
  }
116
118
  }
117
119
  }
@@ -6,7 +6,7 @@ import InputAdornment from '@mui/material/InputAdornment';
6
6
  import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
7
7
  import { LocalizationProvider } from '@mui/x-date-pickers';
8
8
  import { FormControl, IconButton } from '@tenancy.nz/ui';
9
- import CalendarIcon from './CalendarIcon.js';
9
+ import CalendarOutlinedIcon from '@tenancy.nz/icons/CalendarOutlined';
10
10
  import StyledDatepicker from './DatePicker.styled.js';
11
11
 
12
12
  var _excluded = ["color", "disabled", "edges", "errorMessage", "fullWidth", "format", "fromFormat", "helperText", "icon", "label", "name", "required", "showError", "size", "readOnly", "onChange", "toFormat", "value"];
@@ -106,8 +106,10 @@ function DatePicker(_ref) {
106
106
  color: color,
107
107
  onClick: function onClick() {
108
108
  return setOpen(true);
109
- }
110
- }, icon || /* @__PURE__ */React.createElement(CalendarIcon, null)))
109
+ },
110
+ disableFocus: true,
111
+ variant: "default"
112
+ }, icon || /* @__PURE__ */React.createElement(CalendarOutlinedIcon, null)))
111
113
  }
112
114
  }
113
115
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tenancy.nz/datepicker",
3
3
  "description": "Datepicker library for TPS UI.",
4
- "version": "1.9.0",
4
+ "version": "1.9.2",
5
5
  "author": "TPS <https://www.tenancy.co.nz>",
6
6
  "type": "module",
7
7
  "main": "dist/cjs/index.cjs",
@@ -18,11 +18,12 @@
18
18
  "dayjs": "^1.11.19",
19
19
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
20
20
  "react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
21
- "@tenancy.nz/icons": "1.9.0",
22
- "@tenancy.nz/ui": "1.9.0"
21
+ "@tenancy.nz/icons": "1.9.2",
22
+ "@tenancy.nz/ui": "1.9.2"
23
23
  },
24
24
  "devDependencies": {
25
- "@tenancy.nz/ui": "1.9.0"
25
+ "@tenancy.nz/ui": "1.9.2",
26
+ "@tenancy.nz/icons": "1.9.2"
26
27
  },
27
28
  "scripts": {
28
29
  "build": "tsx ../../scripts/build.js"
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var React = require('react');
6
-
7
- function CalendarIcon() {
8
- return /* @__PURE__ */React.createElement("svg", {
9
- xmlns: "http://www.w3.org/2000/svg",
10
- width: "23",
11
- height: "22",
12
- viewBox: "0 0 23 22",
13
- fill: "none"
14
- }, /* @__PURE__ */React.createElement("path", {
15
- d: "M15.9096 17.4648H17.4216C17.8632 17.4648 18.2208 17.1072 18.2208 16.6656C18.2208 16.224 17.8632 15.8664 17.4216 15.8664H15.9096C15.468 15.8664 15.1104 16.224 15.1104 16.6656C15.1104 17.1072 15.468 17.4648 15.9096 17.4648ZM15.9096 13.6848H17.4216C17.8632 13.6848 18.2208 13.3272 18.2208 12.8856C18.2208 12.444 17.8632 12.0864 17.4216 12.0864H15.9096C15.468 12.0864 15.1104 12.444 15.1104 12.8856C15.1104 13.3272 15.468 13.6848 15.9096 13.6848ZM10.62 13.6848H12.132C12.5736 13.6848 12.9312 13.3272 12.9312 12.8856C12.9312 12.444 12.5736 12.0864 12.132 12.0864H10.62C10.1784 12.0864 9.8208 12.444 9.8208 12.8856C9.8208 13.3272 10.1784 13.6848 10.62 13.6848ZM5.3328 17.4648H6.8424C7.284 17.4648 7.6416 17.1072 7.6416 16.6656C7.6416 16.224 7.284 15.8664 6.8424 15.8664H5.3328C4.8912 15.8664 4.5336 16.224 4.5336 16.6656C4.5336 17.1072 4.8912 17.4648 5.3328 17.4648ZM22.752 9.108C22.752 9.0624 22.7328 9.024 22.7256 8.9808C22.4928 5.628 19.968 2.904 16.7064 2.3688V0.7992C16.7064 0.3576 16.3488 0 15.9072 0C15.4656 0 15.108 0.3576 15.108 0.7992V2.2656H7.6416V0.7992C7.6416 0.3576 7.284 0 6.8424 0C6.4008 0 6.0432 0.3576 6.0432 0.7992V2.3712C2.784 2.9064 0.2568 5.6304 0.0264 8.9832C0.0192 9.0264 0 9.0648 0 9.1104C0 9.1368 0.012 9.1608 0.0144 9.1848C0.00960001 9.2856 0 9.384 0 9.4848V14.0232C0 18.0024 3.24 21.2424 7.2192 21.2424H15.5328C19.512 21.2424 22.752 18.0024 22.752 14.0232V9.4848C22.752 9.384 22.74 9.2856 22.7376 9.1848C22.74 9.1584 22.752 9.1368 22.752 9.108ZM6.0432 3.9936V5.3328C6.0432 5.7744 6.4008 6.132 6.8424 6.132C7.284 6.132 7.6416 5.7744 7.6416 5.3328V3.8664H15.108V5.3328C15.108 5.7744 15.4656 6.132 15.9072 6.132C16.3488 6.132 16.7064 5.7744 16.7064 5.3328V3.9936C18.8616 4.4544 20.5632 6.1536 21.024 8.3112H1.728C2.1888 6.1536 3.888 4.4544 6.0432 3.9936ZM21.1536 14.0232C21.1536 17.1216 18.6312 19.644 15.5328 19.644H7.2192C4.1208 19.6416 1.5984 17.1216 1.5984 14.0232V9.9096H21.1536V14.0232ZM10.62 17.4648H12.132C12.5736 17.4648 12.9312 17.1072 12.9312 16.6656C12.9312 16.224 12.5736 15.8664 12.132 15.8664H10.62C10.1784 15.8664 9.8208 16.224 9.8208 16.6656C9.8208 17.1072 10.1784 17.4648 10.62 17.4648ZM5.3328 13.6848H6.8424C7.284 13.6848 7.6416 13.3272 7.6416 12.8856C7.6416 12.444 7.284 12.0864 6.8424 12.0864H5.3328C4.8912 12.0864 4.5336 12.444 4.5336 12.8856C4.5336 13.3272 4.8912 13.6848 5.3328 13.6848Z"
16
- }));
17
- }
18
-
19
- exports.default = CalendarIcon;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
-
3
- function CalendarIcon() {
4
- return /* @__PURE__ */React.createElement("svg", {
5
- xmlns: "http://www.w3.org/2000/svg",
6
- width: "23",
7
- height: "22",
8
- viewBox: "0 0 23 22",
9
- fill: "none"
10
- }, /* @__PURE__ */React.createElement("path", {
11
- d: "M15.9096 17.4648H17.4216C17.8632 17.4648 18.2208 17.1072 18.2208 16.6656C18.2208 16.224 17.8632 15.8664 17.4216 15.8664H15.9096C15.468 15.8664 15.1104 16.224 15.1104 16.6656C15.1104 17.1072 15.468 17.4648 15.9096 17.4648ZM15.9096 13.6848H17.4216C17.8632 13.6848 18.2208 13.3272 18.2208 12.8856C18.2208 12.444 17.8632 12.0864 17.4216 12.0864H15.9096C15.468 12.0864 15.1104 12.444 15.1104 12.8856C15.1104 13.3272 15.468 13.6848 15.9096 13.6848ZM10.62 13.6848H12.132C12.5736 13.6848 12.9312 13.3272 12.9312 12.8856C12.9312 12.444 12.5736 12.0864 12.132 12.0864H10.62C10.1784 12.0864 9.8208 12.444 9.8208 12.8856C9.8208 13.3272 10.1784 13.6848 10.62 13.6848ZM5.3328 17.4648H6.8424C7.284 17.4648 7.6416 17.1072 7.6416 16.6656C7.6416 16.224 7.284 15.8664 6.8424 15.8664H5.3328C4.8912 15.8664 4.5336 16.224 4.5336 16.6656C4.5336 17.1072 4.8912 17.4648 5.3328 17.4648ZM22.752 9.108C22.752 9.0624 22.7328 9.024 22.7256 8.9808C22.4928 5.628 19.968 2.904 16.7064 2.3688V0.7992C16.7064 0.3576 16.3488 0 15.9072 0C15.4656 0 15.108 0.3576 15.108 0.7992V2.2656H7.6416V0.7992C7.6416 0.3576 7.284 0 6.8424 0C6.4008 0 6.0432 0.3576 6.0432 0.7992V2.3712C2.784 2.9064 0.2568 5.6304 0.0264 8.9832C0.0192 9.0264 0 9.0648 0 9.1104C0 9.1368 0.012 9.1608 0.0144 9.1848C0.00960001 9.2856 0 9.384 0 9.4848V14.0232C0 18.0024 3.24 21.2424 7.2192 21.2424H15.5328C19.512 21.2424 22.752 18.0024 22.752 14.0232V9.4848C22.752 9.384 22.74 9.2856 22.7376 9.1848C22.74 9.1584 22.752 9.1368 22.752 9.108ZM6.0432 3.9936V5.3328C6.0432 5.7744 6.4008 6.132 6.8424 6.132C7.284 6.132 7.6416 5.7744 7.6416 5.3328V3.8664H15.108V5.3328C15.108 5.7744 15.4656 6.132 15.9072 6.132C16.3488 6.132 16.7064 5.7744 16.7064 5.3328V3.9936C18.8616 4.4544 20.5632 6.1536 21.024 8.3112H1.728C2.1888 6.1536 3.888 4.4544 6.0432 3.9936ZM21.1536 14.0232C21.1536 17.1216 18.6312 19.644 15.5328 19.644H7.2192C4.1208 19.6416 1.5984 17.1216 1.5984 14.0232V9.9096H21.1536V14.0232ZM10.62 17.4648H12.132C12.5736 17.4648 12.9312 17.1072 12.9312 16.6656C12.9312 16.224 12.5736 15.8664 12.132 15.8664H10.62C10.1784 15.8664 9.8208 16.224 9.8208 16.6656C9.8208 17.1072 10.1784 17.4648 10.62 17.4648ZM5.3328 13.6848H6.8424C7.284 13.6848 7.6416 13.3272 7.6416 12.8856C7.6416 12.444 7.284 12.0864 6.8424 12.0864H5.3328C4.8912 12.0864 4.5336 12.444 4.5336 12.8856C4.5336 13.3272 4.8912 13.6848 5.3328 13.6848Z"
12
- }));
13
- }
14
-
15
- export { CalendarIcon as default };