Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
004b37e
feat(#31187): suppress warning
Mar 31, 2026
9d90772
feat(#31187): style blocks
Mar 31, 2026
79eb5e4
feat(#31187): style blocks
Mar 31, 2026
38d7d64
feat(#31187): style blocks
Mar 31, 2026
f1d92e7
feat(#31187): remove unused function
Mar 31, 2026
71e7f51
feat(#31187): remove unused import
Mar 31, 2026
084a6b0
feat(#31187): style smart preview
Mar 31, 2026
3196da6
feat(#31188): suppress esbuild warning
Apr 1, 2026
ac23292
feat(#31188): add fallback values and style smart preview
Apr 1, 2026
51cbd86
feat(#31187): fix rounded corners of content block items
Apr 1, 2026
a47893a
feat(#31187): add font size comments and style tooltip
Apr 1, 2026
45e6019
feat(#31187): show tooltip for header block section
Apr 1, 2026
69f2d54
feat(#31187): remove not used color
Apr 1, 2026
88fa573
feat(#31187): move controls button to top to give space for smart mob…
Apr 1, 2026
b64e858
feat(#31189): style block selector
Apr 1, 2026
bfa9798
Merge branch 'feature/v4' into feature/v4-style-blocks
PerplexDaniel Apr 1, 2026
cddb2ff
Apply prettier
PerplexDaniel Apr 1, 2026
8b4489d
feat(#31189): style block selector
Apr 2, 2026
b09aff5
feat(#31189): style block selector
Apr 2, 2026
097fbb0
feat(#31189): fix enclosing tag
Apr 2, 2026
017efd9
feat(#31189): get color of svg
Apr 2, 2026
288096c
feat(#31187): remove animation after dragging
Apr 2, 2026
3e054cf
feat(#31187): make it more responsive
Apr 2, 2026
ede090f
feat(#31189): remove category icon by filters
Apr 2, 2026
9b330bd
feat(#31187): style add content spacing
Apr 2, 2026
689713d
feat(#31189): fix grid by no negative margins
Apr 2, 2026
a3ae02f
feat(#31189): fix items height
Apr 2, 2026
c8d73b6
feat(#31189): fix styling of selector
Apr 2, 2026
50753f6
feat(#31189): fix styling of selector
Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Perplex.ContentBlocks.StaticAssets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"prettier": "prettier --write \"./src/**/*.{js,jsx,mjs,cjs,ts,tsx,json}\""
},
"dependencies": {
"@lit-labs/motion": "^1.0.7",
"@lit/context": "^1.1.6",
"@reduxjs/toolkit": "^2.2.6",
"mutative": "^1.0.5",
Expand Down
2,447 changes: 1,113 additions & 1,334 deletions src/Perplex.ContentBlocks.StaticAssets/pnpm-lock.yaml

Large diffs are not rendered by default.

24 changes: 4 additions & 20 deletions src/Perplex.ContentBlocks.StaticAssets/public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
:host {
flex-direction: column;
justify-content: flex-start;
background: white;
background-color: var(--c-white, #ffffff);
box-shadow: none;
}

:host(:focus-within) {
Expand All @@ -24,13 +25,18 @@ swiper-slide {

.blockDefinition {
width: 100%;
height: 100%;

.blockDefinition__inner {
width: 100%;
display: block;
border-radius: var(--uui-border-radius);
height: 100%;
display: grid;
grid-template-rows: calc(var(--s, 4px) * 71) 1fr max-content;
overflow: hidden;
margin-bottom: 0;
border: 1px solid var(--c-border, #d8d7d9);
border-radius: var(--r-lg, 4px);
background: none;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
Expand Down Expand Up @@ -59,8 +65,12 @@ swiper-slide {
}

.blockDefinition__controls {
display: flex;
align-items: center;
justify-content: center;
height: 2rem;
width: 100%;
padding: calc(var(--s, 4px) * 2) calc(var(--s, 4px) * 4);
border-top: 1px solid var(--c-border, #d8d7d9);
}

.blockDefinition__single {
Expand All @@ -75,41 +85,51 @@ swiper-slide {
}

#portrait {
background-color: var(--uui-color-surface-alt);
background-color: var(--c-white, #ffffff);
display: flex;
justify-content: center;
height: 250px;
padding: calc(var(--s, 4px) * 4);

.portrait__placeholder {
width: 100%;
height: 100%;
padding: calc(var(--s, 4px) * 2);
border: 1px solid var(--c-border, #d8d7d9);
border-radius: calc(var(--r-lg, 4px) * 2);
background-color: var(--uui-color-background, #f3f3f5);
box-sizing: border-box;
}

img {
align-self: center;
display: block;
font-size: var(--uui-size-8);
border-radius: var(--uui-border-radius);
background-color: var(--uui-color-surface-emphasis);
object-fit: contain;
width: 100%;
height: 100%;
object-fit: contain;
border: 1px solid var(--c-border, #d8d7d9);
border-radius: var(--r-lg, 4px);
}
}

#open-part {
text-align: left;
background-color: var(--uui-color-surface);
cursor: pointer;
color: var(--uui-color-interactive);
color: var(--c-black, #333333);
border: none;
border-top: 1px solid var(--uui-color-divider);
border-top: 1px solid var(--c-border, #d8d7d9);
border-radius: 0 0 var(--uui-border-radius) var(--uui-border-radius);
font-family: inherit;
font-size: var(--uui-type-small-size);
box-sizing: border-box;
padding: var(--uui-size-2) var(--uui-size-4);
padding: calc(var(--s, 4px) * 3) calc(var(--s, 4px) * 4);
display: flex;
flex-direction: column;
justify-content: center;
line-height: var(--uui-size-6);

strong {
font-size: var(--uui-size-5);
font-size: var(--fs-sm, 14px);
}

span {
Expand All @@ -119,7 +139,7 @@ swiper-slide {

:host([disabled]) #open-part {
pointer-events: none;
background: var(--uui-color-disabled);
background-color: var(--uui-color-disabled);
color: var(--uui-color-contrast-disabled);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ export class PcbBlockDefinition extends LitElement {
slides-per-view="1"
speed="500"
allow-touch-move="false"
watch-overflow="false"
class="blockDefinition ${this.selected ? 'blockDefinition--selected' : ''}"
navigation="true"
init="false"
pagination="true"
pagination="false"
>
${this.definition.layouts.map(
layout => html`
Expand All @@ -116,12 +117,14 @@ export class PcbBlockDefinition extends LitElement {
?disabled=${this.disabled}
>
<div id="portrait">
<img
src=${layout.previewImage}
alt="Preview image for ${this.definition.name}"
loading="lazy"
decoding="async"
/>
<div class="portrait__placeholder">
<img
src=${layout.previewImage}
alt="Preview image for ${this.definition.name}"
loading="lazy"
decoding="async"
/>
</div>
</div>

<div id="open-part">
Expand All @@ -133,7 +136,9 @@ export class PcbBlockDefinition extends LitElement {
<span>${this.definition.description}</span>
</div>

<div class="blockDefinition__controls"></div>
<div class="blockDefinition__controls">
<strong>${layout.name}</strong>
</div>
</button>
</swiper-slide>
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
.block-head {
border-radius: var(--r-lg);
display: flex;
border: none;
cursor: pointer;
border-bottom: 1px solid rgba(var(--c-submarine), 0);
transition: 250ms border ease;
background-color: var(--c-wild-sand);
background-color: var(--c-white, #ffffff);

&.block-head--disabled {
background-color: var(--c-alabaster, #fafafa);
}

.block-head__controls {
display: flex;
align-items: center;
border-top-right-radius: var(--r-lg, 4px);
border-bottom-right-radius: var(--r-lg, 4px);
border: 1px solid var(--c-border, #d8d7d9);
}

.block-head__control {
border: none;
cursor: pointer;
background-color: transparent;
border-right: 1px solid rgb(var(--c-submarine));
border-right: 1px solid var(--c-border, #d8d7d9);
height: 100%;
padding: 0 calc(var(--s) * 3);

&.block-head__control--disabled {
opacity: 0.3;
cursor: default;
}
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 calc(var(--s, 4px) * 4);

&:last-child {
border-right: none;
}

&:hover:not(.block-head__control--disabled) {
color: var(--uui-color-default-emphasis);
}
}

.block-head__toggle {
Expand All @@ -42,27 +40,35 @@
border: none;
cursor: pointer;
padding: 0;
transition: 250ms border ease;
border: 1px solid var(--c-border, #d8d7d9);
border-top-left-radius: var(--r-lg, 4px);
border-bottom-left-radius: var(--r-lg, 4px);
overflow: hidden;
background-color: transparent;

&.block-head__toggle--disabled {
opacity: 0.3;
}
transition: 250ms border ease;
}

&.block-head--open {
border-radius: var(--r-lg) 0;
border-bottom: 1px solid rgba(var(--c-submarine), 1);
border-radius: var(--r-lg, 4px) 0;
border-bottom: 1px solid var(--c-border, #d8d7d9);
}

.block-head__icon {
padding: calc(var(--s) * 4) calc(var(--s) * 4);
padding: calc(var(--s, 4px) * 4) calc(var(--s, 4px) * 4);
}

.block-head__handle-wrapper {
display: flex;
align-items: center;
justify-content: center;
width: calc(var(--s, 4px) * 9);
border-right: 1px solid var(--c-border, #d8d7d9);
background-color: var(--c-alabaster, #fafafa);
}

.block-head__handle {
display: none;
padding: calc(var(--s) * 4) calc(var(--s) * 2);
color: var(--c-boat);
color: var(--c-silver, #c4c4c4);

@media only screen and (min-width: 1000px) {
display: block;
Expand All @@ -73,14 +79,18 @@
display: flex;
align-items: start;
justify-content: center;
padding: 0 calc(var(--s) * 3);
justify-items: flex-start;
padding-block: calc(var(--s, 4px) * 2);
padding-inline: calc(var(--s, 4px) * 3) calc(var(--s, 4px) * 4);
flex-direction: column;
border-left: 1px solid rgb(var(--c-submarine));
flex: 1 1 0;
min-width: 0;
min-height: calc(var(--s, 4px) * 10);
line-height: 1.5;

div {
font-size: var(--fs-sm);
.block-head--disabled & {
display: grid;
grid-template-columns: 2fr 1fr;
}

strong {
Expand All @@ -89,11 +99,41 @@
width: 100%;
min-width: 0;
text-align: left;
font-size: var(--fs-base);
font-size: var(--fs-sm, 14px);
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

.block-head--disabled & {
text-decoration: line-through;
opacity: 0.5;
}
}

uui-tag {
grid-row: span 2;
justify-self: flex-end;
align-self: center;

svg {
width: calc(var(--s, 4px) * 4);
height: calc(var(--s, 4px) * 4);
vertical-align: middle;
}

span {
margin-left: calc(var(--s, 4px) * 2);
vertical-align: middle;
}
}

div {
font-size: var(--fs-xs, 12px);

.block-head--disabled & {
opacity: 0.5;
}
}
}
}
Loading