@commonsku/styles 1.16.13 → 1.16.15
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 +110 -17
- package/dist/index.es.js +111 -47
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +131 -47
- package/dist/index.js.map +1 -1
- package/dist/styles/DropArea.d.ts +0 -4
- package/dist/styles/DropArea.d.ts.map +1 -1
- package/dist/styles/Dropzone.d.ts +69 -0
- package/dist/styles/Dropzone.d.ts.map +1 -0
- package/dist/styles/ErrorBoundary.d.ts +3 -2
- package/dist/styles/ErrorBoundary.d.ts.map +1 -1
- package/dist/styles/NumberInput.d.ts.map +1 -1
- package/dist/styles/RenderChild.d.ts +14 -0
- package/dist/styles/RenderChild.d.ts.map +1 -0
- package/dist/styles/Select.d.ts +15 -0
- package/dist/styles/Select.d.ts.map +1 -1
- package/dist/styles/Sparkles.d.ts +2 -2
- package/dist/styles/Sparkles.d.ts.map +1 -1
- package/dist/styles/calendar/Calendar.d.ts.map +1 -1
- package/dist/styles/calendar/DraggableTasksCalendar.d.ts.map +1 -1
- package/dist/styles/calendar/TasksCalendar.d.ts.map +1 -1
- package/dist/styles/calendar/types.d.ts +1 -1
- package/dist/styles/calendar/types.d.ts.map +1 -1
- package/dist/styles/datepickerStyles.d.ts +1 -1
- package/dist/styles/datepickerStyles.d.ts.map +1 -1
- package/dist/styles/icons/EstimateCircleIcon.d.ts.map +1 -1
- package/dist/styles/icons/OpportunityCircleIcon.d.ts.map +1 -1
- package/dist/styles/icons/PresentationCircleIcon.d.ts.map +1 -1
- package/dist/styles/icons/SalesOrderCircleIcon.d.ts.map +1 -1
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/styles/tables/SimpleWindowedTable.d.ts.map +1 -1
- package/dist/styles/tables/VirtualTable.d.ts +4 -3
- package/dist/styles/tables/VirtualTable.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import * as React$1 from 'react';
|
|
|
3
3
|
import React__default, { CSSProperties, MouseEvent, Component, ReactEventHandler, MouseEventHandler, ReactNode, MutableRefObject, ForwardedRef } from 'react';
|
|
4
4
|
import * as styled_components from 'styled-components';
|
|
5
5
|
import { CSSObject, DefaultTheme, ThemeProps, CSSProperties as CSSProperties$1, StyledComponent } from 'styled-components';
|
|
6
|
-
import
|
|
6
|
+
import * as react_dropzone from 'react-dropzone';
|
|
7
|
+
import { DropzoneOptions, DropzoneRootProps, DropzoneInputProps, DropzoneRef, DropzoneState } from 'react-dropzone';
|
|
7
8
|
import * as react_select_dist_declarations_src_useAsync from 'react-select/dist/declarations/src/useAsync';
|
|
8
9
|
import * as react_select_dist_declarations_src_useCreatable from 'react-select/dist/declarations/src/useCreatable';
|
|
9
10
|
import * as react_select_dist_declarations_src_useStateManager from 'react-select/dist/declarations/src/useStateManager';
|
|
@@ -14,7 +15,7 @@ import * as react_select_dist_declarations_src_filters from 'react-select/dist/d
|
|
|
14
15
|
import * as react_select_dist_declarations_src_components from 'react-select/dist/declarations/src/components';
|
|
15
16
|
import * as react_select_dist_declarations_src_Select from 'react-select/dist/declarations/src/Select';
|
|
16
17
|
import BaseDatePicker, { ReactDatePickerProps } from 'react-datepicker';
|
|
17
|
-
import {
|
|
18
|
+
import { HeaderGroup, UseSortByColumnProps, UseTableRowProps, UseExpandedRowProps, UseGroupByRowProps, UseRowSelectRowProps, UseRowStateRowProps, Column as Column$1, SortingRule, Cell } from 'react-table';
|
|
18
19
|
import { ListOnScrollProps } from 'react-window';
|
|
19
20
|
|
|
20
21
|
declare type SharedStyleTypes = {
|
|
@@ -142,11 +143,7 @@ declare type DropzoneTypes = {
|
|
|
142
143
|
showDroppedFiles?: boolean;
|
|
143
144
|
} & DropzoneOptions;
|
|
144
145
|
declare function Dropzoned({ placeholder, accept, showDroppedFiles, ...props }: DropzoneTypes): JSX.Element;
|
|
145
|
-
declare function DropzonedPreviews({ placeholder, accept, onDrop, ...props }: DropzoneTypes): JSX.Element;
|
|
146
|
-
declare type DropzoneSimpleProps = {
|
|
147
|
-
children: React__default.ReactElement;
|
|
148
|
-
} & DropzoneOptions;
|
|
149
|
-
declare function DropzonedSimple({ accept, children, ...props }: DropzoneSimpleProps): React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
146
|
+
declare function DropzonedPreviews({ placeholder, accept, onDrop, ...props }: DropzoneTypes): JSX.Element;
|
|
150
147
|
|
|
151
148
|
declare type TSize$1 = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
152
149
|
|
|
@@ -567,6 +564,18 @@ declare type AdditionalSKUSelectProps = {
|
|
|
567
564
|
error?: boolean;
|
|
568
565
|
menuRelative?: boolean;
|
|
569
566
|
inPopup?: boolean;
|
|
567
|
+
controlStyles?: React__default.CSSProperties;
|
|
568
|
+
menuStyles?: React__default.CSSProperties;
|
|
569
|
+
menuListStyles?: React__default.CSSProperties;
|
|
570
|
+
menuPortalStyles?: React__default.CSSProperties;
|
|
571
|
+
optionStyles?: React__default.CSSProperties;
|
|
572
|
+
inputStyles?: React__default.CSSProperties;
|
|
573
|
+
clearIndicatorStyles?: React__default.CSSProperties;
|
|
574
|
+
dropdownIndicatorStyles?: React__default.CSSProperties;
|
|
575
|
+
indicatorSeparatorStyles?: React__default.CSSProperties;
|
|
576
|
+
singleValueStyles?: React__default.CSSProperties;
|
|
577
|
+
valueContainerStyles?: React__default.CSSProperties;
|
|
578
|
+
containerStyles?: React__default.CSSProperties;
|
|
570
579
|
};
|
|
571
580
|
declare const SKUSelect: React__default.ForwardRefExoticComponent<AdditionalSKUSelectProps & Omit<Pick<react_select_dist_declarations_src_Select.Props<unknown, boolean, GroupBase<unknown>>, "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "ariaLiveMessages" | "autoFocus" | "className" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "id" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "name" | "onBlur" | "onChange" | "onFocus" | "onInputChange" | "onKeyDown" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom" | "theme" | "value" | "form"> & {
|
|
572
581
|
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
@@ -747,6 +756,7 @@ declare const LabeledSelect: React__default.ForwardRefExoticComponent<Additional
|
|
|
747
756
|
tabSelectsValue?: boolean | undefined;
|
|
748
757
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<unknown> & {
|
|
749
758
|
parentStyle?: React__default.CSSProperties | undefined;
|
|
759
|
+
labelStyle?: React__default.CSSProperties | undefined;
|
|
750
760
|
label?: string | undefined;
|
|
751
761
|
required?: boolean | undefined;
|
|
752
762
|
} & React__default.RefAttributes<SelectInstance<unknown, boolean, GroupBase<unknown>>>>;
|
|
@@ -929,6 +939,7 @@ declare const LabeledCreatableSelect: React__default.ForwardRefExoticComponent<A
|
|
|
929
939
|
tabSelectsValue?: boolean | undefined;
|
|
930
940
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<unknown> & react_select_dist_declarations_src_useCreatable.CreatableAdditionalProps<unknown, GroupBase<unknown>> & {
|
|
931
941
|
parentStyle?: React__default.CSSProperties | undefined;
|
|
942
|
+
labelStyle?: React__default.CSSProperties | undefined;
|
|
932
943
|
label?: string | undefined;
|
|
933
944
|
required?: boolean | undefined;
|
|
934
945
|
} & React__default.RefAttributes<SelectInstance<unknown, false, GroupBase<unknown>>>>;
|
|
@@ -1111,6 +1122,7 @@ declare const LabeledAsyncSelect: React__default.ForwardRefExoticComponent<Addit
|
|
|
1111
1122
|
tabSelectsValue?: boolean | undefined;
|
|
1112
1123
|
} & {}> & react_select_dist_declarations_src_useStateManager.StateManagerAdditionalProps<unknown> & react_select_dist_declarations_src_useAsync.AsyncAdditionalProps<unknown, GroupBase<unknown>> & {
|
|
1113
1124
|
parentStyle?: React__default.CSSProperties | undefined;
|
|
1125
|
+
labelStyle?: React__default.CSSProperties | undefined;
|
|
1114
1126
|
label?: string | undefined;
|
|
1115
1127
|
required?: boolean | undefined;
|
|
1116
1128
|
} & React__default.RefAttributes<SelectInstance<unknown, false, GroupBase<unknown>>>>;
|
|
@@ -2482,8 +2494,9 @@ declare const FeedPost: (props: React__default.PropsWithChildren<{
|
|
|
2482
2494
|
declare type StateType = {
|
|
2483
2495
|
hasError: boolean;
|
|
2484
2496
|
};
|
|
2485
|
-
declare
|
|
2486
|
-
|
|
2497
|
+
declare type ErrorBoundaryProps = React__default.PropsWithChildren<{}>;
|
|
2498
|
+
declare class ErrorBoundary extends Component<ErrorBoundaryProps, StateType> {
|
|
2499
|
+
constructor(props: ErrorBoundaryProps);
|
|
2487
2500
|
componentDidCatch(error: Error | any, info: string | any): void;
|
|
2488
2501
|
render(): React__default.ReactNode;
|
|
2489
2502
|
}
|
|
@@ -2577,9 +2590,9 @@ declare type HeadlessTableProps = React__default.PropsWithChildren<{
|
|
|
2577
2590
|
} & SharedStyleTypes>;
|
|
2578
2591
|
declare function HeadlessTable({ columns, data, rowIdField, defaultSort, defaultPageSize, defaultPageIndex, defaultScrollOffset, defaultHorizontalOffset, pageIndexDivRef, onChangeSelected, onChangeSortOrColumns, scrollOffsetDivRef, horizontalOffsetDivRef, selectedRowId, sortDirectionDivRef, currentColumnsDivRef, minHeight, pagination }: HeadlessTableProps): JSX.Element;
|
|
2579
2592
|
|
|
2580
|
-
declare const Sparkles: React__default.FC<{
|
|
2593
|
+
declare const Sparkles: React__default.FC<React__default.PropsWithChildren<{
|
|
2581
2594
|
color: string;
|
|
2582
|
-
}
|
|
2595
|
+
}>>;
|
|
2583
2596
|
|
|
2584
2597
|
declare type DropdownContentProps$1 = {
|
|
2585
2598
|
text?: string;
|
|
@@ -2848,8 +2861,12 @@ declare type InputStepperStyledProps = Omit<NumberInputProps, 'onChange'> & {
|
|
|
2848
2861
|
declare function InputStepperStyled(props: InputStepperStyledProps): JSX.Element;
|
|
2849
2862
|
declare function InputStepper(props: InputStepperProps): JSX.Element;
|
|
2850
2863
|
|
|
2851
|
-
interface
|
|
2852
|
-
|
|
2864
|
+
interface BaseSortByHeaderGroup<D extends object = {}> extends HeaderGroup<D>, UseSortByColumnProps<D> {
|
|
2865
|
+
containerProps?: object;
|
|
2866
|
+
style?: React__default.CSSProperties;
|
|
2867
|
+
className?: string;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2853
2870
|
interface Row<D extends Record<string, unknown> = Record<string, unknown>> extends UseTableRowProps<D>, UseExpandedRowProps<D>, UseGroupByRowProps<D>, UseRowSelectRowProps<D>, UseRowStateRowProps<D> {
|
|
2854
2871
|
}
|
|
2855
2872
|
|
|
@@ -2865,7 +2882,7 @@ declare type VirtualTableProps = {
|
|
|
2865
2882
|
maxWidth?: number;
|
|
2866
2883
|
defaultSort?: SortingRule<string>;
|
|
2867
2884
|
onClickRow?: (row?: object, index?: number, data?: {
|
|
2868
|
-
isScrolling
|
|
2885
|
+
isScrolling?: boolean;
|
|
2869
2886
|
cell: Cell<Record<string, unknown>, any>;
|
|
2870
2887
|
resetList: (index?: number) => void;
|
|
2871
2888
|
toggleAllRowsExpanded: (value?: boolean | undefined) => void;
|
|
@@ -2895,7 +2912,7 @@ declare type VirtualTableProps = {
|
|
|
2895
2912
|
[key: string]: any;
|
|
2896
2913
|
}>) => React__default.ReactElement;
|
|
2897
2914
|
onSort?: (value: {
|
|
2898
|
-
column:
|
|
2915
|
+
column: BaseSortByHeaderGroup<object>;
|
|
2899
2916
|
}) => void;
|
|
2900
2917
|
onResize?: VoidFunction;
|
|
2901
2918
|
rowGroupStyles?: (value: {
|
|
@@ -3417,7 +3434,7 @@ declare function StarLightIcon({ color, size, altText, ...props }: StarLightIcon
|
|
|
3417
3434
|
declare type StarDarkIconProps = SVGIconProps;
|
|
3418
3435
|
declare function StarDarkIcon({ color, size, altText, ...props }: StarDarkIconProps): JSX.Element;
|
|
3419
3436
|
|
|
3420
|
-
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 .react-datepicker__aria-live {\n display: none;\n }\n}\n";
|
|
3437
|
+
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 .react-datepicker__aria-live {\n display: none;\n }\n\n @media only screen and (min-height: 600px) and (max-height: 800px ) {\n .react-datepicker__month {\n overflow-y: scroll !important;\n height: 15vh !important;\n }\n }\n @media only screen and (max-height: 599px ) {\n .react-datepicker__month {\n overflow-y: scroll !important;\n height: 5vh !important;\n }\n }\n}\n";
|
|
3421
3438
|
//# sourceMappingURL=datepickerStyles.d.ts.map
|
|
3422
3439
|
|
|
3423
3440
|
declare type ConfirmPopupProps = {
|
|
@@ -3816,4 +3833,80 @@ declare type ToggleSwitchStatedProps = {
|
|
|
3816
3833
|
declare const ToggleSwitchStyled: ({ onClick, size, selected, stretch, style, ...props }: ToggleSwitchProps) => JSX.Element;
|
|
3817
3834
|
declare const ToggleSwitch: ({ size, initialSelected, stretch, onClick, ...props }: ToggleSwitchStatedProps) => JSX.Element;
|
|
3818
3835
|
|
|
3819
|
-
|
|
3836
|
+
declare type GenericObj = {
|
|
3837
|
+
[key: string]: any;
|
|
3838
|
+
};
|
|
3839
|
+
declare type TConcreteChildElement<P = GenericObj> = React__default.ReactElement<P> | React__default.JSXElementConstructor<P>;
|
|
3840
|
+
declare type TChildElement<P = GenericObj> = TConcreteChildElement<P> | string | number | boolean | null | undefined;
|
|
3841
|
+
declare type ChildProps<P = GenericObj> = {
|
|
3842
|
+
children: TChildElement<P>;
|
|
3843
|
+
parseProps?: (props: P, elem: TConcreteChildElement<P>) => Partial<P>;
|
|
3844
|
+
};
|
|
3845
|
+
declare const RenderChild: ({ children, parseProps, ...props }: ChildProps) => JSX.Element;
|
|
3846
|
+
|
|
3847
|
+
declare type ChildDropzoneState = Omit<DropzoneState, 'getRootProps' | 'rootRef' | 'getInputProps' | 'inputRef'>;
|
|
3848
|
+
declare type DropZoneProps = DropzoneOptions & {
|
|
3849
|
+
children: TChildElement<Partial<ChildDropzoneState>>;
|
|
3850
|
+
className?: string;
|
|
3851
|
+
style?: React__default.CSSProperties;
|
|
3852
|
+
rootProps?: DropzoneRootProps;
|
|
3853
|
+
inputProps?: DropzoneInputProps;
|
|
3854
|
+
useDropzoneProps?: boolean;
|
|
3855
|
+
};
|
|
3856
|
+
/**
|
|
3857
|
+
* DropZone
|
|
3858
|
+
*
|
|
3859
|
+
* if `useDropzoneProps={true}` is passed then dropzone options props will passed to child element
|
|
3860
|
+
*
|
|
3861
|
+
* Example with `useDropzoneProps={true}` (dropzone props will be passed in children):
|
|
3862
|
+
* ```
|
|
3863
|
+
* const DropzoneChild = ({ open, ...dropzoneOptions }) => {
|
|
3864
|
+
* // do something with dropzoneOptions...
|
|
3865
|
+
* return (
|
|
3866
|
+
* <>
|
|
3867
|
+
* <button onClick={open}>Upload</button>
|
|
3868
|
+
* <div>{draggedFiles.map(f => <div>{f.name (f.type)}</div>)}</div>
|
|
3869
|
+
* </>
|
|
3870
|
+
* );
|
|
3871
|
+
* };
|
|
3872
|
+
*
|
|
3873
|
+
* <DropZone useDropzoneProps={true} noClick={true} onDrop={...}>
|
|
3874
|
+
* <DropzoneChild />
|
|
3875
|
+
* </DropZone>
|
|
3876
|
+
* ```
|
|
3877
|
+
*
|
|
3878
|
+
* ---------------------------------------------------------
|
|
3879
|
+
*
|
|
3880
|
+
* Example without `useDropzoneProps` (dropzone props will NOT be passed in children):
|
|
3881
|
+
* ```
|
|
3882
|
+
* <DropZone onDrop={...}>
|
|
3883
|
+
* <button onClick={() => {}}>Upload</button>
|
|
3884
|
+
* </DropZone>
|
|
3885
|
+
* ```
|
|
3886
|
+
*
|
|
3887
|
+
*/
|
|
3888
|
+
declare const DropZone: React__default.ForwardRefExoticComponent<Pick<React__default.HTMLProps<HTMLElement>, "multiple" | "onDragEnter" | "onDragOver" | "onDragLeave"> & {
|
|
3889
|
+
accept?: string | string[] | undefined;
|
|
3890
|
+
minSize?: number | undefined;
|
|
3891
|
+
maxSize?: number | undefined;
|
|
3892
|
+
preventDropOnDocument?: boolean | undefined;
|
|
3893
|
+
noClick?: boolean | undefined;
|
|
3894
|
+
noKeyboard?: boolean | undefined;
|
|
3895
|
+
noDrag?: boolean | undefined;
|
|
3896
|
+
noDragEventsBubbling?: boolean | undefined;
|
|
3897
|
+
disabled?: boolean | undefined;
|
|
3898
|
+
onDrop?<T extends File>(acceptedFiles: T[], rejectedFiles: T[], event: react_dropzone.DropEvent): void;
|
|
3899
|
+
onDropAccepted?<T_1 extends File>(files: T_1[], event: react_dropzone.DropEvent): void;
|
|
3900
|
+
onDropRejected?<T_2 extends File>(files: T_2[], event: react_dropzone.DropEvent): void;
|
|
3901
|
+
getFilesFromEvent?(event: react_dropzone.DropEvent): Promise<(File | DataTransferItem)[]>;
|
|
3902
|
+
onFileDialogCancel?(): void;
|
|
3903
|
+
} & {
|
|
3904
|
+
children: TChildElement<Partial<ChildDropzoneState>>;
|
|
3905
|
+
className?: string | undefined;
|
|
3906
|
+
style?: React__default.CSSProperties | undefined;
|
|
3907
|
+
rootProps?: DropzoneRootProps | undefined;
|
|
3908
|
+
inputProps?: DropzoneInputProps | undefined;
|
|
3909
|
+
useDropzoneProps?: boolean | undefined;
|
|
3910
|
+
} & React__default.RefAttributes<DropzoneRef>>;
|
|
3911
|
+
|
|
3912
|
+
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, ChevronPopup, CircleProgressIcon, ClientApprovedIcon, ClipboardIcon, ClockIcon, Col, ColPropTypes, CollaborateIcon, CollapseStyled, CollapseStyledProps, CollapseWrapper, CollapseWrapperProps, Collapsible$1 as Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelProps, CollapsiblePanelTitle, CollapsiblePanelTitleProps, CollapsiblePanels, CollapsiblePanelsProps, CollapsibleProps$1 as CollapsibleProps, Collapsible 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, DropZone, DropZoneProps, Dropdown, DropdownItem, DropdownProps, DropzoneTypes, Dropzoned, DropzonedPreviews, 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, RenderChild, ResponsiveTable, Row$1 as 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, StarDarkIcon, StarIcon, StarLightIcon, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown, StyledPanel, StyledTask, SubtractIcon, SVG as SvgIcon, TBody, TButtonIcon, TD, TDropdownItem, TH, THSorted, THead, TR, 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$1 as toggleSizes, useCalendar, useClickOutside, useDelayUnmount, useFallbackRef, useLongPress, usePrefersReducedMotion, useRandomInterval, useWindowSize };
|
package/dist/index.es.js
CHANGED
|
@@ -13,6 +13,7 @@ import BaseDatePicker from 'react-datepicker';
|
|
|
13
13
|
import { useTable, useSortBy, usePagination, useColumnOrder, useBlockLayout, useFlexLayout, useExpanded } from 'react-table';
|
|
14
14
|
import { useSticky } from 'react-table-sticky';
|
|
15
15
|
import { areEqual, FixedSizeList, VariableSizeList } from 'react-window';
|
|
16
|
+
import * as reactIs from 'react-is';
|
|
16
17
|
|
|
17
18
|
/******************************************************************************
|
|
18
19
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1189,7 +1190,7 @@ function GearIcon(_a) {
|
|
|
1189
1190
|
React.createElement("path", { d: renderPath, fill: color }));
|
|
1190
1191
|
}
|
|
1191
1192
|
|
|
1192
|
-
var 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 .react-datepicker__aria-live {\n display: none;\n }\n}\n";
|
|
1193
|
+
var 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 .react-datepicker__aria-live {\n display: none;\n }\n\n @media only screen and (min-height: 600px) and (max-height: 800px ) {\n .react-datepicker__month {\n overflow-y: scroll !important;\n height: 15vh !important;\n }\n }\n @media only screen and (max-height: 599px ) {\n .react-datepicker__month {\n overflow-y: scroll !important;\n height: 5vh !important;\n }\n }\n}\n";
|
|
1193
1194
|
|
|
1194
1195
|
var parseColorVars = function (colors, prefix) {
|
|
1195
1196
|
if (prefix === void 0) { prefix = ''; }
|
|
@@ -1569,7 +1570,7 @@ function XIcon(_a) {
|
|
|
1569
1570
|
}
|
|
1570
1571
|
|
|
1571
1572
|
function OpportunityCircleIcon(_a) {
|
|
1572
|
-
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Opportunity
|
|
1573
|
+
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Opportunity" : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["variant", "selected", "size", "altText", "style"]);
|
|
1573
1574
|
var iconSizes = {
|
|
1574
1575
|
tiny: {
|
|
1575
1576
|
width: 24,
|
|
@@ -1640,7 +1641,7 @@ function OpportunityCircleIcon(_a) {
|
|
|
1640
1641
|
}
|
|
1641
1642
|
|
|
1642
1643
|
function PresentationCircleIcon(_a) {
|
|
1643
|
-
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Presentation
|
|
1644
|
+
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Presentation" : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["variant", "selected", "size", "altText", "style"]);
|
|
1644
1645
|
var iconSizes = {
|
|
1645
1646
|
tiny: {
|
|
1646
1647
|
width: 24,
|
|
@@ -1714,7 +1715,7 @@ function PresentationCircleIcon(_a) {
|
|
|
1714
1715
|
}
|
|
1715
1716
|
|
|
1716
1717
|
function EstimateCircleIcon(_a) {
|
|
1717
|
-
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Estimate
|
|
1718
|
+
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Estimate" : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["variant", "selected", "size", "altText", "style"]);
|
|
1718
1719
|
var iconSizes = {
|
|
1719
1720
|
tiny: {
|
|
1720
1721
|
width: 24,
|
|
@@ -1787,7 +1788,7 @@ function EstimateCircleIcon(_a) {
|
|
|
1787
1788
|
}
|
|
1788
1789
|
|
|
1789
1790
|
function SalesOrderCircleIcon(_a) {
|
|
1790
|
-
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Sales Order
|
|
1791
|
+
var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.selected, selected = _c === void 0 ? false : _c, size = _a.size, _d = _a.altText, altText = _d === void 0 ? "Sales Order" : _d, _e = _a.style, style = _e === void 0 ? {} : _e, props = __rest(_a, ["variant", "selected", "size", "altText", "style"]);
|
|
1791
1792
|
var iconSizes = {
|
|
1792
1793
|
tiny: {
|
|
1793
1794
|
width: 24,
|
|
@@ -2934,20 +2935,6 @@ function DropzonedPreviews(_a) {
|
|
|
2934
2935
|
? React.createElement(ThumbsContainer, null, thumbs)
|
|
2935
2936
|
: React.createElement(PlaceHolder, null, placeholder))));
|
|
2936
2937
|
}
|
|
2937
|
-
function DropzonedSimple(_a) {
|
|
2938
|
-
var accept = _a.accept, children = _a.children, props = __rest(_a, ["accept", "children"]);
|
|
2939
|
-
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;
|
|
2940
|
-
var Child = React.Children.only(children);
|
|
2941
|
-
if (!Child) {
|
|
2942
|
-
return null;
|
|
2943
|
-
}
|
|
2944
|
-
var ChildElem = React.cloneElement(Child, {
|
|
2945
|
-
acceptedFiles: acceptedFiles,
|
|
2946
|
-
inputProps: getInputProps(),
|
|
2947
|
-
rootProps: getRootProps({ isDragActive: isDragActive, isDragAccept: isDragAccept, isDragReject: isDragReject }),
|
|
2948
|
-
});
|
|
2949
|
-
return ChildElem;
|
|
2950
|
-
}
|
|
2951
2938
|
var templateObject_1$L, templateObject_2$r, templateObject_3$j, templateObject_4$e, templateObject_5$8, templateObject_6$8;
|
|
2952
2939
|
|
|
2953
2940
|
/*
|
|
@@ -3692,10 +3679,13 @@ var popupStyles = {
|
|
|
3692
3679
|
};
|
|
3693
3680
|
function skuSelectStyles(props) {
|
|
3694
3681
|
return {
|
|
3682
|
+
container: function (provided, state) {
|
|
3683
|
+
return __assign(__assign({}, provided), props.containerStyles);
|
|
3684
|
+
},
|
|
3695
3685
|
clearIndicator: function (provided, state) {
|
|
3696
|
-
return __assign(__assign({}, provided), { color: getThemeColor(props, 'select.clearIcon.color', colors.select.clearIcon.color), ':hover': {
|
|
3686
|
+
return __assign(__assign(__assign({}, provided), { color: getThemeColor(props, 'select.clearIcon.color', colors.select.clearIcon.color), ':hover': {
|
|
3697
3687
|
color: getThemeColor(props, 'select.clearIcon.color', colors.select.clearIcon.color),
|
|
3698
|
-
} });
|
|
3688
|
+
} }), props.clearIndicatorStyles);
|
|
3699
3689
|
},
|
|
3700
3690
|
dropdownIndicator: function (provided, state) {
|
|
3701
3691
|
var styles = {
|
|
@@ -3711,16 +3701,16 @@ function skuSelectStyles(props) {
|
|
|
3711
3701
|
if (state.isDisabled) {
|
|
3712
3702
|
styles['color'] = getThemeColor(props, 'select.dropdownIcon.disabled', colors.select.dropdownIcon.disabled);
|
|
3713
3703
|
}
|
|
3714
|
-
return __assign(__assign({}, provided), styles);
|
|
3704
|
+
return __assign(__assign(__assign({}, provided), styles), props.dropdownIndicatorStyles);
|
|
3715
3705
|
},
|
|
3716
|
-
indicatorSeparator: function (provided, state) { return (__assign(__assign({}, provided), { display: 'none' })); },
|
|
3706
|
+
indicatorSeparator: function (provided, state) { return (__assign(__assign(__assign({}, provided), { display: 'none' }), props.indicatorSeparatorStyles)); },
|
|
3717
3707
|
option: function (provided, state) {
|
|
3718
|
-
return (__assign(__assign(__assign({}, provided), (get(state.data, 'styles') || {})), { borderBottom: 'none', padding: 10 }));
|
|
3708
|
+
return __assign(__assign(__assign(__assign({}, provided), (get(state.data, 'styles') || {})), { borderBottom: 'none', padding: 10 }), props.optionStyles);
|
|
3719
3709
|
},
|
|
3720
3710
|
input: function (provided, state) {
|
|
3721
|
-
return __assign(__assign({}, provided), { height: 'auto', borderColor: props.error
|
|
3711
|
+
return __assign(__assign(__assign({}, provided), { height: 'auto', borderColor: props.error
|
|
3722
3712
|
? getThemeColor(props, 'select.error.border', colors.select.error.border)
|
|
3723
|
-
: getThemeColor(props, 'select.border', colors.select.border) });
|
|
3713
|
+
: getThemeColor(props, 'select.border', colors.select.border) }), props.inputStyles);
|
|
3724
3714
|
},
|
|
3725
3715
|
control: function (provided, state) {
|
|
3726
3716
|
var styles = {
|
|
@@ -3760,11 +3750,11 @@ function skuSelectStyles(props) {
|
|
|
3760
3750
|
? getThemeColor(props, 'select.error.border', colors.select.error.border)
|
|
3761
3751
|
: provided.borderColor;
|
|
3762
3752
|
}
|
|
3763
|
-
return (__assign(__assign(__assign({}, provided), styles), { ':hover': {
|
|
3753
|
+
return (__assign(__assign(__assign(__assign({}, provided), styles), { ':hover': {
|
|
3764
3754
|
borderColor: props.error
|
|
3765
3755
|
? getThemeColor(props, 'select.error.border', colors.select.error.border)
|
|
3766
3756
|
: getThemeColor(props, 'select.active.border', colors.select.active.border),
|
|
3767
|
-
} }));
|
|
3757
|
+
} }), props.controlStyles));
|
|
3768
3758
|
},
|
|
3769
3759
|
menu: function (provided, state) {
|
|
3770
3760
|
var borderColor = props.error
|
|
@@ -3793,21 +3783,21 @@ function skuSelectStyles(props) {
|
|
|
3793
3783
|
styles['marginTop'] = '0px';
|
|
3794
3784
|
styles['marginBottom'] = '0px';
|
|
3795
3785
|
}
|
|
3796
|
-
return (__assign(__assign({}, provided), styles));
|
|
3786
|
+
return __assign(__assign(__assign({}, provided), styles), props.menuStyles);
|
|
3797
3787
|
},
|
|
3798
3788
|
menuList: function (provided, state) {
|
|
3799
|
-
return __assign(__assign({}, provided), { paddingBottom: 0 });
|
|
3789
|
+
return __assign(__assign(__assign({}, provided), { paddingBottom: 0 }), props.menuListStyles);
|
|
3800
3790
|
},
|
|
3801
3791
|
menuPortal: function (provided, state) {
|
|
3802
|
-
return __assign(__assign({}, provided), { zIndex: 9999 });
|
|
3792
|
+
return __assign(__assign(__assign({}, provided), { zIndex: 9999 }), props.menuPortalStyles);
|
|
3803
3793
|
},
|
|
3804
3794
|
singleValue: function (provided, state) {
|
|
3805
3795
|
var opacity = state.isDisabled ? 0.5 : 1;
|
|
3806
3796
|
var transition = 'opacity 300ms';
|
|
3807
|
-
return __assign(__assign({}, provided), { opacity: opacity, transition: transition });
|
|
3797
|
+
return __assign(__assign(__assign({}, provided), { opacity: opacity, transition: transition }), props.singleValueStyles);
|
|
3808
3798
|
},
|
|
3809
3799
|
valueContainer: function (provided, state) {
|
|
3810
|
-
return __assign(__assign({}, provided), { padding: '2px 8px' });
|
|
3800
|
+
return __assign(__assign(__assign({}, provided), { padding: '2px 8px' }), props.valueContainerStyles);
|
|
3811
3801
|
},
|
|
3812
3802
|
};
|
|
3813
3803
|
}
|
|
@@ -3823,9 +3813,9 @@ var SKUSelect = React.forwardRef(function (_a, ref) {
|
|
|
3823
3813
|
return React.createElement(BaseSelect, __assign({ ref: ref, classNamePrefix: classNamePrefix }, (inPopup ? popupStyles : {}), { styles: skuSelectStyles(selectStyleProps), theme: skuSelectTheme }, props));
|
|
3824
3814
|
});
|
|
3825
3815
|
var LabeledSelect = React.forwardRef(function (_a, ref) {
|
|
3826
|
-
var parentStyle = _a.parentStyle, props = __rest(_a, ["parentStyle"]);
|
|
3816
|
+
var parentStyle = _a.parentStyle, labelStyle = _a.labelStyle, props = __rest(_a, ["parentStyle", "labelStyle"]);
|
|
3827
3817
|
return (React.createElement("div", { style: parentStyle },
|
|
3828
|
-
React.createElement(Label, { htmlFor: props.name },
|
|
3818
|
+
React.createElement(Label, { htmlFor: props.name, style: labelStyle },
|
|
3829
3819
|
props.label,
|
|
3830
3820
|
" ",
|
|
3831
3821
|
props.required && '*'),
|
|
@@ -3839,9 +3829,9 @@ var SKUCreatableSelect = React.forwardRef(function (_a, ref) {
|
|
|
3839
3829
|
return (React.createElement(BaseCreatableSelect, __assign({ ref: ref, classNamePrefix: classNamePrefix, styles: skuSelectStyles(selectStyleProps), theme: skuSelectTheme }, props, (inPopup ? popupStyles : {}))));
|
|
3840
3830
|
});
|
|
3841
3831
|
var LabeledCreatableSelect = React.forwardRef(function (_a, ref) {
|
|
3842
|
-
var parentStyle = _a.parentStyle, props = __rest(_a, ["parentStyle"]);
|
|
3832
|
+
var parentStyle = _a.parentStyle, labelStyle = _a.labelStyle, props = __rest(_a, ["parentStyle", "labelStyle"]);
|
|
3843
3833
|
return (React.createElement("div", { style: parentStyle },
|
|
3844
|
-
React.createElement(Label, { htmlFor: props.name },
|
|
3834
|
+
React.createElement(Label, { htmlFor: props.name, style: labelStyle },
|
|
3845
3835
|
props.label,
|
|
3846
3836
|
" ",
|
|
3847
3837
|
props.required && '*'),
|
|
@@ -3855,9 +3845,9 @@ var SKUAsyncSelect = React.forwardRef(function (_a, ref) {
|
|
|
3855
3845
|
return (React.createElement(BaseAsyncSelect, __assign({ ref: ref, classNamePrefix: classNamePrefix, styles: skuSelectStyles(selectStyleProps), theme: skuSelectTheme }, props, (inPopup ? popupStyles : {}))));
|
|
3856
3846
|
});
|
|
3857
3847
|
var LabeledAsyncSelect = React.forwardRef(function (_a, ref) {
|
|
3858
|
-
var parentStyle = _a.parentStyle, props = __rest(_a, ["parentStyle"]);
|
|
3848
|
+
var parentStyle = _a.parentStyle, labelStyle = _a.labelStyle, props = __rest(_a, ["parentStyle", "labelStyle"]);
|
|
3859
3849
|
return (React.createElement("div", { style: parentStyle },
|
|
3860
|
-
React.createElement(Label, { htmlFor: props.name },
|
|
3850
|
+
React.createElement(Label, { htmlFor: props.name, style: labelStyle },
|
|
3861
3851
|
props.label,
|
|
3862
3852
|
" ",
|
|
3863
3853
|
props.required && '*'),
|
|
@@ -5305,11 +5295,12 @@ function HeadlessTable(_a) {
|
|
|
5305
5295
|
}, 1000, { 'trailing': true })
|
|
5306
5296
|
} */
|
|
5307
5297
|
}, onDrop: column.noDrag ? undefined : onDrop, className: "th", width: column.width, onClick: function () {
|
|
5298
|
+
var _a, _b, _c;
|
|
5308
5299
|
column.isSorted
|
|
5309
5300
|
? column.isSortedDesc
|
|
5310
|
-
? column.clearSortBy()
|
|
5311
|
-
: column.toggleSortBy(true)
|
|
5312
|
-
: column.toggleSortBy(false);
|
|
5301
|
+
? (_a = column.clearSortBy) === null || _a === void 0 ? void 0 : _a.call(column)
|
|
5302
|
+
: (_b = column === null || column === void 0 ? void 0 : column.toggleSortBy) === null || _b === void 0 ? void 0 : _b.call(column, true)
|
|
5303
|
+
: (_c = column === null || column === void 0 ? void 0 : column.toggleSortBy) === null || _c === void 0 ? void 0 : _c.call(column, false);
|
|
5313
5304
|
var direction;
|
|
5314
5305
|
if (column.isSorted) {
|
|
5315
5306
|
if (column.isSortedDesc) {
|
|
@@ -5361,18 +5352,19 @@ function HeadlessTable(_a) {
|
|
|
5361
5352
|
scrollOffsetDivRef.current.innerText = scrollOffset;
|
|
5362
5353
|
}
|
|
5363
5354
|
}, onDragStart: onDragStart, onDrop: onDrop, onHeaderColumnClick: function (column) {
|
|
5355
|
+
var _a, _b;
|
|
5364
5356
|
var sortDirectionState = {};
|
|
5365
5357
|
if (column.isSorted) {
|
|
5366
5358
|
if (column.isSortedDesc) {
|
|
5367
5359
|
column.clearSortBy();
|
|
5368
5360
|
}
|
|
5369
5361
|
else {
|
|
5370
|
-
column.toggleSortBy(true);
|
|
5362
|
+
(_a = column === null || column === void 0 ? void 0 : column.toggleSortBy) === null || _a === void 0 ? void 0 : _a.call(column, true);
|
|
5371
5363
|
sortDirectionState = { accessor: column.id, direction: 'DESC' };
|
|
5372
5364
|
}
|
|
5373
5365
|
}
|
|
5374
5366
|
else {
|
|
5375
|
-
column.toggleSortBy(false);
|
|
5367
|
+
(_b = column === null || column === void 0 ? void 0 : column.toggleSortBy) === null || _b === void 0 ? void 0 : _b.call(column, false);
|
|
5376
5368
|
sortDirectionState = { accessor: column.id, direction: 'ASC' };
|
|
5377
5369
|
}
|
|
5378
5370
|
setSortDirection(sortDirectionState);
|
|
@@ -6358,6 +6350,32 @@ var AlertNotification = function (_a) {
|
|
|
6358
6350
|
};
|
|
6359
6351
|
var templateObject_1$c;
|
|
6360
6352
|
|
|
6353
|
+
var RenderChild = function (_a) {
|
|
6354
|
+
var children = _a.children, parseProps = _a.parseProps, props = __rest(_a, ["children", "parseProps"]);
|
|
6355
|
+
var ChildElement = React.Children.only(children);
|
|
6356
|
+
var elementProps = useMemo(function () {
|
|
6357
|
+
if (typeof ChildElement === 'string'
|
|
6358
|
+
|| typeof ChildElement === 'number'
|
|
6359
|
+
|| typeof ChildElement === 'boolean'
|
|
6360
|
+
|| typeof ChildElement === 'undefined'
|
|
6361
|
+
|| ChildElement === null) {
|
|
6362
|
+
return props;
|
|
6363
|
+
}
|
|
6364
|
+
return parseProps ? parseProps(props, ChildElement) : props;
|
|
6365
|
+
}, [parseProps, props, ChildElement]);
|
|
6366
|
+
if (typeof ChildElement === 'string'
|
|
6367
|
+
|| typeof ChildElement === 'number'
|
|
6368
|
+
|| typeof ChildElement === 'boolean'
|
|
6369
|
+
|| typeof ChildElement === 'undefined'
|
|
6370
|
+
|| ChildElement === null) {
|
|
6371
|
+
return (React.createElement(React.Fragment, null, ChildElement));
|
|
6372
|
+
}
|
|
6373
|
+
if (reactIs.isElement(ChildElement)) {
|
|
6374
|
+
return React.cloneElement(ChildElement, elementProps);
|
|
6375
|
+
}
|
|
6376
|
+
return (React.createElement(ChildElement, __assign({}, elementProps)));
|
|
6377
|
+
};
|
|
6378
|
+
|
|
6361
6379
|
function useNumberInput(props) {
|
|
6362
6380
|
var _a = props.defaultValue, defaultValue = _a === void 0 ? "" : _a, onChange = props.onChange, onFocus = props.onFocus, onBlur = props.onBlur, inputMode = props.inputMode, _b = props.localeOptions, localeOptions = _b === void 0 ? {} : _b;
|
|
6363
6381
|
var inputRef = useRef(null);
|
|
@@ -6445,7 +6463,8 @@ function NumberInput(props) {
|
|
|
6445
6463
|
? React.createElement(LabeledInput, __assign({}, inputProps, { label: label, ref: ref }))
|
|
6446
6464
|
: React.createElement(Input, __assign({}, inputProps, { ref: ref })),
|
|
6447
6465
|
icon && type !== 'number'
|
|
6448
|
-
? React.createElement("span", { style: iconWrapperStyles, onClick: handleClickIcon },
|
|
6466
|
+
? React.createElement("span", { style: iconWrapperStyles, onClick: handleClickIcon },
|
|
6467
|
+
React.createElement(RenderChild, null, icon))
|
|
6449
6468
|
: null));
|
|
6450
6469
|
}
|
|
6451
6470
|
|
|
@@ -6562,8 +6581,9 @@ var VirtualTable = function (props) {
|
|
|
6562
6581
|
return '100%';
|
|
6563
6582
|
}, [windowSize, rowsRef]);
|
|
6564
6583
|
var handleSort = useCallback(function (column) {
|
|
6584
|
+
var _a;
|
|
6565
6585
|
listRef.current && listRef.current.resetAfterIndex(0);
|
|
6566
|
-
column.toggleSortBy();
|
|
6586
|
+
(_a = column.toggleSortBy) === null || _a === void 0 ? void 0 : _a.call(column);
|
|
6567
6587
|
onSort && onSort({ column: column });
|
|
6568
6588
|
}, [onSort]);
|
|
6569
6589
|
function onListScroll(e) {
|
|
@@ -7645,5 +7665,49 @@ var ToggleSwitch = function (_a) {
|
|
|
7645
7665
|
};
|
|
7646
7666
|
var templateObject_1, templateObject_2;
|
|
7647
7667
|
|
|
7648
|
-
|
|
7668
|
+
/**
|
|
7669
|
+
* DropZone
|
|
7670
|
+
*
|
|
7671
|
+
* if `useDropzoneProps={true}` is passed then dropzone options props will passed to child element
|
|
7672
|
+
*
|
|
7673
|
+
* Example with `useDropzoneProps={true}` (dropzone props will be passed in children):
|
|
7674
|
+
* ```
|
|
7675
|
+
* const DropzoneChild = ({ open, ...dropzoneOptions }) => {
|
|
7676
|
+
* // do something with dropzoneOptions...
|
|
7677
|
+
* return (
|
|
7678
|
+
* <>
|
|
7679
|
+
* <button onClick={open}>Upload</button>
|
|
7680
|
+
* <div>{draggedFiles.map(f => <div>{f.name (f.type)}</div>)}</div>
|
|
7681
|
+
* </>
|
|
7682
|
+
* );
|
|
7683
|
+
* };
|
|
7684
|
+
*
|
|
7685
|
+
* <DropZone useDropzoneProps={true} noClick={true} onDrop={...}>
|
|
7686
|
+
* <DropzoneChild />
|
|
7687
|
+
* </DropZone>
|
|
7688
|
+
* ```
|
|
7689
|
+
*
|
|
7690
|
+
* ---------------------------------------------------------
|
|
7691
|
+
*
|
|
7692
|
+
* Example without `useDropzoneProps` (dropzone props will NOT be passed in children):
|
|
7693
|
+
* ```
|
|
7694
|
+
* <DropZone onDrop={...}>
|
|
7695
|
+
* <button onClick={() => {}}>Upload</button>
|
|
7696
|
+
* </DropZone>
|
|
7697
|
+
* ```
|
|
7698
|
+
*
|
|
7699
|
+
*/
|
|
7700
|
+
var DropZone = React.forwardRef(function (_a, ref) {
|
|
7701
|
+
var children = _a.children, className = _a.className, rootProps = _a.rootProps, inputProps = _a.inputProps, _b = _a.style, style = _b === void 0 ? {} : _b, _c = _a.useDropzoneProps, useDropzoneProps = _c === void 0 ? false : _c, props = __rest(_a, ["children", "className", "rootProps", "inputProps", "style", "useDropzoneProps"]);
|
|
7702
|
+
var _d = useDropzone(props), getRootProps = _d.getRootProps, rootRef = _d.rootRef, getInputProps = _d.getInputProps, inputRef = _d.inputRef, rest = __rest(_d, ["getRootProps", "rootRef", "getInputProps", "inputRef"]);
|
|
7703
|
+
useImperativeHandle(ref, function () { return ({ open: rest.open }); }, [rest.open]);
|
|
7704
|
+
var allRootProps = getRootProps(rootProps);
|
|
7705
|
+
var parseChildProps = useCallback(function (p, Child) { return (useDropzoneProps ? rest : {}); }, [rest, useDropzoneProps]);
|
|
7706
|
+
return (React.createElement(React.Fragment, null,
|
|
7707
|
+
React.createElement("div", __assign({}, allRootProps, { ref: rootRef, className: className, style: __assign(__assign({}, allRootProps.style), style) }),
|
|
7708
|
+
React.createElement("input", __assign({}, getInputProps(inputProps), { ref: inputRef })),
|
|
7709
|
+
React.createElement(RenderChild, { parseProps: parseChildProps }, children))));
|
|
7710
|
+
});
|
|
7711
|
+
|
|
7712
|
+
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, ChevronPopup, CircleProgressIcon, ClientApprovedIcon, ClipboardIcon, ClockIcon, Col, CollaborateIcon, CollapseStyled, CollapseWrapper, Collapsible$1 as Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelTitle, CollapsiblePanels, Collapsible 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$2 as DropDownContent, DropZone, Dropdown, DropdownItem$2 as 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, 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, RenderChild, ResponsiveTable, Row, SHARED_STYLE_MAPS, SalesArrowIcon, SalesOrderCircleIcon, SearchIcon, SKUSelect as Select, SharedStyles, ShopIcon, ShoppingCartIcon, ShowPopup, SidePanel, SimpleWindowedTable, SimpleWindowedTableStyles, SizerCss, SizerWrapper, Sparkles, Spinner, StarDarkIcon, StarIcon, StarLightIcon, StarRating, StateDropdown, StatusDropdown, StyledCalendarTaskBody, StyledDayBody, StyledDayText, StyledDropArea, StyledDropdown$2 as StyledDropdown, StyledPanel, StyledTask, SubtractIcon, SVG$1 as SvgIcon, TBody, TD$1 as 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$4 as Wrapper, XIcon, colors, createMeasurementStyle, datepickerStyles, fontFamilies, fontStyles, fonts, getColor$1 as getColor, getFontStyle, getThemeColor, getThemeFontFamily, getThemeFontSize, getThemeFontStyle, getThemeProperty, parseCskuStyles, sizes, themeOptions, toggleSizes$1 as toggleSizes, useCalendar, useClickOutside, useDelayUnmount, useFallbackRef, useLongPress, usePrefersReducedMotion, useRandomInterval, useWindowSize };
|
|
7649
7713
|
//# sourceMappingURL=index.es.js.map
|