Skip to content

Commit

Permalink
Spectrum CSS support for cards. (#107)
Browse files Browse the repository at this point in the history
* Spectrum CSS support for cards.

* Update tests

---------

Co-authored-by: Mariia Lukianets <lukianet@adobe.com>
  • Loading branch information
yesil and 3ch023 authored Dec 11, 2024
1 parent 0e37470 commit 6c61f6b
Show file tree
Hide file tree
Showing 9 changed files with 2,311 additions and 547 deletions.
2,807 changes: 2,267 additions & 540 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,26 @@
},
"dependencies": {
"@adobecom/milo": "github:adobecom/milo#stage",
"@spectrum-css/button": "^13.5.0",
"@spectrum-css/link": "^5.2.0",
"@spectrum-css/page": "^8.2.0",
"@spectrum-css/tokens": "^14.6.0",
"@spectrum-css/typography": "^6.2.0",
"@spectrum-web-components/action-bar": "^0.47.2",
"@spectrum-web-components/action-button": "^0.47.2",
"@spectrum-web-components/action-group": "^0.47.2",
"@spectrum-web-components/action-menu": "^0.47.2",
"@spectrum-web-components/badge": "^0.47.2",
"@spectrum-web-components/breadcrumbs": "^0.47.2",
"@spectrum-web-components/button": "^0.47.2",
"@spectrum-web-components/button-group": "^0.47.2",
"@spectrum-web-components/button": "^0.47.2",
"@spectrum-web-components/checkbox": "^0.47.2",
"@spectrum-web-components/dialog": "^0.47.2",
"@spectrum-web-components/divider": "^0.47.2",
"@spectrum-web-components/help-text": "^0.47.2",
"@spectrum-web-components/icon": "^0.47.2",
"@spectrum-web-components/icons": "^0.47.2",
"@spectrum-web-components/icons-workflow": "^0.47.2",
"@spectrum-web-components/icons": "^0.47.2",
"@spectrum-web-components/link": "^0.47.2",
"@spectrum-web-components/menu": "^0.47.2",
"@spectrum-web-components/number-field": "^0.47.2",
Expand Down
3 changes: 2 additions & 1 deletion studio.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

<!-- OST -->
<script src="studio/ost/index.js"></script>
<link rel="stylesheet" href="studio/libs/spectrum.css" />
<link rel="stylesheet" href="./studio/ost/index.css" />
<link rel="stylesheet" href="./studio/style.css" />
<link rel="stylesheet" href="https://use.typekit.net/hah7vzn.css" />
Expand Down Expand Up @@ -100,7 +101,7 @@
</script>
<script src="https://www.adobe.com/libs/deps/imslib.min.js"></script>
</head>
<body>
<body class="spectrum spectrum--medium spectrum--light">
<main>
<sp-theme color="light" scale="medium">
<script>
Expand Down
6 changes: 6 additions & 0 deletions studio/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,9 @@ await build({
entryPoints: ['src/rte/prosemirror.js'],
outfile: 'libs/prosemirror.js',
});

await build({
...defaults,
entryPoints: ['src/spectrum.css.js'],
outfile: 'libs/spectrum.js',
});
18 changes: 18 additions & 0 deletions studio/libs/spectrum.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions studio/libs/spectrum.js

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

6 changes: 6 additions & 0 deletions studio/src/spectrum.css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import '@spectrum-css/button/dist/index-base.css';
import '@spectrum-css/button/dist/themes/spectrum.css';
import '@spectrum-css/link/dist/index-base.css';
import '@spectrum-css/page/dist/index.css';
import '@spectrum-css/tokens/dist/index.css';
import '@spectrum-css/typography/dist/index.css';
4 changes: 2 additions & 2 deletions studio/test/aem/content-navigation.test.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import '../../src/aem/aem-fragments.js';
import '../../src/aem/table-view.js';
import '../../src/aem/render-view.js';

import { mockFetch } from '@adobecom/milo/libs/features/mas/mocks/fetch.js';
import { withAem } from '@adobecom/milo/libs/features/mas/mocks/aem.js';
import { mockFetch } from '@adobecom/milo/libs/features/mas/test/mocks/fetch.js';
import { withAem } from '@adobecom/milo/libs/features/mas/test/mocks/aem.js';
import { getTemplateContent } from '../utils.js';

const spTheme = document.querySelector('sp-theme');
Expand Down
4 changes: 2 additions & 2 deletions studio/test/rte/rte-field.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import '../../src/rte/rte-field.js';
import '../../src/rte/rte-link-editor.js';
import '@adobecom/milo/libs/deps/mas/mas.js';
import { mockFetch } from '@adobecom/milo/libs/features/mas/mocks/fetch.js';
import { withWcs } from '@adobecom/milo/libs/features/mas/mocks/wcs.js';
import { mockFetch } from '@adobecom/milo/libs/features/mas/test/mocks/fetch.js';
import { withWcs } from '@adobecom/milo/libs/features/mas/test/mocks/wcs.js';

import {
createFromTemplate,
Expand Down

0 comments on commit 6c61f6b

Please sign in to comment.