@primer/components 31.0.2-rc.95622264 → 31.2.0-rc.c285489d
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/.storybook/main.js +7 -9
- package/.storybook/preview.js +5 -1
- package/CHANGELOG.md +11 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/Autocomplete/Autocomplete.d.ts +4 -4
- package/lib/Autocomplete/AutocompleteInput.d.ts +4 -4
- package/lib/Button/Button.d.ts +5 -5
- package/lib/Button/ButtonBase.d.ts +1 -1
- package/lib/Button/ButtonClose.d.ts +3 -3
- package/lib/Button/ButtonDanger.d.ts +5 -5
- package/lib/Button/ButtonInvisible.d.ts +5 -5
- package/lib/Button/ButtonOutline.d.ts +5 -5
- package/lib/Button/ButtonPrimary.d.ts +5 -5
- package/lib/CircleBadge.d.ts +2 -2
- package/lib/CircleOcticon.d.ts +4 -4
- package/lib/Dialog.d.ts +4 -4
- package/lib/Dropdown.d.ts +16 -16
- package/lib/DropdownMenu/DropdownButton.d.ts +6 -6
- package/lib/FilterList.d.ts +3 -3
- package/lib/Flash.d.ts +1 -1
- package/lib/Label.d.ts +1 -1
- package/lib/Position.d.ts +4 -4
- package/lib/ProgressBar.d.ts +1 -1
- package/lib/SelectMenu/SelectMenu.d.ts +24 -24
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/TextInputWithTokens.d.ts +4 -4
- package/lib/Timeline.d.ts +4 -4
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/_TextInputWrapper.d.ts +1 -1
- package/lib/__tests__/KeyPaths.types.test.d.ts +10 -0
- package/lib/__tests__/KeyPaths.types.test.js +10 -0
- package/lib/sx.d.ts +8 -2
- package/lib/theme.d.ts +78 -0
- package/lib/theme.js +3 -1
- package/lib/utils/types/KeyPaths.d.ts +3 -0
- package/lib/utils/types/KeyPaths.js +1 -0
- package/lib-esm/Autocomplete/Autocomplete.d.ts +4 -4
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +4 -4
- package/lib-esm/Button/Button.d.ts +5 -5
- package/lib-esm/Button/ButtonBase.d.ts +1 -1
- package/lib-esm/Button/ButtonClose.d.ts +3 -3
- package/lib-esm/Button/ButtonDanger.d.ts +5 -5
- package/lib-esm/Button/ButtonInvisible.d.ts +5 -5
- package/lib-esm/Button/ButtonOutline.d.ts +5 -5
- package/lib-esm/Button/ButtonPrimary.d.ts +5 -5
- package/lib-esm/CircleBadge.d.ts +2 -2
- package/lib-esm/CircleOcticon.d.ts +4 -4
- package/lib-esm/Dialog.d.ts +4 -4
- package/lib-esm/Dropdown.d.ts +16 -16
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -6
- package/lib-esm/FilterList.d.ts +3 -3
- package/lib-esm/Flash.d.ts +1 -1
- package/lib-esm/Label.d.ts +1 -1
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/ProgressBar.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenu.d.ts +24 -24
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/TextInputWithTokens.d.ts +4 -4
- package/lib-esm/Timeline.d.ts +4 -4
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/_TextInputWrapper.d.ts +1 -1
- package/lib-esm/__tests__/KeyPaths.types.test.d.ts +10 -0
- package/lib-esm/__tests__/KeyPaths.types.test.js +3 -0
- package/lib-esm/sx.d.ts +8 -2
- package/lib-esm/theme.d.ts +78 -0
- package/lib-esm/theme.js +2 -1
- package/lib-esm/utils/types/KeyPaths.d.ts +3 -0
- package/lib-esm/utils/types/KeyPaths.js +1 -0
- package/package-lock.json +37942 -41
- package/package.json +2 -1
- package/src/__tests__/KeyPaths.types.test.ts +13 -0
- package/src/sx.ts +14 -2
- package/src/theme.ts +86 -0
- package/src/utils/types/KeyPaths.ts +4 -0
- package/stats.html +1 -1
- package/.changeset/tiny-ghosts-repeat.md +0 -5
package/.storybook/main.js
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
module.exports = {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
"@storybook/addon-links",
|
9
|
-
"@storybook/addon-essentials"
|
2
|
+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
3
|
+
addons: [
|
4
|
+
'@storybook/addon-a11y',
|
5
|
+
'@storybook/addon-links',
|
6
|
+
'@storybook/addon-essentials',
|
7
|
+
'storybook-addon-performance/register'
|
10
8
|
]
|
11
|
-
}
|
9
|
+
}
|
package/.storybook/preview.js
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
import {addons} from '@storybook/addons'
|
2
2
|
import {ThemeProvider, themeGet, theme} from '../src'
|
3
3
|
import styled, {createGlobalStyle} from 'styled-components'
|
4
|
+
import {addDecorator} from '@storybook/react'
|
5
|
+
import {withPerformance} from 'storybook-addon-performance'
|
6
|
+
|
7
|
+
addDecorator(withPerformance)
|
4
8
|
|
5
9
|
// set global theme styles for each story
|
6
10
|
const GlobalStyle = createGlobalStyle`
|
@@ -100,7 +104,7 @@ const withThemeProvider = (Story, context) => {
|
|
100
104
|
</ThemeProvider>
|
101
105
|
)
|
102
106
|
}
|
103
|
-
export const decorators = [withThemeProvider]
|
107
|
+
export const decorators = [withThemeProvider, withPerformance]
|
104
108
|
|
105
109
|
addons.setConfig({
|
106
110
|
// Some stories may set up keyboard event handlers, which can can be interfered
|
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,16 @@
|
|
1
1
|
# @primer/components
|
2
2
|
|
3
|
-
## 31.0
|
3
|
+
## 31.2.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#1544](https://github.com/primer/react/pull/1544) [`5b55b0ab`](https://github.com/primer/react/commit/5b55b0ab8ea06b077e141c02285c81b99e246b77) Thanks [@jfuchs](https://github.com/jfuchs)! - The sx prop now has types that will inform autocomplete for color and shadow values that are key paths into the theme.
|
8
|
+
|
9
|
+
## 31.1.0
|
10
|
+
|
11
|
+
### Minor Changes
|
12
|
+
|
13
|
+
- [#1523](https://github.com/primer/react/pull/1523) [`56e2f159`](https://github.com/primer/react/commit/56e2f159b9d627564a7717e6961a6bfa355189b3) Thanks [@mperrotti](https://github.com/mperrotti)! - Add the ability to truncate tokens in the TextInputWithToken component when the input is not focused
|
4
14
|
|
5
15
|
### Patch Changes
|
6
16
|
|