@placeholderco/placeholder-ui 2.1.1 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.css +0 -10
- package/dist/editors/CodeMirror.svelte +295 -297
- package/dist/editors/tiptap/LinkActionMenu.svelte +6 -1
- package/dist/editors/tiptap/TipTap.svelte +1 -1
- package/dist/editors/tiptap/extensions/Alert.js +17 -17
- package/dist/editors/tiptap/extensions/Div.js +19 -19
- package/dist/editors/tiptap/extensions/Span.js +14 -14
- package/dist/editors/tiptap/toolbar/AlertButton.svelte +254 -253
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/BoldButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/CodeButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/ColorButton.svelte +265 -265
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte +51 -51
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte +21 -21
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte +48 -52
- package/dist/editors/tiptap/toolbar/ImageButton.svelte +35 -39
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/LinkButton.svelte +249 -249
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/RedoButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/TableButton.svelte +231 -224
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +59 -65
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +11 -11
- package/dist/editors/tiptap/toolbar/UndoButton.svelte +11 -11
- package/dist/form/Autocomplete.svelte +24 -22
- package/dist/form/AutocompleteMulti.svelte +24 -22
- package/dist/form/Checkbox.svelte +4 -4
- package/dist/form/Chips.svelte +15 -7
- package/dist/form/ColorPicker.svelte +5 -20
- package/dist/form/ComboBox.svelte +4 -4
- package/dist/form/ComboBoxItemBuilder.svelte +14 -32
- package/dist/form/ComboBoxMulti.svelte +7 -3
- package/dist/form/CronBuilder.svelte +32 -110
- package/dist/form/DatePicker.svelte +9 -28
- package/dist/form/DateRangePicker.svelte +46 -36
- package/dist/form/DateTimePicker.svelte +11 -30
- package/dist/form/Number.svelte +1 -3
- package/dist/form/RadioGroup.svelte +1 -3
- package/dist/form/Select.svelte +25 -28
- package/dist/form/SelectMulti.svelte +36 -54
- package/dist/form/StringArrayBuilder.svelte +1 -3
- package/dist/form/TextArea.svelte +5 -6
- package/dist/form/Textbox.svelte +10 -4
- package/dist/form/TimePicker.svelte +10 -4
- package/dist/icon/Icon.svelte +8 -4
- package/dist/index.d.ts +147 -146
- package/dist/index.js +78 -77
- package/dist/layout/CustomNavbar.svelte +1 -1
- package/dist/layout/Navbar.svelte +3 -4
- package/dist/layout/Navbar.svelte.d.ts +1 -2
- package/dist/layout/NavbarItemDisplay.svelte +1 -1
- package/dist/layout/NavbarItemView.svelte +3 -1
- package/dist/layout/Sidenav.svelte +1 -1
- package/dist/models/ComboBoxItem.d.ts +4 -4
- package/dist/models/NotifyModel.js +0 -1
- package/dist/theme.svelte.d.ts +1 -1
- package/dist/theme.svelte.js +46 -22
- package/dist/ui/Accordion.svelte +1 -3
- package/dist/ui/AccordionItem.svelte +8 -16
- package/dist/ui/Badge.svelte +11 -19
- package/dist/ui/Button.svelte +15 -17
- package/dist/ui/ButtonVariant.d.ts +1 -7
- package/dist/ui/ContextMenu.svelte +5 -11
- package/dist/ui/Dialog.svelte +74 -30
- package/dist/ui/Dialog.svelte.d.ts +8 -2
- package/dist/ui/Dropdown.svelte +21 -10
- package/dist/ui/MultiSortable.svelte +1 -3
- package/dist/ui/Pagination.svelte +2 -2
- package/dist/ui/Popover.svelte +16 -37
- package/dist/ui/ProgressBar.svelte +4 -10
- package/dist/ui/ProgressBarVariant.d.ts +2 -7
- package/dist/ui/ThemeSwitcher.svelte +2 -1
- package/dist/ui/Tooltip.svelte +1 -37
- package/dist/util/DateFunctions.js +1 -1
- package/dist/util/Floating.d.ts +70 -0
- package/dist/util/Floating.js +321 -0
- package/dist/util/NavigateTo.js +2 -2
- package/dist/util/Transitions.d.ts +1 -1
- package/dist/util/Transitions.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Editor } from '@tiptap/core';
|
|
3
|
+
import ToolbarButton from './ToolbarButton.svelte';
|
|
4
|
+
import { iconList } from '../../../icon/index.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
interface Props {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
let { editor }: Props = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<ToolbarButton
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
icon={iconList}
|
|
15
|
+
title="Bullet List"
|
|
16
|
+
active={editor.isActive('bulletList')}
|
|
17
|
+
onclick={() => editor.chain().focus().toggleBulletList().run()}
|
|
18
18
|
/>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Editor } from '@tiptap/core';
|
|
3
|
+
import ToolbarButton from './ToolbarButton.svelte';
|
|
4
|
+
import { iconCode } from '../../../icon/index.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
interface Props {
|
|
7
|
+
editor: Editor;
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
let { editor }: Props = $props();
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<ToolbarButton
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
icon={iconCode}
|
|
15
|
+
title="Code"
|
|
16
|
+
active={editor.isActive('code')}
|
|
17
|
+
onclick={() => editor.chain().focus().toggleCode().run()}
|
|
18
18
|
/>
|
|
@@ -1,299 +1,299 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { Editor } from '@tiptap/core';
|
|
3
|
+
import ToolbarButton from './ToolbarButton.svelte';
|
|
4
|
+
import { iconPalette } from '../../../icon/index.js';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export interface ColorSwatch {
|
|
7
|
+
/** CSS colour value applied to the text */
|
|
8
|
+
value: string;
|
|
9
|
+
/** Accessible label / tooltip */
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
interface Props {
|
|
14
|
+
editor: Editor;
|
|
15
|
+
/**
|
|
16
|
+
* Swatches shown under "Brand Colors". Defaults to the library's `--ui-*`
|
|
17
|
+
* tokens, so they follow whatever theme is applied.
|
|
18
|
+
*/
|
|
19
|
+
brandColors?: ColorSwatch[];
|
|
20
|
+
}
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
/** Default brand swatches, resolved from the theme tokens at click time. */
|
|
23
|
+
export const defaultBrandColors: ColorSwatch[] = [
|
|
24
|
+
{ value: 'var(--ui-primary)', label: 'Primary' },
|
|
25
|
+
{ value: 'var(--ui-accent)', label: 'Accent' },
|
|
26
|
+
{ value: 'var(--ui-accent-dark)', label: 'Accent Dark' },
|
|
27
|
+
{ value: 'var(--ui-tertiary)', label: 'Tertiary' },
|
|
28
|
+
{ value: 'var(--ui-tertiary-dark)', label: 'Tertiary Dark' }
|
|
29
|
+
];
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
let { editor, brandColors = defaultBrandColors }: Props = $props();
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
33
|
+
/** Resolve `var(--x)` to a concrete colour so the stored HTML is portable. */
|
|
34
|
+
const resolveColor = (color: string) => {
|
|
35
|
+
const match = color.match(/^var\((--[^,)]+)/);
|
|
36
|
+
if (!match || typeof document === 'undefined') return color;
|
|
37
|
+
const resolved = getComputedStyle(document.documentElement).getPropertyValue(match[1]).trim();
|
|
38
|
+
if (!resolved) return color;
|
|
39
|
+
// Tokens such as `--ui-primary` are themselves `rgb(var(--ui-primary-rgb))`
|
|
40
|
+
const nested = resolved.match(/^rgb\(var\((--[^)]+)\)\)$/);
|
|
41
|
+
if (nested) {
|
|
42
|
+
const triplet = getComputedStyle(document.documentElement).getPropertyValue(nested[1]).trim();
|
|
43
|
+
return triplet ? `rgb(${triplet})` : color;
|
|
44
|
+
}
|
|
45
|
+
return resolved;
|
|
46
|
+
};
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
let showColorPicker = $state(false);
|
|
49
|
+
let colorPickerElement: HTMLDivElement | undefined = $state();
|
|
50
|
+
let selectedColor = $state('#000000');
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
const toggleColorPicker = () => {
|
|
53
|
+
const currentColor = editor.getAttributes('textStyle')?.color;
|
|
54
|
+
if (currentColor) {
|
|
55
|
+
selectedColor = currentColor;
|
|
56
|
+
}
|
|
57
|
+
showColorPicker = !showColorPicker;
|
|
58
|
+
};
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
const applyColor = (color: string) => {
|
|
61
|
+
const resolved = resolveColor(color);
|
|
62
|
+
editor.chain().focus().setColor(resolved).run();
|
|
63
|
+
selectedColor = resolved;
|
|
64
|
+
};
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
const removeColor = () => {
|
|
67
|
+
editor.chain().focus().unsetColor().run();
|
|
68
|
+
showColorPicker = false;
|
|
69
|
+
};
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<div style="position: relative; display: inline-block;">
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
<ToolbarButton
|
|
74
|
+
icon={iconPalette}
|
|
75
|
+
title="Text Color"
|
|
76
|
+
active={showColorPicker}
|
|
77
|
+
onclick={toggleColorPicker}
|
|
78
|
+
/>
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
80
|
+
{#if showColorPicker}
|
|
81
|
+
<div class="color-picker-dropdown" bind:this={colorPickerElement}>
|
|
82
|
+
<!-- Brand Colors Section -->
|
|
83
|
+
<div class="color-section-title">Brand Colors</div>
|
|
84
|
+
<div class="color-preset-grid">
|
|
85
|
+
{#each brandColors as swatch}
|
|
86
|
+
<button
|
|
87
|
+
class="color-preset"
|
|
88
|
+
style="background: {swatch.value}"
|
|
89
|
+
onclick={() => applyColor(swatch.value)}
|
|
90
|
+
title={swatch.label}
|
|
91
|
+
aria-label={swatch.label}
|
|
92
|
+
></button>
|
|
93
|
+
{/each}
|
|
94
|
+
</div>
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
96
|
+
<!-- Common Colors Section -->
|
|
97
|
+
<div class="color-section-title">Common Colors</div>
|
|
98
|
+
<div class="color-preset-grid">
|
|
99
|
+
<button
|
|
100
|
+
class="color-preset"
|
|
101
|
+
style="background: #000000"
|
|
102
|
+
onclick={() => applyColor('#000000')}
|
|
103
|
+
title="Black"
|
|
104
|
+
aria-label="Black"
|
|
105
|
+
></button>
|
|
106
|
+
<button
|
|
107
|
+
class="color-preset"
|
|
108
|
+
style="background: #495057"
|
|
109
|
+
onclick={() => applyColor('#495057')}
|
|
110
|
+
title="Gray"
|
|
111
|
+
aria-label="Gray"
|
|
112
|
+
></button>
|
|
113
|
+
<button
|
|
114
|
+
class="color-preset"
|
|
115
|
+
style="background: #fa5252"
|
|
116
|
+
onclick={() => applyColor('#fa5252')}
|
|
117
|
+
title="Red"
|
|
118
|
+
aria-label="Red"
|
|
119
|
+
></button>
|
|
120
|
+
<button
|
|
121
|
+
class="color-preset"
|
|
122
|
+
style="background: #ff922b"
|
|
123
|
+
onclick={() => applyColor('#ff922b')}
|
|
124
|
+
title="Orange"
|
|
125
|
+
aria-label="Orange"
|
|
126
|
+
></button>
|
|
127
|
+
<button
|
|
128
|
+
class="color-preset"
|
|
129
|
+
style="background: #fcc419"
|
|
130
|
+
onclick={() => applyColor('#fcc419')}
|
|
131
|
+
title="Yellow"
|
|
132
|
+
aria-label="Yellow"
|
|
133
|
+
></button>
|
|
134
|
+
<button
|
|
135
|
+
class="color-preset"
|
|
136
|
+
style="background: #51cf66"
|
|
137
|
+
onclick={() => applyColor('#51cf66')}
|
|
138
|
+
title="Green"
|
|
139
|
+
aria-label="Green"
|
|
140
|
+
></button>
|
|
141
|
+
<button
|
|
142
|
+
class="color-preset"
|
|
143
|
+
style="background: #22b8cf"
|
|
144
|
+
onclick={() => applyColor('#22b8cf')}
|
|
145
|
+
title="Cyan"
|
|
146
|
+
aria-label="Cyan"
|
|
147
|
+
></button>
|
|
148
|
+
<button
|
|
149
|
+
class="color-preset"
|
|
150
|
+
style="background: #228be6"
|
|
151
|
+
onclick={() => applyColor('#228be6')}
|
|
152
|
+
title="Blue"
|
|
153
|
+
aria-label="Blue"
|
|
154
|
+
></button>
|
|
155
|
+
<button
|
|
156
|
+
class="color-preset"
|
|
157
|
+
style="background: #9775fa"
|
|
158
|
+
onclick={() => applyColor('#9775fa')}
|
|
159
|
+
title="Purple"
|
|
160
|
+
aria-label="Purple"
|
|
161
|
+
></button>
|
|
162
|
+
<button
|
|
163
|
+
class="color-preset"
|
|
164
|
+
style="background: #f06595"
|
|
165
|
+
onclick={() => applyColor('#f06595')}
|
|
166
|
+
title="Pink"
|
|
167
|
+
aria-label="Pink"
|
|
168
|
+
></button>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="color-input-row">
|
|
171
|
+
<input
|
|
172
|
+
type="color"
|
|
173
|
+
bind:value={selectedColor}
|
|
174
|
+
oninput={(e) => applyColor((e.target as HTMLInputElement).value)}
|
|
175
|
+
class="color-input"
|
|
176
|
+
title="Custom Color"
|
|
177
|
+
/>
|
|
178
|
+
<button onclick={removeColor} class="color-remove-button" title="Remove Color">
|
|
179
|
+
Clear
|
|
180
|
+
</button>
|
|
181
|
+
</div>
|
|
182
|
+
</div>
|
|
183
|
+
{/if}
|
|
184
184
|
</div>
|
|
185
185
|
|
|
186
186
|
<style>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
187
|
+
.color-picker-dropdown {
|
|
188
|
+
position: absolute;
|
|
189
|
+
top: 100%;
|
|
190
|
+
left: 0;
|
|
191
|
+
margin-top: 4px;
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: 8px;
|
|
195
|
+
padding: 12px;
|
|
196
|
+
background: var(--paper-body-bg);
|
|
197
|
+
border: 1px solid var(--border-color);
|
|
198
|
+
border-radius: 4px;
|
|
199
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
200
|
+
z-index: 1000;
|
|
201
|
+
min-width: 240px;
|
|
202
|
+
}
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
204
|
+
.color-section-title {
|
|
205
|
+
font-size: 11px;
|
|
206
|
+
font-weight: 600;
|
|
207
|
+
color: var(--text-muted);
|
|
208
|
+
text-transform: uppercase;
|
|
209
|
+
letter-spacing: 0.05em;
|
|
210
|
+
margin-top: 4px;
|
|
211
|
+
margin-bottom: 4px;
|
|
212
|
+
}
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
.color-section-title:first-child {
|
|
215
|
+
margin-top: 0;
|
|
216
|
+
}
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
218
|
+
:global(.dark) .color-picker-dropdown {
|
|
219
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
|
220
|
+
}
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
222
|
+
.color-preset-grid {
|
|
223
|
+
display: grid;
|
|
224
|
+
grid-template-columns: repeat(5, 1fr);
|
|
225
|
+
gap: 8px;
|
|
226
|
+
}
|
|
227
227
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
228
|
+
.color-preset {
|
|
229
|
+
width: 32px;
|
|
230
|
+
height: 32px;
|
|
231
|
+
border: 2px solid var(--border-color);
|
|
232
|
+
border-radius: 4px;
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
transition: all 0.15s ease;
|
|
235
|
+
padding: 0;
|
|
236
|
+
}
|
|
237
237
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
238
|
+
.color-preset:hover {
|
|
239
|
+
border-color: var(--ui-primary);
|
|
240
|
+
transform: scale(1.1);
|
|
241
|
+
}
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
:global(.dark) .color-preset:hover {
|
|
244
|
+
border-color: var(--ui-accent);
|
|
245
|
+
}
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
247
|
+
.color-input-row {
|
|
248
|
+
display: flex;
|
|
249
|
+
gap: 8px;
|
|
250
|
+
align-items: center;
|
|
251
|
+
padding-top: 8px;
|
|
252
|
+
border-top: 1px solid var(--border-color);
|
|
253
|
+
}
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
255
|
+
.color-input {
|
|
256
|
+
flex: 1;
|
|
257
|
+
height: 36px;
|
|
258
|
+
border: 1px solid var(--border-color);
|
|
259
|
+
border-radius: 4px;
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
padding: 2px;
|
|
262
|
+
background: var(--paper-body-bg);
|
|
263
|
+
}
|
|
264
264
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
.color-input::-webkit-color-swatch-wrapper {
|
|
266
|
+
padding: 2px;
|
|
267
|
+
}
|
|
268
268
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
.color-input::-webkit-color-swatch {
|
|
270
|
+
border: none;
|
|
271
|
+
border-radius: 2px;
|
|
272
|
+
}
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
274
|
+
.color-remove-button {
|
|
275
|
+
padding: 6px 12px;
|
|
276
|
+
border: none;
|
|
277
|
+
background: var(--ui-tertiary);
|
|
278
|
+
color: var(--ui-primary);
|
|
279
|
+
border-radius: 4px;
|
|
280
|
+
cursor: pointer;
|
|
281
|
+
font-size: 13px;
|
|
282
|
+
font-weight: 500;
|
|
283
|
+
transition: background 0.15s ease;
|
|
284
|
+
white-space: nowrap;
|
|
285
|
+
}
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
.color-remove-button:hover {
|
|
288
|
+
background: var(--ui-tertiary-dark);
|
|
289
|
+
}
|
|
290
290
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
291
|
+
:global(.dark) .color-remove-button {
|
|
292
|
+
background: var(--ui-accent);
|
|
293
|
+
color: var(--ui-primary);
|
|
294
|
+
}
|
|
295
295
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
:global(.dark) .color-remove-button:hover {
|
|
297
|
+
background: var(--ui-accent-dark);
|
|
298
|
+
}
|
|
299
299
|
</style>
|