-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Web Component Switch #26517
Web Component Switch #26517
Conversation
π Bundle size reportπ€ This report was generated against 50615f48477ebf292bb017c36fc989045e4f48a4 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 3cfd2a5:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 1ad2597f744bf7c3e2eada7720eea793fcee660e (build) |
change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json
Outdated
Show resolved
Hide resolved
:host([disabled]) .status-message, | ||
:host([readonly]) .status-message { | ||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be removed with the latest version of the template - does the message still exist?
packages/web-components/src/index.ts
Outdated
export * from './text/index.js'; | ||
export * from './switch/index.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, these should technically be alphabetized
:host([aria-checked='true']) .switch:hover { | ||
background: ${colorCompoundBrandBackgroundHover}; | ||
border-color: ${colorCompoundBrandBackgroundHover}; | ||
} | ||
:host([aria-checked='true']) .switch:active { | ||
background: ${colorCompoundBrandBackgroundPressed}; | ||
border-color: ${colorCompoundBrandBackgroundPressed}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brianchristopherbrady I think I found a slight change that needs to be made here...perhaps you can confirm locally. From what I can tell form the FUIR9 implementation the hover and active states should go darker even in the case that the label is hovered. With this, the change is going to be very slight.
:host([aria-checked='true']:hover) .switch {
background: ${colorCompoundBrandBackgroundHover};
border-color: ${colorCompoundBrandBackgroundHover};
}
:host([aria-checked='true']:active) .switch {
background: ${colorCompoundBrandBackgroundPressed};
border-color: ${colorCompoundBrandBackgroundPressed};
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also want to ensure that these do not apply when the component is disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
* switch init * provides export path * yarn change * removes dead code * adds table docs * updates attribute to use attr syntax * removes on/off text for label only * addresses PR feedback * updates label font-weight * removes dead code * updates styles * adds required styles for switch * Update change/@fluentui-web-components-a74d6518-0d94-4e22-bd9f-70ea63a066ab.json Co-authored-by: Miroslav Stastny <[email protected]> * removes unuses import * api report * removes dead code * updates styles and story * optimizes styles * reverts api report * removes unchecked checked message styles * updates labelPosition type to include undefined * updates helper import * optimizes css * cleans up styles * optimizes styles * uses design tokens * removes dead import * removes dead code * removes required styling from label * adds switch readme * fixes docs * fixes switch hover styles * formats switch styles * alphabetizes exports --------- Co-authored-by: Miroslav Stastny <[email protected]>
π Description
Adds the Switch web component.
π©βπ» Reviewer Notes
β Checklist
General
Component-specific