Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion packages/calcite-components/.storybook/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ export function storyFilters(): {
excludeStories: RegExp | string[];
} {
return {
excludeStories: process.env.STORYBOOK_SCREENSHOT_TEST_BUILD ? /.*_NoTest$/ : /.*_TestOnly$/
excludeStories: process.env.STORYBOOK_SCREENSHOT_TEST_BUILD ? /.*_NoTest$/ : /.*_TestOnly$/,
};
}
8 changes: 4 additions & 4 deletions packages/calcite-components/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
"@storybook/testing-library",
"@whitespace/storybook-addon-html",
"storybook-addon-themes",
"storybook-rtl-addon"
"storybook-rtl-addon",
],
staticDirs: ["../__docs-temp__"],
stories: ["../src/**/*.stories.@(mdx|ts)"],
Expand All @@ -19,8 +19,8 @@ module.exports = {

// we need to set this up to enable custom Storybook doc components
// https://storybook.js.org/docs/html/writing-docs/docs-page#with-a-custom-component
"@babel/preset-react"
]
"@babel/preset-react",
],
};
}
},
};
2 changes: 1 addition & 1 deletion packages/calcite-components/.storybook/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ addons.register("@whitespace/storybook-addon-html", (api) => {

addons.setConfig({
panelPosition: "right",
theme
theme,
});
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function placeholderImage({
bgColor = "#ddd",
textColor = "rgba(0,0,0,0.5)",
dataUri = true,
charset = "UTF-8"
charset = "UTF-8",
}: SimpleSvgPlaceholderParams): string {
const str = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width} ${height}">
<rect fill="${bgColor}" width="${width}" height="${height}"/>
Expand Down
12 changes: 6 additions & 6 deletions packages/calcite-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const parameters = {
element: "#root",
config: {},
options: {},
manual: false
manual: false,
},
modes,
docs: {
Expand All @@ -44,16 +44,16 @@ export const parameters = {

return null;
},
page: globalDocsPage
page: globalDocsPage,
},
layout: "centered",
options: {
storySort: {
order: ["Overview", "Components", "App Components"]
}
order: ["Overview", "Components", "App Components"],
},
},
chromatic: {
// https://www.chromatic.com/docs/threshold
diffThreshold: Number(process.env.CHROMATIC_DIFF_THRESHOLD) || 0.15
}
diffThreshold: Number(process.env.CHROMATIC_DIFF_THRESHOLD) || 0.15,
},
};
12 changes: 6 additions & 6 deletions packages/calcite-components/.storybook/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ const appearanceOptions: Appearance[] = ["solid", "transparent", "outline"];
export const ATTRIBUTES: CommonAttributes = {
alignment: {
values: alignmentOptions,
defaultValue: alignmentOptions[0]
defaultValue: alignmentOptions[0],
},
appearance: {
values: appearanceOptions,
defaultValue: appearanceOptions[0]
defaultValue: appearanceOptions[0],
},
logicalFlowPosition: {
values: logicalFlowPositionOptions,
defaultValue: logicalFlowPositionOptions[2]
defaultValue: logicalFlowPositionOptions[2],
},
position: {
values: positionOptions,
defaultValue: positionOptions[0]
defaultValue: positionOptions[0],
},
scale: {
values: scaleOptions,
defaultValue: scaleOptions[1]
}
defaultValue: scaleOptions[1],
},
};
2 changes: 1 addition & 1 deletion packages/calcite-components/.storybook/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ export default create({
base: "light",
brandTitle: "Calcite Components",
brandUrl: "./",
brandImage: logo
brandImage: logo,
});
20 changes: 10 additions & 10 deletions packages/calcite-components/.storybook/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
optionsKnob as options,
radios,
select,
text
text,
} from "@storybook/addon-knobs";
import { CSS_UTILITY } from "../src/utils/resources";

Expand All @@ -23,45 +23,45 @@ import React from "react";

const autoValue = {
name: "Auto",
value: colors["blk-200"]
value: colors["blk-200"],
};

const lightValue = {
name: "Light",
value: colors["blk-005"]
value: colors["blk-005"],
};

const darkValue = {
name: "Dark",
value: colors["blk-210"]
value: colors["blk-210"],
};

const list: Mode[] = [
{
name: lightValue.name,
class: CSS_UTILITY.lightMode,
color: lightValue.value
color: lightValue.value,
},
{
name: darkValue.name,
class: CSS_UTILITY.darkMode,
color: darkValue.value
color: darkValue.value,
},
{
name: autoValue.name,
class: CSS_UTILITY.autoMode,
color: autoValue.value
}
color: autoValue.value,
},
];

export const modes = {
default: lightValue.name,
list
list,
};

export const modesDarkDefault = {
default: darkValue.name,
list
list,
};

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/calcite-components/BOILERPLATE_COMPONENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { CSS, TEXT } from "./resources";
@Component({
tag: "calcite-example",
styleUrl: "example.scss",
shadow: true
shadow: true,
})
export class Example {
// --------------------------------------------------------------------------
Expand Down Expand Up @@ -130,11 +130,11 @@ Resources defined in `/src/my-component/resources.ts`.

```ts
export const TEXT = {
myString: "i18n string prop start with 'text'"
myString: "i18n string prop start with 'text'",
};

export const CSS = {
foo: "foo"
foo: "foo",
};
```

Expand Down
2 changes: 1 addition & 1 deletion packages/calcite-components/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ See use restrictions at <http://www.esri.com/legal/pdfs/mla_e204_e300/english>

For additional information, contact: Environmental Systems Research Institute, Inc. Attn: Contracts and Legal Services Department 380 New York Street Redlands, California, USA 92373 USA

email: contracts@esri.com
email: <contracts@esri.com>
Loading