plataforma-fundacao-componentes 2.26.10 → 2.26.11
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/verticalSlider/verticalSlider.d.ts +20 -0
- package/dist/components/verticalSlider/verticalSlider.stories.d.ts +9 -0
- package/dist/hooks/useHTMLShare/useHTMLShare.d.ts +1 -1
- package/dist/index.css +106 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +157 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +157 -20
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
|
+
import './verticalSlider.scss';
|
|
3
|
+
export interface VerticalSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'value' | 'onChange'> {
|
|
4
|
+
/**
|
|
5
|
+
* Ordem: 1º elemento é o mais de baixo, geralmente o nulo...
|
|
6
|
+
*
|
|
7
|
+
* Consequentemente o último elemento é o mais de cima.
|
|
8
|
+
*
|
|
9
|
+
* Deve-se colocar valor === null para ter o efeito de "desligar"
|
|
10
|
+
*/
|
|
11
|
+
options: {
|
|
12
|
+
value: string | null;
|
|
13
|
+
label: string;
|
|
14
|
+
}[];
|
|
15
|
+
onChange: (value: string | null, index: number) => void;
|
|
16
|
+
value?: string | null;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const VerticalSlider: React.ForwardRefExoticComponent<VerticalSliderProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
export default VerticalSlider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import React, { ComponentProps } from 'react';
|
|
3
|
+
import VerticalSlider from './verticalSlider';
|
|
4
|
+
declare const meta: Meta<typeof VerticalSlider>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const FirstExample: {
|
|
7
|
+
(args: ComponentProps<typeof VerticalSlider>): React.JSX.Element;
|
|
8
|
+
args: import("./verticalSlider").VerticalSliderProps & React.RefAttributes<HTMLDivElement>;
|
|
9
|
+
};
|
package/dist/index.css
CHANGED
|
@@ -9028,3 +9028,109 @@ h6.tp {
|
|
|
9028
9028
|
h6.tp {
|
|
9029
9029
|
font-size: 14px;
|
|
9030
9030
|
line-height: 16px; } }
|
|
9031
|
+
|
|
9032
|
+
:export {
|
|
9033
|
+
white: #fefefe;
|
|
9034
|
+
darkenWhite: #efefef;
|
|
9035
|
+
black: #121212;
|
|
9036
|
+
transparent: rgba(0, 0, 0, 0);
|
|
9037
|
+
primary: #3fa110;
|
|
9038
|
+
primaryDark: #33820d;
|
|
9039
|
+
primaryLight: #d7e6c8;
|
|
9040
|
+
secondaryDarker: #323c32;
|
|
9041
|
+
secondaryDark: #5a645a;
|
|
9042
|
+
blueDarker: #2b517b;
|
|
9043
|
+
secondary: #828a82;
|
|
9044
|
+
secondaryLight: #cdd3cd;
|
|
9045
|
+
secondaryLighter: #f8f9f7;
|
|
9046
|
+
danger: #e60000;
|
|
9047
|
+
dangerLight: #ffb4b4;
|
|
9048
|
+
dangerDark: #ab4745;
|
|
9049
|
+
warning: #ffcd00;
|
|
9050
|
+
warningLight: #ffeb98;
|
|
9051
|
+
warningDark: #765f00; }
|
|
9052
|
+
|
|
9053
|
+
:export {
|
|
9054
|
+
widthXs: 575.98px;
|
|
9055
|
+
widthSm: 767.98px;
|
|
9056
|
+
widthMd: 991.98px;
|
|
9057
|
+
widthLg: 1199.98px; }
|
|
9058
|
+
|
|
9059
|
+
.v-slider {
|
|
9060
|
+
-webkit-user-select: none;
|
|
9061
|
+
-moz-user-select: none;
|
|
9062
|
+
user-select: none;
|
|
9063
|
+
display: flex;
|
|
9064
|
+
width: 100%;
|
|
9065
|
+
height: auto;
|
|
9066
|
+
gap: 16px;
|
|
9067
|
+
padding: 4px; }
|
|
9068
|
+
.v-slider[aria-disabled='true'] {
|
|
9069
|
+
cursor: not-allowed !important; }
|
|
9070
|
+
.v-slider[aria-disabled='true'] .v-slider-thumb {
|
|
9071
|
+
cursor: not-allowed !important;
|
|
9072
|
+
background-color: #5a645a !important; }
|
|
9073
|
+
.v-slider[aria-disabled='true'] .v-slider-track {
|
|
9074
|
+
background-color: #cdd3cd !important; }
|
|
9075
|
+
.v-slider[aria-disabled='true'] .v-slider-fill {
|
|
9076
|
+
background-color: #828a82 !important; }
|
|
9077
|
+
.v-slider[aria-disabled='true'] .v-slider-option {
|
|
9078
|
+
cursor: not-allowed !important; }
|
|
9079
|
+
.v-slider .v-slider-input {
|
|
9080
|
+
display: flex; }
|
|
9081
|
+
.v-slider .v-slider-input .v-slider-track {
|
|
9082
|
+
transition: background-color 0.3s ease;
|
|
9083
|
+
position: relative;
|
|
9084
|
+
height: 100%;
|
|
9085
|
+
width: 24px;
|
|
9086
|
+
display: flex;
|
|
9087
|
+
flex-flow: column nowrap;
|
|
9088
|
+
align-items: center;
|
|
9089
|
+
justify-content: flex-end;
|
|
9090
|
+
background-color: #d9d9d9;
|
|
9091
|
+
border-radius: 50px;
|
|
9092
|
+
box-shadow: inset 0 1px 2px 0 rgba(90, 100, 90, 0.3);
|
|
9093
|
+
overflow: hidden; }
|
|
9094
|
+
.v-slider .v-slider-input .v-slider-track .v-slider-fill {
|
|
9095
|
+
width: 100%;
|
|
9096
|
+
height: 70px;
|
|
9097
|
+
border-top-left-radius: 24px;
|
|
9098
|
+
border-top-right-radius: 24px;
|
|
9099
|
+
background-color: #33820d;
|
|
9100
|
+
transition: background-color 0.3s ease, height 0.3s ease, box-shadow 0.3s ease;
|
|
9101
|
+
box-shadow: inset 0 0px 2px 0 rgba(40, 50, 40, 0.6); }
|
|
9102
|
+
.v-slider .v-slider-input .v-slider-track .v-slider-fill[data-checked='false'] {
|
|
9103
|
+
background-color: #d9d9d9;
|
|
9104
|
+
box-shadow: inset 0 2px 2px 0 rgba(40, 50, 40, 0); }
|
|
9105
|
+
.v-slider .v-slider-input .v-slider-track .v-slider-fill.grabbing {
|
|
9106
|
+
background-color: #d7e6c8 !important;
|
|
9107
|
+
box-shadow: inset 0 0 2px 0 rgba(40, 50, 40, 0.3); }
|
|
9108
|
+
.v-slider .v-slider-input .v-slider-track .v-slider-thumb {
|
|
9109
|
+
cursor: grab;
|
|
9110
|
+
width: 20px;
|
|
9111
|
+
height: 20px;
|
|
9112
|
+
margin: 2px;
|
|
9113
|
+
background-color: #fefefe;
|
|
9114
|
+
border-radius: 20px;
|
|
9115
|
+
box-shadow: 0 1px 2px 0 rgba(90, 100, 90, 0.3);
|
|
9116
|
+
transition: background-color 0.3s ease;
|
|
9117
|
+
touch-action: none; }
|
|
9118
|
+
.v-slider .v-slider-input .v-slider-track .v-slider-thumb:active {
|
|
9119
|
+
cursor: grabbing; }
|
|
9120
|
+
.v-slider .v-slider-options {
|
|
9121
|
+
display: flex;
|
|
9122
|
+
flex-flow: column-reverse nowrap;
|
|
9123
|
+
flex: 1 0 auto;
|
|
9124
|
+
gap: 16px; }
|
|
9125
|
+
.v-slider .v-slider-options .v-slider-option {
|
|
9126
|
+
position: relative;
|
|
9127
|
+
cursor: pointer;
|
|
9128
|
+
height: 24px;
|
|
9129
|
+
font-family: "Nunito", sans-serif;
|
|
9130
|
+
font-size: 16px;
|
|
9131
|
+
font-weight: 300;
|
|
9132
|
+
line-height: 24px;
|
|
9133
|
+
text-align: left;
|
|
9134
|
+
color: #323c32; }
|
|
9135
|
+
.v-slider .v-slider-options .v-slider-option[data-checked='true'] {
|
|
9136
|
+
font-weight: 500; }
|
package/dist/index.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ import ScrollArrowOverflow from './components/scrollArrowOverflow/ScrollArrowOve
|
|
|
188
188
|
import { LeftControlWithLabel } from './components/table/components/leftControlWithLabel/LeftControlWithLabel';
|
|
189
189
|
import TooltipElement from './components/tooltipElement/TooltipElement';
|
|
190
190
|
import Typography from './components/typography/Typography';
|
|
191
|
+
import VerticalSlider from './components/verticalSlider/verticalSlider';
|
|
191
192
|
import VideoPlayer from './components/videoPlayer/VideoPlayer';
|
|
192
193
|
import useCallbackedState from './hooks/useCallbackedState/useCallbackedState';
|
|
193
194
|
import useCarouselBehaviour from './hooks/useCarouselBehaviour/useCarouselBehaviour';
|
|
@@ -236,10 +237,10 @@ export { Accordion, ActionCard, ActionsColumn, AnimatedLink, Banner, BigBlockBut
|
|
|
236
237
|
/**
|
|
237
238
|
* @deprecated Use LeftControlWithLabel instead
|
|
238
239
|
*/
|
|
239
|
-
LeftControlWithLabel as LeftCheckboxWithLabel, LeftControlWithLabel, Menu, MenuItem, Modal, ModalManager, MoneyByMonth, MoneyMonthLineChart, Notification, NotificationPanel, PageSubTitle, PageTitle, Pagination, Paginator, PreviaVideo, QRCode, RadioButton, Row, ScrollArrowOverflow, Search, Select, Switch, Table, TableActions, TableFileNameAndAction, TableWithOverflow, Tabs, TextEditor, Title, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, TypedTable, VideoModal, VideoPlayer, };
|
|
240
|
+
LeftControlWithLabel as LeftCheckboxWithLabel, LeftControlWithLabel, Menu, MenuItem, Modal, ModalManager, MoneyByMonth, MoneyMonthLineChart, Notification, NotificationPanel, PageSubTitle, PageTitle, Pagination, Paginator, PreviaVideo, QRCode, RadioButton, Row, ScrollArrowOverflow, Search, Select, Switch, Table, TableActions, TableFileNameAndAction, TableWithOverflow, Tabs, TextEditor, Title, Toast, ToastManager, Tooltip, TooltipManager, TopLoader, TypedTable, VerticalSlider, VideoModal, VideoPlayer, };
|
|
240
241
|
export { useCallbackedState, useCarouselBehaviour, useControlledTimer, useDraggableContainer, useDropOpened, useEvent, useFloatingPanel, useHTMLShare, useModalManager, useOutsideClick, usePagination, useProgressiveCount, usePublicMenuList, useScreenSize, useScrollTo, useStorageState, useSystemInfo, useTimeElapsed, useToastManager, useValidatedState, };
|
|
241
|
-
export {
|
|
242
|
+
export { AconteceuIcon, AddAssemblyIcon,
|
|
242
243
|
/**
|
|
243
244
|
* @deprecated Use AddIcon instead
|
|
244
245
|
*/
|
|
245
|
-
AddIcon as AddCircleIcon, AddIcon, AgencyIcon, AlertIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ArrowLeftIcon, ArrowRightIcon, AssembleiasIcon, BackOfficeIcon, BarChartIcon, BeeIcon, Bell16Icon, BellIcon, BigPlayIcon, BoldIcon, CalendarCheckIcon, CalendarIcon, CardsIcon, CataventoVerde, CheckCircleIcon, CheckIcon, ChequeIcon, ChevronArrowDownIcon, ChevronArrowLeftIcon, ChevronArrowRightIcon, Chip, CircleArrowLeft, CircleArrowRight, ClockIcon, CloseIcon, CloudDownloadIcon, CloudUploadIcon, ComitesIcon, ComunidadeIcon, CopyIcon, CreditIcon, CrescerIcon, CrescerLogo, DevicePlusIcon, DownloadIcon, DraggableIcon, EditIcon, EvidenciasIcon, ExclamationIcon, ExitIconArrowLeft, ExitIconArrowRight, EyeIcon, FilePlusIcon, FilesIcon, FilterIcon, FontColorIcon, FontIcon, FormacaoIcon, FundacaoLogo, FundoSocialIcon, GlobeIcon, GraduationIcon, HamburgerIcon, HandUpIcon, HomeIcon, InformationIcon, InvestimentIcon, ItalicIcon, LinkIcon, LinksUteisIcon, ListDotIcon, ListIcon, LoaderIcon, LocalIcon, LockIcon, MessageIcon, MiniInformationIcon, MoneyFileIcon, NavigatorWithMouse, NotebookIcon, OptionsIcon, ParticipantesIcon, PaymentIcon, PercentLoaderIcon, PhonePlusIcon, PieChartIcon, PlayIcon, PrintIcon, QRCodeIcon, QRCodeWhatsapp, RedoIcon, RefreshIcon, SearchIcon, Settings16Icon, SettingsIcon, SicrediLogo, SquaresIcon, SustentabilidadeIcon, ThreeDotsLoader, ThumbsUpIcon, TimesCircleIcon, TooltipElement, TransferenciaIcon, TrashIcon, TrianguloInferior, TwoFileIcon, Typography, UnderlineIcon, UndoIcon, UserIcon, WebsiteIcon, };
|
|
246
|
+
AddIcon as AddCircleIcon, AddIcon, AgencyIcon, AlertIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ArrowLeftIcon, ArrowRightIcon, AssembleiasIcon, ATMIcon, BackOfficeIcon, BarChartIcon, BeeIcon, Bell16Icon, BellIcon, BigPlayIcon, BoldIcon, CalendarCheckIcon, CalendarIcon, CardsIcon, CataventoVerde, CheckCircleIcon, CheckIcon, ChequeIcon, ChevronArrowDownIcon, ChevronArrowLeftIcon, ChevronArrowRightIcon, Chip, CircleArrowLeft, CircleArrowRight, ClockIcon, CloseIcon, CloudDownloadIcon, CloudUploadIcon, ComitesIcon, ComunidadeIcon, CopyIcon, CreditIcon, CrescerIcon, CrescerLogo, DevicePlusIcon, DownloadIcon, DraggableIcon, EditIcon, EvidenciasIcon, ExclamationIcon, ExitIconArrowLeft, ExitIconArrowRight, EyeIcon, FilePlusIcon, FilesIcon, FilterIcon, FontColorIcon, FontIcon, FormacaoIcon, FundacaoLogo, FundoSocialIcon, GlobeIcon, GraduationIcon, HamburgerIcon, HandUpIcon, HomeIcon, InformationIcon, InvestimentIcon, ItalicIcon, LinkIcon, LinksUteisIcon, ListDotIcon, ListIcon, LoaderIcon, LocalIcon, LockIcon, MessageIcon, MiniInformationIcon, MoneyFileIcon, NavigatorWithMouse, NotebookIcon, OptionsIcon, ParticipantesIcon, PaymentIcon, PercentLoaderIcon, PhonePlusIcon, PieChartIcon, PlayIcon, PrintIcon, QRCodeIcon, QRCodeWhatsapp, RedoIcon, RefreshIcon, SearchIcon, Settings16Icon, SettingsIcon, SicrediLogo, SquaresIcon, SustentabilidadeIcon, ThreeDotsLoader, ThumbsUpIcon, TimesCircleIcon, TooltipElement, TransferenciaIcon, TrashIcon, TrianguloInferior, TwoFileIcon, Typography, UnderlineIcon, UndoIcon, UserIcon, WebsiteIcon, };
|
package/dist/index.js
CHANGED
|
@@ -13084,6 +13084,143 @@ var Typography = React.forwardRef(function (_ref, ref) {
|
|
|
13084
13084
|
});
|
|
13085
13085
|
Typography.displayName = 'Typography';
|
|
13086
13086
|
|
|
13087
|
+
var _excluded$x = ["className", "options", "value", "onChange", "disabled"];
|
|
13088
|
+
var rootClassName$35 = 'v-slider';
|
|
13089
|
+
var optionHeight = 24;
|
|
13090
|
+
var optionGap = 16;
|
|
13091
|
+
var VerticalSlider = React.forwardRef(function (_ref, ref) {
|
|
13092
|
+
var _ref$className = _ref.className,
|
|
13093
|
+
className = _ref$className === void 0 ? '' : _ref$className,
|
|
13094
|
+
_ref$options = _ref.options,
|
|
13095
|
+
options = _ref$options === void 0 ? [] : _ref$options,
|
|
13096
|
+
_ref$value = _ref.value,
|
|
13097
|
+
value = _ref$value === void 0 ? null : _ref$value,
|
|
13098
|
+
onChange = _ref.onChange,
|
|
13099
|
+
disabled = _ref.disabled,
|
|
13100
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$x);
|
|
13101
|
+
var classNames = useMergedClassNames([rootClassName$35, className]);
|
|
13102
|
+
var fillRef = React.createRef();
|
|
13103
|
+
var movingRef = React.useRef({
|
|
13104
|
+
moving: false,
|
|
13105
|
+
y: 0,
|
|
13106
|
+
height: 0,
|
|
13107
|
+
elementIndex: 0
|
|
13108
|
+
});
|
|
13109
|
+
React.useLayoutEffect(function () {
|
|
13110
|
+
var index = options.findIndex(function (o) {
|
|
13111
|
+
return o.value === value;
|
|
13112
|
+
});
|
|
13113
|
+
if (fillRef.current) {
|
|
13114
|
+
var height = (index + 1) * optionHeight;
|
|
13115
|
+
var gaps = index * optionGap;
|
|
13116
|
+
var h = Math.max(height + gaps, 24);
|
|
13117
|
+
fillRef.current.style.height = h + "px";
|
|
13118
|
+
movingRef.current.height = h;
|
|
13119
|
+
}
|
|
13120
|
+
}, [options, value]);
|
|
13121
|
+
React.useLayoutEffect(function () {
|
|
13122
|
+
var up = function up() {
|
|
13123
|
+
var _fillRef$current;
|
|
13124
|
+
if (disabled) return;
|
|
13125
|
+
var wasMoving = Boolean(movingRef.current.moving);
|
|
13126
|
+
movingRef.current.moving = false;
|
|
13127
|
+
(_fillRef$current = fillRef.current) === null || _fillRef$current === void 0 ? void 0 : _fillRef$current.classList.remove('grabbing');
|
|
13128
|
+
if (wasMoving) {
|
|
13129
|
+
var _options$movingRef$cu, _options$movingRef$cu2;
|
|
13130
|
+
onChange((_options$movingRef$cu = (_options$movingRef$cu2 = options[movingRef.current.elementIndex]) === null || _options$movingRef$cu2 === void 0 ? void 0 : _options$movingRef$cu2.value) != null ? _options$movingRef$cu : null, movingRef.current.elementIndex);
|
|
13131
|
+
}
|
|
13132
|
+
};
|
|
13133
|
+
window.addEventListener('mouseup', up);
|
|
13134
|
+
window.addEventListener('touchend', up);
|
|
13135
|
+
return function () {
|
|
13136
|
+
window.removeEventListener('mouseup', up);
|
|
13137
|
+
window.removeEventListener('touchend', up);
|
|
13138
|
+
};
|
|
13139
|
+
}, [disabled, fillRef, onChange, options]);
|
|
13140
|
+
var heights = React.useMemo(function () {
|
|
13141
|
+
return options.map(function (_, i) {
|
|
13142
|
+
if (i === 0 || i === options.length - 1) return optionHeight + optionGap / 2;
|
|
13143
|
+
return optionHeight + optionGap;
|
|
13144
|
+
});
|
|
13145
|
+
}, [options]);
|
|
13146
|
+
var acc = React.useMemo(function () {
|
|
13147
|
+
return heights.reduce(function (ac, at, i) {
|
|
13148
|
+
if (i === 0) return [at];
|
|
13149
|
+
return [].concat(ac, [ac[i - 1] + at]);
|
|
13150
|
+
}, []);
|
|
13151
|
+
}, [heights]);
|
|
13152
|
+
var handleMove = React.useCallback(function (evt) {
|
|
13153
|
+
var _evt$currentTarget;
|
|
13154
|
+
if (disabled || !movingRef.current.moving || !fillRef.current) return;
|
|
13155
|
+
evt.preventDefault();
|
|
13156
|
+
evt.stopPropagation();
|
|
13157
|
+
var el = (_evt$currentTarget = evt.currentTarget) === null || _evt$currentTarget === void 0 ? void 0 : _evt$currentTarget.getBoundingClientRect();
|
|
13158
|
+
var clientY = 'clientY' in evt ? evt.clientY : evt.touches[0].clientY;
|
|
13159
|
+
var clickHeight = el.y + el.height - clientY;
|
|
13160
|
+
var i = acc.findIndex(function (a) {
|
|
13161
|
+
return a > clickHeight;
|
|
13162
|
+
});
|
|
13163
|
+
var height = (i + 1) * optionHeight;
|
|
13164
|
+
var gaps = i * optionGap;
|
|
13165
|
+
var h = Math.max(height + gaps, 24);
|
|
13166
|
+
fillRef.current.style.height = h + "px";
|
|
13167
|
+
movingRef.current.elementIndex = i;
|
|
13168
|
+
}, [acc, disabled, fillRef]);
|
|
13169
|
+
var handleStart = React.useCallback(function (evt) {
|
|
13170
|
+
var _fillRef$current2;
|
|
13171
|
+
if (disabled) return;
|
|
13172
|
+
evt.preventDefault();
|
|
13173
|
+
evt.stopPropagation();
|
|
13174
|
+
movingRef.current.moving = true;
|
|
13175
|
+
(_fillRef$current2 = fillRef.current) === null || _fillRef$current2 === void 0 ? void 0 : _fillRef$current2.classList.add('grabbing');
|
|
13176
|
+
}, [disabled, fillRef]);
|
|
13177
|
+
var handleSelect = React.useCallback(function (evt) {
|
|
13178
|
+
if (disabled) return;
|
|
13179
|
+
var el = evt.currentTarget.getBoundingClientRect();
|
|
13180
|
+
var clickHeight = el.y + el.height - evt.clientY;
|
|
13181
|
+
var h = acc.findIndex(function (a) {
|
|
13182
|
+
return a > clickHeight;
|
|
13183
|
+
});
|
|
13184
|
+
onChange(options[h].value, h);
|
|
13185
|
+
}, [acc, disabled, onChange, options]);
|
|
13186
|
+
return React__default.createElement("div", Object.assign({}, props, {
|
|
13187
|
+
className: classNames,
|
|
13188
|
+
ref: ref,
|
|
13189
|
+
"aria-disabled": disabled
|
|
13190
|
+
}), React__default.createElement("div", {
|
|
13191
|
+
className: rootClassName$35 + "-input"
|
|
13192
|
+
}, React__default.createElement("div", {
|
|
13193
|
+
className: rootClassName$35 + "-track",
|
|
13194
|
+
onMouseMove: handleMove,
|
|
13195
|
+
onTouchMove: handleMove,
|
|
13196
|
+
onMouseDown: handleSelect
|
|
13197
|
+
}, React__default.createElement("div", {
|
|
13198
|
+
className: rootClassName$35 + "-fill",
|
|
13199
|
+
"data-checked": value !== null,
|
|
13200
|
+
ref: fillRef
|
|
13201
|
+
}, React__default.createElement("div", {
|
|
13202
|
+
className: rootClassName$35 + "-thumb",
|
|
13203
|
+
onMouseDown: handleStart,
|
|
13204
|
+
onTouchStart: handleStart,
|
|
13205
|
+
onDragStart: function onDragStart(e) {
|
|
13206
|
+
e.preventDefault();
|
|
13207
|
+
}
|
|
13208
|
+
})))), React__default.createElement("div", {
|
|
13209
|
+
className: rootClassName$35 + "-options"
|
|
13210
|
+
}, options.map(function (opt, i) {
|
|
13211
|
+
return React__default.createElement("div", {
|
|
13212
|
+
key: opt.value + "-" + i,
|
|
13213
|
+
className: rootClassName$35 + "-option",
|
|
13214
|
+
"data-checked": value === opt.value,
|
|
13215
|
+
onClick: function onClick() {
|
|
13216
|
+
if (disabled || value === opt.value) return;
|
|
13217
|
+
onChange(opt.value, i);
|
|
13218
|
+
}
|
|
13219
|
+
}, opt.label);
|
|
13220
|
+
})));
|
|
13221
|
+
});
|
|
13222
|
+
VerticalSlider.displayName = 'VerticalSlider';
|
|
13223
|
+
|
|
13087
13224
|
function useCallbackedState(callback, initialValue) {
|
|
13088
13225
|
var _useState = React.useState(initialValue),
|
|
13089
13226
|
value = _useState[0],
|
|
@@ -44016,13 +44153,13 @@ function useHTMLShare() {
|
|
|
44016
44153
|
};
|
|
44017
44154
|
}
|
|
44018
44155
|
if (scale === void 0) {
|
|
44019
|
-
scale = 1.
|
|
44156
|
+
scale = 1.0;
|
|
44020
44157
|
}
|
|
44021
44158
|
return new Promise(function (resolve, reject) {
|
|
44022
44159
|
html2canvas(element, {
|
|
44023
44160
|
scale: scale
|
|
44024
44161
|
}).then(function (canvas) {
|
|
44025
|
-
var _opt$pdfWidth, _opt$pdfHeight, _opt$imageX, _opt$imageY, _opt$imageWidth, _opt$imageHeight;
|
|
44162
|
+
var _opt$pdfWidth, _opt$pdfHeight, _opt$quality, _opt$imageX, _opt$imageY, _opt$imageWidth, _opt$imageHeight;
|
|
44026
44163
|
var opt = _extends({
|
|
44027
44164
|
pdfWidth: canvas.width,
|
|
44028
44165
|
pdfHeight: canvas.height,
|
|
@@ -44033,10 +44170,10 @@ function useHTMLShare() {
|
|
|
44033
44170
|
quality: 1.0,
|
|
44034
44171
|
orientation: 'p'
|
|
44035
44172
|
}, typeof options === 'function' ? options(canvas) : {});
|
|
44036
|
-
var doc = new jspdf.jsPDF(opt.orientation, 'px', [(_opt$pdfWidth = opt.pdfWidth) != null ? _opt$pdfWidth : 0, (_opt$pdfHeight = opt.pdfHeight) != null ? _opt$pdfHeight : 0]);
|
|
44037
|
-
var
|
|
44173
|
+
var doc = new jspdf.jsPDF(opt.orientation, 'px', [(_opt$pdfWidth = opt.pdfWidth) != null ? _opt$pdfWidth : 0, (_opt$pdfHeight = opt.pdfHeight) != null ? _opt$pdfHeight : 0], true);
|
|
44174
|
+
var imgData = canvas.toDataURL('image/jpeg', (_opt$quality = opt.quality) != null ? _opt$quality : 1.0);
|
|
44038
44175
|
doc.internal.scaleFactor = scale;
|
|
44039
|
-
doc.addImage(
|
|
44176
|
+
doc.addImage(imgData, 'JPEG', (_opt$imageX = opt.imageX) != null ? _opt$imageX : 0, (_opt$imageY = opt.imageY) != null ? _opt$imageY : 0, (_opt$imageWidth = opt.imageWidth) != null ? _opt$imageWidth : 0, (_opt$imageHeight = opt.imageHeight) != null ? _opt$imageHeight : 0, undefined, 'MEDIUM');
|
|
44040
44177
|
doc.save(fileName);
|
|
44041
44178
|
resolve();
|
|
44042
44179
|
})["catch"](function () {
|
|
@@ -44108,7 +44245,7 @@ function useHTMLShare() {
|
|
|
44108
44245
|
};
|
|
44109
44246
|
}
|
|
44110
44247
|
|
|
44111
|
-
var rootClassName$
|
|
44248
|
+
var rootClassName$36 = 'comp-modal-manager';
|
|
44112
44249
|
var maskRootClassName$1 = 'component-modal-mask';
|
|
44113
44250
|
var hackFocus$1 = function hackFocus() {
|
|
44114
44251
|
var tmp = document.createElement('input');
|
|
@@ -44176,13 +44313,13 @@ function useModalManager() {
|
|
|
44176
44313
|
return [React__default.createElement(React__default.Fragment, {
|
|
44177
44314
|
key: 1
|
|
44178
44315
|
}, React__default.createElement(reactTransitionGroup.TransitionGroup, {
|
|
44179
|
-
className: rootClassName$
|
|
44316
|
+
className: rootClassName$36 + "-modals"
|
|
44180
44317
|
}, arrayOfModal.map(function (obj) {
|
|
44181
44318
|
var _obj$props2, _obj$props3;
|
|
44182
44319
|
var ModalComponent = React__default.createElement(obj.component, obj.props);
|
|
44183
44320
|
return React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
44184
44321
|
timeout: 300,
|
|
44185
|
-
classNames: rootClassName$
|
|
44322
|
+
classNames: rootClassName$36 + "-mask",
|
|
44186
44323
|
key: (_obj$props2 = obj.props) === null || _obj$props2 === void 0 ? void 0 : _obj$props2.modalKey,
|
|
44187
44324
|
unmountOnExit: true
|
|
44188
44325
|
}, React__default.createElement(ModalMask, {
|
|
@@ -44453,7 +44590,7 @@ function useTimeElapsed(timeLeftInSeconds, callBackZero) {
|
|
|
44453
44590
|
return timeToReturn;
|
|
44454
44591
|
}
|
|
44455
44592
|
|
|
44456
|
-
var rootClassName$
|
|
44593
|
+
var rootClassName$37 = 'comp-toast-manager';
|
|
44457
44594
|
var count$1 = 0;
|
|
44458
44595
|
function useToastManager(props) {
|
|
44459
44596
|
var _props$max;
|
|
@@ -44499,17 +44636,17 @@ function useToastManager(props) {
|
|
|
44499
44636
|
toastsRef.current = [];
|
|
44500
44637
|
}, []);
|
|
44501
44638
|
var classNames = React.useMemo(function () {
|
|
44502
|
-
return getMergedClassNames([rootClassName$
|
|
44639
|
+
return getMergedClassNames([rootClassName$37 + "-toasts", rootClassName$37 + "-" + verticalPosition, rootClassName$37 + "-" + horizontalPosition, reverse ? rootClassName$37 + "-reverse" : '', animateSize ? rootClassName$37 + "-animate-size" : '']);
|
|
44503
44640
|
}, [reverse, animateSize, horizontalPosition, verticalPosition]);
|
|
44504
44641
|
React.useLayoutEffect(function () {
|
|
44505
|
-
var wrapper = document.querySelector("." + rootClassName$
|
|
44642
|
+
var wrapper = document.querySelector("." + rootClassName$37 + "-toasts");
|
|
44506
44643
|
if (wrapper && wrapper.childElementCount > 0) {
|
|
44507
44644
|
var somaDasAlturas = 0;
|
|
44508
44645
|
if (verticalPosition === 'top' && !reverse) {
|
|
44509
44646
|
somaDasAlturas = 12;
|
|
44510
44647
|
for (var i = 0; i < wrapper.children.length; i++) {
|
|
44511
44648
|
var el = wrapper.children[i];
|
|
44512
|
-
if (!el.classList.contains(rootClassName$
|
|
44649
|
+
if (!el.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44513
44650
|
el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44514
44651
|
somaDasAlturas += el.getBoundingClientRect().height + 12;
|
|
44515
44652
|
}
|
|
@@ -44517,7 +44654,7 @@ function useToastManager(props) {
|
|
|
44517
44654
|
} else if (verticalPosition === 'top') {
|
|
44518
44655
|
for (var _i = wrapper.children.length - 1; _i >= 0; _i--) {
|
|
44519
44656
|
var _el = wrapper.children[_i];
|
|
44520
|
-
if (!_el.classList.contains(rootClassName$
|
|
44657
|
+
if (!_el.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44521
44658
|
somaDasAlturas += _el.getBoundingClientRect().height + 12;
|
|
44522
44659
|
_el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44523
44660
|
}
|
|
@@ -44525,7 +44662,7 @@ function useToastManager(props) {
|
|
|
44525
44662
|
} else if (verticalPosition === 'bottom' && !reverse) {
|
|
44526
44663
|
for (var _i2 = 0; _i2 < wrapper.children.length; _i2++) {
|
|
44527
44664
|
var _el2 = wrapper.children[_i2];
|
|
44528
|
-
if (!_el2.classList.contains(rootClassName$
|
|
44665
|
+
if (!_el2.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44529
44666
|
somaDasAlturas += _el2.getBoundingClientRect().height + 12;
|
|
44530
44667
|
_el2.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44531
44668
|
}
|
|
@@ -44534,7 +44671,7 @@ function useToastManager(props) {
|
|
|
44534
44671
|
somaDasAlturas = 12;
|
|
44535
44672
|
for (var _i3 = wrapper.children.length - 1; _i3 >= 0; _i3--) {
|
|
44536
44673
|
var _el3 = wrapper.children[_i3];
|
|
44537
|
-
if (!_el3.classList.contains(rootClassName$
|
|
44674
|
+
if (!_el3.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44538
44675
|
_el3.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44539
44676
|
somaDasAlturas += _el3.getBoundingClientRect().height + 12;
|
|
44540
44677
|
}
|
|
@@ -44549,11 +44686,11 @@ function useToastManager(props) {
|
|
|
44549
44686
|
}, arrayOfToast.map(function (toast) {
|
|
44550
44687
|
return React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
44551
44688
|
timeout: 300,
|
|
44552
|
-
classNames: rootClassName$
|
|
44689
|
+
classNames: rootClassName$37 + "-toast",
|
|
44553
44690
|
key: toast.id,
|
|
44554
44691
|
unmountOnExit: true
|
|
44555
44692
|
}, React__default.createElement("div", {
|
|
44556
|
-
className: rootClassName$
|
|
44693
|
+
className: rootClassName$37 + "-toastzin"
|
|
44557
44694
|
}, React__default.createElement(Toast, {
|
|
44558
44695
|
theme: toast.theme,
|
|
44559
44696
|
label: toast.label,
|
|
@@ -44581,7 +44718,7 @@ function useValidatedState(validation, initialValue) {
|
|
|
44581
44718
|
return [value, setValue, validation(value)];
|
|
44582
44719
|
}
|
|
44583
44720
|
|
|
44584
|
-
var _excluded$
|
|
44721
|
+
var _excluded$y = ["disabled", "language", "onConfirm", "showIcons"],
|
|
44585
44722
|
_excluded2 = ["disabled", "language", "onCancel", "onConfirm", "showIcons"],
|
|
44586
44723
|
_excluded3 = ["disabled", "language", "onCancel", "onConfirm", "showIcons"];
|
|
44587
44724
|
function AlertModal(_ref) {
|
|
@@ -44591,7 +44728,7 @@ function AlertModal(_ref) {
|
|
|
44591
44728
|
onConfirm = _ref.onConfirm,
|
|
44592
44729
|
_ref$showIcons = _ref.showIcons,
|
|
44593
44730
|
showIcons = _ref$showIcons === void 0 ? true : _ref$showIcons,
|
|
44594
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
44731
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
44595
44732
|
var _useState = React.useState(false),
|
|
44596
44733
|
loading = _useState[0],
|
|
44597
44734
|
setLoading = _useState[1];
|
|
@@ -44924,6 +45061,7 @@ exports.Typography = Typography;
|
|
|
44924
45061
|
exports.UnderlineIcon = UnderlineIcon;
|
|
44925
45062
|
exports.UndoIcon = UndoIcon;
|
|
44926
45063
|
exports.UserIcon = UserIcon;
|
|
45064
|
+
exports.VerticalSlider = VerticalSlider;
|
|
44927
45065
|
exports.VideoModal = VideoModal;
|
|
44928
45066
|
exports.VideoPlayer = VideoPlayer;
|
|
44929
45067
|
exports.WebsiteIcon = WebsiteIcon;
|