Skip to content

Commit

Permalink
Merge branch 'main' into fix/button-group-md-breakpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ariellalgilmore authored Aug 11, 2023
2 parents c0f8234 + e6d031e commit cc144ea
Show file tree
Hide file tree
Showing 5 changed files with 234 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import { render } from 'react-dom';
import ArrowRight20 from '@carbon/icons-react/es/arrow--right/20.js';
import DDSLeadspace from '@carbon/ibmdotcom-web-components/es/components-react/leadspace/leadspace';
import DDSLeadspaceHeading from '@carbon/ibmdotcom-web-components/es/components-react/leadspace/leadspace-heading';
import DDSLeadspaceImage from '@carbon/ibmdotcom-web-components/es/components-react/leadspace/leadspace-image';
import DDSButtonGroup from '@carbon/ibmdotcom-web-components/es/components-react/button-group/button-group';
import DDSButtonGroupItem from '@carbon/ibmdotcom-web-components/es/components-react/button-group/button-group-item';
import DDSBackgroundMedia from '@carbon/ibmdotcom-web-components/es/components-react/background-media/background-media';
import DDSImageItem from '@carbon/ibmdotcom-web-components/es/components-react/image/image-item';
import './index.css';

Expand All @@ -32,14 +32,21 @@ const App = () => (
Button 2
</DDSButtonGroupItem>
</DDSButtonGroup>
<DDSLeadspaceImage
<DDSBackgroundMedia
slot="image"
default-src="https://picsum.photos/id/1076/1056/480"
className="bx--image"
alt="Image alt text">
<DDSImageItem media="(min-width: 672px)" srcset="https://picsum.photos/id/1076/672/400"></DDSImageItem>
<DDSImageItem media="(min-width: 0)" srcset="https://picsum.photos/id/1076/320/370"></DDSImageItem>
</DDSLeadspaceImage>
alt="Image alt text"
opacity="100"
>
<DDSImageItem
media="(min-width: 672px)"
srcset="https://picsum.photos/id/1076/672/400"
></DDSImageItem>
<DDSImageItem
media="(min-width: 0)"
srcset="https://picsum.photos/id/1076/320/370"
></DDSImageItem>
</DDSBackgroundMedia>
</DDSLeadspace>
);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,56 +1,120 @@
<!--
@license
Copyright IBM Corp. 2020
Copyright IBM Corp. 2020, 2023
This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
-->

<html>
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/grid.css" />
<style type="text/css">
/* Suppress custom element until styles are loaded */
dds-leadspace:not(:defined) {
display: none;
}
</style>
<script type="module" src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/leadspace.min.js"></script>
</head>
<body>
<div class="bx--grid">
<div class="bx--row">
<div class="bx--col-sm-8 bx--col-lg-16">
<dds-leadspace size="medium" alt="Image text" default-src="assets/images/leadspace-sample-1.jpg">
<dds-leadspace-heading>Lead space title</dds-leadspace-heading>
Use this area for a short line of copy to support the title
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8" />
<link
rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"
/>
<link
rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/grid.css"
/>
<style type="text/css">
/* Suppress custom element until styles are loaded */
dds-leadspace:not(:defined) {
display: none;
}
</style>
<script
type="module"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/leadspace.min.js"
></script>
<script
type="module"
src="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/background-media.min.js"
></script>
</head>
<body>
<div class="bx--grid">
<div class="bx--row">
<div class="bx--col-sm-8 bx--col-lg-16">
<dds-leadspace
size="medium"
alt="Image text"
default-src="https://picsum.photos/id/1076/1056/480"
>
<dds-leadspace-heading>Lead space title</dds-leadspace-heading>
Use this area for a short line of copy to support the title

<dds-button-group>
<dds-button-group-item href="https://example.com">
Button 1
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" slot="icon">
<path d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"></path>
</svg>
</dds-button-group-item>
<dds-button-group-item href="https://example.com">
Button 2
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" slot="icon">
<path d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"></path>
</svg>
</dds-button-group-item>
</dds-button-group>
<dds-button-group slot="action">
<dds-button-group-item href="https://example.com">
Button 1
<svg
focusable="false"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
aria-hidden="true"
width="20"
height="20"
viewBox="0 0 20 20"
slot="icon"
>
<path
d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"
></path>
</svg>
</dds-button-group-item>
<dds-button-group-item href="https://example.com">
Button 2
<svg
focusable="false"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
aria-hidden="true"
width="20"
height="20"
viewBox="0 0 20 20"
slot="icon"
>
<path
d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"
></path>
</svg>
</dds-button-group-item>
</dds-button-group>

<dds-leadspace-image slot="image" alt="Image text" default-src="assets/images/leadspace-sample-1.jpg">
<dds-image-item media="(min-width: 672px)" srcset="assets/images/leadspace-sample-1.jpg"></dds-image-item>
<dds-image-item media="(min-width: 0)" srcset="assets/images/leadspace-sample-1.jpg"></dds-image-item>
</dds-leadspace-image>
</dds-leadspace>
<dds-background-media
slot="image"
alt="Image text"
default-src="https://picsum.photos/id/1076/1056/480"
opacity="100"
>
<dds-image-item
media="(min-width: 1312px)"
srcset="https://picsum.photos/id/1076/1056/480"
>
</dds-image-item>
<dds-image-item
media="(min-width: 672px)"
srcset="https://picsum.photos/id/1076/672/400"
>
</dds-image-item>
<dds-image-item
media="(min-width: 320px)"
srcset="https://picsum.photos/id/1076/672/400"
>
</dds-image-item>
<dds-image-item
media="(min-width: 0px)"
srcset="https://picsum.photos/id/1076/320/370"
>
</dds-image-item>
</dds-background-media>
</dds-leadspace>
</div>
</div>
</div>
</div>
</div>
</body>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
@license
Copyright IBM Corp. 2020
Copyright IBM Corp. 2020, 2023
This source code is licensed under the Apache-2.0 license found in the
LICENSE file in the root directory of this source tree.
Expand All @@ -11,7 +11,10 @@
<head>
<title>@carbon/ibmdotcom-web-components example</title>
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css" />
<link
rel="stylesheet"
href="https://1.www.s81c.com/common/carbon-for-ibm-dotcom/tag/v1/latest/plex.css"
/>
<style type="text/css">
/* Suppress custom element until styles are loaded */
dds-leadspace:not(:defined) {
Expand All @@ -24,29 +27,80 @@
<div class="bx--grid">
<div class="bx--row">
<div class="bx--col-sm-8 bx--col-lg-16">
<dds-leadspace size="medium" alt="Image text" default-src="https://picsum.photos/id/1076/1056/480">
<dds-leadspace
size="medium"
alt="Image text"
default-src="https://picsum.photos/id/1076/1056/480"
>
<dds-leadspace-heading>Lead space title</dds-leadspace-heading>
Use this area for a short line of copy to support the title

<dds-button-group>
<dds-button-group slot="action">
<dds-button-group-item href="https://example.com">
Button 1
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" slot="icon">
<path d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"></path>
<svg
focusable="false"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
aria-hidden="true"
width="20"
height="20"
viewBox="0 0 20 20"
slot="icon"
>
<path
d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"
></path>
</svg>
</dds-button-group-item>
<dds-button-group-item href="https://example.com">
Button 2
<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-hidden="true" width="20" height="20" viewBox="0 0 20 20" slot="icon">
<path d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"></path>
<svg
focusable="false"
preserveAspectRatio="xMidYMid meet"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
aria-hidden="true"
width="20"
height="20"
viewBox="0 0 20 20"
slot="icon"
>
<path
d="M11.8 2.8L10.8 3.8 16.2 9.3 1 9.3 1 10.7 16.2 10.7 10.8 16.2 11.8 17.2 19 10z"
></path>
</svg>
</dds-button-group-item>
</dds-button-group>

<dds-leadspace-image slot="image" alt="Image text" default-src="https://picsum.photos/id/1076/1056/480">
<dds-image-item media="(min-width: 672px)" srcset="https://picsum.photos/id/1076/672/400"></dds-image-item>
<dds-image-item media="(min-width: 0)" srcset="https://picsum.photos/id/1076/320/370"></dds-image-item>
</dds-leadspace-image>
<dds-background-media
slot="image"
alt="Image text"
default-src="https://picsum.photos/id/1076/1056/480"
opacity="100"
>
<dds-image-item
media="(min-width: 1312px)"
srcset="https://picsum.photos/id/1076/1056/480"
>
</dds-image-item>
<dds-image-item
media="(min-width: 672px)"
srcset="https://picsum.photos/id/1076/672/400"
>
</dds-image-item>
<dds-image-item
media="(min-width: 320px)"
srcset="https://picsum.photos/id/1076/672/400"
>
</dds-image-item>
<dds-image-item
media="(min-width: 0px)"
srcset="https://picsum.photos/id/1076/320/370"
>
</dds-image-item>
</dds-background-media>
</dds-leadspace>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* @license
*
* Copyright IBM Corp. 2020, 2021
* Copyright IBM Corp. 2020, 2021, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

import '@carbon/ibmdotcom-web-components/es/components/leadspace/index.js';
import '@carbon/ibmdotcom-web-components/es/components/background-media/index.js';
import './index.scss';
Loading

0 comments on commit cc144ea

Please sign in to comment.