-
Notifications
You must be signed in to change notification settings - Fork 840
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into storybook/7480-stories-m-o
- Loading branch information
Showing
57 changed files
with
1,314 additions
and
293 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
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,4 @@ | ||
**Dependency updates** | ||
|
||
- Updated `prop-types` to v15.18.1 | ||
- Removed `prop-types` as a peer depedency, per package recommendation |
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 @@ | ||
- `EuiHeaderLinks` now accepts a `children` render function that will be passed a `closeMobilePopover` callback, allowing consumers to close the mobile popover by its content |
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,7 @@ | ||
**Bug fixes** | ||
|
||
- Fixed `EuiIconTip`'s default `aria-label` text to be i18n tokenizable | ||
|
||
**Accessibility** | ||
|
||
- `EuiIcons` no longer apply `aria-hidden` to empty icons, as long as a valid title or label is provided to the icon. In particular, this is intended to improve the accessibility of loading `EuiIconTip`s. |
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,3 @@ | ||
**Bug fixes** | ||
|
||
- Fixed `EuiTextArea`'s CSS box model to no longer render a few extra pixels of strut height |
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 @@ | ||
- Updated `EuiSelectable` to support scrolling list containers when `listProps.isVirtualization` is set to `false` |
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
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,87 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { hideStorybookControls } from '../../../.storybook/utils'; | ||
import { EuiI18n, EuiI18nProps, I18nTokensShape } from './i18n'; | ||
import { EuiCard } from '../card'; | ||
|
||
type Props = EuiI18nProps<any, any, string[]>; | ||
|
||
const meta: Meta<Props> = { | ||
title: 'Utilities/EuiI18n', | ||
component: EuiI18n, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<Props>; | ||
|
||
export const SingleToken: Story = { | ||
argTypes: { | ||
default: { control: { type: 'text' } }, | ||
...hideStorybookControls(['children', 'tokens', 'defaults']), | ||
}, | ||
args: { | ||
token: 'euiI18nBasic.basicexample', | ||
default: | ||
'This is the English copy that would be replaced by a translation defined by the euiI18nBasic.basicexample token.', | ||
}, | ||
}; | ||
|
||
export const Interpolation: Story = { | ||
argTypes: { | ||
...hideStorybookControls(['children', 'tokens', 'defaults']), | ||
}, | ||
args: { | ||
token: 'euiI18nInterpolation.clickedCount', | ||
default: 'Clicked on button {count} times.', | ||
values: { count: 3 }, | ||
}, | ||
}; | ||
|
||
export const MultipleTokens: Story = { | ||
argTypes: { | ||
...hideStorybookControls(['token', 'default']), | ||
}, | ||
args: { | ||
tokens: ['euiI18n.title', 'euiI18n.description'], | ||
defaults: ['Card title', 'Card description'], | ||
}, | ||
render: ({ tokens, defaults }: I18nTokensShape<string[]>) => ( | ||
// eslint-disable-next-line local/i18n | ||
<EuiI18n tokens={tokens} defaults={defaults}> | ||
{([title, description]: string[]) => ( | ||
<EuiCard title={title} description={description} /> | ||
)} | ||
</EuiI18n> | ||
), | ||
}; | ||
|
||
export const MultipleTokenInterpolation: Story = { | ||
argTypes: { | ||
...hideStorybookControls(['token', 'default']), | ||
}, | ||
args: { | ||
tokens: ['euiI18nMulti.title', 'euiI18nMulti.description'], | ||
defaults: [ | ||
'How often was the {name} cuddled?', | ||
'The {name} was cuddled {count} times.', | ||
], | ||
values: { name: 'cat', count: 3 }, | ||
}, | ||
render: ({ tokens, defaults, values }: I18nTokensShape<string[]>) => ( | ||
// eslint-disable-next-line local/i18n | ||
<EuiI18n tokens={tokens} defaults={defaults} values={values}> | ||
{([title, description]: string[]) => ( | ||
<EuiCard title={title} description={description} /> | ||
)} | ||
</EuiI18n> | ||
), | ||
}; |
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
Oops, something went wrong.