@redsift/design-system 11.6.0-muiv5-alpha.5 → 11.6.0-muiv5-alpha.7
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/_internal/Alert2.js +182 -39
- package/_internal/AppBar.js +240 -29
- package/_internal/AppContainer.js +132 -86
- package/_internal/AppContent.js +84 -17
- package/_internal/Badge2.js +137 -4
- package/_internal/BreadcrumbItem.js +85 -3
- package/_internal/Breadcrumbs2.js +86 -21
- package/_internal/Button2.js +81 -20
- package/_internal/ButtonGroup.js +165 -25
- package/_internal/ButtonLink.js +74 -18
- package/_internal/Card2.js +151 -29
- package/_internal/CardActions.js +38 -3
- package/_internal/CardBody.js +36 -3
- package/_internal/CardHeader.js +77 -3
- package/_internal/Checkbox2.js +234 -58
- package/_internal/CheckboxGroup.js +182 -4
- package/_internal/ConditionalWrapper.js +11 -12
- package/_internal/DetailedCard.js +6912 -48
- package/_internal/DetailedCardCollapsibleSectionItems.js +58 -3
- package/_internal/DetailedCardHeader.js +61 -3
- package/_internal/DetailedCardSection.js +166 -3
- package/_internal/DetailedCardSectionItem.js +88 -3
- package/_internal/Flexbox2.js +85 -22
- package/_internal/Grid2.js +87 -24
- package/_internal/GridItem.js +34 -3
- package/_internal/Heading2.js +107 -3
- package/_internal/Icon2.js +206 -5
- package/_internal/IconButton.js +71 -3
- package/_internal/IconButtonLink.js +65 -18
- package/_internal/Item2.js +390 -73
- package/_internal/Link2.js +56 -15
- package/_internal/LinkButton.js +56 -13
- package/_internal/Number2.js +103 -61
- package/_internal/NumberField.js +3959 -65
- package/_internal/Pill2.js +400 -4
- package/_internal/ProgressBar.js +61 -18
- package/_internal/Radio2.js +227 -56
- package/_internal/RadioGroup.js +170 -4
- package/_internal/Shield2.js +220 -4
- package/_internal/SideNavigationMenu.js +586 -4
- package/_internal/SideNavigationMenuItem.js +299 -4
- package/_internal/Skeleton2.js +36 -9
- package/_internal/SkeletonCircle.js +52 -3
- package/_internal/SkeletonText.js +71 -3
- package/_internal/Spinner2.js +319 -29
- package/_internal/Switch2.js +310 -56
- package/_internal/SwitchGroup.js +182 -4
- package/_internal/Text2.js +45 -3
- package/_internal/TextArea.js +430 -20
- package/_internal/TextField.js +463 -19
- package/_internal/alert.js +2 -5
- package/_internal/app-bar.js +2 -8
- package/_internal/app-container.js +3 -9
- package/_internal/app-content.js +2 -5
- package/_internal/app-side-panel.js +3 -11
- package/_internal/badge.js +2 -6
- package/_internal/breadcrumb-item.js +1 -4
- package/_internal/breadcrumbs.js +2 -6
- package/_internal/button-group.js +2 -5
- package/_internal/button-link.js +2 -8
- package/_internal/button.js +3 -8
- package/_internal/card-actions.js +1 -4
- package/_internal/card-body.js +1 -4
- package/_internal/card-header.js +1 -8
- package/_internal/card.js +2 -11
- package/_internal/checkbox-group.js +2 -6
- package/_internal/checkbox.js +2 -6
- package/_internal/colors.js +87 -91
- package/_internal/conditional-wrapper.js +2 -2
- package/_internal/detailed-card-collapsible-section-items.js +1 -3
- package/_internal/detailed-card-header.js +1 -7
- package/_internal/detailed-card-section-item.js +1 -10
- package/_internal/detailed-card-section.js +1 -6
- package/_internal/detailed-card.js +2 -16
- package/_internal/flexbox.js +2 -5
- package/_internal/focus-within-group.js +3 -3
- package/_internal/fonts.js +4 -6
- package/_internal/gradient-border.js +35 -16
- package/_internal/grid-item.js +1 -4
- package/_internal/grid.js +2 -6
- package/_internal/heading.js +2 -6
- package/_internal/icon-button-link.js +2 -8
- package/_internal/icon-button.js +2 -6
- package/_internal/icon.js +2 -6
- package/_internal/item.js +2 -8
- package/_internal/link-button.js +2 -8
- package/_internal/link.js +3 -8
- package/_internal/listbox.js +3 -6
- package/_internal/number-field.js +2 -9
- package/_internal/number.js +2 -7
- package/_internal/pill.js +2 -6
- package/_internal/progress-bar.js +2 -5
- package/_internal/radio-group.js +2 -6
- package/_internal/radio.js +2 -6
- package/_internal/shared.js +2 -5
- package/_internal/shield.js +2 -6
- package/_internal/side-navigation-menu-bar.js +3 -9
- package/_internal/side-navigation-menu-item.js +2 -8
- package/_internal/side-navigation-menu.js +2 -8
- package/_internal/skeleton-circle.js +1 -6
- package/_internal/skeleton-text.js +2 -6
- package/_internal/skeleton.js +1 -7
- package/_internal/spinner.js +2 -5
- package/_internal/styles.js +235 -17
- package/_internal/styles2.js +44 -280
- package/_internal/switch-group.js +2 -6
- package/_internal/switch.js +2 -6
- package/_internal/text-area.js +2 -9
- package/_internal/text-field.js +2 -10
- package/_internal/text.js +2 -6
- package/_internal/theme.js +1 -3
- package/_internal/types.js +7 -31
- package/_internal/types2.js +18 -29
- package/_internal/types3.js +15 -18
- package/_internal/useAppSidePanel.js +331 -6
- package/_internal/useFocusOnList.js +502 -44
- package/_internal/useListboxItem.js +120 -23
- package/_internal/useSideNavigationMenuBar.js +371 -7
- package/_internal/useTheme.js +10 -8
- package/index.d.ts +4667 -0
- package/index.js +523 -1674
- package/package.json +2 -2
- package/_internal/SideNavigationMenuBar.js +0 -9
- package/_internal/helpers.js +0 -23
- package/_internal/types10.js +0 -20
- package/_internal/types11.js +0 -27
- package/_internal/types12.js +0 -35
- package/_internal/types13.js +0 -143
- package/_internal/types14.js +0 -11
- package/_internal/types15.js +0 -62
- package/_internal/types16.js +0 -56
- package/_internal/types17.js +0 -57
- package/_internal/types18.js +0 -40
- package/_internal/types19.js +0 -101
- package/_internal/types20.js +0 -47
- package/_internal/types21.js +0 -68
- package/_internal/types22.js +0 -52
- package/_internal/types23.js +0 -174
- package/_internal/types24.js +0 -18
- package/_internal/types25.js +0 -12
- package/_internal/types26.js +0 -36
- package/_internal/types27.js +0 -72
- package/_internal/types28.js +0 -73
- package/_internal/types29.js +0 -99
- package/_internal/types4.js +0 -67
- package/_internal/types5.js +0 -11
- package/_internal/types6.js +0 -11
- package/_internal/types7.js +0 -28
- package/_internal/types8.js +0 -72
- package/_internal/types9.js +0 -16
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"version": "version-changelog ../../CHANGELOG.md && changelog-verify ../../CHANGELOG.md && git add ../../CHANGELOG.md"
|
|
34
34
|
},
|
|
35
35
|
"types": "index.d.ts",
|
|
36
|
-
"version": "11.6.0-muiv5-alpha.
|
|
36
|
+
"version": "11.6.0-muiv5-alpha.7",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@react-spring/web": "^9.7.1",
|
|
39
39
|
"classnames": "^2.3.1",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"react-dom": ">=17",
|
|
101
101
|
"styled-components": "^5.3.5"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "9b206bde87877e58682621cf219c341f7f7ad8e7"
|
|
104
104
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { b as SideNavigationMenuBarProps } from './types23.js';
|
|
2
|
-
import { C as Comp } from './helpers.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The SideNavigationMenuBar component.
|
|
6
|
-
*/
|
|
7
|
-
declare const SideNavigationMenuBar: Comp<SideNavigationMenuBarProps, HTMLElement>;
|
|
8
|
-
|
|
9
|
-
export { SideNavigationMenuBar as S };
|
package/_internal/helpers.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Ref, ReactElement } from 'react';
|
|
2
|
-
|
|
3
|
-
/** Component Type. */
|
|
4
|
-
type Comp<P, T = HTMLElement> = {
|
|
5
|
-
(props: P & {
|
|
6
|
-
ref?: Ref<T>;
|
|
7
|
-
}): ReactElement | null;
|
|
8
|
-
/** React component type. */
|
|
9
|
-
readonly $$typeof?: symbol;
|
|
10
|
-
/** Component name. */
|
|
11
|
-
displayName?: string;
|
|
12
|
-
/** Component base class name. */
|
|
13
|
-
className?: string;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* JS falsy values.
|
|
17
|
-
* (excluding `NaN` as it can't be distinguished from `number`)
|
|
18
|
-
*/
|
|
19
|
-
type Falsy = false | undefined | null | 0 | '';
|
|
20
|
-
/** Get types of the values of a record. */
|
|
21
|
-
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
22
|
-
|
|
23
|
-
export { Comp as C, Falsy as F, ValueOf as V };
|
package/_internal/types10.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { b as HeadingProps } from './types15.js';
|
|
3
|
-
import { T as Theme } from './colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Component props.
|
|
7
|
-
*/
|
|
8
|
-
interface DetailedCardHeaderProps extends ComponentProps<'div'> {
|
|
9
|
-
/** Header. */
|
|
10
|
-
header?: string;
|
|
11
|
-
/** Heading props allowing to override the component rendered by the heading without changing its style. */
|
|
12
|
-
headingProps?: Pick<HeadingProps, 'as' | 'noWrap'>;
|
|
13
|
-
/** Whether the card is loading or not. */
|
|
14
|
-
isLoading?: boolean;
|
|
15
|
-
}
|
|
16
|
-
type StyledDetailedCardHeaderProps = DetailedCardHeaderProps & {
|
|
17
|
-
$theme: Theme;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { DetailedCardHeaderProps as D, StyledDetailedCardHeaderProps as S };
|
package/_internal/types11.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
-
import { a as BadgeProps } from './types2.js';
|
|
3
|
-
import { N as NotificationsColorPalette, c as PresentationColorPalette } from './colors.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Component props.
|
|
7
|
-
*/
|
|
8
|
-
interface DetailedCardSectionProps extends ComponentProps<'div'> {
|
|
9
|
-
/** Props to pass to the badge displayed next to the title. */
|
|
10
|
-
badge?: Omit<BadgeProps, 'ref'>;
|
|
11
|
-
/** Color that will be used on the header line. */
|
|
12
|
-
color?: NotificationsColorPalette | PresentationColorPalette | (string & {});
|
|
13
|
-
/** Header. */
|
|
14
|
-
header?: string | ReactElement;
|
|
15
|
-
/** Whether the section is collapsed or not. */
|
|
16
|
-
readonly isCollapsed?: boolean;
|
|
17
|
-
/** Whether the section can be collasped or not. */
|
|
18
|
-
isCollapsible?: boolean;
|
|
19
|
-
/** Whether the card is loading or not. */
|
|
20
|
-
isLoading?: boolean;
|
|
21
|
-
}
|
|
22
|
-
type StyledDetailedCardSectionProps = Omit<DetailedCardSectionProps, 'color' | 'isCollapsed'> & {
|
|
23
|
-
$color: DetailedCardSectionProps['color'];
|
|
24
|
-
$isCollapsed: DetailedCardSectionProps['isCollapsed'];
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export { DetailedCardSectionProps as D, StyledDetailedCardSectionProps as S };
|
package/_internal/types12.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
-
import { a as PillProps } from './types20.js';
|
|
3
|
-
import { S as ShieldVariant } from './types22.js';
|
|
4
|
-
import { b as IconProps } from './types17.js';
|
|
5
|
-
import { b as TextProps } from './types28.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Component props.
|
|
9
|
-
*/
|
|
10
|
-
interface DetailedCardSectionItemProps extends ComponentProps<'div'> {
|
|
11
|
-
/** Description */
|
|
12
|
-
description?: string | ReactElement;
|
|
13
|
-
/** TextProps to forward to the description. */
|
|
14
|
-
descriptionProps?: Omit<TextProps, 'ref'>;
|
|
15
|
-
/**
|
|
16
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
17
|
-
* Can also be a ReactElement.
|
|
18
|
-
*/
|
|
19
|
-
icon?: IconProps['icon'];
|
|
20
|
-
/** Props to pass to the Icon component. */
|
|
21
|
-
iconProps?: Omit<IconProps, 'ref' | 'icon'>;
|
|
22
|
-
/** Whether the section item can be collapsed or not. */
|
|
23
|
-
isCollapsible?: boolean;
|
|
24
|
-
/** Whether the card is loading or not. */
|
|
25
|
-
isLoading?: boolean;
|
|
26
|
-
/** Text to display inside a Pill. */
|
|
27
|
-
pill?: string;
|
|
28
|
-
/** Props to pass to the Pill component. */
|
|
29
|
-
pillProps?: Omit<PillProps, 'ref'>;
|
|
30
|
-
/** Shield to display in place of the icon. */
|
|
31
|
-
shield?: ShieldVariant;
|
|
32
|
-
}
|
|
33
|
-
type StyledDetailedCardSectionItemProps = DetailedCardSectionItemProps & {};
|
|
34
|
-
|
|
35
|
-
export { DetailedCardSectionItemProps as D, StyledDetailedCardSectionItemProps as S };
|
package/_internal/types13.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
|
|
3
|
-
declare enum EventKey {
|
|
4
|
-
ArrowLeft = "ArrowLeft",
|
|
5
|
-
ArrowRight = "ArrowRight",
|
|
6
|
-
ArrowUp = "ArrowUp",
|
|
7
|
-
ArrowDown = "ArrowDown",
|
|
8
|
-
Home = "Home",
|
|
9
|
-
End = "End",
|
|
10
|
-
Enter = "Enter"
|
|
11
|
-
}
|
|
12
|
-
type KeyDirection = 'horizontal' | 'vertical' | 'both';
|
|
13
|
-
declare enum Navigation {
|
|
14
|
-
PREVIOUS = "PREVIOUS",
|
|
15
|
-
NEXT = "NEXT",
|
|
16
|
-
VERY_FIRST = "VERY_FIRST",
|
|
17
|
-
VERY_LAST = "VERY_LAST",
|
|
18
|
-
PREVIOUS_ROW = "PREVIOUS_ROW",
|
|
19
|
-
NEXT_ROW = "NEXT_ROW",
|
|
20
|
-
FIRST_IN_ROW = "FIRST_IN_ROW",
|
|
21
|
-
LAST_IN_ROW = "LAST_IN_ROW"
|
|
22
|
-
}
|
|
23
|
-
type TabStop = Readonly<{
|
|
24
|
-
id: string;
|
|
25
|
-
domElementRef: React.RefObject<Element>;
|
|
26
|
-
isDisabled: boolean;
|
|
27
|
-
rowIndex: number | null;
|
|
28
|
-
value: string;
|
|
29
|
-
}>;
|
|
30
|
-
type RowStartMap = Map<Exclude<TabStop['rowIndex'], null>, number>;
|
|
31
|
-
type FocusWithinGroupState = Readonly<{
|
|
32
|
-
selectedId: string | null;
|
|
33
|
-
allowFocusing: boolean;
|
|
34
|
-
tabStops: readonly TabStop[];
|
|
35
|
-
direction: KeyDirection;
|
|
36
|
-
focusOnClick: boolean;
|
|
37
|
-
focusOnInit: boolean;
|
|
38
|
-
loopAround: boolean;
|
|
39
|
-
rowStartMap: RowStartMap | null;
|
|
40
|
-
focusType: 'roving-tabindex' | 'virtual-focus';
|
|
41
|
-
listRole: 'listbox' | 'menu';
|
|
42
|
-
activedescendant?: [string, string];
|
|
43
|
-
filter?: {
|
|
44
|
-
value: string;
|
|
45
|
-
type: 'startsWith' | 'contains' | 'endsWith';
|
|
46
|
-
caseSensitive?: boolean;
|
|
47
|
-
};
|
|
48
|
-
delayedAction?: BaseFocusWithinGroupAction;
|
|
49
|
-
maxOptionsLength?: number;
|
|
50
|
-
}>;
|
|
51
|
-
type FocusWithinGroupOptions = Partial<Pick<FocusWithinGroupState, 'direction' | 'focusOnClick' | 'focusOnInit' | 'loopAround' | 'focusType' | 'listRole' | 'activedescendant' | 'maxOptionsLength'>>;
|
|
52
|
-
declare enum FocusWithinGroupActionType {
|
|
53
|
-
REGISTER_TAB_STOP = "REGISTER_TAB_STOP",
|
|
54
|
-
UNREGISTER_TAB_STOP = "UNREGISTER_TAB_STOP",
|
|
55
|
-
KEY_DOWN_ON_ITEM = "KEY_DOWN_ON_ITEM",
|
|
56
|
-
CLICK_ON_ITEM = "CLICK_ON_ITEM",
|
|
57
|
-
KEY_DOWN_ON_LIST = "KEY_DOWN_ON_LIST",
|
|
58
|
-
FOCUS_ON_LIST = "FOCUS_ON_LIST",
|
|
59
|
-
BLUR_ON_LIST = "BLUR_ON_LIST",
|
|
60
|
-
TAB_STOP_UPDATED = "TAB_STOP_UPDATED",
|
|
61
|
-
OPTIONS_UPDATED = "OPTIONS_UPDATED",
|
|
62
|
-
FILTER_LIST = "FILTER_LIST",
|
|
63
|
-
DELAY_ACTION = "DELAY_ACTION"
|
|
64
|
-
}
|
|
65
|
-
type BaseFocusWithinGroupAction = {
|
|
66
|
-
type: FocusWithinGroupActionType.REGISTER_TAB_STOP;
|
|
67
|
-
payload: TabStop;
|
|
68
|
-
} | {
|
|
69
|
-
type: FocusWithinGroupActionType.UNREGISTER_TAB_STOP;
|
|
70
|
-
payload: {
|
|
71
|
-
id: TabStop['id'];
|
|
72
|
-
};
|
|
73
|
-
} | {
|
|
74
|
-
type: FocusWithinGroupActionType.TAB_STOP_UPDATED;
|
|
75
|
-
payload: {
|
|
76
|
-
id: TabStop['id'];
|
|
77
|
-
rowIndex: TabStop['rowIndex'];
|
|
78
|
-
isDisabled: TabStop['isDisabled'];
|
|
79
|
-
value: string;
|
|
80
|
-
};
|
|
81
|
-
} | {
|
|
82
|
-
type: FocusWithinGroupActionType.KEY_DOWN_ON_ITEM;
|
|
83
|
-
payload: {
|
|
84
|
-
id: TabStop['id'];
|
|
85
|
-
key: EventKey;
|
|
86
|
-
ctrlKey: boolean;
|
|
87
|
-
};
|
|
88
|
-
} | {
|
|
89
|
-
type: FocusWithinGroupActionType.CLICK_ON_ITEM;
|
|
90
|
-
payload: {
|
|
91
|
-
id: TabStop['id'];
|
|
92
|
-
};
|
|
93
|
-
} | {
|
|
94
|
-
type: FocusWithinGroupActionType.KEY_DOWN_ON_LIST;
|
|
95
|
-
payload: {
|
|
96
|
-
key: EventKey;
|
|
97
|
-
ctrlKey: boolean;
|
|
98
|
-
};
|
|
99
|
-
} | {
|
|
100
|
-
type: FocusWithinGroupActionType.FOCUS_ON_LIST;
|
|
101
|
-
payload: {
|
|
102
|
-
id: TabStop['id'];
|
|
103
|
-
filter?: FocusWithinGroupState['filter'];
|
|
104
|
-
};
|
|
105
|
-
} | {
|
|
106
|
-
type: FocusWithinGroupActionType.BLUR_ON_LIST;
|
|
107
|
-
payload: {};
|
|
108
|
-
} | {
|
|
109
|
-
type: FocusWithinGroupActionType.OPTIONS_UPDATED;
|
|
110
|
-
payload: FocusWithinGroupOptions;
|
|
111
|
-
} | {
|
|
112
|
-
type: FocusWithinGroupActionType.FILTER_LIST;
|
|
113
|
-
payload: {
|
|
114
|
-
filter: FocusWithinGroupState['filter'];
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
type FocusWithinGroupAction = BaseFocusWithinGroupAction | {
|
|
118
|
-
type: FocusWithinGroupActionType.DELAY_ACTION;
|
|
119
|
-
payload: BaseFocusWithinGroupAction;
|
|
120
|
-
};
|
|
121
|
-
type UseFocusWithinGroupProps = {
|
|
122
|
-
tabIndex?: number;
|
|
123
|
-
isFocused: boolean;
|
|
124
|
-
handleKeyDown: (event: React.KeyboardEvent) => void;
|
|
125
|
-
handleClick: () => void;
|
|
126
|
-
};
|
|
127
|
-
type UseFocusGroupProps = {
|
|
128
|
-
activedescendant: [string, string] | undefined;
|
|
129
|
-
handleKeyDown: (event: React.KeyboardEvent) => void;
|
|
130
|
-
handleFocus: () => void;
|
|
131
|
-
handleBlur: () => void;
|
|
132
|
-
};
|
|
133
|
-
type FocusWithinGroupContextProps = {
|
|
134
|
-
state: FocusWithinGroupState;
|
|
135
|
-
dispatch: React.Dispatch<FocusWithinGroupAction>;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* Component props.
|
|
139
|
-
*/
|
|
140
|
-
interface FocusWithinGroupProps extends ComponentProps<'div'>, FocusWithinGroupOptions {
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export { BaseFocusWithinGroupAction as B, EventKey as E, FocusWithinGroupState as F, KeyDirection as K, Navigation as N, RowStartMap as R, TabStop as T, UseFocusWithinGroupProps as U, FocusWithinGroupOptions as a, FocusWithinGroupActionType as b, FocusWithinGroupAction as c, UseFocusGroupProps as d, FocusWithinGroupContextProps as e, FocusWithinGroupProps as f };
|
package/_internal/types14.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { h as StylingProps, I as InternalSpacingProps, B as BorderProps } from './styles2.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Component props.
|
|
6
|
-
*/
|
|
7
|
-
interface GridItemProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, BorderProps {
|
|
8
|
-
}
|
|
9
|
-
type StyledGridItemProps = GridItemProps;
|
|
10
|
-
|
|
11
|
-
export { GridItemProps as G, StyledGridItemProps as S };
|
package/_internal/types15.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { F as FontFamily } from './fonts.js';
|
|
3
|
-
import { V as ValueOf } from './helpers.js';
|
|
4
|
-
import { h as StylingProps } from './styles2.js';
|
|
5
|
-
import { N as NotificationsColorPalette, d as NeutralColorPalette, T as Theme } from './colors.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Component variant.
|
|
9
|
-
*/
|
|
10
|
-
declare const HeadingVariant: {
|
|
11
|
-
readonly h1: "h1";
|
|
12
|
-
readonly h2: "h2";
|
|
13
|
-
readonly h3: "h3";
|
|
14
|
-
readonly h4: "h4";
|
|
15
|
-
readonly h5: "h5";
|
|
16
|
-
readonly body: "body";
|
|
17
|
-
};
|
|
18
|
-
type HeadingVariant = ValueOf<typeof HeadingVariant>;
|
|
19
|
-
declare const HeadingComponent: {
|
|
20
|
-
readonly h1: "h1";
|
|
21
|
-
readonly h2: "h2";
|
|
22
|
-
readonly h3: "h3";
|
|
23
|
-
readonly h4: "h4";
|
|
24
|
-
readonly h5: "h5";
|
|
25
|
-
readonly span: "span";
|
|
26
|
-
};
|
|
27
|
-
type HeadingComponent = ValueOf<typeof HeadingComponent>;
|
|
28
|
-
/**
|
|
29
|
-
* Component props.
|
|
30
|
-
*/
|
|
31
|
-
interface HeadingProps extends ComponentProps<'span'>, StylingProps {
|
|
32
|
-
/** The actual component rendered in the DOM. */
|
|
33
|
-
as: HeadingComponent;
|
|
34
|
-
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
35
|
-
color?: NotificationsColorPalette | NeutralColorPalette | 'radar' | (string & {});
|
|
36
|
-
/** Font family. */
|
|
37
|
-
fontFamily?: FontFamily;
|
|
38
|
-
/** Font size. */
|
|
39
|
-
fontSize?: string;
|
|
40
|
-
/** Font weight. */
|
|
41
|
-
fontWeight?: string;
|
|
42
|
-
/** Line height. */
|
|
43
|
-
lineHeight?: string;
|
|
44
|
-
/** Whether the text will truncate with a text overflow ellipsis or wrap. */
|
|
45
|
-
noWrap?: boolean;
|
|
46
|
-
/** Theme. */
|
|
47
|
-
theme?: Theme;
|
|
48
|
-
/** The component the Heading will look like. */
|
|
49
|
-
variant?: HeadingVariant;
|
|
50
|
-
}
|
|
51
|
-
type StyledHeadingProps = Omit<HeadingProps, 'color' | 'noWrap'> & {
|
|
52
|
-
$color: HeadingProps['color'];
|
|
53
|
-
$fontFamily?: HeadingProps['fontFamily'];
|
|
54
|
-
$fontSize: HeadingProps['fontSize'];
|
|
55
|
-
$fontWeight: HeadingProps['fontWeight'];
|
|
56
|
-
$lineHeight: HeadingProps['lineHeight'];
|
|
57
|
-
$noWrap: HeadingProps['noWrap'];
|
|
58
|
-
$theme: HeadingProps['theme'];
|
|
59
|
-
$variant: HeadingProps['variant'];
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
export { HeadingVariant as H, StyledHeadingProps as S, HeadingComponent as a, HeadingProps as b };
|
package/_internal/types16.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { b as IconProps } from './types17.js';
|
|
3
|
-
import { B as ButtonsColorPalette, T as Theme } from './colors.js';
|
|
4
|
-
import { V as ValueOf } from './helpers.js';
|
|
5
|
-
import { h as StylingProps } from './styles2.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Component variant.
|
|
9
|
-
*/
|
|
10
|
-
declare const IconButtonVariant: {
|
|
11
|
-
readonly primary: "primary";
|
|
12
|
-
readonly secondary: "secondary";
|
|
13
|
-
readonly unstyled: "unstyled";
|
|
14
|
-
};
|
|
15
|
-
type IconButtonVariant = ValueOf<typeof IconButtonVariant>;
|
|
16
|
-
/**
|
|
17
|
-
* Component color.
|
|
18
|
-
*/
|
|
19
|
-
type IconButtonColor = ButtonsColorPalette;
|
|
20
|
-
/**
|
|
21
|
-
* Component props.
|
|
22
|
-
*/
|
|
23
|
-
interface IconButtonProps extends ComponentProps<'button'>, StylingProps {
|
|
24
|
-
/** Color variant. */
|
|
25
|
-
color?: IconButtonColor;
|
|
26
|
-
/**
|
|
27
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
28
|
-
* Can also be a ReactElement.
|
|
29
|
-
*/
|
|
30
|
-
icon: IconProps['icon'];
|
|
31
|
-
/** Props to forward to the icon. */
|
|
32
|
-
iconProps?: Omit<IconProps, 'ref' | 'icon'>;
|
|
33
|
-
/** Whether the component is active or not. */
|
|
34
|
-
isActive?: boolean;
|
|
35
|
-
/** Whether the component is disabled or not. */
|
|
36
|
-
isDisabled?: boolean;
|
|
37
|
-
/** Whether the component is hovered or not. */
|
|
38
|
-
isHovered?: boolean;
|
|
39
|
-
/** Whether the component is in a loading state or not. */
|
|
40
|
-
isLoading?: boolean;
|
|
41
|
-
/** Theme. */
|
|
42
|
-
theme?: Theme;
|
|
43
|
-
/** Button variant. */
|
|
44
|
-
variant?: IconButtonVariant;
|
|
45
|
-
}
|
|
46
|
-
type StyledIconButtonProps = Omit<IconButtonProps, 'icon'> & {
|
|
47
|
-
$color: IconButtonProps['color'];
|
|
48
|
-
$isActive: IconButtonProps['isActive'];
|
|
49
|
-
$isDisabled: IconButtonProps['isDisabled'];
|
|
50
|
-
$isHovered: IconButtonProps['isHovered'];
|
|
51
|
-
$isLoading: IconButtonProps['isLoading'];
|
|
52
|
-
$theme: IconButtonProps['theme'];
|
|
53
|
-
$variant: IconButtonProps['variant'];
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export { IconButtonVariant as I, StyledIconButtonProps as S, IconButtonColor as a, IconButtonProps as b };
|
package/_internal/types17.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ReactElement } from 'react';
|
|
2
|
-
import { L as LayoutProps, S as SpacingProps, P as PositioningProps } from './styles2.js';
|
|
3
|
-
import { N as NotificationsColorPalette, b as ProductColorPalette, T as Theme } from './colors.js';
|
|
4
|
-
import { V as ValueOf } from './helpers.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component size.
|
|
8
|
-
*/
|
|
9
|
-
declare const IconSize: {
|
|
10
|
-
readonly xsmall: "xsmall";
|
|
11
|
-
readonly small: "small";
|
|
12
|
-
readonly medium: "medium";
|
|
13
|
-
readonly large: "large";
|
|
14
|
-
readonly xlarge: "xlarge";
|
|
15
|
-
readonly xxlarge: "xxlarge";
|
|
16
|
-
};
|
|
17
|
-
type IconSize = ValueOf<typeof IconSize>;
|
|
18
|
-
type IconDimensions = {
|
|
19
|
-
width?: number;
|
|
20
|
-
height?: number;
|
|
21
|
-
fontSize?: number;
|
|
22
|
-
lineHeight?: number;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Component props.
|
|
26
|
-
*/
|
|
27
|
-
interface IconProps extends ComponentProps<'span'>, LayoutProps, SpacingProps, PositioningProps {
|
|
28
|
-
/** Indicates whether the element is exposed to an accessibility API. */
|
|
29
|
-
'aria-hidden'?: boolean | 'false' | 'true';
|
|
30
|
-
/** A screen reader only label for the Icon. */
|
|
31
|
-
'aria-label'?: string;
|
|
32
|
-
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
33
|
-
color?: NotificationsColorPalette | ProductColorPalette | (string & {});
|
|
34
|
-
/** Whether the icon has a badge attached to it. */
|
|
35
|
-
badge?: ReactElement;
|
|
36
|
-
/**
|
|
37
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
38
|
-
* Can also be a ReactElement.
|
|
39
|
-
*/
|
|
40
|
-
icon: string | string[] | ReactElement;
|
|
41
|
-
/** Icon size. */
|
|
42
|
-
size?: IconSize | IconDimensions;
|
|
43
|
-
/** Additional properties to forward to the SVG tag. */
|
|
44
|
-
svgProps?: ComponentProps<'svg'>;
|
|
45
|
-
/** Theme. */
|
|
46
|
-
theme?: Theme;
|
|
47
|
-
}
|
|
48
|
-
type StyledIconProps = Omit<IconProps, 'color' | 'size' | 'icon' | 'svgProps'> & {
|
|
49
|
-
$color: IconProps['color'];
|
|
50
|
-
$width: IconDimensions['width'];
|
|
51
|
-
$height: IconDimensions['height'];
|
|
52
|
-
$fontSize: IconDimensions['fontSize'];
|
|
53
|
-
$lineHeight: IconDimensions['lineHeight'];
|
|
54
|
-
$theme: IconProps['theme'];
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export { IconSize as I, StyledIconProps as S, IconDimensions as a, IconProps as b };
|
package/_internal/types18.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ComponentProps, ElementType } from 'react';
|
|
2
|
-
import { b as IconProps } from './types17.js';
|
|
3
|
-
import { N as NotificationsColorPalette, d as NeutralColorPalette, T as Theme } from './colors.js';
|
|
4
|
-
import { h as StylingProps } from './styles2.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component props.
|
|
8
|
-
*/
|
|
9
|
-
interface LinkProps extends ComponentProps<'a'>, StylingProps {
|
|
10
|
-
/** Prop to pass a custom react component instead of a simple HTML anchor (useful for Nextjs or React Router Link component). */
|
|
11
|
-
as?: 'a' | ElementType;
|
|
12
|
-
/** Color variant. Either from color palette or hex or rgb strings. */
|
|
13
|
-
color?: NotificationsColorPalette | NeutralColorPalette | 'radar' | (string & {});
|
|
14
|
-
/** Whether the component is disabled or not. */
|
|
15
|
-
isDisabled?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
18
|
-
* Can also be a ReactElement.
|
|
19
|
-
*/
|
|
20
|
-
leftIcon?: IconProps['icon'];
|
|
21
|
-
/** Props to add to the left icon. */
|
|
22
|
-
leftIconProps?: Omit<IconProps, 'icon' | 'ref'>;
|
|
23
|
-
/**
|
|
24
|
-
* Can be a string or an array of strings containing `d` property of the `path` SVG element.<br />
|
|
25
|
-
* Can also be a ReactElement.
|
|
26
|
-
*/
|
|
27
|
-
rightIcon?: IconProps['icon'];
|
|
28
|
-
/** Props to add to the right icon. */
|
|
29
|
-
rightIconProps?: Omit<IconProps, 'icon' | 'ref'>;
|
|
30
|
-
/** Theme. */
|
|
31
|
-
theme?: Theme;
|
|
32
|
-
}
|
|
33
|
-
type StyledLinkProps = Omit<LinkProps, 'isDisabled'> & {
|
|
34
|
-
$isDisabled: LinkProps['isDisabled'];
|
|
35
|
-
$color: LinkProps['color'];
|
|
36
|
-
$theme: LinkProps['theme'];
|
|
37
|
-
$hasIcons: boolean;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
export { LinkProps as L, StyledLinkProps as S };
|
package/_internal/types19.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { U as UseFocusWithinGroupProps, a as FocusWithinGroupOptions } from './types13.js';
|
|
3
|
-
import { V as ValueOf } from './helpers.js';
|
|
4
|
-
import { C as ContainerProps } from './styles2.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component variant.
|
|
8
|
-
*/
|
|
9
|
-
declare const ListboxSelectionMode: {
|
|
10
|
-
readonly single: "single";
|
|
11
|
-
readonly multiple: "multiple";
|
|
12
|
-
};
|
|
13
|
-
type ListboxSelectionMode = ValueOf<typeof ListboxSelectionMode>;
|
|
14
|
-
/**
|
|
15
|
-
* Context props.
|
|
16
|
-
*/
|
|
17
|
-
type ListboxState = Readonly<{
|
|
18
|
-
isDisabled: boolean;
|
|
19
|
-
isReadOnly: boolean;
|
|
20
|
-
selectedValues: string[];
|
|
21
|
-
selectionMode: ListboxSelectionMode;
|
|
22
|
-
activedescendant?: [string, string];
|
|
23
|
-
}>;
|
|
24
|
-
declare enum ListboxActionType {
|
|
25
|
-
TOGGLE = "TOGGLE",
|
|
26
|
-
SET = "SET",
|
|
27
|
-
UPDATE_OPTIONS = "UPDATE_OPTIONS"
|
|
28
|
-
}
|
|
29
|
-
type ListboxAction = {
|
|
30
|
-
type: ListboxActionType.TOGGLE;
|
|
31
|
-
payload: {
|
|
32
|
-
value: string;
|
|
33
|
-
activedescendant?: [string, string];
|
|
34
|
-
};
|
|
35
|
-
} | {
|
|
36
|
-
type: ListboxActionType.SET;
|
|
37
|
-
payload: {
|
|
38
|
-
values: string[];
|
|
39
|
-
activedescendant?: [string, string];
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
type: ListboxActionType.UPDATE_OPTIONS;
|
|
43
|
-
payload: {
|
|
44
|
-
isDisabled: boolean;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type UseListboxItemProps = UseFocusWithinGroupProps & {
|
|
48
|
-
isSelected?: boolean;
|
|
49
|
-
isDisabled?: boolean;
|
|
50
|
-
};
|
|
51
|
-
type ListboxContextProps = {
|
|
52
|
-
state: ListboxState;
|
|
53
|
-
dispatch: React.Dispatch<ListboxAction>;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Component variant.
|
|
57
|
-
*/
|
|
58
|
-
declare const ListboxVariant: {
|
|
59
|
-
readonly standalone: "standalone";
|
|
60
|
-
readonly unstyled: "unstyled";
|
|
61
|
-
};
|
|
62
|
-
type ListboxVariant = ValueOf<typeof ListboxVariant>;
|
|
63
|
-
/**
|
|
64
|
-
* Component props.
|
|
65
|
-
*/
|
|
66
|
-
interface ListboxProps extends Omit<ComponentProps<'div'>, 'onChange'>, ContainerProps, FocusWithinGroupOptions {
|
|
67
|
-
/**
|
|
68
|
-
* Default selected values.
|
|
69
|
-
* Used for uncontrolled version.
|
|
70
|
-
*/
|
|
71
|
-
defaultValues?: string[];
|
|
72
|
-
/** Whether the component is disabled or not. */
|
|
73
|
-
isDisabled?: boolean;
|
|
74
|
-
/** Whether the component is invalid or not. */
|
|
75
|
-
isInvalid?: boolean;
|
|
76
|
-
/** Whether the component is read only or not. */
|
|
77
|
-
isReadOnly?: boolean;
|
|
78
|
-
/** Whether the component is required or not. */
|
|
79
|
-
isRequired?: boolean;
|
|
80
|
-
/** Label of the switch group. */
|
|
81
|
-
label?: string;
|
|
82
|
-
/** Method to handle component change. */
|
|
83
|
-
onChange?(values: string[]): void;
|
|
84
|
-
/** Whether the listbox allows multiple selections or single ones. */
|
|
85
|
-
selectionMode?: 'single' | 'multiple';
|
|
86
|
-
/**
|
|
87
|
-
* Currently selected values.
|
|
88
|
-
* Used for controlled version.
|
|
89
|
-
*/
|
|
90
|
-
values?: string[];
|
|
91
|
-
/** Whether the Listbox is used as standalone or is unstyled within another component. */
|
|
92
|
-
variant?: ListboxVariant;
|
|
93
|
-
}
|
|
94
|
-
type StyledListboxProps = Omit<ListboxProps, 'onChange'> & {
|
|
95
|
-
$isDisabled: ListboxProps['isDisabled'];
|
|
96
|
-
$isInvalid: ListboxProps['isInvalid'];
|
|
97
|
-
$isReadOnly: ListboxProps['isReadOnly'];
|
|
98
|
-
$variant: ListboxProps['variant'];
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export { ListboxSelectionMode as L, StyledListboxProps as S, UseListboxItemProps as U, ListboxState as a, ListboxActionType as b, ListboxAction as c, ListboxContextProps as d, ListboxVariant as e, ListboxProps as f };
|
package/_internal/types20.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { V as ValueOf } from './helpers.js';
|
|
3
|
-
import { h as StylingProps } from './styles2.js';
|
|
4
|
-
import { c as PresentationColorPalette, d as NeutralColorPalette, T as Theme } from './colors.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Component size.
|
|
8
|
-
*/
|
|
9
|
-
declare const PillSize: {
|
|
10
|
-
readonly small: "small";
|
|
11
|
-
readonly large: "large";
|
|
12
|
-
readonly xlarge: "xlarge";
|
|
13
|
-
};
|
|
14
|
-
type PillSize = ValueOf<typeof PillSize>;
|
|
15
|
-
/**
|
|
16
|
-
* Component props.
|
|
17
|
-
*/
|
|
18
|
-
interface PillProps extends ComponentProps<'div'>, StylingProps {
|
|
19
|
-
/** Whether the badge should automatically break content. */
|
|
20
|
-
autoBreak?: boolean;
|
|
21
|
-
/** Color to use for border. */
|
|
22
|
-
borderColor?: string;
|
|
23
|
-
/** Color variant. The product colors are available but should only be used to display the Pill in the color of another product. To display a Pill with a color of the current product, use `default`. */
|
|
24
|
-
color?: PresentationColorPalette | NeutralColorPalette | 'error' | 'warning' | 'success' | 'error-dark' | 'warning-dark' | 'success-dark' | (string & {});
|
|
25
|
-
/** Color to use when disabled. */
|
|
26
|
-
disabledColor?: string;
|
|
27
|
-
/** Color to use on hover. */
|
|
28
|
-
hoverColor?: string;
|
|
29
|
-
/** Whether the Pill is disabled or not. */
|
|
30
|
-
isDisabled?: boolean;
|
|
31
|
-
/** Size of the Pill. */
|
|
32
|
-
size?: PillSize;
|
|
33
|
-
/** Theme. */
|
|
34
|
-
theme?: Theme;
|
|
35
|
-
}
|
|
36
|
-
type StyledPillProps = Omit<PillProps, 'color' | 'autoBreak'> & {
|
|
37
|
-
$autoBreak: PillProps['autoBreak'];
|
|
38
|
-
$borderColor: PillProps['borderColor'];
|
|
39
|
-
$color: PillProps['color'];
|
|
40
|
-
$disabledColor: PillProps['disabledColor'];
|
|
41
|
-
$hoverColor: PillProps['hoverColor'];
|
|
42
|
-
$isDisabled: PillProps['isDisabled'];
|
|
43
|
-
$size: PillProps['size'];
|
|
44
|
-
$theme: PillProps['theme'];
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export { PillSize as P, StyledPillProps as S, PillProps as a };
|