@lumx/core 4.3.2-alpha.17 → 4.3.2-alpha.18
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/js/constants/enums/index.d.ts +9 -0
- package/js/constants/enums/index.js +10 -1
- package/js/constants/index.js +1 -1
- package/js/types/PartialBy.d.ts +12 -0
- package/js/types/index.d.ts +1 -0
- package/js/utils/classNames/bem/block.d.ts +3 -2
- package/js/utils/classNames/bem/element.d.ts +3 -2
- package/js/utils/classNames/bem/index.d.ts +5 -4
- package/js/utils/events/index.js +2 -0
- package/package.json +2 -28
- package/js/components/Badge/BadgeWrapper.d.ts +0 -13
- package/js/components/Badge/BadgeWrapperStories.d.ts +0 -29
- package/js/components/Badge/BadgeWrapperTests.d.ts +0 -9
- package/js/components/Badge/Stories.d.ts +0 -52
- package/js/components/Badge/Tests.d.ts +0 -12
- package/js/components/Badge/index.d.ts +0 -37
- package/js/components/Button/Button.d.ts +0 -48
- package/js/components/Button/ButtonGroup.d.ts +0 -36
- package/js/components/Button/ButtonGroupStories.d.ts +0 -37
- package/js/components/Button/ButtonRoot.d.ts +0 -55
- package/js/components/Button/ButtonRootTests.d.ts +0 -12
- package/js/components/Button/IconButton.d.ts +0 -45
- package/js/components/Button/IconButtonStories.d.ts +0 -211
- package/js/components/Button/IconButtonTests.d.ts +0 -15
- package/js/components/Button/Stories.d.ts +0 -301
- package/js/components/Button/Tests.d.ts +0 -15
- package/js/components/Checkbox/Stories.d.ts +0 -88
- package/js/components/Checkbox/Tests.d.ts +0 -15
- package/js/components/Checkbox/index.d.ts +0 -49
- package/js/components/Divider/Stories.d.ts +0 -21
- package/js/components/Divider/Tests.d.ts +0 -12
- package/js/components/Divider/index.d.ts +0 -27
- package/js/components/Flag/Stories.d.ts +0 -120
- package/js/components/Flag/Tests.d.ts +0 -14
- package/js/components/Flag/index.d.ts +0 -34
- package/js/components/FlexBox/Stories.d.ts +0 -108
- package/js/components/FlexBox/Tests.d.ts +0 -13
- package/js/components/FlexBox/constants.d.ts +0 -4
- package/js/components/FlexBox/index.d.ts +0 -50
- package/js/components/FlexBox/types.d.ts +0 -7
- package/js/components/Heading/Stories.d.ts +0 -89
- package/js/components/Heading/Tests.d.ts +0 -11
- package/js/components/Heading/constants.d.ts +0 -21
- package/js/components/Heading/index.d.ts +0 -44
- package/js/components/Heading/utils.d.ts +0 -8
- package/js/components/Icon/Stories.d.ts +0 -150
- package/js/components/Icon/Tests.d.ts +0 -14
- package/js/components/Icon/constants.d.ts +0 -1
- package/js/components/Icon/index.d.ts +0 -41
- package/js/components/InputHelper/Stories.d.ts +0 -43
- package/js/components/InputHelper/Tests.d.ts +0 -12
- package/js/components/InputHelper/constants.d.ts +0 -3
- package/js/components/InputHelper/index.d.ts +0 -26
- package/js/components/InputLabel/Stories.d.ts +0 -34
- package/js/components/InputLabel/Tests.d.ts +0 -12
- package/js/components/InputLabel/index.d.ts +0 -25
- package/js/components/Link/Stories.d.ts +0 -93
- package/js/components/Link/Tests.d.ts +0 -15
- package/js/components/Link/index.d.ts +0 -54
- package/js/components/Message/Stories.d.ts +0 -119
- package/js/components/Message/Tests.d.ts +0 -14
- package/js/components/Message/index.d.ts +0 -75
- package/js/components/RadioButton/Stories.d.ts +0 -77
- package/js/components/RadioButton/Tests.d.ts +0 -15
- package/js/components/RadioButton/index.d.ts +0 -45
- package/js/components/RawClickable/Tests.d.ts +0 -14
- package/js/components/RawClickable/index.d.ts +0 -13
- package/js/components/Skeleton/SkeletonCircle.d.ts +0 -32
- package/js/components/Skeleton/SkeletonCircleStories.d.ts +0 -45
- package/js/components/Skeleton/SkeletonCircleTests.d.ts +0 -12
- package/js/components/Skeleton/SkeletonRectangle.d.ts +0 -47
- package/js/components/Skeleton/SkeletonRectangleStories.d.ts +0 -87
- package/js/components/Skeleton/SkeletonRectangleTests.d.ts +0 -13
- package/js/components/Skeleton/SkeletonTypography.d.ts +0 -37
- package/js/components/Skeleton/SkeletonTypographyStories.d.ts +0 -40
- package/js/components/Skeleton/SkeletonTypographyTests.d.ts +0 -13
- package/js/components/Skeleton/index.d.ts +0 -3
- package/js/components/Switch/Stories.d.ts +0 -94
- package/js/components/Switch/Tests.d.ts +0 -15
- package/js/components/Switch/index.d.ts +0 -47
- package/js/components/Table/Stories.d.ts +0 -25
- package/js/components/Table/TableCell.d.ts +0 -55
- package/js/components/Table/TableCellStories.d.ts +0 -44
- package/js/components/Table/TableCellTests.d.ts +0 -11
- package/js/components/Table/TableRowStories.d.ts +0 -23
- package/js/components/Table/Tests.d.ts +0 -11
- package/js/components/Table/constants.d.ts +0 -9
- package/js/components/Table/index.d.ts +0 -27
- package/js/components/Text/Stories.d.ts +0 -167
- package/js/components/Text/Tests.d.ts +0 -10
- package/js/components/Text/index.d.ts +0 -935
- package/js/components/Thumbnail/Stories.d.ts +0 -168
- package/js/components/Thumbnail/Tests.d.ts +0 -11
- package/js/components/Thumbnail/index.d.ts +0 -84
- package/js/components/Thumbnail/types.d.ts +0 -45
- package/js/components/Thumbnail/utils.d.ts +0 -79
- package/stories/controls/color.d.ts +0 -15
- package/stories/controls/element.d.ts +0 -16
- package/stories/controls/focusPoint.d.ts +0 -8
- package/stories/controls/icons.d.ts +0 -66
- package/stories/controls/image.d.ts +0 -96
- package/stories/controls/selectArgType.d.ts +0 -7
- package/stories/controls/theme.d.ts +0 -7
- package/stories/controls/typography.d.ts +0 -8
- package/stories/controls/withUndefined.d.ts +0 -1
- package/stories/types.d.ts +0 -47
- package/stories/utils/combinations.d.ts +0 -100
- package/stories/utils/concatPath.d.ts +0 -10
- package/stories/utils/disableArgTypes.d.ts +0 -7
- package/stories/utils/initDemoShadowDOMPortal.d.ts +0 -5
- package/stories/utils/lorem.d.ts +0 -7
- package/stories/utils/toFlattenProps.d.ts +0 -12
- package/stories/utils/withCategory.d.ts +0 -4
- package/testing/commonTestsSuiteTL.d.ts +0 -87
- package/testing/index.d.ts +0 -1
- package/testing/queries.d.ts +0 -4
|
@@ -1,211 +0,0 @@
|
|
|
1
|
-
import { Emphasis } from '@lumx/core/js/constants';
|
|
2
|
-
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
3
|
-
import { ButtonSize } from './ButtonRoot';
|
|
4
|
-
/**
|
|
5
|
-
* Setup IconButton stories for a specific framework (React or Vue).
|
|
6
|
-
* This function creates all the stories with the appropriate decorators.
|
|
7
|
-
* Framework-specific render functions or args can be injected via `overrides`.
|
|
8
|
-
*/
|
|
9
|
-
export declare function setup({ component, render, decorators: { withCombinations, withThemedBackground }, }: SetupStoriesOptions<{
|
|
10
|
-
decorators: 'withCombinations' | 'withThemedBackground';
|
|
11
|
-
}>): {
|
|
12
|
-
meta: {
|
|
13
|
-
component: any;
|
|
14
|
-
render: any;
|
|
15
|
-
argTypes: {
|
|
16
|
-
isSelected: {
|
|
17
|
-
control: string;
|
|
18
|
-
};
|
|
19
|
-
isDisabled: {
|
|
20
|
-
control: string;
|
|
21
|
-
};
|
|
22
|
-
hasBackground: {
|
|
23
|
-
control: string;
|
|
24
|
-
};
|
|
25
|
-
emphasis: {
|
|
26
|
-
control: {
|
|
27
|
-
type: "select" | "inline-radio";
|
|
28
|
-
};
|
|
29
|
-
options: ("medium" | "low" | "high")[];
|
|
30
|
-
mapping: Record<string, "medium" | "low" | "high"> | undefined;
|
|
31
|
-
};
|
|
32
|
-
size: {
|
|
33
|
-
control: {
|
|
34
|
-
type: "select" | "inline-radio";
|
|
35
|
-
};
|
|
36
|
-
options: ButtonSize[];
|
|
37
|
-
mapping: Record<string, ButtonSize> | undefined;
|
|
38
|
-
};
|
|
39
|
-
icon: {
|
|
40
|
-
control: {
|
|
41
|
-
type: string;
|
|
42
|
-
};
|
|
43
|
-
options: {
|
|
44
|
-
undefined: undefined;
|
|
45
|
-
mdiAbTesting: string;
|
|
46
|
-
mdiAbjadArabic: string;
|
|
47
|
-
mdiAccount: string;
|
|
48
|
-
mdiAccountBox: string;
|
|
49
|
-
mdiAlert: string;
|
|
50
|
-
mdiAlertCircle: string;
|
|
51
|
-
mdiArrowDown: string;
|
|
52
|
-
mdiArrowUp: string;
|
|
53
|
-
mdiAtom: string;
|
|
54
|
-
mdiBee: string;
|
|
55
|
-
mdiBell: string;
|
|
56
|
-
mdiBullhornOutline: string;
|
|
57
|
-
mdiCheck: string;
|
|
58
|
-
mdiCheckCircle: string;
|
|
59
|
-
mdiChevronDown: string;
|
|
60
|
-
mdiChevronLeft: string;
|
|
61
|
-
mdiChevronRight: string;
|
|
62
|
-
mdiChevronUp: string;
|
|
63
|
-
mdiClose: string;
|
|
64
|
-
mdiCloseCircle: string;
|
|
65
|
-
mdiDelete: string;
|
|
66
|
-
mdiDotsHorizontal: string;
|
|
67
|
-
mdiDragVertical: string;
|
|
68
|
-
mdiEarth: string;
|
|
69
|
-
mdiEmail: string;
|
|
70
|
-
mdiEye: string;
|
|
71
|
-
mdiFileEdit: string;
|
|
72
|
-
mdiFlag: string;
|
|
73
|
-
mdiFolder: string;
|
|
74
|
-
mdiFolderGoogleDrive: string;
|
|
75
|
-
mdiFoodApple: string;
|
|
76
|
-
mdiGoogleCirclesExtended: string;
|
|
77
|
-
mdiHeart: string;
|
|
78
|
-
mdiHome: string;
|
|
79
|
-
mdiImageBroken: string;
|
|
80
|
-
mdiInformation: string;
|
|
81
|
-
mdiLink: string;
|
|
82
|
-
mdiMagnifyMinusOutline: string;
|
|
83
|
-
mdiMagnifyPlusOutline: string;
|
|
84
|
-
mdiMenuDown: string;
|
|
85
|
-
mdiMessageTextOutline: string;
|
|
86
|
-
mdiMinus: string;
|
|
87
|
-
mdiOpenInNew: string;
|
|
88
|
-
mdiPauseCircleOutline: string;
|
|
89
|
-
mdiPencil: string;
|
|
90
|
-
mdiPlay: string;
|
|
91
|
-
mdiPlayCircleOutline: string;
|
|
92
|
-
mdiPlus: string;
|
|
93
|
-
mdiRadioboxBlank: string;
|
|
94
|
-
mdiRadioboxMarked: string;
|
|
95
|
-
mdiReply: string;
|
|
96
|
-
mdiSend: string;
|
|
97
|
-
mdiStar: string;
|
|
98
|
-
mdiTextBox: string;
|
|
99
|
-
mdiTextBoxPlus: string;
|
|
100
|
-
mdiTram: string;
|
|
101
|
-
mdiTranslate: string;
|
|
102
|
-
mdiViewList: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
color: {
|
|
106
|
-
control: {
|
|
107
|
-
type: "select" | "inline-radio";
|
|
108
|
-
};
|
|
109
|
-
options: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined)[];
|
|
110
|
-
mapping: Record<string, "light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined> | undefined;
|
|
111
|
-
};
|
|
112
|
-
ref: {
|
|
113
|
-
table: {
|
|
114
|
-
disable: boolean;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
onClick: {
|
|
118
|
-
action: boolean;
|
|
119
|
-
table: {
|
|
120
|
-
disable: boolean;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
linkAs: {
|
|
124
|
-
table: {
|
|
125
|
-
disable: boolean;
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
className: {
|
|
129
|
-
table: {
|
|
130
|
-
disable: boolean;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
target: {
|
|
134
|
-
if: {
|
|
135
|
-
arg: string;
|
|
136
|
-
exists: boolean;
|
|
137
|
-
};
|
|
138
|
-
control: {
|
|
139
|
-
type: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
type: {
|
|
143
|
-
if: {
|
|
144
|
-
arg: string;
|
|
145
|
-
exists: boolean;
|
|
146
|
-
};
|
|
147
|
-
control: {
|
|
148
|
-
type: string;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
args: {
|
|
153
|
-
label: string;
|
|
154
|
-
icon: string;
|
|
155
|
-
image?: string | undefined;
|
|
156
|
-
title?: string | undefined;
|
|
157
|
-
color?: import("@lumx/core/js/constants").ColorPalette | undefined;
|
|
158
|
-
emphasis?: Emphasis | undefined;
|
|
159
|
-
hasBackground?: boolean | undefined;
|
|
160
|
-
href?: string | undefined;
|
|
161
|
-
isDisabled?: boolean | undefined;
|
|
162
|
-
isSelected?: boolean | undefined;
|
|
163
|
-
name?: string | undefined;
|
|
164
|
-
size?: ButtonSize | undefined;
|
|
165
|
-
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
166
|
-
type?: "submit" | "reset" | "button" | undefined | undefined;
|
|
167
|
-
linkAs?: "a" | any;
|
|
168
|
-
fullWidth?: boolean | undefined;
|
|
169
|
-
isActive?: boolean | undefined;
|
|
170
|
-
isFocused?: boolean | undefined;
|
|
171
|
-
isHovered?: boolean | undefined;
|
|
172
|
-
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
173
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
174
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
175
|
-
"aria-label"?: string | undefined | undefined;
|
|
176
|
-
className?: string | undefined;
|
|
177
|
-
theme?: import("@lumx/core/js/constants").Theme | undefined;
|
|
178
|
-
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
179
|
-
children?: import("react").ReactNode;
|
|
180
|
-
onClick?: ((event?: any) => void) | undefined;
|
|
181
|
-
ref?: import("../../types").CommonRef;
|
|
182
|
-
disabled?: boolean | undefined;
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
Default: {};
|
|
186
|
-
/** IconButton using an image */
|
|
187
|
-
WithImage: {
|
|
188
|
-
argTypes: {
|
|
189
|
-
control: {
|
|
190
|
-
type: "select" | "inline-radio";
|
|
191
|
-
};
|
|
192
|
-
options: string[];
|
|
193
|
-
mapping: Record<string, string> | undefined;
|
|
194
|
-
};
|
|
195
|
-
args: {
|
|
196
|
-
image: string;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
/** Check icon button style variations (color, states, emphasis, etc.) */
|
|
200
|
-
IconStateVariations: {
|
|
201
|
-
args: {};
|
|
202
|
-
argTypes: {
|
|
203
|
-
[k: string]: {
|
|
204
|
-
table: {
|
|
205
|
-
disable: boolean;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
};
|
|
209
|
-
decorators: ((story: any, context: any) => any)[];
|
|
210
|
-
};
|
|
211
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SetupOptions } from '@lumx/core/testing';
|
|
2
|
-
import { IconButtonProps } from './IconButton';
|
|
3
|
-
type SetupProps = Partial<IconButtonProps>;
|
|
4
|
-
/**
|
|
5
|
-
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
6
|
-
*/
|
|
7
|
-
export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<IconButtonProps>) => {
|
|
8
|
-
props: any;
|
|
9
|
-
iconButton: HTMLElement;
|
|
10
|
-
icon: HTMLElement | null;
|
|
11
|
-
img: HTMLElement | null;
|
|
12
|
-
wrapper: Partial<import("@lumx/core/testing").SetupResult>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: (renderOptions: SetupOptions<IconButtonProps>) => void;
|
|
15
|
-
export default _default;
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
import { Emphasis, Theme } from '@lumx/core/js/constants';
|
|
2
|
-
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
3
|
-
import { ButtonSize } from './ButtonRoot';
|
|
4
|
-
export declare const excludeCombination: ({ isSelected, emphasis, hasBackground }: any) => boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Setup Button stories for a specific framework (React or Vue).
|
|
7
|
-
* This function creates all the stories with the appropriate decorators.
|
|
8
|
-
* Framework-specific render functions or args can be injected via `overrides`.
|
|
9
|
-
*/
|
|
10
|
-
export declare function setup({ component, render, decorators: { withCombinations, withThemedBackground }, }: SetupStoriesOptions<{
|
|
11
|
-
decorators: 'withCombinations' | 'withThemedBackground';
|
|
12
|
-
}>): {
|
|
13
|
-
meta: {
|
|
14
|
-
component: any;
|
|
15
|
-
render: any;
|
|
16
|
-
argTypes: {
|
|
17
|
-
isSelected: {
|
|
18
|
-
control: string;
|
|
19
|
-
if: {
|
|
20
|
-
arg: string;
|
|
21
|
-
eq: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
isDisabled: {
|
|
25
|
-
control: string;
|
|
26
|
-
};
|
|
27
|
-
hasBackground: {
|
|
28
|
-
control: string;
|
|
29
|
-
if: {
|
|
30
|
-
arg: string;
|
|
31
|
-
eq: string;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
emphasis: {
|
|
35
|
-
control: {
|
|
36
|
-
type: "select" | "inline-radio";
|
|
37
|
-
};
|
|
38
|
-
options: ("medium" | "low" | "high")[];
|
|
39
|
-
mapping: Record<string, "medium" | "low" | "high"> | undefined;
|
|
40
|
-
};
|
|
41
|
-
size: {
|
|
42
|
-
control: {
|
|
43
|
-
type: "select" | "inline-radio";
|
|
44
|
-
};
|
|
45
|
-
options: ButtonSize[];
|
|
46
|
-
mapping: Record<string, ButtonSize> | undefined;
|
|
47
|
-
};
|
|
48
|
-
rightIcon: {
|
|
49
|
-
control: {
|
|
50
|
-
type: string;
|
|
51
|
-
};
|
|
52
|
-
options: {
|
|
53
|
-
undefined: undefined;
|
|
54
|
-
mdiAbTesting: string;
|
|
55
|
-
mdiAbjadArabic: string;
|
|
56
|
-
mdiAccount: string;
|
|
57
|
-
mdiAccountBox: string;
|
|
58
|
-
mdiAlert: string;
|
|
59
|
-
mdiAlertCircle: string;
|
|
60
|
-
mdiArrowDown: string;
|
|
61
|
-
mdiArrowUp: string;
|
|
62
|
-
mdiAtom: string;
|
|
63
|
-
mdiBee: string;
|
|
64
|
-
mdiBell: string;
|
|
65
|
-
mdiBullhornOutline: string;
|
|
66
|
-
mdiCheck: string;
|
|
67
|
-
mdiCheckCircle: string;
|
|
68
|
-
mdiChevronDown: string;
|
|
69
|
-
mdiChevronLeft: string;
|
|
70
|
-
mdiChevronRight: string;
|
|
71
|
-
mdiChevronUp: string;
|
|
72
|
-
mdiClose: string;
|
|
73
|
-
mdiCloseCircle: string;
|
|
74
|
-
mdiDelete: string;
|
|
75
|
-
mdiDotsHorizontal: string;
|
|
76
|
-
mdiDragVertical: string;
|
|
77
|
-
mdiEarth: string;
|
|
78
|
-
mdiEmail: string;
|
|
79
|
-
mdiEye: string;
|
|
80
|
-
mdiFileEdit: string;
|
|
81
|
-
mdiFlag: string;
|
|
82
|
-
mdiFolder: string;
|
|
83
|
-
mdiFolderGoogleDrive: string;
|
|
84
|
-
mdiFoodApple: string;
|
|
85
|
-
mdiGoogleCirclesExtended: string;
|
|
86
|
-
mdiHeart: string;
|
|
87
|
-
mdiHome: string;
|
|
88
|
-
mdiImageBroken: string;
|
|
89
|
-
mdiInformation: string;
|
|
90
|
-
mdiLink: string;
|
|
91
|
-
mdiMagnifyMinusOutline: string;
|
|
92
|
-
mdiMagnifyPlusOutline: string;
|
|
93
|
-
mdiMenuDown: string;
|
|
94
|
-
mdiMessageTextOutline: string;
|
|
95
|
-
mdiMinus: string;
|
|
96
|
-
mdiOpenInNew: string;
|
|
97
|
-
mdiPauseCircleOutline: string;
|
|
98
|
-
mdiPencil: string;
|
|
99
|
-
mdiPlay: string;
|
|
100
|
-
mdiPlayCircleOutline: string;
|
|
101
|
-
mdiPlus: string;
|
|
102
|
-
mdiRadioboxBlank: string;
|
|
103
|
-
mdiRadioboxMarked: string;
|
|
104
|
-
mdiReply: string;
|
|
105
|
-
mdiSend: string;
|
|
106
|
-
mdiStar: string;
|
|
107
|
-
mdiTextBox: string;
|
|
108
|
-
mdiTextBoxPlus: string;
|
|
109
|
-
mdiTram: string;
|
|
110
|
-
mdiTranslate: string;
|
|
111
|
-
mdiViewList: string;
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
leftIcon: {
|
|
115
|
-
control: {
|
|
116
|
-
type: string;
|
|
117
|
-
};
|
|
118
|
-
options: {
|
|
119
|
-
undefined: undefined;
|
|
120
|
-
mdiAbTesting: string;
|
|
121
|
-
mdiAbjadArabic: string;
|
|
122
|
-
mdiAccount: string;
|
|
123
|
-
mdiAccountBox: string;
|
|
124
|
-
mdiAlert: string;
|
|
125
|
-
mdiAlertCircle: string;
|
|
126
|
-
mdiArrowDown: string;
|
|
127
|
-
mdiArrowUp: string;
|
|
128
|
-
mdiAtom: string;
|
|
129
|
-
mdiBee: string;
|
|
130
|
-
mdiBell: string;
|
|
131
|
-
mdiBullhornOutline: string;
|
|
132
|
-
mdiCheck: string;
|
|
133
|
-
mdiCheckCircle: string;
|
|
134
|
-
mdiChevronDown: string;
|
|
135
|
-
mdiChevronLeft: string;
|
|
136
|
-
mdiChevronRight: string;
|
|
137
|
-
mdiChevronUp: string;
|
|
138
|
-
mdiClose: string;
|
|
139
|
-
mdiCloseCircle: string;
|
|
140
|
-
mdiDelete: string;
|
|
141
|
-
mdiDotsHorizontal: string;
|
|
142
|
-
mdiDragVertical: string;
|
|
143
|
-
mdiEarth: string;
|
|
144
|
-
mdiEmail: string;
|
|
145
|
-
mdiEye: string;
|
|
146
|
-
mdiFileEdit: string;
|
|
147
|
-
mdiFlag: string;
|
|
148
|
-
mdiFolder: string;
|
|
149
|
-
mdiFolderGoogleDrive: string;
|
|
150
|
-
mdiFoodApple: string;
|
|
151
|
-
mdiGoogleCirclesExtended: string;
|
|
152
|
-
mdiHeart: string;
|
|
153
|
-
mdiHome: string;
|
|
154
|
-
mdiImageBroken: string;
|
|
155
|
-
mdiInformation: string;
|
|
156
|
-
mdiLink: string;
|
|
157
|
-
mdiMagnifyMinusOutline: string;
|
|
158
|
-
mdiMagnifyPlusOutline: string;
|
|
159
|
-
mdiMenuDown: string;
|
|
160
|
-
mdiMessageTextOutline: string;
|
|
161
|
-
mdiMinus: string;
|
|
162
|
-
mdiOpenInNew: string;
|
|
163
|
-
mdiPauseCircleOutline: string;
|
|
164
|
-
mdiPencil: string;
|
|
165
|
-
mdiPlay: string;
|
|
166
|
-
mdiPlayCircleOutline: string;
|
|
167
|
-
mdiPlus: string;
|
|
168
|
-
mdiRadioboxBlank: string;
|
|
169
|
-
mdiRadioboxMarked: string;
|
|
170
|
-
mdiReply: string;
|
|
171
|
-
mdiSend: string;
|
|
172
|
-
mdiStar: string;
|
|
173
|
-
mdiTextBox: string;
|
|
174
|
-
mdiTextBoxPlus: string;
|
|
175
|
-
mdiTram: string;
|
|
176
|
-
mdiTranslate: string;
|
|
177
|
-
mdiViewList: string;
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
color: {
|
|
181
|
-
control: {
|
|
182
|
-
type: "select" | "inline-radio";
|
|
183
|
-
};
|
|
184
|
-
options: ("light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined)[];
|
|
185
|
-
mapping: Record<string, "light" | "dark" | "primary" | "secondary" | "blue" | "green" | "yellow" | "red" | "grey" | undefined> | undefined;
|
|
186
|
-
};
|
|
187
|
-
ref: {
|
|
188
|
-
table: {
|
|
189
|
-
disable: boolean;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
onClick: {
|
|
193
|
-
action: boolean;
|
|
194
|
-
table: {
|
|
195
|
-
disable: boolean;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
linkAs: {
|
|
199
|
-
table: {
|
|
200
|
-
disable: boolean;
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
className: {
|
|
204
|
-
table: {
|
|
205
|
-
disable: boolean;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
target: {
|
|
209
|
-
if: {
|
|
210
|
-
arg: string;
|
|
211
|
-
exists: boolean;
|
|
212
|
-
};
|
|
213
|
-
control: {
|
|
214
|
-
type: string;
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
type: {
|
|
218
|
-
if: {
|
|
219
|
-
arg: string;
|
|
220
|
-
exists: boolean;
|
|
221
|
-
};
|
|
222
|
-
control: {
|
|
223
|
-
type: string;
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
args: {
|
|
228
|
-
children: string;
|
|
229
|
-
leftIcon?: string | undefined;
|
|
230
|
-
rightIcon?: string | undefined;
|
|
231
|
-
fullWidth?: boolean | undefined;
|
|
232
|
-
color?: import("@lumx/core/js/constants").ColorPalette | undefined;
|
|
233
|
-
emphasis?: Emphasis | undefined;
|
|
234
|
-
hasBackground?: boolean | undefined;
|
|
235
|
-
href?: string | undefined;
|
|
236
|
-
isDisabled?: boolean | undefined;
|
|
237
|
-
isSelected?: boolean | undefined;
|
|
238
|
-
name?: string | undefined;
|
|
239
|
-
size?: ButtonSize | undefined;
|
|
240
|
-
target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
|
|
241
|
-
type?: "submit" | "reset" | "button" | undefined | undefined;
|
|
242
|
-
linkAs?: "a" | any;
|
|
243
|
-
isActive?: boolean | undefined;
|
|
244
|
-
isFocused?: boolean | undefined;
|
|
245
|
-
isHovered?: boolean | undefined;
|
|
246
|
-
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
247
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
248
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
249
|
-
"aria-label"?: string | undefined | undefined;
|
|
250
|
-
className?: string | undefined;
|
|
251
|
-
theme?: Theme | undefined;
|
|
252
|
-
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
253
|
-
onClick?: ((event?: any) => void) | undefined;
|
|
254
|
-
ref?: import("../../types").CommonRef;
|
|
255
|
-
disabled?: boolean | undefined;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
/** Default button */
|
|
259
|
-
Base: {
|
|
260
|
-
args: {
|
|
261
|
-
children: string;
|
|
262
|
-
};
|
|
263
|
-
};
|
|
264
|
-
/** All combinations of size and emphasis */
|
|
265
|
-
SizeAndEmphasis: {
|
|
266
|
-
args: {
|
|
267
|
-
children: string;
|
|
268
|
-
};
|
|
269
|
-
argTypes: {
|
|
270
|
-
[k: string]: {
|
|
271
|
-
table: {
|
|
272
|
-
disable: boolean;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
decorators: ((story: any, context: any) => any)[];
|
|
277
|
-
};
|
|
278
|
-
/** Setting a href to transform the button into a link. */
|
|
279
|
-
LinkButton: {
|
|
280
|
-
args: {
|
|
281
|
-
href: string;
|
|
282
|
-
children: string;
|
|
283
|
-
};
|
|
284
|
-
decorators: ((story: any, context: any) => any)[];
|
|
285
|
-
};
|
|
286
|
-
/** Check button style variations (color, states, emphasis, etc.) */
|
|
287
|
-
StateVariations: {
|
|
288
|
-
args: {
|
|
289
|
-
children: string;
|
|
290
|
-
rightIcon: string;
|
|
291
|
-
};
|
|
292
|
-
argTypes: {
|
|
293
|
-
[k: string]: {
|
|
294
|
-
table: {
|
|
295
|
-
disable: boolean;
|
|
296
|
-
};
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
decorators: ((story: any, context: any) => any)[];
|
|
300
|
-
};
|
|
301
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SetupOptions } from '../../../testing';
|
|
2
|
-
import { ButtonProps } from './Button';
|
|
3
|
-
type SetupProps = Partial<ButtonProps>;
|
|
4
|
-
/**
|
|
5
|
-
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
6
|
-
*/
|
|
7
|
-
export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<ButtonProps>) => {
|
|
8
|
-
props: any;
|
|
9
|
-
button: HTMLElement;
|
|
10
|
-
buttonWrapper: HTMLElement | null;
|
|
11
|
-
icons: HTMLElement[];
|
|
12
|
-
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: (renderOptions: SetupOptions<ButtonProps>) => void;
|
|
15
|
-
export default _default;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type { SetupStoriesOptions } from '@lumx/core/stories/types';
|
|
2
|
-
/**
|
|
3
|
-
* Setup Checkbox stories for a specific framework (React or Vue).
|
|
4
|
-
* This function creates all the stories with the appropriate decorators.
|
|
5
|
-
* Framework-specific render functions or args can be injected via `overrides`.
|
|
6
|
-
*/
|
|
7
|
-
export declare function setup({ component, render, decorators: { withCombinations }, }: SetupStoriesOptions<{
|
|
8
|
-
decorators: 'withCombinations';
|
|
9
|
-
}>): {
|
|
10
|
-
meta: {
|
|
11
|
-
component: any;
|
|
12
|
-
render: any;
|
|
13
|
-
argTypes: {
|
|
14
|
-
onChange: {
|
|
15
|
-
action: boolean;
|
|
16
|
-
};
|
|
17
|
-
name: {
|
|
18
|
-
control: boolean;
|
|
19
|
-
};
|
|
20
|
-
value: {
|
|
21
|
-
control: boolean;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
args: {
|
|
25
|
-
isChecked: boolean;
|
|
26
|
-
name: string;
|
|
27
|
-
value: string;
|
|
28
|
-
helper?: string | undefined;
|
|
29
|
-
id?: string | undefined;
|
|
30
|
-
label?: import("react").ReactNode;
|
|
31
|
-
inputProps?: Record<string, any> | undefined;
|
|
32
|
-
inputRef?: import("../../types").CommonRef;
|
|
33
|
-
inputId?: string | undefined;
|
|
34
|
-
onChange?: ((isChecked: boolean, value?: string, name?: string, event?: any) => void) | undefined;
|
|
35
|
-
ref?: import("../../types").CommonRef;
|
|
36
|
-
theme?: import("../../constants").Theme | undefined;
|
|
37
|
-
className?: string | undefined;
|
|
38
|
-
'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
|
|
39
|
-
isDisabled?: boolean | undefined;
|
|
40
|
-
disabled?: boolean | undefined;
|
|
41
|
-
checked?: boolean | undefined;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
/** Default checkbox */
|
|
45
|
-
Default: {};
|
|
46
|
-
/** With label and helper */
|
|
47
|
-
LabelAndHelper: {
|
|
48
|
-
argTypes: {
|
|
49
|
-
label: {
|
|
50
|
-
control: string;
|
|
51
|
-
};
|
|
52
|
-
helper: {
|
|
53
|
-
control: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
args: {
|
|
57
|
-
label: string;
|
|
58
|
-
helper: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
/** With intermediate state */
|
|
62
|
-
IntermediateState: {
|
|
63
|
-
argTypes: {
|
|
64
|
-
isChecked: {
|
|
65
|
-
control: boolean;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
args: {
|
|
69
|
-
isChecked: string;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
/** Disabled */
|
|
73
|
-
Disabled: {
|
|
74
|
-
argTypes: {
|
|
75
|
-
isDisabled: {
|
|
76
|
-
control: boolean;
|
|
77
|
-
};
|
|
78
|
-
'aria-disabled': {
|
|
79
|
-
control: boolean;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
args: {
|
|
83
|
-
label: string;
|
|
84
|
-
helper: string;
|
|
85
|
-
};
|
|
86
|
-
decorators: ((story: any, context: any) => any)[];
|
|
87
|
-
};
|
|
88
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SetupOptions } from '../../../testing';
|
|
2
|
-
import { CheckboxProps } from '.';
|
|
3
|
-
type SetupProps = Partial<CheckboxProps>;
|
|
4
|
-
/**
|
|
5
|
-
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
6
|
-
*/
|
|
7
|
-
export declare const setup: (propsOverride: SetupProps | undefined, { render, ...options }: SetupOptions<CheckboxProps>) => {
|
|
8
|
-
checkbox: HTMLElement;
|
|
9
|
-
helper: HTMLElement | null;
|
|
10
|
-
label: HTMLElement | null;
|
|
11
|
-
input: HTMLElement;
|
|
12
|
-
props: CheckboxProps;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: (renderOptions: SetupOptions<CheckboxProps>) => void;
|
|
15
|
-
export default _default;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { JSXElement, LumxClassName, HasTheme, HasAriaDisabled, HasDisabled, HasClassName, HasChecked, CommonRef } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Intermediate state of checkbox.
|
|
4
|
-
*/
|
|
5
|
-
export declare const INTERMEDIATE_STATE = "intermediate";
|
|
6
|
-
/**
|
|
7
|
-
* Defines the props of the component.
|
|
8
|
-
*/
|
|
9
|
-
export interface CheckboxProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked<boolean | 'intermediate'> {
|
|
10
|
-
/** Helper text. */
|
|
11
|
-
helper?: string;
|
|
12
|
-
/** Native input id property. */
|
|
13
|
-
id?: string;
|
|
14
|
-
/** Label text. */
|
|
15
|
-
label?: JSXElement;
|
|
16
|
-
/** Native input name property. */
|
|
17
|
-
name?: string;
|
|
18
|
-
/** Native input value property. */
|
|
19
|
-
value?: string;
|
|
20
|
-
/** optional props for input */
|
|
21
|
-
inputProps?: Record<string, any>;
|
|
22
|
-
/** Native input ref. */
|
|
23
|
-
inputRef?: CommonRef;
|
|
24
|
-
/** Native input id. */
|
|
25
|
-
inputId: string;
|
|
26
|
-
/** On change callback. */
|
|
27
|
-
onChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;
|
|
28
|
-
/** reference to the root element */
|
|
29
|
-
ref?: CommonRef;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Component display name.
|
|
33
|
-
*/
|
|
34
|
-
export declare const COMPONENT_NAME = "Checkbox";
|
|
35
|
-
/**
|
|
36
|
-
* Component default class name and class prefix.
|
|
37
|
-
*/
|
|
38
|
-
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
39
|
-
/**
|
|
40
|
-
* Component default props.
|
|
41
|
-
*/
|
|
42
|
-
export declare const DEFAULT_PROPS: Partial<CheckboxProps>;
|
|
43
|
-
/**
|
|
44
|
-
* Checkbox component.
|
|
45
|
-
*
|
|
46
|
-
* @param props Component props.
|
|
47
|
-
* @return JSX element.
|
|
48
|
-
*/
|
|
49
|
-
export declare const Checkbox: (props: CheckboxProps) => import("react").JSX.Element;
|