-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Mayank <9084735+mayank99@users.noreply.github.com>
- Loading branch information
1 parent
962ce09
commit 31fe9c9
Showing
289 changed files
with
3,247 additions
and
1,750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': minor | ||
--- | ||
|
||
Added `status` prop to `Input`, `Textarea` and `Select`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
Added `iui-input-group-wrapper` class to allow inline labels for input groups. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@itwin/itwinui-react': minor | ||
--- | ||
|
||
Added two new components for building complex input layouts. | ||
- `InputGrid` for the "outer" layout (label, inputs and statusMessage) | ||
- `InputWithDecorations` for the "inner" layout (start icon/button, end icon/button) | ||
|
||
`LabeledInput`, `LabeledSelect`, `LabeledTextarea` and table `DatePickerInput` have been updated to make use of these new components internally. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': major | ||
--- | ||
|
||
`iui-transfer-list-listbox-label` and `iui-input-container` classes were removed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
Added `iui-input-grid` class for outer input styling. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': major | ||
--- | ||
|
||
Removed `inputStyle` and `inputClassName` props from `LabeledInput`; style and className props are being passed down to input. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps`, `inputWrapperProps` to pass props to sub elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': minor | ||
--- | ||
|
||
Added new `padded` prop to `Icon`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': major | ||
--- | ||
|
||
Removed `selectStyle` and `selectClassName` props from `LabeledSelect`; style and className props are being passed down to textarea. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps` to pass props to sub elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
Added status styling to `input` and `select`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-react': major | ||
--- | ||
|
||
Removed `textareaStyle` and `textareaClassName` props from `LabeledTextarea`; style and className props are being passed down to textarea. Added `wrapperProps`, `labelProps`, `messageProps`, `messageIconProps` to pass props to sub elements. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
Added padded styling to Icon using `data-iui-padded` attribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
Added `iui-status-message` class to wrap StatusMessage icon and content. |
Binary file modified
BIN
+10 Bytes
(100%)
...torybook/cypress-visual-screenshots/baseline/ColorPicker.test.ts-With Alpha.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...orybook/cypress-visual-screenshots/baseline/ComboBox.test.ts-Basic (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...storybook/cypress-visual-screenshots/baseline/ComboBox.test.ts-Basic (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...ok/cypress-visual-screenshots/baseline/ComboBox.test.ts-Controlled (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...book/cypress-visual-screenshots/baseline/ComboBox.test.ts-Controlled (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...press-visual-screenshots/baseline/ComboBox.test.ts-Custom Renderer (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...cypress-visual-screenshots/baseline/ComboBox.test.ts-Custom Renderer (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...press-visual-screenshots/baseline/ComboBox.test.ts-Multiple Select (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...cypress-visual-screenshots/baseline/ComboBox.test.ts-Multiple Select (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...k/cypress-visual-screenshots/baseline/ComboBox.test.ts-Virtualized (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...ook/cypress-visual-screenshots/baseline/ComboBox.test.ts-Virtualized (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...ual-screenshots/baseline/ComboBox.test.ts-With Custom Message Icon (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...isual-screenshots/baseline/ComboBox.test.ts-With Custom Message Icon (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...ok/cypress-visual-screenshots/baseline/ComboBox.test.ts-With Label (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...book/cypress-visual-screenshots/baseline/ComboBox.test.ts-With Label (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
.../cypress-visual-screenshots/baseline/ComboBox.test.ts-With Message (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...ok/cypress-visual-screenshots/baseline/ComboBox.test.ts-With Message (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...k/cypress-visual-screenshots/baseline/ComboBox.test.ts-With Status (Closed).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
...ook/cypress-visual-screenshots/baseline/ComboBox.test.ts-With Status (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...ypress-visual-screenshots/baseline/DropdownMenu.test.ts-With Content (Open).png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+9 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Fieldset.test.ts-Basic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Fieldset.test.ts-Disabled.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4 Bytes
(100%)
...ybook/cypress-visual-screenshots/baseline/FileUpload.test.ts-Wrapping Input.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.72 KB
apps/storybook/cypress-visual-screenshots/baseline/Icon.test.ts-Padded.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-294 Bytes
(100%)
...cypress-visual-screenshots/baseline/InformationPanel.test.ts-Custom Actions.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.31 KB
apps/storybook/cypress-visual-screenshots/baseline/Input.test.ts-Status.png
Oops, something went wrong.
Binary file added
BIN
+10.5 KB
...s-visual-screenshots/baseline/InputGrid.test.ts-With Input With Decorations.png
Oops, something went wrong.
Binary file added
BIN
+8.02 KB
.../storybook/cypress-visual-screenshots/baseline/InputGrid.test.ts-With Input.png
Oops, something went wrong.
Binary file added
BIN
+8.53 KB
...storybook/cypress-visual-screenshots/baseline/InputGrid.test.ts-With Search.png
Oops, something went wrong.
Binary file added
BIN
+10.3 KB
...storybook/cypress-visual-screenshots/baseline/InputGrid.test.ts-With Select.png
Oops, something went wrong.
Binary file added
BIN
+5.92 KB
...ybook/cypress-visual-screenshots/baseline/InputWithDecoration.test.ts-Basic.png
Oops, something went wrong.
Binary file added
BIN
+6.96 KB
...ok/cypress-visual-screenshots/baseline/InputWithDecoration.test.ts-Disabled.png
Oops, something went wrong.
Binary file added
BIN
+6.3 KB
...ybook/cypress-visual-screenshots/baseline/InputWithDecoration.test.ts-Small.png
Oops, something went wrong.
Binary file added
BIN
+6.95 KB
...book/cypress-visual-screenshots/baseline/InputWithDecoration.test.ts-Status.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Label.test.ts-Basic.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Basic.png
Oops, something went wrong.
Binary file modified
BIN
-4 Bytes
(100%)
...storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Disabled.png
Oops, something went wrong.
Binary file modified
BIN
+425 Bytes
(100%)
...book/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Hybrid Layout.png
Oops, something went wrong.
Binary file modified
BIN
-92 Bytes
(99%)
apps/storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Inline.png
Oops, something went wrong.
Binary file modified
BIN
-3 Bytes
(100%)
...storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Negative.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Positive.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
.../storybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-Warning.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...k/cypress-visual-screenshots/baseline/LabeledInput.test.ts-With Custom Icon.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...ybook/cypress-visual-screenshots/baseline/LabeledInput.test.ts-With Message.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
apps/storybook/cypress-visual-screenshots/baseline/LabeledSelect.test.ts-Basic.png
Oops, something went wrong.
Binary file modified
BIN
+3 Bytes
(100%)
...torybook/cypress-visual-screenshots/baseline/LabeledSelect.test.ts-Negative.png
Oops, something went wrong.
Binary file modified
BIN
+5 Bytes
(100%)
...torybook/cypress-visual-screenshots/baseline/LabeledSelect.test.ts-Positive.png
Oops, something went wrong.
Binary file modified
BIN
+9 Bytes
(100%)
...storybook/cypress-visual-screenshots/baseline/LabeledSelect.test.ts-Warning.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
.../cypress-visual-screenshots/baseline/LabeledSelect.test.ts-With Custom Icon.png
Oops, something went wrong.
Binary file modified
BIN
-38 Bytes
(100%)
...storybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Basic.png
Oops, something went wrong.
Binary file modified
BIN
+103 Bytes
(100%)
...rybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Disabled.png
Oops, something went wrong.
Binary file modified
BIN
+24 Bytes
(100%)
...torybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Inline.png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...rybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Negative.png
Oops, something went wrong.
Binary file modified
BIN
+3 Bytes
(100%)
...rybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Positive.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...orybook/cypress-visual-screenshots/baseline/LabeledTextarea.test.ts-Warning.png
Oops, something went wrong.
Binary file modified
BIN
-38 Bytes
(100%)
...ypress-visual-screenshots/baseline/LabeledTextarea.test.ts-With Custom Icon.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...ook/cypress-visual-screenshots/baseline/SearchBox.test.ts-Expandable (Open).png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
...-screenshots/baseline/SearchBox.test.ts-Expandable With Custom Items (Open).png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...ess-visual-screenshots/baseline/SearchBox.test.ts-With Custom Action (Open).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...storybook/cypress-visual-screenshots/baseline/Select.test.ts-Basic (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Select.test.ts-Basic (Open).png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...press-visual-screenshots/baseline/Select.test.ts-Custom (Closed With Value).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...torybook/cypress-visual-screenshots/baseline/Select.test.ts-Custom (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
.../storybook/cypress-visual-screenshots/baseline/Select.test.ts-Custom (Open).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...book/cypress-visual-screenshots/baseline/Select.test.ts-Many Items (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...rybook/cypress-visual-screenshots/baseline/Select.test.ts-Many Items (Open).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...storybook/cypress-visual-screenshots/baseline/Select.test.ts-Multi (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...k/cypress-visual-screenshots/baseline/Select.test.ts-Multi (Multi selected).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Select.test.ts-Multi (Open).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...s-visual-screenshots/baseline/Select.test.ts-Multi Custom Renderer (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...-screenshots/baseline/Select.test.ts-Multi Custom Renderer (Multi selected).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...ess-visual-screenshots/baseline/Select.test.ts-Multi Custom Renderer (Open).png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...ybook/cypress-visual-screenshots/baseline/Select.test.ts-Sublabels (Closed).png
Oops, something went wrong.
Binary file modified
BIN
-2 Bytes
(100%)
...orybook/cypress-visual-screenshots/baseline/Select.test.ts-Sublabels (Open).png
Oops, something went wrong.
Binary file modified
BIN
+380 Bytes
(100%)
...ss-visual-screenshots/baseline/Select.test.ts-Truncate Middle Text (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...ress-visual-screenshots/baseline/Select.test.ts-Truncate Middle Text (Open).png
Oops, something went wrong.
Binary file modified
BIN
-1 Byte
(100%)
...book/cypress-visual-screenshots/baseline/Select.test.ts-With Icons (Closed).png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
...rybook/cypress-visual-screenshots/baseline/Select.test.ts-With Icons (Open).png
Oops, something went wrong.
Binary file modified
BIN
+2 Bytes
(100%)
...press-visual-screenshots/baseline/Select.test.ts-With Selected Value (Open).png
Oops, something went wrong.
Binary file modified
BIN
-15 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/Table.test.ts-Filters.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(100%)
...orybook/cypress-visual-screenshots/baseline/Table.test.ts-Resizable Columns.png
Oops, something went wrong.
Binary file modified
BIN
-1004 Bytes
(93%)
apps/storybook/cypress-visual-screenshots/baseline/Tile.test.ts-With Avatar.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
apps/storybook/cypress-visual-screenshots/baseline/TimePicker.test.ts-Basic.png
Oops, something went wrong.
Binary file modified
BIN
+0 Bytes
(100%)
apps/storybook/cypress-visual-screenshots/baseline/TimePicker.test.ts-Combined.png
Oops, something went wrong.
Binary file modified
BIN
+17 Bytes
(100%)
...ook/cypress-visual-screenshots/baseline/TimePicker.test.ts-Custom Renderers.png
Oops, something went wrong.
Binary file modified
BIN
-26 Bytes
(100%)
...orybook/cypress-visual-screenshots/baseline/TransferList.test.ts-With Label.png
100644 → 100755
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { Story, Meta } from '@storybook/react'; | ||
import React from 'react'; | ||
import { | ||
Input, | ||
InputGrid, | ||
InputWithDecorations, | ||
Label, | ||
Icon, | ||
SearchBox, | ||
Select, | ||
StatusMessage, | ||
} from '@itwin/itwinui-react'; | ||
import { SvgAdd, SvgAirplane } from '@itwin/itwinui-icons-react'; | ||
|
||
type InputGridProps = React.ComponentProps<typeof InputGrid>; | ||
|
||
export default { | ||
component: InputGrid, | ||
title: 'Utilities/InputGrid', | ||
argTypes: {}, | ||
} as Meta<InputGridProps>; | ||
|
||
export const WithInput: Story<InputGridProps> = () => { | ||
return ( | ||
<InputGrid> | ||
<Label htmlFor='input-id'>This is label</Label> | ||
<Input id='input-id' /> | ||
<StatusMessage>This is message</StatusMessage> | ||
</InputGrid> | ||
); | ||
}; | ||
|
||
export const WithInputWithDecorations: Story<InputGridProps> = () => { | ||
return ( | ||
<InputGrid> | ||
<Label htmlFor='input-id'>This is label</Label> | ||
<InputWithDecorations> | ||
<Icon padded> | ||
<SvgAirplane /> | ||
</Icon> | ||
<InputWithDecorations.Input | ||
placeholder='Add destination...' | ||
id='input-id' | ||
/> | ||
<InputWithDecorations.Button label='Add new flight'> | ||
<SvgAdd /> | ||
</InputWithDecorations.Button> | ||
</InputWithDecorations> | ||
<StatusMessage>This is message</StatusMessage> | ||
</InputGrid> | ||
); | ||
}; | ||
|
||
export const WithSelect: Story<InputGridProps> = () => { | ||
const options = [ | ||
{ value: 1, label: 'Bali' }, | ||
{ value: 2, label: 'Hawaii' }, | ||
{ value: 3, label: 'Madagascar' }, | ||
]; | ||
const [value, setValue] = React.useState<number | undefined>(undefined); | ||
|
||
return ( | ||
<InputGrid> | ||
<Label htmlFor='input-id'>This is label</Label> | ||
<Select | ||
id='input-id' | ||
options={options} | ||
placeholder='Select destination' | ||
value={value} | ||
onChange={(value) => setValue(value)} | ||
/> | ||
<StatusMessage>This is message</StatusMessage> | ||
</InputGrid> | ||
); | ||
}; | ||
|
||
export const WithSearch: Story<InputGridProps> = () => { | ||
return ( | ||
<InputGrid labelPlacement='inline'> | ||
<Label htmlFor='input-id'>This is label</Label> | ||
<SearchBox inputProps={{ id: 'input-id' }} /> | ||
<StatusMessage>This is message</StatusMessage> | ||
</InputGrid> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
describe('InputGrid', () => { | ||
const storyPath = 'Utilities/InputGrid'; | ||
|
||
const tests = [ | ||
'With Input', | ||
'With Input With Decorations', | ||
'With Select', | ||
'With Search', | ||
]; | ||
|
||
tests.forEach((testName) => { | ||
it(testName, function () { | ||
const id = Cypress.storyId(storyPath, testName); | ||
cy.visit('iframe', { qs: { id } }); | ||
cy.compareSnapshot(testName); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { Meta, Story } from '@storybook/react'; | ||
import React from 'react'; | ||
import { InputWithDecorations, Icon } from '@itwin/itwinui-react'; | ||
import { SvgAdd, SvgAirplane } from '@itwin/itwinui-icons-react'; | ||
|
||
type InputWithDecorationsProps = React.ComponentProps< | ||
typeof InputWithDecorations | ||
>; | ||
|
||
export default { | ||
title: 'Input/InputWithDecorations', | ||
component: InputWithDecorations, | ||
} as Meta<InputWithDecorationsProps>; | ||
|
||
export const Basic: Story<InputWithDecorationsProps> = () => { | ||
return ( | ||
<InputWithDecorations> | ||
<Icon padded> | ||
<SvgAirplane /> | ||
</Icon> | ||
<InputWithDecorations.Input placeholder='Input..' /> | ||
<InputWithDecorations.Button label='Custom button'> | ||
<SvgAdd /> | ||
</InputWithDecorations.Button> | ||
</InputWithDecorations> | ||
); | ||
}; | ||
|
||
export const Disabled: Story<InputWithDecorationsProps> = () => { | ||
return ( | ||
<InputWithDecorations isDisabled> | ||
<Icon padded> | ||
<SvgAirplane /> | ||
</Icon> | ||
<InputWithDecorations.Input placeholder='Disabled input' /> | ||
<InputWithDecorations.Button label='Custom button'> | ||
<SvgAdd /> | ||
</InputWithDecorations.Button> | ||
</InputWithDecorations> | ||
); | ||
}; | ||
|
||
export const Small: Story<InputWithDecorationsProps> = () => { | ||
return ( | ||
<InputWithDecorations size='small'> | ||
<Icon size='s' padded> | ||
<SvgAirplane /> | ||
</Icon> | ||
<InputWithDecorations.Input placeholder='Small input' /> | ||
<InputWithDecorations.Button label='Custom button'> | ||
<SvgAdd /> | ||
</InputWithDecorations.Button> | ||
</InputWithDecorations> | ||
); | ||
}; | ||
|
||
export const Status: Story<InputWithDecorationsProps> = () => { | ||
return ( | ||
<InputWithDecorations status='positive'> | ||
<Icon padded> | ||
<SvgAirplane /> | ||
</Icon> | ||
<InputWithDecorations.Input placeholder='Positive input' /> | ||
<InputWithDecorations.Button label='Custom button'> | ||
<SvgAdd /> | ||
</InputWithDecorations.Button> | ||
</InputWithDecorations> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
describe('InputWithDecorations', () => { | ||
const storyPath = 'Input/InputWithDecorations'; | ||
const tests = ['Basic', 'Disabled', 'Small', 'Status']; | ||
|
||
tests.forEach((testName) => { | ||
it(testName, function () { | ||
const id = Cypress.storyId(storyPath, testName); | ||
cy.visit('iframe', { qs: { id } }); | ||
cy.compareSnapshot(testName); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.