@skyscanner/backpack-web 31.10.1 → 32.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.
Files changed (183) hide show
  1. package/bpk-component-accordion/src/BpkAccordion.module.css +2 -2
  2. package/bpk-component-accordion/src/BpkAccordionItem.module.css +2 -2
  3. package/bpk-component-aria-live/src/BpkAriaLive.module.css +2 -2
  4. package/bpk-component-autosuggest/src/BpkAutosuggest.module.css +2 -2
  5. package/bpk-component-badge/index.js +1 -3
  6. package/bpk-component-badge/src/BpkBadge.module.css +2 -2
  7. package/bpk-component-banner-alert/src/BpkAnimateAndFade.module.css +2 -2
  8. package/bpk-component-banner-alert/src/BpkBannerAlert.module.css +2 -2
  9. package/bpk-component-barchart/src/BpkBarchart.module.css +2 -2
  10. package/bpk-component-barchart/src/BpkBarchartBar.module.css +2 -2
  11. package/bpk-component-barchart/src/BpkChartAxis.module.css +2 -2
  12. package/bpk-component-barchart/src/BpkChartDataTable.module.css +2 -2
  13. package/bpk-component-barchart/src/BpkChartGridLines.module.css +2 -2
  14. package/bpk-component-blockquote/src/BpkBlockquote.module.css +2 -2
  15. package/bpk-component-boilerplate/src/BpkBoilerplate.module.css +2 -2
  16. package/bpk-component-bottom-sheet/src/BpkBottomSheet.module.css +2 -2
  17. package/bpk-component-bottom-sheet/src/BpkBottomSheetInner.module.css +2 -2
  18. package/bpk-component-breadcrumb/src/BpkBreadcrumb.module.css +2 -2
  19. package/bpk-component-breadcrumb/src/BpkBreadcrumbItem.module.css +2 -2
  20. package/bpk-component-button/src/BpkButtonBase.module.css +2 -2
  21. package/bpk-component-button/src/BpkButtonDestructive.module.css +2 -2
  22. package/bpk-component-button/src/BpkButtonFeatured.module.css +2 -2
  23. package/bpk-component-button/src/BpkButtonLink.module.css +2 -2
  24. package/bpk-component-button/src/BpkButtonLinkOnDark.module.css +2 -2
  25. package/bpk-component-button/src/BpkButtonPrimaryOnDark.module.css +2 -2
  26. package/bpk-component-button/src/BpkButtonPrimaryOnLight.module.css +2 -2
  27. package/bpk-component-button/src/BpkButtonSecondary.module.css +2 -2
  28. package/bpk-component-button/src/BpkButtonSecondaryOnDark.module.css +2 -2
  29. package/bpk-component-button/src/BpkButtonV2/BpkButton.module.css +2 -2
  30. package/bpk-component-calendar/src/BpkCalendar.module.css +2 -2
  31. package/bpk-component-calendar/src/BpkCalendarDate.module.css +2 -2
  32. package/bpk-component-calendar/src/BpkCalendarGrid.module.css +2 -2
  33. package/bpk-component-calendar/src/BpkCalendarGridHeader.module.css +2 -2
  34. package/bpk-component-calendar/src/BpkCalendarGridTransition.module.css +2 -2
  35. package/bpk-component-calendar/src/BpkCalendarNav.module.css +2 -2
  36. package/bpk-component-card/src/BpkCard.module.css +2 -2
  37. package/bpk-component-card/src/BpkCardWrapper.module.css +2 -2
  38. package/bpk-component-card/src/BpkDividedCard.module.css +2 -2
  39. package/bpk-component-card-button/src/BpkSaveButton.module.css +2 -2
  40. package/bpk-component-checkbox/src/BpkCheckbox.module.css +2 -2
  41. package/bpk-component-chip/src/BpkSelectableChip.module.css +2 -2
  42. package/bpk-component-close-button/src/BpkCloseButton.module.css +2 -2
  43. package/bpk-component-code/src/BpkCode.module.css +2 -2
  44. package/bpk-component-code/src/BpkCodeBlock.module.css +2 -2
  45. package/bpk-component-content-cards/src/BpkContentCard.module.css +2 -2
  46. package/bpk-component-content-cards/src/BpkContentCards.module.css +2 -2
  47. package/bpk-component-datatable/index.js +3 -2
  48. package/bpk-component-datatable/src/BpkDataTable.js +38 -103
  49. package/bpk-component-datatable/src/BpkDataTable.module.css +2 -2
  50. package/bpk-component-datatable/src/BpkDataTableHeader.js +22 -2
  51. package/bpk-component-datatable/src/BpkDataTableHeader.module.css +2 -2
  52. package/bpk-component-datatable/src/common-types.js +22 -0
  53. package/bpk-component-datatable/src/utils.js +14 -148
  54. package/bpk-component-datepicker/src/BpkDatepicker.module.css +2 -2
  55. package/bpk-component-description-list/src/BpkDescriptionList.module.css +2 -2
  56. package/bpk-component-dialog/src/BpkDialog.module.css +2 -2
  57. package/bpk-component-dialog/src/BpkDialogInner.module.css +2 -2
  58. package/bpk-component-drawer/src/BpkDrawer.module.css +2 -2
  59. package/bpk-component-drawer/src/BpkDrawerContent.module.css +2 -2
  60. package/bpk-component-fieldset/src/BpkFieldset.module.css +2 -2
  61. package/bpk-component-flare/src/bpk-content-bubble.module.css +2 -2
  62. package/bpk-component-flare/src/bpk-flare-bar.module.css +2 -2
  63. package/bpk-component-floating-notification/src/BpkFloatingNotification.module.css +2 -2
  64. package/bpk-component-form-validation/src/BpkFormValidation.module.css +2 -2
  65. package/bpk-component-graphic-promotion/src/BpkGraphicPromo.module.css +2 -2
  66. package/bpk-component-grid-toggle/src/BpkGridToggle.module.css +2 -2
  67. package/bpk-component-horizontal-nav/src/BpkHorizontalNav.module.css +2 -2
  68. package/bpk-component-horizontal-nav/src/BpkHorizontalNavItem.module.css +2 -2
  69. package/bpk-component-icon/src/BpkIcon.module.css +2 -2
  70. package/bpk-component-icon/src/withDescription.module.css +2 -2
  71. package/bpk-component-image/src/BpkBackgroundImage.module.css +2 -2
  72. package/bpk-component-image/src/BpkImage.module.css +2 -2
  73. package/bpk-component-infinite-scroll/src/withInfiniteScroll.module.css +2 -2
  74. package/bpk-component-info-banner/src/BpkAnimateAndFade.module.css +2 -2
  75. package/bpk-component-info-banner/src/BpkInfoBanner.module.css +2 -2
  76. package/bpk-component-input/src/BpkClearButton.module.css +2 -2
  77. package/bpk-component-input/src/BpkInput.module.css +2 -2
  78. package/bpk-component-label/src/BpkLabel.module.css +2 -2
  79. package/bpk-component-link/src/BpkLink.module.css +2 -2
  80. package/bpk-component-list/src/BpkList.module.css +2 -2
  81. package/bpk-component-loading-button/src/BpkLoadingButton.module.css +2 -2
  82. package/bpk-component-map/src/BpkIconMarker.module.css +2 -2
  83. package/bpk-component-map/src/BpkIconMarkerBackground.module.css +2 -2
  84. package/bpk-component-map/src/BpkMap.module.css +2 -2
  85. package/bpk-component-map/src/BpkPriceMarker.module.css +2 -2
  86. package/bpk-component-map/src/BpkPriceMarkerV2/BpkPriceMarker.module.css +2 -2
  87. package/bpk-component-map/src/DefaultLoadingElement.module.css +2 -2
  88. package/bpk-component-mobile-scroll-container/src/BpkMobileScrollContainer.module.css +2 -2
  89. package/bpk-component-modal/src/BpkModal.module.css +2 -2
  90. package/bpk-component-modal/src/BpkModalInner.module.css +2 -2
  91. package/bpk-component-modal/src/BpkModalV2/BpKModal.module.css +2 -2
  92. package/bpk-component-navigation-bar/src/BpkNavigationBar.module.css +2 -2
  93. package/bpk-component-navigation-bar/src/BpkNavigationBarButtonLink.module.css +2 -2
  94. package/bpk-component-navigation-bar/src/BpkNavigationBarIconButton.module.css +2 -2
  95. package/bpk-component-nudger/src/BpkNudger.module.css +2 -2
  96. package/bpk-component-overlay/src/BpkOverlay.module.css +2 -2
  97. package/bpk-component-page-indicator/src/BpkPageIndicator.module.css +2 -2
  98. package/bpk-component-pagination/src/BpkPagination.module.css +2 -2
  99. package/bpk-component-pagination/src/BpkPaginationList.module.css +2 -2
  100. package/bpk-component-pagination/src/BpkPaginationNudger.module.css +2 -2
  101. package/bpk-component-pagination/src/BpkPaginationPage.module.css +2 -2
  102. package/bpk-component-panel/src/BpkPanel.module.css +2 -2
  103. package/bpk-component-phone-input/src/BpkPhoneInput.module.css +2 -2
  104. package/bpk-component-popover/src/BpkPopover.module.css +2 -2
  105. package/bpk-component-price/src/BpkPrice.module.css +2 -2
  106. package/bpk-component-progress/src/BpkProgress.module.css +2 -2
  107. package/bpk-component-radio/src/BpkRadio.module.css +2 -2
  108. package/bpk-component-rating/src/BpkRating.module.css +2 -2
  109. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.module.css +2 -2
  110. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.module.css +2 -2
  111. package/bpk-component-section-header/src/BpkSectionHeader.module.css +2 -2
  112. package/bpk-component-section-list/src/BpkSectionListItem.module.css +2 -2
  113. package/bpk-component-section-list/src/BpkSectionListSection.module.css +2 -2
  114. package/bpk-component-select/src/BpkSelect.module.css +2 -2
  115. package/bpk-component-skip-link/src/BpkSkipLink.module.css +2 -2
  116. package/bpk-component-slider/src/BpkSlider.module.css +2 -2
  117. package/bpk-component-spinner/src/BpkSpinner.module.css +2 -2
  118. package/bpk-component-split-input/src/BpkInputField.module.css +2 -2
  119. package/bpk-component-split-input/src/BpkSplitInput.module.css +2 -2
  120. package/bpk-component-star-rating/src/BpkInteractiveStar.module.css +2 -2
  121. package/bpk-component-star-rating/src/BpkStar.module.css +2 -2
  122. package/bpk-component-star-rating/src/BpkStarRating.module.css +2 -2
  123. package/bpk-component-swap-button/src/BpkSwapButton.module.css +2 -2
  124. package/bpk-component-switch/src/BpkSwitch.module.css +2 -2
  125. package/bpk-component-table/src/BpkTable.module.css +2 -2
  126. package/bpk-component-text/src/BpkText.module.css +2 -2
  127. package/bpk-component-textarea/src/BpkTextarea.module.css +2 -2
  128. package/bpk-component-theme-toggle/src/BpkThemeToggle.module.css +2 -2
  129. package/bpk-component-ticket/src/BpkTicket.module.css +2 -2
  130. package/bpk-component-tooltip/src/BpkTooltip.module.css +2 -2
  131. package/bpk-mixins/{src/mixins/_badges-v2.scss → _badges-v2.scss} +3 -1
  132. package/bpk-mixins/{src/mixins/_badges.scss → _badges.scss} +13 -9
  133. package/bpk-mixins/{src/mixins/_borders.scss → _borders.scss} +11 -9
  134. package/bpk-mixins/{src/mixins/_breakpoints.scss → _breakpoints.scss} +3 -1
  135. package/bpk-mixins/{src/mixins/_buttons.scss → _buttons.scss} +7 -4
  136. package/bpk-mixins/{src/mixins/_cards.scss → _cards.scss} +6 -1
  137. package/bpk-mixins/{src/mixins/_chips.scss → _chips.scss} +8 -0
  138. package/bpk-mixins/{src/mixins/_forms.scss → _forms.scss} +5 -1
  139. package/bpk-mixins/_icons.scss +88 -0
  140. package/bpk-mixins/_index.scss +20 -17
  141. package/bpk-mixins/{src/mixins/_layers.scss → _layers.scss} +18 -15
  142. package/bpk-mixins/{src/mixins/_margins.scss → _margins.scss} +4 -0
  143. package/bpk-mixins/{src/mixins/_panels.scss → _panels.scss} +6 -2
  144. package/bpk-mixins/{src/mixins/_radii.scss → _radii.scss} +3 -1
  145. package/bpk-mixins/{src/mixins/_scroll-indicators.scss → _scroll-indicators.scss} +3 -1
  146. package/bpk-mixins/{src/mixins/_shadows.scss → _shadows.scss} +3 -1
  147. package/bpk-mixins/{src/mixins/_svgs.scss → _spinners.scss} +5 -68
  148. package/bpk-mixins/{src/_bonds.scss → _tokens.scss} +2 -0
  149. package/bpk-mixins/{src/mixins/_typography.scss → _typography.scss} +6 -2
  150. package/bpk-mixins/{src/mixins/_utils.scss → _utils.scss} +4 -0
  151. package/bpk-scrim-utils/src/bpk-scrim-content.module.css +2 -2
  152. package/bpk-scrim-utils/src/bpk-scrim.module.css +2 -2
  153. package/bpk-stylesheets/base.css +1 -2
  154. package/bpk-stylesheets/font.css +2 -2
  155. package/bpk-stylesheets/index.scss +18 -14
  156. package/bpk-stylesheets/normalize.css +422 -0
  157. package/package.json +15 -2
  158. package/unstable__bpk-mixins/_badges-v2.scss +240 -0
  159. package/unstable__bpk-mixins/_badges.scss +240 -0
  160. package/unstable__bpk-mixins/_borders.scss +268 -0
  161. package/unstable__bpk-mixins/_breakpoints.scss +221 -0
  162. package/unstable__bpk-mixins/_buttons.scss +568 -0
  163. package/unstable__bpk-mixins/_cards.scss +94 -0
  164. package/unstable__bpk-mixins/_chips.scss +240 -0
  165. package/unstable__bpk-mixins/_forms.scss +1049 -0
  166. package/unstable__bpk-mixins/_icons.scss +88 -0
  167. package/{bpk-mixins/sass-functions.js → unstable__bpk-mixins/_index.scss} +19 -10
  168. package/unstable__bpk-mixins/_layers.scss +199 -0
  169. package/unstable__bpk-mixins/_margins.scss +75 -0
  170. package/unstable__bpk-mixins/_panels.scss +71 -0
  171. package/unstable__bpk-mixins/_radii.scss +80 -0
  172. package/unstable__bpk-mixins/_scroll-indicators.scss +79 -0
  173. package/unstable__bpk-mixins/_shadows.scss +58 -0
  174. package/unstable__bpk-mixins/_spinners.scss +102 -0
  175. package/{bpk-component-datatable/src/sort-types.js → unstable__bpk-mixins/_tokens.scss} +3 -6
  176. package/unstable__bpk-mixins/_typography.scss +1039 -0
  177. package/unstable__bpk-mixins/_utils.scss +266 -0
  178. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.d.ts +0 -22
  179. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.js +0 -47
  180. package/bpk-component-badge/src/BpkBadgeV2/BpkBadge.module.css +0 -18
  181. package/bpk-component-datatable/src/BpkDataTableColumn.js +0 -54
  182. package/bpk-component-datatable/src/BpkDataTableColumn.module.css +0 -18
  183. package/bpk-component-datatable/src/hasChildrenOfType.js +0 -35
@@ -0,0 +1,1049 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ /* stylelint-disable at-rule-disallowed-list */
20
+
21
+ @use "sass:math";
22
+
23
+ @use 'tokens.scss';
24
+ @use 'typography.scss';
25
+ @use 'utils.scss';
26
+
27
+ ////
28
+ /// @group forms
29
+ ////
30
+
31
+ /// Form input. Can be used for text, email, number, password and tel type inputs.
32
+ ///
33
+ /// @example scss
34
+ /// .selector {
35
+ /// @include bpk-input();
36
+ /// }
37
+
38
+ @mixin bpk-input {
39
+ display: inline-block;
40
+ width: 100%;
41
+ height: tokens.$bpk-input-height;
42
+ padding: tokens.$bpk-input-padding-y tokens.$bpk-input-padding-x;
43
+ border: tokens.$bpk-input-border;
44
+ border-radius: tokens.$bpk-input-border-radius;
45
+ background: tokens.$bpk-input-background;
46
+ color: tokens.$bpk-text-primary-day;
47
+ appearance: none;
48
+
49
+ &::placeholder {
50
+ color: tokens.$bpk-text-secondary-day;
51
+ }
52
+
53
+ &:disabled {
54
+ border-color: tokens.$bpk-input-disabled-border-color;
55
+ background: tokens.$bpk-input-background;
56
+ color: tokens.$bpk-input-disabled-color;
57
+ cursor: not-allowed;
58
+ }
59
+
60
+ &[type='number'] {
61
+ -moz-appearance: textfield; // stylelint-disable property-no-vendor-prefix
62
+
63
+ &::-webkit-inner-spin-button,
64
+ &::-webkit-outer-spin-button {
65
+ appearance: none;
66
+ }
67
+ }
68
+
69
+ &[type='number'],
70
+ &[type='tel'],
71
+ &[type='email'] {
72
+ @include utils.bpk-rtl {
73
+ text-align: right;
74
+ direction: ltr;
75
+ }
76
+ }
77
+
78
+ &::-ms-clear {
79
+ display: none;
80
+ }
81
+ }
82
+
83
+ /// Valid form input. Modifies the bpk-input mixin.
84
+ ///
85
+ /// @require {mixin} bpk-input
86
+ ///
87
+ /// @example scss
88
+ /// .selector {
89
+ /// @include bpk-input();
90
+ /// @include bpk-input--valid();
91
+ /// }
92
+
93
+ @mixin bpk-input--valid {
94
+ padding-right: tokens.bpk-spacing-xl();
95
+ background: tokens.$bpk-input-background
96
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjMGM4MzhhICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTEyIDIyLjVDNi4yMDEgMjIuNSAxLjUgMTcuNzk5IDEuNSAxMlM2LjIwMSAxLjUgMTIgMS41IDIyLjUgNi4yMDEgMjIuNSAxMiAxNy43OTkgMjIuNSAxMiAyMi41em01LjU2LTEyLjQ0YTEuNSAxLjUgMCAwIDAtMi4xMi0yLjEybC00Ljk0IDQuOTM5LTEuOTQtMS45NGExLjUgMS41IDAgMCAwLTIuMTIgMi4xMjJsMyAzYTEuNSAxLjUgMCAwIDAgMi4xMiAwbDYtNnoiLz48L3N2Zz4=')
97
+ no-repeat right tokens.bpk-spacing-md() center;
98
+ background-size: tokens.$bpk-icon-size-sm tokens.$bpk-icon-size-sm;
99
+
100
+ @include utils.bpk-rtl {
101
+ padding-right: tokens.$bpk-input-padding-x;
102
+ padding-left: tokens.bpk-spacing-xl();
103
+ background-position: left tokens.bpk-spacing-md() center;
104
+ }
105
+ }
106
+
107
+ /// Invalid form input. Modifies the bpk-input mixin.
108
+ ///
109
+ /// @require {mixin} bpk-input
110
+ ///
111
+ /// @example scss
112
+ /// .selector {
113
+ /// @include bpk-input();
114
+ /// @include bpk-input--invalid();
115
+ /// }
116
+
117
+ @mixin bpk-input--invalid {
118
+ padding-right: tokens.bpk-spacing-xl();
119
+ background: tokens.$bpk-input-background
120
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjZTcwODY2ICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTEyIDEuNUExMC41IDEwLjUgMCAxIDAgMjIuNSAxMiAxMC41IDEwLjUgMCAwIDAgMTIgMS41ek0xMiAxOGExLjUgMS41IDAgMSAxIDEuNS0xLjVBMS41IDEuNSAwIDAgMSAxMiAxOHptMS41LTZhMS41IDEuNSAwIDAgMS0zIDBWNy41YTEuNSAxLjUgMCAwIDEgMyAweiIvPjwvc3ZnPg==')
121
+ no-repeat right tokens.bpk-spacing-md() center;
122
+ background-size: tokens.$bpk-icon-size-sm tokens.$bpk-icon-size-sm;
123
+
124
+ @include utils.bpk-themeable-property(
125
+ border-color,
126
+ --bpk-input-invalid-border-color,
127
+ tokens.$bpk-form-validation-color
128
+ );
129
+
130
+ @include utils.bpk-rtl {
131
+ padding-right: tokens.$bpk-input-padding-x;
132
+ padding-left: tokens.bpk-spacing-xl();
133
+ background-position: left tokens.bpk-spacing-md() center;
134
+ }
135
+ }
136
+
137
+ /// Clearable form input. Modifies the bpk-input mixin.
138
+ ///
139
+ /// @require {mixin} bpk-input
140
+ ///
141
+ /// @example scss
142
+ /// .selector {
143
+ /// @include bpk-input();
144
+ /// @include bpk-input--clearable();
145
+ /// }
146
+
147
+ @mixin bpk-input--clearable {
148
+ padding-right: tokens.bpk-spacing-xl();
149
+
150
+ @include utils.bpk-rtl {
151
+ padding-right: tokens.$bpk-input-padding-x;
152
+ padding-left: tokens.bpk-spacing-xl();
153
+ }
154
+
155
+ &:focus {
156
+ background: tokens.$bpk-input-background;
157
+ }
158
+ }
159
+
160
+ /// Clearable form input container. Modifies the bpk-input mixin.
161
+ ///
162
+ /// @require {mixin} bpk-input
163
+ ///
164
+ /// @example scss
165
+ /// .selector {
166
+ /// @include bpk-input();
167
+ /// @include bpk-input__container();
168
+ /// }
169
+
170
+ @mixin bpk-input__container {
171
+ position: relative;
172
+ display: inline-block;
173
+ width: 100%;
174
+ }
175
+
176
+ /// Clearable (clear button) form input. Modifies the bpk-input mixin.
177
+ ///
178
+ /// @require {mixin} bpk-input
179
+ ///
180
+ /// @example scss
181
+ /// .selector {
182
+ /// @include bpk-input();
183
+ /// @include bpk-input__clear-button();
184
+ /// }
185
+
186
+ @mixin bpk-input__clear-button {
187
+ position: absolute;
188
+ right: tokens.bpk-spacing-md();
189
+ height: tokens.$bpk-input-height;
190
+
191
+ @include utils.bpk-rtl {
192
+ right: inherit;
193
+ left: tokens.bpk-spacing-md();
194
+ }
195
+
196
+ &--large {
197
+ right: tokens.bpk-spacing-base();
198
+ height: tokens.$bpk-input-large-height;
199
+
200
+ @include utils.bpk-rtl {
201
+ left: tokens.bpk-spacing-base();
202
+ }
203
+ }
204
+ }
205
+
206
+ /// Large form input. Modifies the bpk-input mixin.
207
+ ///
208
+ /// @require {mixin} bpk-input
209
+ ///
210
+ /// @example scss
211
+ /// .selector {
212
+ /// @include bpk-input();
213
+ /// @include bpk-input--large();
214
+ /// }
215
+
216
+ @mixin bpk-input--large {
217
+ height: tokens.$bpk-input-large-height;
218
+ padding-right: tokens.bpk-spacing-base();
219
+ padding-left: tokens.bpk-spacing-base();
220
+
221
+ &.bpk-input--valid,
222
+ &.bpk-input--invalid,
223
+ &.bpk-input--clearable {
224
+ padding-right: tokens.bpk-spacing-xxl();
225
+ background-position: right tokens.bpk-spacing-base() center;
226
+
227
+ @include utils.bpk-rtl {
228
+ padding-right: tokens.bpk-spacing-base();
229
+ padding-left: tokens.bpk-spacing-xxl();
230
+ background-position: left tokens.bpk-spacing-base() center;
231
+ }
232
+ }
233
+ }
234
+
235
+ /// Docked (first-child) form input. Modifies the bpk-input mixin.
236
+ ///
237
+ /// @require {mixin} bpk-input
238
+ ///
239
+ /// @example scss
240
+ /// .selector {
241
+ /// @include bpk-input();
242
+ /// @include bpk-input--docked-first-child();
243
+ /// }
244
+
245
+ @mixin bpk-input--docked-first-child {
246
+ border-right-width: 0;
247
+ border-radius: tokens.$bpk-input-border-radius 0 0 tokens.$bpk-input-border-radius;
248
+
249
+ @include utils.bpk-rtl {
250
+ border-right-width: tokens.$bpk-input-border-width;
251
+ border-left-width: 0;
252
+ border-radius: 0 tokens.$bpk-input-border-radius tokens.$bpk-input-border-radius 0;
253
+ }
254
+
255
+ &:focus {
256
+ position: relative; // brings outline to the front
257
+ }
258
+ }
259
+
260
+ /// Docked (last-child) form input. Modifies the bpk-input mixin.
261
+ ///
262
+ /// @require {mixin} bpk-input
263
+ ///
264
+ /// @example scss
265
+ /// .selector {
266
+ /// @include bpk-input();
267
+ /// @include bpk-input--docked-last-child();
268
+ /// }
269
+
270
+ @mixin bpk-input--docked-last-child {
271
+ border-radius: 0 tokens.$bpk-input-border-radius tokens.$bpk-input-border-radius 0;
272
+
273
+ @include utils.bpk-rtl {
274
+ border-radius: tokens.$bpk-input-border-radius 0 0 tokens.$bpk-input-border-radius;
275
+ }
276
+
277
+ &:focus {
278
+ position: relative; // brings outline to the front
279
+ }
280
+ }
281
+
282
+ /// Docked (middle-child) form input. Modifies the bpk-input mixin.
283
+ ///
284
+ /// @require {mixin} bpk-input
285
+ ///
286
+ /// @example scss
287
+ /// .selector {
288
+ /// @include bpk-input();
289
+ /// @include bpk-input--docked-middle-child();
290
+ /// }
291
+
292
+ @mixin bpk-input--docked-middle-child {
293
+ border-right-width: 0;
294
+ border-radius: 0;
295
+
296
+ @include utils.bpk-rtl {
297
+ border-right-width: tokens.$bpk-input-border-width;
298
+ border-left-width: 0;
299
+ }
300
+
301
+ &:focus {
302
+ position: relative; // brings outline to the front
303
+ }
304
+ }
305
+
306
+ /// Docked form input (inputs must sit side-by-side in the DOM). Modifies the bpk-input mixin.
307
+ ///
308
+ /// @require {mixin} bpk-input
309
+ ///
310
+ /// @example scss
311
+ /// .selector {
312
+ /// @include bpk-input();
313
+ /// @include bpk-input--docked();
314
+ /// }
315
+
316
+ @mixin bpk-input--docked {
317
+ &:first-child {
318
+ @include bpk-input--docked-first-child;
319
+ }
320
+
321
+ &:last-child {
322
+ @include bpk-input--docked-last-child;
323
+ }
324
+
325
+ &:not(:first-child):not(:last-child) {
326
+ @include bpk-input--docked-middle-child;
327
+ }
328
+ }
329
+
330
+ /// Form select input.
331
+ ///
332
+ /// @example scss
333
+ /// .selector {
334
+ /// @include bpk-select();
335
+ /// }
336
+
337
+ @mixin bpk-select {
338
+ display: inline-block;
339
+ width: 100%;
340
+ height: tokens.$bpk-input-height;
341
+ padding: tokens.bpk-spacing-md() - (2 * tokens.$bpk-one-pixel-rem) tokens.bpk-spacing-md();
342
+ padding-right: tokens.bpk-spacing-xl();
343
+ border: solid tokens.$bpk-one-pixel-rem tokens.$bpk-line-day;
344
+ border-radius: tokens.$bpk-select-border-radius;
345
+ background: tokens.$bpk-surface-default-day
346
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjMTYxNjE2ICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTE2LjUzNyA4LjI1SDcuNDYzYTEuMzU4IDEuMzU4IDAgMCAwLTEuMTEgMi4yNTFsNC4zNTQgNC43N2ExLjUzIDEuNTMgMCAwIDAgMi4xODQuMDRsNC43MTgtNC43N2ExLjM1NyAxLjM1NyAwIDAgMC0xLjA3Mi0yLjI5MXoiLz48L3N2Zz4=')
347
+ no-repeat right tokens.bpk-spacing-md() center;
348
+ background-size: tokens.$bpk-input-height * 0.5;
349
+ color: tokens.$bpk-text-primary-day;
350
+ line-height: (tokens.$bpk-line-height-base - (2 * tokens.$bpk-select-border-width));
351
+ appearance: none;
352
+
353
+ @include utils.bpk-rtl {
354
+ padding-right: tokens.bpk-spacing-md();
355
+ padding-left: tokens.bpk-spacing-xl();
356
+ background-position: left tokens.bpk-spacing-md() center;
357
+ }
358
+
359
+ @media screen\0 {
360
+ /* stylelint-disable-next-line declaration-no-important */
361
+ padding: tokens.bpk-spacing-md() !important;
362
+ /* stylelint-disable-next-line declaration-no-important */
363
+ background-image: none !important;
364
+ }
365
+
366
+ &:disabled {
367
+ border-color: tokens.$bpk-surface-highlight-day;
368
+ background: tokens.$bpk-surface-default-day
369
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjMDAwMDAwICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTE2LjUzNyA4LjI1SDcuNDYzYTEuMzU4IDEuMzU4IDAgMCAwLTEuMTEgMi4yNTFsNC4zNTQgNC43N2ExLjUzIDEuNTMgMCAwIDAgMi4xODQuMDRsNC43MTgtNC43N2ExLjM1NyAxLjM1NyAwIDAgMC0xLjA3Mi0yLjI5MXoiLz48L3N2Zz4=')
370
+ no-repeat right tokens.bpk-spacing-md() center;
371
+ background-size: tokens.$bpk-input-height * 0.5;
372
+ color: tokens.$bpk-text-disabled-day;
373
+ cursor: not-allowed;
374
+ }
375
+ }
376
+
377
+ /// Large form select input. Modifies the bpk-select mixin.
378
+ ///
379
+ /// @require {mixin} bpk-select
380
+ ///
381
+ /// @example scss
382
+ /// .selector {
383
+ /// @include bpk-select();
384
+ /// @include bpk-select--large();
385
+ /// }
386
+
387
+ @mixin bpk-select--large {
388
+ height: tokens.$bpk-input-large-height;
389
+ padding: tokens.bpk-spacing-md() tokens.bpk-spacing-base();
390
+ padding-right: tokens.bpk-spacing-xxl();
391
+ background: tokens.$bpk-surface-default-day
392
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjMTYxNjE2ICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTE2LjUzNyA4LjI1SDcuNDYzYTEuMzU4IDEuMzU4IDAgMCAwLTEuMTEgMi4yNTFsNC4zNTQgNC43N2ExLjUzIDEuNTMgMCAwIDAgMi4xODQuMDRsNC43MTgtNC43N2ExLjM1NyAxLjM1NyAwIDAgMC0xLjA3Mi0yLjI5MXoiLz48L3N2Zz4=')
393
+ no-repeat right tokens.bpk-spacing-base() center;
394
+
395
+ @include utils.bpk-rtl {
396
+ padding-right: tokens.bpk-spacing-base();
397
+ padding-left: tokens.bpk-spacing-xxl();
398
+ background-position: left tokens.bpk-spacing-base() center;
399
+ }
400
+ }
401
+
402
+ /// Docked (first-child) form select input. Modifies the bpk-select mixin.
403
+ ///
404
+ /// @require {mixin} bpk-select
405
+ ///
406
+ /// @example scss
407
+ /// .selector {
408
+ /// @include bpk-select();
409
+ /// @include bpk-select--docked-first-child();
410
+ /// }
411
+
412
+ @mixin bpk-select--docked-first-child {
413
+ border-right-width: 0;
414
+ border-radius: tokens.$bpk-select-border-radius 0 0 tokens.$bpk-select-border-radius;
415
+
416
+ @include utils.bpk-rtl {
417
+ border-right-width: tokens.$bpk-select-border-width;
418
+ border-left-width: 0;
419
+ border-radius: 0 tokens.$bpk-select-border-radius tokens.$bpk-select-border-radius 0;
420
+ }
421
+ }
422
+
423
+ /// Docked (last-child) form select input. Modifies the bpk-select mixin.
424
+ ///
425
+ /// @require {mixin} bpk-select
426
+ ///
427
+ /// @example scss
428
+ /// .selector {
429
+ /// @include bpk-select();
430
+ /// @include bpk-select--docked-last-child();
431
+ /// }
432
+
433
+ @mixin bpk-select--docked-last-child {
434
+ border-radius: 0 tokens.$bpk-select-border-radius tokens.$bpk-select-border-radius 0;
435
+
436
+ @include utils.bpk-rtl {
437
+ border-radius: tokens.$bpk-select-border-radius 0 0 tokens.$bpk-select-border-radius;
438
+ }
439
+ }
440
+
441
+ /// Docked (middle-child) form select input. Modifies the bpk-select mixin.
442
+ ///
443
+ /// @require {mixin} bpk-select
444
+ ///
445
+ /// @example scss
446
+ /// .selector {
447
+ /// @include bpk-select();
448
+ /// @include bpk-select--docked-middle-child();
449
+ /// }
450
+
451
+ @mixin bpk-select--docked-middle-child {
452
+ border-right-width: 0;
453
+ border-radius: 0;
454
+
455
+ @include utils.bpk-rtl {
456
+ border-right-width: tokens.$bpk-select-border-width;
457
+ border-left-width: 0;
458
+ }
459
+ }
460
+
461
+ /// Docked form select input (selects must sit side-by-side in the DOM). Modifies the bpk-select mixin.
462
+ ///
463
+ /// @require {mixin} bpk-select
464
+ ///
465
+ /// @example scss
466
+ /// .selector {
467
+ /// @include bpk-select();
468
+ /// @include bpk-select--docked();
469
+ /// }
470
+
471
+ @mixin bpk-select--docked {
472
+ &:first-child {
473
+ @include bpk-select--docked-first-child;
474
+ }
475
+
476
+ &:last-child {
477
+ @include bpk-select--docked-last-child;
478
+ }
479
+
480
+ &:not(:first-child):not(:last-child) {
481
+ @include bpk-select--docked-middle-child;
482
+ }
483
+ }
484
+
485
+ /// Invalid form input. Modifies the bpk-selct mixin.
486
+ ///
487
+ /// @require {mixin} bpk-select
488
+ ///
489
+ /// @example scss
490
+ /// .selector {
491
+ /// @include bpk-select();
492
+ /// @include bpk-select--invalid();
493
+ /// }
494
+
495
+ @mixin bpk-select--invalid {
496
+ padding-right: tokens.bpk-spacing-xl();
497
+ background: tokens.$bpk-surface-default-day
498
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjMTYxNjE2ICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTE2LjUzNyA4LjI1SDcuNDYzYTEuMzU4IDEuMzU4IDAgMCAwLTEuMTEgMi4yNTFsNC4zNTQgNC43N2ExLjUzIDEuNTMgMCAwIDAgMi4xODQuMDRsNC43MTgtNC43N2ExLjM1NyAxLjM1NyAwIDAgMC0xLjA3Mi0yLjI5MXoiLz48L3N2Zz4=')
499
+ no-repeat right tokens.bpk-spacing-md() center;
500
+ background-size: tokens.$bpk-input-height * 0.5;
501
+
502
+ @include utils.bpk-themeable-property(
503
+ border-color,
504
+ --bpk-select-invalid-border-color,
505
+ tokens.$bpk-form-validation-color
506
+ );
507
+
508
+ @include utils.bpk-rtl {
509
+ padding-right: tokens.bpk-spacing-md();
510
+ padding-left: tokens.bpk-spacing-xl();
511
+ background-position: left tokens.bpk-spacing-md() center;
512
+ }
513
+ }
514
+
515
+ /// Form checkbox. Should be applied to containing label element.
516
+ ///
517
+ /// @example scss
518
+ /// .selector {
519
+ /// @include bpk-checkbox();
520
+ /// }
521
+
522
+ @mixin bpk-checkbox {
523
+ position: relative;
524
+ display: inline-block;
525
+ padding-left: tokens.bpk-spacing-lg() + tokens.bpk-spacing-sm();
526
+
527
+ @include typography.bpk-text;
528
+ @include typography.bpk-body-default;
529
+
530
+ @include utils.bpk-rtl {
531
+ padding-right: tokens.bpk-spacing-lg() + tokens.bpk-spacing-sm();
532
+ padding-left: 0;
533
+ }
534
+ }
535
+
536
+ /// Label for checkbox. Should be applied to label text element.
537
+ ///
538
+ /// @example scss
539
+ /// .selector {
540
+ /// @include bpk-checkbox__label();
541
+ /// }
542
+
543
+ @mixin bpk-checkbox__label {
544
+ vertical-align: baseline;
545
+ }
546
+
547
+ /// Small label for checkbox. Should be applied to label text element.
548
+ /// Modifies bpk-checkbox__label.
549
+ ///
550
+ /// @example scss
551
+ /// .selector {
552
+ /// @include bpk-checkbox__label();
553
+ /// @include bpk-checkbox__label--small();
554
+ /// }
555
+
556
+ @mixin bpk-checkbox__label--small {
557
+ @include typography.bpk-text;
558
+ @include typography.bpk-caption;
559
+ }
560
+
561
+ /// White label checkbox. Modifies the bpk-checkbox mixin.
562
+ ///
563
+ /// @require {mixin} bpk-checkbox
564
+ ///
565
+ /// @example scss
566
+ /// .selector {
567
+ /// @include bpk-checkbox();
568
+ /// @include bpk-checkbox--white();
569
+ /// }
570
+
571
+ @mixin bpk-checkbox--white {
572
+ color: tokens.$bpk-surface-default-day;
573
+ }
574
+
575
+ /// Disabled form checkbox. Modifies the bpk-checkbox mixin.
576
+ ///
577
+ /// @require {mixin} bpk-checkbox
578
+ ///
579
+ /// @example scss
580
+ /// .selector {
581
+ /// @include bpk-checkbox();
582
+ /// @include bpk-checkbox--disabled();
583
+ /// }
584
+
585
+ @mixin bpk-checkbox--disabled {
586
+ color: tokens.$bpk-label-disabled-color;
587
+ cursor: not-allowed;
588
+ }
589
+
590
+ /// Invalid form checkbox. Modifies the bpk-checkbox mixin.
591
+ ///
592
+ /// @require {mixin} bpk-checkbox
593
+ ///
594
+ /// @example scss
595
+ /// .selector {
596
+ /// @include bpk-checkbox();
597
+ /// @include bpk-checkbox--invalid();
598
+ /// }
599
+
600
+ @mixin bpk-checkbox--invalid {
601
+ input[type='checkbox'] {
602
+ border: (tokens.$bpk-one-pixel-rem * 3) solid tokens.$bpk-text-error-day;
603
+ }
604
+ }
605
+
606
+ /// Used to create the check/tick inside
607
+ /// a checked checkbox.
608
+ ///
609
+ /// @example scss
610
+ /// .selector {
611
+ /// @include bpk-checkbox__checkmark();
612
+ /// }
613
+ @mixin bpk-checkbox__checkmark {
614
+ &::before,
615
+ &::after {
616
+ position: absolute;
617
+ content: '';
618
+ transform: rotate(45deg);
619
+ border-radius: tokens.$bpk-border-size-lg;
620
+ background-color: tokens.$bpk-text-primary-inverse-day;
621
+ }
622
+
623
+ &::before {
624
+ top: tokens.bpk-spacing-md() - tokens.$bpk-one-pixel-rem;
625
+ left: 0;
626
+ width: math.div(tokens.bpk-spacing-lg(), 3);
627
+ height: tokens.bpk-spacing-sm() - tokens.$bpk-one-pixel-rem;
628
+ }
629
+
630
+ &::after {
631
+ top: tokens.bpk-spacing-sm() * 0.5;
632
+ left: tokens.bpk-spacing-md() - tokens.$bpk-one-pixel-rem;
633
+ width: tokens.bpk-spacing-sm() - tokens.$bpk-one-pixel-rem;
634
+ height: tokens.bpk-spacing-md() + (tokens.$bpk-one-pixel-rem * 3);
635
+ }
636
+
637
+ &:disabled {
638
+ &::before,
639
+ &::after {
640
+ background-color: tokens.$bpk-text-disabled-day;
641
+ }
642
+ }
643
+ }
644
+
645
+ /// Form checkbox input.
646
+ ///
647
+ /// @example scss
648
+ /// .selector {
649
+ /// @include bpk-checkbox__input();
650
+ /// }
651
+
652
+ @mixin bpk-checkbox__input {
653
+ $checkbox-input-size: tokens.bpk-spacing-lg() - (tokens.$bpk-one-pixel-rem * 4);
654
+
655
+ position: absolute;
656
+ top: (tokens.$bpk-line-height-base - $checkbox-input-size) * 0.5;
657
+ left: 0;
658
+ width: $checkbox-input-size;
659
+ height: $checkbox-input-size;
660
+ margin: 0;
661
+ padding: 0;
662
+ border: (tokens.$bpk-one-pixel-rem * 3) solid tokens.$bpk-text-secondary-day;
663
+ border-radius: (tokens.$bpk-one-pixel-rem * 4);
664
+ cursor: pointer;
665
+ vertical-align: text-bottom;
666
+ appearance: none;
667
+
668
+ @include utils.bpk-rtl {
669
+ right: 0;
670
+ left: auto;
671
+ }
672
+
673
+ @media screen\0 {
674
+ /* stylelint-disable-next-line declaration-no-important */
675
+ background: none !important;
676
+ }
677
+
678
+ &:checked,
679
+ &:indeterminate {
680
+ @include utils.bpk-themeable-property(
681
+ background-color,
682
+ --bpk-checkbox-checked-color,
683
+ tokens.$bpk-core-accent-day
684
+ );
685
+ @include utils.bpk-themeable-property(
686
+ border-color,
687
+ --bpk-checkbox-checked-color,
688
+ tokens.$bpk-core-accent-day
689
+ );
690
+
691
+ &:disabled {
692
+ border-color: tokens.$bpk-text-disabled-day;
693
+ background: none;
694
+ }
695
+ }
696
+
697
+ &:checked:not(:indeterminate) {
698
+ @include bpk-checkbox__checkmark;
699
+ }
700
+
701
+ &:disabled {
702
+ border-color: tokens.$bpk-text-disabled-day;
703
+ }
704
+ }
705
+
706
+ /// Form radio button mixin. This is a reusable mixin to set border styles for the radio button.
707
+ ///
708
+ /// @param {variable} $color
709
+ ///
710
+ /// @access private
711
+ @mixin _bpk-radio-border($color) {
712
+ border: tokens.$bpk-border-size-xl solid $color;
713
+ border-radius: tokens.$bpk-border-radius-lg;
714
+ }
715
+
716
+ /// Form radio button. Should be applied to containing label element.
717
+ ///
718
+ /// @example scss
719
+ /// .selector {
720
+ /// @include bpk-radio();
721
+ /// }
722
+
723
+ @mixin bpk-radio {
724
+ position: relative;
725
+ display: inline-block;
726
+ padding-left: tokens.bpk-spacing-lg() + tokens.bpk-spacing-sm();
727
+
728
+ @include utils.bpk-rtl {
729
+ padding-right: tokens.bpk-spacing-lg() + tokens.bpk-spacing-sm();
730
+ padding-left: 0;
731
+ }
732
+ }
733
+
734
+ /// Disabled form radio button. Modifies the bpk-radio mixin.
735
+ ///
736
+ /// @require {mixin} bpk-radio
737
+ ///
738
+ /// @example scss
739
+ /// .selector {
740
+ /// @include bpk-radio();
741
+ /// @include bpk-radio--disabled();
742
+ /// }
743
+
744
+ @mixin bpk-radio--disabled {
745
+ color: tokens.$bpk-label-disabled-color;
746
+ cursor: not-allowed;
747
+ }
748
+
749
+ /// White label radio button. Modifies the bpk-radio mixin.
750
+ ///
751
+ /// @require {mixin} bpk-radio
752
+ ///
753
+ /// @example scss
754
+ /// .selector {
755
+ /// @include bpk-radio();
756
+ /// @include bpk-radio--white();
757
+ /// }
758
+
759
+ @mixin bpk-radio--white {
760
+ color: tokens.$bpk-text-primary-inverse-day;
761
+
762
+ input[type='radio'] {
763
+ background: tokens.$bpk-text-primary-inverse-day;
764
+ }
765
+ }
766
+
767
+ /// Invalid radio button. Modifies the bpk-radio mixin.
768
+ ///
769
+ /// @require {mixin} bpk-radio
770
+ ///
771
+ /// @example scss
772
+ /// .selector {
773
+ /// @include bpk-radio();
774
+ /// @include bpk-radio--invalid();
775
+ /// }
776
+
777
+ @mixin bpk-radio--invalid {
778
+ input[type='radio'] {
779
+ @include _bpk-radio-border(tokens.$bpk-text-error-day);
780
+ }
781
+ }
782
+
783
+ /// Form radio input.
784
+ ///
785
+ /// @example scss
786
+ /// .selector {
787
+ /// @include bpk-radio__input();
788
+ /// }
789
+
790
+ @mixin bpk-radio__input {
791
+ $bpk-radio-size: tokens.bpk-spacing-lg() - (tokens.$bpk-one-pixel-rem * 4);
792
+
793
+ position: absolute;
794
+ top: 0;
795
+ left: 0;
796
+ width: $bpk-radio-size;
797
+ height: $bpk-radio-size;
798
+ margin: 0;
799
+ padding: 0;
800
+ cursor: pointer;
801
+ vertical-align: text-bottom;
802
+ appearance: none;
803
+
804
+ @include _bpk-radio-border(tokens.$bpk-text-secondary-day);
805
+
806
+ @include utils.bpk-rtl {
807
+ right: 0;
808
+ left: auto;
809
+ }
810
+
811
+ @media screen\0 {
812
+ /* stylelint-disable-next-line declaration-no-important */
813
+ background: none !important;
814
+ }
815
+
816
+ &:checked {
817
+ @include utils.bpk-themeable-property(
818
+ border-color,
819
+ --bpk-radio-checked-color,
820
+ tokens.$bpk-core-accent-day
821
+ );
822
+
823
+ &:disabled {
824
+ border-color: tokens.$bpk-text-disabled-day;
825
+ }
826
+ }
827
+
828
+ &:disabled {
829
+ border-color: tokens.$bpk-text-disabled-day;
830
+ }
831
+ }
832
+
833
+ /// Form label.
834
+ ///
835
+ /// @example scss
836
+ /// .selector {
837
+ /// @include bpk-label();
838
+ /// }
839
+
840
+ @mixin bpk-label {
841
+ display: block;
842
+ color: tokens.$bpk-text-primary-day;
843
+ font-size: tokens.$bpk-font-size-xs;
844
+ font-weight: tokens.$bpk-font-weight-bold;
845
+ line-height: tokens.$bpk-line-height-xs;
846
+ }
847
+
848
+ /// Invalid form label. Modifies the bpk-label mixin.
849
+ ///
850
+ /// @require {mixin} bpk-label
851
+ ///
852
+ /// @example scss
853
+ /// .selector {
854
+ /// @include bpk-label();
855
+ /// @include bpk-label--invalid();
856
+ /// }
857
+
858
+ @mixin bpk-label--invalid {
859
+ @include utils.bpk-themeable-property(
860
+ color,
861
+ --bpk-form-validation-text-color,
862
+ tokens.$bpk-form-validation-color
863
+ );
864
+ }
865
+
866
+ /// White form label. Modifies the bpk-label mixin.
867
+ ///
868
+ /// @require {mixin} bpk-label
869
+ ///
870
+ /// @example scss
871
+ /// .selector {
872
+ /// @include bpk-label();
873
+ /// @include bpk-label--white();
874
+ /// }
875
+
876
+ @mixin bpk-label--white {
877
+ color: tokens.$bpk-color-white;
878
+ }
879
+
880
+ /// Disabled form label. Modifies the bpk-label mixin.
881
+ ///
882
+ /// @require {mixin} bpk-label
883
+ ///
884
+ /// @example scss
885
+ /// .selector {
886
+ /// @include bpk-label();
887
+ /// @include bpk-label--disabled();
888
+ /// }
889
+
890
+ @mixin bpk-label--disabled {
891
+ color: tokens.$bpk-label-disabled-color;
892
+ cursor: not-allowed;
893
+ }
894
+
895
+ /// Form validation.
896
+ ///
897
+ /// @example scss
898
+ /// .selector {
899
+ /// @include bpk-form-validation();
900
+ /// }
901
+
902
+ @mixin bpk-form-validation {
903
+ position: relative;
904
+ transform: translateY(-#{tokens.bpk-spacing-base()});
905
+ transition:
906
+ opacity tokens.$bpk-duration-sm ease-in-out,
907
+ transform tokens.$bpk-duration-sm ease-in-out;
908
+ opacity: 0;
909
+
910
+ @include utils.bpk-themeable-property(
911
+ color,
912
+ --bpk-form-validation-text-color,
913
+ tokens.$bpk-form-validation-color
914
+ );
915
+ }
916
+
917
+ /// Form validation transition state. Modifies the bpk-form-validation mixin.
918
+ ///
919
+ /// @require {mixin} bpk-form-validation
920
+ ///
921
+ /// @example scss
922
+ /// .selector {
923
+ /// @include bpk-form-validation();
924
+ ///
925
+ /// &--appear {
926
+ /// @include bpk-form-validation--appear();
927
+ /// }
928
+ /// }
929
+
930
+ @mixin bpk-form-validation--appear {
931
+ transform: translateY(0);
932
+ opacity: 1;
933
+ }
934
+
935
+ /// Checkbox form validation. Modifies the bpk-form-validation mixin.
936
+ ///
937
+ /// @require {mixin} bpk-form-validation
938
+ ///
939
+ /// @example scss
940
+ /// .selector {
941
+ /// @include bpk-form-validation();
942
+ ///
943
+ /// &--is-checkbox {
944
+ /// @include bpk-form-validation--is-checkbox();
945
+ /// }
946
+ /// }
947
+
948
+ @mixin bpk-form-validation--is-checkbox {
949
+ display: inline-block;
950
+ }
951
+
952
+ /// Form validation container.
953
+ ///
954
+ /// @example scss
955
+ /// .selector {
956
+ /// @include bpk-form-validation__container();
957
+ /// }
958
+
959
+ @mixin bpk-form-validation__container {
960
+ margin-top: tokens.bpk-spacing-md();
961
+ font-size: tokens.$bpk-font-size-xs;
962
+ }
963
+
964
+ /// Form textarea.
965
+ ///
966
+ /// @example scss
967
+ /// .selector {
968
+ /// @include bpk-textarea();
969
+ /// }
970
+
971
+ @mixin bpk-textarea {
972
+ display: inline-block;
973
+ width: 100%;
974
+ max-width: 100%;
975
+ min-height: tokens.bpk-spacing-md() * 11;
976
+ padding: tokens.$bpk-input-padding-y tokens.$bpk-input-padding-x;
977
+ border: tokens.$bpk-input-border;
978
+ border-radius: tokens.$bpk-input-border-radius;
979
+ background: tokens.$bpk-input-background;
980
+ color: tokens.$bpk-text-primary-day;
981
+ appearance: none;
982
+
983
+ &::placeholder {
984
+ color: tokens.$bpk-text-secondary-day;
985
+ }
986
+
987
+ &:disabled {
988
+ border-color: tokens.$bpk-input-disabled-border-color;
989
+ background: tokens.$bpk-input-background;
990
+ color: tokens.$bpk-input-disabled-color;
991
+ cursor: not-allowed;
992
+ }
993
+
994
+ &::-ms-clear {
995
+ display: none;
996
+ }
997
+ }
998
+
999
+ /// Invalid form input. Modifies the bpk-textarea mixin.
1000
+ ///
1001
+ /// @require {mixin} bpk-textarea
1002
+ ///
1003
+ /// @example scss
1004
+ /// .selector {
1005
+ /// @include bpk-textarea();
1006
+ /// @include bpk-textarea--invalid();
1007
+ /// }
1008
+
1009
+ @mixin bpk-textarea--invalid {
1010
+ padding-right: tokens.bpk-spacing-xl();
1011
+ background: tokens.$bpk-input-background
1012
+ url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2Ij48c3R5bGUgdHlwZT0idGV4dC9jc3MiPmNpcmNsZSwgZWxsaXBzZSwgbGluZSwgcGF0aCwgcG9seWdvbiwgcG9seWxpbmUsIHJlY3QsIHRleHQgeyBmaWxsOiAjZTcwODY2ICFpbXBvcnRhbnQgfTwvc3R5bGU+PHBhdGggZD0iTTEyIDEuNUExMC41IDEwLjUgMCAxIDAgMjIuNSAxMiAxMC41IDEwLjUgMCAwIDAgMTIgMS41ek0xMiAxOGExLjUgMS41IDAgMSAxIDEuNS0xLjVBMS41IDEuNSAwIDAgMSAxMiAxOHptMS41LTZhMS41IDEuNSAwIDAgMS0zIDBWNy41YTEuNSAxLjUgMCAwIDEgMyAweiIvPjwvc3ZnPg==')
1013
+ no-repeat right tokens.bpk-spacing-md() center;
1014
+
1015
+ @include utils.bpk-themeable-property(
1016
+ border-color,
1017
+ --bpk-textarea-invalid-border-color,
1018
+ tokens.$bpk-form-validation-color
1019
+ );
1020
+
1021
+ @include utils.bpk-rtl {
1022
+ padding-right: tokens.$bpk-input-padding-x;
1023
+ padding-left: tokens.bpk-spacing-xl();
1024
+ background-position: left tokens.bpk-spacing-md() center;
1025
+
1026
+ &.bpk-textarea--large {
1027
+ padding-right: tokens.bpk-spacing-base();
1028
+ padding-left: tokens.bpk-spacing-xxl();
1029
+ background-position: right tokens.bpk-spacing-base() center;
1030
+ }
1031
+ }
1032
+ }
1033
+
1034
+ @mixin bpk-textarea--large {
1035
+ min-height: 6 * tokens.bpk-spacing-base();
1036
+ padding-right: tokens.bpk-spacing-base();
1037
+ padding-left: tokens.bpk-spacing-base();
1038
+
1039
+ &.bpk-textarea--invalid {
1040
+ padding-right: tokens.bpk-spacing-xxl();
1041
+ background-position: right tokens.bpk-spacing-base() center;
1042
+
1043
+ @include utils.bpk-rtl {
1044
+ padding-right: tokens.bpk-spacing-base();
1045
+ padding-left: tokens.bpk-spacing-xxl();
1046
+ background-position: left tokens.bpk-spacing-base() center;
1047
+ }
1048
+ }
1049
+ }