@commonsku/styles 1.16.9 → 1.16.12-1
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.d.ts +69 -2
- package/dist/index.es.js +193 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +198 -18
- package/dist/index.js.map +1 -1
- package/dist/styles/ConfirmAlertPopup.d.ts +14 -0
- package/dist/styles/ConfirmAlertPopup.d.ts.map +1 -0
- package/dist/styles/Csku.d.ts +1 -0
- package/dist/styles/Csku.d.ts.map +1 -1
- package/dist/styles/DropArea.d.ts +4 -0
- package/dist/styles/DropArea.d.ts.map +1 -1
- package/dist/styles/ToggleSwitch.d.ts +47 -0
- package/dist/styles/ToggleSwitch.d.ts.map +1 -0
- package/dist/styles/icons/ImageIcon.d.ts +6 -0
- package/dist/styles/icons/ImageIcon.d.ts.map +1 -0
- package/dist/styles/icons/UploadIcon.d.ts +6 -0
- package/dist/styles/icons/UploadIcon.d.ts.map +1 -0
- package/dist/styles/icons/index.d.ts +2 -0
- package/dist/styles/icons/index.d.ts.map +1 -1
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -139,7 +139,11 @@ declare type DropzoneTypes = {
|
|
|
139
139
|
showDroppedFiles?: boolean;
|
|
140
140
|
} & DropzoneOptions;
|
|
141
141
|
declare function Dropzoned({ placeholder, accept, showDroppedFiles, ...props }: DropzoneTypes): JSX.Element;
|
|
142
|
-
declare function DropzonedPreviews({ placeholder, accept, onDrop, ...props }: DropzoneTypes): JSX.Element;
|
|
142
|
+
declare function DropzonedPreviews({ placeholder, accept, onDrop, ...props }: DropzoneTypes): JSX.Element;
|
|
143
|
+
declare type DropzoneSimpleProps = {
|
|
144
|
+
children: React$1.ReactElement;
|
|
145
|
+
} & DropzoneOptions;
|
|
146
|
+
declare function DropzonedSimple({ accept, children, ...props }: DropzoneSimpleProps): React$1.ReactElement<any, string | React$1.JSXElementConstructor<any>> | null;
|
|
143
147
|
|
|
144
148
|
declare type TSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
145
149
|
|
|
@@ -2919,6 +2923,7 @@ declare type ResponsiveValue<T = string | number> = T | Array<T | null> | {
|
|
|
2919
2923
|
|
|
2920
2924
|
declare const createMeasurementStyle: (v: string | number, keys: string[]) => {};
|
|
2921
2925
|
declare type BaseCskuProps = {
|
|
2926
|
+
forceStyles?: boolean;
|
|
2922
2927
|
pr?: ResponsiveValue<string | number>;
|
|
2923
2928
|
pl?: ResponsiveValue<string | number>;
|
|
2924
2929
|
pt?: ResponsiveValue<string | number>;
|
|
@@ -3128,6 +3133,9 @@ declare function InfoIcon({ color, size, filled, pinned, altText, ...props }: In
|
|
|
3128
3133
|
declare type DownloadIconProps = SVGIconProps;
|
|
3129
3134
|
declare function DownloadIcon({ color, size, altText, ...props }: DownloadIconProps): JSX.Element;
|
|
3130
3135
|
|
|
3136
|
+
declare type UploadIconProps = SVGIconProps;
|
|
3137
|
+
declare function UploadIcon({ color, size, altText, ...props }: UploadIconProps): JSX.Element;
|
|
3138
|
+
|
|
3131
3139
|
declare type MarketingStatusIconProps = SVGIconProps & {
|
|
3132
3140
|
approved?: boolean;
|
|
3133
3141
|
};
|
|
@@ -3393,6 +3401,9 @@ declare type DoubleArrowIconProps = SVGIconProps & {
|
|
|
3393
3401
|
};
|
|
3394
3402
|
declare function DoubleArrowIcon({ color, direction, size, altText, ...props }: DoubleArrowIconProps): JSX.Element;
|
|
3395
3403
|
|
|
3404
|
+
declare type ImageIcon = SVGIconProps;
|
|
3405
|
+
declare function ImageIcon(props: ImageIcon): JSX.Element;
|
|
3406
|
+
|
|
3396
3407
|
declare const datepickerStyles = "\n.commonsku-styles-datepicker {\n &.react-datepicker-wrapper {\n width: 100%;\n }\n\n .react-datepicker__input-container {\n display: block;\n width: 100%;\n }\n\n .react-datepicker {\n border: 1px solid var(--color-primary1-60);\n outline: none;\n box-shadow: 1px 1px 0px var(--color-primary1-60),\n -1px -1px 0px var(--color-primary1-60),\n 1px -1px 0px var(--color-primary1-60),\n -1px 1px 0px var(--color-primary1-60);\n }\n\n .react-datepicker__current-month,\n .react-datepicker-time__header,\n .react-datepicker-year-header,\n .react-datepicker__header {\n padding-top: 8px;\n padding-bottom: 8px;\n }\n\n .react-datepicker__header,\n .react-datepicker__today-button {\n background: var(--color-neutrals-20);\n padding-top: 8px;\n padding-bottom: 8px;\n }\n\n .react-datepicker__header {\n border-bottom: none;\n }\n\n .react-datepicker__today-button {\n border-top: none;\n }\n\n .react-datepicker__day {\n outline: none;\n }\n\n .react-datepicker__day :not(\n .react-datepicker__day--outside-month,\n .react-datepicker__day--selected\n ) {\n color: var(--color-neutrals-90);\n }\n\n .react-datepicker__day:hover :not(.react-datepicker__day--selected),\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n background-color: var(--color-neutrals-20);\n }\n\n .react-datepicker__day--outside-month {\n color: var(--color-neutrals-70);\n }\n\n .react-datepicker__day--weekend {\n color: var(--color-errors-main);\n }\n\n .react-datepicker__day--selected,\n .react-datepicker__day--keyboard-selected,\n .react-datepicker__month-text--keyboard-selected,\n .react-datepicker__quarter-text--keyboard-selected,\n .react-datepicker__year-text--keyboard-selected\n {\n background-color: var(--color-primary1-60);\n color: #fff;\n }\n\n .react-datepicker__triangle {\n border-bottom-color: var(--color-neutrals-20) !important;\n }\n\n .react-datepicker__triangle::before {\n border-bottom-color: var(--color-primary1-60) !important;\n border-top-color: var(--color-primary1-60) !important;\n }\n\n .react-datepicker__month-select,\n .react-datepicker__year-select {\n height: 30px;\n border: 2px solid var(--color-primary1-60);\n padding: 3px;\n border-radius: 5px;\n outline: none;\n }\n\n .react-datepicker__navigation {\n border: 0.45rem solid transparent;\n\n &.react-datepicker__navigation--next {\n border-left: 7px solid var(--color-primary1-60);\n margin-top: 8px;\n }\n \n &.react-datepicker__navigation--previous {\n border-right: 7px solid var(--color-primary1-60);\n margin-top: 8px;\n }\n }\n}\n";
|
|
3397
3408
|
//# sourceMappingURL=datepickerStyles.d.ts.map
|
|
3398
3409
|
|
|
@@ -3404,6 +3415,18 @@ declare type ConfirmPopupProps = {
|
|
|
3404
3415
|
};
|
|
3405
3416
|
declare const ConfirmPopup: (props: ConfirmPopupProps) => JSX.Element;
|
|
3406
3417
|
|
|
3418
|
+
declare type ConfirmAlertPopupProps = React$1.PropsWithChildren<{
|
|
3419
|
+
padding?: string;
|
|
3420
|
+
maxWidth: string | number;
|
|
3421
|
+
title?: React$1.ReactNode;
|
|
3422
|
+
disableActionButton?: boolean;
|
|
3423
|
+
cancelButtonContent?: React$1.ReactNode;
|
|
3424
|
+
actionButtonContent?: React$1.ReactNode;
|
|
3425
|
+
onAction?: () => void;
|
|
3426
|
+
onClose?: () => void;
|
|
3427
|
+
}>;
|
|
3428
|
+
declare const ConfirmAlertPopup: (props: ConfirmAlertPopupProps) => JSX.Element;
|
|
3429
|
+
|
|
3407
3430
|
declare type CalendarDayBodyProps = React$1.PropsWithChildren<{
|
|
3408
3431
|
day: Date;
|
|
3409
3432
|
selectedDate: Date;
|
|
@@ -3736,4 +3759,48 @@ declare const useClickOutside: <T extends HTMLElement = HTMLElement>(props: {
|
|
|
3736
3759
|
declare const useFallbackRef: <T>(forwardedRef: ForwardedRef<T>) => MutableRefObject<T | null>;
|
|
3737
3760
|
//# sourceMappingURL=useFallbackRef.d.ts.map
|
|
3738
3761
|
|
|
3739
|
-
|
|
3762
|
+
declare const toggleSizes$1: {
|
|
3763
|
+
small: {
|
|
3764
|
+
'font-family': string;
|
|
3765
|
+
'font-size': string;
|
|
3766
|
+
'line-height': string;
|
|
3767
|
+
padding: string;
|
|
3768
|
+
borderRadius: string;
|
|
3769
|
+
height: string;
|
|
3770
|
+
};
|
|
3771
|
+
medium: {
|
|
3772
|
+
'font-family': string;
|
|
3773
|
+
'font-size': string;
|
|
3774
|
+
'line-height': string;
|
|
3775
|
+
padding: string;
|
|
3776
|
+
borderRadius: string;
|
|
3777
|
+
height: string;
|
|
3778
|
+
};
|
|
3779
|
+
large: {
|
|
3780
|
+
'font-family': string;
|
|
3781
|
+
'font-size': string;
|
|
3782
|
+
'line-height': string;
|
|
3783
|
+
padding: string;
|
|
3784
|
+
borderRadius: string;
|
|
3785
|
+
height: string;
|
|
3786
|
+
};
|
|
3787
|
+
};
|
|
3788
|
+
declare type ToggleSize$1 = keyof typeof toggleSizes$1;
|
|
3789
|
+
declare type CommonProps = {
|
|
3790
|
+
selected?: boolean;
|
|
3791
|
+
stretch?: boolean;
|
|
3792
|
+
size?: ToggleSize$1;
|
|
3793
|
+
};
|
|
3794
|
+
declare type ToggleSwitchProps = {
|
|
3795
|
+
onClick?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
3796
|
+
style?: React$1.CSSProperties;
|
|
3797
|
+
} & CommonProps & Omit<Omit<Omit<BaseCskuProps, 'hidden'>, 'color'>, 'style'>;
|
|
3798
|
+
declare type ToggleSwitchStatedProps = {
|
|
3799
|
+
initialSelected?: boolean;
|
|
3800
|
+
style?: React$1.CSSProperties;
|
|
3801
|
+
onClick?: (value: boolean) => void;
|
|
3802
|
+
} & Omit<CommonProps, 'selected'> & Omit<BaseCskuProps, 'style'>;
|
|
3803
|
+
declare const ToggleSwitchStyled: ({ onClick, size, selected, stretch, style, ...props }: ToggleSwitchProps) => JSX.Element;
|
|
3804
|
+
declare const ToggleSwitch: ({ size, initialSelected, stretch, onClick, ...props }: ToggleSwitchStatedProps) => JSX.Element;
|
|
3805
|
+
|
|
3806
|
+
export { AddIcon, AddNoteIcon, AddShoppingCartIcon, AddTaskIcon, AlertIcon, AlertNotification, ArrowIcon, Artwork, ArtworkProps, SKUAsyncSelect as AsyncSelect, Avatar, AvatarColor, AvatarShape, AvatarSize, AwaitingProofIcon, Backdrop, Background, Badge, BaseCskuProps, BotIcon, Box, BulletIcon, Button, ButtonPreset, ButtonProps, ButtonVariant, ButtonsGroup, Calendar, CalendarDayBody, CalendarDaysBody, CalendarDaysHeader, CalendarIcon, CalendarTask, CalendarTaskProps, CalendarWrapper, CancelButton, ChangeRequestedIcon, ChatIcon, CheckMark, CheckboxIcon, CheckboxLabel, CheckmarkIcon, ChevronIcon, CircleProgressIcon, ClientApprovedIcon, ClipboardIcon, ClockIcon, Col, ColPropTypes, CollaborateIcon, CollapseStyled, CollapseStyledProps, CollapseWrapper, CollapseWrapperProps, Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelProps, CollapsiblePanelTitle, CollapsiblePanelTitleProps, CollapsiblePanels, CollapsiblePanelsProps, CollapsibleProps, Collapsible$1 as CollapsibleV2, Collapsibles, Column, ColumnSelectIcon, CommentIcon, CommunityIcon, CompletedCheckmarkIcon, ConfirmAlertPopup, ConfirmPopup, ConnectedIcon, ConnectedPlusIcon, CouponIcon, SKUCreatableSelect as CreatableSelect, CreditCardIcon, Csku, CskuProps, CustomDateInput, Datepicker, DatepickerPorps, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, DefaultStar, DollarIcon, DoneButton, Dot, DoubleArrowIcon, DownloadIcon, DragIcon, DraggableTasksCalendar, DropArea, DropAreaProps, DropDownContent, Dropdown, DropdownItem, DropdownProps, DropzoneSimpleProps, DropzoneTypes, Dropzoned, DropzonedPreviews, DropzonedSimple, EPOIcon, EditIcon, EllipsisIcon, EpsIcon, ErrorBoundary, EstimateCircleIcon, EyeIcon, FeedPost, FileUploadIcon, FilledChevronIcon, FolderIcon, GalleryIcon, GearIcon, GlobalStyle, Grid, GridCell, GridIcon, GridItem, GridItemProps, GridProps, GridRow, GridTable, GridTableContainer, H1, H2, H3, H4, H5, H6, HandleIcon, HeaderWrapper, HeadlessTable, HelpIcon, HistoryIcon, IconButton, IconButtonProps, IconDoc, ImageIcon, Img, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, InputProps, InputStepper, InputStepperStyled, IntegrationsIcon, InventoryIcon, Label, LabeledAsyncSelect, LabeledCheckbox, LabeledCheckboxProps, LabeledCreatableSelect, LabeledIconInput, LabeledInput, LabeledMultiProgress, LabeledProgress, LabeledRadio, LabeledRadioGroup, LabeledRadioInButton, LabeledRadioInButtonGroup, LabeledRadioProps, LabeledSelect, LabeledTextarea, LightIndicator, Link, LinkWithIcon, ListIcon, Loading, LockIcon, MailIcon, MarketingStatusIcon, MenuIcon, MultiProgress, NavConnectIcon, NavFinanceIcon, NavManagementIcon, NavProdIcon, NavResourcesIcon, NavSalesIcon, NoteIcon, Number, NumberInput, OpportunityCircleIcon, OrderStatusIcon, Overlay, Padding, Page, PanelContact, PanelTileContact, PendingApprovalIcon, PercentIcon, PinIcon, Popup, PopupHeader, PopupProps, PresentationCircleIcon, Product, Progress, PromostandardsIcon, ProofReceivedIcon, ProofingCompleteIcon, Publisher, Radio, RadioIcon, RadioLabel, RadioProps, ReceiptLongIcon, ResponsiveTable, Row, RowPropTypes, SHARED_STYLE_MAPS, SalesArrowIcon, SalesOrderCircleIcon, SearchIcon, SKUSelect as Select, SharedStyleTypes, SharedStyles, ShopIcon, ShoppingCartIcon, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableProps, SimpleWindowedTableStyles, SizerCss, SizerTypes, SizerWrapper, Sparkles, Spinner, StarIcon, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, SubtractIcon, SVG as SvgIcon, TBody, TButtonIcon, TD, TDropdownItem, TH, THSorted, THead, TR, TSize$1 as TSize, TSizeOffset, TSizeOffsetRight, TSizeStyle, TTab, Tab, TabBar, Table, TableIcon, Tabs, TabsProps, TargetIcon, Task, TaskBody, TaskIcon, TaskLabel, TaskName, TaskProps, TasksCalendar, TasksCalendarDayBody, TasksCalendarFooter, TasksCalendarHeader, TemplateIcon, Text, TextProp, Textarea, Theme, Thermometer, TilesIcon, Toggle, ToggleLink, ToggleSwitch, ToggleSwitchProps, ToggleSwitchStatedProps, ToggleSwitchStyled, TrashIcon, UploadIcon, UserIcon, UsersIcon, VirtualTable, VirtualTableStyles, Wrapper, XIcon, colors, createMeasurementStyle, datepickerStyles, fontFamilies, fontStyles, fonts, getColor, getFontStyle, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeFontStyle, getThemeProperty, parseCskuStyles, sizes, themeOptions, toggleSizes, useCalendar, useClickOutside, useDelayUnmount, useFallbackRef, useLongPress, usePrefersReducedMotion, useRandomInterval, useWindowSize };
|
package/dist/index.es.js
CHANGED
|
@@ -360,10 +360,14 @@ var getUnit = function (measurement) {
|
|
|
360
360
|
var matchedMeasurement = measurement.match(/^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/);
|
|
361
361
|
return matchedMeasurement ? matchedMeasurement[2] : "px";
|
|
362
362
|
};
|
|
363
|
+
var isCalOrPercent = function (measurement) { return (measurement.endsWith('%') || measurement.includes('calc')); };
|
|
363
364
|
var stripUnit = function (measurement) {
|
|
364
365
|
return (typeof measurement === "number") ? measurement : parseFloat(measurement);
|
|
365
366
|
};
|
|
366
|
-
var parseMeasurement = function (measurement) {
|
|
367
|
+
var parseMeasurement = function (measurement) {
|
|
368
|
+
return typeof measurement === 'string' && isCalOrPercent(measurement)
|
|
369
|
+
? measurement : stripUnit(measurement) + getUnit(measurement);
|
|
370
|
+
};
|
|
367
371
|
var wait = function (time) {
|
|
368
372
|
var timeoutId;
|
|
369
373
|
var promise = new Promise(function (resolve) {
|
|
@@ -1140,6 +1144,13 @@ function DownloadIcon(_a) {
|
|
|
1140
1144
|
React__default.createElement("path", { d: "M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2Zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5Z", fill: color }));
|
|
1141
1145
|
}
|
|
1142
1146
|
|
|
1147
|
+
function UploadIcon(_a) {
|
|
1148
|
+
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.altText, altText = _d === void 0 ? "Upload" : _d, props = __rest(_a, ["color", "size", "altText"]);
|
|
1149
|
+
return React__default.createElement(SVG, __assign({ size: size, "aria-labelledby": "UploadIcon" }, props),
|
|
1150
|
+
React__default.createElement("title", { id: "UploadIcon" }, altText),
|
|
1151
|
+
React__default.createElement("path", { d: "M18 15V18H6V15H4V18C4 19.1 4.9 20 6 20H18C19.1 20 20 19.1 20 18V15H18ZM7 9L8.41 10.41L11 7.83V16H13V7.83L15.59 10.41L17 9L12 4L7 9Z", fill: color }));
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1143
1154
|
function MarketingStatusIcon(_a) {
|
|
1144
1155
|
var _b = _a.color, color = _b === void 0 ? teal.main : _b, _c = _a.size, size = _c === void 0 ? "medium" : _c, _d = _a.approved, approved = _d === void 0 ? false : _d, _e = _a.altText, altText = _e === void 0 ? "Marketing not allowed" : _e, props = __rest(_a, ["color", "size", "approved", "altText"]);
|
|
1145
1156
|
approved ? altText = "Marketing allowed" : altText = "Marketing not allowed";
|
|
@@ -2588,6 +2599,49 @@ function DoubleArrowIcon(_a) {
|
|
|
2588
2599
|
React__default.createElement("path", { d: directionPaths[1], fill: color })));
|
|
2589
2600
|
}
|
|
2590
2601
|
|
|
2602
|
+
var iconSizes$5 = {
|
|
2603
|
+
tiny: {
|
|
2604
|
+
width: 16,
|
|
2605
|
+
height: 16,
|
|
2606
|
+
viewBox: "0 0 32 32",
|
|
2607
|
+
},
|
|
2608
|
+
small: {
|
|
2609
|
+
width: 24,
|
|
2610
|
+
height: 24,
|
|
2611
|
+
viewBox: "0 0 32 32",
|
|
2612
|
+
},
|
|
2613
|
+
medium: {
|
|
2614
|
+
width: 32,
|
|
2615
|
+
height: 32,
|
|
2616
|
+
viewBox: "0 0 32 32",
|
|
2617
|
+
},
|
|
2618
|
+
large: {
|
|
2619
|
+
width: 40,
|
|
2620
|
+
height: 40,
|
|
2621
|
+
viewBox: "0 0 32 32",
|
|
2622
|
+
},
|
|
2623
|
+
huge: {
|
|
2624
|
+
width: 48,
|
|
2625
|
+
height: 48,
|
|
2626
|
+
viewBox: "0 0 32 32",
|
|
2627
|
+
},
|
|
2628
|
+
default: {
|
|
2629
|
+
width: 32,
|
|
2630
|
+
height: 32,
|
|
2631
|
+
viewBox: "0 0 32 32",
|
|
2632
|
+
},
|
|
2633
|
+
};
|
|
2634
|
+
function ImageIcon(props) {
|
|
2635
|
+
var _a = props.color, color = _a === void 0 ? teal.main : _a, _b = props.size, size = _b === void 0 ? "medium" : _b, _c = props.altText, altText = _c === void 0 ? "ImageIcon" : _c, rest = __rest(props, ["color", "size", "altText"]);
|
|
2636
|
+
var id = uniqueId('clip0_1244_70960');
|
|
2637
|
+
return (React__default.createElement(SVG, __assign({ size: size, iconSizes: iconSizes$5, "aria-labelledby": altText, fill: "none" }, rest),
|
|
2638
|
+
React__default.createElement("g", { clipPath: "url(#".concat(id, ")") },
|
|
2639
|
+
React__default.createElement("path", { d: "M25.3333 6.66667V25.3333H6.66667V6.66667H25.3333ZM25.3333 4H6.66667C5.2 4 4 5.2 4 6.66667V25.3333C4 26.8 5.2 28 6.66667 28H25.3333C26.8 28 28 26.8 28 25.3333V6.66667C28 5.2 26.8 4 25.3333 4ZM18.8533 15.8133L14.8533 20.9733L12 17.52L8 22.6667H24L18.8533 15.8133Z", fill: color })),
|
|
2640
|
+
React__default.createElement("defs", null,
|
|
2641
|
+
React__default.createElement("clipPath", { id: id },
|
|
2642
|
+
React__default.createElement("rect", { width: "32", height: "32", fill: "white" })))));
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2591
2645
|
var avatarSizes = {
|
|
2592
2646
|
tiny: {
|
|
2593
2647
|
size: '24px',
|
|
@@ -2793,6 +2847,20 @@ function DropzonedPreviews(_a) {
|
|
|
2793
2847
|
? React__default.createElement(ThumbsContainer, null, thumbs)
|
|
2794
2848
|
: React__default.createElement(PlaceHolder, null, placeholder))));
|
|
2795
2849
|
}
|
|
2850
|
+
function DropzonedSimple(_a) {
|
|
2851
|
+
var accept = _a.accept, children = _a.children, props = __rest(_a, ["accept", "children"]);
|
|
2852
|
+
var _b = useDropzone(__assign({ accept: accept }, props)), acceptedFiles = _b.acceptedFiles, getRootProps = _b.getRootProps, getInputProps = _b.getInputProps, isDragActive = _b.isDragActive, isDragAccept = _b.isDragAccept, isDragReject = _b.isDragReject;
|
|
2853
|
+
var Child = React__default.Children.only(children);
|
|
2854
|
+
if (!Child) {
|
|
2855
|
+
return null;
|
|
2856
|
+
}
|
|
2857
|
+
var ChildElem = React__default.cloneElement(Child, {
|
|
2858
|
+
acceptedFiles: acceptedFiles,
|
|
2859
|
+
inputProps: getInputProps(),
|
|
2860
|
+
rootProps: getRootProps({ isDragActive: isDragActive, isDragAccept: isDragAccept, isDragReject: isDragReject }),
|
|
2861
|
+
});
|
|
2862
|
+
return ChildElem;
|
|
2863
|
+
}
|
|
2796
2864
|
var templateObject_1$c, templateObject_2$7, templateObject_3$3, templateObject_4$2, templateObject_5$2, templateObject_6$1;
|
|
2797
2865
|
|
|
2798
2866
|
/*
|
|
@@ -6599,7 +6667,8 @@ var parseCskuStyles = function (p) {
|
|
|
6599
6667
|
});
|
|
6600
6668
|
return __spreadArray([stylesObj, sizeStylesObj], stylesArr, true);
|
|
6601
6669
|
};
|
|
6602
|
-
var Csku = styled.div(parseCskuStyles);
|
|
6670
|
+
var Csku = styled.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n", "\n ", "\n", "\n"], ["\n", "\n ", "\n", "\n"])), function (p) { return p.forceStyles ? '&&& {' : ''; }, parseCskuStyles, function (p) { return p.forceStyles ? '}' : ''; });
|
|
6671
|
+
var templateObject_1$O;
|
|
6603
6672
|
|
|
6604
6673
|
var Grid = styled.div(function (p) {
|
|
6605
6674
|
var params = {
|
|
@@ -6763,8 +6832,56 @@ var ConfirmPopup = function (props) {
|
|
|
6763
6832
|
}, disabled: disableDelete }, "Delete"))));
|
|
6764
6833
|
};
|
|
6765
6834
|
|
|
6766
|
-
var
|
|
6767
|
-
var
|
|
6835
|
+
var ConfirmAlertPopup = function (props) {
|
|
6836
|
+
var _a = props.padding, padding = _a === void 0 ? '16px' : _a, _b = props.maxWidth, maxWidth = _b === void 0 ? 555 : _b, _c = props.title, title = _c === void 0 ? '' : _c, _d = props.children, children = _d === void 0 ? 'Are you sure you want to perform this action?' : _d, _e = props.cancelButtonContent, cancelButtonContent = _e === void 0 ? 'Cancel' : _e, _f = props.actionButtonContent, actionButtonContent = _f === void 0 ? 'Delete' : _f, _g = props.disableActionButton, disableActionButton = _g === void 0 ? false : _g, onAction = props.onAction, onClose = props.onClose;
|
|
6837
|
+
return (React__default.createElement(Popup, { width: 'auto', height: 'auto', padding: padding, style: { borderRadius: 10, maxWidth: maxWidth, }, noHeader: true, noCloseButton: true },
|
|
6838
|
+
title ? React__default.createElement(PopupTitle, null, title) : null,
|
|
6839
|
+
React__default.createElement(PopupContent, null, children),
|
|
6840
|
+
React__default.createElement(Row, { style: { justifyContent: 'center', marginTop: 16, } },
|
|
6841
|
+
React__default.createElement(Col, { xs: true, md: 5.75, mdStyle: { marginRight: 16 } },
|
|
6842
|
+
React__default.createElement(Button, { size: "medium", variant: 'secondary', onClick: function () {
|
|
6843
|
+
onClose && onClose();
|
|
6844
|
+
}, style: { width: '100%' } }, cancelButtonContent)),
|
|
6845
|
+
React__default.createElement(Col, { xs: true, md: 5.75, xsStyle: { marginTop: 16 }, mdStyle: { marginTop: 0 } },
|
|
6846
|
+
React__default.createElement(Button, { size: "medium", variant: disableActionButton ? 'disabled' : 'error', onClick: function () {
|
|
6847
|
+
onAction && onAction();
|
|
6848
|
+
}, disabled: disableActionButton, style: { width: '100%' } }, actionButtonContent)))));
|
|
6849
|
+
};
|
|
6850
|
+
var PopupTitle = function (_a) {
|
|
6851
|
+
var children = _a.children;
|
|
6852
|
+
return (React__default.createElement("h2", { style: {
|
|
6853
|
+
fontFamily: 'var(--font-family-bold)',
|
|
6854
|
+
fontSize: fontStyles.h2.fontSize,
|
|
6855
|
+
lineHeight: fontStyles.h2.lineHeight,
|
|
6856
|
+
color: 'var(--color-neutrals-90)',
|
|
6857
|
+
paddingBottom: 16,
|
|
6858
|
+
margin: 0,
|
|
6859
|
+
} }, children));
|
|
6860
|
+
};
|
|
6861
|
+
var PopupContent = function (_a) {
|
|
6862
|
+
var children = _a.children;
|
|
6863
|
+
return (React__default.createElement("div", { style: {
|
|
6864
|
+
background: colors.errors[10],
|
|
6865
|
+
color: colors.errors.main,
|
|
6866
|
+
padding: 16,
|
|
6867
|
+
} },
|
|
6868
|
+
React__default.createElement("div", { style: { display: 'flex', flexDirection: 'row', justifyContent: 'center' } },
|
|
6869
|
+
React__default.createElement("div", { style: {
|
|
6870
|
+
paddingRight: 16,
|
|
6871
|
+
verticalAlign: 'middle',
|
|
6872
|
+
alignSelf: 'center',
|
|
6873
|
+
} },
|
|
6874
|
+
React__default.createElement(AlertIcon, { size: 'medium', color: colors.errors[70] })),
|
|
6875
|
+
React__default.createElement("div", { style: {
|
|
6876
|
+
fontFamily: 'var(--font-family-regular)',
|
|
6877
|
+
fontSize: fontStyles.p.large.fontSize,
|
|
6878
|
+
lineHeight: fontStyles.p.medium.lineHeight,
|
|
6879
|
+
color: colors.errors.main,
|
|
6880
|
+
} }, children))));
|
|
6881
|
+
};
|
|
6882
|
+
|
|
6883
|
+
var StyledDayBody = styled(Col)(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"], ["\n position: relative;\n height: auto;\n border-right: 1px solid #eee;\n overflow: hidden;\n cursor: pointer;\n background: #fff;\n transition: 0.25s ease-out;\n font-size: 1em;\n overflow-y: auto;\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background: #f9f9f9;\n transition: 0.5s ease-out;\n }\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n"])), function (p) { return p.selected ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.today ? "\n background: #f9f9f9;\n " : ''; }, function (p) { return p.row ? "\n border-bottom: 1px solid #eee;\n " : ''; }, function (p) { return p.disabled ? "\n color: #ccc;\n pointer-events: none;\n " : ''; });
|
|
6884
|
+
var templateObject_1$P;
|
|
6768
6885
|
|
|
6769
6886
|
var CalendarDayBody = function (_a) {
|
|
6770
6887
|
var day = _a.day, selectedDate = _a.selectedDate, onClick = _a.onClick, children = _a.children, weekend = _a.weekend, props = __rest(_a, ["day", "selectedDate", "onClick", "children", "weekend"]);
|
|
@@ -6779,8 +6896,8 @@ var CalendarDayBody = function (_a) {
|
|
|
6779
6896
|
return (React__default.createElement(StyledDayBody, __assign({ padded: true, totalCols: weekend ? 7 : 5, xs: 1, selected: isSelected, today: isToday, onClick: onClick, className: classNames }, props), children || React__default.createElement("span", { style: { padding: 10, } }, formattedDay)));
|
|
6780
6897
|
};
|
|
6781
6898
|
|
|
6782
|
-
var DaysBodyWrapper = styled.div(templateObject_1$
|
|
6783
|
-
var templateObject_1$
|
|
6899
|
+
var DaysBodyWrapper = styled.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"], ["\n font-size: 1em;\n font-weight: 300;\n line-height: 1;\n color: #777;\n background: #f9f9f9;\n position: relative;\n border-bottom: 1px solid #eee;\n"])));
|
|
6900
|
+
var templateObject_1$Q;
|
|
6784
6901
|
|
|
6785
6902
|
var CalendarDaysBody = function (_a) {
|
|
6786
6903
|
var _b = _a.days, days = _b === void 0 ? [] : _b, currentMonth = _a.currentMonth, selectedDate = _a.selectedDate, onClickDay = _a.onClickDay, components = _a.components, _c = _a.dayBodyProps, dayBodyProps = _c === void 0 ? {} : _c, _d = _a.weekend, weekend = _d === void 0 ? true : _d, props = __rest(_a, ["days", "currentMonth", "selectedDate", "onClickDay", "components", "dayBodyProps", "weekend"]);
|
|
@@ -6792,12 +6909,12 @@ var CalendarDaysBody = function (_a) {
|
|
|
6792
6909
|
}))));
|
|
6793
6910
|
};
|
|
6794
6911
|
|
|
6795
|
-
var DaysHeaderWrapper = styled(Row)(templateObject_1$
|
|
6796
|
-
var templateObject_1$Q;
|
|
6797
|
-
|
|
6798
|
-
var StyledDayText = styled(Text)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: ".concat(colors.cta, ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n ") : ''; });
|
|
6912
|
+
var DaysHeaderWrapper = styled(Row)(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"], ["\n text-transform: uppercase;\n font-weight: 400;\n color: #ccc;\n font-size: 70%;\n padding: 0.75em 0 !important;\n border-bottom: 1px solid #eee;\n"])));
|
|
6799
6913
|
var templateObject_1$R;
|
|
6800
6914
|
|
|
6915
|
+
var StyledDayText = styled(Text)(templateObject_1$S || (templateObject_1$S = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) { return props.selected ? "\n border-radius: 15px;\n background: ".concat(colors.cta, ";\n color: white;\n font-weight: bold;\n padding: 0 5px;\n ") : ''; });
|
|
6916
|
+
var templateObject_1$S;
|
|
6917
|
+
|
|
6801
6918
|
var CalendarDaysHeader = function (_a) {
|
|
6802
6919
|
var currentMonth = _a.currentMonth, selectedDate = _a.selectedDate, weekend = _a.weekend;
|
|
6803
6920
|
var startDate = startOfWeek(currentMonth, { weekStartsOn: 1 });
|
|
@@ -6811,12 +6928,12 @@ var CalendarDaysHeader = function (_a) {
|
|
|
6811
6928
|
})));
|
|
6812
6929
|
};
|
|
6813
6930
|
|
|
6814
|
-
var CalendarWrapper = styled.div(templateObject_1$
|
|
6815
|
-
var templateObject_1$S;
|
|
6816
|
-
|
|
6817
|
-
var HeaderWrapper = styled(Row)(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"], ["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"])));
|
|
6931
|
+
var CalendarWrapper = styled.div(templateObject_1$T || (templateObject_1$T = __makeTemplateObject(["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"], ["\n display: block;\n position: relative;\n width: 100%;\n background: #fff;\n .calendar-scroll {\n overflow-x: scroll;\n }\n .days-body-wrapper, .days-header-wrapper {\n min-width: 900px;\n }\n"])));
|
|
6818
6932
|
var templateObject_1$T;
|
|
6819
6933
|
|
|
6934
|
+
var HeaderWrapper = styled(Row)(templateObject_1$U || (templateObject_1$U = __makeTemplateObject(["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"], ["\n width: 100%;\n padding: 1.75em 0 !important;\n border-bottom: 1px solid #eee;\n background: #fff;\n font-weight: 700;\n font-size: 100%;\n"])));
|
|
6935
|
+
var templateObject_1$U;
|
|
6936
|
+
|
|
6820
6937
|
var DefaultCalendarFooter = function (_a) {
|
|
6821
6938
|
var currentWeek = _a.currentWeek;
|
|
6822
6939
|
return (React__default.createElement(HeaderWrapper, { middle: true },
|
|
@@ -6848,7 +6965,7 @@ var TasksCalendarDayBody = function (_a) {
|
|
|
6848
6965
|
React__default.createElement(CalendarTask, __assign({}, t, { date: undefined })))); })));
|
|
6849
6966
|
};
|
|
6850
6967
|
|
|
6851
|
-
var WeekNav = styled(Text)(templateObject_1$
|
|
6968
|
+
var WeekNav = styled(Text)(templateObject_1$V || (templateObject_1$V = __makeTemplateObject(["\n display: inline-block;\n padding: 0;\n"], ["\n display: inline-block;\n padding: 0;\n"])));
|
|
6852
6969
|
var CalendarIconDatePicker = React__default.forwardRef(function (_a, ref) {
|
|
6853
6970
|
var value = _a.value, onClick = _a.onClick;
|
|
6854
6971
|
return (React__default.createElement("span", { ref: ref, onClick: onClick },
|
|
@@ -6921,7 +7038,7 @@ var TasksCalendarHeader = function (_a) {
|
|
|
6921
7038
|
} }, "+ Add Task")
|
|
6922
7039
|
: null)));
|
|
6923
7040
|
};
|
|
6924
|
-
var templateObject_1$
|
|
7041
|
+
var templateObject_1$V;
|
|
6925
7042
|
|
|
6926
7043
|
var TasksCalendarFooter = function (_a) {
|
|
6927
7044
|
var currentWeek = _a.currentWeek, _b = _a.tasks, tasks = _b === void 0 ? [] : _b;
|
|
@@ -7273,7 +7390,7 @@ var scrollbarWidth = function () {
|
|
|
7273
7390
|
return scrollbarWidth;
|
|
7274
7391
|
};
|
|
7275
7392
|
|
|
7276
|
-
var SimpleWindowedTableStyles = styled.div(templateObject_1$
|
|
7393
|
+
var SimpleWindowedTableStyles = styled.div(templateObject_1$W || (templateObject_1$W = __makeTemplateObject(["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"], ["\npadding: 1rem;\n\n.table-list-rows {\n width: 100% !important;\n\n ", "\n}\n\n.table {\n display: inline-block;\n border-spacing: 0;\n width: 100%;\n min-width: 100% !important;\n\n ", "\n\n .header.tr, .table-footer.tr {\n width: 100% !important;\n min-width: 100% !important;\n overflow-x: hidden;\n }\n\n .tr {\n :last-child {\n .td {\n border-bottom: 0;\n }\n }\n }\n\n .th {\n border-bottom: 2px solid ", ";\n\n div {\n display: inline-block;\n }\n }\n\n .td {\n border-bottom: 1px solid ", ";\n }\n\n /* set hover styles */\n ", "\n\n /* row selected => if selectedRowStyle === true then set background color else set given styles */\n ", "\n\n .th,\n .td {\n margin: 0;\n padding: 0.5rem;\n }\n}\n"])), function (p) { return p.rowClickable ? "\n .tr {\n cursor: pointer;\n }\n " : ''; }, function (p) { return p.bordered ?
|
|
7277
7394
|
"border: ".concat(typeof p.bordered === 'string'
|
|
7278
7395
|
? p.bordered
|
|
7279
7396
|
: "1px solid ".concat(getThemeColor(p, 'tableBorder', '#edf2f5')), ";")
|
|
@@ -7363,7 +7480,64 @@ function SimpleWindowedTable(_a) {
|
|
|
7363
7480
|
React__default.createElement("div", __assign({}, getTableBodyProps()), rows.length === 0 && NoRowsFound ? React__default.createElement(NoRowsFound, null) : React__default.createElement(FixedSizeList, { height: height, itemCount: rows.length, itemSize: itemSize, width: totalColumnsWidth + scrollBarSize, className: "table-list-rows", outerRef: rowsRef, onScroll: onScroll, useIsScrolling: true }, RenderRow)),
|
|
7364
7481
|
!hideFooter ? React__default.createElement("div", __assign({}, tableFooterProps, { className: "table-footer-wrapper ".concat(tableFooterProps.className || '') }), footerGroups.map(function (footerGroup) { return (React__default.createElement("div", __assign({}, getHeaderGroupProps(footerGroup, true), { className: "table-footer tr", ref: footerRef }), footerGroup.headers.map(function (column) { return (React__default.createElement("div", __assign({}, getHeaderProps(column, true)), column.render("Footer"))); }))); })) : null));
|
|
7365
7482
|
}
|
|
7366
|
-
var templateObject_1$
|
|
7483
|
+
var templateObject_1$W;
|
|
7484
|
+
|
|
7485
|
+
var toggleSizes$1 = {
|
|
7486
|
+
small: {
|
|
7487
|
+
'font-family': fontStyles.button.small.fontFamily,
|
|
7488
|
+
'font-size': fontStyles.button.small.fontSize,
|
|
7489
|
+
'line-height': fontStyles.button.small.lineHeight,
|
|
7490
|
+
padding: '8px 12px',
|
|
7491
|
+
borderRadius: '4px',
|
|
7492
|
+
height: '15px',
|
|
7493
|
+
},
|
|
7494
|
+
medium: {
|
|
7495
|
+
'font-family': fontStyles.button.medium.fontFamily,
|
|
7496
|
+
'font-size': fontStyles.button.medium.fontSize,
|
|
7497
|
+
'line-height': fontStyles.button.medium.lineHeight,
|
|
7498
|
+
padding: '8px 16px',
|
|
7499
|
+
borderRadius: '4px',
|
|
7500
|
+
height: '20px',
|
|
7501
|
+
},
|
|
7502
|
+
large: {
|
|
7503
|
+
'font-family': fontStyles.button.large.fontFamily,
|
|
7504
|
+
'font-size': fontStyles.button.large.fontSize,
|
|
7505
|
+
'line-height': fontStyles.button.large.lineHeight,
|
|
7506
|
+
padding: '12px 24px',
|
|
7507
|
+
borderRadius: '4px',
|
|
7508
|
+
height: '35px',
|
|
7509
|
+
}
|
|
7510
|
+
};
|
|
7511
|
+
var createAnimationLeftStyle = function (p) {
|
|
7512
|
+
if (p.stretch) {
|
|
7513
|
+
return "calc(100% * 1.5px)";
|
|
7514
|
+
}
|
|
7515
|
+
return "".concat(stripUnit(toggleSizes$1[p.size || 'medium'].height) * 1.5, "px");
|
|
7516
|
+
};
|
|
7517
|
+
var ContainerStyled = styled(Csku)(templateObject_1$X || (templateObject_1$X = __makeTemplateObject(["\n &&& {\n position: relative;\n background: ", ";\n width: ", ";\n padding: 0.35rem;\n border-radius: 1.8rem;\n cursor: pointer;\n transition: background .3s;\n\n @keyframes switch-slide-to-right {\n from { left: 0; }\n to {\n left: ", ";\n }\n }\n \n @keyframes switch-slide-to-left {\n from {\n left: ", ";\n }\n to { left: 0; }\n }\n }"], ["\n &&& {\n position: relative;\n background: ", ";\n width: ", ";\n padding: 0.35rem;\n border-radius: 1.8rem;\n cursor: pointer;\n transition: background .3s;\n\n @keyframes switch-slide-to-right {\n from { left: 0; }\n to {\n left: ", ";\n }\n }\n \n @keyframes switch-slide-to-left {\n from {\n left: ", ";\n }\n to { left: 0; }\n }\n }"])), function (p) { return p.selected
|
|
7518
|
+
? getThemeColor(p, 'teal.main', 'var(--color-primary1-main)')
|
|
7519
|
+
: getThemeColor(p, 'teal.20', colors.teal['20']); }, function (p) { return p.stretch
|
|
7520
|
+
? '100%'
|
|
7521
|
+
: "".concat(stripUnit(toggleSizes$1[p.size || 'medium'].height) * 2.5, "px"); }, createAnimationLeftStyle, createAnimationLeftStyle);
|
|
7522
|
+
var ToggleSwitchDotStyled = styled(Csku)(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n &&& {\n position: relative;\n background: #FFFFFF;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n\n animation: ", ";\n }\n"], ["\n &&& {\n position: relative;\n background: #FFFFFF;\n width: ", ";\n height: ", ";\n border-radius: 50%;\n\n animation: ", ";\n }\n"])), function (p) { return toggleSizes$1[p.size || 'medium'].height; }, function (p) { return toggleSizes$1[p.size || 'medium'].height; }, function (p) { return p.selected
|
|
7523
|
+
? 'switch-slide-to-right .3s forwards 1'
|
|
7524
|
+
: 'switch-slide-to-left .3s forwards 1'; });
|
|
7525
|
+
var ToggleSwitchStyled = function (_a) {
|
|
7526
|
+
var onClick = _a.onClick, _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, _d = _a.stretch, stretch = _d === void 0 ? false : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["onClick", "size", "selected", "stretch", "style"]);
|
|
7527
|
+
return (React__default.createElement(ContainerStyled, __assign({ selected: selected, stretch: stretch, size: size, onClick: onClick, style: style }, props),
|
|
7528
|
+
React__default.createElement(ToggleSwitchDotStyled, { selected: selected, stretch: stretch, size: size })));
|
|
7529
|
+
};
|
|
7530
|
+
var ToggleSwitch = function (_a) {
|
|
7531
|
+
var _b = _a.size, size = _b === void 0 ? 'medium' : _b, _c = _a.initialSelected, initialSelected = _c === void 0 ? false : _c, _d = _a.stretch, stretch = _d === void 0 ? false : _d, onClick = _a.onClick, props = __rest(_a, ["size", "initialSelected", "stretch", "onClick"]);
|
|
7532
|
+
var _e = useState(initialSelected), state = _e[0], setState = _e[1];
|
|
7533
|
+
var handleToggle = function () {
|
|
7534
|
+
var value = !state;
|
|
7535
|
+
setState(value);
|
|
7536
|
+
onClick && onClick(value);
|
|
7537
|
+
};
|
|
7538
|
+
return (React__default.createElement(ToggleSwitchStyled, __assign({}, props, { selected: state, stretch: stretch, size: size, onClick: handleToggle })));
|
|
7539
|
+
};
|
|
7540
|
+
var templateObject_1$X, templateObject_2$z;
|
|
7367
7541
|
|
|
7368
|
-
export { AddIcon, AddNoteIcon, AddShoppingCartIcon, AddTaskIcon, AlertIcon, AlertNotification, ArrowIcon, Artwork, SKUAsyncSelect as AsyncSelect, Avatar, AwaitingProofIcon, Backdrop, Background, Badge, BotIcon, Box, BulletIcon, Button, ButtonsGroup, Calendar, CalendarDayBody, CalendarDaysBody, CalendarDaysHeader, CalendarIcon, CalendarTask, CalendarWrapper, CancelButton, ChangeRequestedIcon, ChatIcon, CheckMark, CheckboxIcon, CheckboxLabel, CheckmarkIcon, ChevronIcon, CircleProgressIcon, ClientApprovedIcon, ClipboardIcon, ClockIcon, Col, CollaborateIcon, CollapseStyled, CollapseWrapper, Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelTitle, CollapsiblePanels, Collapsible$1 as CollapsibleV2, Collapsibles, Column, ColumnSelectIcon, CommentIcon, CommunityIcon, CompletedCheckmarkIcon, ConfirmPopup, ConnectedIcon, ConnectedPlusIcon, CouponIcon, SKUCreatableSelect as CreatableSelect, CreditCardIcon, Csku, CustomDateInput, Datepicker, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, DefaultStar, DollarIcon, DoneButton, Dot, DoubleArrowIcon, DownloadIcon, DragIcon, DraggableTasksCalendar, DropArea, DropDownContent, Dropdown, DropdownItem, Dropzoned, DropzonedPreviews, EPOIcon, EditIcon, EllipsisIcon, EpsIcon, ErrorBoundary, EstimateCircleIcon, EyeIcon, FeedPost, FileUploadIcon, FilledChevronIcon, FolderIcon, GalleryIcon, GearIcon, GlobalStyle, Grid, GridCell, GridIcon, GridItem, GridRow, GridTable, GridTableContainer, H1, H2, H3, H4, H5, H6, HandleIcon, HeaderWrapper, HeadlessTable, HelpIcon, HistoryIcon, IconButton, IconDoc, Img, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, InputStepper, InputStepperStyled, IntegrationsIcon, InventoryIcon, Label, LabeledAsyncSelect, LabeledCheckbox, LabeledCreatableSelect, LabeledIconInput, LabeledInput, LabeledMultiProgress, LabeledProgress, LabeledRadio, LabeledRadioGroup, LabeledRadioInButton, LabeledRadioInButtonGroup, LabeledSelect, LabeledTextarea, LightIndicator, Link, LinkWithIcon, ListIcon, Loading, LockIcon, MailIcon, MarketingStatusIcon, MenuIcon, MultiProgress, NavConnectIcon, NavFinanceIcon, NavManagementIcon, NavProdIcon, NavResourcesIcon, NavSalesIcon, NoteIcon, Number$1 as Number, NumberInput, OpportunityCircleIcon, OrderStatusIcon, Overlay, Padding, Page, PanelContact, PanelTileContact, PendingApprovalIcon, PercentIcon, PinIcon, Popup, PopupHeader, PresentationCircleIcon, Product, Progress, PromostandardsIcon, ProofReceivedIcon, ProofingCompleteIcon, Publisher, Radio, RadioIcon, RadioLabel, ReceiptLongIcon, ResponsiveTable, Row, SHARED_STYLE_MAPS, SalesArrowIcon, SalesOrderCircleIcon, SearchIcon, SKUSelect as Select, SharedStyles, ShopIcon, ShoppingCartIcon, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableStyles, SizerCss, SizerWrapper, Sparkles, Spinner, StarIcon, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, SubtractIcon, SVG as SvgIcon, TBody, TD, TH, THSorted, THead, TR, Tab, TabBar, Table, TableIcon, Tabs, TargetIcon, Task, TaskBody, TaskIcon, TaskLabel, TaskName, TasksCalendar, TasksCalendarDayBody, TasksCalendarFooter, TasksCalendarHeader, TemplateIcon, Text, Textarea, Theme, Thermometer, TilesIcon, Toggle, ToggleLink, TrashIcon, UserIcon, UsersIcon, VirtualTable, VirtualTableStyles, Wrapper, XIcon, colors, createMeasurementStyle, datepickerStyles, fontFamilies, fontStyles, fonts, getColor, getFontStyle, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeFontStyle, getThemeProperty, parseCskuStyles, sizes$1 as sizes, themeOptions, toggleSizes, useCalendar, useClickOutside, useDelayUnmount, useFallbackRef, useLongPress, usePrefersReducedMotion, useRandomInterval, useWindowSize };
|
|
7542
|
+
export { AddIcon, AddNoteIcon, AddShoppingCartIcon, AddTaskIcon, AlertIcon, AlertNotification, ArrowIcon, Artwork, SKUAsyncSelect as AsyncSelect, Avatar, AwaitingProofIcon, Backdrop, Background, Badge, BotIcon, Box, BulletIcon, Button, ButtonsGroup, Calendar, CalendarDayBody, CalendarDaysBody, CalendarDaysHeader, CalendarIcon, CalendarTask, CalendarWrapper, CancelButton, ChangeRequestedIcon, ChatIcon, CheckMark, CheckboxIcon, CheckboxLabel, CheckmarkIcon, ChevronIcon, CircleProgressIcon, ClientApprovedIcon, ClipboardIcon, ClockIcon, Col, CollaborateIcon, CollapseStyled, CollapseWrapper, Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelTitle, CollapsiblePanels, Collapsible$1 as CollapsibleV2, Collapsibles, Column, ColumnSelectIcon, CommentIcon, CommunityIcon, CompletedCheckmarkIcon, ConfirmAlertPopup, ConfirmPopup, ConnectedIcon, ConnectedPlusIcon, CouponIcon, SKUCreatableSelect as CreatableSelect, CreditCardIcon, Csku, CustomDateInput, Datepicker, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, DefaultStar, DollarIcon, DoneButton, Dot, DoubleArrowIcon, DownloadIcon, DragIcon, DraggableTasksCalendar, DropArea, DropDownContent, Dropdown, DropdownItem, Dropzoned, DropzonedPreviews, DropzonedSimple, EPOIcon, EditIcon, EllipsisIcon, EpsIcon, ErrorBoundary, EstimateCircleIcon, EyeIcon, FeedPost, FileUploadIcon, FilledChevronIcon, FolderIcon, GalleryIcon, GearIcon, GlobalStyle, Grid, GridCell, GridIcon, GridItem, GridRow, GridTable, GridTableContainer, H1, H2, H3, H4, H5, H6, HandleIcon, HeaderWrapper, HeadlessTable, HelpIcon, HistoryIcon, IconButton, IconDoc, ImageIcon, Img, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, InputStepper, InputStepperStyled, IntegrationsIcon, InventoryIcon, Label, LabeledAsyncSelect, LabeledCheckbox, LabeledCreatableSelect, LabeledIconInput, LabeledInput, LabeledMultiProgress, LabeledProgress, LabeledRadio, LabeledRadioGroup, LabeledRadioInButton, LabeledRadioInButtonGroup, LabeledSelect, LabeledTextarea, LightIndicator, Link, LinkWithIcon, ListIcon, Loading, LockIcon, MailIcon, MarketingStatusIcon, MenuIcon, MultiProgress, NavConnectIcon, NavFinanceIcon, NavManagementIcon, NavProdIcon, NavResourcesIcon, NavSalesIcon, NoteIcon, Number$1 as Number, NumberInput, OpportunityCircleIcon, OrderStatusIcon, Overlay, Padding, Page, PanelContact, PanelTileContact, PendingApprovalIcon, PercentIcon, PinIcon, Popup, PopupHeader, PresentationCircleIcon, Product, Progress, PromostandardsIcon, ProofReceivedIcon, ProofingCompleteIcon, Publisher, Radio, RadioIcon, RadioLabel, ReceiptLongIcon, ResponsiveTable, Row, SHARED_STYLE_MAPS, SalesArrowIcon, SalesOrderCircleIcon, SearchIcon, SKUSelect as Select, SharedStyles, ShopIcon, ShoppingCartIcon, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableStyles, SizerCss, SizerWrapper, Sparkles, Spinner, StarIcon, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, SubtractIcon, SVG as SvgIcon, TBody, TD, TH, THSorted, THead, TR, Tab, TabBar, Table, TableIcon, Tabs, TargetIcon, Task, TaskBody, TaskIcon, TaskLabel, TaskName, TasksCalendar, TasksCalendarDayBody, TasksCalendarFooter, TasksCalendarHeader, TemplateIcon, Text, Textarea, Theme, Thermometer, TilesIcon, Toggle, ToggleLink, ToggleSwitch, ToggleSwitchStyled, TrashIcon, UploadIcon, UserIcon, UsersIcon, VirtualTable, VirtualTableStyles, Wrapper, XIcon, colors, createMeasurementStyle, datepickerStyles, fontFamilies, fontStyles, fonts, getColor, getFontStyle, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeFontStyle, getThemeProperty, parseCskuStyles, sizes$1 as sizes, themeOptions, toggleSizes, useCalendar, useClickOutside, useDelayUnmount, useFallbackRef, useLongPress, usePrefersReducedMotion, useRandomInterval, useWindowSize };
|
|
7369
7543
|
//# sourceMappingURL=index.es.js.map
|