@salmonui/rich-text 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +79 -2
- package/dist/blocks/find.d.ts +4 -0
- package/dist/blocks/find.d.ts.map +1 -0
- package/dist/blocks/find.js +14 -0
- package/dist/blocks/find.js.map +1 -0
- package/dist/blocks/from-html.d.ts +10 -0
- package/dist/blocks/from-html.d.ts.map +1 -0
- package/dist/blocks/from-html.js +459 -0
- package/dist/blocks/from-html.js.map +1 -0
- package/dist/blocks/index.d.ts +5 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +4 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/ops.d.ts +27 -0
- package/dist/blocks/ops.d.ts.map +1 -0
- package/dist/blocks/ops.js +172 -0
- package/dist/blocks/ops.js.map +1 -0
- package/dist/blocks/to-html.d.ts +18 -0
- package/dist/blocks/to-html.d.ts.map +1 -0
- package/dist/blocks/to-html.js +207 -0
- package/dist/blocks/to-html.js.map +1 -0
- package/dist/blocks/types.d.ts +76 -0
- package/dist/blocks/types.d.ts.map +1 -0
- package/dist/blocks/types.js +4 -0
- package/dist/blocks/types.js.map +1 -0
- package/dist/collab.d.ts +43 -0
- package/dist/collab.d.ts.map +1 -0
- package/dist/collab.js +45 -0
- package/dist/collab.js.map +1 -0
- package/dist/content/RichTextContent.d.ts +19 -0
- package/dist/content/RichTextContent.d.ts.map +1 -0
- package/dist/content/RichTextContent.js +20 -0
- package/dist/content/RichTextContent.js.map +1 -0
- package/dist/content/index.d.ts +2 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +3 -0
- package/dist/content/index.js.map +1 -0
- package/dist/engine/commands.d.ts +19 -0
- package/dist/engine/commands.d.ts.map +1 -0
- package/dist/engine/commands.js +457 -0
- package/dist/engine/commands.js.map +1 -0
- package/dist/engine/core.d.ts +113 -0
- package/dist/engine/core.d.ts.map +1 -0
- package/dist/engine/core.js +444 -0
- package/dist/engine/core.js.map +1 -0
- package/dist/engine/dom-shim.d.ts +47 -0
- package/dist/engine/dom-shim.d.ts.map +1 -0
- package/dist/engine/dom-shim.js +128 -0
- package/dist/engine/dom-shim.js.map +1 -0
- package/dist/engine/html-out.d.ts +12 -0
- package/dist/engine/html-out.d.ts.map +1 -0
- package/dist/engine/html-out.js +24 -0
- package/dist/engine/html-out.js.map +1 -0
- package/dist/engine/index.d.ts +6 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +5 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/keymap.d.ts +18 -0
- package/dist/engine/keymap.d.ts.map +1 -0
- package/dist/engine/keymap.js +85 -0
- package/dist/engine/keymap.js.map +1 -0
- package/dist/engine/load.d.ts +10 -0
- package/dist/engine/load.d.ts.map +1 -0
- package/dist/engine/load.js +11 -0
- package/dist/engine/load.js.map +1 -0
- package/dist/engine/nodeviews.d.ts +11 -0
- package/dist/engine/nodeviews.d.ts.map +1 -0
- package/dist/engine/nodeviews.js +236 -0
- package/dist/engine/nodeviews.js.map +1 -0
- package/dist/engine/plugins.d.ts +76 -0
- package/dist/engine/plugins.d.ts.map +1 -0
- package/dist/engine/plugins.js +311 -0
- package/dist/engine/plugins.js.map +1 -0
- package/dist/engine/schema.d.ts +11 -0
- package/dist/engine/schema.d.ts.map +1 -0
- package/dist/engine/schema.js +350 -0
- package/dist/engine/schema.js.map +1 -0
- package/dist/engine/serialize.d.ts +13 -0
- package/dist/engine/serialize.d.ts.map +1 -0
- package/dist/engine/serialize.js +119 -0
- package/dist/engine/serialize.js.map +1 -0
- package/dist/engine/snapshot.d.ts +4 -0
- package/dist/engine/snapshot.d.ts.map +1 -0
- package/dist/engine/snapshot.js +62 -0
- package/dist/engine/snapshot.js.map +1 -0
- package/dist/engine/types.d.ts +215 -0
- package/dist/engine/types.d.ts.map +1 -0
- package/dist/engine/types.js +2 -0
- package/dist/engine/types.js.map +1 -0
- package/dist/html/entities.d.ts +7 -0
- package/dist/html/entities.d.ts.map +1 -0
- package/dist/html/entities.js +69 -0
- package/dist/html/entities.js.map +1 -0
- package/dist/html/index.d.ts +7 -0
- package/dist/html/index.d.ts.map +1 -0
- package/dist/html/index.js +9 -0
- package/dist/html/index.js.map +1 -0
- package/dist/html/parse.d.ts +30 -0
- package/dist/html/parse.d.ts.map +1 -0
- package/dist/html/parse.js +394 -0
- package/dist/html/parse.js.map +1 -0
- package/dist/html/paste.d.ts +47 -0
- package/dist/html/paste.d.ts.map +1 -0
- package/dist/html/paste.js +373 -0
- package/dist/html/paste.js.map +1 -0
- package/dist/html/policy.d.ts +56 -0
- package/dist/html/policy.d.ts.map +1 -0
- package/dist/html/policy.js +245 -0
- package/dist/html/policy.js.map +1 -0
- package/dist/html/sanitize.d.ts +60 -0
- package/dist/html/sanitize.d.ts.map +1 -0
- package/dist/html/sanitize.js +699 -0
- package/dist/html/sanitize.js.map +1 -0
- package/dist/html/serialize.d.ts +16 -0
- package/dist/html/serialize.d.ts.map +1 -0
- package/dist/html/serialize.js +68 -0
- package/dist/html/serialize.js.map +1 -0
- package/dist/html/text.d.ts +18 -0
- package/dist/html/text.d.ts.map +1 -0
- package/dist/html/text.js +96 -0
- package/dist/html/text.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/mention/editable.d.ts +15 -0
- package/dist/mention/editable.d.ts.map +1 -0
- package/dist/mention/editable.js +167 -0
- package/dist/mention/editable.js.map +1 -0
- package/dist/mention/index.d.ts +2 -0
- package/dist/mention/index.d.ts.map +1 -0
- package/dist/mention/index.js +3 -0
- package/dist/mention/index.js.map +1 -0
- package/dist/react/RichTextEditor.d.ts +15 -0
- package/dist/react/RichTextEditor.d.ts.map +1 -0
- package/dist/react/RichTextEditor.js +494 -0
- package/dist/react/RichTextEditor.js.map +1 -0
- package/dist/react/block-editor/BlockEditor.d.ts +5 -0
- package/dist/react/block-editor/BlockEditor.d.ts.map +1 -0
- package/dist/react/block-editor/BlockEditor.js +103 -0
- package/dist/react/block-editor/BlockEditor.js.map +1 -0
- package/dist/react/block-editor/controller.d.ts +91 -0
- package/dist/react/block-editor/controller.d.ts.map +1 -0
- package/dist/react/block-editor/controller.js +757 -0
- package/dist/react/block-editor/controller.js.map +1 -0
- package/dist/react/block-editor/index.d.ts +4 -0
- package/dist/react/block-editor/index.d.ts.map +1 -0
- package/dist/react/block-editor/index.js +5 -0
- package/dist/react/block-editor/index.js.map +1 -0
- package/dist/react/block-editor/locale.d.ts +65 -0
- package/dist/react/block-editor/locale.d.ts.map +1 -0
- package/dist/react/block-editor/locale.js +63 -0
- package/dist/react/block-editor/locale.js.map +1 -0
- package/dist/react/block-editor/transforms.d.ts +26 -0
- package/dist/react/block-editor/transforms.d.ts.map +1 -0
- package/dist/react/block-editor/transforms.js +233 -0
- package/dist/react/block-editor/transforms.js.map +1 -0
- package/dist/react/block-editor/types.d.ts +180 -0
- package/dist/react/block-editor/types.d.ts.map +1 -0
- package/dist/react/block-editor/types.js +2 -0
- package/dist/react/block-editor/types.js.map +1 -0
- package/dist/react/block-editor/ui.d.ts +21 -0
- package/dist/react/block-editor/ui.d.ts.map +1 -0
- package/dist/react/block-editor/ui.js +601 -0
- package/dist/react/block-editor/ui.js.map +1 -0
- package/dist/react/client.d.ts +28 -0
- package/dist/react/client.d.ts.map +1 -0
- package/dist/react/client.js +109 -0
- package/dist/react/client.js.map +1 -0
- package/dist/react/dialogs.d.ts +44 -0
- package/dist/react/dialogs.d.ts.map +1 -0
- package/dist/react/dialogs.js +312 -0
- package/dist/react/dialogs.js.map +1 -0
- package/dist/react/emoji-data.d.ts +3 -0
- package/dist/react/emoji-data.d.ts.map +1 -0
- package/dist/react/emoji-data.js +6 -0
- package/dist/react/emoji-data.js.map +1 -0
- package/dist/react/icons.d.ts +5 -0
- package/dist/react/icons.d.ts.map +1 -0
- package/dist/react/icons.js +69 -0
- package/dist/react/icons.js.map +1 -0
- package/dist/react/index.d.ts +5 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +5 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/items.d.ts +68 -0
- package/dist/react/items.d.ts.map +1 -0
- package/dist/react/items.js +253 -0
- package/dist/react/items.js.map +1 -0
- package/dist/react/locale.d.ts +130 -0
- package/dist/react/locale.d.ts.map +1 -0
- package/dist/react/locale.js +131 -0
- package/dist/react/locale.js.map +1 -0
- package/dist/react/overlay.d.ts +41 -0
- package/dist/react/overlay.d.ts.map +1 -0
- package/dist/react/overlay.js +162 -0
- package/dist/react/overlay.js.map +1 -0
- package/dist/react/store.d.ts +23 -0
- package/dist/react/store.d.ts.map +1 -0
- package/dist/react/store.js +84 -0
- package/dist/react/store.js.map +1 -0
- package/dist/react/types.d.ts +205 -0
- package/dist/react/types.d.ts.map +1 -0
- package/dist/react/types.js +2 -0
- package/dist/react/types.js.map +1 -0
- package/dist/rich-text.css +1555 -0
- package/package.json +61 -4
|
@@ -0,0 +1,1555 @@
|
|
|
1
|
+
@layer salmon.a,salmon.b,salmon.c,salmon.d;
|
|
2
|
+
@layer salmon.a {
|
|
3
|
+
/* @salmonui/buttons/button/styles.css, first part (button-core): Button,
|
|
4
|
+
ToggleButton, ButtonGroup, ToggleButtonGroup without the chip, progress
|
|
5
|
+
and floating extras of styles/button.css. Colors come from --salmon-*
|
|
6
|
+
theme variables only; tone and variant are orthogonal (data-tone x
|
|
7
|
+
data-variant); sizes are three fixed metric sets. Logical properties only. */
|
|
8
|
+
|
|
9
|
+
.salmon-button {
|
|
10
|
+
--salmon-button-c: var(--salmon-surface-sunken);
|
|
11
|
+
--salmon-button-c-hover: var(--salmon-surface-hover);
|
|
12
|
+
--salmon-button-c-active: var(--salmon-border-subtle);
|
|
13
|
+
--salmon-button-c-on: var(--salmon-text-primary);
|
|
14
|
+
--salmon-button-c-edge: var(--salmon-border-default);
|
|
15
|
+
--salmon-button-c-subtle: var(--salmon-surface-hover);
|
|
16
|
+
--salmon-button-c-subtle-hover: var(--salmon-surface-sunken);
|
|
17
|
+
--salmon-button-c-text: var(--salmon-text-primary);
|
|
18
|
+
--salmon-button-c-border: var(--salmon-border-default);
|
|
19
|
+
--salmon-button-c-selected: var(--salmon-surface-selected);
|
|
20
|
+
--salmon-button-c-selected-edge: var(--salmon-border-selected);
|
|
21
|
+
--salmon-button-h: var(--salmon-control-height-md, 32px);
|
|
22
|
+
--salmon-button-pad: var(--salmon-control-padding-md, 12px);
|
|
23
|
+
--salmon-button-bg: var(--salmon-button-c);
|
|
24
|
+
--salmon-button-fg: var(--salmon-button-c-on);
|
|
25
|
+
--salmon-button-bd: var(--salmon-button-c-edge);
|
|
26
|
+
position: relative;
|
|
27
|
+
isolation: isolate;
|
|
28
|
+
display: inline-flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
gap: 6px;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
min-block-size: var(--salmon-button-h);
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding-block: 0;
|
|
36
|
+
padding-inline: var(--salmon-button-pad);
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
border: 1px solid var(--salmon-button-bd);
|
|
39
|
+
border-radius: var(--salmon-radius-md);
|
|
40
|
+
background: var(--salmon-button-bg);
|
|
41
|
+
color: var(--salmon-button-fg);
|
|
42
|
+
font-family: var(--salmon-font-sans);
|
|
43
|
+
font-size: var(--salmon-font-size-md);
|
|
44
|
+
font-weight: var(--salmon-font-weight-medium);
|
|
45
|
+
line-height: var(--salmon-line-height-tight);
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
vertical-align: middle;
|
|
49
|
+
cursor: pointer;
|
|
50
|
+
user-select: none;
|
|
51
|
+
-webkit-tap-highlight-color: transparent;
|
|
52
|
+
transition: background-color var(--salmon-motion-duration-fast) var(--salmon-motion-easing), border-color var(--salmon-motion-duration-fast) var(--salmon-motion-easing), color var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* The class's display would override the native hidden attribute. */
|
|
56
|
+
.salmon-button[hidden] {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.salmon-button[data-tone='primary'],
|
|
61
|
+
.salmon-button[data-tone='success'],
|
|
62
|
+
.salmon-button[data-tone='warning'],
|
|
63
|
+
.salmon-button[data-tone='danger'],
|
|
64
|
+
.salmon-button[data-tone='info'] {
|
|
65
|
+
--salmon-button-c-edge: var(--salmon-button-c);
|
|
66
|
+
--salmon-button-c-selected: var(--salmon-button-c-subtle);
|
|
67
|
+
--salmon-button-c-selected-edge: var(--salmon-button-c);
|
|
68
|
+
}
|
|
69
|
+
.salmon-button[data-tone='primary'] {
|
|
70
|
+
--salmon-button-c: var(--salmon-color-primary);
|
|
71
|
+
--salmon-button-c-hover: var(--salmon-color-primary-hover);
|
|
72
|
+
--salmon-button-c-active: var(--salmon-color-primary-active);
|
|
73
|
+
--salmon-button-c-on: var(--salmon-color-primary-on);
|
|
74
|
+
--salmon-button-c-subtle: var(--salmon-color-primary-subtle);
|
|
75
|
+
--salmon-button-c-subtle-hover: var(--salmon-color-primary-subtle-hover);
|
|
76
|
+
--salmon-button-c-text: var(--salmon-color-primary-text);
|
|
77
|
+
--salmon-button-c-border: var(--salmon-color-primary-border);
|
|
78
|
+
}
|
|
79
|
+
.salmon-button[data-tone='success'] {
|
|
80
|
+
--salmon-button-c: var(--salmon-color-success);
|
|
81
|
+
--salmon-button-c-hover: var(--salmon-color-success-hover);
|
|
82
|
+
--salmon-button-c-active: var(--salmon-color-success-active);
|
|
83
|
+
--salmon-button-c-on: var(--salmon-color-success-on);
|
|
84
|
+
--salmon-button-c-subtle: var(--salmon-color-success-subtle);
|
|
85
|
+
--salmon-button-c-subtle-hover: var(--salmon-color-success-subtle-hover);
|
|
86
|
+
--salmon-button-c-text: var(--salmon-color-success-text);
|
|
87
|
+
--salmon-button-c-border: var(--salmon-color-success-border);
|
|
88
|
+
}
|
|
89
|
+
.salmon-button[data-tone='warning'] {
|
|
90
|
+
--salmon-button-c: var(--salmon-color-warning);
|
|
91
|
+
--salmon-button-c-hover: var(--salmon-color-warning-hover);
|
|
92
|
+
--salmon-button-c-active: var(--salmon-color-warning-active);
|
|
93
|
+
--salmon-button-c-on: var(--salmon-color-warning-on);
|
|
94
|
+
--salmon-button-c-subtle: var(--salmon-color-warning-subtle);
|
|
95
|
+
--salmon-button-c-subtle-hover: var(--salmon-color-warning-subtle-hover);
|
|
96
|
+
--salmon-button-c-text: var(--salmon-color-warning-text);
|
|
97
|
+
--salmon-button-c-border: var(--salmon-color-warning-border);
|
|
98
|
+
}
|
|
99
|
+
.salmon-button[data-tone='danger'] {
|
|
100
|
+
--salmon-button-c: var(--salmon-color-danger);
|
|
101
|
+
--salmon-button-c-hover: var(--salmon-color-danger-hover);
|
|
102
|
+
--salmon-button-c-active: var(--salmon-color-danger-active);
|
|
103
|
+
--salmon-button-c-on: var(--salmon-color-danger-on);
|
|
104
|
+
--salmon-button-c-subtle: var(--salmon-color-danger-subtle);
|
|
105
|
+
--salmon-button-c-subtle-hover: var(--salmon-color-danger-subtle-hover);
|
|
106
|
+
--salmon-button-c-text: var(--salmon-color-danger-text);
|
|
107
|
+
--salmon-button-c-border: var(--salmon-color-danger-border);
|
|
108
|
+
}
|
|
109
|
+
.salmon-button[data-tone='info'] {
|
|
110
|
+
--salmon-button-c: var(--salmon-color-info);
|
|
111
|
+
--salmon-button-c-hover: var(--salmon-color-info-hover);
|
|
112
|
+
--salmon-button-c-active: var(--salmon-color-info-active);
|
|
113
|
+
--salmon-button-c-on: var(--salmon-color-info-on);
|
|
114
|
+
--salmon-button-c-subtle: var(--salmon-color-info-subtle);
|
|
115
|
+
--salmon-button-c-subtle-hover: var(--salmon-color-info-subtle-hover);
|
|
116
|
+
--salmon-button-c-text: var(--salmon-color-info-text);
|
|
117
|
+
--salmon-button-c-border: var(--salmon-color-info-border);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* Sizes: the density control metrics. */
|
|
121
|
+
.salmon-button[data-size='sm'] {
|
|
122
|
+
--salmon-button-h: var(--salmon-control-height-sm, 24px);
|
|
123
|
+
--salmon-button-pad: var(--salmon-control-padding-sm, 8px);
|
|
124
|
+
gap: 4px;
|
|
125
|
+
font-size: var(--salmon-font-size-sm);
|
|
126
|
+
}
|
|
127
|
+
.salmon-button[data-size='lg'] {
|
|
128
|
+
--salmon-button-h: var(--salmon-control-height-lg, 40px);
|
|
129
|
+
--salmon-button-pad: var(--salmon-control-padding-lg, 16px);
|
|
130
|
+
gap: 8px;
|
|
131
|
+
font-size: var(--salmon-font-size-lg);
|
|
132
|
+
}
|
|
133
|
+
.salmon-button[data-icon-only] {
|
|
134
|
+
min-inline-size: var(--salmon-button-h);
|
|
135
|
+
padding-inline: 0;
|
|
136
|
+
}
|
|
137
|
+
/* A glyph in the label is a flex item, not an inline box on the text baseline,
|
|
138
|
+
so it sits on the centre axis. */
|
|
139
|
+
.salmon-button[data-icon-only] > .salmon-button__label {
|
|
140
|
+
display: flex;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* Variants. */
|
|
144
|
+
.salmon-button[data-variant='solid']:hover {
|
|
145
|
+
--salmon-button-bg: var(--salmon-button-c-hover);
|
|
146
|
+
}
|
|
147
|
+
.salmon-button[data-variant='solid']:active {
|
|
148
|
+
--salmon-button-bg: var(--salmon-button-c-active);
|
|
149
|
+
}
|
|
150
|
+
/* A pressed state persists, so it keeps the guaranteed pairs:
|
|
151
|
+
the fill with its on-color, marked by an inset ring
|
|
152
|
+
of that on-color; outline and ghost use the subtle surface with tone text. */
|
|
153
|
+
.salmon-button[data-variant='solid'][data-pressed] {
|
|
154
|
+
--salmon-button-bg: var(--salmon-button-c);
|
|
155
|
+
box-shadow: inset 0 0 0 2px var(--salmon-button-c-on);
|
|
156
|
+
}
|
|
157
|
+
.salmon-button[data-variant='outline'],
|
|
158
|
+
.salmon-button[data-variant='ghost'],
|
|
159
|
+
.salmon-button[data-variant='link'] {
|
|
160
|
+
--salmon-button-bg: transparent;
|
|
161
|
+
--salmon-button-fg: var(--salmon-button-c-text);
|
|
162
|
+
--salmon-button-bd: transparent;
|
|
163
|
+
}
|
|
164
|
+
.salmon-button[data-variant='outline'] {
|
|
165
|
+
--salmon-button-bd: var(--salmon-button-c-border);
|
|
166
|
+
}
|
|
167
|
+
.salmon-button[data-variant='outline']:hover,
|
|
168
|
+
.salmon-button[data-variant='ghost']:hover {
|
|
169
|
+
--salmon-button-bg: var(--salmon-button-c-subtle);
|
|
170
|
+
}
|
|
171
|
+
.salmon-button[data-variant='outline']:active,
|
|
172
|
+
.salmon-button[data-variant='ghost']:active {
|
|
173
|
+
--salmon-button-bg: var(--salmon-button-c-subtle-hover);
|
|
174
|
+
}
|
|
175
|
+
.salmon-button[data-variant='outline'][data-pressed],
|
|
176
|
+
.salmon-button[data-variant='ghost'][data-pressed] {
|
|
177
|
+
--salmon-button-bg: var(--salmon-button-c-subtle);
|
|
178
|
+
--salmon-button-bd: var(--salmon-button-c-selected-edge);
|
|
179
|
+
}
|
|
180
|
+
.salmon-button[data-variant='link'] {
|
|
181
|
+
padding-inline: 2px;
|
|
182
|
+
min-block-size: auto;
|
|
183
|
+
font-weight: var(--salmon-font-weight-regular);
|
|
184
|
+
}
|
|
185
|
+
.salmon-button[data-variant='link'][data-tone='neutral'] {
|
|
186
|
+
--salmon-button-fg: var(--salmon-text-link);
|
|
187
|
+
}
|
|
188
|
+
.salmon-button[data-variant='link']:hover,
|
|
189
|
+
.salmon-button[data-variant='link'][data-pressed] {
|
|
190
|
+
text-decoration: underline;
|
|
191
|
+
}
|
|
192
|
+
/* States. */
|
|
193
|
+
.salmon-button:focus-visible {
|
|
194
|
+
z-index: 1;
|
|
195
|
+
outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
|
|
196
|
+
outline-offset: var(--salmon-state-focus-ring-offset);
|
|
197
|
+
}
|
|
198
|
+
.salmon-button[data-variant]:disabled,
|
|
199
|
+
.salmon-button[data-variant][aria-disabled='true']:not([data-loading]) {
|
|
200
|
+
--salmon-button-bg: var(--salmon-surface-disabled);
|
|
201
|
+
--salmon-button-fg: var(--salmon-text-disabled);
|
|
202
|
+
--salmon-button-bd: var(--salmon-border-subtle);
|
|
203
|
+
cursor: not-allowed;
|
|
204
|
+
}
|
|
205
|
+
.salmon-button[data-variant='link']:disabled,
|
|
206
|
+
.salmon-button[data-variant='link'][aria-disabled='true']:not([data-loading]),
|
|
207
|
+
.salmon-button[data-variant='ghost']:disabled {
|
|
208
|
+
--salmon-button-bg: transparent;
|
|
209
|
+
--salmon-button-bd: transparent;
|
|
210
|
+
}
|
|
211
|
+
.salmon-button[data-loading] {
|
|
212
|
+
cursor: progress;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.salmon-button__label {
|
|
216
|
+
min-inline-size: 0;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
text-overflow: ellipsis;
|
|
219
|
+
}
|
|
220
|
+
.salmon-button__icon,
|
|
221
|
+
.salmon-button__spinner {
|
|
222
|
+
display: inline-flex;
|
|
223
|
+
flex: none;
|
|
224
|
+
align-items: center;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
}
|
|
227
|
+
.salmon-button__spinner:empty {
|
|
228
|
+
inline-size: 1em;
|
|
229
|
+
block-size: 1em;
|
|
230
|
+
box-sizing: border-box;
|
|
231
|
+
border: 2px solid currentColor;
|
|
232
|
+
border-inline-end-color: transparent;
|
|
233
|
+
border-radius: 50%;
|
|
234
|
+
animation: salmon-button-spin 0.8s linear infinite;
|
|
235
|
+
}
|
|
236
|
+
@keyframes salmon-button-spin {
|
|
237
|
+
to {
|
|
238
|
+
rotate: 360deg;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
.salmon-button__sr {
|
|
242
|
+
position: absolute;
|
|
243
|
+
inline-size: 1px;
|
|
244
|
+
block-size: 1px;
|
|
245
|
+
margin: -1px;
|
|
246
|
+
padding: 0;
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
clip-path: inset(50%);
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
border: 0;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/* Groups. */
|
|
254
|
+
.salmon-button-group,
|
|
255
|
+
.salmon-toggle-button-group {
|
|
256
|
+
display: inline-flex;
|
|
257
|
+
gap: 8px;
|
|
258
|
+
vertical-align: middle;
|
|
259
|
+
}
|
|
260
|
+
.salmon-button-group:not([data-attached]),
|
|
261
|
+
.salmon-toggle-button-group:not([data-attached]) {
|
|
262
|
+
flex-wrap: wrap;
|
|
263
|
+
}
|
|
264
|
+
.salmon-button-group[data-orientation='vertical'],
|
|
265
|
+
.salmon-toggle-button-group[data-orientation='vertical'] {
|
|
266
|
+
flex-direction: column;
|
|
267
|
+
align-items: stretch;
|
|
268
|
+
}
|
|
269
|
+
.salmon-button-group[data-attached],
|
|
270
|
+
.salmon-toggle-button-group[data-attached] {
|
|
271
|
+
gap: 0;
|
|
272
|
+
}
|
|
273
|
+
[data-attached][data-orientation='horizontal'] > .salmon-button:not(:first-of-type) {
|
|
274
|
+
margin-inline-start: -1px;
|
|
275
|
+
border-start-start-radius: 0;
|
|
276
|
+
border-end-start-radius: 0;
|
|
277
|
+
}
|
|
278
|
+
[data-attached][data-orientation='horizontal'] > .salmon-button:not(:last-of-type) {
|
|
279
|
+
border-start-end-radius: 0;
|
|
280
|
+
border-end-end-radius: 0;
|
|
281
|
+
}
|
|
282
|
+
[data-attached][data-orientation='vertical'] > .salmon-button:not(:first-of-type) {
|
|
283
|
+
margin-block-start: -1px;
|
|
284
|
+
border-start-start-radius: 0;
|
|
285
|
+
border-start-end-radius: 0;
|
|
286
|
+
}
|
|
287
|
+
[data-attached][data-orientation='vertical'] > .salmon-button:not(:last-of-type) {
|
|
288
|
+
border-end-start-radius: 0;
|
|
289
|
+
border-end-end-radius: 0;
|
|
290
|
+
}
|
|
291
|
+
[data-attached] > .salmon-button:hover,
|
|
292
|
+
[data-attached] > .salmon-button[data-pressed] {
|
|
293
|
+
z-index: 1;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
@media (prefers-reduced-motion: reduce) {
|
|
297
|
+
.salmon-button {
|
|
298
|
+
transition: none;
|
|
299
|
+
}
|
|
300
|
+
.salmon-button__spinner:empty {
|
|
301
|
+
animation-duration: 2.4s;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
@media (forced-colors: active) {
|
|
306
|
+
.salmon-button {
|
|
307
|
+
border-color: ButtonText;
|
|
308
|
+
}
|
|
309
|
+
.salmon-button[data-pressed] {
|
|
310
|
+
forced-color-adjust: none;
|
|
311
|
+
border-color: Highlight;
|
|
312
|
+
background: Highlight;
|
|
313
|
+
color: HighlightText;
|
|
314
|
+
}
|
|
315
|
+
.salmon-button:disabled {
|
|
316
|
+
border-color: GrayText;
|
|
317
|
+
color: GrayText;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
}
|
|
322
|
+
@layer salmon.a {
|
|
323
|
+
/* @salmonui/react/mention: the suggestion popup.
|
|
324
|
+
The root only wraps the user's field; colors come from the theme variables. */
|
|
325
|
+
.salmon-mention {
|
|
326
|
+
display: block;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.salmon-mention-popup {
|
|
330
|
+
position: fixed;
|
|
331
|
+
z-index: 1000;
|
|
332
|
+
box-sizing: border-box;
|
|
333
|
+
min-inline-size: 180px;
|
|
334
|
+
max-inline-size: min(360px, calc(100vw - 16px));
|
|
335
|
+
max-block-size: min(calc(8 * 32px + 2 * var(--salmon-space-2) + 2px), calc(100vh - 16px));
|
|
336
|
+
overflow: auto;
|
|
337
|
+
padding: var(--salmon-space-2);
|
|
338
|
+
font-family: var(--salmon-font-sans, system-ui, sans-serif);
|
|
339
|
+
font-size: var(--salmon-font-size-md, 14px);
|
|
340
|
+
line-height: var(--salmon-line-height-tight, 1.25);
|
|
341
|
+
color: var(--salmon-text-primary, CanvasText);
|
|
342
|
+
background: var(--salmon-surface-overlay, Canvas);
|
|
343
|
+
border: 1px solid var(--salmon-border-default, GrayText);
|
|
344
|
+
border-radius: var(--salmon-radius-lg);
|
|
345
|
+
box-shadow: var(--salmon-shadow-md, none);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
/* Fixed at the viewport origin (inline style) and moved by `transform` in a layout effect; hidden until placed. */
|
|
349
|
+
.salmon-mention-popup:not([data-placed]) {
|
|
350
|
+
visibility: hidden;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.salmon-mention-list {
|
|
354
|
+
margin: 0;
|
|
355
|
+
padding: 0;
|
|
356
|
+
list-style: none;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.salmon-mention-option {
|
|
360
|
+
display: flex;
|
|
361
|
+
align-items: center;
|
|
362
|
+
gap: var(--salmon-space-3);
|
|
363
|
+
min-block-size: 32px;
|
|
364
|
+
padding-inline: var(--salmon-space-4);
|
|
365
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
366
|
+
white-space: nowrap;
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
text-overflow: ellipsis;
|
|
369
|
+
cursor: pointer;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* The default item text: one flex item, so a highlighted match sits flush with its text and long labels truncate. */
|
|
373
|
+
.salmon-mention-label {
|
|
374
|
+
min-inline-size: 0;
|
|
375
|
+
overflow: hidden;
|
|
376
|
+
text-overflow: ellipsis;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.salmon-mention-option[data-active] {
|
|
380
|
+
color: var(--salmon-text-primary, CanvasText);
|
|
381
|
+
background: var(--salmon-surface-selected, Highlight);
|
|
382
|
+
outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring, Highlight);
|
|
383
|
+
outline-offset: calc(-1 * var(--salmon-state-focus-ring-width, 2px));
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.salmon-mention-option[data-disabled] {
|
|
387
|
+
color: var(--salmon-text-disabled, GrayText);
|
|
388
|
+
cursor: default;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.salmon-mention-mark {
|
|
392
|
+
color: inherit;
|
|
393
|
+
background: none;
|
|
394
|
+
font-weight: var(--salmon-font-weight-semibold, 600);
|
|
395
|
+
text-decoration: underline;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.salmon-mention-status {
|
|
399
|
+
padding: var(--salmon-space-3) var(--salmon-space-4);
|
|
400
|
+
color: var(--salmon-text-secondary, GrayText);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.salmon-mention-status[data-error] {
|
|
404
|
+
color: var(--salmon-color-danger-text, CanvasText);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/* a mention inserted into a contenteditable target (createContentEditableMentionTarget). */
|
|
408
|
+
.salmon-mention-chip {
|
|
409
|
+
padding-inline: var(--salmon-space-2);
|
|
410
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
411
|
+
color: var(--salmon-text-primary, CanvasText);
|
|
412
|
+
background: var(--salmon-surface-selected, Highlight);
|
|
413
|
+
white-space: nowrap;
|
|
414
|
+
user-select: all;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
@media (forced-colors: active) {
|
|
418
|
+
.salmon-mention-chip {
|
|
419
|
+
border: 1px solid CanvasText;
|
|
420
|
+
}
|
|
421
|
+
.salmon-mention-popup {
|
|
422
|
+
color: CanvasText;
|
|
423
|
+
background: Canvas;
|
|
424
|
+
border-color: CanvasText;
|
|
425
|
+
}
|
|
426
|
+
.salmon-mention-option[data-active] {
|
|
427
|
+
color: HighlightText;
|
|
428
|
+
background: Highlight;
|
|
429
|
+
forced-color-adjust: none;
|
|
430
|
+
}
|
|
431
|
+
.salmon-mention-option[data-disabled] {
|
|
432
|
+
color: GrayText;
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
}
|
|
437
|
+
@layer salmon.b {
|
|
438
|
+
/* @salmonui/buttons/button/styles.css, second part: the filter chip variant,
|
|
439
|
+
the progress fill and the floating action button. tooling/checks/copy-css.mjs
|
|
440
|
+
writes dist/button.css as styles/button-core.css followed by this file;
|
|
441
|
+
families of other packages that render plain buttons only carry
|
|
442
|
+
button-core.css (`@salmonui/buttons:button-core` in the manifest).
|
|
443
|
+
Chip hover and pressed apply
|
|
444
|
+
to enabled chips only, so the disabled state of button-core.css, which
|
|
445
|
+
comes first, keeps winning. */
|
|
446
|
+
|
|
447
|
+
.salmon-button[data-variant='chip'] {
|
|
448
|
+
--salmon-button-h: calc(var(--salmon-control-height-md, 32px) - 4px);
|
|
449
|
+
--salmon-button-bg: transparent;
|
|
450
|
+
--salmon-button-fg: var(--salmon-button-c-text);
|
|
451
|
+
--salmon-button-bd: var(--salmon-button-c-border);
|
|
452
|
+
border-radius: var(--salmon-radius-sm);
|
|
453
|
+
font-weight: var(--salmon-font-weight-regular);
|
|
454
|
+
}
|
|
455
|
+
.salmon-button[data-variant='chip'][data-size='sm'] {
|
|
456
|
+
--salmon-button-h: calc(var(--salmon-control-height-sm, 24px) - 2px);
|
|
457
|
+
}
|
|
458
|
+
.salmon-button[data-variant='chip'][data-size='lg'] {
|
|
459
|
+
--salmon-button-h: calc(var(--salmon-control-height-lg, 40px) - 6px);
|
|
460
|
+
}
|
|
461
|
+
.salmon-button[data-variant='chip']:hover:where(:enabled) {
|
|
462
|
+
--salmon-button-bg: var(--salmon-button-c-subtle);
|
|
463
|
+
}
|
|
464
|
+
.salmon-button[data-variant='chip'][data-pressed]:where(:enabled) {
|
|
465
|
+
--salmon-button-bg: var(--salmon-button-c-selected);
|
|
466
|
+
--salmon-button-bd: var(--salmon-button-c-selected-edge);
|
|
467
|
+
}
|
|
468
|
+
/* Filter chips show a check when pressed. */
|
|
469
|
+
.salmon-button[data-variant='chip'][data-pressed]::after {
|
|
470
|
+
content: '';
|
|
471
|
+
order: -1;
|
|
472
|
+
inline-size: 0.3em;
|
|
473
|
+
block-size: 0.6em;
|
|
474
|
+
margin-block-start: -0.2em;
|
|
475
|
+
border: solid currentColor;
|
|
476
|
+
border-width: 0 2px 2px 0;
|
|
477
|
+
rotate: 45deg;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/* Progress fill from inline-start. */
|
|
481
|
+
.salmon-button[data-progress]::before {
|
|
482
|
+
content: '';
|
|
483
|
+
position: absolute;
|
|
484
|
+
z-index: -1;
|
|
485
|
+
inset-block: 0;
|
|
486
|
+
inset-inline-start: 0;
|
|
487
|
+
inline-size: var(--salmon-button-progress, 0%);
|
|
488
|
+
background: currentColor;
|
|
489
|
+
opacity: 0.22;
|
|
490
|
+
transition: inline-size var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/* Floating action button: circular, elevated, CSS positioned. */
|
|
494
|
+
.salmon-button[data-floating] {
|
|
495
|
+
--salmon-button-h: 56px;
|
|
496
|
+
--salmon-button-pad: 20px;
|
|
497
|
+
--salmon-button-inset: 16px;
|
|
498
|
+
position: fixed;
|
|
499
|
+
z-index: 10;
|
|
500
|
+
border-radius: var(--salmon-radius-full);
|
|
501
|
+
box-shadow: var(--salmon-shadow-lg);
|
|
502
|
+
}
|
|
503
|
+
.salmon-button[data-floating][data-size='sm'] {
|
|
504
|
+
--salmon-button-h: 40px;
|
|
505
|
+
--salmon-button-pad: 14px;
|
|
506
|
+
}
|
|
507
|
+
.salmon-button[data-floating][data-size='lg'] {
|
|
508
|
+
--salmon-button-h: 64px;
|
|
509
|
+
--salmon-button-pad: 24px;
|
|
510
|
+
}
|
|
511
|
+
.salmon-button[data-floating-scope='parent'] {
|
|
512
|
+
position: absolute;
|
|
513
|
+
}
|
|
514
|
+
.salmon-button[data-floating^='top'] {
|
|
515
|
+
inset-block-start: var(--salmon-button-inset);
|
|
516
|
+
}
|
|
517
|
+
.salmon-button[data-floating^='bottom'] {
|
|
518
|
+
inset-block-end: var(--salmon-button-inset);
|
|
519
|
+
}
|
|
520
|
+
.salmon-button[data-floating$='Start'] {
|
|
521
|
+
inset-inline-start: var(--salmon-button-inset);
|
|
522
|
+
}
|
|
523
|
+
.salmon-button[data-floating$='End'] {
|
|
524
|
+
inset-inline-end: var(--salmon-button-inset);
|
|
525
|
+
}
|
|
526
|
+
.salmon-button[data-floating^='middle'] {
|
|
527
|
+
inset-block-start: 50%;
|
|
528
|
+
translate: 0 -50%;
|
|
529
|
+
}
|
|
530
|
+
/* Direction sign: -1 under the nearest dir="rtl", 1 under dir="ltr". */
|
|
531
|
+
:where([dir='rtl']) { --salmon-dir: -1; }
|
|
532
|
+
:where([dir='ltr']) { --salmon-dir: 1; }
|
|
533
|
+
.salmon-button[data-floating$='Center'] {
|
|
534
|
+
inset-inline-start: 50%;
|
|
535
|
+
translate: calc(-50% * var(--salmon-dir, 1)) 0;
|
|
536
|
+
}
|
|
537
|
+
.salmon-button[data-floating='middleCenter'] {
|
|
538
|
+
translate: calc(-50% * var(--salmon-dir, 1)) -50%;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@media (prefers-reduced-motion: reduce) {
|
|
542
|
+
.salmon-button[data-progress]::before {
|
|
543
|
+
transition: none;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
}
|
|
548
|
+
@layer salmon.c {
|
|
549
|
+
/* @salmonui/react/menu: Menu family, MenuButton and SplitButton parts.
|
|
550
|
+
The trigger buttons are styled by /button/styles.css. Logical properties only. */
|
|
551
|
+
|
|
552
|
+
.salmon-menu {
|
|
553
|
+
box-sizing: border-box;
|
|
554
|
+
display: flex;
|
|
555
|
+
flex-direction: column;
|
|
556
|
+
/* A popup opened from a trigger is at least as wide as the trigger (list.tsx). */
|
|
557
|
+
min-inline-size: max(160px, var(--salmon-menu-anchor-width, 0px));
|
|
558
|
+
max-height: calc(100vh - 16px);
|
|
559
|
+
overflow: auto;
|
|
560
|
+
padding: var(--salmon-space-2);
|
|
561
|
+
font-family: var(--salmon-font-sans);
|
|
562
|
+
font-size: var(--salmon-font-size-md);
|
|
563
|
+
line-height: var(--salmon-line-height-tight);
|
|
564
|
+
color: var(--salmon-text-primary);
|
|
565
|
+
background: var(--salmon-surface-overlay);
|
|
566
|
+
border: 1px solid var(--salmon-border-default);
|
|
567
|
+
border-radius: var(--salmon-radius-lg);
|
|
568
|
+
outline: none;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.salmon-menu[data-popup] {
|
|
572
|
+
inset: 0 auto auto 0;
|
|
573
|
+
margin: 0;
|
|
574
|
+
z-index: 1000;
|
|
575
|
+
box-shadow: var(--salmon-shadow-md);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.salmon-menu[data-popup]:not([data-placed]) {
|
|
579
|
+
visibility: hidden;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.salmon-menu *,
|
|
583
|
+
.salmon-menu ::before,
|
|
584
|
+
.salmon-menu ::after {
|
|
585
|
+
box-sizing: border-box;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
.salmon-menu-item {
|
|
589
|
+
display: flex;
|
|
590
|
+
align-items: center;
|
|
591
|
+
gap: var(--salmon-space-2);
|
|
592
|
+
min-height: var(--salmon-control-height-md, 32px);
|
|
593
|
+
padding-block: var(--salmon-space-1);
|
|
594
|
+
padding-inline: var(--salmon-space-3);
|
|
595
|
+
border-radius: var(--salmon-radius-sm);
|
|
596
|
+
color: inherit;
|
|
597
|
+
text-decoration: none;
|
|
598
|
+
white-space: nowrap;
|
|
599
|
+
cursor: pointer;
|
|
600
|
+
outline: none;
|
|
601
|
+
user-select: none;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.salmon-menu-item[data-highlighted],
|
|
605
|
+
.salmon-menu-item[data-open] {
|
|
606
|
+
background: var(--salmon-surface-hover);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.salmon-menu-item:focus-visible {
|
|
610
|
+
outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
|
|
611
|
+
outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.salmon-menu-item[data-disabled] {
|
|
615
|
+
color: var(--salmon-text-disabled);
|
|
616
|
+
background: none;
|
|
617
|
+
cursor: default;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
.salmon-menu-item-icon,
|
|
621
|
+
.salmon-menu-item-check,
|
|
622
|
+
.salmon-menu-submenu-indicator {
|
|
623
|
+
display: inline-flex;
|
|
624
|
+
flex: none;
|
|
625
|
+
align-items: center;
|
|
626
|
+
justify-content: center;
|
|
627
|
+
width: 16px;
|
|
628
|
+
height: 16px;
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.salmon-menu-item-check {
|
|
632
|
+
visibility: hidden;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
.salmon-menu-item[data-checked] .salmon-menu-item-check {
|
|
636
|
+
visibility: visible;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.salmon-menu-item-dot {
|
|
640
|
+
width: 6px;
|
|
641
|
+
height: 6px;
|
|
642
|
+
border-radius: var(--salmon-radius-full);
|
|
643
|
+
background: currentColor;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.salmon-menu-item-label {
|
|
647
|
+
flex: 1 1 auto;
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.salmon-menu-submenu-indicator {
|
|
651
|
+
margin-inline-start: var(--salmon-space-3);
|
|
652
|
+
color: var(--salmon-text-secondary);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
.salmon-menu-separator {
|
|
656
|
+
flex: none;
|
|
657
|
+
height: 1px;
|
|
658
|
+
margin-block: var(--salmon-space-1);
|
|
659
|
+
background: var(--salmon-border-subtle);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
.salmon-menu-group {
|
|
663
|
+
display: flex;
|
|
664
|
+
flex-direction: column;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.salmon-menu-group-label {
|
|
668
|
+
padding-block: var(--salmon-space-1);
|
|
669
|
+
padding-inline: var(--salmon-space-3);
|
|
670
|
+
font-size: var(--salmon-font-size-sm);
|
|
671
|
+
font-weight: var(--salmon-font-weight-semibold);
|
|
672
|
+
color: var(--salmon-text-secondary);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.salmon-menu-button-indicator {
|
|
676
|
+
display: inline-flex;
|
|
677
|
+
transition: transform var(--salmon-motion-duration-fast) var(--salmon-motion-easing);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
[data-open] > .salmon-button__icon > .salmon-menu-button-indicator,
|
|
681
|
+
[data-open] > .salmon-menu-button-indicator {
|
|
682
|
+
transform: rotate(180deg);
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/* Directional icons supplied by the system mirror in RTL. */
|
|
686
|
+
.salmon-menu[dir='rtl'] .salmon-menu-submenu-indicator svg {
|
|
687
|
+
transform: scaleX(-1);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/* SplitButton is an attached ButtonGroup (button.css). Nested in an outer group
|
|
691
|
+
it joins its neighbours; in a vertical group it stretches and stays horizontal. */
|
|
692
|
+
[data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:first-child) {
|
|
693
|
+
margin-inline-start: -1px;
|
|
694
|
+
}
|
|
695
|
+
[data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:first-child) > .salmon-button:first-child,
|
|
696
|
+
[data-attached][data-orientation='horizontal'] > .salmon-split-button + .salmon-button {
|
|
697
|
+
border-start-start-radius: 0;
|
|
698
|
+
border-end-start-radius: 0;
|
|
699
|
+
}
|
|
700
|
+
[data-attached][data-orientation='horizontal'] > .salmon-split-button:not(:last-child) > .salmon-button:last-child,
|
|
701
|
+
[data-attached][data-orientation='horizontal'] > .salmon-button:has(+ .salmon-split-button) {
|
|
702
|
+
border-start-end-radius: 0;
|
|
703
|
+
border-end-end-radius: 0;
|
|
704
|
+
}
|
|
705
|
+
[data-orientation='vertical'] > .salmon-split-button {
|
|
706
|
+
display: flex;
|
|
707
|
+
}
|
|
708
|
+
[data-orientation='vertical'] > .salmon-split-button > .salmon-split-button-primary {
|
|
709
|
+
flex: 1 1 auto;
|
|
710
|
+
}
|
|
711
|
+
[data-attached][data-orientation='vertical'] > .salmon-split-button:not(:first-child) {
|
|
712
|
+
margin-block-start: -1px;
|
|
713
|
+
}
|
|
714
|
+
[data-attached][data-orientation='vertical'] > .salmon-split-button:not(:first-child) > .salmon-button,
|
|
715
|
+
[data-attached][data-orientation='vertical'] > .salmon-split-button + .salmon-button {
|
|
716
|
+
border-start-start-radius: 0;
|
|
717
|
+
border-start-end-radius: 0;
|
|
718
|
+
}
|
|
719
|
+
[data-attached][data-orientation='vertical'] > .salmon-split-button:not(:last-child) > .salmon-button,
|
|
720
|
+
[data-attached][data-orientation='vertical'] > .salmon-button:has(+ .salmon-split-button) {
|
|
721
|
+
border-end-start-radius: 0;
|
|
722
|
+
border-end-end-radius: 0;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
/* ContextMenu target: a long-press opens the menu, not the touch callout. */
|
|
726
|
+
.salmon-context-menu {
|
|
727
|
+
-webkit-touch-callout: none;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
/* Menubar (APG Menubar, horizontal). */
|
|
731
|
+
.salmon-menubar {
|
|
732
|
+
box-sizing: border-box;
|
|
733
|
+
display: flex;
|
|
734
|
+
align-items: center;
|
|
735
|
+
gap: 2px;
|
|
736
|
+
min-width: 0;
|
|
737
|
+
padding: var(--salmon-space-2);
|
|
738
|
+
font-family: var(--salmon-font-sans);
|
|
739
|
+
font-size: var(--salmon-font-size-md);
|
|
740
|
+
line-height: var(--salmon-line-height-tight);
|
|
741
|
+
color: var(--salmon-text-primary);
|
|
742
|
+
background: var(--salmon-surface-raised);
|
|
743
|
+
border: 1px solid var(--salmon-border-default);
|
|
744
|
+
border-radius: var(--salmon-radius-lg);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
.salmon-menubar[data-overflow='scroll'] {
|
|
748
|
+
overflow-x: auto;
|
|
749
|
+
scrollbar-width: none;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.salmon-menubar[data-overflow='scroll']::-webkit-scrollbar {
|
|
753
|
+
display: none;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.salmon-menubar-item {
|
|
757
|
+
box-sizing: border-box;
|
|
758
|
+
display: inline-flex;
|
|
759
|
+
flex: none;
|
|
760
|
+
align-items: center;
|
|
761
|
+
gap: var(--salmon-space-2);
|
|
762
|
+
min-height: var(--salmon-control-height-md, 32px);
|
|
763
|
+
padding-block: var(--salmon-space-1);
|
|
764
|
+
padding-inline: var(--salmon-space-3);
|
|
765
|
+
border-radius: var(--salmon-radius-sm);
|
|
766
|
+
color: inherit;
|
|
767
|
+
text-decoration: none;
|
|
768
|
+
white-space: nowrap;
|
|
769
|
+
cursor: pointer;
|
|
770
|
+
outline: none;
|
|
771
|
+
user-select: none;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.salmon-menubar-item:hover,
|
|
775
|
+
.salmon-menubar-item[data-open] {
|
|
776
|
+
background: var(--salmon-surface-hover);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
.salmon-menubar-item:focus-visible {
|
|
780
|
+
outline: var(--salmon-state-focus-ring-width) solid var(--salmon-state-focus-ring);
|
|
781
|
+
outline-offset: calc(-1 * var(--salmon-state-focus-ring-width));
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.salmon-menubar-item[data-disabled] {
|
|
785
|
+
color: var(--salmon-text-disabled);
|
|
786
|
+
background: none;
|
|
787
|
+
cursor: default;
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
.salmon-menubar-item-icon {
|
|
791
|
+
display: inline-flex;
|
|
792
|
+
flex: none;
|
|
793
|
+
width: 16px;
|
|
794
|
+
height: 16px;
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
/* overflow: 'scroll' indicators, shown while there is more to scroll to on that side. */
|
|
798
|
+
.salmon-menubar-scroll {
|
|
799
|
+
position: sticky;
|
|
800
|
+
z-index: 1;
|
|
801
|
+
display: none;
|
|
802
|
+
flex: none;
|
|
803
|
+
align-self: stretch;
|
|
804
|
+
align-items: center;
|
|
805
|
+
justify-content: center;
|
|
806
|
+
width: 24px;
|
|
807
|
+
color: var(--salmon-text-secondary);
|
|
808
|
+
background: var(--salmon-surface-raised);
|
|
809
|
+
cursor: pointer;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.salmon-menubar-scroll[data-direction='backward'] {
|
|
813
|
+
inset-inline-start: calc(-1 * var(--salmon-space-2));
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.salmon-menubar-scroll[data-direction='forward'] {
|
|
817
|
+
inset-inline-end: calc(-1 * var(--salmon-space-2));
|
|
818
|
+
margin-inline-start: auto;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
.salmon-menubar-scroll[data-direction='forward'] svg {
|
|
822
|
+
transform: scaleX(-1);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
.salmon-menubar[data-scroll-start] > .salmon-menubar-scroll[data-direction='backward'],
|
|
826
|
+
.salmon-menubar[data-scroll-end] > .salmon-menubar-scroll[data-direction='forward'] {
|
|
827
|
+
display: flex;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
.salmon-menubar[dir='rtl'] .salmon-menubar-scroll svg,
|
|
831
|
+
[dir='rtl'] .salmon-menubar .salmon-menubar-scroll svg {
|
|
832
|
+
transform: scaleX(-1);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
[dir='rtl'] .salmon-menubar .salmon-menubar-scroll[data-direction='forward'] svg {
|
|
836
|
+
transform: none;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
@media (prefers-reduced-motion: reduce) {
|
|
840
|
+
.salmon-menu-button-indicator {
|
|
841
|
+
transition: none;
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
@media (forced-colors: active) {
|
|
846
|
+
.salmon-menu-item[data-highlighted] {
|
|
847
|
+
forced-color-adjust: none;
|
|
848
|
+
color: HighlightText;
|
|
849
|
+
background: Highlight;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
}
|
|
854
|
+
@layer salmon.d {
|
|
855
|
+
/* @salmonui/rich-text own styles. dist/rich-text.css is built by tooling/checks/copy-css.mjs:
|
|
856
|
+
the menu (with button) and mention family styles of @salmonui/react, then this file. */
|
|
857
|
+
|
|
858
|
+
/* RichTextEditor ----------------------------------------------------------- */
|
|
859
|
+
.salmon-rich-text {
|
|
860
|
+
position: relative;
|
|
861
|
+
display: flex;
|
|
862
|
+
flex-direction: column;
|
|
863
|
+
box-sizing: border-box;
|
|
864
|
+
min-block-size: 160px;
|
|
865
|
+
border: 1px solid var(--salmon-border-default);
|
|
866
|
+
border-radius: var(--salmon-radius-lg, 10px);
|
|
867
|
+
background: var(--salmon-surface-base);
|
|
868
|
+
color: var(--salmon-text-primary);
|
|
869
|
+
font-family: var(--salmon-font-sans);
|
|
870
|
+
font-size: var(--salmon-font-size-md, 14px);
|
|
871
|
+
}
|
|
872
|
+
.salmon-rich-text:focus-within {
|
|
873
|
+
border-color: var(--salmon-border-selected);
|
|
874
|
+
}
|
|
875
|
+
.salmon-rich-text[data-invalid] {
|
|
876
|
+
border-color: var(--salmon-state-invalid);
|
|
877
|
+
}
|
|
878
|
+
.salmon-rich-text[data-disabled] {
|
|
879
|
+
background: var(--salmon-surface-disabled);
|
|
880
|
+
color: var(--salmon-text-disabled);
|
|
881
|
+
}
|
|
882
|
+
.salmon-rich-text[data-fullscreen] {
|
|
883
|
+
position: fixed;
|
|
884
|
+
inset: 0;
|
|
885
|
+
z-index: 900;
|
|
886
|
+
border-radius: 0;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.salmon-rich-text__toolbar {
|
|
890
|
+
display: flex;
|
|
891
|
+
flex-wrap: nowrap;
|
|
892
|
+
align-items: center;
|
|
893
|
+
gap: 2px;
|
|
894
|
+
padding: var(--salmon-space-1, 2px);
|
|
895
|
+
border-block-end: 1px solid var(--salmon-border-subtle);
|
|
896
|
+
background: var(--salmon-surface-header);
|
|
897
|
+
overflow: hidden;
|
|
898
|
+
border-start-start-radius: inherit;
|
|
899
|
+
border-start-end-radius: inherit;
|
|
900
|
+
}
|
|
901
|
+
.salmon-rich-text[data-toolbar-position='bottom'] > .salmon-rich-text__toolbar {
|
|
902
|
+
border-block-end: 0;
|
|
903
|
+
border-block-start: 1px solid var(--salmon-border-subtle);
|
|
904
|
+
}
|
|
905
|
+
.salmon-rich-text__toolbar[data-overflow='wrap'] {
|
|
906
|
+
flex-wrap: wrap;
|
|
907
|
+
}
|
|
908
|
+
.salmon-rich-text__toolbar[data-overflow='scroll'] {
|
|
909
|
+
overflow-x: auto;
|
|
910
|
+
scrollbar-width: thin;
|
|
911
|
+
}
|
|
912
|
+
.salmon-rich-text__toolbar--sticky {
|
|
913
|
+
position: sticky;
|
|
914
|
+
inset-block-start: 0;
|
|
915
|
+
z-index: 2;
|
|
916
|
+
}
|
|
917
|
+
.salmon-rich-text__slot {
|
|
918
|
+
display: inline-flex;
|
|
919
|
+
flex: none;
|
|
920
|
+
}
|
|
921
|
+
.salmon-rich-text__slot[hidden] {
|
|
922
|
+
display: none;
|
|
923
|
+
}
|
|
924
|
+
.salmon-rich-text__separator {
|
|
925
|
+
inline-size: 1px;
|
|
926
|
+
block-size: 20px;
|
|
927
|
+
margin-inline: 4px;
|
|
928
|
+
background: var(--salmon-border-subtle);
|
|
929
|
+
}
|
|
930
|
+
.salmon-rich-text__body {
|
|
931
|
+
position: relative;
|
|
932
|
+
display: flex;
|
|
933
|
+
flex: 1 1 auto;
|
|
934
|
+
flex-direction: column;
|
|
935
|
+
min-block-size: 0;
|
|
936
|
+
overflow: auto;
|
|
937
|
+
}
|
|
938
|
+
.salmon-rich-text[data-resizable] > .salmon-rich-text__body {
|
|
939
|
+
resize: vertical;
|
|
940
|
+
min-block-size: 80px;
|
|
941
|
+
}
|
|
942
|
+
.salmon-rich-text__content {
|
|
943
|
+
flex: 1 1 auto;
|
|
944
|
+
box-sizing: border-box;
|
|
945
|
+
min-block-size: 120px;
|
|
946
|
+
padding: var(--salmon-space-3, 8px);
|
|
947
|
+
outline: none;
|
|
948
|
+
overflow-wrap: anywhere;
|
|
949
|
+
white-space: pre-wrap;
|
|
950
|
+
line-height: var(--salmon-line-height-normal, 1.5);
|
|
951
|
+
}
|
|
952
|
+
.salmon-rich-text[data-source] .salmon-rich-text__content {
|
|
953
|
+
display: none;
|
|
954
|
+
}
|
|
955
|
+
.salmon-rich-text__content:empty::before,
|
|
956
|
+
.salmon-rich-text__placeholder::before {
|
|
957
|
+
content: attr(data-placeholder);
|
|
958
|
+
float: inline-start;
|
|
959
|
+
block-size: 0;
|
|
960
|
+
color: var(--salmon-text-placeholder);
|
|
961
|
+
pointer-events: none;
|
|
962
|
+
}
|
|
963
|
+
.salmon-rich-text__content:empty::before {
|
|
964
|
+
content: attr(aria-placeholder);
|
|
965
|
+
}
|
|
966
|
+
.salmon-rich-text__source {
|
|
967
|
+
flex: 1 1 auto;
|
|
968
|
+
min-block-size: 160px;
|
|
969
|
+
box-sizing: border-box;
|
|
970
|
+
margin: 0;
|
|
971
|
+
padding: var(--salmon-space-3, 8px);
|
|
972
|
+
border: 0;
|
|
973
|
+
resize: none;
|
|
974
|
+
background: var(--salmon-surface-sunken);
|
|
975
|
+
color: var(--salmon-text-primary);
|
|
976
|
+
font-family: var(--salmon-font-mono);
|
|
977
|
+
font-size: var(--salmon-font-size-sm, 13px);
|
|
978
|
+
}
|
|
979
|
+
.salmon-rich-text__status {
|
|
980
|
+
display: flex;
|
|
981
|
+
justify-content: flex-end;
|
|
982
|
+
padding: 2px var(--salmon-space-2, 4px);
|
|
983
|
+
border-block-start: 1px solid var(--salmon-border-subtle);
|
|
984
|
+
color: var(--salmon-text-secondary);
|
|
985
|
+
font-size: var(--salmon-font-size-sm, 12px);
|
|
986
|
+
}
|
|
987
|
+
.salmon-rich-text__sr,
|
|
988
|
+
.salmon-rich-text__validator {
|
|
989
|
+
position: absolute;
|
|
990
|
+
inline-size: 1px;
|
|
991
|
+
block-size: 1px;
|
|
992
|
+
margin: -1px;
|
|
993
|
+
padding: 0;
|
|
994
|
+
overflow: hidden;
|
|
995
|
+
clip-path: inset(50%);
|
|
996
|
+
white-space: nowrap;
|
|
997
|
+
border: 0;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
/* Content (also RichTextContent) */
|
|
1001
|
+
.salmon-rich-text-content :where(p, h1, h2, h3, h4, h5, h6, blockquote, pre, ul, ol, table, figure) {
|
|
1002
|
+
margin-block: 0 0.6em;
|
|
1003
|
+
}
|
|
1004
|
+
.salmon-rich-text-content :where([data-indent='1']) { padding-inline-start: 2em; }
|
|
1005
|
+
.salmon-rich-text-content :where([data-indent='2']) { padding-inline-start: 4em; }
|
|
1006
|
+
.salmon-rich-text-content :where([data-indent='3']) { padding-inline-start: 6em; }
|
|
1007
|
+
.salmon-rich-text-content :where([data-indent='4']) { padding-inline-start: 8em; }
|
|
1008
|
+
.salmon-rich-text-content :where([data-indent='5']) { padding-inline-start: 10em; }
|
|
1009
|
+
.salmon-rich-text-content :where([data-indent='6']) { padding-inline-start: 12em; }
|
|
1010
|
+
.salmon-rich-text-content :where([data-indent='7']) { padding-inline-start: 14em; }
|
|
1011
|
+
.salmon-rich-text-content :where([data-indent='8']) { padding-inline-start: 16em; }
|
|
1012
|
+
.salmon-rich-text-content blockquote {
|
|
1013
|
+
margin-inline: 0;
|
|
1014
|
+
padding-inline-start: 1em;
|
|
1015
|
+
border-inline-start: 3px solid var(--salmon-border-strong);
|
|
1016
|
+
color: var(--salmon-text-secondary);
|
|
1017
|
+
}
|
|
1018
|
+
.salmon-rich-text-content pre {
|
|
1019
|
+
padding: var(--salmon-space-2, 4px);
|
|
1020
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1021
|
+
background: var(--salmon-surface-sunken);
|
|
1022
|
+
font-family: var(--salmon-font-mono);
|
|
1023
|
+
white-space: pre-wrap;
|
|
1024
|
+
}
|
|
1025
|
+
.salmon-rich-text-content code {
|
|
1026
|
+
font-family: var(--salmon-font-mono);
|
|
1027
|
+
font-size: 0.92em;
|
|
1028
|
+
}
|
|
1029
|
+
.salmon-rich-text-content :not(pre) > code {
|
|
1030
|
+
padding: 0 3px;
|
|
1031
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1032
|
+
background: var(--salmon-surface-sunken);
|
|
1033
|
+
}
|
|
1034
|
+
.salmon-rich-text-content a {
|
|
1035
|
+
color: var(--salmon-text-link);
|
|
1036
|
+
}
|
|
1037
|
+
.salmon-rich-text-content img {
|
|
1038
|
+
max-inline-size: 100%;
|
|
1039
|
+
}
|
|
1040
|
+
.salmon-rich-text-content hr {
|
|
1041
|
+
border: 0;
|
|
1042
|
+
border-block-start: 1px solid var(--salmon-border-default);
|
|
1043
|
+
}
|
|
1044
|
+
.salmon-rich-text-content ul[data-type='checklist'] {
|
|
1045
|
+
padding-inline-start: 0;
|
|
1046
|
+
list-style: none;
|
|
1047
|
+
}
|
|
1048
|
+
.salmon-rich-text-content li[data-checked] {
|
|
1049
|
+
position: relative;
|
|
1050
|
+
padding-inline-start: 1.75em;
|
|
1051
|
+
}
|
|
1052
|
+
.salmon-rich-text-content li[data-checked]::before {
|
|
1053
|
+
content: '';
|
|
1054
|
+
position: absolute;
|
|
1055
|
+
inset-inline-start: 0.2em;
|
|
1056
|
+
inset-block-start: 0.3em;
|
|
1057
|
+
inline-size: 0.9em;
|
|
1058
|
+
block-size: 0.9em;
|
|
1059
|
+
box-sizing: border-box;
|
|
1060
|
+
border: 1.5px solid var(--salmon-border-strong);
|
|
1061
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1062
|
+
cursor: pointer;
|
|
1063
|
+
}
|
|
1064
|
+
.salmon-rich-text-content li[data-checked='true']::before {
|
|
1065
|
+
border-color: var(--salmon-color-primary);
|
|
1066
|
+
background: var(--salmon-color-primary);
|
|
1067
|
+
box-shadow: inset 0 0 0 2px var(--salmon-surface-base);
|
|
1068
|
+
}
|
|
1069
|
+
.salmon-rich-text-content li[data-checked='true'] > p {
|
|
1070
|
+
color: var(--salmon-text-secondary);
|
|
1071
|
+
text-decoration: line-through;
|
|
1072
|
+
}
|
|
1073
|
+
.salmon-rich-text-content table {
|
|
1074
|
+
border-collapse: collapse;
|
|
1075
|
+
table-layout: fixed;
|
|
1076
|
+
inline-size: 100%;
|
|
1077
|
+
}
|
|
1078
|
+
.salmon-rich-text-content :where(td, th) {
|
|
1079
|
+
position: relative;
|
|
1080
|
+
min-inline-size: 40px;
|
|
1081
|
+
padding: 4px 8px;
|
|
1082
|
+
border: 1px solid var(--salmon-border-default);
|
|
1083
|
+
vertical-align: top;
|
|
1084
|
+
}
|
|
1085
|
+
.salmon-rich-text-content th {
|
|
1086
|
+
background: var(--salmon-surface-header);
|
|
1087
|
+
font-weight: var(--salmon-font-weight-semibold, 600);
|
|
1088
|
+
text-align: start;
|
|
1089
|
+
}
|
|
1090
|
+
.salmon-rich-text-content .salmon-rich-text-table--striped tr:nth-child(even) td {
|
|
1091
|
+
background: var(--salmon-surface-sunken);
|
|
1092
|
+
}
|
|
1093
|
+
.salmon-rich-text-content .salmon-rich-text-table--bordered :where(td, th) {
|
|
1094
|
+
border-width: 2px;
|
|
1095
|
+
}
|
|
1096
|
+
.salmon-rich-text-content div[data-type='callout'] {
|
|
1097
|
+
padding: var(--salmon-space-2, 4px) var(--salmon-space-3, 8px);
|
|
1098
|
+
border-radius: var(--salmon-radius-md, 6px);
|
|
1099
|
+
background: var(--salmon-color-info-subtle);
|
|
1100
|
+
}
|
|
1101
|
+
.salmon-rich-text-content div[data-type='callout'][data-tone='success'] { background: var(--salmon-color-success-subtle); }
|
|
1102
|
+
.salmon-rich-text-content div[data-type='callout'][data-tone='warning'] { background: var(--salmon-color-warning-subtle); }
|
|
1103
|
+
.salmon-rich-text-content div[data-type='callout'][data-tone='danger'] { background: var(--salmon-color-danger-subtle); }
|
|
1104
|
+
.salmon-rich-text-content div[data-type='callout'][data-tone='neutral'] { background: var(--salmon-surface-sunken); }
|
|
1105
|
+
.salmon-rich-text-content span[data-type='mention'],
|
|
1106
|
+
.salmon-rich-text-content span[data-type='label'] {
|
|
1107
|
+
padding: 0 2px;
|
|
1108
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1109
|
+
background: var(--salmon-color-primary-subtle);
|
|
1110
|
+
color: var(--salmon-color-primary-text);
|
|
1111
|
+
}
|
|
1112
|
+
.salmon-rich-text-content :where(iframe, video) {
|
|
1113
|
+
max-inline-size: 100%;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/* Editing-only parts */
|
|
1117
|
+
.salmon-rich-text__content .ProseMirror-selectednode,
|
|
1118
|
+
.salmon-rich-text__image.ProseMirror-selectednode img {
|
|
1119
|
+
outline: 2px solid var(--salmon-border-selected);
|
|
1120
|
+
}
|
|
1121
|
+
.salmon-rich-text__image {
|
|
1122
|
+
position: relative;
|
|
1123
|
+
display: inline-block;
|
|
1124
|
+
line-height: 0;
|
|
1125
|
+
}
|
|
1126
|
+
.salmon-rich-text__resize-handle {
|
|
1127
|
+
position: absolute;
|
|
1128
|
+
inset-inline-end: -5px;
|
|
1129
|
+
inset-block-end: -5px;
|
|
1130
|
+
display: none;
|
|
1131
|
+
inline-size: 10px;
|
|
1132
|
+
block-size: 10px;
|
|
1133
|
+
border: 2px solid var(--salmon-surface-base);
|
|
1134
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1135
|
+
background: var(--salmon-color-primary);
|
|
1136
|
+
cursor: nwse-resize;
|
|
1137
|
+
touch-action: none;
|
|
1138
|
+
}
|
|
1139
|
+
.salmon-rich-text__image.ProseMirror-selectednode .salmon-rich-text__resize-handle,
|
|
1140
|
+
.salmon-rich-text__image--figure:hover .salmon-rich-text__resize-handle {
|
|
1141
|
+
display: block;
|
|
1142
|
+
}
|
|
1143
|
+
@media (pointer: coarse) {
|
|
1144
|
+
.salmon-rich-text__image--figure .salmon-rich-text__resize-handle {
|
|
1145
|
+
display: block;
|
|
1146
|
+
inline-size: 20px;
|
|
1147
|
+
block-size: 20px;
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
/* Code block language picker: a styled native select (sm metrics)
|
|
1151
|
+
on its own line at the block's inline end, so the code never wraps
|
|
1152
|
+
around it; the wrapper draws the chevron as a currentColor mask. */
|
|
1153
|
+
.salmon-rich-text__code-language {
|
|
1154
|
+
position: relative;
|
|
1155
|
+
display: flex;
|
|
1156
|
+
justify-content: flex-end;
|
|
1157
|
+
margin-block-end: var(--salmon-space-2, 4px);
|
|
1158
|
+
font-family: var(--salmon-font-sans, inherit);
|
|
1159
|
+
user-select: none;
|
|
1160
|
+
}
|
|
1161
|
+
.salmon-rich-text__code-language::after {
|
|
1162
|
+
content: '';
|
|
1163
|
+
position: absolute;
|
|
1164
|
+
inset-block: 0;
|
|
1165
|
+
inset-inline-end: 8px;
|
|
1166
|
+
inline-size: 14px;
|
|
1167
|
+
margin-block: auto;
|
|
1168
|
+
block-size: 14px;
|
|
1169
|
+
background: var(--salmon-text-secondary);
|
|
1170
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
|
|
1171
|
+
pointer-events: none;
|
|
1172
|
+
}
|
|
1173
|
+
.salmon-rich-text__code-language-select {
|
|
1174
|
+
box-sizing: border-box;
|
|
1175
|
+
block-size: var(--salmon-control-height-sm, 24px);
|
|
1176
|
+
margin: 0;
|
|
1177
|
+
padding-block: 0;
|
|
1178
|
+
/* Rule 6: base 8px, the end adds the 14px chevron box and a 4px gap. */
|
|
1179
|
+
padding-inline: 8px calc(8px + 14px + 4px);
|
|
1180
|
+
border: 1px solid var(--salmon-border-default);
|
|
1181
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1182
|
+
background: var(--salmon-surface-base);
|
|
1183
|
+
color: var(--salmon-text-primary);
|
|
1184
|
+
font: inherit;
|
|
1185
|
+
font-size: var(--salmon-font-size-sm, 12px);
|
|
1186
|
+
appearance: none;
|
|
1187
|
+
cursor: pointer;
|
|
1188
|
+
}
|
|
1189
|
+
.salmon-rich-text__code-language-select:hover {
|
|
1190
|
+
border-color: var(--salmon-border-strong);
|
|
1191
|
+
}
|
|
1192
|
+
.salmon-rich-text__code-language-select:focus-visible {
|
|
1193
|
+
outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring);
|
|
1194
|
+
outline-offset: var(--salmon-state-focus-ring-offset, 2px);
|
|
1195
|
+
}
|
|
1196
|
+
.salmon-rich-text__match {
|
|
1197
|
+
background: var(--salmon-color-warning-subtle);
|
|
1198
|
+
}
|
|
1199
|
+
.salmon-rich-text__match--current {
|
|
1200
|
+
outline: 2px solid var(--salmon-color-warning);
|
|
1201
|
+
}
|
|
1202
|
+
.salmon-rich-text__uploading {
|
|
1203
|
+
display: inline-block;
|
|
1204
|
+
padding: 0 6px;
|
|
1205
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1206
|
+
background: var(--salmon-surface-sunken);
|
|
1207
|
+
color: var(--salmon-text-secondary);
|
|
1208
|
+
font-size: var(--salmon-font-size-sm, 12px);
|
|
1209
|
+
}
|
|
1210
|
+
.salmon-rich-text__content .selectedCell::after {
|
|
1211
|
+
content: '';
|
|
1212
|
+
position: absolute;
|
|
1213
|
+
inset: 0;
|
|
1214
|
+
z-index: 1;
|
|
1215
|
+
background: var(--salmon-surface-selected);
|
|
1216
|
+
opacity: 0.5;
|
|
1217
|
+
pointer-events: none;
|
|
1218
|
+
}
|
|
1219
|
+
.salmon-rich-text__content .column-resize-handle {
|
|
1220
|
+
position: absolute;
|
|
1221
|
+
inset-block: 0;
|
|
1222
|
+
inset-inline-end: -2px;
|
|
1223
|
+
inline-size: 4px;
|
|
1224
|
+
background: var(--salmon-color-primary);
|
|
1225
|
+
pointer-events: none;
|
|
1226
|
+
}
|
|
1227
|
+
.salmon-rich-text__content.resize-cursor {
|
|
1228
|
+
cursor: col-resize;
|
|
1229
|
+
}
|
|
1230
|
+
.salmon-rich-text__content .tableWrapper {
|
|
1231
|
+
overflow-x: auto;
|
|
1232
|
+
}
|
|
1233
|
+
.salmon-rich-text__content .ProseMirror-gapcursor {
|
|
1234
|
+
display: none;
|
|
1235
|
+
position: absolute;
|
|
1236
|
+
pointer-events: none;
|
|
1237
|
+
}
|
|
1238
|
+
.salmon-rich-text__content .ProseMirror-gapcursor::after {
|
|
1239
|
+
content: '';
|
|
1240
|
+
position: absolute;
|
|
1241
|
+
display: block;
|
|
1242
|
+
inset-block-start: -2px;
|
|
1243
|
+
inline-size: 20px;
|
|
1244
|
+
border-block-start: 1px solid var(--salmon-text-primary);
|
|
1245
|
+
}
|
|
1246
|
+
.salmon-rich-text__content.ProseMirror-focused .ProseMirror-gapcursor {
|
|
1247
|
+
display: block;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
/* Popups, quick toolbars and dialogs */
|
|
1251
|
+
.salmon-rich-text__quick,
|
|
1252
|
+
.salmon-rich-text__popup {
|
|
1253
|
+
z-index: 1000;
|
|
1254
|
+
box-sizing: border-box;
|
|
1255
|
+
border: 1px solid var(--salmon-border-default);
|
|
1256
|
+
border-radius: var(--salmon-radius-lg, 10px);
|
|
1257
|
+
background: var(--salmon-surface-overlay);
|
|
1258
|
+
box-shadow: var(--salmon-shadow-md);
|
|
1259
|
+
}
|
|
1260
|
+
.salmon-rich-text__toolbar--quick {
|
|
1261
|
+
border: 0;
|
|
1262
|
+
background: transparent;
|
|
1263
|
+
flex-wrap: wrap;
|
|
1264
|
+
max-inline-size: min(420px, calc(100vw - 16px));
|
|
1265
|
+
}
|
|
1266
|
+
.salmon-rich-text__popup {
|
|
1267
|
+
min-inline-size: 200px;
|
|
1268
|
+
padding: 4px;
|
|
1269
|
+
}
|
|
1270
|
+
.salmon-rich-text__options--grid {
|
|
1271
|
+
max-block-size: 240px;
|
|
1272
|
+
overflow: auto;
|
|
1273
|
+
}
|
|
1274
|
+
.salmon-rich-text__options--grid {
|
|
1275
|
+
display: grid;
|
|
1276
|
+
grid-template-columns: repeat(8, 32px);
|
|
1277
|
+
}
|
|
1278
|
+
.salmon-rich-text__option {
|
|
1279
|
+
padding: 4px 8px;
|
|
1280
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1281
|
+
cursor: pointer;
|
|
1282
|
+
}
|
|
1283
|
+
.salmon-rich-text__options--grid .salmon-rich-text__option {
|
|
1284
|
+
padding: 4px 0;
|
|
1285
|
+
text-align: center;
|
|
1286
|
+
font-size: 18px;
|
|
1287
|
+
}
|
|
1288
|
+
.salmon-rich-text__option[aria-selected='true'] {
|
|
1289
|
+
background: var(--salmon-surface-selected);
|
|
1290
|
+
}
|
|
1291
|
+
.salmon-rich-text__empty {
|
|
1292
|
+
padding: 4px 8px;
|
|
1293
|
+
color: var(--salmon-text-secondary);
|
|
1294
|
+
}
|
|
1295
|
+
.salmon-rich-text__emoji-search {
|
|
1296
|
+
box-sizing: border-box;
|
|
1297
|
+
inline-size: 100%;
|
|
1298
|
+
margin-block-end: 4px;
|
|
1299
|
+
padding: 4px 6px;
|
|
1300
|
+
border: 1px solid var(--salmon-border-default);
|
|
1301
|
+
border-radius: var(--salmon-radius-md, 6px);
|
|
1302
|
+
background: var(--salmon-surface-base);
|
|
1303
|
+
color: inherit;
|
|
1304
|
+
}
|
|
1305
|
+
.salmon-rich-text__backdrop {
|
|
1306
|
+
position: fixed;
|
|
1307
|
+
inset: 0;
|
|
1308
|
+
z-index: 1100;
|
|
1309
|
+
display: grid;
|
|
1310
|
+
place-items: center;
|
|
1311
|
+
background: var(--salmon-surface-backdrop);
|
|
1312
|
+
}
|
|
1313
|
+
.salmon-rich-text__dialog {
|
|
1314
|
+
box-sizing: border-box;
|
|
1315
|
+
inline-size: min(420px, calc(100vw - 32px));
|
|
1316
|
+
max-block-size: calc(100vh - 32px);
|
|
1317
|
+
overflow: auto;
|
|
1318
|
+
padding: var(--salmon-space-4, 12px);
|
|
1319
|
+
border-radius: var(--salmon-radius-lg, 10px);
|
|
1320
|
+
background: var(--salmon-surface-overlay);
|
|
1321
|
+
color: var(--salmon-text-primary);
|
|
1322
|
+
box-shadow: var(--salmon-shadow-lg);
|
|
1323
|
+
}
|
|
1324
|
+
.salmon-rich-text__dialog-title {
|
|
1325
|
+
margin: 0 0 var(--salmon-space-3, 8px);
|
|
1326
|
+
font-size: var(--salmon-font-size-lg, 16px);
|
|
1327
|
+
}
|
|
1328
|
+
.salmon-rich-text__field {
|
|
1329
|
+
display: flex;
|
|
1330
|
+
flex: 1;
|
|
1331
|
+
flex-direction: column;
|
|
1332
|
+
gap: 4px;
|
|
1333
|
+
margin-block-end: var(--salmon-space-2, 4px);
|
|
1334
|
+
}
|
|
1335
|
+
.salmon-rich-text__field :where(input:not([type='file']), textarea) {
|
|
1336
|
+
box-sizing: border-box;
|
|
1337
|
+
padding: 6px 8px;
|
|
1338
|
+
border: 1px solid var(--salmon-border-default);
|
|
1339
|
+
border-radius: var(--salmon-radius-md, 6px);
|
|
1340
|
+
background: var(--salmon-surface-base);
|
|
1341
|
+
color: inherit;
|
|
1342
|
+
font: inherit;
|
|
1343
|
+
}
|
|
1344
|
+
.salmon-rich-text__field [aria-invalid='true'] {
|
|
1345
|
+
border-color: var(--salmon-state-invalid);
|
|
1346
|
+
}
|
|
1347
|
+
.salmon-rich-text__row {
|
|
1348
|
+
display: flex;
|
|
1349
|
+
gap: var(--salmon-space-2, 4px);
|
|
1350
|
+
}
|
|
1351
|
+
.salmon-rich-text__check {
|
|
1352
|
+
display: flex;
|
|
1353
|
+
align-items: center;
|
|
1354
|
+
gap: 6px;
|
|
1355
|
+
margin-block-end: var(--salmon-space-2, 4px);
|
|
1356
|
+
}
|
|
1357
|
+
.salmon-rich-text__dialog-actions {
|
|
1358
|
+
display: flex;
|
|
1359
|
+
flex-wrap: wrap;
|
|
1360
|
+
justify-content: flex-end;
|
|
1361
|
+
gap: var(--salmon-space-2, 4px);
|
|
1362
|
+
margin-block-start: var(--salmon-space-3, 8px);
|
|
1363
|
+
}
|
|
1364
|
+
.salmon-rich-text__status-line {
|
|
1365
|
+
min-block-size: 1.5em;
|
|
1366
|
+
margin: 0;
|
|
1367
|
+
color: var(--salmon-text-secondary);
|
|
1368
|
+
}
|
|
1369
|
+
.salmon-rich-text__ai-output {
|
|
1370
|
+
min-block-size: 3em;
|
|
1371
|
+
max-block-size: 200px;
|
|
1372
|
+
overflow: auto;
|
|
1373
|
+
padding: var(--salmon-space-2, 4px);
|
|
1374
|
+
border-radius: var(--salmon-radius-sm, 4px);
|
|
1375
|
+
background: var(--salmon-surface-sunken);
|
|
1376
|
+
white-space: pre-wrap;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1380
|
+
.salmon-rich-text,
|
|
1381
|
+
.salmon-rich-text * {
|
|
1382
|
+
transition: none !important;
|
|
1383
|
+
animation: none !important;
|
|
1384
|
+
}
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
/* BlockEditor */
|
|
1388
|
+
.salmon-block-editor {
|
|
1389
|
+
position: relative;
|
|
1390
|
+
padding-inline-start: 2rem;
|
|
1391
|
+
color: var(--salmon-text-primary);
|
|
1392
|
+
background: var(--salmon-surface-base);
|
|
1393
|
+
}
|
|
1394
|
+
.salmon-block-editor__content {
|
|
1395
|
+
min-block-size: 3rem;
|
|
1396
|
+
outline: none;
|
|
1397
|
+
white-space: pre-wrap;
|
|
1398
|
+
overflow-wrap: break-word;
|
|
1399
|
+
}
|
|
1400
|
+
.salmon-block-editor__content:focus-visible {
|
|
1401
|
+
outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring);
|
|
1402
|
+
outline-offset: var(--salmon-state-focus-ring-offset, 2px);
|
|
1403
|
+
border-radius: var(--salmon-radius-sm);
|
|
1404
|
+
}
|
|
1405
|
+
.salmon-block-editor__content figure img {
|
|
1406
|
+
max-inline-size: 100%;
|
|
1407
|
+
}
|
|
1408
|
+
.salmon-block-editor__content figcaption {
|
|
1409
|
+
color: var(--salmon-text-secondary);
|
|
1410
|
+
font-size: var(--salmon-font-size-sm);
|
|
1411
|
+
}
|
|
1412
|
+
.salmon-block-editor__handle {
|
|
1413
|
+
position: absolute;
|
|
1414
|
+
inset-block-start: 0;
|
|
1415
|
+
inset-inline-start: 0;
|
|
1416
|
+
inline-size: 1.25rem;
|
|
1417
|
+
block-size: 1.5rem;
|
|
1418
|
+
display: grid;
|
|
1419
|
+
place-items: center;
|
|
1420
|
+
padding: 0;
|
|
1421
|
+
border: 0;
|
|
1422
|
+
border-radius: var(--salmon-radius-sm);
|
|
1423
|
+
background: transparent;
|
|
1424
|
+
color: var(--salmon-text-secondary);
|
|
1425
|
+
cursor: grab;
|
|
1426
|
+
touch-action: none;
|
|
1427
|
+
opacity: 0;
|
|
1428
|
+
transition: opacity 120ms ease;
|
|
1429
|
+
}
|
|
1430
|
+
.salmon-block-editor__handle[data-visible='true'] {
|
|
1431
|
+
opacity: 1;
|
|
1432
|
+
}
|
|
1433
|
+
.salmon-block-editor__handle:hover,
|
|
1434
|
+
.salmon-block-editor__handle:focus-visible {
|
|
1435
|
+
background: var(--salmon-surface-sunken);
|
|
1436
|
+
color: var(--salmon-text-primary);
|
|
1437
|
+
}
|
|
1438
|
+
.salmon-block-editor__handle:focus-visible {
|
|
1439
|
+
outline: var(--salmon-state-focus-ring-width, 2px) solid var(--salmon-state-focus-ring);
|
|
1440
|
+
outline-offset: var(--salmon-state-focus-ring-offset, 2px);
|
|
1441
|
+
}
|
|
1442
|
+
.salmon-block-editor[data-dragging='true'] .salmon-block-editor__handle {
|
|
1443
|
+
cursor: grabbing;
|
|
1444
|
+
}
|
|
1445
|
+
.salmon-block-editor__grip {
|
|
1446
|
+
inline-size: 0.5rem;
|
|
1447
|
+
block-size: 0.875rem;
|
|
1448
|
+
background-image: radial-gradient(currentColor 1.2px, transparent 1.4px);
|
|
1449
|
+
background-size: 0.25rem 0.29rem;
|
|
1450
|
+
}
|
|
1451
|
+
.salmon-block-editor__drop-indicator {
|
|
1452
|
+
position: absolute;
|
|
1453
|
+
block-size: 2px;
|
|
1454
|
+
margin-block-start: -1px;
|
|
1455
|
+
background: var(--salmon-color-primary);
|
|
1456
|
+
pointer-events: none;
|
|
1457
|
+
display: none;
|
|
1458
|
+
}
|
|
1459
|
+
.salmon-block-editor__drop-indicator[data-visible='true'] {
|
|
1460
|
+
display: block;
|
|
1461
|
+
}
|
|
1462
|
+
.salmon-block-editor[data-dragging='true'] .salmon-block-editor__content {
|
|
1463
|
+
cursor: grabbing;
|
|
1464
|
+
user-select: none;
|
|
1465
|
+
}
|
|
1466
|
+
.salmon-block-editor__slash,
|
|
1467
|
+
.salmon-block-editor__menu-popover,
|
|
1468
|
+
.salmon-block-editor__toolbar-popover {
|
|
1469
|
+
z-index: 20;
|
|
1470
|
+
}
|
|
1471
|
+
.salmon-block-editor__slash {
|
|
1472
|
+
min-inline-size: 14rem;
|
|
1473
|
+
max-block-size: 20rem;
|
|
1474
|
+
overflow-y: auto;
|
|
1475
|
+
padding: var(--salmon-space-2);
|
|
1476
|
+
border: 1px solid var(--salmon-border-default);
|
|
1477
|
+
border-radius: var(--salmon-radius-lg);
|
|
1478
|
+
background: var(--salmon-surface-overlay);
|
|
1479
|
+
}
|
|
1480
|
+
.salmon-block-editor__group {
|
|
1481
|
+
padding: var(--salmon-space-2);
|
|
1482
|
+
color: var(--salmon-text-secondary);
|
|
1483
|
+
font-size: var(--salmon-font-size-sm);
|
|
1484
|
+
font-weight: var(--salmon-font-weight-semibold);
|
|
1485
|
+
}
|
|
1486
|
+
.salmon-block-editor__option {
|
|
1487
|
+
padding: var(--salmon-space-2) var(--salmon-space-3);
|
|
1488
|
+
border-radius: var(--salmon-radius-sm);
|
|
1489
|
+
cursor: pointer;
|
|
1490
|
+
}
|
|
1491
|
+
.salmon-block-editor__option[aria-selected='true'] {
|
|
1492
|
+
background: var(--salmon-surface-selected);
|
|
1493
|
+
}
|
|
1494
|
+
.salmon-block-editor__empty {
|
|
1495
|
+
padding: var(--salmon-space-2) var(--salmon-space-3);
|
|
1496
|
+
color: var(--salmon-text-secondary);
|
|
1497
|
+
}
|
|
1498
|
+
.salmon-block-editor__toolbar,
|
|
1499
|
+
.salmon-block-editor__link-form {
|
|
1500
|
+
display: flex;
|
|
1501
|
+
gap: 2px;
|
|
1502
|
+
align-items: center;
|
|
1503
|
+
padding: 2px;
|
|
1504
|
+
border: 1px solid var(--salmon-border-default);
|
|
1505
|
+
border-radius: var(--salmon-radius-lg);
|
|
1506
|
+
background: var(--salmon-surface-overlay);
|
|
1507
|
+
}
|
|
1508
|
+
.salmon-block-editor__link-input {
|
|
1509
|
+
min-inline-size: 14rem;
|
|
1510
|
+
padding: var(--salmon-space-2);
|
|
1511
|
+
border: 1px solid var(--salmon-border-default);
|
|
1512
|
+
border-radius: var(--salmon-radius-md);
|
|
1513
|
+
background: var(--salmon-surface-base);
|
|
1514
|
+
color: var(--salmon-text-primary);
|
|
1515
|
+
}
|
|
1516
|
+
.salmon-block-editor--readonly .salmon-block-editor__content {
|
|
1517
|
+
cursor: default;
|
|
1518
|
+
}
|
|
1519
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1520
|
+
.salmon-block-editor__handle {
|
|
1521
|
+
transition: none;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
@media print {
|
|
1525
|
+
.salmon-block-editor__handle,
|
|
1526
|
+
.salmon-block-editor__drop-indicator {
|
|
1527
|
+
display: none;
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
/* Collaboration (`/collab`): remote cursors and selections from y-prosemirror's
|
|
1532
|
+
default cursor builder; the user's color is set inline by the builder. */
|
|
1533
|
+
.salmon-rich-text-content .ProseMirror-yjs-cursor {
|
|
1534
|
+
position: relative;
|
|
1535
|
+
margin-inline: -1px;
|
|
1536
|
+
border-inline-start: 1px solid;
|
|
1537
|
+
border-inline-end: 1px solid;
|
|
1538
|
+
word-break: normal;
|
|
1539
|
+
pointer-events: none;
|
|
1540
|
+
}
|
|
1541
|
+
.salmon-rich-text-content .ProseMirror-yjs-cursor > div {
|
|
1542
|
+
position: absolute;
|
|
1543
|
+
inset-block-end: 100%;
|
|
1544
|
+
inset-inline-start: -1px;
|
|
1545
|
+
padding: 0 0.25rem;
|
|
1546
|
+
border-radius: var(--salmon-radius-sm);
|
|
1547
|
+
color: var(--salmon-color-primary-on);
|
|
1548
|
+
font-size: 0.75rem;
|
|
1549
|
+
font-weight: var(--salmon-font-weight-semibold);
|
|
1550
|
+
line-height: 1.4;
|
|
1551
|
+
white-space: nowrap;
|
|
1552
|
+
user-select: none;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
}
|