plataforma-fundacao-componentes 2.23.16 → 2.23.18
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/components/buttonFileUpload/ButtonFileUpload.d.ts +1 -1
- package/dist/components/chip/Chip.d.ts +11 -0
- package/dist/components/chip/Chip.stories.d.ts +10 -0
- package/dist/index.css +4 -5
- package/dist/index.js +15 -22
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +15 -22
- package/dist/index.modern.js.map +1 -1
- package/package.json +13 -13
package/dist/index.modern.js
CHANGED
|
@@ -9335,7 +9335,7 @@ function FileUpload(props) {
|
|
|
9335
9335
|
return React.createElement("div", {
|
|
9336
9336
|
className: rootClassName$2f + "-outer"
|
|
9337
9337
|
}, !props.hideTopLabel && React.createElement("div", {
|
|
9338
|
-
className: getMergedClassNames([rootClassName$2f + "-top-label", props.disabled ? 'disabled' : '', props.error ? 'error' : ''])
|
|
9338
|
+
className: getMergedClassNames([rootClassName$2f + "-top-label", props.disabled ? 'disabled' : '', props.error ? 'error' : '', 'nunito'])
|
|
9339
9339
|
}, props.topLabel), React.createElement("div", {
|
|
9340
9340
|
id: id,
|
|
9341
9341
|
className: getMergedClassNames([rootClassName$2f, props.disabled ? 'disabled' : '', props.error ? 'error' : ''])
|
|
@@ -10653,7 +10653,6 @@ function PreviaVideo(props) {
|
|
|
10653
10653
|
}, props.label), React.createElement(CSSTransition, {
|
|
10654
10654
|
"in": clicou,
|
|
10655
10655
|
timeout: 300,
|
|
10656
|
-
mountOnEnter: true,
|
|
10657
10656
|
unmountOnExit: true,
|
|
10658
10657
|
classNames: 'video',
|
|
10659
10658
|
onExiting: function onExiting() {
|
|
@@ -13291,7 +13290,7 @@ var CalendarChip$1 = memo(CalendarChip);
|
|
|
13291
13290
|
var rootClassName$32 = 'calendar-month-day';
|
|
13292
13291
|
|
|
13293
13292
|
function CalendarMonthDay(props) {
|
|
13294
|
-
var _props$eventos, _props$
|
|
13293
|
+
var _props$eventos, _props$eventos2, _props$eventos3, _props$eventos4, _props$eventos4$slice;
|
|
13295
13294
|
|
|
13296
13295
|
var classNames = useMemo(function () {
|
|
13297
13296
|
return getMergedClassNames([rootClassName$32, props.pocket ? 'pocket' : '', props.isToday ? 'today' : '', props.disabled ? 'disabled' : '', props.highlightWeekends && (props.day.getDay() === 0 || props.day.getDay() === 6) ? 'highlight' : '']);
|
|
@@ -13299,11 +13298,9 @@ function CalendarMonthDay(props) {
|
|
|
13299
13298
|
var date = new Date();
|
|
13300
13299
|
date.setDate(date.getDate() - 1);
|
|
13301
13300
|
return React.createElement("div", {
|
|
13302
|
-
className:
|
|
13301
|
+
className: classNames,
|
|
13303
13302
|
onClick: function onClick(evt) {
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
if (((_props$eventos2 = props.eventos) === null || _props$eventos2 === void 0 ? void 0 : _props$eventos2.length) > 2 && typeof props.onDateClick === 'function') {
|
|
13303
|
+
if (typeof props.onDateClick === 'function') {
|
|
13307
13304
|
props.onDateClick(props.day, evt);
|
|
13308
13305
|
evt.stopPropagation();
|
|
13309
13306
|
}
|
|
@@ -13318,12 +13315,12 @@ function CalendarMonthDay(props) {
|
|
|
13318
13315
|
}
|
|
13319
13316
|
}
|
|
13320
13317
|
}, React.createElement(Notification, {
|
|
13321
|
-
count: props.pocket ? (_props$
|
|
13318
|
+
count: props.pocket ? (_props$eventos = props.eventos) === null || _props$eventos === void 0 ? void 0 : _props$eventos.length : 0,
|
|
13322
13319
|
type: props.disabled ? NotificationType.Disabled : NotificationType.Primary,
|
|
13323
13320
|
verticalOuter: 11,
|
|
13324
13321
|
horizontalOuter: 14
|
|
13325
|
-
}, getTwoNumbersIfNotTen(props.day.getDate()))), React.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$
|
|
13326
|
-
num: ((_props$
|
|
13322
|
+
}, getTwoNumbersIfNotTen(props.day.getDate()))), React.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$eventos2 = props.eventos) === null || _props$eventos2 === void 0 ? void 0 : _props$eventos2.length) > 2 ? React.createElement(CalendarChip$1, {
|
|
13323
|
+
num: ((_props$eventos3 = props.eventos) === null || _props$eventos3 === void 0 ? void 0 : _props$eventos3.length) - 2,
|
|
13327
13324
|
onClick: function onClick(evt) {
|
|
13328
13325
|
if (typeof props.onPlusButtonClick === 'function') {
|
|
13329
13326
|
props.onPlusButtonClick(props.day, evt);
|
|
@@ -13333,7 +13330,7 @@ function CalendarMonthDay(props) {
|
|
|
13333
13330
|
disabled: props.disabled
|
|
13334
13331
|
}) : undefined)), !props.pocket ? React.createElement(Fragment$1, null, React.createElement("div", {
|
|
13335
13332
|
className: rootClassName$32 + "-eventos"
|
|
13336
|
-
}, (_props$
|
|
13333
|
+
}, (_props$eventos4 = props.eventos) === null || _props$eventos4 === void 0 ? void 0 : (_props$eventos4$slice = _props$eventos4.slice(0, 2)) === null || _props$eventos4$slice === void 0 ? void 0 : _props$eventos4$slice.map(function (e) {
|
|
13337
13334
|
return React.createElement(CalendarEvent$1, Object.assign({
|
|
13338
13335
|
key: e.id
|
|
13339
13336
|
}, e, {
|
|
@@ -13467,7 +13464,7 @@ Calendar.defaultProps = {
|
|
|
13467
13464
|
loading: false,
|
|
13468
13465
|
disabledNextMonth: true,
|
|
13469
13466
|
disabledPrevMonth: true,
|
|
13470
|
-
disabledPrevAddButton:
|
|
13467
|
+
disabledPrevAddButton: false,
|
|
13471
13468
|
highlightWeekends: true,
|
|
13472
13469
|
showAddButton: true,
|
|
13473
13470
|
showPlusIcon: true,
|
|
@@ -40495,8 +40492,7 @@ function useModalManager() {
|
|
|
40495
40492
|
document.removeEventListener('keydown', escapeCall);
|
|
40496
40493
|
};
|
|
40497
40494
|
}, []);
|
|
40498
|
-
|
|
40499
|
-
var openModal = function openModal(component, modalProps) {
|
|
40495
|
+
var openModal = useCallback(function (component, modalProps) {
|
|
40500
40496
|
var modalKey = modalProps.modalKey ? modalProps.modalKey : getUniqueKey();
|
|
40501
40497
|
var arr = refModals.current.slice();
|
|
40502
40498
|
|
|
@@ -40518,9 +40514,8 @@ function useModalManager() {
|
|
|
40518
40514
|
setArrayOfModal(arr);
|
|
40519
40515
|
hackFocus$1();
|
|
40520
40516
|
return modalKey;
|
|
40521
|
-
};
|
|
40522
|
-
|
|
40523
|
-
var closeModal = function closeModal(modalKey) {
|
|
40517
|
+
}, []);
|
|
40518
|
+
var closeModal = useCallback(function (modalKey) {
|
|
40524
40519
|
if (modalKey) {
|
|
40525
40520
|
closeModalByKey(modalKey);
|
|
40526
40521
|
} else if (refModals.current.length) {
|
|
@@ -40528,8 +40523,7 @@ function useModalManager() {
|
|
|
40528
40523
|
|
|
40529
40524
|
closeModalByKey((_refModals$current = refModals.current[refModals.current.length - 1]) === null || _refModals$current === void 0 ? void 0 : (_refModals$current$pr = _refModals$current.props) === null || _refModals$current$pr === void 0 ? void 0 : _refModals$current$pr.modalKey);
|
|
40530
40525
|
}
|
|
40531
|
-
};
|
|
40532
|
-
|
|
40526
|
+
}, []);
|
|
40533
40527
|
return [React.createElement(React.Fragment, {
|
|
40534
40528
|
key: 1
|
|
40535
40529
|
}, React.createElement(TransitionGroup, {
|
|
@@ -40602,7 +40596,7 @@ function useToastManager(props) {
|
|
|
40602
40596
|
setArrayOfToast(arr);
|
|
40603
40597
|
};
|
|
40604
40598
|
|
|
40605
|
-
var showToast = function
|
|
40599
|
+
var showToast = useCallback(function (toast) {
|
|
40606
40600
|
var id = "toaster-" + count$1;
|
|
40607
40601
|
var arr = toastsRef.current.slice();
|
|
40608
40602
|
var obj = {};
|
|
@@ -40622,8 +40616,7 @@ function useToastManager(props) {
|
|
|
40622
40616
|
setArrayOfToast(arr);
|
|
40623
40617
|
count$1++;
|
|
40624
40618
|
}
|
|
40625
|
-
};
|
|
40626
|
-
|
|
40619
|
+
}, [max]);
|
|
40627
40620
|
var clearToast = useCallback(function () {
|
|
40628
40621
|
setArrayOfToast([]);
|
|
40629
40622
|
}, []);
|