@primer/components 31.0.2-rc.95622264 → 31.2.0-rc.50908ce9
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 +15 -1
- package/dist/browser.esm.js +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/FilterList.md +2 -2
- package/docs/content/theming.md +23 -0
- package/lib/ActionList/Header.js +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 +11 -0
- package/lib/__tests__/KeyPaths.types.test.js +10 -0
- package/lib/stories/Token.stories.js +19 -2
- 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/ActionList/Header.js +1 -1
- 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 +11 -0
- package/lib-esm/__tests__/KeyPaths.types.test.js +3 -0
- package/lib-esm/stories/Token.stories.js +14 -1
- 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 +37956 -42
- package/package.json +3 -1
- package/script/build +2 -0
- package/src/ActionList/Header.tsx +1 -1
- package/src/__tests__/KeyPaths.types.test.ts +14 -0
- package/src/stories/Button.stories.tsx +1 -1
- package/src/stories/Token.stories.tsx +12 -1
- package/src/sx.ts +14 -2
- package/src/theme.ts +86 -0
- package/src/utils/types/KeyPaths.ts +10 -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,20 @@
|
|
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
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- [#1549](https://github.com/primer/react/pull/1549) [`f565840f`](https://github.com/primer/react/commit/f565840f2d879b987ef9df7cd046e146214ed5f5) Thanks [@michael-lefebvre](https://github.com/michael-lefebvre)! - Fix `auxiliaryText` in ActionList Group header
|
12
|
+
|
13
|
+
## 31.1.0
|
14
|
+
|
15
|
+
### Minor Changes
|
16
|
+
|
17
|
+
- [#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
18
|
|
5
19
|
### Patch Changes
|
6
20
|
|
package/dist/browser.esm.js
CHANGED
@@ -400,7 +400,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
400
400
|
${({variant:e})=>"filled"===e&&p(["background:",";margin:"," 0;border-top:1px solid ",";border-bottom:1px solid ",";&:first-child{margin-top:0;}"],Nt("colors.canvas.subtle"),Nt("space.2"),Nt("colors.neutral.muted"),Nt("colors.neutral.muted"))}
|
401
401
|
|
402
402
|
${rr}
|
403
|
-
`;function va({variant:t="subtle",title:r,auxiliaryText:o,children:a,...n}){return e.createElement(ha,Pt({role:"heading",variant:t},n),r,o&&e.createElement("span",null,
|
403
|
+
`;function va({variant:t="subtle",title:r,auxiliaryText:o,children:a,...n}){return e.createElement(ha,Pt({role:"heading",variant:t},n),r,o&&e.createElement("span",null,o))}va.displayName="Header";const xa=f.div`
|
404
404
|
${rr}
|
405
405
|
`;function ya({header:t,items:r,...o}){return e.createElement(xa,o,t&&e.createElement(va,t),r)}ya.displayName="Group";const wa=f.div`
|
406
406
|
${At}
|