@commonsku/styles 1.16.4 → 1.16.6
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 +103 -11
- package/dist/index.es.js +190 -294
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +197 -291
- package/dist/index.js.map +1 -1
- package/dist/styles/Artwork.d.ts +3 -3
- package/dist/styles/Artwork.d.ts.map +1 -1
- package/dist/styles/CollapsibleV2.d.ts +1 -0
- package/dist/styles/CollapsibleV2.d.ts.map +1 -1
- package/dist/styles/Csku.d.ts +11 -0
- package/dist/styles/Csku.d.ts.map +1 -1
- package/dist/styles/Img.d.ts +11 -13
- package/dist/styles/Img.d.ts.map +1 -1
- package/dist/styles/Input.d.ts +2 -0
- package/dist/styles/Input.d.ts.map +1 -1
- package/dist/styles/InputStepper.d.ts +19 -0
- package/dist/styles/InputStepper.d.ts.map +1 -1
- package/dist/styles/Popup.d.ts +4 -0
- package/dist/styles/Popup.d.ts.map +1 -1
- package/dist/styles/Tabs.d.ts +7 -6
- package/dist/styles/Tabs.d.ts.map +1 -1
- package/dist/styles/hooks/useClickOutside.d.ts.map +1 -1
- package/dist/styles/index.d.ts +3 -1
- package/dist/styles/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/styled.d.ts +13 -0
- package/dist/utils/styled.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React$1, { CSSProperties, MouseEvent, Component, MouseEventHandler, ReactNode, WeakValidationMap, ComponentType } from 'react';
|
|
3
|
-
import { FlattenInterpolation, ThemedStyledProps, StyledComponent, CSSObject, FlattenSimpleInterpolation, GlobalStyleComponent, DefaultTheme, ThemeProps, Keyframes, AnyStyledComponent, StyledComponentInnerComponent } from 'styled-components';
|
|
2
|
+
import React$1, { CSSProperties, MouseEvent, Component, ReactEventHandler, MouseEventHandler, ReactNode, WeakValidationMap, ComponentType, Dispatch, SetStateAction, MutableRefObject, ForwardedRef } from 'react';
|
|
3
|
+
import { FlattenInterpolation, ThemedStyledProps, StyledComponent, CSSObject, FlattenSimpleInterpolation, GlobalStyleComponent, DefaultTheme, ThemeProps, CSSProperties as CSSProperties$1, Keyframes, AnyStyledComponent, StyledComponentInnerComponent } from 'styled-components';
|
|
4
4
|
import { DropzoneOptions } from 'react-dropzone';
|
|
5
5
|
import { AsyncAdditionalProps } from 'react-select/dist/declarations/src/useAsync';
|
|
6
6
|
import { CreatableAdditionalProps } from 'react-select/dist/declarations/src/useCreatable';
|
|
@@ -294,6 +294,17 @@ declare const H6: StyledComponent<"h6", any, {
|
|
|
294
294
|
} & SharedStyleTypes, never>;
|
|
295
295
|
//# sourceMappingURL=Headings.d.ts.map
|
|
296
296
|
|
|
297
|
+
declare type ImgProps = {
|
|
298
|
+
src?: string;
|
|
299
|
+
alt?: string;
|
|
300
|
+
max_attempts?: number;
|
|
301
|
+
attempt_interval?: number;
|
|
302
|
+
onRetry?: OnErrorEventHandler;
|
|
303
|
+
onFailed?: OnErrorEventHandler;
|
|
304
|
+
} & React$1.DetailedHTMLProps<React$1.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
305
|
+
declare const Img: React$1.ForwardRefExoticComponent<Pick<ImgProps, "max_attempts" | "attempt_interval" | "onRetry" | "onFailed" | "key" | keyof React$1.ImgHTMLAttributes<HTMLImageElement>> & React$1.RefAttributes<HTMLImageElement>>;
|
|
306
|
+
//# sourceMappingURL=Img.d.ts.map
|
|
307
|
+
|
|
297
308
|
declare const iconSize: {
|
|
298
309
|
tiny: {
|
|
299
310
|
width: number;
|
|
@@ -433,7 +444,9 @@ declare const LabeledIconInput: React$1.ForwardRefExoticComponent<React$1.InputH
|
|
|
433
444
|
labelOnTop?: boolean | undefined;
|
|
434
445
|
Icon: React$1.ReactElement;
|
|
435
446
|
iconPosition?: "left" | "right" | undefined;
|
|
447
|
+
iconColor?: string | undefined;
|
|
436
448
|
iconLabelStyles?: React$1.CSSProperties | undefined;
|
|
449
|
+
containerStyle?: React$1.CSSProperties | undefined;
|
|
437
450
|
} & React$1.RefAttributes<HTMLInputElement>>;
|
|
438
451
|
declare const CheckboxLabel: StyledComponent<"label", any, {
|
|
439
452
|
disabled?: boolean | undefined;
|
|
@@ -1201,22 +1214,23 @@ declare const tabSizes: {
|
|
|
1201
1214
|
declare const TabBar: StyledComponent<"ul", any, {
|
|
1202
1215
|
padded?: boolean | undefined;
|
|
1203
1216
|
} & SharedStyleTypes, never>;
|
|
1217
|
+
declare type CommonTabProps = {
|
|
1218
|
+
size?: keyof typeof tabSizes;
|
|
1219
|
+
variant?: 'primary' | 'secondary';
|
|
1220
|
+
};
|
|
1204
1221
|
declare const Tab: StyledComponent<"li", any, {
|
|
1205
1222
|
selected?: boolean | undefined;
|
|
1206
|
-
|
|
1207
|
-
variant?: "primary" | "secondary" | undefined;
|
|
1208
|
-
} & SharedStyleTypes, never>;
|
|
1223
|
+
} & CommonTabProps & SharedStyleTypes, never>;
|
|
1209
1224
|
declare type TTab = {
|
|
1210
1225
|
label: string | React$1.ReactNode;
|
|
1211
1226
|
content: React$1.ReactNode;
|
|
1212
1227
|
onClick?: (e?: MouseEvent<HTMLLIElement>) => void;
|
|
1213
|
-
};
|
|
1228
|
+
} & CommonTabProps;
|
|
1214
1229
|
declare type TabsProps = {
|
|
1215
1230
|
tabs: TTab[];
|
|
1216
1231
|
selectedTabIndex?: number;
|
|
1217
1232
|
padded?: boolean;
|
|
1218
|
-
|
|
1219
|
-
};
|
|
1233
|
+
} & CommonTabProps;
|
|
1220
1234
|
declare type TabsState = {
|
|
1221
1235
|
selectedTabIndex: number;
|
|
1222
1236
|
};
|
|
@@ -1310,12 +1324,12 @@ declare type ArtworkProps = {
|
|
|
1310
1324
|
onEdit?: Function | VoidFunction;
|
|
1311
1325
|
onDelete?: Function | VoidFunction;
|
|
1312
1326
|
onSave?: Function | VoidFunction;
|
|
1313
|
-
onError?:
|
|
1327
|
+
onError?: ReactEventHandler<HTMLImageElement>;
|
|
1314
1328
|
onDownload?: Function | VoidFunction;
|
|
1315
1329
|
inputProps?: InputProps;
|
|
1316
1330
|
inputEl?: React$1.ReactNode;
|
|
1317
1331
|
};
|
|
1318
|
-
declare const Artwork: ({ inputProps, ...props }: ArtworkProps & SharedStyleTypes) => JSX.Element;
|
|
1332
|
+
declare const Artwork: ({ inputProps, onError, ...props }: ArtworkProps & SharedStyleTypes) => JSX.Element;
|
|
1319
1333
|
|
|
1320
1334
|
declare const StarRating: (props: {
|
|
1321
1335
|
rating: number;
|
|
@@ -1360,6 +1374,8 @@ declare type PopupProps = React$1.PropsWithChildren<{
|
|
|
1360
1374
|
padding?: string;
|
|
1361
1375
|
zIndex?: number;
|
|
1362
1376
|
overlayZIndex?: number;
|
|
1377
|
+
popupClassName?: string;
|
|
1378
|
+
contentClassName?: string;
|
|
1363
1379
|
} & SharedStyleTypes> & React$1.HTMLAttributes<HTMLDivElement>;
|
|
1364
1380
|
declare const Popup: React$1.ForwardRefExoticComponent<{
|
|
1365
1381
|
header?: React$1.Component<{}, {}, any> | undefined;
|
|
@@ -1375,6 +1391,8 @@ declare const Popup: React$1.ForwardRefExoticComponent<{
|
|
|
1375
1391
|
padding?: string | undefined;
|
|
1376
1392
|
zIndex?: number | undefined;
|
|
1377
1393
|
overlayZIndex?: number | undefined;
|
|
1394
|
+
popupClassName?: string | undefined;
|
|
1395
|
+
contentClassName?: string | undefined;
|
|
1378
1396
|
} & SharedStyleTypes & {
|
|
1379
1397
|
children?: React$1.ReactNode;
|
|
1380
1398
|
} & React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -2773,7 +2791,24 @@ declare type InputStepperProps = Omit<NumberInputProps, 'value'> & {
|
|
|
2773
2791
|
label?: string;
|
|
2774
2792
|
labelStyle?: React$1.CSSProperties;
|
|
2775
2793
|
inputDisabled?: boolean;
|
|
2794
|
+
delayChangeTimeout?: number;
|
|
2795
|
+
holdIncrement?: boolean;
|
|
2796
|
+
holdDecrement?: boolean;
|
|
2797
|
+
};
|
|
2798
|
+
declare type InputStepperStyledProps = Omit<NumberInputProps, 'onChange'> & {
|
|
2799
|
+
onCHange?: React$1.ChangeEventHandler<HTMLInputElement>;
|
|
2800
|
+
containerWidth?: string;
|
|
2801
|
+
style?: CSSProperties$1;
|
|
2802
|
+
label?: string;
|
|
2803
|
+
labelStyle?: React$1.CSSProperties;
|
|
2804
|
+
containerStyle?: React$1.CSSProperties;
|
|
2805
|
+
inputDisabled?: boolean;
|
|
2806
|
+
decrementButtonProps?: IconButtonProps;
|
|
2807
|
+
incrementButtonProps?: IconButtonProps;
|
|
2808
|
+
onIncrement?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
2809
|
+
onDecrement?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
2776
2810
|
};
|
|
2811
|
+
declare function InputStepperStyled(props: InputStepperStyledProps): JSX.Element;
|
|
2777
2812
|
declare function InputStepper(props: InputStepperProps): JSX.Element;
|
|
2778
2813
|
|
|
2779
2814
|
interface ColumnInstance<D extends Record<string, unknown> = Record<string, unknown>> extends UseFiltersColumnProps<D>, UseGroupByColumnProps<D>, UseResizeColumnsColumnProps<D>, UseSortByColumnProps<D> {
|
|
@@ -2884,6 +2919,17 @@ declare type BaseCskuProps = {
|
|
|
2884
2919
|
grid?: ResponsiveValue<boolean>;
|
|
2885
2920
|
float?: ResponsiveValue<string>;
|
|
2886
2921
|
colSpan?: ResponsiveValue<string | number | boolean>;
|
|
2922
|
+
__after?: ResponsiveValue<CSSObject>;
|
|
2923
|
+
__before?: ResponsiveValue<CSSObject>;
|
|
2924
|
+
__firstLetter?: ResponsiveValue<CSSObject>;
|
|
2925
|
+
__firstLine?: ResponsiveValue<CSSObject>;
|
|
2926
|
+
__active?: ResponsiveValue<CSSObject>;
|
|
2927
|
+
__firstChild?: ResponsiveValue<CSSObject>;
|
|
2928
|
+
__focus?: ResponsiveValue<CSSObject>;
|
|
2929
|
+
__hover?: ResponsiveValue<CSSObject>;
|
|
2930
|
+
__lang?: ResponsiveValue<CSSObject>;
|
|
2931
|
+
__link?: ResponsiveValue<CSSObject>;
|
|
2932
|
+
__visited?: ResponsiveValue<CSSObject>;
|
|
2887
2933
|
style?: ResponsiveValue<CSSObject>;
|
|
2888
2934
|
sx?: ResponsiveValue<CSSObject>;
|
|
2889
2935
|
};
|
|
@@ -3432,6 +3478,23 @@ declare type changeDateFunc = (value: Date) => void;
|
|
|
3432
3478
|
declare type useCalendarProps = {
|
|
3433
3479
|
onChangeWeek?: onChangeWeekFunc;
|
|
3434
3480
|
onChangeMonth?: onChangeMonthFunc;
|
|
3481
|
+
};
|
|
3482
|
+
declare const useCalendar: ({ onChangeWeek, onChangeMonth, }: useCalendarProps) => {
|
|
3483
|
+
currentMonth: Date;
|
|
3484
|
+
currentWeek: number;
|
|
3485
|
+
selectedDate: Date;
|
|
3486
|
+
setSelectedDate: Dispatch<SetStateAction<Date>>;
|
|
3487
|
+
setCurrentWeek: Dispatch<SetStateAction<number>>;
|
|
3488
|
+
setCurrentMonth: Dispatch<SetStateAction<Date>>;
|
|
3489
|
+
onClickDay: (day: Date) => void;
|
|
3490
|
+
onNextWeek: () => void;
|
|
3491
|
+
onPrevWeek: () => void;
|
|
3492
|
+
onNextMonth: () => void;
|
|
3493
|
+
onPrevMonth: () => void;
|
|
3494
|
+
changeWeek: (action: string, value?: Date) => void;
|
|
3495
|
+
changeDate: (value: Date) => void;
|
|
3496
|
+
getDatesBetween: (startDt: Date, endDt: Date) => Date[];
|
|
3497
|
+
onReset: () => void;
|
|
3435
3498
|
};
|
|
3436
3499
|
|
|
3437
3500
|
declare type TasksCalendarHeaderProps = {
|
|
@@ -3576,4 +3639,33 @@ declare type SimpleWindowedTableProps = {
|
|
|
3576
3639
|
};
|
|
3577
3640
|
declare function SimpleWindowedTable({ columns, data, itemSize, height, minWidth, maxWidth, defaultSort, onClickRow, onScroll, onUpdateData, useTableProps, tableHeaderProps, tableFooterProps, hideFooter, className, NoRowsFound, }: SimpleWindowedTableProps): JSX.Element;
|
|
3578
3641
|
|
|
3579
|
-
|
|
3642
|
+
declare function useDelayUnmount(isMounted: boolean, delayTime: number): boolean;
|
|
3643
|
+
//# sourceMappingURL=useDelayUnmount.d.ts.map
|
|
3644
|
+
|
|
3645
|
+
declare const usePrefersReducedMotion: () => boolean;
|
|
3646
|
+
|
|
3647
|
+
declare const useRandomInterval: (callback: () => void, minDelay?: number, maxDelay?: number) => () => void;
|
|
3648
|
+
|
|
3649
|
+
declare const useWindowSize: () => number[];
|
|
3650
|
+
//# sourceMappingURL=useWindowSize.d.ts.map
|
|
3651
|
+
|
|
3652
|
+
declare function useLongPress(callback?: () => void, ms?: number): {
|
|
3653
|
+
onMouseDown: () => void;
|
|
3654
|
+
onMouseUp: () => void;
|
|
3655
|
+
onMouseLeave: () => void;
|
|
3656
|
+
onTouchStart: () => void;
|
|
3657
|
+
onTouchEnd: () => void;
|
|
3658
|
+
};
|
|
3659
|
+
|
|
3660
|
+
declare const useClickOutside: <T extends HTMLElement = HTMLElement>(props: {
|
|
3661
|
+
ref: MutableRefObject<T | null>;
|
|
3662
|
+
eventType?: "mousedown" | "mouseup" | undefined;
|
|
3663
|
+
onClick?: ((e?: any) => void) | undefined;
|
|
3664
|
+
onCleanup?: Function | undefined;
|
|
3665
|
+
}) => void;
|
|
3666
|
+
//# sourceMappingURL=useClickOutside.d.ts.map
|
|
3667
|
+
|
|
3668
|
+
declare const useFallbackRef: <T>(forwardedRef: ForwardedRef<T>) => MutableRefObject<T | null>;
|
|
3669
|
+
//# sourceMappingURL=useFallbackRef.d.ts.map
|
|
3670
|
+
|
|
3671
|
+
export { AddIcon, AddNoteIcon, 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, CollapseStyled, CollapseStyledProps, CollapseWrapper, CollapseWrapperProps, Collapsible, CollapsibleArrowIcon, CollapsibleLabel, CollapsiblePanel, CollapsiblePanelProps, CollapsiblePanelTitle, CollapsiblePanelTitleProps, CollapsiblePanels, CollapsiblePanelsProps, CollapsibleProps, Collapsible$1 as CollapsibleV2, Collapsibles, Column, ColumnSelectIcon, CommentIcon, CompletedCheckmarkIcon, ConfirmPopup, CouponIcon, SKUCreatableSelect as CreatableSelect, CreditCardIcon, Csku, CskuProps, CustomDateInput, Datepicker, DatepickerPorps, DaysBodyWrapper, DaysHeaderWrapper, DefaultCalendarFooter, DefaultCalendarHeader, DefaultStar, DollarIcon, DoneButton, Dot, DownloadIcon, DragIcon, DraggableTasksCalendar, DropArea, DropAreaProps, DropDownContent, Dropdown, DropdownItem, DropdownProps, DropzoneTypes, Dropzoned, DropzonedPreviews, EditIcon, EllipsisIcon, EpsIcon, ErrorBoundary, EstimateCircleIcon, EyeIcon, FeedPost, FilledChevronIcon, FolderIcon, GalleryIcon, GearIcon, GlobalStyle, Grid, GridCell, GridIcon, GridItem, GridItemProps, GridProps, GridRow, GridTable, GridTableContainer, H1, H2, H3, H4, H5, H6, HandleIcon, HeaderWrapper, HeadlessTable, HistoryIcon, IconButton, IconButtonProps, IconDoc, Img, InfoIcon, Input, InputIconLabel, InputIconLabelContainer, InputProps, InputStepper, InputStepperStyled, IntegrationsIcon, 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, 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, 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, TrashIcon, 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 };
|