@charcoal-ui/react 3.0.0 → 3.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charcoal-ui/react",
3
- "version": "3.0.0",
3
+ "version": "3.1.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
@@ -49,10 +49,10 @@
49
49
  "typescript": "^4.9.5"
50
50
  },
51
51
  "dependencies": {
52
- "@charcoal-ui/icons": "^3.0.0",
53
- "@charcoal-ui/styled": "^3.0.0",
54
- "@charcoal-ui/theme": "^3.0.0",
55
- "@charcoal-ui/utils": "^3.0.0",
52
+ "@charcoal-ui/icons": "^3.1.1",
53
+ "@charcoal-ui/styled": "^3.1.1",
54
+ "@charcoal-ui/theme": "^3.1.1",
55
+ "@charcoal-ui/utils": "^3.1.1",
56
56
  "@react-aria/button": "^3.7.0",
57
57
  "@react-aria/checkbox": "^3.8.0",
58
58
  "@react-aria/dialog": "^3.5.0",
@@ -88,5 +88,5 @@
88
88
  "url": "https://github.com/pixiv/charcoal.git",
89
89
  "directory": "packages/react"
90
90
  },
91
- "gitHead": "27e9a612bad6c8da75e97449d5ff2a1de3dc7181"
91
+ "gitHead": "33a7278e64d0177b536edb4f43a291a319ca7e2d"
92
92
  }
@@ -72,6 +72,28 @@ export const Basic: Story<DropdownSelectorProps> = (
72
72
 
73
73
  Basic.args = { ...baseProps }
74
74
 
75
+ export const InFormTag: Story<DropdownSelectorProps> = (
76
+ props: DropdownSelectorProps
77
+ ) => {
78
+ const [selected, setSelected] = useState('')
79
+ return (
80
+ <form style={{ width: 288 }}>
81
+ <DropdownSelector
82
+ {...props}
83
+ onChange={(value) => {
84
+ setSelected(value)
85
+ }}
86
+ value={selected}
87
+ label="label"
88
+ >
89
+ <DropdownMenuItem value={'10'}>Apple</DropdownMenuItem>
90
+ <DropdownMenuItem value={'20'}>Banana</DropdownMenuItem>
91
+ <DropdownMenuItem value={'30'}>Orange</DropdownMenuItem>
92
+ </DropdownSelector>
93
+ </form>
94
+ )
95
+ }
96
+
75
97
  export const CustomChildren: Story<DropdownSelectorProps> = (
76
98
  props: DropdownSelectorProps
77
99
  ) => {
@@ -48,6 +48,7 @@ export default function DropdownSelector(props: DropdownSelectorProps) {
48
48
  setIsOpen(true)
49
49
  }}
50
50
  ref={triggerRef}
51
+ type="button"
51
52
  >
52
53
  <DropdownButtonText>
53
54
  {props.placeholder !== undefined && preview === undefined
@@ -188,7 +188,7 @@ const ModalContext = React.createContext<{
188
188
 
189
189
  const ModalBackground = animated(styled.div<{ zIndex: number }>`
190
190
  z-index: ${({ zIndex }) => zIndex};
191
- overflow: scroll;
191
+ overflow: auto;
192
192
  display: flex;
193
193
  position: fixed;
194
194
  top: 0;
@@ -241,7 +241,6 @@ const ModalDialog = animated(styled.div<{
241
241
  }>`
242
242
  position: relative;
243
243
  margin: auto;
244
- padding: 24px 0;
245
244
 
246
245
  ${theme((o) => [o.bg.background1, o.borderRadius(24)])}
247
246
  @media ${({ theme }) => maxWidth(theme.breakpoint.screen1)} {