Skip to content

Commit

Permalink
Merge pull request #69 from etchteam/feature/etch-539-full-template-r…
Browse files Browse the repository at this point in the history
…ecipe

Feature/etch 539 full template recipe
  • Loading branch information
mergify[bot] authored Jun 17, 2024
2 parents f8b6b0b + 8f9451d commit e21927a
Show file tree
Hide file tree
Showing 10 changed files with 1,204 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ const preview: Preview = {
storySort: {
order: [
'Docs',
'Showroom',
'Composition',
'Canvas',
'Content',
'Controls',
'Recipes',
],
},
},
Expand Down
3 changes: 2 additions & 1 deletion components/composition/FormGroup/FormGroup.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
diamond-form-group {
align-items: baseline;
display: grid;
gap: var(--diamond-spacing-sm);

label {
label:not(diamond-radio-checkbox label) {
/* Negate the extra label height to account for the form group gap */
margin-block: calc(
(var(--diamond-label-height) / var(--diamond-font-line-height) / 4) * -1
Expand Down
1 change: 1 addition & 0 deletions components/content/List/List.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
diamond-list {
--diamond-list-spacing: 0;
display: block;

li,
dl > div {
Expand Down
1 change: 1 addition & 0 deletions components/control/Button/Button.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ diamond-button {
--_padding-block: var(--diamond-button-padding-block);
--_padding-inline: var(--diamond-button-padding-inline);
--_line-height: var(--diamond-button-line-height);
--diamond-icon-baseline-adjust: 0.1em;
display: inline-block;

/* Structural button styles */
Expand Down
2 changes: 2 additions & 0 deletions components/control/Input/Input.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
diamond-input {
--_background: var(--diamond-input-background);
--_border-color: var(--diamond-input-border-color);
--diamond-icon-baseline-adjust: 0.1em;

align-items: center;
background: var(--_background);
border: var(--diamond-input-border-width) solid var(--_border-color);
border-radius: var(--diamond-input-border-radius);
Expand Down
12 changes: 7 additions & 5 deletions components/control/RadioCheckbox/RadioCheckbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ diamond-radio-checkbox {
--_border-color: var(--diamond-input-border-color);
--_border-radius: var(--diamond-input-checkbox-border-radius);
--_inner-border-radius: 0;
--_indicator-padding: 0;
--_indicator-padding: var(--diamond-input-radio-checkbox-padding);
--_indicator-width: calc(var(--diamond-font-line-height) * 1em);
--_indicator-inner-width: 100%;

align-items: center;
color: inherit;
cursor: pointer;
display: flex;
font-size: inherit;
font-weight: inherit;
gap: var(--diamond-spacing-sm);
line-height: inherit;
min-height: var(--diamond-spacing-thumb);

&:hover,
&:focus-within {
Expand Down Expand Up @@ -60,9 +62,10 @@ diamond-radio-checkbox {
&::part(fallback-icon) {
display: block;
height: auto;
margin: calc(var(--_indicator-padding) * -1);
opacity: 0;
position: relative;
transform: scale(0.9);
transform: scale(1.45);
transition:
transform var(--diamond-transition),
opacity var(--diamond-transition);
Expand Down Expand Up @@ -108,11 +111,10 @@ diamond-radio-checkbox {
&:has(input[type='radio']) {
--_border-radius: 50%;
--_inner-border-radius: 50%;
--_indicator-padding: var(--diamond-input-radio-checkbox-padding);
--_indicator-inner-width: calc(100% - (var(--_indicator-padding) * 2));

&::part(fallback-icon) {
display: none;
visibility: hidden; /* Display none messes up alignment in horizontal forms */
}
}

Expand All @@ -128,7 +130,7 @@ diamond-radio-checkbox {
img,
&::part(fallback-icon) {
opacity: 1;
transform: scale(1);
transform: scale(1.6);
transition-delay: calc(var(--diamond-transition-duration) / 2);
}
}
Expand Down
Loading

0 comments on commit e21927a

Please sign in to comment.