Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(factories): handle ReactElement as primitive #1513

Merged
merged 24 commits into from
Jul 12, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9f7a429
fix(factories): handle ReactElement as primitive
layershifter Jun 18, 2019
78194b2
restore footer, update header
layershifter Jun 25, 2019
1e5af41
merge master
layershifter Jul 1, 2019
6716247
Update docs/src/pages/ShorthandProps.mdx
layershifter Jul 1, 2019
14d32ba
remove more content:content
layershifter Jul 1, 2019
d59194d
Merge branch 'fix/factories-jsx' of https://github.com/stardust-ui/re…
layershifter Jul 1, 2019
b5d4bef
allow `false` in itemShorthandWithoutJSX
layershifter Jul 1, 2019
7692fea
restore example
layershifter Jul 1, 2019
4766874
Merge branches 'fix/factories-jsx' and 'master' of https://github.com…
layershifter Jul 12, 2019
f570e61
more fixes
layershifter Jul 12, 2019
a8629f9
use correct types, update warning
layershifter Jul 12, 2019
982ce7a
add CHANGELOG entry
layershifter Jul 12, 2019
0b864e0
disable progress plugin for CI
layershifter Jul 12, 2019
31fa80a
Merge branch 'master' of https://github.com/stardust-ui/react into fi…
layershifter Jul 12, 2019
e15fd55
remove comments from example
layershifter Jul 12, 2019
fd6fece
fix comments in snippets
layershifter Jul 12, 2019
727c7a9
pick back fix with content
layershifter Jul 12, 2019
2756ca7
remove duplicates from lock
layershifter Jul 12, 2019
0f251fc
Update docs/src/pages/ShorthandProps.mdx
layershifter Jul 12, 2019
9753305
Update docs/src/pages/ShorthandProps.mdx
layershifter Jul 12, 2019
1fbc89a
Update ShorthandProps.mdx
layershifter Jul 12, 2019
3018449
Update packages/react/src/components/Dropdown/DropdownSelectedItem.tsx
layershifter Jul 12, 2019
ab0e327
Merge branches 'fix/factories-jsx' and 'master' of https://github.com…
layershifter Jul 12, 2019
afd4afb
revert changes in yarn.lock
layershifter Jul 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
### BREAKING CHANGES
- Add `trapFocus` and `autoFocus` props to `Popup` and remove `popupFocusTrapBehavior` and `popupAutoFocusBehavior` @sophieH29 ([#1565](https://github.com/stardust-ui/react/pull/1565))
- `defaultBehavior` was removed @layershifter ([#1600](https://github.com/stardust-ui/react/pull/1600))
- `ReactElement`s are now handled in the same way as string in all shorthands @layershifter ([#1600](https://github.com/stardust-ui/react/pull/1600))

### Features
- Split action handlers with "OR" condition in accessibility behaviors @sophieH29 ([#1622](https://github.com/stardust-ui/react/pull/1622))
Expand Down
1 change: 1 addition & 0 deletions build/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const webpackConfig: any = {
contextRegExp: /moment$/,
}),
__DEV__ &&
!process.env.CI &&
new webpack.ProgressPlugin({
entries: true,
modules: true,
Expand Down
7 changes: 1 addition & 6 deletions docs/src/components/ComponentDoc/ComponentDocLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ export default class ComponentDocLinks extends React.PureComponent<any, any> {
<Icon name="github" />
<code>
<a
style={{
color: 'rgba(0,0,0,.4)',
':hover, :focus': {
color: 'rgba(0,0,0,.8)',
},
}}
style={{ color: 'rgba(0,0,0,.4)' }}
href={`${constants.repoURL}/blob/master/${repoPath}`}
target="_blank"
rel="noopener noreferrer"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
import * as React from 'react'
import { Accordion, Button, Flex } from '@stardust-ui/react'

class AccordionPanelCustomContentExample extends React.Component {
render() {
const panels = [
{
title: 'Pets',
content: {
key: 'animals',
content: (
<Flex gap="gap.smaller">
<Button primary>Add pet</Button>
<Button>Remove pet</Button>
</Flex>
),
},
},
]
const AccordionPanelCustomContentExample = () => {
const panels = [
{
title: 'Pets',
content: (
<Flex gap="gap.smaller" key="animals">
<Button primary>Add pet</Button>
<Button>Remove pet</Button>
</Flex>
),
},
]

return <Accordion defaultActiveIndex={[0]} panels={panels} />
}
return <Accordion defaultActiveIndex={[0]} panels={panels} />
}

export default AccordionPanelCustomContentExample
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
import * as React from 'react'
import { Accordion, Label, Layout } from '@stardust-ui/react'

class AccordionPanelCustomTitleExample extends React.Component {
render() {
const panels = [
{
title: {
content: (
<Layout
start={
<Label icon="warning circle" iconPosition="start" circular content="Warnings" />
}
/>
),
},
content: {
key: 'warnings',
content: 'Here is a list of warnings discovered.',
},
const AccordionPanelCustomTitleExample = () => {
const panels = [
{
title: (
<Layout
key="title"
start={<Label icon="warning circle" iconPosition="start" circular content="Warnings" />}
/>
),
content: {
key: 'warnings',
content: 'Here is a list of warnings discovered.',
},
]
},
]

return <Accordion defaultActiveIndex={[0]} panels={panels} />
}
return <Accordion defaultActiveIndex={[0]} panels={panels} />
}

export default AccordionPanelCustomTitleExample
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,19 @@ const AvatarExampleImageCustomizationShorthand = () => (
/>
&emsp;
<Avatar
image={
image={render =>
// This example does not react to the avatar size variable
// and otherwise produces bad results when border is applied compared to "normal" image
<Icon
name="lock"
circular
bordered
variables={{ color: 'blue' }}
styles={{ boxSizing: 'border-box', padding: '8px' }}
/>
render({ name: 'chess rook' }, (ComponentType, props) => (
<Icon
{...{ ...props, avatar: undefined, fluid: undefined }}
name="lock"
circular
bordered
variables={{ color: 'blue' }}
styles={{ boxSizing: 'border-box', padding: '8px' }}
/>
))
}
status={{ color: 'green', icon: 'check', title: 'Available' }}
/>
layershifter marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,41 @@ const items = [
{
attached: 'top',
contentPosition: 'end',
message: {
content: (
<Chat.Message
actionMenu={actionMenu}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
actionMenu={actionMenu}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
key: 'message-1',
},
{
attached: 'bottom',
contentPosition: 'end',
key: 'message-2',
message: {
content: (
<Chat.Message
actionMenu={actionMenu}
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
actionMenu={actionMenu}
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
{
gutter: { content: <Avatar image="public/images/avatar/small/ade.jpg" /> },
message: {
content: (
<Chat.Message
actionMenu={actionMenu}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
},
gutter: <Avatar image="public/images/avatar/small/ade.jpg" />,
message: (
<Chat.Message
actionMenu={actionMenu}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
key: 'message-3',
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,41 @@ const items = [
{
attached: 'top',
contentPosition: 'end',
message: {
content: (
<Chat.Message
reactionGroup={reactions}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
reactionGroup={reactions}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
key: 'message-1',
},
{
attached: 'bottom',
contentPosition: 'end',
key: 'message-2',
message: {
content: (
<Chat.Message
reactionGroup={[{ key: 'up', icon: 'thumbs up', content: '8' }]}
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
reactionGroup={[{ key: 'up', icon: 'thumbs up', content: '8' }]}
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
{
gutter: { content: <Avatar image="public/images/avatar/small/ade.jpg" /> },
message: {
content: (
<Chat.Message
reactionGroup={reactions}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
},
gutter: <Avatar image="public/images/avatar/small/ade.jpg" />,
message: (
<Chat.Message
reactionGroup={reactions}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
key: 'message-3',
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,52 +10,44 @@ const items = [
{
attached: 'top',
contentPosition: 'end',
message: {
content: (
<Chat.Message
reactionGroup={{
items: reactions,
}}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
reactionGroup={{
items: reactions,
}}
content="Hello"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
key: 'message-1',
},
{
attached: 'bottom',
contentPosition: 'end',
key: 'message-2',
message: {
content: (
<Chat.Message
reactionGroup={reactions}
reactionGroupPosition="end"
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
message: (
<Chat.Message
reactionGroup={reactions}
reactionGroupPosition="end"
content="I'm back!"
author="John Doe"
timestamp="Yesterday, 10:15 PM"
mine
/>
),
},
{
gutter: {
content: <Avatar image="public/images/avatar/small/ade.jpg" />,
},
message: {
content: (
<Chat.Message
reactionGroup={reactions}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
},
gutter: <Avatar image="public/images/avatar/small/ade.jpg" />,
message: (
<Chat.Message
reactionGroup={reactions}
content="Hi"
author="Jane Doe"
timestamp="Yesterday, 10:15 PM"
/>
),
key: 'message-3',
},
]
Expand Down
Loading