@penwin/discord-components-core 4.3.8 → 4.3.9-dev-32917005672.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.
Files changed (207) hide show
  1. package/CHANGELOG.md +826 -826
  2. package/LICENSE.md +20 -0
  3. package/README.md +673 -673
  4. package/custom-elements.json +1803 -1708
  5. package/dist/bundle/index.mjs +1898 -1981
  6. package/dist/bundle/index.mjs.map +1 -1
  7. package/dist/bundle/styles/base.css +1 -2
  8. package/dist/components/_private/BaseDiscordSelectMenuOption.js +72 -72
  9. package/dist/components/_private/DiscordMediaAttachmentStyles.js +114 -114
  10. package/dist/components/_private/DiscordPlaybackControlStyles.js +153 -153
  11. package/dist/components/_private/DiscordVolumeControlStyles.js +158 -158
  12. package/dist/components/_private/DiscordWhiteSpace.js +4 -4
  13. package/dist/components/discord-action-row/DiscordActionRow.js +6 -6
  14. package/dist/components/discord-attachments/DiscordAttachments.js +18 -18
  15. package/dist/components/discord-audio-attachment/DiscordAudioAttachment.js +202 -202
  16. package/dist/components/discord-author-info/DiscordAuthorInfo.d.ts.map +1 -1
  17. package/dist/components/discord-author-info/DiscordAuthorInfo.js +156 -156
  18. package/dist/components/discord-author-info/DiscordAuthorInfo.js.map +1 -1
  19. package/dist/components/discord-bold/DiscordBold.js +4 -4
  20. package/dist/components/discord-button/DiscordButton.d.ts.map +1 -1
  21. package/dist/components/discord-button/DiscordButton.js +131 -128
  22. package/dist/components/discord-button/DiscordButton.js.map +1 -1
  23. package/dist/components/discord-channel-select-menu-option/DiscordChannelSelectMenuOption.js +131 -131
  24. package/dist/components/discord-code/DiscordCode.js +64 -64
  25. package/dist/components/discord-code-block/DiscordCodeBlock.js +2 -2
  26. package/dist/components/discord-command/DiscordCommand.js +109 -109
  27. package/dist/components/discord-components-column/DiscordComponentsColumn.js +18 -18
  28. package/dist/components/discord-container/DiscordContainer.js +47 -47
  29. package/dist/components/discord-custom-emoji/DiscordCustomEmoji.js +36 -36
  30. package/dist/components/discord-embed/DiscordEmbed.d.ts.map +1 -1
  31. package/dist/components/discord-embed/DiscordEmbed.js +285 -285
  32. package/dist/components/discord-embed/DiscordEmbed.js.map +1 -1
  33. package/dist/components/discord-embed-description/DiscordEmbedDescription.js +25 -25
  34. package/dist/components/discord-embed-field/DiscordEmbedField.js +40 -40
  35. package/dist/components/discord-embed-fields/DiscordEmbedFields.js +19 -19
  36. package/dist/components/discord-embed-footer/DiscordEmbedFooter.js +36 -36
  37. package/dist/components/discord-file-attachment/DiscordFileAttachment.js +191 -191
  38. package/dist/components/discord-forwarded-message/DiscordForwardedMessage.js +126 -126
  39. package/dist/components/discord-header/DiscordHeader.js +27 -27
  40. package/dist/components/discord-image-attachment/DiscordImageAttachment.js +38 -38
  41. package/dist/components/discord-input-text/DiscordInputText.js +284 -284
  42. package/dist/components/discord-invite/DiscordInvite.js +225 -225
  43. package/dist/components/discord-italic/DiscordItalic.js +4 -4
  44. package/dist/components/discord-link/DiscordLink.js +19 -19
  45. package/dist/components/discord-list-item/DiscordListItem.d.ts.map +1 -1
  46. package/dist/components/discord-list-item/DiscordListItem.js +8 -5
  47. package/dist/components/discord-list-item/DiscordListItem.js.map +1 -1
  48. package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js +463 -463
  49. package/dist/components/discord-media-gallery/DiscordMediaGallery.js +219 -219
  50. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.d.ts.map +1 -1
  51. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js +102 -99
  52. package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js.map +1 -1
  53. package/dist/components/discord-media-spoileable-cover/DiscordMediaSpoileableCover.js +65 -65
  54. package/dist/components/discord-mention/DiscordMention.js +66 -66
  55. package/dist/components/discord-message/DiscordMessage.d.ts.map +1 -1
  56. package/dist/components/discord-message/DiscordMessage.js +338 -335
  57. package/dist/components/discord-message/DiscordMessage.js.map +1 -1
  58. package/dist/components/discord-messages/DiscordMessages.js +77 -77
  59. package/dist/components/discord-modal/DiscordModal.js +465 -465
  60. package/dist/components/discord-ordered-list/DiscordOrderedList.d.ts.map +1 -1
  61. package/dist/components/discord-ordered-list/DiscordOrderedList.js +20 -14
  62. package/dist/components/discord-ordered-list/DiscordOrderedList.js.map +1 -1
  63. package/dist/components/discord-poll/DiscordPoll.js +157 -157
  64. package/dist/components/discord-poll-answer/DiscordPollAnswer.js +227 -227
  65. package/dist/components/discord-pre/DiscordPre.js +18 -18
  66. package/dist/components/discord-quote/DiscordQuote.js +31 -31
  67. package/dist/components/discord-reaction/DiscordReaction.js +73 -73
  68. package/dist/components/discord-reactions/DiscordReactions.js +9 -9
  69. package/dist/components/discord-reply/DiscordReply.d.ts.map +1 -1
  70. package/dist/components/discord-reply/DiscordReply.js +246 -246
  71. package/dist/components/discord-reply/DiscordReply.js.map +1 -1
  72. package/dist/components/discord-role-select-menu-option/DiscordRoleSelectMenuOption.js +75 -75
  73. package/dist/components/discord-section/DiscordSection.js +6 -6
  74. package/dist/components/discord-section-components/DiscordSectionComponents.js +14 -14
  75. package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.js +30 -30
  76. package/dist/components/discord-separator/DiscordSeparator.js +9 -9
  77. package/dist/components/discord-spoiler/DiscordSpoiler.js +31 -31
  78. package/dist/components/discord-string-select-menu/DiscordStringSelectMenu.js +192 -192
  79. package/dist/components/discord-string-select-menu-option/DiscordStringSelectMenuOption.js +45 -45
  80. package/dist/components/discord-subscript/DiscordSubscript.js +15 -15
  81. package/dist/components/discord-system-message/DiscordSystemMessage.d.ts.map +1 -1
  82. package/dist/components/discord-system-message/DiscordSystemMessage.js +134 -131
  83. package/dist/components/discord-system-message/DiscordSystemMessage.js.map +1 -1
  84. package/dist/components/discord-tenor-video/DiscordTenorVideo.js +76 -76
  85. package/dist/components/discord-text-display/DiscordTextDisplay.js +10 -10
  86. package/dist/components/discord-text-file-attachment-previewer/DiscordTextFileAttachmentPreviewer.js +55 -55
  87. package/dist/components/discord-thread/DiscordThread.js +81 -81
  88. package/dist/components/discord-thread-message/DiscordThreadMessage.js +90 -90
  89. package/dist/components/discord-thumbnail/DiscordThumbnail.js +20 -20
  90. package/dist/components/discord-time/DiscordTime.js +7 -7
  91. package/dist/components/discord-transcript-header/DiscordTranscriptHeader.js +51 -51
  92. package/dist/components/discord-unordered-list/DiscordUnorderedList.d.ts.map +1 -1
  93. package/dist/components/discord-unordered-list/DiscordUnorderedList.js +18 -15
  94. package/dist/components/discord-unordered-list/DiscordUnorderedList.js.map +1 -1
  95. package/dist/components/discord-user-select-menu-option/DiscordUserSelectMenuOption.js +58 -58
  96. package/dist/components/discord-verified-author-tag/DiscordVerifiedAuthorTag.js +36 -36
  97. package/dist/components/discord-video-attachment/DiscordVideoAttachment.js +494 -494
  98. package/dist/components/discord-voice-message/DiscordVoiceMessage.js +255 -255
  99. package/dist/components/svgs/AttachmentDownloadButton.js +67 -67
  100. package/dist/components/svgs/AttachmentReply.js +5 -5
  101. package/dist/components/svgs/Boost.js +3 -3
  102. package/dist/components/svgs/ChannelForum.js +19 -19
  103. package/dist/components/svgs/ChannelIcon.js +17 -17
  104. package/dist/components/svgs/ChannelThread.js +15 -15
  105. package/dist/components/svgs/ChannelsAndRoles.js +23 -23
  106. package/dist/components/svgs/CommandIcon.js +4 -4
  107. package/dist/components/svgs/CommandIconName.js +5 -5
  108. package/dist/components/svgs/CommandReply.js +9 -9
  109. package/dist/components/svgs/CustomizeCommunity.js +17 -17
  110. package/dist/components/svgs/DMCall.js +6 -6
  111. package/dist/components/svgs/DMEdit.js +8 -8
  112. package/dist/components/svgs/DMMissedCall.js +8 -8
  113. package/dist/components/svgs/Ephemeral.js +21 -21
  114. package/dist/components/svgs/ExpandMore.js +4 -4
  115. package/dist/components/svgs/FileAttachment.js +10 -10
  116. package/dist/components/svgs/GuildBadge.js +8 -8
  117. package/dist/components/svgs/LaunchIcon.js +9 -9
  118. package/dist/components/svgs/LockedVoiceChannel.js +17 -17
  119. package/dist/components/svgs/MediaPauseIcon.js +2 -2
  120. package/dist/components/svgs/MediaPlayIcon.js +2 -2
  121. package/dist/components/svgs/MediaRestartIcon.js +2 -2
  122. package/dist/components/svgs/MediaVolumeAbove50PercentIcon.js +3 -3
  123. package/dist/components/svgs/MediaVolumeBelow50PercentIcon.js +2 -2
  124. package/dist/components/svgs/MediaVolumeMutedIcon.js +2 -2
  125. package/dist/components/svgs/MessageIcon.js +3 -3
  126. package/dist/components/svgs/ModalClose.js +4 -4
  127. package/dist/components/svgs/ModalWarning.js +5 -5
  128. package/dist/components/svgs/PartnerBadgeOverlay.js +11 -11
  129. package/dist/components/svgs/Pin.js +5 -5
  130. package/dist/components/svgs/PremiumIcon.js +6 -6
  131. package/dist/components/svgs/ReplyIcon.js +5 -5
  132. package/dist/components/svgs/ServerGuide.js +17 -17
  133. package/dist/components/svgs/ServerUpgrade.js +7 -7
  134. package/dist/components/svgs/SystemAlert.js +7 -7
  135. package/dist/components/svgs/SystemError.js +6 -6
  136. package/dist/components/svgs/Thread.js +9 -9
  137. package/dist/components/svgs/UserJoin.js +5 -5
  138. package/dist/components/svgs/UserLeave.js +5 -5
  139. package/dist/components/svgs/VerifiedBadgeOverlay.js +4 -4
  140. package/dist/components/svgs/VerifiedTick.js +13 -13
  141. package/dist/components/svgs/VideoFullScreenIcon.js +8 -8
  142. package/dist/components/svgs/VideoPausePopIcon.js +2 -2
  143. package/dist/components/svgs/VideoPlayPopIcon.js +2 -2
  144. package/dist/components/svgs/VoiceChannel.js +19 -19
  145. package/dist/components/svgs/clan-icons/Crystal.js +27 -27
  146. package/dist/components/svgs/clan-icons/Diamond.js +35 -35
  147. package/dist/components/svgs/clan-icons/Explosion.js +30 -30
  148. package/dist/components/svgs/clan-icons/Flame.js +23 -23
  149. package/dist/components/svgs/clan-icons/Flower.js +18 -18
  150. package/dist/components/svgs/clan-icons/Heart.js +19 -19
  151. package/dist/components/svgs/clan-icons/Key.js +32 -32
  152. package/dist/components/svgs/clan-icons/Leaf.js +23 -23
  153. package/dist/components/svgs/clan-icons/Lightning.js +25 -25
  154. package/dist/components/svgs/clan-icons/Magic.js +34 -34
  155. package/dist/components/svgs/clan-icons/Moon.js +21 -21
  156. package/dist/components/svgs/clan-icons/Mushroom.js +33 -33
  157. package/dist/components/svgs/clan-icons/Mythical.js +32 -32
  158. package/dist/components/svgs/clan-icons/Ornament.js +48 -48
  159. package/dist/components/svgs/clan-icons/Plasma.js +23 -23
  160. package/dist/components/svgs/clan-icons/Rock.js +20 -20
  161. package/dist/components/svgs/clan-icons/Shell.js +29 -29
  162. package/dist/components/svgs/clan-icons/Skull.js +28 -28
  163. package/dist/components/svgs/clan-icons/Sun.js +36 -36
  164. package/dist/components/svgs/clan-icons/Sword.js +27 -27
  165. package/dist/components/svgs/clan-icons/Water.js +20 -20
  166. package/dist/config.d.ts +1 -1
  167. package/dist/config.d.ts.map +1 -1
  168. package/dist/config.js +9 -3
  169. package/dist/config.js.map +1 -1
  170. package/dist/hydrate/index.d.ts +40 -0
  171. package/dist/hydrate/index.d.ts.map +1 -0
  172. package/dist/hydrate/index.js +48 -0
  173. package/dist/hydrate/index.js.map +1 -0
  174. package/package.json +222 -219
  175. package/dist/bundle/styles/base.css.map +0 -1
  176. package/dist/components/discord-container copy/DiscordContainer.d.ts +0 -22
  177. package/dist/components/discord-container copy/DiscordContainer.d.ts.map +0 -1
  178. package/dist/components/discord-container copy/DiscordContainer.js +0 -159
  179. package/dist/components/discord-container copy/DiscordContainer.js.map +0 -1
  180. package/dist/components/discord-media-fullscreen-previewer/context.d.ts +0 -10
  181. package/dist/components/discord-media-fullscreen-previewer/context.d.ts.map +0 -1
  182. package/dist/components/discord-media-fullscreen-previewer/context.js +0 -3
  183. package/dist/components/discord-media-fullscreen-previewer/context.js.map +0 -1
  184. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts +0 -26
  185. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts.map +0 -1
  186. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js +0 -183
  187. package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js.map +0 -1
  188. package/dist/components/discord-section/DiscordContainer.d.ts +0 -22
  189. package/dist/components/discord-section/DiscordContainer.d.ts.map +0 -1
  190. package/dist/components/discord-section/DiscordContainer.js +0 -159
  191. package/dist/components/discord-section/DiscordContainer.js.map +0 -1
  192. package/dist/components/discord-section copy/DiscordSection.d.ts +0 -15
  193. package/dist/components/discord-section copy/DiscordSection.d.ts.map +0 -1
  194. package/dist/components/discord-section copy/DiscordSection.js +0 -77
  195. package/dist/components/discord-section copy/DiscordSection.js.map +0 -1
  196. package/dist/components/discord-section-components/DiscordSection.d.ts +0 -15
  197. package/dist/components/discord-section-components/DiscordSection.d.ts.map +0 -1
  198. package/dist/components/discord-section-components/DiscordSection.js +0 -77
  199. package/dist/components/discord-section-components/DiscordSection.js.map +0 -1
  200. package/dist/components/discord-text-display/DiscordSection.d.ts +0 -15
  201. package/dist/components/discord-text-display/DiscordSection.d.ts.map +0 -1
  202. package/dist/components/discord-text-display/DiscordSection.js +0 -79
  203. package/dist/components/discord-text-display/DiscordSection.js.map +0 -1
  204. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts +0 -71
  205. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts.map +0 -1
  206. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js +0 -238
  207. package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js.map +0 -1
@@ -40,190 +40,190 @@ let DiscordPollAnswer = class DiscordPollAnswer extends LitElement {
40
40
  /**
41
41
  * @internal
42
42
  */
43
- static { this.styles = css `
44
- .discord-answer-container {
45
- display: flex;
46
- cursor: pointer;
47
- }
48
-
49
- .discord-answer-emoji {
50
- width: 24px;
51
- height: 24px;
52
- margin-right: 2px;
53
- border-radius: 3px;
54
- }
55
-
56
- .discord-checkbox-div-multiple-answer {
57
- flex-shrink: 0;
58
- width: 20px;
59
- height: 20px;
60
- box-sizing: border-box;
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
- border-radius: 3px;
65
- background-color: transparent;
66
- border: 2px solid color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
67
- }
68
-
69
- .discord-checkbox-div-multiple-answer-selected {
70
- width: 20px;
71
- height: 20px;
72
- display: flex;
73
- align-items: center;
74
- justify-content: center;
75
- border-radius: 3px;
76
- background-color: hsl(235 calc(1 * 85.6%) 64.7% / 1);
77
- }
78
-
79
- .discord-checkbox-div-answer-selected-ended-winner {
80
- width: 24px;
81
- height: 24px;
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- border-radius: 99px;
86
- background-color: seagreen;
87
- }
88
-
89
- .discord-checkbox-div-answer-selected-ended-no-winner {
90
- width: 24px;
91
- height: 24px;
92
- display: flex;
93
- align-items: center;
94
- justify-content: center;
95
- border-radius: 99px;
96
- background-color: white;
97
- color: black !important;
98
- }
99
-
100
- .discord-checkbox-div-answer-selected-voted {
101
- width: 24px;
102
- height: 24px;
103
- display: flex;
104
- align-items: center;
105
- justify-content: center;
106
- border-radius: 99px;
107
- background-color: hsl(235 calc(1 * 85.6%) 64.7% / 1);
108
- }
109
-
110
- .discord-checkbox-div-answer {
111
- flex-shrink: 0;
112
- width: 20px;
113
- height: 20px;
114
- box-sizing: border-box;
115
- display: flex;
116
- align-items: center;
117
- justify-content: center;
118
- border-radius: 99px;
119
- background-color: transparent;
120
- border: 2px solid color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
121
- }
122
-
123
- .discord-checkbox-div-answer-selected {
124
- margin: 2px;
125
- width: 10px;
126
- height: 10px;
127
- box-sizing: border-box;
128
- display: flex;
129
- align-items: center;
130
- justify-content: center;
131
- border-radius: 99px;
132
- border: 2px solid transparent;
133
- background-color: color-mix(in oklab, hsl(235 calc(1 * 86.1%) 77.5% / 1) 100%, black 0%);
134
- }
135
-
136
- .discord-answer-hidden {
137
- display: none;
138
- }
139
-
140
- .discord-answer-flex {
141
- display: flex;
142
- align-items: center;
143
- gap: 8px;
144
- }
145
-
146
- .discord-answer-selected {
147
- outline: 1px solid color-mix(in oklab, hsl(235 calc(1 * 86.1%) 77.5% / 1) 100%, black 0%) !important;
148
- }
149
-
150
- .discord-answer-selected-ended {
151
- outline: 1px solid hsl(145 calc(1 * 65%) 39.2% / 1) !important;
152
- }
153
-
154
- .discord-answer {
155
- position: relative;
156
- display: flex;
157
- align-items: center;
158
- justify-content: space-between;
159
- width: 100%;
160
- min-height: 50px;
161
- padding: 8px 16px;
162
- box-sizing: border-box;
163
- background-color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 0.3) 100%, hsl(0 0% 0% / 0.3) 0%);
164
- border-radius: 8px;
165
- color: color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
166
- word-break: break-word;
167
- overflow: hidden;
168
- outline: 1px solid transparent;
169
- z-index: 1;
170
- transition:
171
- background-color 170ms ease,
172
- outline-color 170ms ease;
173
- }
174
-
175
- :host([light-theme]) .discord-answer {
176
- background-color: color-mix(in oklab, hsl(223 calc(1 * 5.8%) 52.9% / 0.08) 100%, hsl(0 0% 0% / 0.08) 0%) !important;
177
- }
178
-
179
- :host([light-theme]) .discord-background-color-default {
180
- background-color: color-mix(in oklab, hsl(223 calc(1 * 5.8%) 52.9% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%) !important;
181
- }
182
-
183
- :host([light-theme]) .discord-awnswer-title,
184
- :host([light-theme]) .discord-quantity-votes,
185
- :host([light-theme]) .discord-percentage-votes {
186
- color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%) !important;
187
- }
188
-
189
- :host([light-theme]) .discord-checkbox-div-answer,
190
- :host([light-theme]) .discord-checkbox-div-multiple-answer {
191
- border-color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%) !important;
192
- }
193
-
194
- :host([light-theme]) .discord-checkbox-div-answer-selected-ended-no-winner {
195
- background-color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%);
196
- color: white !important;
197
- }
198
-
199
- .discord-answer-no-margin {
200
- margin: 0;
201
- }
202
-
203
- .discord-quantity-votes:hover {
204
- cursor: pointer;
205
- text-decoration: underline;
206
- }
207
-
208
- .discord-answer-backdround-color {
209
- content: '';
210
- position: absolute;
211
- height: 100%;
212
- left: 0;
213
- z-index: -1;
214
- }
215
-
216
- .discord-background-color-winner {
217
- background-color: color-mix(in oklab, hsl(145 calc(1 * 65%) 39.2% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%);
218
- }
219
-
220
- .discord-background-color-default {
221
- background-color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 0.48) 100%, hsl(0 0% 0% / 0.48) 0%);
222
- }
223
-
224
- .discord-background-color-selected {
225
- background-color: color-mix(in oklab, hsl(235 calc(1 * 85.6%) 64.7% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%);
226
- }
43
+ static { this.styles = css `
44
+ .discord-answer-container {
45
+ display: flex;
46
+ cursor: pointer;
47
+ }
48
+
49
+ .discord-answer-emoji {
50
+ width: 24px;
51
+ height: 24px;
52
+ margin-right: 2px;
53
+ border-radius: 3px;
54
+ }
55
+
56
+ .discord-checkbox-div-multiple-answer {
57
+ flex-shrink: 0;
58
+ width: 20px;
59
+ height: 20px;
60
+ box-sizing: border-box;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ border-radius: 3px;
65
+ background-color: transparent;
66
+ border: 2px solid color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
67
+ }
68
+
69
+ .discord-checkbox-div-multiple-answer-selected {
70
+ width: 20px;
71
+ height: 20px;
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: center;
75
+ border-radius: 3px;
76
+ background-color: hsl(235 calc(1 * 85.6%) 64.7% / 1);
77
+ }
78
+
79
+ .discord-checkbox-div-answer-selected-ended-winner {
80
+ width: 24px;
81
+ height: 24px;
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ border-radius: 99px;
86
+ background-color: seagreen;
87
+ }
88
+
89
+ .discord-checkbox-div-answer-selected-ended-no-winner {
90
+ width: 24px;
91
+ height: 24px;
92
+ display: flex;
93
+ align-items: center;
94
+ justify-content: center;
95
+ border-radius: 99px;
96
+ background-color: white;
97
+ color: black !important;
98
+ }
99
+
100
+ .discord-checkbox-div-answer-selected-voted {
101
+ width: 24px;
102
+ height: 24px;
103
+ display: flex;
104
+ align-items: center;
105
+ justify-content: center;
106
+ border-radius: 99px;
107
+ background-color: hsl(235 calc(1 * 85.6%) 64.7% / 1);
108
+ }
109
+
110
+ .discord-checkbox-div-answer {
111
+ flex-shrink: 0;
112
+ width: 20px;
113
+ height: 20px;
114
+ box-sizing: border-box;
115
+ display: flex;
116
+ align-items: center;
117
+ justify-content: center;
118
+ border-radius: 99px;
119
+ background-color: transparent;
120
+ border: 2px solid color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
121
+ }
122
+
123
+ .discord-checkbox-div-answer-selected {
124
+ margin: 2px;
125
+ width: 10px;
126
+ height: 10px;
127
+ box-sizing: border-box;
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ border-radius: 99px;
132
+ border: 2px solid transparent;
133
+ background-color: color-mix(in oklab, hsl(235 calc(1 * 86.1%) 77.5% / 1) 100%, black 0%);
134
+ }
135
+
136
+ .discord-answer-hidden {
137
+ display: none;
138
+ }
139
+
140
+ .discord-answer-flex {
141
+ display: flex;
142
+ align-items: center;
143
+ gap: 8px;
144
+ }
145
+
146
+ .discord-answer-selected {
147
+ outline: 1px solid color-mix(in oklab, hsl(235 calc(1 * 86.1%) 77.5% / 1) 100%, black 0%) !important;
148
+ }
149
+
150
+ .discord-answer-selected-ended {
151
+ outline: 1px solid hsl(145 calc(1 * 65%) 39.2% / 1) !important;
152
+ }
153
+
154
+ .discord-answer {
155
+ position: relative;
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: space-between;
159
+ width: 100%;
160
+ min-height: 50px;
161
+ padding: 8px 16px;
162
+ box-sizing: border-box;
163
+ background-color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 0.3) 100%, hsl(0 0% 0% / 0.3) 0%);
164
+ border-radius: 8px;
165
+ color: color-mix(in oklab, hsl(210 calc(1 * 9.1%) 87.1% / 1) 100%, black 0%);
166
+ word-break: break-word;
167
+ overflow: hidden;
168
+ outline: 1px solid transparent;
169
+ z-index: 1;
170
+ transition:
171
+ background-color 170ms ease,
172
+ outline-color 170ms ease;
173
+ }
174
+
175
+ :host([light-theme]) .discord-answer {
176
+ background-color: color-mix(in oklab, hsl(223 calc(1 * 5.8%) 52.9% / 0.08) 100%, hsl(0 0% 0% / 0.08) 0%) !important;
177
+ }
178
+
179
+ :host([light-theme]) .discord-background-color-default {
180
+ background-color: color-mix(in oklab, hsl(223 calc(1 * 5.8%) 52.9% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%) !important;
181
+ }
182
+
183
+ :host([light-theme]) .discord-awnswer-title,
184
+ :host([light-theme]) .discord-quantity-votes,
185
+ :host([light-theme]) .discord-percentage-votes {
186
+ color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%) !important;
187
+ }
188
+
189
+ :host([light-theme]) .discord-checkbox-div-answer,
190
+ :host([light-theme]) .discord-checkbox-div-multiple-answer {
191
+ border-color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%) !important;
192
+ }
193
+
194
+ :host([light-theme]) .discord-checkbox-div-answer-selected-ended-no-winner {
195
+ background-color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%);
196
+ color: white !important;
197
+ }
198
+
199
+ .discord-answer-no-margin {
200
+ margin: 0;
201
+ }
202
+
203
+ .discord-quantity-votes:hover {
204
+ cursor: pointer;
205
+ text-decoration: underline;
206
+ }
207
+
208
+ .discord-answer-backdround-color {
209
+ content: '';
210
+ position: absolute;
211
+ height: 100%;
212
+ left: 0;
213
+ z-index: -1;
214
+ }
215
+
216
+ .discord-background-color-winner {
217
+ background-color: color-mix(in oklab, hsl(145 calc(1 * 65%) 39.2% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%);
218
+ }
219
+
220
+ .discord-background-color-default {
221
+ background-color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 0.48) 100%, hsl(0 0% 0% / 0.48) 0%);
222
+ }
223
+
224
+ .discord-background-color-selected {
225
+ background-color: color-mix(in oklab, hsl(235 calc(1 * 85.6%) 64.7% / 0.2) 100%, hsl(0 0% 0% / 0.2) 0%);
226
+ }
227
227
  `; }
228
228
  connectedCallback() {
229
229
  super.connectedCallback();
@@ -273,17 +273,17 @@ let DiscordPollAnswer = class DiscordPollAnswer extends LitElement {
273
273
  this.percentageVoted.toPrecision(3).split('.')[1] === '0'
274
274
  ? Number(this.percentageVoted.toPrecision(3).split('.')[0])
275
275
  : Number(this.percentageVoted.toPrecision(3));
276
- return html `
277
- <label>
278
- <div class="${classMap({ 'discord-answer-container': !this.pollVoted && !this.pollEnded && !this.showResult })}">
279
- <div
276
+ return html `
277
+ <label>
278
+ <div class="${classMap({ 'discord-answer-container': !this.pollVoted && !this.pollEnded && !this.showResult })}">
279
+ <div
280
280
  class="${classMap({
281
281
  'discord-answer': true,
282
282
  'discord-answer-selected': this.selected && !this.pollEnded && !this.showResult,
283
283
  'discord-answer-selected-ended': this.pollEnded && this.winners.includes(this.answer)
284
- })}"
285
- >
286
- <div
284
+ })}"
285
+ >
286
+ <div
287
287
  class=${classMap({
288
288
  'discord-answer-backdround-color': true,
289
289
  'discord-background-color-selected': !this.pollEnded && this.selected && this.pollVoted,
@@ -291,45 +291,45 @@ let DiscordPollAnswer = class DiscordPollAnswer extends LitElement {
291
291
  'discord-background-color-default': (this.pollEnded && !this.winners.includes(this.answer)) ||
292
292
  (!this.pollEnded && !this.selected && this.pollVoted) ||
293
293
  this.showResult
294
- })}
295
- style="width:${this.percentageVoted}%;"
296
- ></div>
297
- <div class="discord-answer-flex">
298
- ${when(this.emoji, () => html `<img class="discord-answer-emoji" src="${this.emoji}" alt="emoji" />`)}
299
- <div class="discord-awnswer-title">${this.answer}</div>
300
- </div>
301
- <div class="discord-answer-flex">
302
- ${when(this.pollVoted || this.pollEnded || this.showResult, () => html `<h5 class="discord-answer-no-margin discord-quantity-votes">
303
- ${this.votes} ${this.votes > 1 || this.votes === 0 ? 'votes' : 'vote'}
304
- </h5>`)}
305
- ${when(this.pollVoted || this.pollEnded || this.showResult, () => html `<h4 class="discord-answer-no-margin discord-percentage-votes">${this.percentageVoted}%</h4>`)}
306
- ${when(this.selected && !this.showResult, () => when(this.multipleAnswers, () => when(this.pollEnded, () => when(this.winners.includes(this.answer), () => html `<div class="discord-checkbox-div-answer-selected-ended-winner">
307
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
308
- </div>`, () => html `<div class="discord-checkbox-div-answer-selected-ended-no-winner">
309
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
310
- </div>`), () => when(!this.pollVoted, () => html `<div class="discord-checkbox-div-multiple-answer-selected">
311
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
312
- </div>`, () => html `<div class="discord-checkbox-div-answer-selected-voted">
313
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
314
- </div>`)), () => when(this.pollEnded, () => html `<div class="discord-checkbox-div-answer-selected-ended-winner">
315
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
316
- </div>`, () => when(!this.pollVoted, () => html `
317
- <div class="discord-checkbox-div-answer">
318
- <div class="discord-checkbox-div-answer-selected"></div>
319
- </div>
320
- `, () => html `<div class="discord-checkbox-div-answer-selected-voted">
321
- ${VerifiedTick({ style: 'width:24px;height:24px;' })}
322
- </div>`))), () => when(!this.pollEnded && !this.pollVoted && !this.showResult, () => html `<div
294
+ })}
295
+ style="width:${this.percentageVoted}%;"
296
+ ></div>
297
+ <div class="discord-answer-flex">
298
+ ${when(this.emoji, () => html `<img class="discord-answer-emoji" src="${this.emoji}" alt="emoji" />`)}
299
+ <div class="discord-awnswer-title">${this.answer}</div>
300
+ </div>
301
+ <div class="discord-answer-flex">
302
+ ${when(this.pollVoted || this.pollEnded || this.showResult, () => html `<h5 class="discord-answer-no-margin discord-quantity-votes">
303
+ ${this.votes} ${this.votes > 1 || this.votes === 0 ? 'votes' : 'vote'}
304
+ </h5>`)}
305
+ ${when(this.pollVoted || this.pollEnded || this.showResult, () => html `<h4 class="discord-answer-no-margin discord-percentage-votes">${this.percentageVoted}%</h4>`)}
306
+ ${when(this.selected && !this.showResult, () => when(this.multipleAnswers, () => when(this.pollEnded, () => when(this.winners.includes(this.answer), () => html `<div class="discord-checkbox-div-answer-selected-ended-winner">
307
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
308
+ </div>`, () => html `<div class="discord-checkbox-div-answer-selected-ended-no-winner">
309
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
310
+ </div>`), () => when(!this.pollVoted, () => html `<div class="discord-checkbox-div-multiple-answer-selected">
311
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
312
+ </div>`, () => html `<div class="discord-checkbox-div-answer-selected-voted">
313
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
314
+ </div>`)), () => when(this.pollEnded, () => html `<div class="discord-checkbox-div-answer-selected-ended-winner">
315
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
316
+ </div>`, () => when(!this.pollVoted, () => html `
317
+ <div class="discord-checkbox-div-answer">
318
+ <div class="discord-checkbox-div-answer-selected"></div>
319
+ </div>
320
+ `, () => html `<div class="discord-checkbox-div-answer-selected-voted">
321
+ ${VerifiedTick({ style: 'width:24px;height:24px;' })}
322
+ </div>`))), () => when(!this.pollEnded && !this.pollVoted && !this.showResult, () => html `<div
323
323
  class="${classMap({
324
324
  'discord-checkbox-div-multiple-answer': this.multipleAnswers,
325
325
  'discord-checkbox-div-answer': !this.multipleAnswers
326
- })}"
327
- ></div>`))}
328
- </div>
329
- </div>
330
- <span class="discord-answer-hidden"><input type="checkbox" @click=${() => this._onClick()} /></span>
331
- </div>
332
- </label>
326
+ })}"
327
+ ></div>`))}
328
+ </div>
329
+ </div>
330
+ <span class="discord-answer-hidden"><input type="checkbox" @click=${() => this._onClick()} /></span>
331
+ </div>
332
+ </label>
333
333
  `;
334
334
  }
335
335
  _onClick() {
@@ -17,24 +17,24 @@ let DiscordPre = class DiscordPre extends LitElement {
17
17
  /**
18
18
  * @internal
19
19
  */
20
- static { this.styles = css `
21
- :host pre {
22
- border-radius: 4px;
23
- padding: 0;
24
- font-size: 0.75rem;
25
- line-height: 1rem;
26
- margin-top: 6px;
27
- white-space: pre;
28
- background-clip: border-box;
29
- width: 90%;
30
- border: none;
31
- }
32
-
33
- :host([embed]) pre {
34
- margin: 0;
35
- margin-top: 6px;
36
- width: 100%;
37
- }
20
+ static { this.styles = css `
21
+ :host pre {
22
+ border-radius: 4px;
23
+ padding: 0;
24
+ font-size: 0.75rem;
25
+ line-height: 1rem;
26
+ margin-top: 6px;
27
+ white-space: pre;
28
+ background-clip: border-box;
29
+ width: 90%;
30
+ border: none;
31
+ }
32
+
33
+ :host([embed]) pre {
34
+ margin: 0;
35
+ margin-top: 6px;
36
+ width: 100%;
37
+ }
38
38
  `; }
39
39
  render() {
40
40
  return html `<pre><slot></slot></pre>`;
@@ -19,39 +19,39 @@ let DiscordQuote = class DiscordQuote extends LitElement {
19
19
  /**
20
20
  * @internal
21
21
  */
22
- static { this.styles = css `
23
- :host {
24
- display: grid;
25
- grid-template-columns: auto 1fr;
26
- }
27
-
28
- .discord-quote-divider {
29
- background-color: var(--quote-divider-background-color, #4f545c);
30
- border-radius: 4px;
31
- font-size: 0.9em;
32
- font-style: normal;
33
- font-weight: 400;
34
- margin: 0;
35
- padding: 0;
36
- width: 4px;
37
- }
38
-
39
- :host([light-theme]) .discord-quote-divider {
40
- --quote-divider-background-color: #c4c9ce;
41
- }
42
-
43
- blockquote {
44
- margin-block-end: unset;
45
- margin-block-start: unset;
46
- margin-inline-end: unset;
47
- margin-inline-start: unset;
48
- padding: 0 8px 0 12px;
49
- }
22
+ static { this.styles = css `
23
+ :host {
24
+ display: grid;
25
+ grid-template-columns: auto 1fr;
26
+ }
27
+
28
+ .discord-quote-divider {
29
+ background-color: var(--quote-divider-background-color, #4f545c);
30
+ border-radius: 4px;
31
+ font-size: 0.9em;
32
+ font-style: normal;
33
+ font-weight: 400;
34
+ margin: 0;
35
+ padding: 0;
36
+ width: 4px;
37
+ }
38
+
39
+ :host([light-theme]) .discord-quote-divider {
40
+ --quote-divider-background-color: #c4c9ce;
41
+ }
42
+
43
+ blockquote {
44
+ margin-block-end: unset;
45
+ margin-block-start: unset;
46
+ margin-inline-end: unset;
47
+ margin-inline-start: unset;
48
+ padding: 0 8px 0 12px;
49
+ }
50
50
  `; }
51
51
  render() {
52
- return html `
53
- <div class="discord-quote-divider"></div>
54
- <blockquote><slot></slot></blockquote>
52
+ return html `
53
+ <div class="discord-quote-divider"></div>
54
+ <blockquote><slot></slot></blockquote>
55
55
  `;
56
56
  }
57
57
  };