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
|
@@ -10,7 +10,7 @@ export interface ButtonFileUploadProps {
|
|
|
10
10
|
allowedFileTypes?: Array<BlobFileTypes>;
|
|
11
11
|
multiple?: boolean;
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
value
|
|
13
|
+
value?: null | object | object[] | Blob | Blob[] | File | File[];
|
|
14
14
|
onChange: (value: File | File[] | Blob | Blob[] | object | object[]) => void;
|
|
15
15
|
onTypeNotAllowed?: () => void;
|
|
16
16
|
buttonProps?: ButtonProps | object;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Chip.scss';
|
|
3
|
+
export interface ChipProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
w100?: boolean;
|
|
6
|
+
allClickable?: boolean;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function Chip(props: ChipProps): JSX.Element;
|
|
10
|
+
declare const _default: React.MemoExoticComponent<typeof Chip>;
|
|
11
|
+
export default _default;
|
package/dist/index.css
CHANGED
|
@@ -7351,8 +7351,8 @@ header.component-header {
|
|
|
7351
7351
|
justify-content: flex-end;
|
|
7352
7352
|
padding: 24px;
|
|
7353
7353
|
-webkit-user-select: none;
|
|
7354
|
-
|
|
7355
|
-
|
|
7354
|
+
-moz-user-select: none;
|
|
7355
|
+
user-select: none;
|
|
7356
7356
|
background-color: black;
|
|
7357
7357
|
transition: min-height 0.3s ease, height 0.3s ease; }
|
|
7358
7358
|
.previa-video:hover .previa-video-img {
|
|
@@ -7394,8 +7394,7 @@ header.component-header {
|
|
|
7394
7394
|
top: 0;
|
|
7395
7395
|
left: 0;
|
|
7396
7396
|
position: absolute;
|
|
7397
|
-
display: flex;
|
|
7398
|
-
opacity: 0; }
|
|
7397
|
+
display: flex; }
|
|
7399
7398
|
.previa-video .previa-video-video iframe {
|
|
7400
7399
|
width: 100%;
|
|
7401
7400
|
height: 100%; }
|
|
@@ -9882,7 +9881,7 @@ nav.component-tabs {
|
|
|
9882
9881
|
box-shadow: 0 0 0 2px inset #d7e6c8; }
|
|
9883
9882
|
.calendar-month-day.today.disabled .calendar-month-day-day {
|
|
9884
9883
|
opacity: 0.4; }
|
|
9885
|
-
.calendar-month-day
|
|
9884
|
+
.calendar-month-day:hover {
|
|
9886
9885
|
cursor: pointer; }
|
|
9887
9886
|
|
|
9888
9887
|
.calendar-month-day:not(.pocket) {
|
package/dist/index.js
CHANGED
|
@@ -9315,7 +9315,7 @@ function FileUpload(props) {
|
|
|
9315
9315
|
return React__default.createElement("div", {
|
|
9316
9316
|
className: rootClassName$2f + "-outer"
|
|
9317
9317
|
}, !props.hideTopLabel && React__default.createElement("div", {
|
|
9318
|
-
className: getMergedClassNames([rootClassName$2f + "-top-label", props.disabled ? 'disabled' : '', props.error ? 'error' : ''])
|
|
9318
|
+
className: getMergedClassNames([rootClassName$2f + "-top-label", props.disabled ? 'disabled' : '', props.error ? 'error' : '', 'nunito'])
|
|
9319
9319
|
}, props.topLabel), React__default.createElement("div", {
|
|
9320
9320
|
id: id,
|
|
9321
9321
|
className: getMergedClassNames([rootClassName$2f, props.disabled ? 'disabled' : '', props.error ? 'error' : ''])
|
|
@@ -10631,7 +10631,6 @@ function PreviaVideo(props) {
|
|
|
10631
10631
|
}, props.label), React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
10632
10632
|
"in": clicou,
|
|
10633
10633
|
timeout: 300,
|
|
10634
|
-
mountOnEnter: true,
|
|
10635
10634
|
unmountOnExit: true,
|
|
10636
10635
|
classNames: 'video',
|
|
10637
10636
|
onExiting: function onExiting() {
|
|
@@ -13265,7 +13264,7 @@ var CalendarChip$1 = React.memo(CalendarChip);
|
|
|
13265
13264
|
var rootClassName$32 = 'calendar-month-day';
|
|
13266
13265
|
|
|
13267
13266
|
function CalendarMonthDay(props) {
|
|
13268
|
-
var _props$eventos, _props$
|
|
13267
|
+
var _props$eventos, _props$eventos2, _props$eventos3, _props$eventos4, _props$eventos4$slice;
|
|
13269
13268
|
|
|
13270
13269
|
var classNames = React.useMemo(function () {
|
|
13271
13270
|
return getMergedClassNames([rootClassName$32, props.pocket ? 'pocket' : '', props.isToday ? 'today' : '', props.disabled ? 'disabled' : '', props.highlightWeekends && (props.day.getDay() === 0 || props.day.getDay() === 6) ? 'highlight' : '']);
|
|
@@ -13273,11 +13272,9 @@ function CalendarMonthDay(props) {
|
|
|
13273
13272
|
var date = new Date();
|
|
13274
13273
|
date.setDate(date.getDate() - 1);
|
|
13275
13274
|
return React__default.createElement("div", {
|
|
13276
|
-
className:
|
|
13275
|
+
className: classNames,
|
|
13277
13276
|
onClick: function onClick(evt) {
|
|
13278
|
-
|
|
13279
|
-
|
|
13280
|
-
if (((_props$eventos2 = props.eventos) === null || _props$eventos2 === void 0 ? void 0 : _props$eventos2.length) > 2 && typeof props.onDateClick === 'function') {
|
|
13277
|
+
if (typeof props.onDateClick === 'function') {
|
|
13281
13278
|
props.onDateClick(props.day, evt);
|
|
13282
13279
|
evt.stopPropagation();
|
|
13283
13280
|
}
|
|
@@ -13292,12 +13289,12 @@ function CalendarMonthDay(props) {
|
|
|
13292
13289
|
}
|
|
13293
13290
|
}
|
|
13294
13291
|
}, React__default.createElement(Notification, {
|
|
13295
|
-
count: props.pocket ? (_props$
|
|
13292
|
+
count: props.pocket ? (_props$eventos = props.eventos) === null || _props$eventos === void 0 ? void 0 : _props$eventos.length : 0,
|
|
13296
13293
|
type: props.disabled ? exports.NotificationType.Disabled : exports.NotificationType.Primary,
|
|
13297
13294
|
verticalOuter: 11,
|
|
13298
13295
|
horizontalOuter: 14
|
|
13299
|
-
}, getTwoNumbersIfNotTen(props.day.getDate()))), React__default.createElement("div", null, !props.pocket && props.showPlusIcon && Boolean(props.eventos) && ((_props$
|
|
13300
|
-
num: ((_props$
|
|
13296
|
+
}, getTwoNumbersIfNotTen(props.day.getDate()))), React__default.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__default.createElement(CalendarChip$1, {
|
|
13297
|
+
num: ((_props$eventos3 = props.eventos) === null || _props$eventos3 === void 0 ? void 0 : _props$eventos3.length) - 2,
|
|
13301
13298
|
onClick: function onClick(evt) {
|
|
13302
13299
|
if (typeof props.onPlusButtonClick === 'function') {
|
|
13303
13300
|
props.onPlusButtonClick(props.day, evt);
|
|
@@ -13307,7 +13304,7 @@ function CalendarMonthDay(props) {
|
|
|
13307
13304
|
disabled: props.disabled
|
|
13308
13305
|
}) : undefined)), !props.pocket ? React__default.createElement(React.Fragment, null, React__default.createElement("div", {
|
|
13309
13306
|
className: rootClassName$32 + "-eventos"
|
|
13310
|
-
}, (_props$
|
|
13307
|
+
}, (_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) {
|
|
13311
13308
|
return React__default.createElement(CalendarEvent$1, Object.assign({
|
|
13312
13309
|
key: e.id
|
|
13313
13310
|
}, e, {
|
|
@@ -13441,7 +13438,7 @@ Calendar.defaultProps = {
|
|
|
13441
13438
|
loading: false,
|
|
13442
13439
|
disabledNextMonth: true,
|
|
13443
13440
|
disabledPrevMonth: true,
|
|
13444
|
-
disabledPrevAddButton:
|
|
13441
|
+
disabledPrevAddButton: false,
|
|
13445
13442
|
highlightWeekends: true,
|
|
13446
13443
|
showAddButton: true,
|
|
13447
13444
|
showPlusIcon: true,
|
|
@@ -40469,8 +40466,7 @@ function useModalManager() {
|
|
|
40469
40466
|
document.removeEventListener('keydown', escapeCall);
|
|
40470
40467
|
};
|
|
40471
40468
|
}, []);
|
|
40472
|
-
|
|
40473
|
-
var openModal = function openModal(component, modalProps) {
|
|
40469
|
+
var openModal = React.useCallback(function (component, modalProps) {
|
|
40474
40470
|
var modalKey = modalProps.modalKey ? modalProps.modalKey : getUniqueKey();
|
|
40475
40471
|
var arr = refModals.current.slice();
|
|
40476
40472
|
|
|
@@ -40492,9 +40488,8 @@ function useModalManager() {
|
|
|
40492
40488
|
setArrayOfModal(arr);
|
|
40493
40489
|
hackFocus$1();
|
|
40494
40490
|
return modalKey;
|
|
40495
|
-
};
|
|
40496
|
-
|
|
40497
|
-
var closeModal = function closeModal(modalKey) {
|
|
40491
|
+
}, []);
|
|
40492
|
+
var closeModal = React.useCallback(function (modalKey) {
|
|
40498
40493
|
if (modalKey) {
|
|
40499
40494
|
closeModalByKey(modalKey);
|
|
40500
40495
|
} else if (refModals.current.length) {
|
|
@@ -40502,8 +40497,7 @@ function useModalManager() {
|
|
|
40502
40497
|
|
|
40503
40498
|
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);
|
|
40504
40499
|
}
|
|
40505
|
-
};
|
|
40506
|
-
|
|
40500
|
+
}, []);
|
|
40507
40501
|
return [React__default.createElement(React__default.Fragment, {
|
|
40508
40502
|
key: 1
|
|
40509
40503
|
}, React__default.createElement(reactTransitionGroup.TransitionGroup, {
|
|
@@ -40576,7 +40570,7 @@ function useToastManager(props) {
|
|
|
40576
40570
|
setArrayOfToast(arr);
|
|
40577
40571
|
};
|
|
40578
40572
|
|
|
40579
|
-
var showToast = function
|
|
40573
|
+
var showToast = React.useCallback(function (toast) {
|
|
40580
40574
|
var id = "toaster-" + count$1;
|
|
40581
40575
|
var arr = toastsRef.current.slice();
|
|
40582
40576
|
var obj = {};
|
|
@@ -40596,8 +40590,7 @@ function useToastManager(props) {
|
|
|
40596
40590
|
setArrayOfToast(arr);
|
|
40597
40591
|
count$1++;
|
|
40598
40592
|
}
|
|
40599
|
-
};
|
|
40600
|
-
|
|
40593
|
+
}, [max]);
|
|
40601
40594
|
var clearToast = React.useCallback(function () {
|
|
40602
40595
|
setArrayOfToast([]);
|
|
40603
40596
|
}, []);
|