Skip to content

Commit

Permalink
Merge branch 'master' into users/jokreitl/fix-storybook-svg-types
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt authored Jun 7, 2023
2 parents e769050 + 2b09441 commit 6c70cd2
Show file tree
Hide file tree
Showing 115 changed files with 758 additions and 701 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/adaptive-ui",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-animation",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-colors",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "fixes a bug where ChildrenDirective could not be used multiple times for the same element",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-element",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "remove keyboard ability to change value for readonly state in fast-number-field",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "open picker menu on delete",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "set activeid when setting active tab",
"packageName": "@microsoft/fast-foundation",
"email": "[email protected]",
"dependentChangeType": "prerelease"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-react-wrapper",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-router",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-ssr",
"email": "[email protected]",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update prettier and eslint-config-prettier versions",
"packageName": "@microsoft/fast-web-utilities",
"email": "[email protected]",
"dependentChangeType": "none"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"lerna": "^5.5.2",
"lint-staged": "^10.1.2",
"markdown-it": "^12.3.2",
"prettier": "2.0.2",
"prettier": "2.8.8",
"rimraf": "^3.0.2",
"ts-jest": "^25.4.0",
"ts-node": "^8.8.2",
Expand Down
52 changes: 24 additions & 28 deletions packages/tooling/adaptive-ui-explorer/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,22 +270,20 @@ export class App extends FASTElement implements AppAttributes {

this.backgrounds = this.showOnlyLayerBackgrounds
? layers
: this.neutralColors.map(
(color: string, index: number): SwatchInfo => {
const neutralLayerIndex: number = layers.findIndex(
(config: SwatchInfo): boolean => config.color === color
);

return {
index,
color,
title:
neutralLayerIndex !== -1
? layers[neutralLayerIndex].title
: undefined,
};
}
);
: this.neutralColors.map((color: string, index: number): SwatchInfo => {
const neutralLayerIndex: number = layers.findIndex(
(config: SwatchInfo): boolean => config.color === color
);

return {
index,
color,
title:
neutralLayerIndex !== -1
? layers[neutralLayerIndex].title
: undefined,
};
});
}

private layerTokens: Array<[DesignToken<Swatch>, string]> = [
Expand All @@ -301,18 +299,16 @@ export class App extends FASTElement implements AppAttributes {
layerFillBaseLuminance.setValueFor(this.designSystemElement, luminance);

return this.layerTokens
.map(
(conf: [DesignToken<Swatch>, string]): SwatchInfo => {
const color = conf[0]
.getValueFor(this.designSystemElement)
.toColorString();
return {
index: this.neutralColors.indexOf(color),
color: color,
title: conf[1],
};
}
)
.map((conf: [DesignToken<Swatch>, string]): SwatchInfo => {
const color = conf[0]
.getValueFor(this.designSystemElement)
.toColorString();
return {
index: this.neutralColors.indexOf(color),
color: color,
title: conf[1],
};
})
.reduce((accumulated: SwatchInfo[], value: SwatchInfo): Array<SwatchInfo> => {
const colorIndex: number = accumulated.findIndex(
(config: SwatchInfo): boolean => config.color === value.color
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,7 @@ const template = html<ColorBlock>`
)}
</p>
<div class="content">
${x => x.componentTypeTemplate()}
</div>
<div class="content">${x => x.componentTypeTemplate()}</div>
`;

const styles = css`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ export class LayerBackground extends FASTElement {
}
}

export function layerBackgroundTemplate<T extends LayerBackground>(): ElementViewTemplate<
T
> {
export function layerBackgroundTemplate<
T extends LayerBackground
>(): ElementViewTemplate<T> {
return html<T>`
<slot></slot>
`;
Expand Down
4 changes: 2 additions & 2 deletions packages/tooling/fast-figma-plugin-msft/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^10.2.4",
"css-loader": "^6.7.1",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^8.8.0",
"html-webpack-inline-source-plugin": "^1.0.0-beta.2",
"prettier": "2.0.2",
"prettier": "2.8.8",
"resolve-typescript-plugin": "^1.2.0",
"raw-loader": "^4.0.2",
"style-loader": "^3.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/adaptive-ui/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ export const PaletteDirectionValue: Readonly<{
}>;

// @public
export type PaletteDirectionValue = typeof PaletteDirectionValue[keyof typeof PaletteDirectionValue];
export type PaletteDirectionValue = (typeof PaletteDirectionValue)[keyof typeof PaletteDirectionValue];

// @public
export class PaletteRGB extends BasePalette<SwatchRGB> {
Expand Down
4 changes: 2 additions & 2 deletions packages/utilities/adaptive-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"chai": "^4.2.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^8.8.0",
"mocha": "^7.1.2",
"prettier": "2.0.2",
"prettier": "2.8.8",
"typescript": "^4.7.0"
}
}
3 changes: 2 additions & 1 deletion packages/utilities/adaptive-ui/src/color/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export const PaletteDirectionValue = Object.freeze({
*
* @public
*/
export type PaletteDirectionValue = typeof PaletteDirectionValue[keyof typeof PaletteDirectionValue];
export type PaletteDirectionValue =
(typeof PaletteDirectionValue)[keyof typeof PaletteDirectionValue];

// I know we like to avoid enums so I tried to make it an object, but I'm not sure how to make this work with the type and function below.
// export const PaletteDirectionValue = {
Expand Down
17 changes: 6 additions & 11 deletions packages/utilities/adaptive-ui/src/design-tokens/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ export const fillColor = create<Swatch>("fill-color").withDefault(
);

/** @public */
export const neutralAsOverlay = createNonCss<boolean>("neutral-as-overlay").withDefault(
false
);
export const neutralAsOverlay =
createNonCss<boolean>("neutral-as-overlay").withDefault(false);

// Accent Fill

Expand Down Expand Up @@ -953,10 +952,8 @@ export const focusStrokeOuterRecipe = createNonCss<ColorRecipe>(
});

/** @public */
export const focusStrokeOuter = create<Swatch>(
"focus-stroke-outer"
).withDefault((resolve: DesignTokenResolver) =>
resolve(focusStrokeOuterRecipe).evaluate(resolve)
export const focusStrokeOuter = create<Swatch>("focus-stroke-outer").withDefault(
(resolve: DesignTokenResolver) => resolve(focusStrokeOuterRecipe).evaluate(resolve)
);

// Focus Stroke Inner
Expand All @@ -974,8 +971,6 @@ export const focusStrokeInnerRecipe = createNonCss<ColorRecipe>(
});

/** @public */
export const focusStrokeInner = create<Swatch>(
"focus-stroke-inner"
).withDefault((resolve: DesignTokenResolver) =>
resolve(focusStrokeInnerRecipe).evaluate(resolve)
export const focusStrokeInner = create<Swatch>("focus-stroke-inner").withDefault(
(resolve: DesignTokenResolver) => resolve(focusStrokeInnerRecipe).evaluate(resolve)
);
42 changes: 18 additions & 24 deletions packages/utilities/adaptive-ui/src/design-tokens/elevation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,27 @@ export const elevationCardFocusSize = createNonCss<number>(
).withDefault(4);

/** @public */
export const elevationCardRest = create<string>(
"elevation-card-rest"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardRestSize))
export const elevationCardRest = create<string>("elevation-card-rest").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardRestSize))
);

/** @public */
export const elevationCardHover = create<string>(
"elevation-card-hover"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardHoverSize))
export const elevationCardHover = create<string>("elevation-card-hover").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardHoverSize))
);

/** @public */
export const elevationCardActive = create<string>(
"elevation-card-active"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardActiveSize))
export const elevationCardActive = create<string>("elevation-card-active").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardActiveSize))
);

/** @public */
export const elevationCardFocus = create<string>(
"elevation-card-focus"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardFocusSize))
export const elevationCardFocus = create<string>("elevation-card-focus").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationCardFocusSize))
);

/** @public */
Expand All @@ -77,10 +73,9 @@ export const elevationTooltipSize = createNonCss<number>(
).withDefault(16);

/** @public */
export const elevationTooltip = create<string>(
"elevation-tooltip"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationTooltipSize))
export const elevationTooltip = create<string>("elevation-tooltip").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationTooltipSize))
);

/** @public */
Expand All @@ -89,10 +84,9 @@ export const elevationFlyoutSize = createNonCss<number>(
).withDefault(32);

/** @public */
export const elevationFlyout = create<string>(
"elevation-flyout"
).withDefault((resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationFlyoutSize))
export const elevationFlyout = create<string>("elevation-flyout").withDefault(
(resolve: DesignTokenResolver) =>
resolve(elevationRecipe).evaluate(resolve, resolve(elevationFlyoutSize))
);

/** @public */
Expand Down
Loading

0 comments on commit 6c70cd2

Please sign in to comment.