@liveblocks/react-ui 2.7.2 → 2.8.0-beta2
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/_private/index.d.mts +5 -3
- package/dist/_private/index.d.ts +5 -3
- package/dist/_private/index.js +4 -2
- package/dist/_private/index.js.map +1 -1
- package/dist/_private/index.mjs +2 -1
- package/dist/_private/index.mjs.map +1 -1
- package/dist/components/Comment.js +106 -3
- package/dist/components/Comment.js.map +1 -1
- package/dist/components/Comment.mjs +107 -5
- package/dist/components/Comment.mjs.map +1 -1
- package/dist/components/Composer.js +216 -103
- package/dist/components/Composer.js.map +1 -1
- package/dist/components/Composer.mjs +220 -107
- package/dist/components/Composer.mjs.map +1 -1
- package/dist/components/HistoryVersionSummary.js +5 -0
- package/dist/components/HistoryVersionSummary.js.map +1 -1
- package/dist/components/HistoryVersionSummary.mjs +5 -0
- package/dist/components/HistoryVersionSummary.mjs.map +1 -1
- package/dist/components/InboxNotification.js +20 -4
- package/dist/components/InboxNotification.js.map +1 -1
- package/dist/components/InboxNotification.mjs +20 -4
- package/dist/components/InboxNotification.mjs.map +1 -1
- package/dist/components/Thread.js +5 -0
- package/dist/components/Thread.js.map +1 -1
- package/dist/components/Thread.mjs +5 -0
- package/dist/components/Thread.mjs.map +1 -1
- package/dist/components/internal/Attachment.js +314 -0
- package/dist/components/internal/Attachment.js.map +1 -0
- package/dist/components/internal/Attachment.mjs +310 -0
- package/dist/components/internal/Attachment.mjs.map +1 -0
- package/dist/components/internal/InboxNotificationThread.js +12 -2
- package/dist/components/internal/InboxNotificationThread.js.map +1 -1
- package/dist/components/internal/InboxNotificationThread.mjs +13 -3
- package/dist/components/internal/InboxNotificationThread.mjs.map +1 -1
- package/dist/icons/Attachment.js +15 -0
- package/dist/icons/Attachment.js.map +1 -0
- package/dist/icons/Attachment.mjs +13 -0
- package/dist/icons/Attachment.mjs.map +1 -0
- package/dist/icons/Spinner.js +3 -9
- package/dist/icons/Spinner.js.map +1 -1
- package/dist/icons/Spinner.mjs +4 -10
- package/dist/icons/Spinner.mjs.map +1 -1
- package/dist/icons/{Missing.js → Warning.js} +3 -3
- package/dist/icons/{Missing.js.map → Warning.js.map} +1 -1
- package/dist/icons/{Missing.mjs → Warning.mjs} +3 -3
- package/dist/icons/{Missing.mjs.map → Warning.mjs.map} +1 -1
- package/dist/index.d.mts +73 -4
- package/dist/index.d.ts +73 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/overrides.js +5 -0
- package/dist/overrides.js.map +1 -1
- package/dist/overrides.mjs +5 -0
- package/dist/overrides.mjs.map +1 -1
- package/dist/primitives/Composer/contexts.js +17 -3
- package/dist/primitives/Composer/contexts.js.map +1 -1
- package/dist/primitives/Composer/contexts.mjs +15 -4
- package/dist/primitives/Composer/contexts.mjs.map +1 -1
- package/dist/primitives/Composer/index.js +207 -30
- package/dist/primitives/Composer/index.js.map +1 -1
- package/dist/primitives/Composer/index.mjs +210 -35
- package/dist/primitives/Composer/index.mjs.map +1 -1
- package/dist/primitives/Composer/utils.js +231 -0
- package/dist/primitives/Composer/utils.js.map +1 -1
- package/dist/primitives/Composer/utils.mjs +229 -1
- package/dist/primitives/Composer/utils.mjs.map +1 -1
- package/dist/primitives/EmojiPicker/utils.js +2 -2
- package/dist/primitives/EmojiPicker/utils.js.map +1 -1
- package/dist/primitives/EmojiPicker/utils.mjs +1 -1
- package/dist/primitives/EmojiPicker/utils.mjs.map +1 -1
- package/dist/primitives/FileSize.js +33 -0
- package/dist/primitives/FileSize.js.map +1 -0
- package/dist/primitives/FileSize.mjs +31 -0
- package/dist/primitives/FileSize.mjs.map +1 -0
- package/dist/primitives/index.d.mts +87 -3
- package/dist/primitives/index.d.ts +87 -3
- package/dist/primitives/index.js +4 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/index.mjs +2 -0
- package/dist/primitives/index.mjs.map +1 -1
- package/dist/slate/plugins/{paste-html.js → paste.js} +16 -5
- package/dist/slate/plugins/paste.js.map +1 -0
- package/dist/slate/plugins/{paste-html.mjs → paste.mjs} +16 -5
- package/dist/slate/plugins/paste.mjs.map +1 -0
- package/dist/utils/data-transfer.js +20 -0
- package/dist/utils/data-transfer.js.map +1 -0
- package/dist/utils/data-transfer.mjs +18 -0
- package/dist/utils/data-transfer.mjs.map +1 -0
- package/dist/utils/download.js +14 -0
- package/dist/utils/download.js.map +1 -0
- package/dist/utils/download.mjs +12 -0
- package/dist/utils/download.mjs.map +1 -0
- package/dist/utils/format-file-size.js +45 -0
- package/dist/utils/format-file-size.js.map +1 -0
- package/dist/utils/format-file-size.mjs +43 -0
- package/dist/utils/format-file-size.mjs.map +1 -0
- package/dist/utils/intl.js +6 -0
- package/dist/utils/intl.js.map +1 -1
- package/dist/utils/intl.mjs +6 -1
- package/dist/utils/intl.mjs.map +1 -1
- package/dist/utils/use-initial.js +2 -1
- package/dist/utils/use-initial.js.map +1 -1
- package/dist/utils/use-initial.mjs +3 -2
- package/dist/utils/use-initial.mjs.map +1 -1
- package/dist/utils/use-latest.js.map +1 -1
- package/dist/utils/use-latest.mjs.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/package.json +4 -4
- package/src/styles/dark/index.css +1 -0
- package/src/styles/index.css +343 -62
- package/src/styles/utils.css +44 -0
- package/styles/dark/attributes.css +1 -1
- package/styles/dark/attributes.css.map +1 -1
- package/styles/dark/media-query.css +1 -1
- package/styles/dark/media-query.css.map +1 -1
- package/styles.css +1 -1
- package/styles.css.map +1 -1
- package/dist/slate/plugins/paste-html.js.map +0 -1
- package/dist/slate/plugins/paste-html.mjs.map +0 -1
- package/dist/utils/chunk.js +0 -12
- package/dist/utils/chunk.js.map +0 -1
- package/dist/utils/chunk.mjs +0 -10
- package/dist/utils/chunk.mjs.map +0 -1
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-ui\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":";;AAGO,MAAM,QAAW,GAAA,uBAAA;AACX,MAAA,WAAA,GAAiD,
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-ui\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":";;AAGO,MAAM,QAAW,GAAA,uBAAA;AACX,MAAA,WAAA,GAAiD,cAAA;AACjD,MAAA,UAAA,GAAkD;;;;;;"}
|
package/dist/version.mjs
CHANGED
package/dist/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-ui\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":"AAGO,MAAM,QAAW,GAAA,uBAAA;AACX,MAAA,WAAA,GAAiD,
|
|
1
|
+
{"version":3,"file":"version.mjs","sources":["../src/version.ts"],"sourcesContent":["declare const __VERSION__: string;\ndeclare const ROLLUP_FORMAT: string;\n\nexport const PKG_NAME = \"@liveblocks/react-ui\";\nexport const PKG_VERSION = typeof __VERSION__ === \"string\" && __VERSION__;\nexport const PKG_FORMAT = typeof ROLLUP_FORMAT === \"string\" && ROLLUP_FORMAT;\n"],"names":[],"mappings":"AAGO,MAAM,QAAW,GAAA,uBAAA;AACX,MAAA,WAAA,GAAiD,cAAA;AACjD,MAAA,UAAA,GAAkD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0-beta2",
|
|
4
4
|
"description": "A set of React pre-built components for the Liveblocks products. Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@floating-ui/react-dom": "^2.1.1",
|
|
78
|
-
"@liveblocks/client": "2.
|
|
79
|
-
"@liveblocks/core": "2.
|
|
80
|
-
"@liveblocks/react": "2.
|
|
78
|
+
"@liveblocks/client": "2.8.0-beta2",
|
|
79
|
+
"@liveblocks/core": "2.8.0-beta2",
|
|
80
|
+
"@liveblocks/react": "2.8.0-beta2",
|
|
81
81
|
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
82
82
|
"@radix-ui/react-popover": "^1.0.7",
|
|
83
83
|
"@radix-ui/react-slot": "^1.0.2",
|
package/src/styles/index.css
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
--lb-button-radius: calc(0.75 * var(--lb-radius));
|
|
24
24
|
--lb-transition-duration: 0.1s;
|
|
25
25
|
--lb-transition-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
26
|
+
--lb-highlight-shadow: inset 0 0 0 1px rgb(0 0 0 / 10%);
|
|
26
27
|
--lb-elevation-shadow: $lb-elevation-shadow;
|
|
27
28
|
--lb-tooltip-shadow: $lb-tooltip-shadow;
|
|
28
29
|
--lb-accent-contrast: 8%;
|
|
@@ -163,6 +164,11 @@
|
|
|
163
164
|
}
|
|
164
165
|
}
|
|
165
166
|
|
|
167
|
+
.lb-icon-spinner {
|
|
168
|
+
transform-origin: center;
|
|
169
|
+
animation: lb-animation-spin 0.75s linear infinite;
|
|
170
|
+
}
|
|
171
|
+
|
|
166
172
|
/*************************************
|
|
167
173
|
* Button *
|
|
168
174
|
*************************************/
|
|
@@ -170,40 +176,15 @@
|
|
|
170
176
|
.lb-button {
|
|
171
177
|
--lb-button-background: var(--lb-dynamic-background);
|
|
172
178
|
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
@include button;
|
|
180
|
+
|
|
175
181
|
display: flex;
|
|
176
182
|
justify-content: center;
|
|
177
183
|
align-items: center;
|
|
178
|
-
box-sizing: inherit;
|
|
179
184
|
padding: calc(0.25 * var(--lb-spacing));
|
|
180
185
|
border-radius: var(--lb-button-radius);
|
|
181
186
|
background: var(--lb-button-background);
|
|
182
187
|
color: var(--lb-foreground-moderate);
|
|
183
|
-
outline: none;
|
|
184
|
-
cursor: pointer;
|
|
185
|
-
user-select: none;
|
|
186
|
-
transition-property: background, color, opacity;
|
|
187
|
-
-webkit-tap-highlight-color: transparent;
|
|
188
|
-
|
|
189
|
-
&::after {
|
|
190
|
-
content: "";
|
|
191
|
-
position: absolute;
|
|
192
|
-
inset: 0;
|
|
193
|
-
border-radius: inherit;
|
|
194
|
-
pointer-events: none;
|
|
195
|
-
transition-property: box-shadow;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
&:where(:focus-visible) {
|
|
199
|
-
z-index: 1;
|
|
200
|
-
|
|
201
|
-
&::after {
|
|
202
|
-
box-shadow:
|
|
203
|
-
var(--lb-dynamic-background) 0 0 0 2px,
|
|
204
|
-
var(--lb-accent) 0 0 0 4px;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
188
|
|
|
208
189
|
&:where(.lb-button\:non-disableable:disabled) {
|
|
209
190
|
cursor: default;
|
|
@@ -481,6 +462,7 @@
|
|
|
481
462
|
position: relative;
|
|
482
463
|
display: flex;
|
|
483
464
|
align-items: center;
|
|
465
|
+
max-inline-size: 300px;
|
|
484
466
|
min-block-size: calc(
|
|
485
467
|
$lb-tooltip-shortcut-height + 2 * $lb-tooltip-additional-padding
|
|
486
468
|
);
|
|
@@ -491,6 +473,7 @@
|
|
|
491
473
|
box-shadow: var(--lb-tooltip-shadow);
|
|
492
474
|
font-size: 0.75rem;
|
|
493
475
|
line-height: 1;
|
|
476
|
+
overflow-wrap: anywhere;
|
|
494
477
|
pointer-events: none;
|
|
495
478
|
|
|
496
479
|
&::after {
|
|
@@ -666,6 +649,7 @@
|
|
|
666
649
|
*************************************/
|
|
667
650
|
|
|
668
651
|
.lb-composer {
|
|
652
|
+
position: relative;
|
|
669
653
|
background: var(--lb-dynamic-background);
|
|
670
654
|
color: var(--lb-foreground);
|
|
671
655
|
transition-property: background;
|
|
@@ -675,37 +659,16 @@
|
|
|
675
659
|
margin: 0;
|
|
676
660
|
}
|
|
677
661
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
@supports selector(:has(*)) {
|
|
682
|
-
.lb-composer:where(:has(.lb-composer-editor:not(:focus-visible))) {
|
|
683
|
-
:where(.lb-button[data-variant="primary"]) {
|
|
684
|
-
--lb-button-background: var(--lb-foreground-subtle);
|
|
685
|
-
|
|
686
|
-
color: var(--lb-foreground-tertiary);
|
|
687
|
-
|
|
688
|
-
&:where(:enabled:hover, :enabled:focus-visible) {
|
|
689
|
-
--lb-button-background: var(--lb-accent);
|
|
690
|
-
|
|
691
|
-
color: var(--lb-accent-foreground);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
@supports not selector(:has(*)) {
|
|
698
|
-
.lb-composer:where(:not(:focus-within)) {
|
|
699
|
-
:where(.lb-button[data-variant="primary"]) {
|
|
700
|
-
--lb-button-background: var(--lb-foreground-subtle);
|
|
662
|
+
.lb-composer:where(:has(.lb-composer-editor:not(:focus-visible))) {
|
|
663
|
+
:where(.lb-button[data-variant="primary"]) {
|
|
664
|
+
--lb-button-background: var(--lb-foreground-subtle);
|
|
701
665
|
|
|
702
|
-
|
|
666
|
+
color: var(--lb-foreground-tertiary);
|
|
703
667
|
|
|
704
|
-
|
|
705
|
-
|
|
668
|
+
&:where(:enabled:hover, :enabled:focus-visible) {
|
|
669
|
+
--lb-button-background: var(--lb-accent);
|
|
706
670
|
|
|
707
|
-
|
|
708
|
-
}
|
|
671
|
+
color: var(--lb-accent-foreground);
|
|
709
672
|
}
|
|
710
673
|
}
|
|
711
674
|
}
|
|
@@ -714,6 +677,10 @@
|
|
|
714
677
|
padding: var(--lb-spacing);
|
|
715
678
|
outline: none;
|
|
716
679
|
|
|
680
|
+
:where(.lb-composer-editor-container:has(.lb-composer-attachments)) & {
|
|
681
|
+
padding-block-end: calc(0.25 * var(--lb-spacing));
|
|
682
|
+
}
|
|
683
|
+
|
|
717
684
|
:where([data-placeholder]) {
|
|
718
685
|
color: var(--lb-foreground-moderate);
|
|
719
686
|
}
|
|
@@ -733,6 +700,7 @@
|
|
|
733
700
|
gap: calc(0.75 * var(--lb-spacing));
|
|
734
701
|
align-items: center;
|
|
735
702
|
block-size: calc($lb-button-size + var(--lb-spacing));
|
|
703
|
+
margin-block-start: calc(-0.125 * var(--lb-spacing));
|
|
736
704
|
padding: 0 var(--lb-spacing) var(--lb-spacing);
|
|
737
705
|
}
|
|
738
706
|
|
|
@@ -761,12 +729,57 @@
|
|
|
761
729
|
}
|
|
762
730
|
}
|
|
763
731
|
|
|
764
|
-
.lb-composer
|
|
765
|
-
:
|
|
766
|
-
|
|
732
|
+
.lb-composer-attachments {
|
|
733
|
+
padding-inline: var(--lb-spacing);
|
|
734
|
+
padding-block-start: calc(0.75 * var(--lb-spacing));
|
|
735
|
+
padding-block-end: var(--lb-spacing);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.lb-composer-editor-container:where([data-drop]) * {
|
|
739
|
+
pointer-events: none;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.lb-composer-attachments-drop-area {
|
|
743
|
+
position: absolute;
|
|
744
|
+
inset: 0;
|
|
745
|
+
display: flex;
|
|
746
|
+
place-content: center;
|
|
747
|
+
place-items: center;
|
|
748
|
+
color: var(--lb-accent);
|
|
749
|
+
|
|
750
|
+
&::before,
|
|
751
|
+
&::after {
|
|
752
|
+
content: "";
|
|
753
|
+
position: absolute;
|
|
754
|
+
inset: calc(0.5 * var(--lb-spacing));
|
|
755
|
+
z-index: 0;
|
|
756
|
+
border-radius: calc(0.75 * var(--lb-radius));
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
&::before {
|
|
760
|
+
background: currentcolor;
|
|
761
|
+
opacity: calc(1 * var(--lb-accent-contrast));
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
&::after {
|
|
765
|
+
border: 2px dashed currentcolor;
|
|
766
|
+
opacity: calc(2 * var(--lb-accent-contrast));
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
|
|
770
|
+
.lb-composer-attachments-drop-area-label {
|
|
771
|
+
position: relative;
|
|
772
|
+
display: flex;
|
|
773
|
+
gap: calc(0.25 * var(--lb-spacing));
|
|
774
|
+
place-items: center;
|
|
775
|
+
padding: calc(0.375 * var(--lb-spacing)) calc(0.5 * var(--lb-spacing));
|
|
776
|
+
border-radius: calc(0.75 * var(--lb-radius));
|
|
777
|
+
background: var(--lb-accent);
|
|
778
|
+
color: var(--lb-accent-foreground);
|
|
779
|
+
font-weight: 500;
|
|
780
|
+
pointer-events: none;
|
|
781
|
+
}
|
|
782
|
+
|
|
770
783
|
/*************************************
|
|
771
784
|
* Comment *
|
|
772
785
|
*************************************/
|
|
@@ -877,6 +890,10 @@
|
|
|
877
890
|
}
|
|
878
891
|
}
|
|
879
892
|
|
|
893
|
+
.lb-comment-attachments {
|
|
894
|
+
margin-block-start: calc(0.75 * var(--lb-spacing));
|
|
895
|
+
}
|
|
896
|
+
|
|
880
897
|
.lb-comment-reactions {
|
|
881
898
|
display: flex;
|
|
882
899
|
flex-wrap: wrap;
|
|
@@ -982,7 +999,7 @@
|
|
|
982
999
|
min-block-size: calc(var(--lb-comment-avatar-size) + var(--lb-spacing));
|
|
983
1000
|
}
|
|
984
1001
|
|
|
985
|
-
&:where(:first-of-type) {
|
|
1002
|
+
&:where(:first-of-type, [data-editing]) {
|
|
986
1003
|
padding-block-start: var(--lb-spacing);
|
|
987
1004
|
|
|
988
1005
|
&:where(.lb-comment\:indent-content) {
|
|
@@ -992,7 +1009,7 @@
|
|
|
992
1009
|
}
|
|
993
1010
|
}
|
|
994
1011
|
|
|
995
|
-
&:where(:last-of-type) {
|
|
1012
|
+
&:where(:last-of-type, [data-editing]) {
|
|
996
1013
|
padding-block-end: var(--lb-spacing);
|
|
997
1014
|
|
|
998
1015
|
&:where(.lb-comment\:indent-content) {
|
|
@@ -1055,6 +1072,259 @@
|
|
|
1055
1072
|
}
|
|
1056
1073
|
}
|
|
1057
1074
|
|
|
1075
|
+
/*************************************
|
|
1076
|
+
* Attachments *
|
|
1077
|
+
*************************************/
|
|
1078
|
+
|
|
1079
|
+
.lb-comment-attachments,
|
|
1080
|
+
.lb-composer-attachments {
|
|
1081
|
+
display: flex;
|
|
1082
|
+
flex-direction: column;
|
|
1083
|
+
gap: calc(0.75 * var(--lb-spacing));
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.lb-attachments {
|
|
1087
|
+
display: grid;
|
|
1088
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
|
|
1089
|
+
gap: calc(0.75 * var(--lb-spacing));
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
.lb-attachment,
|
|
1093
|
+
.lb-attachment-delete {
|
|
1094
|
+
@include button;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.lb-attachment {
|
|
1098
|
+
position: relative;
|
|
1099
|
+
display: flex;
|
|
1100
|
+
inline-size: 100%;
|
|
1101
|
+
min-inline-size: 0;
|
|
1102
|
+
border-radius: var(--lb-radius);
|
|
1103
|
+
background: var(--lb-dynamic-background);
|
|
1104
|
+
box-shadow: inset 0 0 0 1px var(--lb-foreground-subtle);
|
|
1105
|
+
|
|
1106
|
+
&:where([tabindex="-1"]) {
|
|
1107
|
+
cursor: default;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
&:where(:not([tabindex="-1"])) {
|
|
1111
|
+
&:where(:hover, :focus-visible) {
|
|
1112
|
+
background: var(--lb-foreground-subtle);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
.lb-attachment-delete {
|
|
1118
|
+
position: absolute;
|
|
1119
|
+
inset-inline-end: -0.35rem;
|
|
1120
|
+
inset-block-start: -0.35rem;
|
|
1121
|
+
z-index: 2;
|
|
1122
|
+
display: flex;
|
|
1123
|
+
justify-content: center;
|
|
1124
|
+
align-items: center;
|
|
1125
|
+
inline-size: 1.1rem;
|
|
1126
|
+
block-size: 1.1rem;
|
|
1127
|
+
border-radius: 50%;
|
|
1128
|
+
background: var(--lb-foreground-subtle);
|
|
1129
|
+
color: var(--lb-foreground-secondary);
|
|
1130
|
+
box-shadow: 0 0 0 2px var(--lb-dynamic-background);
|
|
1131
|
+
opacity: 0;
|
|
1132
|
+
|
|
1133
|
+
/* Invisibly increase the button's hit target size */
|
|
1134
|
+
&::before {
|
|
1135
|
+
content: "";
|
|
1136
|
+
position: absolute;
|
|
1137
|
+
inset: -4px;
|
|
1138
|
+
z-index: -1;
|
|
1139
|
+
border-radius: inherit;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
&:where(:hover, :focus-visible) {
|
|
1143
|
+
background: var(--lb-foreground-secondary);
|
|
1144
|
+
color: var(--lb-dynamic-background);
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
:where(.lb-attachment:focus-within, .lb-attachment:hover) & {
|
|
1148
|
+
opacity: 1;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
:where(.lb-icon) {
|
|
1152
|
+
inline-size: 0.75rem;
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
.lb-attachment-details {
|
|
1157
|
+
position: relative;
|
|
1158
|
+
display: flex;
|
|
1159
|
+
flex-direction: column;
|
|
1160
|
+
gap: calc(0.25 * var(--lb-spacing));
|
|
1161
|
+
justify-content: center;
|
|
1162
|
+
min-inline-size: 0;
|
|
1163
|
+
font-size: 0.875em;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
.lb-attachment-name {
|
|
1167
|
+
display: flex;
|
|
1168
|
+
font-weight: 500;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
.lb-attachment-name-base,
|
|
1172
|
+
.lb-attachment-description {
|
|
1173
|
+
@include truncate;
|
|
1174
|
+
|
|
1175
|
+
transition-property: color;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
.lb-attachment-preview {
|
|
1179
|
+
position: relative;
|
|
1180
|
+
display: flex;
|
|
1181
|
+
flex: none;
|
|
1182
|
+
justify-content: center;
|
|
1183
|
+
align-items: center;
|
|
1184
|
+
overflow: hidden;
|
|
1185
|
+
background: color-mix(
|
|
1186
|
+
in srgb,
|
|
1187
|
+
transparent,
|
|
1188
|
+
var(--lb-foreground) var(--lb-foreground-contrast)
|
|
1189
|
+
);
|
|
1190
|
+
color: var(--lb-foreground-tertiary);
|
|
1191
|
+
transition-property: background, color;
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
.lb-attachment-preview-media {
|
|
1195
|
+
border-radius: inherit;
|
|
1196
|
+
transition-property: opacity;
|
|
1197
|
+
|
|
1198
|
+
&,
|
|
1199
|
+
&::after,
|
|
1200
|
+
img,
|
|
1201
|
+
video {
|
|
1202
|
+
position: absolute;
|
|
1203
|
+
inset: 0;
|
|
1204
|
+
inline-size: 100%;
|
|
1205
|
+
block-size: 100%;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
img,
|
|
1209
|
+
video {
|
|
1210
|
+
object-fit: cover;
|
|
1211
|
+
pointer-events: none;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
&::after {
|
|
1215
|
+
content: "";
|
|
1216
|
+
z-index: 1;
|
|
1217
|
+
border-radius: inherit;
|
|
1218
|
+
box-shadow: var(--lb-highlight-shadow);
|
|
1219
|
+
pointer-events: none;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
&:where([data-hidden]) {
|
|
1223
|
+
opacity: 0;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.lb-attachment-icon {
|
|
1228
|
+
flex: none;
|
|
1229
|
+
overflow: visible;
|
|
1230
|
+
color: var(--lb-foreground);
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
.lb-attachment-icon-glyph {
|
|
1234
|
+
fill: var(--lb-foreground-moderate);
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1237
|
+
.lb-attachment-icon-background {
|
|
1238
|
+
fill: var(--lb-background);
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
.lb-attachment-icon-fold {
|
|
1242
|
+
fill-opacity: calc(0.75 * var(--lb-foreground-contrast));
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
.lb-attachment-icon-shadow {
|
|
1246
|
+
filter: blur(6px);
|
|
1247
|
+
fill-opacity: var(--lb-foreground-contrast);
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
.lb-file-attachment {
|
|
1251
|
+
gap: calc(0.5 * var(--lb-spacing));
|
|
1252
|
+
padding: calc(0.5 * var(--lb-spacing));
|
|
1253
|
+
padding-inline-end: calc(0.65 * var(--lb-spacing));
|
|
1254
|
+
|
|
1255
|
+
:where(.lb-attachment-preview) {
|
|
1256
|
+
aspect-ratio: 1;
|
|
1257
|
+
inline-size: 2.5rem;
|
|
1258
|
+
border-radius: calc(0.5 * var(--lb-radius));
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
:where(.lb-attachment-name) {
|
|
1262
|
+
color: var(--lb-foreground-secondary);
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
:where(.lb-attachment-description) {
|
|
1266
|
+
color: var(--lb-foreground-tertiary);
|
|
1267
|
+
}
|
|
1268
|
+
|
|
1269
|
+
&:where(:not([tabindex="-1"])) {
|
|
1270
|
+
&:where(:hover, :focus-visible, :focus-within) {
|
|
1271
|
+
:where(.lb-attachment-name) {
|
|
1272
|
+
color: var(--lb-foreground);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
:where(.lb-attachment-description) {
|
|
1276
|
+
color: var(--lb-foreground-secondary);
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.lb-media-attachment {
|
|
1283
|
+
aspect-ratio: 16 / 10;
|
|
1284
|
+
|
|
1285
|
+
:where(.lb-attachment-preview) {
|
|
1286
|
+
position: absolute;
|
|
1287
|
+
inset: 0;
|
|
1288
|
+
border-radius: inherit;
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1291
|
+
:where(.lb-attachment-details) {
|
|
1292
|
+
position: absolute;
|
|
1293
|
+
inset-inline: 0;
|
|
1294
|
+
inset-block-end: 0;
|
|
1295
|
+
padding: calc(0.75 * var(--lb-spacing));
|
|
1296
|
+
border-end-start-radius: inherit;
|
|
1297
|
+
border-end-end-radius: inherit;
|
|
1298
|
+
background: linear-gradient(to bottom, transparent, rgba(0 0 0 / 80%));
|
|
1299
|
+
text-shadow: 0 0 2px rgba(0 0 0 / 40%);
|
|
1300
|
+
opacity: 0;
|
|
1301
|
+
transition-property: opacity;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
:where(.lb-attachment-name) {
|
|
1305
|
+
color: #fff;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
:where(.lb-attachment-description) {
|
|
1309
|
+
color: rgba(255 255 255 / 80%);
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
&:where(:not([tabindex="-1"])) {
|
|
1313
|
+
&:where(:hover, :focus-visible, :focus-within) {
|
|
1314
|
+
:where(.lb-attachment-details) {
|
|
1315
|
+
opacity: 1;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
.lb-attachment:where([data-error]) {
|
|
1322
|
+
:where(.lb-attachment-preview) {
|
|
1323
|
+
background: var(--lb-destructive);
|
|
1324
|
+
color: var(--lb-destructive-foreground);
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1058
1328
|
/*************************************
|
|
1059
1329
|
* Inbox Notification *
|
|
1060
1330
|
*************************************/
|
|
@@ -1223,7 +1493,8 @@
|
|
|
1223
1493
|
font-size: 0.875rem;
|
|
1224
1494
|
}
|
|
1225
1495
|
|
|
1226
|
-
:where(.lb-comment-reaction)
|
|
1496
|
+
:where(.lb-comment-reaction),
|
|
1497
|
+
:where(.lb-comment-attachment) {
|
|
1227
1498
|
pointer-events: none;
|
|
1228
1499
|
}
|
|
1229
1500
|
}
|
|
@@ -1363,7 +1634,7 @@
|
|
|
1363
1634
|
}
|
|
1364
1635
|
|
|
1365
1636
|
/**
|
|
1366
|
-
*
|
|
1637
|
+
* Merge adjacent inline code elements
|
|
1367
1638
|
*/
|
|
1368
1639
|
:where(span:has(code) + span code) {
|
|
1369
1640
|
padding-inline-start: 0;
|
|
@@ -1562,3 +1833,13 @@
|
|
|
1562
1833
|
mask-position: -200% 0;
|
|
1563
1834
|
}
|
|
1564
1835
|
}
|
|
1836
|
+
|
|
1837
|
+
@keyframes lb-animation-spin {
|
|
1838
|
+
from {
|
|
1839
|
+
transform: rotate(0deg);
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
to {
|
|
1843
|
+
transform: rotate(360deg);
|
|
1844
|
+
}
|
|
1845
|
+
}
|
package/src/styles/utils.css
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
/* Because of `all: unset`, we have to re-define some these values. */
|
|
2
|
+
@mixin button {
|
|
3
|
+
all: unset;
|
|
4
|
+
position: relative;
|
|
5
|
+
box-sizing: inherit;
|
|
6
|
+
outline: none;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
user-select: none;
|
|
9
|
+
transition-timing-function: var(--lb-transition-easing);
|
|
10
|
+
transition-duration: var(--lb-transition-duration);
|
|
11
|
+
transition-property: background, color, opacity;
|
|
12
|
+
-webkit-tap-highlight-color: transparent;
|
|
13
|
+
|
|
14
|
+
&::after {
|
|
15
|
+
content: "";
|
|
16
|
+
position: absolute;
|
|
17
|
+
inset: 0;
|
|
18
|
+
border-radius: inherit;
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
transition-property: box-shadow;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:where(:focus-visible) {
|
|
24
|
+
z-index: 1;
|
|
25
|
+
|
|
26
|
+
&::after {
|
|
27
|
+
box-shadow:
|
|
28
|
+
var(--lb-dynamic-background) 0 0 0 2px,
|
|
29
|
+
var(--lb-accent) 0 0 0 4px;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
1
34
|
@mixin truncate {
|
|
2
35
|
overflow: hidden;
|
|
3
36
|
text-overflow: ellipsis;
|
|
@@ -17,6 +50,17 @@
|
|
|
17
50
|
}
|
|
18
51
|
}
|
|
19
52
|
|
|
53
|
+
@mixin invisible-scrollbar {
|
|
54
|
+
& {
|
|
55
|
+
-ms-overflow-style: none;
|
|
56
|
+
scrollbar-width: none;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&::-webkit-scrollbar {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
20
64
|
@mixin firefox-only {
|
|
21
65
|
@supports (-moz-appearance: none) {
|
|
22
66
|
@content;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.lb-root:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) :where(.lb-root){--lb-accent:#4af;--lb-destructive:#f77;--lb-background:#222;--lb-foreground:#fff;--lb-accent-contrast:16%;--lb-destructive-contrast:16%;--lb-foreground-contrast:10%;--lb-inset-shadow:inset 0 0 0 1px #ffffff0f;--lb-elevation-shadow:0 0 0 1px #0000000a,0 2px 6px #00000014,0 8px 26px #0000001f;--lb-tooltip-shadow:0 2px 4px #00000014,0 4px 12px #0000001f;color-scheme:dark}.lb-root.lb-elevation:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) .lb-elevation:where(.lb-root),.lb-root.lb-tooltip:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) .lb-tooltip:where(.lb-root){--lb-background:#333;--lb-foreground-contrast:10%}
|
|
1
|
+
.lb-root:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) :where(.lb-root){--lb-accent:#4af;--lb-destructive:#f77;--lb-background:#222;--lb-foreground:#fff;--lb-accent-contrast:16%;--lb-destructive-contrast:16%;--lb-foreground-contrast:10%;--lb-inset-shadow:inset 0 0 0 1px #ffffff0f;--lb-highlight-shadow:inset 0 0 0 1px #ffffff1f;--lb-elevation-shadow:0 0 0 1px #0000000a,0 2px 6px #00000014,0 8px 26px #0000001f;--lb-tooltip-shadow:0 2px 4px #00000014,0 4px 12px #0000001f;color-scheme:dark}.lb-root.lb-elevation:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) .lb-elevation:where(.lb-root),.lb-root.lb-tooltip:where(:is(.dark,[data-theme=dark],[data-dark])),:is(.dark,[data-theme=dark],[data-dark]) .lb-tooltip:where(.lb-root){--lb-background:#333;--lb-foreground-contrast:10%}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/styles/dark/src/styles/dark/attributes.css","../../src/styles/dark/src/styles/dark/index.css"],"names":[],"mappings":"AAIA,mHAAA,gBAAA,CAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,wBAAA,CAAA,6BAAA,CAAA,4BAAA,CAAA,2CAAA,CAAA,kFAAA,CAAA,4DAAA,CAAA,iBAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/styles/dark/src/styles/dark/attributes.css","../../src/styles/dark/src/styles/dark/index.css"],"names":[],"mappings":"AAIA,mHAAA,gBAAA,CAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,wBAAA,CAAA,6BAAA,CAAA,4BAAA,CAAA,2CAAA,CAAA,+CAAA,CAAA,kFAAA,CAAA,4DAAA,CAAA,iBAAA,CCoBE,sRAAA,oBAAA,CAAA,4BAAA","file":"attributes.css","sourcesContent":["/* stylelint-disable selector-class-pattern */\n\n@import \"./index\";\n\n.lb-root:where(:is(.dark, [data-theme=\"dark\"], [data-dark])),\n:is(.dark, [data-theme=\"dark\"], [data-dark]) :where(.lb-root) {\n @include dark-styles;\n}\n","@import \"../constants\";\n\n@mixin dark-styles {\n /**\n * Colors\n */\n --lb-accent: #4af;\n --lb-destructive: #f77;\n --lb-background: #222;\n --lb-foreground: #fff;\n --lb-accent-contrast: 16%;\n --lb-destructive-contrast: 16%;\n --lb-foreground-contrast: 10%;\n\n /**\n * Shadows\n */\n --lb-inset-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);\n --lb-highlight-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);\n --lb-elevation-shadow: $lb-elevation-shadow;\n --lb-tooltip-shadow: $lb-tooltip-shadow;\n\n color-scheme: dark;\n\n &.lb-elevation,\n &.lb-tooltip {\n --lb-background: #333;\n --lb-foreground-contrast: 10%;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@media (prefers-color-scheme:dark){.lb-root{--lb-accent:#4af;--lb-destructive:#f77;--lb-background:#222;--lb-foreground:#fff;--lb-accent-contrast:16%;--lb-destructive-contrast:16%;--lb-foreground-contrast:10%;--lb-inset-shadow:inset 0 0 0 1px #ffffff0f;--lb-elevation-shadow:0 0 0 1px #0000000a,0 2px 6px #00000014,0 8px 26px #0000001f;--lb-tooltip-shadow:0 2px 4px #00000014,0 4px 12px #0000001f;color-scheme:dark}.lb-root.lb-elevation,.lb-root.lb-tooltip{--lb-background:#333;--lb-foreground-contrast:10%}}
|
|
1
|
+
@media (prefers-color-scheme:dark){.lb-root{--lb-accent:#4af;--lb-destructive:#f77;--lb-background:#222;--lb-foreground:#fff;--lb-accent-contrast:16%;--lb-destructive-contrast:16%;--lb-foreground-contrast:10%;--lb-inset-shadow:inset 0 0 0 1px #ffffff0f;--lb-highlight-shadow:inset 0 0 0 1px #ffffff1f;--lb-elevation-shadow:0 0 0 1px #0000000a,0 2px 6px #00000014,0 8px 26px #0000001f;--lb-tooltip-shadow:0 2px 4px #00000014,0 4px 12px #0000001f;color-scheme:dark}.lb-root.lb-elevation,.lb-root.lb-tooltip{--lb-background:#333;--lb-foreground-contrast:10%}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/styles/dark/src/styles/dark/media-query.css","../../src/styles/dark/src/styles/dark/index.css"],"names":[],"mappings":"AAEA,mCACE,SAAA,gBAAA,CAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,wBAAA,CAAA,6BAAA,CAAA,4BAAA,CAAA,2CAAA,CAAA,kFAAA,CAAA,4DAAA,CAAA,iBAAA,
|
|
1
|
+
{"version":3,"sources":["../../src/styles/dark/src/styles/dark/media-query.css","../../src/styles/dark/src/styles/dark/index.css"],"names":[],"mappings":"AAEA,mCACE,SAAA,gBAAA,CAAA,qBAAA,CAAA,oBAAA,CAAA,oBAAA,CAAA,wBAAA,CAAA,6BAAA,CAAA,4BAAA,CAAA,2CAAA,CAAA,+CAAA,CAAA,kFAAA,CAAA,4DAAA,CAAA,iBAAA,CCqBA,0CAAA,oBAAA,CAAA,4BAAA,CAAA","file":"media-query.css","sourcesContent":["@import \"./index\";\n\n@media (prefers-color-scheme: dark) {\n .lb-root {\n @include dark-styles;\n }\n}\n","@import \"../constants\";\n\n@mixin dark-styles {\n /**\n * Colors\n */\n --lb-accent: #4af;\n --lb-destructive: #f77;\n --lb-background: #222;\n --lb-foreground: #fff;\n --lb-accent-contrast: 16%;\n --lb-destructive-contrast: 16%;\n --lb-foreground-contrast: 10%;\n\n /**\n * Shadows\n */\n --lb-inset-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%);\n --lb-highlight-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);\n --lb-elevation-shadow: $lb-elevation-shadow;\n --lb-tooltip-shadow: $lb-tooltip-shadow;\n\n color-scheme: dark;\n\n &.lb-elevation,\n &.lb-tooltip {\n --lb-background: #333;\n --lb-foreground-contrast: 10%;\n }\n}\n"]}
|