@astral/ui 0.32.1 → 0.32.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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { TextFieldProps } from '../TextField';
4
- export declare type Props = Omit<ReactDatePickerProps, 'renderCustomHeader' | 'locale' | 'renderCustomHeader' | 'renderDayContents' | 'customInput' | 'selected' | 'value' | 'placeholderText'> & {
4
+ export declare type DatePickerProps = Omit<ReactDatePickerProps, 'renderCustomHeader' | 'locale' | 'renderCustomHeader' | 'renderDayContents' | 'customInput' | 'selected' | 'value' | 'placeholderText'> & {
5
5
  inputProps?: TextFieldProps;
6
6
  value?: Date;
7
7
  };
@@ -65,7 +65,8 @@ exports.DatePicker = (0, react_1.forwardRef)(function (props, ref) {
65
65
  }, inputRef: function (el) {
66
66
  // если передан ref - пишем в ref.current элемент из MaskField (inputRef принимает только функцию)
67
67
  if (ref) {
68
- ref.current = el;
68
+ ref.current =
69
+ el;
69
70
  }
70
71
  } }), void 0) }), void 0) }, void 0));
71
72
  });
@@ -6,7 +6,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.DatePickerWrapper = void 0;
8
8
  var styles_1 = require("../styles");
9
- exports.DatePickerWrapper = styles_1.styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"], ["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"])), function (_a) {
9
+ exports.DatePickerWrapper = styles_1.styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n &-popper {\n z-index: ", ";\n }\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"], ["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n &-popper {\n z-index: ", ";\n }\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"])), function (_a) {
10
10
  var theme = _a.theme;
11
11
  return theme.spacing(2);
12
12
  }, function (_a) {
@@ -21,6 +21,9 @@ exports.DatePickerWrapper = styles_1.styled.div(templateObject_1 || (templateObj
21
21
  }, function (_a) {
22
22
  var theme = _a.theme;
23
23
  return theme.elevation[200];
24
+ }, function (_a) {
25
+ var theme = _a.theme;
26
+ return theme.zIndex.drawer;
24
27
  }, function (_a) {
25
28
  var theme = _a.theme;
26
29
  return theme.typography.fontWeightRegular;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ReactDatePickerProps } from 'react-datepicker';
3
3
  import { TextFieldProps } from '../TextField';
4
- export declare type Props = Omit<ReactDatePickerProps, 'renderCustomHeader' | 'locale' | 'renderCustomHeader' | 'renderDayContents' | 'customInput' | 'selected' | 'value' | 'placeholderText'> & {
4
+ export declare type DatePickerProps = Omit<ReactDatePickerProps, 'renderCustomHeader' | 'locale' | 'renderCustomHeader' | 'renderDayContents' | 'customInput' | 'selected' | 'value' | 'placeholderText'> & {
5
5
  inputProps?: TextFieldProps;
6
6
  value?: Date;
7
7
  };
@@ -59,7 +59,8 @@ export var DatePicker = forwardRef(function (props, ref) {
59
59
  }, inputRef: function (el) {
60
60
  // если передан ref - пишем в ref.current элемент из MaskField (inputRef принимает только функцию)
61
61
  if (ref) {
62
- ref.current = el;
62
+ ref.current =
63
+ el;
63
64
  }
64
65
  } }), void 0) }), void 0) }, void 0));
65
66
  });
@@ -3,7 +3,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { styled } from '../styles';
6
- export var DatePickerWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"], ["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"])), function (_a) {
6
+ export var DatePickerWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n &-popper {\n z-index: ", ";\n }\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"], ["\n .react-datepicker {\n min-width: 320px;\n min-height: 300px;\n margin-top: ", ";\n padding: ", ";\n\n background-color: ", ";\n border-radius: ", ";\n box-shadow: ", ";\n\n &-popper {\n z-index: ", ";\n }\n\n & .react-datepicker__day-names,\n .react-datepicker__week {\n display: flex;\n justify-content: space-between;\n width: 287px;\n }\n\n & .react-datepicker__day {\n & > button {\n font-weight: ", ";\n }\n\n &--outside-month > button {\n color: ", ";\n }\n\n &--disabled > button {\n color: ", ";\n font-weight: ", ";\n\n cursor: default;\n }\n\n &--selected > button {\n color: ", ";\n\n background-color: ", ";\n }\n\n &--today > button {\n position: relative;\n\n font-weight: ", ";\n }\n\n &--disabled > button:focus {\n outline: none;\n }\n\n &--disabled:not(.react-datepicker__day--selected) > button:hover,\n &--disabled:not(.react-datepicker__day--selected) > button:active {\n background-color: transparent;\n }\n\n &--disabled:focus-visible {\n outline: none;\n }\n\n &--today > button::before {\n position: absolute;\n bottom: ", ";\n\n width: 33px;\n height: 2px;\n\n background-color: ", ";\n\n content: '';\n }\n\n &--today > .react-datepicker__day--selected > button::before {\n background-color: ", ";\n }\n\n &-name {\n width: 41px;\n margin-top: ", ";\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n text-align: center;\n text-transform: uppercase;\n }\n }\n }\n"])), function (_a) {
7
7
  var theme = _a.theme;
8
8
  return theme.spacing(2);
9
9
  }, function (_a) {
@@ -18,6 +18,9 @@ export var DatePickerWrapper = styled.div(templateObject_1 || (templateObject_1
18
18
  }, function (_a) {
19
19
  var theme = _a.theme;
20
20
  return theme.elevation[200];
21
+ }, function (_a) {
22
+ var theme = _a.theme;
23
+ return theme.zIndex.drawer;
21
24
  }, function (_a) {
22
25
  var theme = _a.theme;
23
26
  return theme.typography.fontWeightRegular;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "browser": "./src/index.ts",
5
5
  "jest": {
6
6
  "moduleNameMapper": {
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@astral/icons": "^0.32.1",
11
+ "@astral/icons": "^0.32.2",
12
12
  "@emotion/cache": "11.7.1",
13
13
  "@emotion/react": "11.8.1",
14
14
  "@emotion/server": "11.4.0",