@weavy/uikit-react 12.1.0 → 14.0.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 +60 -0
- package/dist/cjs/index.js +28 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/client/WeavyClient.d.ts +8 -1
- package/dist/cjs/types/components/Attachment.d.ts +2 -1
- package/dist/cjs/types/components/Chat.d.ts +1 -1
- package/dist/cjs/types/components/Messages.d.ts +3 -1
- package/dist/cjs/types/components/PdfViewer.d.ts +3 -1
- package/dist/cjs/types/components/Preview.d.ts +8 -10
- package/dist/cjs/types/contexts/PreviewContext.d.ts +2 -1
- package/dist/cjs/types/contexts/WeavyContext.d.ts +2 -3
- package/dist/cjs/types/hooks/useConversations.d.ts +1 -1
- package/dist/cjs/types/hooks/useMutateMessage.d.ts +1 -1
- package/dist/cjs/types/hooks/useMutateRead.d.ts +1 -0
- package/dist/cjs/types/types/Chat.d.ts +2 -1
- package/dist/cjs/types/types/Message.d.ts +2 -0
- package/dist/cjs/types/types/types.d.ts +63 -9
- package/dist/cjs/types/ui/Spinner.d.ts +10 -0
- package/dist/cjs/types/utils/fileUtilities.d.ts +1 -4
- package/dist/css/weavy-chat.css +1803 -1041
- package/dist/css/weavy-messenger.css +2141 -1360
- package/dist/css/weavy.css +1943 -1162
- package/dist/esm/index.js +28 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/client/WeavyClient.d.ts +8 -1
- package/dist/esm/types/components/Attachment.d.ts +2 -1
- package/dist/esm/types/components/Chat.d.ts +1 -1
- package/dist/esm/types/components/Messages.d.ts +3 -1
- package/dist/esm/types/components/PdfViewer.d.ts +3 -1
- package/dist/esm/types/components/Preview.d.ts +8 -10
- package/dist/esm/types/contexts/PreviewContext.d.ts +2 -1
- package/dist/esm/types/contexts/WeavyContext.d.ts +2 -3
- package/dist/esm/types/hooks/useConversations.d.ts +1 -1
- package/dist/esm/types/hooks/useMutateMessage.d.ts +1 -1
- package/dist/esm/types/hooks/useMutateRead.d.ts +1 -0
- package/dist/esm/types/types/Chat.d.ts +2 -1
- package/dist/esm/types/types/Message.d.ts +2 -0
- package/dist/esm/types/types/types.d.ts +63 -9
- package/dist/esm/types/ui/Spinner.d.ts +10 -0
- package/dist/esm/types/utils/fileUtilities.d.ts +1 -4
- package/dist/index.d.ts +15 -7
- package/package.json +2 -2
- package/rollup.config.js +3 -1
- package/src/client/WeavyClient.ts +105 -29
- package/src/components/Attachment.tsx +8 -7
- package/src/components/Chat.tsx +8 -7
- package/src/components/Conversation.tsx +29 -23
- package/src/components/ConversationBadge.tsx +7 -5
- package/src/components/ConversationForm.tsx +1 -1
- package/src/components/ConversationList.tsx +59 -11
- package/src/components/ConversationListItem.tsx +71 -54
- package/src/components/FileBrowser.tsx +53 -50
- package/src/components/MeetingCard.tsx +35 -13
- package/src/components/Meetings.tsx +1 -1
- package/src/components/Message.tsx +41 -41
- package/src/components/Messages.tsx +62 -61
- package/src/components/Messenger.tsx +7 -2
- package/src/components/NewConversation.tsx +1 -1
- package/src/components/PdfViewer.tsx +93 -88
- package/src/components/Preview.tsx +115 -54
- package/src/components/Reactions.tsx +11 -5
- package/src/components/SearchUsers.tsx +21 -11
- package/src/components/SeenBy.tsx +13 -7
- package/src/components/Typing.tsx +11 -12
- package/src/contexts/PreviewContext.tsx +90 -16
- package/src/contexts/UserContext.tsx +1 -1
- package/src/contexts/WeavyContext.tsx +10 -7
- package/src/hooks/useBadge.ts +2 -6
- package/src/hooks/useChat.ts +3 -14
- package/src/hooks/useConversation.ts +1 -7
- package/src/hooks/useConversations.ts +15 -11
- package/src/hooks/useFileUploader.ts +6 -8
- package/src/hooks/useMembers.ts +1 -7
- package/src/hooks/useMessages.ts +1 -7
- package/src/hooks/useMutateChat.ts +6 -11
- package/src/hooks/useMutateConversation.ts +7 -10
- package/src/hooks/useMutateConversationName.ts +10 -12
- package/src/hooks/useMutateDeleteReaction.ts +3 -8
- package/src/hooks/useMutateExternalBlobs.ts +6 -11
- package/src/hooks/useMutateMeeting.ts +6 -11
- package/src/hooks/useMutateMembers.ts +8 -13
- package/src/hooks/useMutateMessage.ts +9 -18
- package/src/hooks/useMutatePinned.ts +3 -8
- package/src/hooks/useMutateReaction.ts +6 -12
- package/src/hooks/useMutateRead.ts +5 -12
- package/src/hooks/useMutateRemoveMembers.ts +7 -12
- package/src/hooks/useMutateTyping.ts +6 -11
- package/src/hooks/usePresence.ts +2 -3
- package/src/hooks/useReactions.ts +11 -12
- package/src/hooks/useSearchUsers.ts +1 -6
- package/src/hooks/useUser.ts +3 -14
- package/src/scss/theme/_alert.scss +61 -63
- package/src/scss/theme/_appbar.scss +105 -28
- package/src/scss/theme/_avatar.scss +23 -28
- package/src/scss/theme/_badge.scss +26 -18
- package/src/scss/theme/_buttons.scss +107 -52
- package/src/scss/theme/_card.scss +102 -4
- package/src/scss/theme/_checkbox.scss +16 -20
- package/src/scss/theme/_code-vscode-dark.scss +184 -0
- package/src/scss/theme/_code-vscode-light.scss +179 -0
- package/src/scss/theme/_code.scss +9 -114
- package/src/scss/theme/_comment-editor-cm.scss +97 -0
- package/src/scss/theme/_comment-editor.scss +129 -0
- package/src/scss/theme/_comments.scss +66 -0
- package/src/scss/theme/_content.scss +33 -5
- package/src/scss/theme/_conversations.scss +19 -78
- package/src/scss/theme/_dropdown.scss +102 -15
- package/src/scss/theme/_embed.scss +135 -0
- package/src/scss/theme/_facepile.scss +11 -0
- package/src/scss/theme/_filebrowser.scss +1 -1
- package/src/scss/theme/_files.scss +77 -48
- package/src/scss/theme/_grid.scss +8 -0
- package/src/scss/theme/_icons.scss +155 -19
- package/src/scss/theme/_image-grid.scss +7 -10
- package/src/scss/theme/_input.scss +160 -0
- package/src/scss/theme/_item.scss +169 -0
- package/src/scss/theme/_list.scss +57 -0
- package/src/scss/theme/_meeting.scss +11 -0
- package/src/scss/theme/_message-editor-cm.scss +95 -0
- package/src/scss/theme/_message-editor.scss +66 -20
- package/src/scss/theme/_messages.scss +51 -105
- package/src/scss/theme/_meta.scss +12 -0
- package/src/scss/theme/_overlays.scss +31 -76
- package/src/scss/theme/_pager.scss +5 -1
- package/src/scss/theme/_pane.scss +13 -2
- package/src/scss/theme/_panels.scss +34 -25
- package/src/scss/theme/_picker-list.scss +5 -3
- package/src/scss/theme/_placeholder.scss +19 -0
- package/src/scss/theme/_poll.scss +49 -0
- package/src/scss/theme/_post-editor-cm.scss +100 -0
- package/src/scss/theme/_post-editor.scss +127 -0
- package/src/scss/theme/_post.scss +83 -0
- package/src/scss/theme/_preview-code.scss +14 -0
- package/src/scss/theme/_preview-embed.scss +11 -5
- package/src/scss/theme/_preview-image.scss +8 -26
- package/src/scss/theme/_preview-media.scss +1 -0
- package/src/scss/theme/_preview-pdf.scss +10 -15
- package/src/scss/theme/_preview-text.scss +1 -1
- package/src/scss/theme/_preview.scss +59 -76
- package/src/scss/theme/_reactions.scss +48 -17
- package/src/scss/theme/_sheet.scss +59 -0
- package/src/scss/theme/_sidebar.scss +86 -0
- package/src/scss/theme/_spinner.scss +11 -7
- package/src/scss/theme/_tab.scss +72 -0
- package/src/scss/theme/_tables.scss +70 -23
- package/src/scss/theme/_toasts.scss +56 -26
- package/src/scss/theme/_type.scss +41 -0
- package/src/scss/theme/{mixins → base}/_backdrop.scss +0 -0
- package/src/scss/theme/{bootstrap/mixins → base}/_breakpoints.scss +9 -0
- package/src/scss/theme/base/_colors.scss +315 -0
- package/src/scss/theme/base/_md.scss +19 -0
- package/src/scss/theme/base/_palette.scss +130 -0
- package/src/scss/theme/{mixins → base}/_position.scss +5 -5
- package/src/scss/theme/base/_reboot.scss +51 -0
- package/src/scss/theme/base/_scroll.scss +180 -0
- package/src/scss/theme/base/_svg.scss +49 -0
- package/src/scss/theme/base/_text.scss +23 -0
- package/src/scss/theme/base/_vars.scss +203 -0
- package/src/scss/theme/{fonts → base/fonts}/_fontmapping-roboto.scss +0 -0
- package/src/scss/theme/{fonts → base/fonts}/_fontmapping-segoe-ui.scss +0 -0
- package/src/scss/theme/base/fonts/_index.scss +2 -0
- package/src/scss/weavy-chat.scss +11 -4
- package/src/scss/weavy-messenger.scss +38 -21
- package/src/types/Chat.ts +2 -1
- package/src/types/Message.ts +3 -1
- package/src/types/types.ts +72 -10
- package/src/ui/Icon.tsx +1 -1
- package/src/ui/Spinner.tsx +19 -0
- package/src/utils/fileUtilities.ts +11 -125
- package/src/utils/infiniteScroll.js +11 -2
- package/src/utils/postal-parent.js +398 -0
- package/src/utils/promise.js +187 -0
- package/src/utils/scrollbarDetection.js +68 -9
- package/src/utils/utils.js +547 -0
- package/src/scss/theme/_attachments.scss +0 -74
- package/src/scss/theme/_cm-editor.scss +0 -42
- package/src/scss/theme/_colors.scss +0 -520
- package/src/scss/theme/_config.scss +0 -6
- package/src/scss/theme/_inputs.scss +0 -28
- package/src/scss/theme/_nav.scss +0 -52
- package/src/scss/theme/_palette.scss +0 -165
- package/src/scss/theme/_preview-icon.scss +0 -41
- package/src/scss/theme/_reboot.scss +0 -41
- package/src/scss/theme/_root.scss +0 -2
- package/src/scss/theme/_scroll.scss +0 -55
- package/src/scss/theme/_search.scss +0 -68
- package/src/scss/theme/_turbo.scss +0 -17
- package/src/scss/theme/_variables.scss +0 -139
- package/src/scss/theme/bootstrap/_accordion.scss +0 -146
- package/src/scss/theme/bootstrap/_alert.scss +0 -71
- package/src/scss/theme/bootstrap/_badge.scss +0 -38
- package/src/scss/theme/bootstrap/_breadcrumb.scss +0 -40
- package/src/scss/theme/bootstrap/_button-group.scss +0 -142
- package/src/scss/theme/bootstrap/_buttons.scss +0 -186
- package/src/scss/theme/bootstrap/_card.scss +0 -234
- package/src/scss/theme/bootstrap/_carousel.scss +0 -229
- package/src/scss/theme/bootstrap/_close.scss +0 -40
- package/src/scss/theme/bootstrap/_containers.scss +0 -41
- package/src/scss/theme/bootstrap/_dropdown.scss +0 -248
- package/src/scss/theme/bootstrap/_forms.scss +0 -9
- package/src/scss/theme/bootstrap/_functions.scss +0 -302
- package/src/scss/theme/bootstrap/_grid.scss +0 -33
- package/src/scss/theme/bootstrap/_helpers.scss +0 -10
- package/src/scss/theme/bootstrap/_images.scss +0 -42
- package/src/scss/theme/bootstrap/_list-group.scss +0 -191
- package/src/scss/theme/bootstrap/_maps.scss +0 -54
- package/src/scss/theme/bootstrap/_mixins.scss +0 -43
- package/src/scss/theme/bootstrap/_modal.scss +0 -237
- package/src/scss/theme/bootstrap/_nav.scss +0 -172
- package/src/scss/theme/bootstrap/_navbar.scss +0 -276
- package/src/scss/theme/bootstrap/_offcanvas.scss +0 -143
- package/src/scss/theme/bootstrap/_pagination.scss +0 -109
- package/src/scss/theme/bootstrap/_placeholders.scss +0 -51
- package/src/scss/theme/bootstrap/_popover.scss +0 -196
- package/src/scss/theme/bootstrap/_progress.scss +0 -59
- package/src/scss/theme/bootstrap/_reboot.scss +0 -610
- package/src/scss/theme/bootstrap/_root.scss +0 -73
- package/src/scss/theme/bootstrap/_spinners.scss +0 -85
- package/src/scss/theme/bootstrap/_tables.scss +0 -164
- package/src/scss/theme/bootstrap/_toasts.scss +0 -70
- package/src/scss/theme/bootstrap/_tooltip.scss +0 -120
- package/src/scss/theme/bootstrap/_transitions.scss +0 -27
- package/src/scss/theme/bootstrap/_type.scss +0 -106
- package/src/scss/theme/bootstrap/_utilities.scss +0 -647
- package/src/scss/theme/bootstrap/_variables.scss +0 -1633
- package/src/scss/theme/bootstrap/forms/_floating-labels.scss +0 -74
- package/src/scss/theme/bootstrap/forms/_form-check.scss +0 -175
- package/src/scss/theme/bootstrap/forms/_form-control.scss +0 -194
- package/src/scss/theme/bootstrap/forms/_form-range.scss +0 -91
- package/src/scss/theme/bootstrap/forms/_form-select.scss +0 -71
- package/src/scss/theme/bootstrap/forms/_form-text.scss +0 -11
- package/src/scss/theme/bootstrap/forms/_input-group.scss +0 -129
- package/src/scss/theme/bootstrap/forms/_labels.scss +0 -36
- package/src/scss/theme/bootstrap/forms/_validation.scss +0 -12
- package/src/scss/theme/bootstrap/helpers/_clearfix.scss +0 -3
- package/src/scss/theme/bootstrap/helpers/_color-bg.scss +0 -10
- package/src/scss/theme/bootstrap/helpers/_colored-links.scss +0 -12
- package/src/scss/theme/bootstrap/helpers/_position.scss +0 -36
- package/src/scss/theme/bootstrap/helpers/_ratio.scss +0 -26
- package/src/scss/theme/bootstrap/helpers/_stacks.scss +0 -15
- package/src/scss/theme/bootstrap/helpers/_stretched-link.scss +0 -15
- package/src/scss/theme/bootstrap/helpers/_text-truncation.scss +0 -7
- package/src/scss/theme/bootstrap/helpers/_visually-hidden.scss +0 -8
- package/src/scss/theme/bootstrap/helpers/_vr.scss +0 -8
- package/src/scss/theme/bootstrap/mixins/_alert.scss +0 -15
- package/src/scss/theme/bootstrap/mixins/_backdrop.scss +0 -14
- package/src/scss/theme/bootstrap/mixins/_banner.scss +0 -9
- package/src/scss/theme/bootstrap/mixins/_border-radius.scss +0 -78
- package/src/scss/theme/bootstrap/mixins/_box-shadow.scss +0 -18
- package/src/scss/theme/bootstrap/mixins/_buttons.scss +0 -70
- package/src/scss/theme/bootstrap/mixins/_caret.scss +0 -64
- package/src/scss/theme/bootstrap/mixins/_clearfix.scss +0 -9
- package/src/scss/theme/bootstrap/mixins/_color-scheme.scss +0 -7
- package/src/scss/theme/bootstrap/mixins/_container.scss +0 -11
- package/src/scss/theme/bootstrap/mixins/_deprecate.scss +0 -10
- package/src/scss/theme/bootstrap/mixins/_forms.scss +0 -152
- package/src/scss/theme/bootstrap/mixins/_gradients.scss +0 -47
- package/src/scss/theme/bootstrap/mixins/_grid.scss +0 -151
- package/src/scss/theme/bootstrap/mixins/_image.scss +0 -16
- package/src/scss/theme/bootstrap/mixins/_list-group.scss +0 -24
- package/src/scss/theme/bootstrap/mixins/_lists.scss +0 -7
- package/src/scss/theme/bootstrap/mixins/_pagination.scss +0 -10
- package/src/scss/theme/bootstrap/mixins/_reset-text.scss +0 -17
- package/src/scss/theme/bootstrap/mixins/_resize.scss +0 -6
- package/src/scss/theme/bootstrap/mixins/_table-variants.scss +0 -24
- package/src/scss/theme/bootstrap/mixins/_text-truncate.scss +0 -8
- package/src/scss/theme/bootstrap/mixins/_transition.scss +0 -26
- package/src/scss/theme/bootstrap/mixins/_utilities.scss +0 -97
- package/src/scss/theme/bootstrap/mixins/_visually-hidden.scss +0 -29
- package/src/scss/theme/bootstrap/utilities/_api.scss +0 -47
- package/src/scss/theme/bootstrap/vendor/_rfs.scss +0 -354
- package/src/scss/theme/bs/_badge.scss +0 -20
- package/src/scss/theme/bs/_buttons.scss +0 -185
- package/src/scss/theme/bs/_dropdown.scss +0 -86
- package/src/scss/theme/bs/_forms.scss +0 -161
- package/src/scss/theme/bs/_list-group.scss +0 -73
- package/src/scss/theme/bs/_tables.scss +0 -46
- package/src/scss/theme/fonts/_index.scss +0 -2
- package/src/scss/theme/mixins/_palette.scss +0 -165
- package/src/scss/theme/mixins/_scrollbar.scss +0 -110
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
.form-floating {
|
|
2
|
-
position: relative;
|
|
3
|
-
|
|
4
|
-
> .form-control,
|
|
5
|
-
> .form-control-plaintext,
|
|
6
|
-
> .form-select {
|
|
7
|
-
height: $form-floating-height;
|
|
8
|
-
line-height: $form-floating-line-height;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
> label {
|
|
12
|
-
position: absolute;
|
|
13
|
-
top: 0;
|
|
14
|
-
left: 0;
|
|
15
|
-
width: 100%;
|
|
16
|
-
height: 100%; // allow textareas
|
|
17
|
-
padding: $form-floating-padding-y $form-floating-padding-x;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
text-overflow: ellipsis;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
pointer-events: none;
|
|
22
|
-
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
|
|
23
|
-
transform-origin: 0 0;
|
|
24
|
-
@include transition($form-floating-transition);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
> .form-control,
|
|
28
|
-
> .form-control-plaintext {
|
|
29
|
-
padding: $form-floating-padding-y $form-floating-padding-x;
|
|
30
|
-
|
|
31
|
-
&::placeholder {
|
|
32
|
-
color: transparent;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&:focus,
|
|
36
|
-
&:not(:placeholder-shown) {
|
|
37
|
-
padding-top: $form-floating-input-padding-t;
|
|
38
|
-
padding-bottom: $form-floating-input-padding-b;
|
|
39
|
-
}
|
|
40
|
-
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
|
41
|
-
&:-webkit-autofill {
|
|
42
|
-
padding-top: $form-floating-input-padding-t;
|
|
43
|
-
padding-bottom: $form-floating-input-padding-b;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
> .form-select {
|
|
48
|
-
padding-top: $form-floating-input-padding-t;
|
|
49
|
-
padding-bottom: $form-floating-input-padding-b;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
> .form-control:focus,
|
|
53
|
-
> .form-control:not(:placeholder-shown),
|
|
54
|
-
> .form-control-plaintext,
|
|
55
|
-
> .form-select {
|
|
56
|
-
~ label {
|
|
57
|
-
opacity: $form-floating-label-opacity;
|
|
58
|
-
transform: $form-floating-label-transform;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
|
|
62
|
-
> .form-control:-webkit-autofill {
|
|
63
|
-
~ label {
|
|
64
|
-
opacity: $form-floating-label-opacity;
|
|
65
|
-
transform: $form-floating-label-transform;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
> .form-control-plaintext {
|
|
70
|
-
~ label {
|
|
71
|
-
border-width: $input-border-width 0; // Required to properly position label text - as explained above
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Check/radio
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
.form-check {
|
|
6
|
-
display: block;
|
|
7
|
-
min-height: $form-check-min-height;
|
|
8
|
-
padding-left: $form-check-padding-start;
|
|
9
|
-
margin-bottom: $form-check-margin-bottom;
|
|
10
|
-
|
|
11
|
-
.form-check-input {
|
|
12
|
-
float: left;
|
|
13
|
-
margin-left: $form-check-padding-start * -1;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.form-check-reverse {
|
|
18
|
-
padding-right: $form-check-padding-start;
|
|
19
|
-
padding-left: 0;
|
|
20
|
-
text-align: right;
|
|
21
|
-
|
|
22
|
-
.form-check-input {
|
|
23
|
-
float: right;
|
|
24
|
-
margin-right: $form-check-padding-start * -1;
|
|
25
|
-
margin-left: 0;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.form-check-input {
|
|
30
|
-
width: $form-check-input-width;
|
|
31
|
-
height: $form-check-input-width;
|
|
32
|
-
margin-top: ($line-height-base - $form-check-input-width) * .5; // line-height minus check height
|
|
33
|
-
vertical-align: top;
|
|
34
|
-
background-color: $form-check-input-bg;
|
|
35
|
-
background-repeat: no-repeat;
|
|
36
|
-
background-position: center;
|
|
37
|
-
background-size: contain;
|
|
38
|
-
border: $form-check-input-border;
|
|
39
|
-
appearance: none;
|
|
40
|
-
print-color-adjust: exact; // Keep themed appearance for print
|
|
41
|
-
@include transition($form-check-transition);
|
|
42
|
-
|
|
43
|
-
&[type="checkbox"] {
|
|
44
|
-
@include border-radius($form-check-input-border-radius);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&[type="radio"] {
|
|
48
|
-
// stylelint-disable-next-line property-disallowed-list
|
|
49
|
-
border-radius: $form-check-radio-border-radius;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&:active {
|
|
53
|
-
filter: $form-check-input-active-filter;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:focus {
|
|
57
|
-
border-color: $form-check-input-focus-border;
|
|
58
|
-
outline: 0;
|
|
59
|
-
box-shadow: $form-check-input-focus-box-shadow;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&:checked {
|
|
63
|
-
background-color: $form-check-input-checked-bg-color;
|
|
64
|
-
border-color: $form-check-input-checked-border-color;
|
|
65
|
-
|
|
66
|
-
&[type="checkbox"] {
|
|
67
|
-
@if $enable-gradients {
|
|
68
|
-
background-image: escape-svg($form-check-input-checked-bg-image), var(--#{$prefix}gradient);
|
|
69
|
-
} @else {
|
|
70
|
-
background-image: escape-svg($form-check-input-checked-bg-image);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&[type="radio"] {
|
|
75
|
-
@if $enable-gradients {
|
|
76
|
-
background-image: escape-svg($form-check-radio-checked-bg-image), var(--#{$prefix}gradient);
|
|
77
|
-
} @else {
|
|
78
|
-
background-image: escape-svg($form-check-radio-checked-bg-image);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&[type="checkbox"]:indeterminate {
|
|
84
|
-
background-color: $form-check-input-indeterminate-bg-color;
|
|
85
|
-
border-color: $form-check-input-indeterminate-border-color;
|
|
86
|
-
|
|
87
|
-
@if $enable-gradients {
|
|
88
|
-
background-image: escape-svg($form-check-input-indeterminate-bg-image), var(--#{$prefix}gradient);
|
|
89
|
-
} @else {
|
|
90
|
-
background-image: escape-svg($form-check-input-indeterminate-bg-image);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
&:disabled {
|
|
95
|
-
pointer-events: none;
|
|
96
|
-
filter: none;
|
|
97
|
-
opacity: $form-check-input-disabled-opacity;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// Use disabled attribute in addition of :disabled pseudo-class
|
|
101
|
-
// See: https://github.com/twbs/bootstrap/issues/28247
|
|
102
|
-
&[disabled],
|
|
103
|
-
&:disabled {
|
|
104
|
-
~ .form-check-label {
|
|
105
|
-
cursor: default;
|
|
106
|
-
opacity: $form-check-label-disabled-opacity;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.form-check-label {
|
|
112
|
-
color: $form-check-label-color;
|
|
113
|
-
cursor: $form-check-label-cursor;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
//
|
|
117
|
-
// Switch
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
.form-switch {
|
|
121
|
-
padding-left: $form-switch-padding-start;
|
|
122
|
-
|
|
123
|
-
.form-check-input {
|
|
124
|
-
width: $form-switch-width;
|
|
125
|
-
margin-left: $form-switch-padding-start * -1;
|
|
126
|
-
background-image: escape-svg($form-switch-bg-image);
|
|
127
|
-
background-position: left center;
|
|
128
|
-
@include border-radius($form-switch-border-radius);
|
|
129
|
-
@include transition($form-switch-transition);
|
|
130
|
-
|
|
131
|
-
&:focus {
|
|
132
|
-
background-image: escape-svg($form-switch-focus-bg-image);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&:checked {
|
|
136
|
-
background-position: $form-switch-checked-bg-position;
|
|
137
|
-
|
|
138
|
-
@if $enable-gradients {
|
|
139
|
-
background-image: escape-svg($form-switch-checked-bg-image), var(--#{$prefix}gradient);
|
|
140
|
-
} @else {
|
|
141
|
-
background-image: escape-svg($form-switch-checked-bg-image);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&.form-check-reverse {
|
|
147
|
-
padding-right: $form-switch-padding-start;
|
|
148
|
-
padding-left: 0;
|
|
149
|
-
|
|
150
|
-
.form-check-input {
|
|
151
|
-
margin-right: $form-switch-padding-start * -1;
|
|
152
|
-
margin-left: 0;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.form-check-inline {
|
|
158
|
-
display: inline-block;
|
|
159
|
-
margin-right: $form-check-inline-margin-end;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.btn-check {
|
|
163
|
-
position: absolute;
|
|
164
|
-
clip: rect(0, 0, 0, 0);
|
|
165
|
-
pointer-events: none;
|
|
166
|
-
|
|
167
|
-
&[disabled],
|
|
168
|
-
&:disabled {
|
|
169
|
-
+ .btn {
|
|
170
|
-
pointer-events: none;
|
|
171
|
-
filter: none;
|
|
172
|
-
opacity: $form-check-btn-check-disabled-opacity;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// General form controls (plus a few specific high-level interventions)
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
.form-control {
|
|
6
|
-
display: block;
|
|
7
|
-
width: 100%;
|
|
8
|
-
padding: $input-padding-y $input-padding-x;
|
|
9
|
-
font-family: $input-font-family;
|
|
10
|
-
@include font-size($input-font-size);
|
|
11
|
-
font-weight: $input-font-weight;
|
|
12
|
-
line-height: $input-line-height;
|
|
13
|
-
color: $input-color;
|
|
14
|
-
background-color: $input-bg;
|
|
15
|
-
background-clip: padding-box;
|
|
16
|
-
border: $input-border-width solid $input-border-color;
|
|
17
|
-
appearance: none; // Fix appearance for date inputs in Safari
|
|
18
|
-
|
|
19
|
-
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
|
20
|
-
@include border-radius($input-border-radius, 0);
|
|
21
|
-
|
|
22
|
-
@include box-shadow($input-box-shadow);
|
|
23
|
-
@include transition($input-transition);
|
|
24
|
-
|
|
25
|
-
&[type="file"] {
|
|
26
|
-
overflow: hidden; // prevent pseudo element button overlap
|
|
27
|
-
|
|
28
|
-
&:not(:disabled):not([readonly]) {
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Customize the `:focus` state to imitate native WebKit styles.
|
|
34
|
-
&:focus {
|
|
35
|
-
color: $input-focus-color;
|
|
36
|
-
background-color: $input-focus-bg;
|
|
37
|
-
border-color: $input-focus-border-color;
|
|
38
|
-
outline: 0;
|
|
39
|
-
@if $enable-shadows {
|
|
40
|
-
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
|
41
|
-
} @else {
|
|
42
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
|
43
|
-
box-shadow: $input-focus-box-shadow;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// Add some height to date inputs on iOS
|
|
48
|
-
// https://github.com/twbs/bootstrap/issues/23307
|
|
49
|
-
// TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
|
|
50
|
-
&::-webkit-date-and-time-value {
|
|
51
|
-
// Multiply line-height by 1em if it has no unit
|
|
52
|
-
height: if(unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// Placeholder
|
|
56
|
-
&::placeholder {
|
|
57
|
-
color: $input-placeholder-color;
|
|
58
|
-
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
|
59
|
-
opacity: 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// Disabled inputs
|
|
63
|
-
//
|
|
64
|
-
// HTML5 says that controls under a fieldset > legend:first-child won't be
|
|
65
|
-
// disabled if the fieldset is disabled. Due to implementation difficulty, we
|
|
66
|
-
// don't honor that edge case; we style them as disabled anyway.
|
|
67
|
-
&:disabled {
|
|
68
|
-
color: $input-disabled-color;
|
|
69
|
-
background-color: $input-disabled-bg;
|
|
70
|
-
border-color: $input-disabled-border-color;
|
|
71
|
-
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
|
|
72
|
-
opacity: 1;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// File input buttons theming
|
|
76
|
-
&::file-selector-button {
|
|
77
|
-
padding: $input-padding-y $input-padding-x;
|
|
78
|
-
margin: (-$input-padding-y) (-$input-padding-x);
|
|
79
|
-
margin-inline-end: $input-padding-x;
|
|
80
|
-
color: $form-file-button-color;
|
|
81
|
-
@include gradient-bg($form-file-button-bg);
|
|
82
|
-
pointer-events: none;
|
|
83
|
-
border-color: inherit;
|
|
84
|
-
border-style: solid;
|
|
85
|
-
border-width: 0;
|
|
86
|
-
border-inline-end-width: $input-border-width;
|
|
87
|
-
border-radius: 0; // stylelint-disable-line property-disallowed-list
|
|
88
|
-
@include transition($btn-transition);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&:hover:not(:disabled):not([readonly])::file-selector-button {
|
|
92
|
-
background-color: $form-file-button-hover-bg;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// Readonly controls as plain text
|
|
97
|
-
//
|
|
98
|
-
// Apply class to a readonly input to make it appear like regular plain
|
|
99
|
-
// text (without any border, background color, focus indicator)
|
|
100
|
-
|
|
101
|
-
.form-control-plaintext {
|
|
102
|
-
display: block;
|
|
103
|
-
width: 100%;
|
|
104
|
-
padding: $input-padding-y 0;
|
|
105
|
-
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
|
|
106
|
-
line-height: $input-line-height;
|
|
107
|
-
color: $input-plaintext-color;
|
|
108
|
-
background-color: transparent;
|
|
109
|
-
border: solid transparent;
|
|
110
|
-
border-width: $input-border-width 0;
|
|
111
|
-
|
|
112
|
-
&:focus {
|
|
113
|
-
outline: 0;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&.form-control-sm,
|
|
117
|
-
&.form-control-lg {
|
|
118
|
-
padding-right: 0;
|
|
119
|
-
padding-left: 0;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Form control sizing
|
|
124
|
-
//
|
|
125
|
-
// Build on `.form-control` with modifier classes to decrease or increase the
|
|
126
|
-
// height and font-size of form controls.
|
|
127
|
-
//
|
|
128
|
-
// Repeated in `_input_group.scss` to avoid Sass extend issues.
|
|
129
|
-
|
|
130
|
-
.form-control-sm {
|
|
131
|
-
min-height: $input-height-sm;
|
|
132
|
-
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
133
|
-
@include font-size($input-font-size-sm);
|
|
134
|
-
@include border-radius($input-border-radius-sm);
|
|
135
|
-
|
|
136
|
-
&::file-selector-button {
|
|
137
|
-
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
138
|
-
margin: (-$input-padding-y-sm) (-$input-padding-x-sm);
|
|
139
|
-
margin-inline-end: $input-padding-x-sm;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.form-control-lg {
|
|
144
|
-
min-height: $input-height-lg;
|
|
145
|
-
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
146
|
-
@include font-size($input-font-size-lg);
|
|
147
|
-
@include border-radius($input-border-radius-lg);
|
|
148
|
-
|
|
149
|
-
&::file-selector-button {
|
|
150
|
-
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
151
|
-
margin: (-$input-padding-y-lg) (-$input-padding-x-lg);
|
|
152
|
-
margin-inline-end: $input-padding-x-lg;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// Make sure textareas don't shrink too much when resized
|
|
157
|
-
// https://github.com/twbs/bootstrap/pull/29124
|
|
158
|
-
// stylelint-disable selector-no-qualifying-type
|
|
159
|
-
textarea {
|
|
160
|
-
&.form-control {
|
|
161
|
-
min-height: $input-height;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
&.form-control-sm {
|
|
165
|
-
min-height: $input-height-sm;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
&.form-control-lg {
|
|
169
|
-
min-height: $input-height-lg;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// stylelint-enable selector-no-qualifying-type
|
|
173
|
-
|
|
174
|
-
.form-control-color {
|
|
175
|
-
width: $form-color-width;
|
|
176
|
-
height: $input-height;
|
|
177
|
-
padding: $input-padding-y;
|
|
178
|
-
|
|
179
|
-
&:not(:disabled):not([readonly]) {
|
|
180
|
-
cursor: pointer;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
&::-moz-color-swatch {
|
|
184
|
-
border: 0 !important; // stylelint-disable-line declaration-no-important
|
|
185
|
-
@include border-radius($input-border-radius);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
&::-webkit-color-swatch {
|
|
189
|
-
@include border-radius($input-border-radius);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
&.form-control-sm { height: $input-height-sm; }
|
|
193
|
-
&.form-control-lg { height: $input-height-lg; }
|
|
194
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
// Range
|
|
2
|
-
//
|
|
3
|
-
// Style range inputs the same across browsers. Vendor-specific rules for pseudo
|
|
4
|
-
// elements cannot be mixed. As such, there are no shared styles for focus or
|
|
5
|
-
// active states on prefixed selectors.
|
|
6
|
-
|
|
7
|
-
.form-range {
|
|
8
|
-
width: 100%;
|
|
9
|
-
height: add($form-range-thumb-height, $form-range-thumb-focus-box-shadow-width * 2);
|
|
10
|
-
padding: 0; // Need to reset padding
|
|
11
|
-
background-color: transparent;
|
|
12
|
-
appearance: none;
|
|
13
|
-
|
|
14
|
-
&:focus {
|
|
15
|
-
outline: 0;
|
|
16
|
-
|
|
17
|
-
// Pseudo-elements must be split across multiple rulesets to have an effect.
|
|
18
|
-
// No box-shadow() mixin for focus accessibility.
|
|
19
|
-
&::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
|
|
20
|
-
&::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&::-moz-focus-outer {
|
|
24
|
-
border: 0;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&::-webkit-slider-thumb {
|
|
28
|
-
width: $form-range-thumb-width;
|
|
29
|
-
height: $form-range-thumb-height;
|
|
30
|
-
margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
|
|
31
|
-
@include gradient-bg($form-range-thumb-bg);
|
|
32
|
-
border: $form-range-thumb-border;
|
|
33
|
-
@include border-radius($form-range-thumb-border-radius);
|
|
34
|
-
@include box-shadow($form-range-thumb-box-shadow);
|
|
35
|
-
@include transition($form-range-thumb-transition);
|
|
36
|
-
appearance: none;
|
|
37
|
-
|
|
38
|
-
&:active {
|
|
39
|
-
@include gradient-bg($form-range-thumb-active-bg);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&::-webkit-slider-runnable-track {
|
|
44
|
-
width: $form-range-track-width;
|
|
45
|
-
height: $form-range-track-height;
|
|
46
|
-
color: transparent; // Why?
|
|
47
|
-
cursor: $form-range-track-cursor;
|
|
48
|
-
background-color: $form-range-track-bg;
|
|
49
|
-
border-color: transparent;
|
|
50
|
-
@include border-radius($form-range-track-border-radius);
|
|
51
|
-
@include box-shadow($form-range-track-box-shadow);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&::-moz-range-thumb {
|
|
55
|
-
width: $form-range-thumb-width;
|
|
56
|
-
height: $form-range-thumb-height;
|
|
57
|
-
@include gradient-bg($form-range-thumb-bg);
|
|
58
|
-
border: $form-range-thumb-border;
|
|
59
|
-
@include border-radius($form-range-thumb-border-radius);
|
|
60
|
-
@include box-shadow($form-range-thumb-box-shadow);
|
|
61
|
-
@include transition($form-range-thumb-transition);
|
|
62
|
-
appearance: none;
|
|
63
|
-
|
|
64
|
-
&:active {
|
|
65
|
-
@include gradient-bg($form-range-thumb-active-bg);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&::-moz-range-track {
|
|
70
|
-
width: $form-range-track-width;
|
|
71
|
-
height: $form-range-track-height;
|
|
72
|
-
color: transparent;
|
|
73
|
-
cursor: $form-range-track-cursor;
|
|
74
|
-
background-color: $form-range-track-bg;
|
|
75
|
-
border-color: transparent; // Firefox specific?
|
|
76
|
-
@include border-radius($form-range-track-border-radius);
|
|
77
|
-
@include box-shadow($form-range-track-box-shadow);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
&:disabled {
|
|
81
|
-
pointer-events: none;
|
|
82
|
-
|
|
83
|
-
&::-webkit-slider-thumb {
|
|
84
|
-
background-color: $form-range-thumb-disabled-bg;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&::-moz-range-thumb {
|
|
88
|
-
background-color: $form-range-thumb-disabled-bg;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// Select
|
|
2
|
-
//
|
|
3
|
-
// Replaces the browser default select with a custom one, mostly pulled from
|
|
4
|
-
// https://primer.github.io/.
|
|
5
|
-
|
|
6
|
-
.form-select {
|
|
7
|
-
display: block;
|
|
8
|
-
width: 100%;
|
|
9
|
-
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
|
|
10
|
-
-moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
|
|
11
|
-
font-family: $form-select-font-family;
|
|
12
|
-
@include font-size($form-select-font-size);
|
|
13
|
-
font-weight: $form-select-font-weight;
|
|
14
|
-
line-height: $form-select-line-height;
|
|
15
|
-
color: $form-select-color;
|
|
16
|
-
background-color: $form-select-bg;
|
|
17
|
-
background-image: escape-svg($form-select-indicator);
|
|
18
|
-
background-repeat: no-repeat;
|
|
19
|
-
background-position: $form-select-bg-position;
|
|
20
|
-
background-size: $form-select-bg-size;
|
|
21
|
-
border: $form-select-border-width solid $form-select-border-color;
|
|
22
|
-
@include border-radius($form-select-border-radius, 0);
|
|
23
|
-
@include box-shadow($form-select-box-shadow);
|
|
24
|
-
@include transition($form-select-transition);
|
|
25
|
-
appearance: none;
|
|
26
|
-
|
|
27
|
-
&:focus {
|
|
28
|
-
border-color: $form-select-focus-border-color;
|
|
29
|
-
outline: 0;
|
|
30
|
-
@if $enable-shadows {
|
|
31
|
-
@include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
|
|
32
|
-
} @else {
|
|
33
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
|
34
|
-
box-shadow: $form-select-focus-box-shadow;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&[multiple],
|
|
39
|
-
&[size]:not([size="1"]) {
|
|
40
|
-
padding-right: $form-select-padding-x;
|
|
41
|
-
background-image: none;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:disabled {
|
|
45
|
-
color: $form-select-disabled-color;
|
|
46
|
-
background-color: $form-select-disabled-bg;
|
|
47
|
-
border-color: $form-select-disabled-border-color;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Remove outline from select box in FF
|
|
51
|
-
&:-moz-focusring {
|
|
52
|
-
color: transparent;
|
|
53
|
-
text-shadow: 0 0 0 $form-select-color;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.form-select-sm {
|
|
58
|
-
padding-top: $form-select-padding-y-sm;
|
|
59
|
-
padding-bottom: $form-select-padding-y-sm;
|
|
60
|
-
padding-left: $form-select-padding-x-sm;
|
|
61
|
-
@include font-size($form-select-font-size-sm);
|
|
62
|
-
@include border-radius($form-select-border-radius-sm);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.form-select-lg {
|
|
66
|
-
padding-top: $form-select-padding-y-lg;
|
|
67
|
-
padding-bottom: $form-select-padding-y-lg;
|
|
68
|
-
padding-left: $form-select-padding-x-lg;
|
|
69
|
-
@include font-size($form-select-font-size-lg);
|
|
70
|
-
@include border-radius($form-select-border-radius-lg);
|
|
71
|
-
}
|