@penwin/discord-components-core 4.3.8 → 4.3.9-dev-32918495512.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/CHANGELOG.md +826 -826
- package/LICENSE.md +20 -0
- package/README.md +673 -673
- package/custom-elements.json +1803 -1708
- package/dist/bundle/index.mjs +1976 -1976
- package/dist/bundle/index.mjs.map +1 -1
- package/dist/bundle/styles/base.css +1 -2
- package/dist/components/_private/BaseDiscordSelectMenuOption.js +72 -72
- package/dist/components/_private/DiscordMediaAttachmentStyles.js +114 -114
- package/dist/components/_private/DiscordPlaybackControlStyles.js +153 -153
- package/dist/components/_private/DiscordVolumeControlStyles.js +158 -158
- package/dist/components/_private/DiscordWhiteSpace.js +4 -4
- package/dist/components/discord-action-row/DiscordActionRow.js +6 -6
- package/dist/components/discord-attachments/DiscordAttachments.js +18 -18
- package/dist/components/discord-audio-attachment/DiscordAudioAttachment.js +202 -202
- package/dist/components/discord-author-info/DiscordAuthorInfo.d.ts.map +1 -1
- package/dist/components/discord-author-info/DiscordAuthorInfo.js +156 -156
- package/dist/components/discord-author-info/DiscordAuthorInfo.js.map +1 -1
- package/dist/components/discord-bold/DiscordBold.js +4 -4
- package/dist/components/discord-button/DiscordButton.d.ts.map +1 -1
- package/dist/components/discord-button/DiscordButton.js +131 -128
- package/dist/components/discord-button/DiscordButton.js.map +1 -1
- package/dist/components/discord-channel-select-menu-option/DiscordChannelSelectMenuOption.js +131 -131
- package/dist/components/discord-code/DiscordCode.js +64 -64
- package/dist/components/discord-code-block/DiscordCodeBlock.js +2 -2
- package/dist/components/discord-command/DiscordCommand.js +109 -109
- package/dist/components/discord-components-column/DiscordComponentsColumn.js +18 -18
- package/dist/components/discord-container/DiscordContainer.js +47 -47
- package/dist/components/discord-custom-emoji/DiscordCustomEmoji.js +36 -36
- package/dist/components/discord-embed/DiscordEmbed.d.ts.map +1 -1
- package/dist/components/discord-embed/DiscordEmbed.js +285 -285
- package/dist/components/discord-embed/DiscordEmbed.js.map +1 -1
- package/dist/components/discord-embed-description/DiscordEmbedDescription.js +25 -25
- package/dist/components/discord-embed-field/DiscordEmbedField.js +40 -40
- package/dist/components/discord-embed-fields/DiscordEmbedFields.js +19 -19
- package/dist/components/discord-embed-footer/DiscordEmbedFooter.js +36 -36
- package/dist/components/discord-file-attachment/DiscordFileAttachment.js +191 -191
- package/dist/components/discord-forwarded-message/DiscordForwardedMessage.js +126 -126
- package/dist/components/discord-header/DiscordHeader.js +27 -27
- package/dist/components/discord-image-attachment/DiscordImageAttachment.js +38 -38
- package/dist/components/discord-input-text/DiscordInputText.js +284 -284
- package/dist/components/discord-invite/DiscordInvite.js +225 -225
- package/dist/components/discord-italic/DiscordItalic.js +4 -4
- package/dist/components/discord-link/DiscordLink.js +19 -19
- package/dist/components/discord-list-item/DiscordListItem.d.ts.map +1 -1
- package/dist/components/discord-list-item/DiscordListItem.js +8 -5
- package/dist/components/discord-list-item/DiscordListItem.js.map +1 -1
- package/dist/components/discord-media-fullscreen-previewer/DiscordMediaFullscreenPreviewer.js +463 -463
- package/dist/components/discord-media-gallery/DiscordMediaGallery.js +219 -219
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.d.ts.map +1 -1
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js +102 -99
- package/dist/components/discord-media-gallery-item/DiscordMediaGalleryItem.js.map +1 -1
- package/dist/components/discord-media-spoileable-cover/DiscordMediaSpoileableCover.js +65 -65
- package/dist/components/discord-mention/DiscordMention.js +66 -66
- package/dist/components/discord-message/DiscordMessage.d.ts.map +1 -1
- package/dist/components/discord-message/DiscordMessage.js +338 -335
- package/dist/components/discord-message/DiscordMessage.js.map +1 -1
- package/dist/components/discord-messages/DiscordMessages.js +77 -77
- package/dist/components/discord-modal/DiscordModal.js +465 -465
- package/dist/components/discord-ordered-list/DiscordOrderedList.d.ts.map +1 -1
- package/dist/components/discord-ordered-list/DiscordOrderedList.js +20 -14
- package/dist/components/discord-ordered-list/DiscordOrderedList.js.map +1 -1
- package/dist/components/discord-poll/DiscordPoll.js +157 -157
- package/dist/components/discord-poll-answer/DiscordPollAnswer.js +227 -227
- package/dist/components/discord-pre/DiscordPre.js +18 -18
- package/dist/components/discord-quote/DiscordQuote.js +31 -31
- package/dist/components/discord-reaction/DiscordReaction.js +73 -73
- package/dist/components/discord-reactions/DiscordReactions.js +9 -9
- package/dist/components/discord-reply/DiscordReply.d.ts.map +1 -1
- package/dist/components/discord-reply/DiscordReply.js +246 -246
- package/dist/components/discord-reply/DiscordReply.js.map +1 -1
- package/dist/components/discord-role-select-menu-option/DiscordRoleSelectMenuOption.js +75 -75
- package/dist/components/discord-section/DiscordSection.js +6 -6
- package/dist/components/discord-section-components/DiscordSectionComponents.js +14 -14
- package/dist/components/discord-select-menu-portal/DiscordSelectMenuPortal.js +30 -30
- package/dist/components/discord-separator/DiscordSeparator.js +9 -9
- package/dist/components/discord-spoiler/DiscordSpoiler.js +31 -31
- package/dist/components/discord-string-select-menu/DiscordStringSelectMenu.js +192 -192
- package/dist/components/discord-string-select-menu-option/DiscordStringSelectMenuOption.js +45 -45
- package/dist/components/discord-subscript/DiscordSubscript.js +15 -15
- package/dist/components/discord-system-message/DiscordSystemMessage.d.ts.map +1 -1
- package/dist/components/discord-system-message/DiscordSystemMessage.js +134 -131
- package/dist/components/discord-system-message/DiscordSystemMessage.js.map +1 -1
- package/dist/components/discord-tenor-video/DiscordTenorVideo.js +76 -76
- package/dist/components/discord-text-display/DiscordTextDisplay.js +10 -10
- package/dist/components/discord-text-file-attachment-previewer/DiscordTextFileAttachmentPreviewer.js +55 -55
- package/dist/components/discord-thread/DiscordThread.js +81 -81
- package/dist/components/discord-thread-message/DiscordThreadMessage.js +90 -90
- package/dist/components/discord-thumbnail/DiscordThumbnail.js +20 -20
- package/dist/components/discord-time/DiscordTime.js +7 -7
- package/dist/components/discord-transcript-header/DiscordTranscriptHeader.js +51 -51
- package/dist/components/discord-unordered-list/DiscordUnorderedList.d.ts.map +1 -1
- package/dist/components/discord-unordered-list/DiscordUnorderedList.js +18 -15
- package/dist/components/discord-unordered-list/DiscordUnorderedList.js.map +1 -1
- package/dist/components/discord-user-select-menu-option/DiscordUserSelectMenuOption.js +58 -58
- package/dist/components/discord-verified-author-tag/DiscordVerifiedAuthorTag.js +36 -36
- package/dist/components/discord-video-attachment/DiscordVideoAttachment.js +494 -494
- package/dist/components/discord-voice-message/DiscordVoiceMessage.js +255 -255
- package/dist/components/svgs/AttachmentDownloadButton.js +67 -67
- package/dist/components/svgs/AttachmentReply.js +5 -5
- package/dist/components/svgs/Boost.js +3 -3
- package/dist/components/svgs/ChannelForum.js +19 -19
- package/dist/components/svgs/ChannelIcon.js +17 -17
- package/dist/components/svgs/ChannelThread.js +15 -15
- package/dist/components/svgs/ChannelsAndRoles.js +23 -23
- package/dist/components/svgs/CommandIcon.js +4 -4
- package/dist/components/svgs/CommandIconName.js +5 -5
- package/dist/components/svgs/CommandReply.js +9 -9
- package/dist/components/svgs/CustomizeCommunity.js +17 -17
- package/dist/components/svgs/DMCall.js +6 -6
- package/dist/components/svgs/DMEdit.js +8 -8
- package/dist/components/svgs/DMMissedCall.js +8 -8
- package/dist/components/svgs/Ephemeral.js +21 -21
- package/dist/components/svgs/ExpandMore.js +4 -4
- package/dist/components/svgs/FileAttachment.js +10 -10
- package/dist/components/svgs/GuildBadge.js +8 -8
- package/dist/components/svgs/LaunchIcon.js +9 -9
- package/dist/components/svgs/LockedVoiceChannel.js +17 -17
- package/dist/components/svgs/MediaPauseIcon.js +2 -2
- package/dist/components/svgs/MediaPlayIcon.js +2 -2
- package/dist/components/svgs/MediaRestartIcon.js +2 -2
- package/dist/components/svgs/MediaVolumeAbove50PercentIcon.js +3 -3
- package/dist/components/svgs/MediaVolumeBelow50PercentIcon.js +2 -2
- package/dist/components/svgs/MediaVolumeMutedIcon.js +2 -2
- package/dist/components/svgs/MessageIcon.js +3 -3
- package/dist/components/svgs/ModalClose.js +4 -4
- package/dist/components/svgs/ModalWarning.js +5 -5
- package/dist/components/svgs/PartnerBadgeOverlay.js +11 -11
- package/dist/components/svgs/Pin.js +5 -5
- package/dist/components/svgs/PremiumIcon.js +6 -6
- package/dist/components/svgs/ReplyIcon.js +5 -5
- package/dist/components/svgs/ServerGuide.js +17 -17
- package/dist/components/svgs/ServerUpgrade.js +7 -7
- package/dist/components/svgs/SystemAlert.js +7 -7
- package/dist/components/svgs/SystemError.js +6 -6
- package/dist/components/svgs/Thread.js +9 -9
- package/dist/components/svgs/UserJoin.js +5 -5
- package/dist/components/svgs/UserLeave.js +5 -5
- package/dist/components/svgs/VerifiedBadgeOverlay.js +4 -4
- package/dist/components/svgs/VerifiedTick.js +13 -13
- package/dist/components/svgs/VideoFullScreenIcon.js +8 -8
- package/dist/components/svgs/VideoPausePopIcon.js +2 -2
- package/dist/components/svgs/VideoPlayPopIcon.js +2 -2
- package/dist/components/svgs/VoiceChannel.js +19 -19
- package/dist/components/svgs/clan-icons/Crystal.js +27 -27
- package/dist/components/svgs/clan-icons/Diamond.js +35 -35
- package/dist/components/svgs/clan-icons/Explosion.js +30 -30
- package/dist/components/svgs/clan-icons/Flame.js +23 -23
- package/dist/components/svgs/clan-icons/Flower.js +18 -18
- package/dist/components/svgs/clan-icons/Heart.js +19 -19
- package/dist/components/svgs/clan-icons/Key.js +32 -32
- package/dist/components/svgs/clan-icons/Leaf.js +23 -23
- package/dist/components/svgs/clan-icons/Lightning.js +25 -25
- package/dist/components/svgs/clan-icons/Magic.js +34 -34
- package/dist/components/svgs/clan-icons/Moon.js +21 -21
- package/dist/components/svgs/clan-icons/Mushroom.js +33 -33
- package/dist/components/svgs/clan-icons/Mythical.js +32 -32
- package/dist/components/svgs/clan-icons/Ornament.js +48 -48
- package/dist/components/svgs/clan-icons/Plasma.js +23 -23
- package/dist/components/svgs/clan-icons/Rock.js +20 -20
- package/dist/components/svgs/clan-icons/Shell.js +29 -29
- package/dist/components/svgs/clan-icons/Skull.js +28 -28
- package/dist/components/svgs/clan-icons/Sun.js +36 -36
- package/dist/components/svgs/clan-icons/Sword.js +27 -27
- package/dist/components/svgs/clan-icons/Water.js +20 -20
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -3
- package/dist/config.js.map +1 -1
- package/dist/hydrate/index.d.ts +40 -0
- package/dist/hydrate/index.d.ts.map +1 -0
- package/dist/hydrate/index.js +48 -0
- package/dist/hydrate/index.js.map +1 -0
- package/package.json +222 -219
- package/dist/bundle/styles/base.css.map +0 -1
- package/dist/components/discord-container copy/DiscordContainer.d.ts +0 -22
- package/dist/components/discord-container copy/DiscordContainer.d.ts.map +0 -1
- package/dist/components/discord-container copy/DiscordContainer.js +0 -159
- package/dist/components/discord-container copy/DiscordContainer.js.map +0 -1
- package/dist/components/discord-media-fullscreen-previewer/context.d.ts +0 -10
- package/dist/components/discord-media-fullscreen-previewer/context.d.ts.map +0 -1
- package/dist/components/discord-media-fullscreen-previewer/context.js +0 -3
- package/dist/components/discord-media-fullscreen-previewer/context.js.map +0 -1
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts +0 -26
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.d.ts.map +0 -1
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js +0 -183
- package/dist/components/discord-media-gallery-tem/DiscordMediaGalleryItem.js.map +0 -1
- package/dist/components/discord-section/DiscordContainer.d.ts +0 -22
- package/dist/components/discord-section/DiscordContainer.d.ts.map +0 -1
- package/dist/components/discord-section/DiscordContainer.js +0 -159
- package/dist/components/discord-section/DiscordContainer.js.map +0 -1
- package/dist/components/discord-section copy/DiscordSection.d.ts +0 -15
- package/dist/components/discord-section copy/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-section copy/DiscordSection.js +0 -77
- package/dist/components/discord-section copy/DiscordSection.js.map +0 -1
- package/dist/components/discord-section-components/DiscordSection.d.ts +0 -15
- package/dist/components/discord-section-components/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-section-components/DiscordSection.js +0 -77
- package/dist/components/discord-section-components/DiscordSection.js.map +0 -1
- package/dist/components/discord-text-display/DiscordSection.d.ts +0 -15
- package/dist/components/discord-text-display/DiscordSection.d.ts.map +0 -1
- package/dist/components/discord-text-display/DiscordSection.js +0 -79
- package/dist/components/discord-text-display/DiscordSection.js.map +0 -1
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts +0 -71
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.d.ts.map +0 -1
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js +0 -238
- package/dist/components/discord-text-file-attachment-preview/DiscordTextFileAttachmentPreviewer.js.map +0 -1
|
@@ -48,220 +48,220 @@ let DiscordInputText = class DiscordInputText extends LitElement {
|
|
|
48
48
|
this.calculatedCharactersCount = 0;
|
|
49
49
|
this.validInputTextTypes = new Set(['short', 'paragraph']);
|
|
50
50
|
}
|
|
51
|
-
static { this.styles = css `
|
|
52
|
-
.discord-input-text {
|
|
53
|
-
width: 100%;
|
|
54
|
-
margin-bottom: 1em;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.discord-label-input-text {
|
|
58
|
-
margin-bottom: 8px;
|
|
59
|
-
font-size: 12px;
|
|
60
|
-
line-height: 1.3333333333333333;
|
|
61
|
-
font-weight: 700;
|
|
62
|
-
text-transform: uppercase;
|
|
63
|
-
letter-spacing: 0.02em;
|
|
64
|
-
color: color-mix(in oklab, hsl(215 calc(1 * 8.8%) 73.3% / 1) 100%, black 0%);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.discord-text-input-warning-length {
|
|
68
|
-
display: flex;
|
|
69
|
-
align-items: center;
|
|
70
|
-
font-size: 12px;
|
|
71
|
-
line-height: 1.3333333333333333;
|
|
72
|
-
font-weight: 700;
|
|
73
|
-
text-transform: normal !important;
|
|
74
|
-
letter-spacing: 0.02em;
|
|
75
|
-
color: #b0b5bc;
|
|
76
|
-
gap: 3px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.discord-text-input-warning-error-text {
|
|
80
|
-
font-size: 12px;
|
|
81
|
-
font-weight: 500;
|
|
82
|
-
font-style: italic;
|
|
83
|
-
text-transform: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.discord-text-input-warning-bottom-error-text {
|
|
87
|
-
font-size: 12px;
|
|
88
|
-
line-height: 1.3333333333333333;
|
|
89
|
-
font-weight: 400;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.discord-text-input-required {
|
|
93
|
-
padding-left: 4px;
|
|
94
|
-
color: hsl(359 calc(1 * 87.3%) 59.8% / 1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.discord-text-input-container {
|
|
98
|
-
width: 100%;
|
|
99
|
-
display: flex;
|
|
100
|
-
flex-direction: column;
|
|
101
|
-
position: relative;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.discord-text-input-paragraph {
|
|
105
|
-
width: 100%;
|
|
106
|
-
resize: none;
|
|
107
|
-
box-sizing: border-box;
|
|
108
|
-
height: 83px;
|
|
109
|
-
padding: 8px 38.92px 8px 8px;
|
|
110
|
-
border-radius: 3px;
|
|
111
|
-
border: medium;
|
|
112
|
-
background-color: #1e1f22;
|
|
113
|
-
color: #b0b5bc;
|
|
114
|
-
font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.discord-text-input-short {
|
|
118
|
-
width: 100%;
|
|
119
|
-
resize: none;
|
|
120
|
-
box-sizing: border-box;
|
|
121
|
-
height: 40px;
|
|
122
|
-
padding: 8px 38.92px 8px 8px;
|
|
123
|
-
border-radius: 3px;
|
|
124
|
-
border: medium;
|
|
125
|
-
background-color: #1e1f22;
|
|
126
|
-
color: #b0b5bc;
|
|
127
|
-
font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
input,
|
|
131
|
-
textarea,
|
|
132
|
-
::placeholder {
|
|
133
|
-
font-weight: 400;
|
|
134
|
-
font-size: 16px;
|
|
135
|
-
color: #b0b5bc;
|
|
136
|
-
opacity: 0.8;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.discord-text-input-paragraph::-webkit-scrollbar {
|
|
140
|
-
width: 8px;
|
|
141
|
-
margin-right: 5px;
|
|
142
|
-
background-color: transparent;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.discord-text-input-paragraph::-webkit-scrollbar-track {
|
|
146
|
-
background-color: rgba(255, 255, 255, 0.2);
|
|
147
|
-
margin-right: 1em auto;
|
|
148
|
-
border-radius: 10px;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.discord-text-input-paragraph::-webkit-scrollbar-thumb {
|
|
152
|
-
border-radius: 10px;
|
|
153
|
-
background-color: rgba(0, 0, 0, 0.5);
|
|
154
|
-
margin-right: 1em auto;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.discord-text-input-textarea-max-length {
|
|
158
|
-
font-size: small;
|
|
159
|
-
position: absolute;
|
|
160
|
-
display: flex;
|
|
161
|
-
color: #b0b5bc;
|
|
162
|
-
right: 0;
|
|
163
|
-
bottom: 0;
|
|
164
|
-
padding-right: 16px;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
:host .discord-text-input-warning-length * {
|
|
168
|
-
color: color-mix(in oklab, hsl(358 calc(1 * 92.9%) 72.4% / 1) 100%, black 0%) !important;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:host([light-theme]) .discord-text-input-warning-length * {
|
|
172
|
-
color: color-mix(in oklab, hsl(360 calc(1 * 60.2%) 39.4% / 1) 100%, black 0%) !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
:host([light-theme]) .discord-text-input-short,
|
|
176
|
-
:host([light-theme]) .discord-label-input-text {
|
|
177
|
-
color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 1) 100%, black 0%);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
:host([light-theme]) .discord-text-input-paragraph,
|
|
181
|
-
:host([light-theme]) .discord-text-input-short {
|
|
182
|
-
background-color: rgb(253, 253, 253);
|
|
183
|
-
border: 1px solid #b0b5bc;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
:host([light-theme]) input,
|
|
187
|
-
:host([light-theme]) textarea,
|
|
188
|
-
:host([light-theme]) ::placeholder {
|
|
189
|
-
font-weight: 400;
|
|
190
|
-
font-size: 16px;
|
|
191
|
-
color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%);
|
|
192
|
-
opacity: 0.8;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.discord-text-input-message-needed-input,
|
|
196
|
-
.discord-text-input-message-needed-min-length {
|
|
197
|
-
background-color: white;
|
|
198
|
-
position: absolute;
|
|
199
|
-
align-items: center;
|
|
200
|
-
gap: 5px;
|
|
201
|
-
left: 50%;
|
|
202
|
-
transform: translateX(-50%);
|
|
203
|
-
opacity: 0;
|
|
204
|
-
display: none;
|
|
205
|
-
transition: 0.5s;
|
|
206
|
-
color: black;
|
|
207
|
-
border-radius: 5px;
|
|
208
|
-
text-align: center;
|
|
209
|
-
font-family: system-ui;
|
|
210
|
-
pointer-events: none;
|
|
211
|
-
padding: 10px;
|
|
212
|
-
min-width: 50%;
|
|
213
|
-
border: black solid 1px;
|
|
214
|
-
z-index: 25;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
.discord-text-input-message-needed-input::after,
|
|
218
|
-
.discord-text-input-message-needed-min-length::after {
|
|
219
|
-
content: '';
|
|
220
|
-
position: absolute;
|
|
221
|
-
bottom: 100%; /* Positions the arrow above the div */
|
|
222
|
-
left: 0;
|
|
223
|
-
transform: translateX(50%);
|
|
224
|
-
border-width: 10px !important; /* Arrow size */
|
|
225
|
-
border-style: solid !important;
|
|
226
|
-
border-color: transparent transparent white transparent !important; /* Arrow pointing up */
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
:host([light-theme]) .discord-text-input-message-needed-input::after,
|
|
230
|
-
:host([light-theme]) .discord-text-input-message-needed-min-length::after {
|
|
231
|
-
border-color: transparent transparent #bfbfbf transparent !important; /* Arrow pointing up */
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.discord-text-input-message-needed-min-length::after {
|
|
235
|
-
transform: translate(500%);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.discord-text-input-message-needed-min-length {
|
|
239
|
-
left: 50% !important;
|
|
240
|
-
width: max-content;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.icon {
|
|
244
|
-
width: 25px;
|
|
245
|
-
height: 25px;
|
|
246
|
-
background-color: darkorange;
|
|
247
|
-
border-radius: 5px;
|
|
248
|
-
position: relative;
|
|
249
|
-
display: flex;
|
|
250
|
-
justify-content: center;
|
|
251
|
-
align-items: center;
|
|
252
|
-
color: white;
|
|
253
|
-
font-weight: bold;
|
|
254
|
-
font-size: 18px;
|
|
255
|
-
line-height: 1;
|
|
256
|
-
text-align: center;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.exclamation {
|
|
260
|
-
display: flex;
|
|
261
|
-
flex-direction: column;
|
|
262
|
-
align-items: center;
|
|
263
|
-
line-height: 1;
|
|
264
|
-
}
|
|
51
|
+
static { this.styles = css `
|
|
52
|
+
.discord-input-text {
|
|
53
|
+
width: 100%;
|
|
54
|
+
margin-bottom: 1em;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.discord-label-input-text {
|
|
58
|
+
margin-bottom: 8px;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
line-height: 1.3333333333333333;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
letter-spacing: 0.02em;
|
|
64
|
+
color: color-mix(in oklab, hsl(215 calc(1 * 8.8%) 73.3% / 1) 100%, black 0%);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.discord-text-input-warning-length {
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
font-size: 12px;
|
|
71
|
+
line-height: 1.3333333333333333;
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
text-transform: normal !important;
|
|
74
|
+
letter-spacing: 0.02em;
|
|
75
|
+
color: #b0b5bc;
|
|
76
|
+
gap: 3px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.discord-text-input-warning-error-text {
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
font-weight: 500;
|
|
82
|
+
font-style: italic;
|
|
83
|
+
text-transform: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.discord-text-input-warning-bottom-error-text {
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
line-height: 1.3333333333333333;
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.discord-text-input-required {
|
|
93
|
+
padding-left: 4px;
|
|
94
|
+
color: hsl(359 calc(1 * 87.3%) 59.8% / 1);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.discord-text-input-container {
|
|
98
|
+
width: 100%;
|
|
99
|
+
display: flex;
|
|
100
|
+
flex-direction: column;
|
|
101
|
+
position: relative;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.discord-text-input-paragraph {
|
|
105
|
+
width: 100%;
|
|
106
|
+
resize: none;
|
|
107
|
+
box-sizing: border-box;
|
|
108
|
+
height: 83px;
|
|
109
|
+
padding: 8px 38.92px 8px 8px;
|
|
110
|
+
border-radius: 3px;
|
|
111
|
+
border: medium;
|
|
112
|
+
background-color: #1e1f22;
|
|
113
|
+
color: #b0b5bc;
|
|
114
|
+
font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.discord-text-input-short {
|
|
118
|
+
width: 100%;
|
|
119
|
+
resize: none;
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
height: 40px;
|
|
122
|
+
padding: 8px 38.92px 8px 8px;
|
|
123
|
+
border-radius: 3px;
|
|
124
|
+
border: medium;
|
|
125
|
+
background-color: #1e1f22;
|
|
126
|
+
color: #b0b5bc;
|
|
127
|
+
font-family: 'gg sans', 'Noto Sans', Whitney, 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
input,
|
|
131
|
+
textarea,
|
|
132
|
+
::placeholder {
|
|
133
|
+
font-weight: 400;
|
|
134
|
+
font-size: 16px;
|
|
135
|
+
color: #b0b5bc;
|
|
136
|
+
opacity: 0.8;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.discord-text-input-paragraph::-webkit-scrollbar {
|
|
140
|
+
width: 8px;
|
|
141
|
+
margin-right: 5px;
|
|
142
|
+
background-color: transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.discord-text-input-paragraph::-webkit-scrollbar-track {
|
|
146
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
147
|
+
margin-right: 1em auto;
|
|
148
|
+
border-radius: 10px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.discord-text-input-paragraph::-webkit-scrollbar-thumb {
|
|
152
|
+
border-radius: 10px;
|
|
153
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
154
|
+
margin-right: 1em auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.discord-text-input-textarea-max-length {
|
|
158
|
+
font-size: small;
|
|
159
|
+
position: absolute;
|
|
160
|
+
display: flex;
|
|
161
|
+
color: #b0b5bc;
|
|
162
|
+
right: 0;
|
|
163
|
+
bottom: 0;
|
|
164
|
+
padding-right: 16px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
:host .discord-text-input-warning-length * {
|
|
168
|
+
color: color-mix(in oklab, hsl(358 calc(1 * 92.9%) 72.4% / 1) 100%, black 0%) !important;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:host([light-theme]) .discord-text-input-warning-length * {
|
|
172
|
+
color: color-mix(in oklab, hsl(360 calc(1 * 60.2%) 39.4% / 1) 100%, black 0%) !important;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host([light-theme]) .discord-text-input-short,
|
|
176
|
+
:host([light-theme]) .discord-label-input-text {
|
|
177
|
+
color: color-mix(in oklab, hsl(228 calc(1 * 6%) 32.5% / 1) 100%, black 0%);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:host([light-theme]) .discord-text-input-paragraph,
|
|
181
|
+
:host([light-theme]) .discord-text-input-short {
|
|
182
|
+
background-color: rgb(253, 253, 253);
|
|
183
|
+
border: 1px solid #b0b5bc;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:host([light-theme]) input,
|
|
187
|
+
:host([light-theme]) textarea,
|
|
188
|
+
:host([light-theme]) ::placeholder {
|
|
189
|
+
font-weight: 400;
|
|
190
|
+
font-size: 16px;
|
|
191
|
+
color: color-mix(in oklab, hsl(223 calc(1 * 6.7%) 20.6% / 1) 100%, black 0%);
|
|
192
|
+
opacity: 0.8;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.discord-text-input-message-needed-input,
|
|
196
|
+
.discord-text-input-message-needed-min-length {
|
|
197
|
+
background-color: white;
|
|
198
|
+
position: absolute;
|
|
199
|
+
align-items: center;
|
|
200
|
+
gap: 5px;
|
|
201
|
+
left: 50%;
|
|
202
|
+
transform: translateX(-50%);
|
|
203
|
+
opacity: 0;
|
|
204
|
+
display: none;
|
|
205
|
+
transition: 0.5s;
|
|
206
|
+
color: black;
|
|
207
|
+
border-radius: 5px;
|
|
208
|
+
text-align: center;
|
|
209
|
+
font-family: system-ui;
|
|
210
|
+
pointer-events: none;
|
|
211
|
+
padding: 10px;
|
|
212
|
+
min-width: 50%;
|
|
213
|
+
border: black solid 1px;
|
|
214
|
+
z-index: 25;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.discord-text-input-message-needed-input::after,
|
|
218
|
+
.discord-text-input-message-needed-min-length::after {
|
|
219
|
+
content: '';
|
|
220
|
+
position: absolute;
|
|
221
|
+
bottom: 100%; /* Positions the arrow above the div */
|
|
222
|
+
left: 0;
|
|
223
|
+
transform: translateX(50%);
|
|
224
|
+
border-width: 10px !important; /* Arrow size */
|
|
225
|
+
border-style: solid !important;
|
|
226
|
+
border-color: transparent transparent white transparent !important; /* Arrow pointing up */
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
:host([light-theme]) .discord-text-input-message-needed-input::after,
|
|
230
|
+
:host([light-theme]) .discord-text-input-message-needed-min-length::after {
|
|
231
|
+
border-color: transparent transparent #bfbfbf transparent !important; /* Arrow pointing up */
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.discord-text-input-message-needed-min-length::after {
|
|
235
|
+
transform: translate(500%);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.discord-text-input-message-needed-min-length {
|
|
239
|
+
left: 50% !important;
|
|
240
|
+
width: max-content;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.icon {
|
|
244
|
+
width: 25px;
|
|
245
|
+
height: 25px;
|
|
246
|
+
background-color: darkorange;
|
|
247
|
+
border-radius: 5px;
|
|
248
|
+
position: relative;
|
|
249
|
+
display: flex;
|
|
250
|
+
justify-content: center;
|
|
251
|
+
align-items: center;
|
|
252
|
+
color: white;
|
|
253
|
+
font-weight: bold;
|
|
254
|
+
font-size: 18px;
|
|
255
|
+
line-height: 1;
|
|
256
|
+
text-align: center;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.exclamation {
|
|
260
|
+
display: flex;
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
align-items: center;
|
|
263
|
+
line-height: 1;
|
|
264
|
+
}
|
|
265
265
|
`; }
|
|
266
266
|
connectedCallback() {
|
|
267
267
|
super.connectedCallback();
|
|
@@ -284,76 +284,76 @@ let DiscordInputText = class DiscordInputText extends LitElement {
|
|
|
284
284
|
render() {
|
|
285
285
|
this.checkNeededArgument();
|
|
286
286
|
this.checkType();
|
|
287
|
-
return html `
|
|
288
|
-
<div class="discord-input-text">
|
|
289
|
-
<div class=${classMap({ 'discord-text-input-warning-length': this.hasWarning })}>
|
|
290
|
-
<h2 class="discord-label-input-text">
|
|
291
|
-
${this.label.slice(0, 45)}${when(this.required && !this.hasWarning, () => html `<span class="discord-text-input-required">*</span>`)}
|
|
292
|
-
</h2>
|
|
293
|
-
${when(this.hasWarning, () => html `<span class="discord-text-input-warning-length discord-text-input-warning-error-text">
|
|
294
|
-
- Must be between ${this.minLength} and ${this.maxLength} in length.</span
|
|
295
|
-
>`)}
|
|
296
|
-
</div>
|
|
297
|
-
<div class="discord-text-input-container">
|
|
298
|
-
${when(this.type === 'paragraph', () => html `
|
|
299
|
-
<div class="discord-text-input-container">
|
|
300
|
-
<textarea
|
|
301
|
-
@input=${(event) => this.handleInputChange(event)}
|
|
302
|
-
.required=${this.required}
|
|
303
|
-
.value=${this.value}
|
|
304
|
-
class="discord-text-input-paragraph"
|
|
305
|
-
type="text"
|
|
306
|
-
minlength="${this.minLength}"
|
|
307
|
-
maxlength="${this.maxLength}"
|
|
308
|
-
placeholder="${ifDefined(this.placeholder)}"
|
|
309
|
-
rows="3"
|
|
310
|
-
></textarea>
|
|
311
|
-
<div class="discord-text-input-textarea-max-length">
|
|
312
|
-
<span
|
|
313
|
-
>${when(this.valueIsNotNullOrUndefined(this.calculatedMaxLength), () => this.calculatedMaxLength, () => when(this.value, () => this.maxLength - this.value.length, () => this.maxLength))}</span
|
|
314
|
-
>
|
|
315
|
-
</div>
|
|
316
|
-
</div>
|
|
317
|
-
`)}
|
|
318
|
-
${when(this.type === 'short', () => html `<input
|
|
319
|
-
@input=${(event) => this.handleInputChange(event)}
|
|
320
|
-
.required=${this.required}
|
|
321
|
-
.value=${this.value}
|
|
322
|
-
class="discord-text-input-short"
|
|
323
|
-
type="text"
|
|
324
|
-
minlength="${this.minLength}"
|
|
325
|
-
maxlength="${this.maxLength}"
|
|
326
|
-
placeholder="${ifDefined(this.placeholder)}"
|
|
327
|
-
rows="3"
|
|
328
|
-
/>`)}
|
|
329
|
-
</div>
|
|
330
|
-
${when(this.required, () => html `
|
|
331
|
-
<div class="discord-text-input-message-needed-input">
|
|
332
|
-
<div class="icon">
|
|
333
|
-
<div class="exclamation">!</div>
|
|
334
|
-
</div>
|
|
335
|
-
<span>Please fill out this field.</span>
|
|
336
|
-
</div>
|
|
337
|
-
`)}
|
|
338
|
-
${when(this.valueIsNotNullOrUndefined(this.minLength), () => html `
|
|
339
|
-
<div class="discord-text-input-message-needed-min-length">
|
|
340
|
-
<div class="icon">
|
|
341
|
-
<div class="exclamation">!</div>
|
|
342
|
-
</div>
|
|
343
|
-
<span
|
|
344
|
-
>Increase this text to ${this.minLength} characters or more. You are currently using ${this.calculatedCharactersCount}
|
|
345
|
-
characters</span
|
|
346
|
-
>
|
|
347
|
-
</div>
|
|
348
|
-
`)}
|
|
349
|
-
<div class=${classMap({ 'discord-text-input-warning-length': this.hasWarning })}>
|
|
350
|
-
<h2 class="discord-text-input-warning-length">
|
|
351
|
-
${when(this.hasWarning && this.valueIsNotNullOrUndefined(this.minLength), () => html `<span class="discord-text-input-warning-bottom-error-text"
|
|
352
|
-
>Must be ${this.minLength} characters or more in length.</span
|
|
353
|
-
>`)}
|
|
354
|
-
</h2>
|
|
355
|
-
</div>
|
|
356
|
-
</div>
|
|
287
|
+
return html `
|
|
288
|
+
<div class="discord-input-text">
|
|
289
|
+
<div class=${classMap({ 'discord-text-input-warning-length': this.hasWarning })}>
|
|
290
|
+
<h2 class="discord-label-input-text">
|
|
291
|
+
${this.label.slice(0, 45)}${when(this.required && !this.hasWarning, () => html `<span class="discord-text-input-required">*</span>`)}
|
|
292
|
+
</h2>
|
|
293
|
+
${when(this.hasWarning, () => html `<span class="discord-text-input-warning-length discord-text-input-warning-error-text">
|
|
294
|
+
- Must be between ${this.minLength} and ${this.maxLength} in length.</span
|
|
295
|
+
>`)}
|
|
296
|
+
</div>
|
|
297
|
+
<div class="discord-text-input-container">
|
|
298
|
+
${when(this.type === 'paragraph', () => html `
|
|
299
|
+
<div class="discord-text-input-container">
|
|
300
|
+
<textarea
|
|
301
|
+
@input=${(event) => this.handleInputChange(event)}
|
|
302
|
+
.required=${this.required}
|
|
303
|
+
.value=${this.value}
|
|
304
|
+
class="discord-text-input-paragraph"
|
|
305
|
+
type="text"
|
|
306
|
+
minlength="${this.minLength}"
|
|
307
|
+
maxlength="${this.maxLength}"
|
|
308
|
+
placeholder="${ifDefined(this.placeholder)}"
|
|
309
|
+
rows="3"
|
|
310
|
+
></textarea>
|
|
311
|
+
<div class="discord-text-input-textarea-max-length">
|
|
312
|
+
<span
|
|
313
|
+
>${when(this.valueIsNotNullOrUndefined(this.calculatedMaxLength), () => this.calculatedMaxLength, () => when(this.value, () => this.maxLength - this.value.length, () => this.maxLength))}</span
|
|
314
|
+
>
|
|
315
|
+
</div>
|
|
316
|
+
</div>
|
|
317
|
+
`)}
|
|
318
|
+
${when(this.type === 'short', () => html `<input
|
|
319
|
+
@input=${(event) => this.handleInputChange(event)}
|
|
320
|
+
.required=${this.required}
|
|
321
|
+
.value=${this.value}
|
|
322
|
+
class="discord-text-input-short"
|
|
323
|
+
type="text"
|
|
324
|
+
minlength="${this.minLength}"
|
|
325
|
+
maxlength="${this.maxLength}"
|
|
326
|
+
placeholder="${ifDefined(this.placeholder)}"
|
|
327
|
+
rows="3"
|
|
328
|
+
/>`)}
|
|
329
|
+
</div>
|
|
330
|
+
${when(this.required, () => html `
|
|
331
|
+
<div class="discord-text-input-message-needed-input">
|
|
332
|
+
<div class="icon">
|
|
333
|
+
<div class="exclamation">!</div>
|
|
334
|
+
</div>
|
|
335
|
+
<span>Please fill out this field.</span>
|
|
336
|
+
</div>
|
|
337
|
+
`)}
|
|
338
|
+
${when(this.valueIsNotNullOrUndefined(this.minLength), () => html `
|
|
339
|
+
<div class="discord-text-input-message-needed-min-length">
|
|
340
|
+
<div class="icon">
|
|
341
|
+
<div class="exclamation">!</div>
|
|
342
|
+
</div>
|
|
343
|
+
<span
|
|
344
|
+
>Increase this text to ${this.minLength} characters or more. You are currently using ${this.calculatedCharactersCount}
|
|
345
|
+
characters</span
|
|
346
|
+
>
|
|
347
|
+
</div>
|
|
348
|
+
`)}
|
|
349
|
+
<div class=${classMap({ 'discord-text-input-warning-length': this.hasWarning })}>
|
|
350
|
+
<h2 class="discord-text-input-warning-length">
|
|
351
|
+
${when(this.hasWarning && this.valueIsNotNullOrUndefined(this.minLength), () => html `<span class="discord-text-input-warning-bottom-error-text"
|
|
352
|
+
>Must be ${this.minLength} characters or more in length.</span
|
|
353
|
+
>`)}
|
|
354
|
+
</h2>
|
|
355
|
+
</div>
|
|
356
|
+
</div>
|
|
357
357
|
`;
|
|
358
358
|
}
|
|
359
359
|
checkNeededArgument() {
|