Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into redesign-event-cards
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephCurley committed Jan 11, 2022
2 parents 91baf61 + 89e6778 commit 1fd9c51
Show file tree
Hide file tree
Showing 71 changed files with 214 additions and 434 deletions.
20 changes: 18 additions & 2 deletions .storybook/helpers/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
import backgroundOverride from "./backgroundOverride";
import exampleComponent from "./exampleComponent";
import html from "./html";
import idHelper from "./idHelper";
import parentWrapper from "./parentWrapper";
import repeat from "./repeat";
import backgroundOverride from "./backgroundOverride";
import scalingRuleWrapper from "./scalingRuleWrapper";
import srcSet from "./srcSet";

export {
backgroundOverride,
exampleComponent,
idHelper,
html,
parentWrapper,
repeat,
scalingRuleWrapper,
srcSet
};


export { html, repeat, backgroundOverride };
8 changes: 8 additions & 0 deletions .storybook/helpers/srcSet.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default (srcSet) => {
const widths = Object.keys(srcSet.sizes);
return widths
.map((width) => {
return `${srcSet.sizes[width]} ${width},`;
})
.join("\n");
};
6 changes: 5 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ module.exports = {
include: path.resolve(__dirname, "../"),
});

config.resolve ||= {}
config.resolve.alias ||= {}
config.resolve.alias[".storybook"] = path.resolve(__dirname)

// Return the altered config
return config;
},
Expand All @@ -30,7 +34,7 @@ module.exports = {
options: {
// https://storybook.js.org/docs/html/essentials/introduction
actions: false,
backgrounds: true,
backgrounds: false,
controls: true,
docs: false,
toolbars: false,
Expand Down
11 changes: 1 addition & 10 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { addDecorator, addParameters } from "@storybook/html";
import { addDecorator } from "@storybook/html";
import { useEffect } from "@storybook/client-api";
import global from "../src/global/global";
import colorVariables from "../src/base/_colors.scss";
import "./storybook.css";

const marbleGlobalJSDecorator = (storyFn) => {
useEffect(global);
Expand All @@ -22,13 +20,6 @@ export const parameters = {
],
},
},
backgrounds: {
values: [
{ name: "white", value: colorVariables.colorWhite },
{ name: "grey500", value: colorVariables.colorGrey500 },
{ name: "black", value: colorVariables.colorBlack },
],
},
layout: "fullscreen",
options: {
storySort: {
Expand Down
7 changes: 0 additions & 7 deletions .storybook/storybook.css

This file was deleted.

2 changes: 1 addition & 1 deletion dist/marble.css

Large diffs are not rendered by default.

202 changes: 2 additions & 200 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metmuseum/marble",
"version": "0.12.33",
"version": "0.13.3",
"description": "The Design System of The Metropolitan Museum Of Art",
"main": "./src/index.mjs",
"style": "./dist/marble.css",
Expand Down Expand Up @@ -41,7 +41,6 @@
"path": "^0.12.7",
"path-parse": "^1.0.7",
"postcss": "^8.4.4",
"postcss-inline-svg": "^5.0.0",
"raw-loader": "^4.0.2",
"release-it": "^14.11.5",
"sass": "^1.43.3",
Expand Down
6 changes: 4 additions & 2 deletions src/base/_sizes.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//TODO - this is no longer true except on the homepage
@use "sass:math";

$site-width: 1200px;
$grid-gutter: 20px;

Expand Down Expand Up @@ -49,8 +51,8 @@ $spacing-component-vertical: $spacing-l;
$small-screen: 375; //iPhone width.
$large-screen: 1440; //Macbook width.

$base-size: $mobile-size / 16;
$base-size: $mobile-size / 16;
$base-size: math.div($mobile-size, 16);
$base-size: math.div($mobile-size, 16);
$calc: calc(#{$base-size}rem + (#{$desktop-size} - #{$mobile-size}) * ((100vw - #{$small-screen}px) / (#{$large-screen} - #{$small-screen})));
@return $calc;
}
Expand Down
1 change: 1 addition & 0 deletions src/base/_z-index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$z-layers: (
"invisible-link": 999,
"filter-set": 101,
"marble-card--active": 99,
"vimeo-play": 19,
Expand Down
4 changes: 3 additions & 1 deletion src/base/mixins/_typography.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use "sass:math";

@import "../sizes";
@import "../colors";

Expand Down Expand Up @@ -126,7 +128,7 @@ $metserif: "MetSerif", "Georgia", "Times New Roman", Times, serif;
font-style: normal;
font-weight: 600;
letter-spacing: 0.7px;
line-height: (14/18);
line-height: math.div(14, 18);
text-transform: uppercase;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/audio-player/audio-player-story-helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { text } from "@storybook/addon-knobs";
import AudioPlayer from "./audio-player.js";
import greekHall1x1 from "../../../.storybook/assets/images/greek-hall/1x1";
import greekHall1x1 from ".storybook/assets/images/greek-hall/1x1";

const exampleResponse = [{
id: "C0276F7DFD034191B37BB04E9048BB03",
Expand Down
4 changes: 2 additions & 2 deletions src/components/audio-player/audio-player.stories.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import html from "../../../.storybook/helpers/html";
import { html } from ".storybook/helpers";
import { useEffect } from "@storybook/client-api";
import { withKnobs, boolean, select } from "@storybook/addon-knobs";
import { playIcon, pauseIcon, rewindTenSecondsIcon, forwardTenSecondsIcon, upCaretIcon } from "../../../.storybook/assets/svg";
import { playIcon, pauseIcon, rewindTenSecondsIcon, forwardTenSecondsIcon, upCaretIcon } from ".storybook/assets/svg";
import coverImageTemplate from "./cover-image-template";
import { initializeAudioPlayers, track, example } from "./audio-player-story-helpers";

Expand Down
Loading

0 comments on commit 1fd9c51

Please sign in to comment.