plataforma-fundacao-componentes 2.23.33 → 2.23.34

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/dist/index.css CHANGED
@@ -4193,17 +4193,19 @@ max-width 100% 540px 720px 960px 1140px
4193
4193
  font-size: 16px;
4194
4194
  color: #323c32;
4195
4195
  -webkit-user-select: none;
4196
- -moz-user-select: none;
4197
- user-select: none; }
4196
+ -moz-user-select: none;
4197
+ user-select: none; }
4198
4198
  .component-date-picker-calendar .header button.month {
4199
4199
  padding: 5px 10px;
4200
4200
  border-radius: 50px;
4201
4201
  -webkit-user-select: none;
4202
- -moz-user-select: none;
4203
- user-select: none;
4202
+ -moz-user-select: none;
4203
+ user-select: none;
4204
4204
  background-color: #fefefe;
4205
4205
  border: none;
4206
4206
  -webkit-appearance: none;
4207
+ -moz-appearance: none;
4208
+ appearance: none;
4207
4209
  outline: none;
4208
4210
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease; }
4209
4211
  .component-date-picker-calendar .header button.month:not(:disabled) {
@@ -4216,12 +4218,14 @@ max-width 100% 540px 720px 960px 1140px
4216
4218
  .component-date-picker-calendar .header button.prev {
4217
4219
  outline: none;
4218
4220
  -webkit-user-select: none;
4219
- -moz-user-select: none;
4220
- user-select: none;
4221
+ -moz-user-select: none;
4222
+ user-select: none;
4221
4223
  display: flex;
4222
4224
  justify-content: center;
4223
4225
  align-items: center;
4224
4226
  -webkit-appearance: none;
4227
+ -moz-appearance: none;
4228
+ appearance: none;
4225
4229
  padding: 8px;
4226
4230
  border: none;
4227
4231
  background-color: #fefefe;
@@ -4241,8 +4245,8 @@ max-width 100% 540px 720px 960px 1140px
4241
4245
  max-width: 16px; }
4242
4246
  .component-date-picker-calendar .week-days {
4243
4247
  -webkit-user-select: none;
4244
- -moz-user-select: none;
4245
- user-select: none;
4248
+ -moz-user-select: none;
4249
+ user-select: none;
4246
4250
  display: flex;
4247
4251
  align-items: center;
4248
4252
  justify-content: center; }
@@ -4257,8 +4261,8 @@ max-width 100% 540px 720px 960px 1140px
4257
4261
  .component-date-picker-calendar .days {
4258
4262
  display: flex;
4259
4263
  -webkit-user-select: none;
4260
- -moz-user-select: none;
4261
- user-select: none;
4264
+ -moz-user-select: none;
4265
+ user-select: none;
4262
4266
  align-items: center;
4263
4267
  justify-content: center;
4264
4268
  max-width: 280px;
package/dist/index.js CHANGED
@@ -8420,33 +8420,18 @@ var DatePickerCalendar$1 = React.memo(DatePickerCalendar);
8420
8420
  var rootClassName$26 = 'component-date-picker';
8421
8421
 
8422
8422
  function DatePicker(props) {
8423
- var _useState = React.useState(getUniqueKey()),
8424
- id = _useState[0];
8423
+ var id = React.useMemo(function () {
8424
+ return "picker_" + getUniqueKey();
8425
+ }, []);
8425
8426
 
8426
- var _useState2 = React.useState(false),
8427
- opened = _useState2[0],
8428
- setOpened = _useState2[1];
8427
+ var _useState = React.useState(false),
8428
+ opened = _useState[0],
8429
+ setOpened = _useState[1];
8429
8430
 
8430
8431
  React.useEffect(function () {
8431
8432
  var func = function func(evt) {
8432
- if (evt.path) {
8433
- if (document.querySelector("#" + id + "." + rootClassName$26 + "-panel." + rootClassName$26 + "-panel-enter-done") && !evt.path.includes(document.querySelector("#" + id))) setOpened(false);
8434
- } else {
8435
- var aux = evt.target;
8436
- var deveFechar = true;
8437
-
8438
- while (aux && aux.id !== 'root') {
8439
- if (aux && aux.id && aux.id === id && aux.classList.contains(rootClassName$26 + "-panel")) {
8440
- deveFechar = false;
8441
- break;
8442
- }
8443
-
8444
- aux = aux.parentElement;
8445
- }
8446
-
8447
- if (deveFechar) {
8448
- setOpened(false);
8449
- }
8433
+ if (document.querySelector("#" + id + "." + rootClassName$26 + "-panel." + rootClassName$26 + "-panel-enter-done") && !evt.composedPath().includes(document.querySelector("#" + id))) {
8434
+ setOpened(false);
8450
8435
  }
8451
8436
  };
8452
8437
 
@@ -8454,6 +8439,7 @@ function DatePicker(props) {
8454
8439
  if (evt.key === 'Escape') {
8455
8440
  setOpened(false);
8456
8441
  evt.preventDefault();
8442
+ evt.stopPropagation();
8457
8443
  }
8458
8444
  };
8459
8445
 
@@ -8471,9 +8457,9 @@ function DatePicker(props) {
8471
8457
  };
8472
8458
  }, [opened]);
8473
8459
 
8474
- var _useState3 = React.useState(null),
8475
- inter = _useState3[0],
8476
- setInter = _useState3[1];
8460
+ var _useState2 = React.useState(null),
8461
+ inter = _useState2[0],
8462
+ setInter = _useState2[1];
8477
8463
 
8478
8464
  var interRef = React.useRef(inter);
8479
8465
  interRef.current = inter;
@@ -8525,9 +8511,9 @@ function DatePicker(props) {
8525
8511
  };
8526
8512
  }, [opened]);
8527
8513
 
8528
- var _useState4 = React.useState(null),
8529
- value = _useState4[0],
8530
- setValue = _useState4[1];
8514
+ var _useState3 = React.useState(null),
8515
+ value = _useState3[0],
8516
+ setValue = _useState3[1];
8531
8517
 
8532
8518
  React.useEffect(function () {
8533
8519
  var vd = function vd() {