Skip to content
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-components] update components to extend foundation element #18187

Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3c76dd5
update accordion to use foundation element
chrisdholt Apr 20, 2021
b39fe2f
update anchor to extend foundation element
chrisdholt Apr 20, 2021
1a8323b
update anchored region to extend foundation element
chrisdholt Apr 20, 2021
093f6a3
correct style exports
chrisdholt Apr 20, 2021
1d1e031
update badge to extend foundation
chrisdholt Apr 20, 2021
3b05f6b
update breadcrumb to extend foundation element
chrisdholt Apr 20, 2021
0882117
update button to extend foundation element
chrisdholt Apr 20, 2021
42b061d
update checkbox to extend foundation element
chrisdholt Apr 20, 2021
7408822
update combobox to extend foundation element
chrisdholt Apr 20, 2021
ac0e8ce
update dialog to extend foundation element
chrisdholt Apr 20, 2021
5fc4bac
update divider styles
chrisdholt Apr 20, 2021
d46ed4d
update flipper to extend foundation element
chrisdholt Apr 20, 2021
7a83214
update horizontal scroll to extend foundation element
chrisdholt Apr 20, 2021
a9cac3b
update listbox to extend foundation element
chrisdholt Apr 20, 2021
4961994
update listbox option to extend foundation element
chrisdholt Apr 20, 2021
3fc2c28
update naming for exported registries
chrisdholt Apr 20, 2021
012ca97
update menu and menu item to extend foundation
chrisdholt Apr 20, 2021
c2574a0
aupdate number field to extend foundation element
chrisdholt Apr 20, 2021
6716593
update progress to extend foundation element
chrisdholt Apr 20, 2021
3f7fe18
update radio, radiogroup and select to extend foundation el
chrisdholt Apr 20, 2021
dad0633
update skeleton to extend foundation element
chrisdholt Apr 20, 2021
1ce3bb5
update slider to extend foundation element
chrisdholt Apr 20, 2021
841c936
update switch to extend foundation component
chrisdholt Apr 20, 2021
59d8b60
correct prefix for export names
chrisdholt Apr 20, 2021
d19b0df
update text area to extend foundation element
chrisdholt Apr 20, 2021
143e8f3
update text field to extend foundation
chrisdholt Apr 21, 2021
f5ffe56
update tooltip to extend foundation element
chrisdholt Apr 21, 2021
25bf211
update tree view to extend foundation element
chrisdholt Apr 21, 2021
29eb86a
update comments v1
chrisdholt Apr 21, 2021
4869d0e
export all custom element definitions
chrisdholt Apr 26, 2021
2d2642b
exportfluent design system and definitions from rollup
chrisdholt Apr 26, 2021
5845f1c
add data grid
chrisdholt Apr 26, 2021
37bd5fa
update fast to fluent in rollup
chrisdholt Apr 26, 2021
abd5ede
add beta package to start updating w/ foundation element
chrisdholt May 14, 2021
adc711d
update stories files
chrisdholt May 14, 2021
153a408
Change files
chrisdholt May 14, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update anchor to extend foundation element
  • Loading branch information
chrisdholt committed Apr 20, 2021
commit b39fe2f5c510beecfcba50bd0c075426c4fc683b
2 changes: 1 addition & 1 deletion packages/web-components/src/anchor/anchor.styles.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import {
} from '../styles/';
import { appearanceBehavior } from '../utilities/behaviors';

export const AnchorStyles = css`
export const anchorStyles = (context, definition) => css`
${BaseButtonStyles}
`.withBehaviors(
appearanceBehavior('accent', AccentButtonStyles),
53 changes: 30 additions & 23 deletions packages/web-components/src/anchor/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { attr, customElement } from '@microsoft/fast-element';
import { Anchor, AnchorTemplate as template } from '@microsoft/fast-foundation';
import { attr } from "@microsoft/fast-element";
import {
Anchor as FoundationAnchor,
anchorTemplate as template,
} from "@microsoft/fast-foundation";
import { ButtonAppearance } from '../button';
import { AnchorStyles as styles } from './anchor.styles';
import { anchorStyles as styles } from './anchor.styles';

/**
* Types of anchor appearance.
@@ -10,26 +13,10 @@ import { AnchorStyles as styles } from './anchor.styles';
export type AnchorAppearance = ButtonAppearance | 'hypertext';

/**
* The Fluent Anchor Element. Implements {@link @microsoft/fast-foundation#Anchor},
* {@link @microsoft/fast-foundation#AnchorTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fluent-anchor\>
*
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
* The Fluent version of Anchor
* @internal
*/
@customElement({
name: 'fluent-anchor',
template,
styles,
shadowOptions: {
delegatesFocus: true,
mode: 'closed',
},
})
export class FluentAnchor extends Anchor {
export class Anchor extends FoundationAnchor {
/**
* The appearance the anchor should have.
*
@@ -77,4 +64,24 @@ export class FluentAnchor extends Anchor {
* Styles for Anchor
* @public
*/
export const AnchorStyles = styles;
export const anchorStyles = styles;

/**
* The FAST Anchor Element. Implements {@link @microsoft/fast-foundation#Anchor},
* {@link @microsoft/fast-foundation#anchorTemplate}
*
*
* @public
* @remarks
* HTML Element: \<fast-anchor\>
*
* {@link https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/delegatesFocus | delegatesFocus}
*/
export const fluentAnchor = Anchor.compose({
baseName: "anchor",
template,
styles,
shadowOptions: {
delegatesFocus: true,
},
});