plataforma-fundacao-componentes 2.26.10 → 2.26.12
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 +13 -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 +158 -19
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +158 -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,13 @@
|
|
|
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
|
+
};
|
|
10
|
+
export declare const FilledExample: {
|
|
11
|
+
(args: ComponentProps<typeof VerticalSlider>): React.JSX.Element;
|
|
12
|
+
args: import("./verticalSlider").VerticalSliderProps & React.RefAttributes<HTMLDivElement>;
|
|
13
|
+
};
|
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,144 @@ 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
|
+
movingRef.current.elementIndex = index;
|
|
13114
|
+
if (fillRef.current) {
|
|
13115
|
+
var height = (index + 1) * optionHeight;
|
|
13116
|
+
var gaps = index * optionGap;
|
|
13117
|
+
var h = Math.max(height + gaps, 24);
|
|
13118
|
+
fillRef.current.style.height = h + "px";
|
|
13119
|
+
movingRef.current.height = h;
|
|
13120
|
+
}
|
|
13121
|
+
}, [options, value]);
|
|
13122
|
+
React.useLayoutEffect(function () {
|
|
13123
|
+
var up = function up() {
|
|
13124
|
+
var _fillRef$current;
|
|
13125
|
+
if (disabled) return;
|
|
13126
|
+
var wasMoving = Boolean(movingRef.current.moving);
|
|
13127
|
+
movingRef.current.moving = false;
|
|
13128
|
+
(_fillRef$current = fillRef.current) === null || _fillRef$current === void 0 ? void 0 : _fillRef$current.classList.remove('grabbing');
|
|
13129
|
+
if (wasMoving) {
|
|
13130
|
+
var _options$movingRef$cu, _options$movingRef$cu2;
|
|
13131
|
+
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);
|
|
13132
|
+
}
|
|
13133
|
+
};
|
|
13134
|
+
window.addEventListener('mouseup', up);
|
|
13135
|
+
window.addEventListener('touchend', up);
|
|
13136
|
+
return function () {
|
|
13137
|
+
window.removeEventListener('mouseup', up);
|
|
13138
|
+
window.removeEventListener('touchend', up);
|
|
13139
|
+
};
|
|
13140
|
+
}, [disabled, fillRef, onChange, options]);
|
|
13141
|
+
var heights = React.useMemo(function () {
|
|
13142
|
+
return options.map(function (_, i) {
|
|
13143
|
+
if (i === 0 || i === options.length - 1) return optionHeight + optionGap / 2;
|
|
13144
|
+
return optionHeight + optionGap;
|
|
13145
|
+
});
|
|
13146
|
+
}, [options]);
|
|
13147
|
+
var accumulatedHeights = React.useMemo(function () {
|
|
13148
|
+
return heights.reduce(function (ac, at, i) {
|
|
13149
|
+
if (i === 0) return [at];
|
|
13150
|
+
return [].concat(ac, [ac[i - 1] + at]);
|
|
13151
|
+
}, []);
|
|
13152
|
+
}, [heights]);
|
|
13153
|
+
var handleMove = React.useCallback(function (evt) {
|
|
13154
|
+
var _evt$currentTarget;
|
|
13155
|
+
if (disabled || !movingRef.current.moving || !fillRef.current) return;
|
|
13156
|
+
evt.preventDefault();
|
|
13157
|
+
evt.stopPropagation();
|
|
13158
|
+
var el = (_evt$currentTarget = evt.currentTarget) === null || _evt$currentTarget === void 0 ? void 0 : _evt$currentTarget.getBoundingClientRect();
|
|
13159
|
+
var clientY = 'clientY' in evt ? evt.clientY : evt.touches[0].clientY;
|
|
13160
|
+
var clickHeight = el.y + el.height - clientY;
|
|
13161
|
+
var i = accumulatedHeights.findIndex(function (a) {
|
|
13162
|
+
return a > clickHeight;
|
|
13163
|
+
});
|
|
13164
|
+
var height = (i + 1) * optionHeight;
|
|
13165
|
+
var gaps = i * optionGap;
|
|
13166
|
+
var h = Math.max(height + gaps, 24);
|
|
13167
|
+
fillRef.current.style.height = h + "px";
|
|
13168
|
+
movingRef.current.elementIndex = i;
|
|
13169
|
+
}, [accumulatedHeights, disabled, fillRef]);
|
|
13170
|
+
var handleStart = React.useCallback(function (evt) {
|
|
13171
|
+
var _fillRef$current2;
|
|
13172
|
+
if (disabled) return;
|
|
13173
|
+
evt.preventDefault();
|
|
13174
|
+
evt.stopPropagation();
|
|
13175
|
+
movingRef.current.moving = true;
|
|
13176
|
+
(_fillRef$current2 = fillRef.current) === null || _fillRef$current2 === void 0 ? void 0 : _fillRef$current2.classList.add('grabbing');
|
|
13177
|
+
}, [disabled, fillRef]);
|
|
13178
|
+
var handleSelect = React.useCallback(function (evt) {
|
|
13179
|
+
if (disabled) return;
|
|
13180
|
+
var el = evt.currentTarget.getBoundingClientRect();
|
|
13181
|
+
var clickHeight = el.y + el.height - evt.clientY;
|
|
13182
|
+
var h = accumulatedHeights.findIndex(function (a) {
|
|
13183
|
+
return a > clickHeight;
|
|
13184
|
+
});
|
|
13185
|
+
onChange(options[h].value, h);
|
|
13186
|
+
}, [accumulatedHeights, disabled, onChange, options]);
|
|
13187
|
+
return React__default.createElement("div", Object.assign({}, props, {
|
|
13188
|
+
className: classNames,
|
|
13189
|
+
ref: ref,
|
|
13190
|
+
"aria-disabled": disabled
|
|
13191
|
+
}), React__default.createElement("div", {
|
|
13192
|
+
className: rootClassName$35 + "-input"
|
|
13193
|
+
}, React__default.createElement("div", {
|
|
13194
|
+
className: rootClassName$35 + "-track",
|
|
13195
|
+
onMouseMove: handleMove,
|
|
13196
|
+
onTouchMove: handleMove,
|
|
13197
|
+
onMouseDown: handleSelect
|
|
13198
|
+
}, React__default.createElement("div", {
|
|
13199
|
+
className: rootClassName$35 + "-fill",
|
|
13200
|
+
"data-checked": value !== null,
|
|
13201
|
+
ref: fillRef
|
|
13202
|
+
}, React__default.createElement("div", {
|
|
13203
|
+
className: rootClassName$35 + "-thumb",
|
|
13204
|
+
onMouseDown: handleStart,
|
|
13205
|
+
onTouchStart: handleStart,
|
|
13206
|
+
onDragStart: function onDragStart(e) {
|
|
13207
|
+
e.preventDefault();
|
|
13208
|
+
}
|
|
13209
|
+
})))), React__default.createElement("div", {
|
|
13210
|
+
className: rootClassName$35 + "-options"
|
|
13211
|
+
}, options.map(function (opt, i) {
|
|
13212
|
+
return React__default.createElement("div", {
|
|
13213
|
+
key: opt.value + "-" + i,
|
|
13214
|
+
className: rootClassName$35 + "-option",
|
|
13215
|
+
"data-checked": value === opt.value,
|
|
13216
|
+
onClick: function onClick() {
|
|
13217
|
+
if (disabled || value === opt.value) return;
|
|
13218
|
+
onChange(opt.value, i);
|
|
13219
|
+
}
|
|
13220
|
+
}, opt.label);
|
|
13221
|
+
})));
|
|
13222
|
+
});
|
|
13223
|
+
VerticalSlider.displayName = 'VerticalSlider';
|
|
13224
|
+
|
|
13087
13225
|
function useCallbackedState(callback, initialValue) {
|
|
13088
13226
|
var _useState = React.useState(initialValue),
|
|
13089
13227
|
value = _useState[0],
|
|
@@ -44016,13 +44154,13 @@ function useHTMLShare() {
|
|
|
44016
44154
|
};
|
|
44017
44155
|
}
|
|
44018
44156
|
if (scale === void 0) {
|
|
44019
|
-
scale = 1.
|
|
44157
|
+
scale = 1.0;
|
|
44020
44158
|
}
|
|
44021
44159
|
return new Promise(function (resolve, reject) {
|
|
44022
44160
|
html2canvas(element, {
|
|
44023
44161
|
scale: scale
|
|
44024
44162
|
}).then(function (canvas) {
|
|
44025
|
-
var _opt$pdfWidth, _opt$pdfHeight, _opt$imageX, _opt$imageY, _opt$imageWidth, _opt$imageHeight;
|
|
44163
|
+
var _opt$pdfWidth, _opt$pdfHeight, _opt$quality, _opt$imageX, _opt$imageY, _opt$imageWidth, _opt$imageHeight;
|
|
44026
44164
|
var opt = _extends({
|
|
44027
44165
|
pdfWidth: canvas.width,
|
|
44028
44166
|
pdfHeight: canvas.height,
|
|
@@ -44033,10 +44171,10 @@ function useHTMLShare() {
|
|
|
44033
44171
|
quality: 1.0,
|
|
44034
44172
|
orientation: 'p'
|
|
44035
44173
|
}, 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
|
|
44174
|
+
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);
|
|
44175
|
+
var imgData = canvas.toDataURL('image/jpeg', (_opt$quality = opt.quality) != null ? _opt$quality : 1.0);
|
|
44038
44176
|
doc.internal.scaleFactor = scale;
|
|
44039
|
-
doc.addImage(
|
|
44177
|
+
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
44178
|
doc.save(fileName);
|
|
44041
44179
|
resolve();
|
|
44042
44180
|
})["catch"](function () {
|
|
@@ -44108,7 +44246,7 @@ function useHTMLShare() {
|
|
|
44108
44246
|
};
|
|
44109
44247
|
}
|
|
44110
44248
|
|
|
44111
|
-
var rootClassName$
|
|
44249
|
+
var rootClassName$36 = 'comp-modal-manager';
|
|
44112
44250
|
var maskRootClassName$1 = 'component-modal-mask';
|
|
44113
44251
|
var hackFocus$1 = function hackFocus() {
|
|
44114
44252
|
var tmp = document.createElement('input');
|
|
@@ -44176,13 +44314,13 @@ function useModalManager() {
|
|
|
44176
44314
|
return [React__default.createElement(React__default.Fragment, {
|
|
44177
44315
|
key: 1
|
|
44178
44316
|
}, React__default.createElement(reactTransitionGroup.TransitionGroup, {
|
|
44179
|
-
className: rootClassName$
|
|
44317
|
+
className: rootClassName$36 + "-modals"
|
|
44180
44318
|
}, arrayOfModal.map(function (obj) {
|
|
44181
44319
|
var _obj$props2, _obj$props3;
|
|
44182
44320
|
var ModalComponent = React__default.createElement(obj.component, obj.props);
|
|
44183
44321
|
return React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
44184
44322
|
timeout: 300,
|
|
44185
|
-
classNames: rootClassName$
|
|
44323
|
+
classNames: rootClassName$36 + "-mask",
|
|
44186
44324
|
key: (_obj$props2 = obj.props) === null || _obj$props2 === void 0 ? void 0 : _obj$props2.modalKey,
|
|
44187
44325
|
unmountOnExit: true
|
|
44188
44326
|
}, React__default.createElement(ModalMask, {
|
|
@@ -44453,7 +44591,7 @@ function useTimeElapsed(timeLeftInSeconds, callBackZero) {
|
|
|
44453
44591
|
return timeToReturn;
|
|
44454
44592
|
}
|
|
44455
44593
|
|
|
44456
|
-
var rootClassName$
|
|
44594
|
+
var rootClassName$37 = 'comp-toast-manager';
|
|
44457
44595
|
var count$1 = 0;
|
|
44458
44596
|
function useToastManager(props) {
|
|
44459
44597
|
var _props$max;
|
|
@@ -44499,17 +44637,17 @@ function useToastManager(props) {
|
|
|
44499
44637
|
toastsRef.current = [];
|
|
44500
44638
|
}, []);
|
|
44501
44639
|
var classNames = React.useMemo(function () {
|
|
44502
|
-
return getMergedClassNames([rootClassName$
|
|
44640
|
+
return getMergedClassNames([rootClassName$37 + "-toasts", rootClassName$37 + "-" + verticalPosition, rootClassName$37 + "-" + horizontalPosition, reverse ? rootClassName$37 + "-reverse" : '', animateSize ? rootClassName$37 + "-animate-size" : '']);
|
|
44503
44641
|
}, [reverse, animateSize, horizontalPosition, verticalPosition]);
|
|
44504
44642
|
React.useLayoutEffect(function () {
|
|
44505
|
-
var wrapper = document.querySelector("." + rootClassName$
|
|
44643
|
+
var wrapper = document.querySelector("." + rootClassName$37 + "-toasts");
|
|
44506
44644
|
if (wrapper && wrapper.childElementCount > 0) {
|
|
44507
44645
|
var somaDasAlturas = 0;
|
|
44508
44646
|
if (verticalPosition === 'top' && !reverse) {
|
|
44509
44647
|
somaDasAlturas = 12;
|
|
44510
44648
|
for (var i = 0; i < wrapper.children.length; i++) {
|
|
44511
44649
|
var el = wrapper.children[i];
|
|
44512
|
-
if (!el.classList.contains(rootClassName$
|
|
44650
|
+
if (!el.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44513
44651
|
el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44514
44652
|
somaDasAlturas += el.getBoundingClientRect().height + 12;
|
|
44515
44653
|
}
|
|
@@ -44517,7 +44655,7 @@ function useToastManager(props) {
|
|
|
44517
44655
|
} else if (verticalPosition === 'top') {
|
|
44518
44656
|
for (var _i = wrapper.children.length - 1; _i >= 0; _i--) {
|
|
44519
44657
|
var _el = wrapper.children[_i];
|
|
44520
|
-
if (!_el.classList.contains(rootClassName$
|
|
44658
|
+
if (!_el.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44521
44659
|
somaDasAlturas += _el.getBoundingClientRect().height + 12;
|
|
44522
44660
|
_el.style.transform = "translateY(" + somaDasAlturas + "px)";
|
|
44523
44661
|
}
|
|
@@ -44525,7 +44663,7 @@ function useToastManager(props) {
|
|
|
44525
44663
|
} else if (verticalPosition === 'bottom' && !reverse) {
|
|
44526
44664
|
for (var _i2 = 0; _i2 < wrapper.children.length; _i2++) {
|
|
44527
44665
|
var _el2 = wrapper.children[_i2];
|
|
44528
|
-
if (!_el2.classList.contains(rootClassName$
|
|
44666
|
+
if (!_el2.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44529
44667
|
somaDasAlturas += _el2.getBoundingClientRect().height + 12;
|
|
44530
44668
|
_el2.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44531
44669
|
}
|
|
@@ -44534,7 +44672,7 @@ function useToastManager(props) {
|
|
|
44534
44672
|
somaDasAlturas = 12;
|
|
44535
44673
|
for (var _i3 = wrapper.children.length - 1; _i3 >= 0; _i3--) {
|
|
44536
44674
|
var _el3 = wrapper.children[_i3];
|
|
44537
|
-
if (!_el3.classList.contains(rootClassName$
|
|
44675
|
+
if (!_el3.classList.contains(rootClassName$37 + "-toast-exit")) {
|
|
44538
44676
|
_el3.style.transform = "translateY(-" + somaDasAlturas + "px)";
|
|
44539
44677
|
somaDasAlturas += _el3.getBoundingClientRect().height + 12;
|
|
44540
44678
|
}
|
|
@@ -44549,11 +44687,11 @@ function useToastManager(props) {
|
|
|
44549
44687
|
}, arrayOfToast.map(function (toast) {
|
|
44550
44688
|
return React__default.createElement(reactTransitionGroup.CSSTransition, {
|
|
44551
44689
|
timeout: 300,
|
|
44552
|
-
classNames: rootClassName$
|
|
44690
|
+
classNames: rootClassName$37 + "-toast",
|
|
44553
44691
|
key: toast.id,
|
|
44554
44692
|
unmountOnExit: true
|
|
44555
44693
|
}, React__default.createElement("div", {
|
|
44556
|
-
className: rootClassName$
|
|
44694
|
+
className: rootClassName$37 + "-toastzin"
|
|
44557
44695
|
}, React__default.createElement(Toast, {
|
|
44558
44696
|
theme: toast.theme,
|
|
44559
44697
|
label: toast.label,
|
|
@@ -44581,7 +44719,7 @@ function useValidatedState(validation, initialValue) {
|
|
|
44581
44719
|
return [value, setValue, validation(value)];
|
|
44582
44720
|
}
|
|
44583
44721
|
|
|
44584
|
-
var _excluded$
|
|
44722
|
+
var _excluded$y = ["disabled", "language", "onConfirm", "showIcons"],
|
|
44585
44723
|
_excluded2 = ["disabled", "language", "onCancel", "onConfirm", "showIcons"],
|
|
44586
44724
|
_excluded3 = ["disabled", "language", "onCancel", "onConfirm", "showIcons"];
|
|
44587
44725
|
function AlertModal(_ref) {
|
|
@@ -44591,7 +44729,7 @@ function AlertModal(_ref) {
|
|
|
44591
44729
|
onConfirm = _ref.onConfirm,
|
|
44592
44730
|
_ref$showIcons = _ref.showIcons,
|
|
44593
44731
|
showIcons = _ref$showIcons === void 0 ? true : _ref$showIcons,
|
|
44594
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
44732
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$y);
|
|
44595
44733
|
var _useState = React.useState(false),
|
|
44596
44734
|
loading = _useState[0],
|
|
44597
44735
|
setLoading = _useState[1];
|
|
@@ -44924,6 +45062,7 @@ exports.Typography = Typography;
|
|
|
44924
45062
|
exports.UnderlineIcon = UnderlineIcon;
|
|
44925
45063
|
exports.UndoIcon = UndoIcon;
|
|
44926
45064
|
exports.UserIcon = UserIcon;
|
|
45065
|
+
exports.VerticalSlider = VerticalSlider;
|
|
44927
45066
|
exports.VideoModal = VideoModal;
|
|
44928
45067
|
exports.VideoPlayer = VideoPlayer;
|
|
44929
45068
|
exports.WebsiteIcon = WebsiteIcon;
|