Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
42 changes: 41 additions & 1 deletion packages/ui/src/components/CheckBox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,24 @@
bind:checked
on:change|capture={handleValueChanged}
/>
<div class="checkSVG" />
<div class="checkSVG">
<svg
class="printCheckMark"
viewBox={kind === 'todo' ? '0 0 16 16' : '0 0 14 14'}
aria-hidden="true"
focusable="false"
>
{#if kind === 'todo'}
<path
d="M11.6 5.5c.2.2.2.6 0 .8l-4.3 4.3c-.2.2-.6.2-.8 0l-2.1-2c-.2-.2-.6-.2-.8 0-.2-.2-.6-.2-.8 0l1.7 1.7 3.9-3.9c.2-.3.6-.3.8-.1z"
/>
{:else if symbol === 'check'}
<path d="M6 10.2 2.7 7l1-.9L6 8.4l4.5-4.6.9 1z" />
{:else}
<path d="M3 6.4h8v1.2H3z" />
{/if}
</svg>
</div>
</label>

<style lang="scss">
Expand All @@ -79,6 +96,10 @@
.checkSVG {
position: relative;

.printCheckMark {
display: none;
}

&::after {
position: absolute;
inset: 0;
Expand Down Expand Up @@ -238,6 +259,25 @@
}
}

@media print {
.checkSVG {
background-color: transparent !important;
}

.checkSVG::after {
display: none;
}

&.checked .printCheckMark {
display: block;
position: absolute;
inset: 0;
width: 100%;
height: 100%;
fill: currentColor;
}
}

.chBox {
position: absolute;
width: 1px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
<div class="flex-row-center flex-gap-2">
<Component
is={contact.component.EmployeePresenter}
disabled
props={{
value: todo.user,
disabled: true,
avatarSize: 'card',
shouldShowName: false,
shouldShowPlaceholder: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,8 @@
<div class="antiComponent antiEmphasized w-full flex-grow mt-2">
<Component
is={tags.component.TagsEditor}
disabled={loading}
props={{
disabled: loading,
focusIndex: 102,
items: object.skills,
key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,9 +441,9 @@
{:else}
<Component
is={emojiPlugin.component.EmojiPopup}
disabled={readonly}
props={{
selected: Array.isArray(color) ? fromCodePoint(...color) : color ? fromCodePoint(color) : undefined,
disabled: readonly,
kind: 'default'
}}
on:close={(evt) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
width: 20,
height: 20,
marginX: 8,
className: 'tiptap-left-menu',
className: 'tiptap-left-menu no-print',
icon: view.icon.Add,
iconProps: {
className: 'svg-tiny',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function LeftMenu (options: LeftMenuOptions): Plugin {
key: new PluginKey('left-menu'),
view: (view) => {
leftMenuElement = document.createElement('div')
leftMenuElement.classList.add(options.className) // Style externally with CSS
leftMenuElement.className = options.className // Style externally with CSS
leftMenuElement.style.position = 'absolute'
hideLeftMenu()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,17 @@
class:focused
>
{#if todoable}
<div class="flex-center assignee" contenteditable="false">
<div class="flex-center assignee" class:cursor-pointer={!readonly} contenteditable="false">
<Component
is={contact.component.EmployeePresenter}
props={{
value: userId,
disabled: readonly,
avatarSize: 'card',
shouldShowName: false,
shouldShowPlaceholder: true,
shouldShowPlaceholder: !readonly,
onEmployeeEdit: handleAssigneeEdit
}}
disabled={readonly}
/>
</div>
{/if}
Expand All @@ -241,7 +241,6 @@
.assignee {
z-index: 50;
width: 1.25rem;
cursor: pointer;
}
.assignee,
.todo-check {
Expand Down
Loading