@nulogy/components 15.2.0 → 15.2.2
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/README.md +3 -3
- package/dist/main.js +5735 -5628
- package/dist/main.module.js +5731 -5624
- package/dist/src/Alert/Alert.story.d.ts +15 -19
- package/dist/src/Alert/Alert.story.js +25 -14
- package/dist/src/BrandedNavBar/NavBar.story.d.ts +4 -6
- package/dist/src/BrandedNavBar/NavBar.story.js +11 -3
- package/dist/src/BrandedNavBar/SmallNavBar.story.d.ts +5 -2
- package/dist/src/BrandedNavBar/SmallNavBar.story.js +26 -5
- package/dist/src/DatePickers/stories/DatePicker.story.d.ts +7 -3
- package/dist/src/DatePickers/stories/DatePicker.story.js +54 -22
- package/dist/src/DescriptionList/lib/utils.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.column.story.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.d.ts +7 -8
- package/dist/src/DescriptionList/stories/DescriptionList.group-min-width.story.js +15 -12
- package/dist/src/DescriptionList/stories/DescriptionList.layout.story.js +1 -1
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.d.ts +7 -8
- package/dist/src/DescriptionList/stories/DescriptionList.playground.story.js +200 -195
- package/dist/src/Layout/Header.d.ts +1 -1
- package/dist/src/Layout/Header.story.d.ts +10 -9
- package/dist/src/Layout/Header.story.js +9 -8
- package/dist/src/Layout/Sidebar.story.d.ts +4 -1
- package/dist/src/Layout/Sidebar.story.js +10 -3
- package/dist/src/Modal/Modal.story.d.ts +39 -61
- package/dist/src/Modal/Modal.story.js +110 -85
- package/dist/src/NDSProvider/renderWithNDSProvider.spec-utils.d.ts +2 -1
- package/dist/src/Radio/Radio.story.d.ts +316 -32
- package/dist/src/Radio/Radio.story.js +36 -22
- package/dist/src/Select/MenuList.js +1 -1
- package/dist/src/Select/Select.d.ts +1 -1
- package/dist/src/Select/Select.spec-utils.js +1 -0
- package/dist/src/Select/Select.story.d.ts +5 -1
- package/dist/src/Select/Select.story.js +93 -2
- package/dist/src/Table/stories/BaseTable.story.d.ts +11 -7
- package/dist/src/Table/stories/BaseTable.story.js +156 -34
- package/dist/src/Table/stories/SortingColumnHeader.story.d.ts +5 -2
- package/dist/src/Table/stories/SortingColumnHeader.story.js +20 -3
- package/dist/src/Table/stories/Table.story.d.ts +7 -14
- package/dist/src/Table/stories/Table.story.js +172 -127
- package/dist/src/Toggle/ToggleButton.js +1 -1
- package/dist/src/Tooltip/Tooltip.story.d.ts +15 -52
- package/dist/src/Tooltip/Tooltip.story.js +79 -71
- package/dist/src/testing/matchers/toHaveStyle.d.ts +15 -0
- package/dist/src/testing/matchers/toHaveStyle.js +50 -0
- package/dist/src/testing/matchers/toMatchDate.d.ts +1 -0
- package/dist/src/testing/matchers/toMatchDate.js +1 -1
- package/dist/src/utils/DetectOutsideClick.d.ts +3 -0
- package/dist/src/utils/DetectOutsideClick.js +3 -0
- package/dist/src/utils/ScrollIndicators.js +1 -1
- package/dist/src/utils/generateId.d.ts +5 -0
- package/dist/src/utils/generateId.js +5 -0
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/src/utils/index.js +0 -1
- package/dist/src/utils/numberFromDimension/numberFromDimension.spec.js +1 -0
- package/dist/vitest.config.d.ts +2 -0
- package/dist/vitest.config.js +11 -0
- package/package.json +24 -61
- package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.d.ts +0 -1
- package/dist/src/NDSProvider/mountWithNDSProvider.spec-utils.js +0 -4
- package/dist/src/utils/withWindowDimensions.d.ts +0 -3
- package/dist/src/utils/withWindowDimensions.js +0 -28
|
@@ -1,37 +1,321 @@
|
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
1
2
|
import React from "react";
|
|
3
|
+
import { Radio } from "../index";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
6
|
+
component: React.ForwardRefExoticComponent<Omit<{
|
|
7
|
+
children?: React.ReactNode | Record<string, unknown>;
|
|
8
|
+
value?: string | number | readonly string[];
|
|
9
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
10
|
+
form?: string;
|
|
11
|
+
slot?: string;
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
title?: string;
|
|
14
|
+
pattern?: string;
|
|
15
|
+
property?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
height?: string | number;
|
|
19
|
+
translate?: "yes" | "no";
|
|
20
|
+
width?: string | number;
|
|
21
|
+
hidden?: boolean;
|
|
22
|
+
key?: React.Key;
|
|
23
|
+
defaultChecked?: boolean;
|
|
24
|
+
defaultValue?: string | number | readonly string[];
|
|
25
|
+
suppressContentEditableWarning?: boolean;
|
|
26
|
+
suppressHydrationWarning?: boolean;
|
|
27
|
+
accessKey?: string;
|
|
28
|
+
autoFocus?: boolean;
|
|
29
|
+
className?: string;
|
|
30
|
+
contentEditable?: "inherit" | (boolean | "true" | "false");
|
|
31
|
+
contextMenu?: string;
|
|
32
|
+
dir?: string;
|
|
33
|
+
draggable?: boolean | "true" | "false";
|
|
34
|
+
id?: string;
|
|
35
|
+
lang?: string;
|
|
36
|
+
nonce?: string;
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
spellCheck?: boolean | "true" | "false";
|
|
39
|
+
tabIndex?: number;
|
|
40
|
+
radioGroup?: string;
|
|
41
|
+
role?: React.AriaRole;
|
|
42
|
+
about?: string;
|
|
43
|
+
datatype?: string;
|
|
44
|
+
inlist?: any;
|
|
45
|
+
prefix?: string;
|
|
46
|
+
rel?: string;
|
|
47
|
+
resource?: string;
|
|
48
|
+
rev?: string;
|
|
49
|
+
typeof?: string;
|
|
50
|
+
vocab?: string;
|
|
51
|
+
autoCapitalize?: string;
|
|
52
|
+
autoCorrect?: string;
|
|
53
|
+
autoSave?: string;
|
|
54
|
+
itemProp?: string;
|
|
55
|
+
itemScope?: boolean;
|
|
56
|
+
itemType?: string;
|
|
57
|
+
itemID?: string;
|
|
58
|
+
itemRef?: string;
|
|
59
|
+
results?: number;
|
|
60
|
+
security?: string;
|
|
61
|
+
unselectable?: "on" | "off";
|
|
62
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal";
|
|
63
|
+
is?: string;
|
|
64
|
+
'aria-activedescendant'?: string;
|
|
65
|
+
'aria-atomic'?: boolean | "true" | "false";
|
|
66
|
+
'aria-autocomplete'?: "none" | "list" | "inline" | "both";
|
|
67
|
+
'aria-busy'?: boolean | "true" | "false";
|
|
68
|
+
'aria-checked'?: boolean | "true" | "false" | "mixed";
|
|
69
|
+
'aria-colcount'?: number;
|
|
70
|
+
'aria-colindex'?: number;
|
|
71
|
+
'aria-colspan'?: number;
|
|
72
|
+
'aria-controls'?: string;
|
|
73
|
+
'aria-current'?: boolean | "time" | "true" | "false" | "step" | "page" | "location" | "date";
|
|
74
|
+
'aria-describedby'?: string;
|
|
75
|
+
'aria-details'?: string;
|
|
76
|
+
'aria-disabled'?: boolean | "true" | "false";
|
|
77
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup";
|
|
78
|
+
'aria-errormessage'?: string;
|
|
79
|
+
'aria-expanded'?: boolean | "true" | "false";
|
|
80
|
+
'aria-flowto'?: string;
|
|
81
|
+
'aria-grabbed'?: boolean | "true" | "false";
|
|
82
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "true" | "false" | "listbox" | "tree";
|
|
83
|
+
'aria-hidden'?: boolean | "true" | "false";
|
|
84
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling";
|
|
85
|
+
'aria-keyshortcuts'?: string;
|
|
86
|
+
'aria-label'?: string;
|
|
87
|
+
'aria-labelledby'?: string;
|
|
88
|
+
'aria-level'?: number;
|
|
89
|
+
'aria-live'?: "off" | "assertive" | "polite";
|
|
90
|
+
'aria-modal'?: boolean | "true" | "false";
|
|
91
|
+
'aria-multiline'?: boolean | "true" | "false";
|
|
92
|
+
'aria-multiselectable'?: boolean | "true" | "false";
|
|
93
|
+
'aria-orientation'?: "horizontal" | "vertical";
|
|
94
|
+
'aria-owns'?: string;
|
|
95
|
+
'aria-placeholder'?: string;
|
|
96
|
+
'aria-posinset'?: number;
|
|
97
|
+
'aria-pressed'?: boolean | "true" | "false" | "mixed";
|
|
98
|
+
'aria-readonly'?: boolean | "true" | "false";
|
|
99
|
+
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals";
|
|
100
|
+
'aria-required'?: boolean | "true" | "false";
|
|
101
|
+
'aria-roledescription'?: string;
|
|
102
|
+
'aria-rowcount'?: number;
|
|
103
|
+
'aria-rowindex'?: number;
|
|
104
|
+
'aria-rowspan'?: number;
|
|
105
|
+
'aria-selected'?: boolean | "true" | "false";
|
|
106
|
+
'aria-setsize'?: number;
|
|
107
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other";
|
|
108
|
+
'aria-valuemax'?: number;
|
|
109
|
+
'aria-valuemin'?: number;
|
|
110
|
+
'aria-valuenow'?: number;
|
|
111
|
+
'aria-valuetext'?: string;
|
|
112
|
+
dangerouslySetInnerHTML?: {
|
|
113
|
+
__html: string | TrustedHTML;
|
|
114
|
+
};
|
|
115
|
+
onCopy?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
116
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
117
|
+
onCut?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
118
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
119
|
+
onPaste?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
120
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
121
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLInputElement>;
|
|
122
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLInputElement>;
|
|
123
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLInputElement>;
|
|
124
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLInputElement>;
|
|
125
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLInputElement>;
|
|
126
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLInputElement>;
|
|
127
|
+
onFocus?: React.FocusEventHandler<HTMLInputElement>;
|
|
128
|
+
onFocusCapture?: React.FocusEventHandler<HTMLInputElement>;
|
|
129
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
130
|
+
onBlurCapture?: React.FocusEventHandler<HTMLInputElement>;
|
|
131
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
132
|
+
onChangeCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
133
|
+
onBeforeInput?: React.FormEventHandler<HTMLInputElement>;
|
|
134
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
135
|
+
onInput?: React.FormEventHandler<HTMLInputElement>;
|
|
136
|
+
onInputCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
137
|
+
onReset?: React.FormEventHandler<HTMLInputElement>;
|
|
138
|
+
onResetCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
139
|
+
onSubmit?: React.FormEventHandler<HTMLInputElement>;
|
|
140
|
+
onSubmitCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
141
|
+
onInvalid?: React.FormEventHandler<HTMLInputElement>;
|
|
142
|
+
onInvalidCapture?: React.FormEventHandler<HTMLInputElement>;
|
|
143
|
+
onLoad?: React.ReactEventHandler<HTMLInputElement>;
|
|
144
|
+
onLoadCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
145
|
+
onError?: React.ReactEventHandler<HTMLInputElement>;
|
|
146
|
+
onErrorCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
147
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
148
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
149
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
150
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
151
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
152
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
153
|
+
onAbort?: React.ReactEventHandler<HTMLInputElement>;
|
|
154
|
+
onAbortCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
155
|
+
onCanPlay?: React.ReactEventHandler<HTMLInputElement>;
|
|
156
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
157
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLInputElement>;
|
|
158
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
159
|
+
onDurationChange?: React.ReactEventHandler<HTMLInputElement>;
|
|
160
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
161
|
+
onEmptied?: React.ReactEventHandler<HTMLInputElement>;
|
|
162
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
163
|
+
onEncrypted?: React.ReactEventHandler<HTMLInputElement>;
|
|
164
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
165
|
+
onEnded?: React.ReactEventHandler<HTMLInputElement>;
|
|
166
|
+
onEndedCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
167
|
+
onLoadedData?: React.ReactEventHandler<HTMLInputElement>;
|
|
168
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
169
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLInputElement>;
|
|
170
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
171
|
+
onLoadStart?: React.ReactEventHandler<HTMLInputElement>;
|
|
172
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
173
|
+
onPause?: React.ReactEventHandler<HTMLInputElement>;
|
|
174
|
+
onPauseCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
175
|
+
onPlay?: React.ReactEventHandler<HTMLInputElement>;
|
|
176
|
+
onPlayCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
177
|
+
onPlaying?: React.ReactEventHandler<HTMLInputElement>;
|
|
178
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
179
|
+
onProgress?: React.ReactEventHandler<HTMLInputElement>;
|
|
180
|
+
onProgressCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
181
|
+
onRateChange?: React.ReactEventHandler<HTMLInputElement>;
|
|
182
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
183
|
+
onSeeked?: React.ReactEventHandler<HTMLInputElement>;
|
|
184
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
185
|
+
onSeeking?: React.ReactEventHandler<HTMLInputElement>;
|
|
186
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
187
|
+
onStalled?: React.ReactEventHandler<HTMLInputElement>;
|
|
188
|
+
onStalledCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
189
|
+
onSuspend?: React.ReactEventHandler<HTMLInputElement>;
|
|
190
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
191
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLInputElement>;
|
|
192
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
193
|
+
onVolumeChange?: React.ReactEventHandler<HTMLInputElement>;
|
|
194
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
195
|
+
onWaiting?: React.ReactEventHandler<HTMLInputElement>;
|
|
196
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
197
|
+
onAuxClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
198
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
199
|
+
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
200
|
+
onClickCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
201
|
+
onContextMenu?: React.MouseEventHandler<HTMLInputElement>;
|
|
202
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
203
|
+
onDoubleClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
204
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
205
|
+
onDrag?: React.DragEventHandler<HTMLInputElement>;
|
|
206
|
+
onDragCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
207
|
+
onDragEnd?: React.DragEventHandler<HTMLInputElement>;
|
|
208
|
+
onDragEndCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
209
|
+
onDragEnter?: React.DragEventHandler<HTMLInputElement>;
|
|
210
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
211
|
+
onDragExit?: React.DragEventHandler<HTMLInputElement>;
|
|
212
|
+
onDragExitCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
213
|
+
onDragLeave?: React.DragEventHandler<HTMLInputElement>;
|
|
214
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
215
|
+
onDragOver?: React.DragEventHandler<HTMLInputElement>;
|
|
216
|
+
onDragOverCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
217
|
+
onDragStart?: React.DragEventHandler<HTMLInputElement>;
|
|
218
|
+
onDragStartCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
219
|
+
onDrop?: React.DragEventHandler<HTMLInputElement>;
|
|
220
|
+
onDropCapture?: React.DragEventHandler<HTMLInputElement>;
|
|
221
|
+
onMouseDown?: React.MouseEventHandler<HTMLInputElement>;
|
|
222
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
223
|
+
onMouseEnter?: React.MouseEventHandler<HTMLInputElement>;
|
|
224
|
+
onMouseLeave?: React.MouseEventHandler<HTMLInputElement>;
|
|
225
|
+
onMouseMove?: React.MouseEventHandler<HTMLInputElement>;
|
|
226
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
227
|
+
onMouseOut?: React.MouseEventHandler<HTMLInputElement>;
|
|
228
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
229
|
+
onMouseOver?: React.MouseEventHandler<HTMLInputElement>;
|
|
230
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
231
|
+
onMouseUp?: React.MouseEventHandler<HTMLInputElement>;
|
|
232
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLInputElement>;
|
|
233
|
+
onSelect?: React.ReactEventHandler<HTMLInputElement>;
|
|
234
|
+
onSelectCapture?: React.ReactEventHandler<HTMLInputElement>;
|
|
235
|
+
onTouchCancel?: React.TouchEventHandler<HTMLInputElement>;
|
|
236
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLInputElement>;
|
|
237
|
+
onTouchEnd?: React.TouchEventHandler<HTMLInputElement>;
|
|
238
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLInputElement>;
|
|
239
|
+
onTouchMove?: React.TouchEventHandler<HTMLInputElement>;
|
|
240
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLInputElement>;
|
|
241
|
+
onTouchStart?: React.TouchEventHandler<HTMLInputElement>;
|
|
242
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLInputElement>;
|
|
243
|
+
onPointerDown?: React.PointerEventHandler<HTMLInputElement>;
|
|
244
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
245
|
+
onPointerMove?: React.PointerEventHandler<HTMLInputElement>;
|
|
246
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
247
|
+
onPointerUp?: React.PointerEventHandler<HTMLInputElement>;
|
|
248
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
249
|
+
onPointerCancel?: React.PointerEventHandler<HTMLInputElement>;
|
|
250
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
251
|
+
onPointerEnter?: React.PointerEventHandler<HTMLInputElement>;
|
|
252
|
+
onPointerEnterCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
253
|
+
onPointerLeave?: React.PointerEventHandler<HTMLInputElement>;
|
|
254
|
+
onPointerLeaveCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
255
|
+
onPointerOver?: React.PointerEventHandler<HTMLInputElement>;
|
|
256
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
257
|
+
onPointerOut?: React.PointerEventHandler<HTMLInputElement>;
|
|
258
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
259
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
260
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
261
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
262
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement>;
|
|
263
|
+
onScroll?: React.UIEventHandler<HTMLInputElement>;
|
|
264
|
+
onScrollCapture?: React.UIEventHandler<HTMLInputElement>;
|
|
265
|
+
onWheel?: React.WheelEventHandler<HTMLInputElement>;
|
|
266
|
+
onWheelCapture?: React.WheelEventHandler<HTMLInputElement>;
|
|
267
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLInputElement>;
|
|
268
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLInputElement>;
|
|
269
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLInputElement>;
|
|
270
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLInputElement>;
|
|
271
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLInputElement>;
|
|
272
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLInputElement>;
|
|
273
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLInputElement>;
|
|
274
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLInputElement>;
|
|
275
|
+
list?: string;
|
|
276
|
+
name?: string;
|
|
277
|
+
type?: React.HTMLInputTypeAttribute;
|
|
278
|
+
crossOrigin?: "" | "anonymous" | "use-credentials";
|
|
279
|
+
alt?: string;
|
|
280
|
+
src?: string;
|
|
281
|
+
disabled?: boolean;
|
|
282
|
+
formAction?: string;
|
|
283
|
+
formEncType?: string;
|
|
284
|
+
formMethod?: string;
|
|
285
|
+
formNoValidate?: boolean;
|
|
286
|
+
formTarget?: string;
|
|
287
|
+
autoComplete?: string;
|
|
288
|
+
accept?: string;
|
|
289
|
+
capture?: boolean | "user" | "environment";
|
|
290
|
+
checked?: boolean;
|
|
291
|
+
enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send";
|
|
292
|
+
max?: string | number;
|
|
293
|
+
maxLength?: number;
|
|
294
|
+
min?: string | number;
|
|
295
|
+
minLength?: number;
|
|
296
|
+
multiple?: boolean;
|
|
297
|
+
readOnly?: boolean;
|
|
298
|
+
required?: boolean;
|
|
299
|
+
step?: string | number;
|
|
300
|
+
} & import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & {
|
|
301
|
+
htmlSize?: number;
|
|
302
|
+
variant?: import("../NDSProvider/ComponentVariantContext").ComponentVariant;
|
|
303
|
+
labelText?: React.ReactNode;
|
|
304
|
+
checked?: boolean;
|
|
305
|
+
defaultChecked?: boolean;
|
|
306
|
+
error?: boolean;
|
|
307
|
+
}, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
308
|
+
args: {
|
|
309
|
+
id: string;
|
|
310
|
+
labelText: string;
|
|
36
311
|
};
|
|
37
312
|
};
|
|
313
|
+
export default _default;
|
|
314
|
+
type Story = StoryObj<typeof Radio>;
|
|
315
|
+
export declare const Default: Story;
|
|
316
|
+
export declare const SetToDefaultChecked: Story;
|
|
317
|
+
export declare const SetToDisabled: Story;
|
|
318
|
+
export declare const SetToError: Story;
|
|
319
|
+
export declare const SetToRequired: Story;
|
|
320
|
+
export declare const Controlled: Story;
|
|
321
|
+
export declare const UsingRefToControlFocus: Story;
|
|
@@ -3,42 +3,56 @@ import { action } from "@storybook/addon-actions";
|
|
|
3
3
|
import { Radio, Button } from "../index";
|
|
4
4
|
export default {
|
|
5
5
|
title: "Components/Radio",
|
|
6
|
+
component: Radio,
|
|
7
|
+
args: {
|
|
8
|
+
id: "radio",
|
|
9
|
+
labelText: "I am a radio button",
|
|
10
|
+
},
|
|
6
11
|
};
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: "Set to defaultChecked",
|
|
12
|
+
export const Default = {
|
|
13
|
+
args: {
|
|
14
|
+
labelText: "I am a radio button",
|
|
15
|
+
},
|
|
12
16
|
};
|
|
13
|
-
export const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
export const SetToDefaultChecked = {
|
|
18
|
+
args: {
|
|
19
|
+
defaultChecked: true,
|
|
20
|
+
labelText: "I am checked by default",
|
|
21
|
+
},
|
|
22
|
+
name: "Set to default checked",
|
|
23
|
+
};
|
|
24
|
+
export const SetToDisabled = {
|
|
25
|
+
render: (args) => (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio-1", disabled: true, labelText: "I am disabled" })),
|
|
27
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio-2", checked: true, disabled: true, labelText: "I am disabled" })))),
|
|
17
28
|
name: "Set to disabled",
|
|
18
29
|
};
|
|
19
|
-
export const SetToError =
|
|
20
|
-
React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
export const SetToError = {
|
|
31
|
+
render: (args) => (React.createElement(React.Fragment, null,
|
|
32
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio", error: true, labelText: "I am error" })),
|
|
33
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio", defaultChecked: true, error: true, labelText: "I am error" })))),
|
|
23
34
|
name: "Set to error",
|
|
24
35
|
};
|
|
25
|
-
export const SetToRequired =
|
|
26
|
-
React.createElement(
|
|
27
|
-
|
|
36
|
+
export const SetToRequired = {
|
|
37
|
+
render: (args) => (React.createElement(React.Fragment, null,
|
|
38
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio", labelText: "I am a radio button", required: true })))),
|
|
28
39
|
name: "Set to required",
|
|
29
40
|
};
|
|
30
|
-
export const Controlled =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
export const Controlled = {
|
|
42
|
+
render: (args) => (React.createElement(React.Fragment, null,
|
|
43
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio-1", checked: true, onChange: action("onChange"), labelText: "I am controlled and checked" })),
|
|
44
|
+
React.createElement(Radio, Object.assign({}, args, { id: "radio-2", checked: false, onChange: action("onChange"), labelText: "I am controlled and unchecked" })))),
|
|
45
|
+
};
|
|
46
|
+
const UsingRefToControlFocusComponent = () => {
|
|
34
47
|
const ref = useRef(null);
|
|
35
48
|
const handleClick = () => {
|
|
36
49
|
ref.current.focus();
|
|
37
50
|
};
|
|
38
51
|
return (React.createElement(React.Fragment, null,
|
|
39
52
|
React.createElement(Radio, { ref: ref, checked: true, onChange: action("onChange"), labelText: "I am controlled and checked" }),
|
|
40
|
-
React.createElement(Button, { onClick: handleClick }, "Focus the Input")));
|
|
53
|
+
React.createElement(Button, { onClick: handleClick, "data-testid": "the-button" }, "Focus the Input")));
|
|
41
54
|
};
|
|
42
|
-
UsingRefToControlFocus
|
|
55
|
+
export const UsingRefToControlFocus = {
|
|
56
|
+
render: (args) => React.createElement(UsingRefToControlFocusComponent, Object.assign({}, args)),
|
|
43
57
|
name: "using ref to control focus",
|
|
44
58
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copied as is from: https://github.com/jacobworrel/react-windowed-select/blob/
|
|
2
|
+
Copied as is from: https://github.com/jacobworrel/react-windowed-select/blob/main/src/MenuList.tsx
|
|
3
3
|
MIT License
|
|
4
4
|
Copyright (c) 2019 Jacob Worrel
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
@@ -10,7 +10,7 @@ export interface NDSOption {
|
|
|
10
10
|
label: ReactNode;
|
|
11
11
|
value: NDSOptionValue;
|
|
12
12
|
}
|
|
13
|
-
interface CustomProps<Option extends NDSOption, IsMulti extends boolean, Group extends GroupBase<Option>> extends StyledProps {
|
|
13
|
+
export interface CustomProps<Option extends NDSOption, IsMulti extends boolean, Group extends GroupBase<Option>> extends StyledProps {
|
|
14
14
|
autocomplete?: Props<Option, IsMulti, Group>["isSearchable"];
|
|
15
15
|
labelText?: FieldLabelProps["labelText"];
|
|
16
16
|
requirementText?: FieldLabelProps["requirementText"];
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import Select from "./Select";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
6
|
+
component: <Option extends import("./Select").NDSOption = import("./Select").NDSOption, IsMulti extends boolean = false, Group extends import("react-select").GroupBase<Option> = import("react-select").GroupBase<Option>>(props: Omit<import("react-select").Props<Option, IsMulti, Group>, "isMulti" | "isDisabled" | "isSearchable" | "defaultMenuIsOpen" | keyof import("./Select").CustomProps<Option_1, IsMulti_1, Group_1>> & import("./Select").CustomProps<Option, IsMulti, Group> & React.RefAttributes<import("react-select/base").default<Option, IsMulti, Group>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
4
7
|
};
|
|
5
8
|
export default _default;
|
|
6
|
-
|
|
9
|
+
type Story = StoryObj<typeof Select>;
|
|
10
|
+
export declare const _Select: Story;
|
|
7
11
|
export declare const WithStyledProps: () => React.JSX.Element;
|
|
8
12
|
export declare const WithABlankValue: {
|
|
9
13
|
(): React.JSX.Element;
|
|
@@ -20,7 +20,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
};
|
|
21
21
|
import React, { useEffect, useRef, useState } from "react";
|
|
22
22
|
import { action } from "@storybook/addon-actions";
|
|
23
|
-
import { boolean, select, text } from "@storybook/addon-knobs";
|
|
24
23
|
import { Box } from "../Box";
|
|
25
24
|
import { Flex } from "../Flex";
|
|
26
25
|
import { Button } from "../index";
|
|
@@ -60,8 +59,100 @@ class SelectWithState extends React.Component {
|
|
|
60
59
|
}
|
|
61
60
|
export default {
|
|
62
61
|
title: "Components/Select",
|
|
62
|
+
component: Select,
|
|
63
|
+
};
|
|
64
|
+
export const _Select = {
|
|
65
|
+
args: {
|
|
66
|
+
options,
|
|
67
|
+
autocomplete: true,
|
|
68
|
+
className: undefined,
|
|
69
|
+
classNamePrefix: undefined,
|
|
70
|
+
closeMenuOnSelect: true,
|
|
71
|
+
disabled: false,
|
|
72
|
+
defaultValue: undefined,
|
|
73
|
+
errorMessage: "",
|
|
74
|
+
labelText: "Inventory Status",
|
|
75
|
+
helpText: undefined,
|
|
76
|
+
noOptionsMessage: () => "No options",
|
|
77
|
+
required: false,
|
|
78
|
+
requirementText: undefined,
|
|
79
|
+
id: undefined,
|
|
80
|
+
maxHeight: "248px",
|
|
81
|
+
menuPosition: "absolute",
|
|
82
|
+
multiselect: false,
|
|
83
|
+
name: undefined,
|
|
84
|
+
placeholder: " ",
|
|
85
|
+
value: undefined,
|
|
86
|
+
menuIsOpen: undefined,
|
|
87
|
+
onMenuOpen: action("on menu open"),
|
|
88
|
+
onMenuClose: action("on menu close"),
|
|
89
|
+
onChange: action("selection changed"),
|
|
90
|
+
onInputChange: action("typed input value changed"),
|
|
91
|
+
onBlur: action("blurred"),
|
|
92
|
+
},
|
|
93
|
+
argTypes: {
|
|
94
|
+
autocomplete: {
|
|
95
|
+
control: { type: "boolean" },
|
|
96
|
+
},
|
|
97
|
+
className: {
|
|
98
|
+
control: { type: "text" },
|
|
99
|
+
},
|
|
100
|
+
classNamePrefix: {
|
|
101
|
+
control: { type: "text" },
|
|
102
|
+
},
|
|
103
|
+
closeMenuOnSelect: {
|
|
104
|
+
control: { type: "boolean" },
|
|
105
|
+
},
|
|
106
|
+
disabled: {
|
|
107
|
+
control: { type: "boolean" },
|
|
108
|
+
},
|
|
109
|
+
defaultValue: {
|
|
110
|
+
control: { type: "select" },
|
|
111
|
+
options: [undefined, ...options.map(({ value }) => value)],
|
|
112
|
+
},
|
|
113
|
+
errorMessage: {
|
|
114
|
+
control: { type: "text" },
|
|
115
|
+
},
|
|
116
|
+
labelText: {
|
|
117
|
+
control: { type: "text" },
|
|
118
|
+
},
|
|
119
|
+
helpText: {
|
|
120
|
+
control: { type: "text" },
|
|
121
|
+
},
|
|
122
|
+
required: {
|
|
123
|
+
control: { type: "boolean" },
|
|
124
|
+
},
|
|
125
|
+
requirementText: {
|
|
126
|
+
control: { type: "text" },
|
|
127
|
+
},
|
|
128
|
+
id: {
|
|
129
|
+
control: { type: "text" },
|
|
130
|
+
},
|
|
131
|
+
maxHeight: {
|
|
132
|
+
control: { type: "text" },
|
|
133
|
+
},
|
|
134
|
+
menuPosition: {
|
|
135
|
+
control: { type: "select" },
|
|
136
|
+
options: ["absolute", "fixed"],
|
|
137
|
+
},
|
|
138
|
+
multiselect: {
|
|
139
|
+
control: { type: "boolean" },
|
|
140
|
+
},
|
|
141
|
+
name: {
|
|
142
|
+
control: { type: "text" },
|
|
143
|
+
},
|
|
144
|
+
placeholder: {
|
|
145
|
+
control: { type: "text" },
|
|
146
|
+
},
|
|
147
|
+
value: {
|
|
148
|
+
control: { type: "select" },
|
|
149
|
+
options: [undefined, ...options.map(({ value }) => value)],
|
|
150
|
+
},
|
|
151
|
+
menuIsOpen: {
|
|
152
|
+
control: { type: "boolean" },
|
|
153
|
+
},
|
|
154
|
+
},
|
|
63
155
|
};
|
|
64
|
-
export const _Select = () => (React.createElement(Select, { options: options, autocomplete: boolean("autocomplete", true), className: text("className", undefined), classNamePrefix: text("classNamePrefix", undefined), closeMenuOnSelect: boolean("closeMenuOnSelect", true), disabled: boolean("disabled", false), defaultValue: select("defaultValue", [undefined, ...options.map(({ value }) => value)], undefined), errorMessage: text("errorMessage", ""), labelText: text("labelText", "Inventory Status"), helpText: text("helpText", undefined), noOptionsMessage: () => "No options", required: boolean("required", false), requirementText: text("requirementText", undefined), id: text("id", undefined), maxHeight: text("maxHeight", "248px"), menuPosition: select("menuPosition", ["absolute", "fixed"], "absolute"), multiselect: boolean("multiselect", false), name: text("name", undefined), placeholder: text("placeholder", " "), value: select("value", [undefined, ...options.map(({ value }) => value)], undefined), menuIsOpen: boolean("menuIsOpen", undefined), onMenuOpen: action("on menu open"), onMenuClose: action("on menu close"), onChange: action("selection changed"), onInputChange: action("typed input value changed"), onBlur: action("blurred") }));
|
|
65
156
|
export const WithStyledProps = () => {
|
|
66
157
|
return (React.createElement(Select, { initialIsOpen: true, placeholder: "Please select inventory status", onChange: action("selection changed"), onBlur: action("blurred"), maxWidth: "300px", options: options, labelText: "Default size", onInputChange: action("typed input value changed") }));
|
|
67
158
|
};
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import { Table } from "..";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
6
|
+
component: typeof Table;
|
|
4
7
|
};
|
|
5
8
|
export default _default;
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
9
|
+
type Story = StoryObj<typeof Table>;
|
|
10
|
+
export declare const WithData: Story;
|
|
11
|
+
export declare const WithNoData: Story;
|
|
12
|
+
export declare const WithStickyHeader: Story;
|
|
13
|
+
export declare const WithLotsOfRowsAndColumns: Story;
|
|
10
14
|
export declare const WithCustomColumnWidths: () => React.JSX.Element;
|
|
11
15
|
export declare const WithACustomCellComponent: () => React.JSX.Element;
|
|
12
16
|
export declare const WithCellAlignment: () => React.JSX.Element;
|
|
@@ -14,6 +18,6 @@ export declare const WithACellFormatter: () => React.JSX.Element;
|
|
|
14
18
|
export declare const WithACustomColumnLabelComponent: () => React.JSX.Element;
|
|
15
19
|
export declare const WithMetadata: () => React.JSX.Element;
|
|
16
20
|
export declare const WithFullWidthSection: () => React.JSX.Element;
|
|
17
|
-
export declare const WithAFooter:
|
|
18
|
-
export declare const WithRowBorder:
|
|
19
|
-
export declare const WithVerticalAlignment:
|
|
21
|
+
export declare const WithAFooter: Story;
|
|
22
|
+
export declare const WithRowBorder: Story;
|
|
23
|
+
export declare const WithVerticalAlignment: Story;
|