-
Notifications
You must be signed in to change notification settings - Fork 2.9k
List - initial implementation #29760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Jiří Vyhnálek (george-cz)
merged 151 commits into
microsoft:master
from
george-cz:jirivyhnalek/selectable_list
Mar 28, 2024
Merged
Changes from 20 commits
Commits
Show all changes
151 commits
Select commit
Hold shift + click to select a range
24f85f2
React Components V9: List - initial commit
george-cz 33ba3aa
list wip, selection works
george-cz 9652c2b
remove selection logic, update overflowin example
george-cz d3ecd34
extend docs, rename
george-cz d317d07
improve the whole story, especially virtualized list
george-cz 4a2926b
update virtualized actionable desc
george-cz 4377de3
Replace button slot with ListItemButton component
george-cz ecd54a3
remove focusable prop, update docs
george-cz e7ff8e8
fix storeis
george-cz cd87545
example list multiple actions
george-cz 980fba1
Revert "remove selection logic, update overflowin example"
george-cz 942b2c8
internal selection state handling
george-cz 6deefb5
continue work on selection
george-cz 6635c23
actually render li, rename
george-cz 9ff61fa
controlled wip
george-cz 75b9f75
checkmark, defaultSelected
george-cz 9d5478b
docs
george-cz 2eb24a8
tokens
george-cz eabf9ac
A lot of optimizations
george-cz 0334feb
Merge remote-tracking branch 'upstream' into jirivyhnalek/selectable_…
george-cz af7aee1
Merge remote-tracking branch 'upstream' into jirivyhnalek/selectable_…
george-cz 829dd73
changelog
george-cz bb03846
yarnlock
george-cz aea3ccc
bump outdated deps
george-cz 78c75c5
api
george-cz 91d3fbf
kick off spec, add MIGRATION.md
george-cz 4f5d7db
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 7b79c8c
revert change in react/utilities/index.ts
george-cz 6116734
unused import
george-cz dcba5bb
remove unused file
george-cz bec92dd
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 8f4b783
Replace ListLayout enum with a string literal
george-cz bf54418
Replace IList with ListComponentRef
george-cz a51d048
remove todos, replace styles with resetStyles
george-cz 782fe5b
remove more todos
george-cz d9743e2
dont spread selection props unless selection is enabled
george-cz 6fd6224
fix unnecessary ul/li in exmample
george-cz e9379f2
remove dl,dt,dd
george-cz d492c92
fix story
george-cz 6e86bed
remove external data provders for names and countries
george-cz 77ea0ef
remove decorator
george-cz 937d61a
update selection logic, controlled/uncontrolled
george-cz 14fb255
remove useListFeatures
george-cz dca63e7
get rid of getListPros and getListItemProps
george-cz 2a4fa8c
Add validation for proper use of elements
george-cz a6006ec
remove customArrowNavigationOptions, let the user have full responsib…
george-cz e9e7298
remove item registration/deregistration logic
george-cz dcbb0af
remove unused items
george-cz 942e611
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz fa315de
remove unused items, fix compiler
george-cz e3bcb1d
bump dep versions to latest
george-cz b320476
tsconfig.base update
george-cz 35f7ca4
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 5964704
remove gitkeep
george-cz a9a459c
bad merge
george-cz 48ff239
fix story
george-cz c860acc
Redesign completely the ListItemButton component, fix tests
george-cz a6151fc
API fix
george-cz 0413fa4
remove outdated story
george-cz d5780de
fix tsc
george-cz 00e777f
update stories to be memoized
george-cz cb1aae6
selection stories
george-cz 2232eb8
Merge branch 'master' into jirivyhnalek/selectable_list
george-cz b73ef78
Update .github/CODEOWNERS
george-cz ee81b17
selectable determines mouse cursor instead of onClick
george-cz e33c2f4
PR feedback
george-cz d8c9c25
pr feedback from Shift, round 1
george-cz 38841fb
pr feedback
george-cz 0825b5f
api
george-cz c49ca57
big progress on complex lists
george-cz 34be3d1
update stories
george-cz e88dbab
build stories for list
george-cz 9c5af8c
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 9e8e491
icons package
george-cz cb2cf8b
List a11y document
george-cz bcb72b4
remove duplicate dep
george-cz 36e98ca
update deps
george-cz 39234d0
fix build
george-cz 52ad1a5
typo
george-cz 16aebd6
remove unused stories, fix ssr test build
george-cz da29fc5
fix build
george-cz 165ac90
api, change
george-cz 0ad45ea
unprivate list
george-cz a6b633d
change - list unprivate
george-cz 18c366e
update document, fix examples, add one more example
george-cz e652225
remove unused stories
george-cz d579247
spacebar toggles, but enter has different action, cleanup commented code
george-cz fb07223
dont toggle selection by pressing enter
george-cz 7196216
remove focusableItems prop, remove horizontal/grid layout
george-cz 91dfadb
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz aaf055c
fix broken tab that should move to next focusable from the list item
george-cz 9db5af1
update all stories and docs
george-cz c7576ea
Remove ListItemButton completely
george-cz e4c494e
fix label for single action list
george-cz 5d193a7
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 2e75a91
cleaned up examples, used more descriptive alerts
george-cz 41cba52
toggle item on Enter if default hasn't been prevented
george-cz e0c875d
update the activeElement story to change selection n focus
george-cz 0f111f9
use tabster custom events to navigate to next/prev item
george-cz 35a10ac
remove unused destruct
george-cz d2051dd
this should not be here
george-cz 6cd03b4
update research doc
george-cz cfd38f7
unit tests for List
george-cz 586b919
add cypress tests to validate keyboard nav
george-cz e2381d7
remove selectable prop, as it is redundant
george-cz d0d4611
replace custom focus logic with tabster events
george-cz 91b697b
add more tests
george-cz c8416bf
add tests for custom aria roles
george-cz 4250a33
test snapshots of selectable/multiselectable
george-cz 78bf29b
fix one story
george-cz b0a81ca
automatically defer proper aria roles
george-cz a4adc8d
only pass onClick if it actually does something
george-cz 18bc954
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 2b6623c
bump list deps to latest
george-cz df210bd
update changelog for removed ListItemButton
george-cz 92f0c28
Remove export from react-components
george-cz 79c1ba5
remove obsolete change record
george-cz 73930df
remove suggestion to user aria-roledescription
george-cz 1cadc6c
Merge remote-tracking branch 'upstream/master' into jirivyhnalek/sele…
george-cz 503c379
bump deps
george-cz 5e80112
yarn.lock
george-cz a5e67e9
fix bad merge
george-cz 5c68e10
Merge branch 'master' into jirivyhnalek/selectable_list
george-cz 6c4364d
PR feedback round 1
george-cz 5040ace
update stories - do not promote use of style prop
george-cz a52855f
feedback from Ling: round 1
george-cz 890ba51
revert breaking change
george-cz 08483bd
Add navigable prop to List instead of relying on eventHandlers
george-cz 4be0c79
rely on navigable instead of hasCustomClick
george-cz f78f898
rework active element example to less resemble tab interface
george-cz 03647f9
add navigationMode prop and infer roles from it
george-cz bc76824
update warnings
george-cz 1872a0f
update tests
george-cz c9f26d3
all validations happen in List for all ListItems
george-cz 17538ac
reverts
george-cz 7d892c7
update desc and best practices
george-cz 9ca0171
update docs and warnings
george-cz 433cacc
enable event propagation when custom onClick is passed
george-cz 9b5922c
remove obsolete change record
george-cz ce5cb8e
use onAction instead of onClick
george-cz e13eaab
migration doc update
george-cz fd2a63a
api
george-cz 80929f8
unused import in test
george-cz 85e62b9
Update packages/react-components/react-list-preview/src/components/Li…
george-cz 1ad70a4
refactor onKeyDown based on suggestions
george-cz 56d9936
remove useListSelection, update stories as discussed
george-cz 1f55f47
Merge branch 'master' into jirivyhnalek/selectable_list
george-cz 0e5465c
prepare for a separate release
george-cz 8a74d65
update stories
george-cz ccb10f1
Bernardos feedback
george-cz 4cd3e7f
Merge branch 'master' into jirivyhnalek/selectable_list
george-cz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
| { | ||
| "extends": "../../../.babelrc-v9.json", | ||
| "plugins": ["annotate-pure-calls", "@babel/transform-react-pure-annotations"] | ||
| } |
This file contains hidden or 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 @@ | ||
| { | ||
| "extends": ["plugin:@fluentui/eslint-plugin/react"], | ||
| "root": true | ||
| } |
This file contains hidden or 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,38 @@ | ||
| .storybook/ | ||
|
george-cz marked this conversation as resolved.
Outdated
|
||
| .vscode/ | ||
| bundle-size/ | ||
| config/ | ||
| coverage/ | ||
| docs/ | ||
| etc/ | ||
| node_modules/ | ||
| src/ | ||
| stories/ | ||
| dist/types/ | ||
| temp/ | ||
| __fixtures__ | ||
| __mocks__ | ||
| __tests__ | ||
|
|
||
| *.api.json | ||
| *.log | ||
| *.spec.* | ||
| *.cy.* | ||
| *.test.* | ||
| *.yml | ||
|
|
||
| # config files | ||
| *config.* | ||
| *rc.* | ||
| .editorconfig | ||
| .eslint* | ||
| .git* | ||
| .prettierignore | ||
| .swcrc | ||
| project.json | ||
|
|
||
| # exclude gitignore patterns explicitly | ||
| !lib | ||
| !lib-commonjs | ||
| !lib-amd | ||
| !dist/*.d.ts | ||
14 changes: 14 additions & 0 deletions
14
packages/react-components/react-list-preview/.storybook/main.js
This file contains hidden or 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,14 @@ | ||
| const rootMain = require('../../../../.storybook/main'); | ||
|
|
||
| module.exports = /** @type {Omit<import('../../../../.storybook/main'), 'typescript'|'babel'>} */ ({ | ||
| ...rootMain, | ||
| stories: [...rootMain.stories, '../stories/**/*.stories.mdx', '../stories/**/index.stories.@(ts|tsx)'], | ||
| addons: [...rootMain.addons], | ||
| webpackFinal: (config, options) => { | ||
| const localConfig = { ...rootMain.webpackFinal(config, options) }; | ||
|
|
||
| // add your own webpack tweaks if needed | ||
|
|
||
| return localConfig; | ||
| }, | ||
| }); |
7 changes: 7 additions & 0 deletions
7
packages/react-components/react-list-preview/.storybook/preview.js
This file contains hidden or 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 @@ | ||
| import * as rootPreview from '../../../../.storybook/preview'; | ||
|
|
||
| /** @type {typeof rootPreview.decorators} */ | ||
| export const decorators = [...rootPreview.decorators]; | ||
|
|
||
| /** @type {typeof rootPreview.parameters} */ | ||
| export const parameters = { ...rootPreview.parameters }; |
10 changes: 10 additions & 0 deletions
10
packages/react-components/react-list-preview/.storybook/tsconfig.json
This file contains hidden or 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,10 @@ | ||
| { | ||
| "extends": "../tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "", | ||
| "allowJs": true, | ||
| "checkJs": true, | ||
| "types": ["static-assets", "environment", "storybook__addons"] | ||
| }, | ||
| "include": ["../stories/**/*.stories.ts", "../stories/**/*.stories.tsx", "*.js"] | ||
| } |
This file contains hidden or 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,30 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/swcrc", | ||
| "exclude": [ | ||
| "/testing", | ||
| "/**/*.cy.ts", | ||
| "/**/*.cy.tsx", | ||
| "/**/*.spec.ts", | ||
| "/**/*.spec.tsx", | ||
| "/**/*.test.ts", | ||
| "/**/*.test.tsx" | ||
| ], | ||
| "jsc": { | ||
| "parser": { | ||
| "syntax": "typescript", | ||
| "tsx": true, | ||
| "decorators": false, | ||
| "dynamicImport": false | ||
| }, | ||
| "externalHelpers": true, | ||
| "transform": { | ||
| "react": { | ||
| "runtime": "classic", | ||
| "useSpread": true | ||
| } | ||
| }, | ||
| "target": "es2019" | ||
| }, | ||
| "minify": false, | ||
| "sourceMaps": true | ||
| } |
This file contains hidden or 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,15 @@ | ||
| @fluentui/react-list-preview | ||
|
|
||
| Copyright (c) Microsoft Corporation | ||
|
|
||
| All rights reserved. | ||
|
|
||
| MIT License | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED _AS IS_, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
|
||
| Note: Usage of the fonts and icons referenced in Fluent UI React is subject to the terms listed at https://aka.ms/fluentui-assets-license |
This file contains hidden or 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,5 @@ | ||
| # @fluentui/react-list-preview | ||
|
|
||
| **React List components for [Fluent UI React](https://react.fluentui.dev/)** | ||
|
|
||
| These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release. |
4 changes: 4 additions & 0 deletions
4
packages/react-components/react-list-preview/config/api-extractor.json
This file contains hidden or 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 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
| "extends": "@fluentui/scripts-api-extractor/api-extractor.common.v-next.json" | ||
| } |
This file contains hidden or 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 @@ | ||
| /** Jest test setup file. */ |
This file contains hidden or 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,63 @@ | ||
| # @fluentui/react-list-preview Spec | ||
|
george-cz marked this conversation as resolved.
|
||
|
|
||
| ## Background | ||
|
|
||
| _Description and use cases of this component_ | ||
|
|
||
| ## Prior Art | ||
|
|
||
| _Include background research done for this component_ | ||
|
|
||
| - _Link to Open UI research_ | ||
| - _Link to comparison of v7 and v0_ | ||
| - _Link to GitHub epic issue for the converged component_ | ||
|
|
||
| ## Sample Code | ||
|
|
||
| _Provide some representative example code that uses the proposed API for the component_ | ||
|
|
||
| ## Variants | ||
|
|
||
| _Describe visual or functional variants of this control, if applicable. For example, a slider could have a 2D variant._ | ||
|
|
||
| ## API | ||
|
|
||
| _List the **Props** and **Slots** proposed for the component. Ideally this would just be a link to the component's `.types.ts` file_ | ||
|
|
||
| ## Structure | ||
|
|
||
| - _**Public**_ | ||
| - _**Internal**_ | ||
| - _**DOM** - how the component will be rendered as HTML elements_ | ||
|
|
||
| ## Migration | ||
|
|
||
| _Describe what will need to be done to upgrade from the existing implementations:_ | ||
|
|
||
| - _Migration from v8_ | ||
| - _Migration from v0_ | ||
|
|
||
| ## Behaviors | ||
|
|
||
| _Explain how the component will behave in use, including:_ | ||
|
|
||
| - _Component States_ | ||
| - _Interaction_ | ||
| - _Keyboard_ | ||
| - _Cursor_ | ||
| - _Touch_ | ||
| - _Screen readers_ | ||
|
|
||
| ## Accessibility | ||
|
|
||
| Base accessibility information is included in the design document. After the spec is filled and review, outcomes from it need to be communicated to design and incorporated in the design document. | ||
|
|
||
| - Decide whether to use **native element** or folow **ARIA** and provide reasons | ||
| - Identify the **[ARIA](https://www.w3.org/TR/wai-aria-practices-1.2/) pattern** and, if the component is listed there, follow its specification as possible. | ||
| - Identify accessibility **variants**, the `role` ([ARIA roles](https://www.w3.org/TR/wai-aria-1.1/#role_definitions)) of the component, its `slots` and `aria-*` props. | ||
| - Describe the **keyboard navigation**: Tab Oder and Arrow Key Navigation. Describe any other keyboard **shortcuts** used | ||
| - Specify texts for **state change announcements** - [ARIA live regions | ||
| ](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) (number of available items in dropdown, error messages, confirmations, ...) | ||
| - Identify UI parts that appear on **hover or focus** and specify keyboard and screen reader interaction with them | ||
| - List cases when **focus** needs to be **trapped** in sections of the UI (for dialogs and popups or for hierarchical navigation) | ||
| - List cases when **focus** needs to be **moved programatically** (if parts of the UI are appearing/disappearing or other cases) | ||
68 changes: 68 additions & 0 deletions
68
packages/react-components/react-list-preview/etc/react-list-preview.api.md
This file contains hidden or 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,68 @@ | ||
| ## API Report File for "@fluentui/react-list-preview" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import type { ComponentProps } from '@fluentui/react-utilities'; | ||
| import type { ComponentState } from '@fluentui/react-utilities'; | ||
| import type { ForwardRefComponent } from '@fluentui/react-utilities'; | ||
| import * as React_2 from 'react'; | ||
| import type { Slot } from '@fluentui/react-utilities'; | ||
| import type { SlotClassNames } from '@fluentui/react-utilities'; | ||
|
|
||
| // @public | ||
| export const List: ForwardRefComponent<ListProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export const listClassNames: SlotClassNames<ListSlots>; | ||
|
|
||
| // @public | ||
| export const ListItem: ForwardRefComponent<ListItemProps>; | ||
|
|
||
| // @public (undocumented) | ||
| export const listItemClassNames: SlotClassNames<ListItemSlots>; | ||
|
|
||
| // @public | ||
| export type ListItemProps = ComponentProps<ListItemSlots> & {}; | ||
|
|
||
| // @public (undocumented) | ||
| export type ListItemSlots = { | ||
| root: Slot<'div'>; | ||
| }; | ||
|
|
||
| // @public | ||
| export type ListItemState = ComponentState<ListItemSlots>; | ||
|
|
||
| // @public | ||
| export type ListProps = ComponentProps<ListSlots> & {}; | ||
|
|
||
| // @public (undocumented) | ||
| export type ListSlots = { | ||
| root: Slot<'div'>; | ||
| }; | ||
|
|
||
| // @public | ||
| export type ListState = ComponentState<ListSlots>; | ||
|
|
||
| // @public | ||
| export const renderList_unstable: (state: ListState) => JSX.Element; | ||
|
|
||
| // @public | ||
| export const renderListItem_unstable: (state: ListItemState) => JSX.Element; | ||
|
|
||
| // @public | ||
| export const useList_unstable: (props: ListProps, ref: React_2.Ref<HTMLElement>) => ListState; | ||
|
|
||
| // @public | ||
| export const useListItem_unstable: (props: ListItemProps, ref: React_2.Ref<HTMLElement>) => ListItemState; | ||
|
|
||
| // @public | ||
| export const useListItemStyles_unstable: (state: ListItemState) => ListItemState; | ||
|
|
||
| // @public | ||
| export const useListStyles_unstable: (state: ListState) => ListState; | ||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` |
21 changes: 21 additions & 0 deletions
21
packages/react-components/react-list-preview/jest.config.js
This file contains hidden or 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,21 @@ | ||
| // @ts-check | ||
|
|
||
| /** | ||
| * @type {import('@jest/types').Config.InitialOptions} | ||
| */ | ||
| module.exports = { | ||
| displayName: 'react-list-preview', | ||
| preset: '../../../jest.preset.js', | ||
| transform: { | ||
| '^.+\\.tsx?$': [ | ||
| 'ts-jest', | ||
| { | ||
| tsconfig: '<rootDir>/tsconfig.spec.json', | ||
| isolatedModules: true, | ||
| }, | ||
| ], | ||
| }, | ||
| coverageDirectory: './coverage', | ||
| setupFilesAfterEnv: ['./config/tests.js'], | ||
| snapshotSerializers: ['@griffel/jest-serializer'], | ||
| }; |
This file contains hidden or 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,5 @@ | ||
| import { preset, task } from '@fluentui/scripts-tasks'; | ||
|
|
||
| preset(); | ||
|
|
||
| task('build', 'build:react-components').cached?.(); |
This file contains hidden or 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,66 @@ | ||
| { | ||
| "name": "@fluentui/react-list-preview", | ||
| "version": "0.0.0", | ||
| "private": true, | ||
| "description": "New fluentui react package", | ||
| "main": "lib-commonjs/index.js", | ||
| "module": "lib/index.js", | ||
| "typings": "./dist/index.d.ts", | ||
| "sideEffects": false, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/microsoft/fluentui" | ||
| }, | ||
| "license": "MIT", | ||
| "scripts": { | ||
| "build": "just-scripts build", | ||
| "clean": "just-scripts clean", | ||
| "generate-api": "just-scripts generate-api", | ||
| "lint": "just-scripts lint", | ||
| "start": "yarn storybook", | ||
| "storybook": "start-storybook", | ||
| "test": "jest --passWithNoTests", | ||
| "test-ssr": "test-ssr \"./stories/**/*.stories.tsx\"", | ||
| "type-check": "tsc -b tsconfig.json" | ||
| }, | ||
| "devDependencies": { | ||
| "@fluentui/eslint-plugin": "*", | ||
| "@fluentui/react-conformance": "*", | ||
| "@fluentui/react-conformance-griffel": "*", | ||
| "@fluentui/scripts-api-extractor": "*", | ||
| "@fluentui/scripts-tasks": "*" | ||
| }, | ||
| "dependencies": { | ||
| "@fluentui/react-button": "^9.3.34", | ||
| "@fluentui/react-checkbox": "^9.1.35", | ||
| "@fluentui/react-context-selector": "^9.1.31", | ||
| "@fluentui/react-icons": "^2.0.207", | ||
| "@fluentui/react-jsx-runtime": "^9.0.3", | ||
| "@fluentui/react-tabster": "^9.12.5", | ||
| "@fluentui/react-theme": "^9.1.11", | ||
| "@fluentui/react-utilities": "^9.13.0", | ||
| "@griffel/react": "^1.5.14", | ||
| "@swc/helpers": "^0.5.1" | ||
| }, | ||
| "peerDependencies": { | ||
| "@types/react": ">=16.8.0 <19.0.0", | ||
| "@types/react-dom": ">=16.8.0 <19.0.0", | ||
| "react": ">=16.8.0 <19.0.0", | ||
| "react-dom": ">=16.8.0 <19.0.0" | ||
| }, | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "node": "./lib-commonjs/index.js", | ||
| "import": "./lib/index.js", | ||
| "require": "./lib-commonjs/index.js" | ||
| }, | ||
| "./package.json": "./package.json" | ||
| }, | ||
| "beachball": { | ||
| "disallowedChangeTypes": [ | ||
| "major", | ||
| "prerelease" | ||
| ] | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.