Skip to content

Commit bf11058

Browse files
authored
Merge pull request #2 from wunderio/main
Lit based components
2 parents e9139ad + 9d62a31 commit bf11058

63 files changed

Lines changed: 2139 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ Fundamental building blocks that cannot be broken down further.
9494
| [Countdown](./components/02-molecules/countdown) | experimental | **SDC + Web Component** - countdown |
9595
| [Stat Card](./components/02-molecules/stat-card) | experimental | **SDC + Web Component** - card with animated number |
9696
| [Toast Messages](./components/02-molecules/toast-messages) | experimental | **SDC + Web Component** - notifications |
97+
| [Attribute List](./components/02-molecules/attribute-list) | stable | **SDC** - definition list |
9798

9899
### Organisms
99-
| Component | Status | Description |
100-
|:-----------------------------------------------|:---------------|:----------------------------------------------------------------------|
101-
| [Header](./components/03-organisms/header) | stable | **SDC** - header component |
102-
| [Drawer](./components/03-organisms/drawer) | experimental | **SDC + Web Component** - container component that functions as both off-canvas sidebars (menus, carts) and centered modal dialogs. |
103-
| [Carousel](./components/03-organisms/carousel) | experimental | **SDC + Web Component** - a lightweight and accessible content slider |
100+
| Component | Status | Description |
101+
|:-----------------------------------------------|:-------------|:------------------------------------------------------------------------------------------------------------------------------------|
102+
| [Header](./components/03-organisms/header) | stable | **SDC** - header component |
103+
| [Drawer](./components/03-organisms/drawer) | experimental | **SDC + Web Component** - container component that functions as both off-canvas sidebars (menus, carts) and centered modal dialogs. |
104+
| [Carousel](./components/03-organisms/carousel) | experimental | **SDC + Web Component** - a lightweight and accessible content slider |
105+
| [Favorite](./components/03-organisms/favorite) | experimental | **SDC + Web Component + Lit** - Save to list (watchlist, favorites, etc.) |
104106

105107
### Utilities
106108
| Component | Status | Description |
@@ -115,3 +117,4 @@ Fundamental building blocks that cannot be broken down further.
115117

116118
* **UI Library / Storybook:** [Setup and Usage Guide](./docs/storybook.md)
117119
* **Drupal / SDC:** [Using Single-Directory Components](https://www.drupal.org/docs/develop/theming-drupal/using-single-directory-components)
120+
* **Lit:** [Setup and Usage Guide](./docs/lit.md)

assets/icons/bookmark.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/icons/heart.svg

Lines changed: 3 additions & 0 deletions
Loading

components/00-base/01-primitives/link-manager/link-manager.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ link-manager {
55

66
.ext-icon {
77
display: inline-flex;
8-
margin-left: 0.35em;
9-
vertical-align: middle;
8+
margin-left: 0.2em;
9+
vertical-align: baseline;
1010
width: var(--ext-link-icon-size, 1em);
1111
height: var(--ext-link-icon-size, 1em);
1212
line-height: 1;

components/00-base/01-primitives/link-manager/link-manager.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ link-manager {
55

66
.ext-icon {
77
display: inline-flex;
8-
margin-left: 0.35em;
9-
vertical-align: middle;
8+
margin-left: 0.2em;
9+
vertical-align: baseline;
1010
width: var(--ext-link-icon-size, 1em);
1111
height: var(--ext-link-icon-size, 1em);
1212
line-height: 1;

components/00-base/03-base/_base.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
}
55

66
body {
7+
font-family: var(--font-family-body-default);
78
font-size: 1rem;
89
line-height: 1.5;
910
color: var(--color-text-primary, #222222);
@@ -42,3 +43,20 @@ h3 {
4243
outline: 2px solid var(--color-semantic-info-60, #2563eb);
4344
outline-offset: 2px;
4445
}
46+
47+
img.branding__logo {
48+
[data-theme="dark"] & {
49+
filter: brightness(0) invert(1);
50+
}
51+
}
52+
53+
// For Storybook
54+
.visually-hidden {
55+
clip: rect(0 0 0 0);
56+
clip-path: inset(50%);
57+
height: 1px;
58+
overflow: hidden;
59+
position: absolute;
60+
white-space: nowrap;
61+
width: 1px;
62+
}

components/01-atoms/badge/badge.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* - content: [string] Badge content.
88
* - type: [string] Badge type (text, indicator).
99
* - position: [string] Badge placement (inline, corner).
10-
* - style: [string] Badge content.
10+
* - style: [string] Badge style.
1111
* - modifier_class: [string] Additional classes.
1212
*/
1313
#}

components/01-atoms/button/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,7 @@ This is the button component.
77

88
This component can be used within Experience Builder and other page builders
99
that support SDC. It can also be added to other components and theme templates.
10+
11+
## Status
12+
13+
Markup is complete. Styles and Storybook documentation are in progress and need to be finalized. Adjust this component to your needs. This component serves as example.

components/01-atoms/button/button.component.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
'$schema': 'https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json'
22

33
name: Button
4-
54
status: stable
6-
75
group: Atoms
86

97
props:
10-
118
type: object
12-
139
properties:
14-
1510
type:
1611
type: string
1712
title: Type
@@ -46,6 +41,8 @@ props:
4641
- chevron-down
4742
- close
4843
- menu
44+
- heart
45+
- bookmark
4946
examples:
5047
- 'right-arrow'
5148

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,49 @@
1+
/**
2+
* @file button.scss
3+
* Styles for buttons
4+
*/
15
.button {
6+
--button-padding: 0.7em 1em;
7+
--button-font-size: var(--font-size-2xs, 0.875rem);
8+
--button-inline-gap: var(--space-sm, 8px);
9+
--button-bg: var(--color-button-primary-background, #186cd5);
10+
--button-color: var(--color-button-primary-color, #ffffff);
11+
--button-disabled-bg: var(--color-button-disabled-background, #94A3B8);
212
display: inline-flex;
3-
padding: var(--space-lg, 16px);
13+
min-width: max-content;
14+
max-width: 100%;
15+
padding: var(--button-padding);
416
align-items: center;
5-
gap: var(--space-sm, 8px);
17+
gap: var(--button-inline-gap);
18+
min-width: max-content;
19+
border: 0;
620
border-radius: var(--radius-xs, 3px);
7-
font-size: var(--font-size-3xs, 12px);
21+
font-size: var(--button-font-size);
822
text-transform: uppercase;
923
}
1024
.button--with-badge {
1125
position: relative;
1226
}
27+
.button__text {
28+
flex-shrink: 1;
29+
text-align: center;
30+
white-space: nowrap;
31+
}
32+
.button .button__icon {
33+
flex-shrink: 0;
34+
display: block;
35+
fill: currentColor;
36+
}
1337
.button--primary {
14-
color: var(--color-buttons-button-primary-color, #ffffff);
15-
background: var(--color-buttons-button-primary-background, #186cd5);
38+
color: var(--button-color);
39+
background: var(--button-bg);
1640
}
1741
.button--primary[disabled] {
18-
background: var(--color-buttons-button-disabled-background, #94A3B8);
42+
background: var(--button-disabled-bg);
43+
}
44+
.button--large {
45+
--button-font-size: var(--font-size-xs, 16px);
46+
}
47+
.button--small {
48+
--button-font-size: var(--font-size-3xs, 12px);
1949
}

0 commit comments

Comments
 (0)