Skip to content

Commit

Permalink
chore: remove deprecated packages, update imports for new packages
Browse files Browse the repository at this point in the history
  • Loading branch information
pfulton committed Apr 9, 2024
1 parent 4376cae commit ef9dc3b
Show file tree
Hide file tree
Showing 20 changed files with 401 additions and 421 deletions.
2 changes: 1 addition & 1 deletion .storybook/deprecated/cyclebutton/cyclebutton.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { default as ActionButtonStories } from "@spectrum-css/actionbutton/stories/actionbutton.stories.js";
import { Template as ActionButton } from "@spectrum-css/actionbutton/stories/template.js";
import { default as IconStories } from "@spectrum-css/icon/stories/icon.stories.js";
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";

import "@spectrum-css/cyclebutton/dist/index-vars.css";
Expand Down
35 changes: 16 additions & 19 deletions .storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,36 @@
"@babel/core": "^7.24.3",
"@chromaui/addon-visual-tests": "^1.0.0",
"@etchteam/storybook-addon-status": "^4.2.4",
"@storybook/addon-a11y": "^8.0.4",
"@storybook/addon-actions": "^8.0.4",
"@storybook/addon-a11y": "^8.0.6",
"@storybook/addon-actions": "^8.0.6",
"@storybook/addon-console": "^3.0.0",
"@storybook/addon-designs": "^8.0.0",
"@storybook/addon-docs": "^8.0.4",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-interactions": "^8.0.4",
"@storybook/addons": "^7.6.17",
"@storybook/api": "^7.6.17",
"@storybook/blocks": "^8.0.4",
"@storybook/client-api": "^7.6.17",
"@storybook/components": "^8.0.4",
"@storybook/core-events": "^8.0.4",
"@storybook/addon-docs": "^8.0.6",
"@storybook/addon-essentials": "^8.0.6",
"@storybook/addon-interactions": "^8.0.6",
"@storybook/blocks": "^8.0.6",
"@storybook/components": "^8.0.6",
"@storybook/core-events": "^8.0.6",
"@storybook/jest": "^0.2.3",
"@storybook/manager-api": "^8.0.4",
"@storybook/preview-api": "^8.0.4",
"@storybook/manager-api": "^8.0.6",
"@storybook/preview-api": "^8.0.6",
"@storybook/testing-library": "^0.2.2",
"@storybook/theming": "^8.0.4",
"@storybook/web-components-webpack5": "^8.0.4",
"@whitespace/storybook-addon-html": "^5.1.6",
"chromatic": "^11.2.0",
"@storybook/theming": "^8.0.6",
"@storybook/web-components-webpack5": "^8.0.6",
"@whitespace/storybook-addon-html": "^6.0.4",
"chromatic": "^11.3.0",
"file-loader": "^6.2.0",
"lit": "^3.1.2",
"lodash-es": "^4.17.21",
"postcss": "^8.4.35",
"postcss-loader": "^8.1.1",
"postcss-pseudo-classes": "^0.4.0",
"prettier": "^2.8.8",
"prettier": "^3.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-syntax-highlighter": "^15.5.0",
"source-map-loader": "^5.0.0",
"storybook": "^8.0.4",
"storybook": "^8.0.6",
"style-loader": "3.3.4",
"webpack": "^5.91.0"
}
Expand Down
2 changes: 1 addition & 1 deletion components/accordion/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { repeat } from "lit/directives/repeat.js";
import { styleMap } from "lit/directives/style-map.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import { Template as Icon } from "@spectrum-css/icon/stories/template.js";

Expand Down
2 changes: 1 addition & 1 deletion components/alertdialog/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
Expand Down
2 changes: 1 addition & 1 deletion components/assetcard/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { when } from "lit/directives/when.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { camelCase } from "lodash-es";

import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
Expand Down
4 changes: 2 additions & 2 deletions components/assetlist/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { when } from "lit/directives/when.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { when } from "lit/directives/when.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
Expand Down
2 changes: 1 addition & 1 deletion components/button/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
Expand Down
2 changes: 1 addition & 1 deletion components/calendar/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { repeat } from "lit/directives/repeat.js";
import { styleMap } from "lit/directives/style-map.js";

import { action } from "@storybook/addon-actions";
import { useArgs, useGlobals } from "@storybook/client-api";
import { useArgs, useGlobals } from "@storybook/preview-api";

import { Template as ActionButton } from "@spectrum-css/actionbutton/stories/template.js";

Expand Down
8 changes: 4 additions & 4 deletions components/card/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { styleMap } from "lit/directives/style-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";
import { when } from "lit/directives/when.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import { Template as ActionButton } from "@spectrum-css/actionbutton/stories/template.js";
import { Template as QuickAction } from "@spectrum-css/quickaction/stories/template.js";
import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
import { Template as Asset } from "@spectrum-css/asset/stories/template.js";
import { Template as Checkbox } from "@spectrum-css/checkbox/stories/template.js";
import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
import { Template as QuickAction } from "@spectrum-css/quickaction/stories/template.js";

import '../index.css';

Check warning on line 15 in components/card/stories/template.js

View workflow job for this annotation

GitHub Actions / Lint / Lint

[eslint] reported by reviewdog 🐶 Strings must use doublequote. Raw Output: {"ruleId":"quotes","severity":1,"message":"Strings must use doublequote.","line":15,"column":8,"nodeType":"Literal","messageId":"wrongQuotes","endLine":15,"endColumn":22,"fix":{"range":[720,734],"text":"\"../index.css\""}}

Expand Down
37 changes: 19 additions & 18 deletions components/checkbox/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { styleMap } from "lit/directives/style-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";
import { when } from "lit/directives/when.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import { Template as Icon } from "@spectrum-css/icon/stories/template.js";

Expand Down Expand Up @@ -35,23 +35,24 @@ export const Template = ({
try {
if (!express) import(/* webpackPrefetch: true */ "../themes/spectrum.css");
else import(/* webpackPrefetch: true */ "../themes/express.css");
} catch (e) {
}
catch (e) {
console.warn(e);
}

let iconSize = "75";
switch (size) {
case "s":
iconSize = "50";
break;
case "l":
iconSize = "100";
break;
case "xl":
iconSize = "200";
break;
default:
iconSize = "75";
case "s":
iconSize = "50";
break;
case "l":
iconSize = "100";
break;
case "xl":
iconSize = "200";
break;
default:
iconSize = "75";
}

return html`
Expand All @@ -61,10 +62,10 @@ export const Template = ({
[`${rootClass}--size${size?.toUpperCase()}`]:
typeof size !== "undefined",
[`${rootClass}--emphasized`]: isEmphasized,
[`is-indeterminate`]: isIndeterminate,
[`is-disabled`]: isDisabled|| isReadOnly,
[`is-invalid`]: isInvalid,
[`is-readOnly`]: isReadOnly,
["is-indeterminate"]: isIndeterminate,
["is-disabled"]: isDisabled|| isReadOnly,
["is-invalid"]: isInvalid,
["is-readOnly"]: isReadOnly,
...customClasses.reduce((a, c) => ({ ...a, [c]: true }), {}),
})}
id=${ifDefined(id)}
Expand Down
2 changes: 1 addition & 1 deletion components/combobox/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Template as PickerButton } from "@spectrum-css/pickerbutton/stories/tem
import { Template as Popover } from "@spectrum-css/popover/stories/template.js";
import { Template as TextField } from "@spectrum-css/textfield/stories/template.js";

import { useArgs, useGlobals } from "@storybook/client-api";
import { useArgs, useGlobals } from "@storybook/preview-api";

import "../index.css";

Expand Down
8 changes: 4 additions & 4 deletions components/datepicker/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { html } from "lit";
import { when } from 'lit-html/directives/when.js';

Check warning on line 2 in components/datepicker/stories/template.js

View workflow job for this annotation

GitHub Actions / Lint / Lint

[eslint] reported by reviewdog 🐶 Strings must use doublequote. Raw Output: {"ruleId":"quotes","severity":1,"message":"Strings must use doublequote.","line":2,"column":22,"nodeType":"Literal","messageId":"wrongQuotes","endLine":2,"endColumn":51,"fix":{"range":[49,78],"text":"\"lit-html/directives/when.js\""}}
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { when } from 'lit-html/directives/when.js';

import { Template as Calendar } from "@spectrum-css/calendar/stories/template.js";
import { Template as TextField } from "@spectrum-css/textfield/stories/template.js";
import { Template as Popover } from "@spectrum-css/popover/stories/template.js";
import { Template as PickerButton } from "@spectrum-css/pickerbutton/stories/template.js";
import { Template as Popover } from "@spectrum-css/popover/stories/template.js";
import { Template as TextField } from "@spectrum-css/textfield/stories/template.js";

import { useArgs, useGlobals } from "@storybook/client-api";
import { useArgs, useGlobals } from "@storybook/preview-api";

import "../index.css";

Expand Down
2 changes: 1 addition & 1 deletion components/dialog/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
Expand Down
2 changes: 1 addition & 1 deletion components/picker/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
Expand Down
2 changes: 1 addition & 1 deletion components/pickerbutton/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import { Template as Icon } from "@spectrum-css/icon/stories/template.js";

Expand Down
2 changes: 1 addition & 1 deletion components/popover/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";
import { when } from "lit/directives/when.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

import "../index.css";

Expand Down
4 changes: 2 additions & 2 deletions components/rating/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { repeat } from "lit/directives/repeat.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { repeat } from "lit/directives/repeat.js";

import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";

// Uncomment if you plan to include an icon
import { Template as Icon } from "@spectrum-css/icon/stories/template.js";
Expand Down
2 changes: 1 addition & 1 deletion components/slider/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
import { styleMap } from "lit/directives/style-map.js";

import { useArgs, useGlobals } from "@storybook/client-api";
import { useArgs, useGlobals } from "@storybook/preview-api";

import { Template as FieldLabel } from "@spectrum-css/fieldlabel/stories/template.js";

Expand Down
2 changes: 1 addition & 1 deletion components/textfield/stories/template.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useArgs } from "@storybook/client-api";
import { useArgs } from "@storybook/preview-api";
import { html } from "lit";
import { classMap } from "lit/directives/class-map.js";
import { ifDefined } from "lit/directives/if-defined.js";
Expand Down
Loading

0 comments on commit ef9dc3b

Please sign in to comment.