Skip to content

Commit

Permalink
Merge branch 'convert-components-to-sdc' into emulsif-246-convert-vid…
Browse files Browse the repository at this point in the history
…eos-to-support-sdc
  • Loading branch information
robherba authored Aug 23, 2024
2 parents 0b06b62 + d4b545e commit 1d81dbd
Show file tree
Hide file tree
Showing 13 changed files with 159 additions and 80 deletions.
18 changes: 18 additions & 0 deletions src/components/audio-player/audio-player.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ball audio file by marini24 under CC 3.0
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Audio Player
group: Components/Media
status: stable
props:
type: object
required:
- audio_content
properties:
audio_content:
type: array
title: Audio player content
description: The content of the audio players.
data:
- '../../media/ball.ogg'
- '../../media/ball.mp3'
6 changes: 4 additions & 2 deletions src/components/audio-player/audio-player.stories.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import template from './audio-player.twig';
import audioData from './audio-player.yml';
import { props } from './audio-player.component.yml';
import figma from '../../../.storybook/configma.json';

const audioData = props.properties.audio_content.data;

export default {
title: 'Components/Media/Audio Player',
};

export const AudioPlayer = () => template(audioData);
export const AudioPlayer = () => template({ audio_content: audioData });

AudioPlayer.parameters = {
design: {
Expand Down
4 changes: 0 additions & 4 deletions src/components/audio-player/audio-player.yml

This file was deleted.

20 changes: 20 additions & 0 deletions src/components/menus/breadcrumbs/breadcrumbs.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Breadcrumbs
group: Components/Menus
status: stable
props:
type: object
required:
- breadcrumb
properties:
breadcrumb:
type: array
title: Breadcrumb items
description: The items of the breadcrumb.
data:
- url: '#'
text: 'Home'
- url: '#'
text: 'Parent Page'
- text: 'Current Page'
6 changes: 0 additions & 6 deletions src/components/menus/breadcrumbs/breadcrumbs.yml

This file was deleted.

21 changes: 21 additions & 0 deletions src/components/menus/inline/inline-menu.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Inline Menu
group: Components/Menus
status: stable
props:
type: object
required:
- inline_menu_items
properties:
inline_menu_items:
type: array
title: Inline menu items
description: The items of the inline menu.
data:
- title: 'Test'
url: '#'
- title: 'Number 2'
url: '#'
- title: 'Item Number 3'
url: '#'
7 changes: 0 additions & 7 deletions src/components/menus/inline/inline-menu.yml

This file was deleted.

53 changes: 53 additions & 0 deletions src/components/menus/main-menu/main-menu.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Main Menu
group: Components/Menus
status: stable
props:
type: object
required:
- menu_items
properties:
menu_items:
type: array
title: Main menu items
description: The items of the main menu.
data:
- title: 'Academics'
url: '#'
below:
- title: 'Menu Item 1 Sub 1'
url: '#'
- title: 'Menu Item 1 Sub 2'
url: '#'
below:
- title: 'Menu Item 1 Sub Sub 1'
url: '#'
- title: 'Menu Item 1 Sub Sub 2'
url: '#'
- title: 'Menu Item 1 Sub 3'
url: '#'
- title: 'Menu Item 1 Sub 4'
url: '#'
- title: 'Admissions'
url: '#'
below:
- title: 'Menu Item 2 Sub 1'
url: '#'
- title: 'Menu Item 2 Sub 2'
url: '#'
- title: 'Menu Item 2 Sub 3'
url: '#'
- title: 'Research'
url: '#'
below:
- title: 'Menu Item 3 Sub 1'
url: '#'
- title: 'Menu Item 3 Sub 2'
url: '#'
- title: 'Menu Item 3 Sub 3'
url: '#'
- title: 'Menu Item 3 Sub 4'
url: '#'
- title: 'About'
url: '#'
39 changes: 0 additions & 39 deletions src/components/menus/main-menu/main-menu.yml

This file was deleted.

23 changes: 15 additions & 8 deletions src/components/menus/menus.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,29 @@ import inlineMenu from './inline/inline-menu.twig';
import mainMenu from './main-menu/main-menu.twig';
import socialMenu from './social-menu/social-menu.twig';

import breadcrumbsData from './breadcrumbs/breadcrumbs.yml';
import inlineMenuData from './inline/inline-menu.yml';
import mainMenuData from './main-menu/main-menu.yml';
import socialMenuData from './social-menu/social-menu.yml';
import breadcrumbsDataProps from './breadcrumbs/breadcrumbs.component.yml';
import inlineMenuDataProps from './inline/inline-menu.component.yml';
import mainMenuDataProps from './main-menu/main-menu.component.yml';
import socialMenuDataProps from './social-menu/social-menu.component.yml';

import './main-menu/main-menu';

const breadcrumbsData = breadcrumbsDataProps.props.properties.breadcrumb.data;
const inlineMenuData =
inlineMenuDataProps.props.properties.inline_menu_items.data;
const mainMenuData = mainMenuDataProps.props.properties.menu_items.data;
const socialMenuData =
socialMenuDataProps.props.properties.social_menu_items.data;

/**
* Storybook Definition.
*/
export default { title: 'Components/Menus' };

export const breadcrumbs = () => breadcrumb(breadcrumbsData);
export const breadcrumbs = () => breadcrumb({ breadcrumb: breadcrumbsData });

export const inline = () => inlineMenu(inlineMenuData);
export const inline = () => inlineMenu({ inline_menu_items: inlineMenuData });

export const main = () => mainMenu(mainMenuData);
export const main = () => mainMenu({ menu_items: mainMenuData });

export const social = () => socialMenu(socialMenuData);
export const social = () => socialMenu({ social_menu_items: socialMenuData });
27 changes: 27 additions & 0 deletions src/components/menus/social-menu/social-menu.component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$schema: https://git.drupalcode.org/project/drupal/-/raw/10.1.x/core/modules/sdc/src/metadata.schema.json

name: Social Menu
group: Components/Menus
status: stable
props:
type: object
required:
- social_menu_items
properties:
social_menu_items:
type: array
title: Social menu items
description: The items of the social menu.
data:
- title: 'Twitter'
url: '#'
icon: 'twitter'
- title: 'Facebook'
url: '#'
icon: 'facebook'
- title: 'Instagram'
url: '#'
icon: 'instagram'
- title: 'LinkedIn'
url: '#'
icon: 'linkedin'
13 changes: 0 additions & 13 deletions src/components/menus/social-menu/social-menu.yml

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/tokens/_tokens.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Fri, 09 Aug 2024 21:46:53 GMT
* Generated on Fri, 16 Aug 2024 00:39:27 GMT
*/

:root {
Expand Down

0 comments on commit 1d81dbd

Please sign in to comment.