@kaizen/components 1.4.20-canary.3469 → 1.4.21

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 (121) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/esm/index.js +53 -0
  3. package/dist/iife/ActionButton.module-LHTIA2D3.scss +10 -0
  4. package/dist/iife/Avatar.module-GUG7HXMZ.scss +165 -0
  5. package/dist/iife/AvatarGroup.module-QAVTI4PR.scss +85 -0
  6. package/dist/iife/Base.module-DJPJNUQ5.scss +80 -0
  7. package/dist/iife/BaseButton.module-4FKZZLVI.scss +103 -0
  8. package/dist/iife/Brand.module-FCHTLJQK.scss +4 -0
  9. package/dist/iife/BrandMoment.module-4P7H2D3W.scss +196 -0
  10. package/dist/iife/Calendar.module-H7XBQXTA.scss +211 -0
  11. package/dist/iife/CalendarRange.module-QWW624PJ.scss +64 -0
  12. package/dist/iife/CalendarSingle.module-N2P3DWLM.scss +18 -0
  13. package/dist/iife/Card.module-VEUOO2LT.scss +38 -0
  14. package/dist/iife/Collapsible.module-ZJNVWQIB.scss +119 -0
  15. package/dist/iife/CollapsibleGroup.module-UR2SIYLJ.scss +10 -0
  16. package/dist/iife/ConfirmationModal.module-RN2H7KPL.scss +157 -0
  17. package/dist/iife/Content.module-6CTLBAHR.scss +25 -0
  18. package/dist/iife/ContextModal.module-TTFVPUPU.scss +77 -0
  19. package/dist/iife/DateInput.module-YBXARKD2.scss +3 -0
  20. package/dist/iife/DateInputDescription.module-SGAJNB7K.scss +19 -0
  21. package/dist/iife/DateInputField.module-2LG4I24X.scss +5 -0
  22. package/dist/iife/DateInputWithIconButton.module-RSUEQ345.scss +53 -0
  23. package/dist/iife/DateRangePicker.module-EIUGUIIA.scss +115 -0
  24. package/dist/iife/DropdownButton.module-WZ6FRRPS.scss +44 -0
  25. package/dist/iife/EditableRichTextContent.module-N2SFSI5C.scss +25 -0
  26. package/dist/iife/EmptyState.module-DOSURL5X.scss +156 -0
  27. package/dist/iife/ExpertAdviceCollapsible.module-L554JCXB.scss +47 -0
  28. package/dist/iife/FilterMenuButton.module-26EL5K3H.scss +19 -0
  29. package/dist/iife/FilterSplitButton.module-LMMEHFXQ.scss +133 -0
  30. package/dist/iife/FloatingCalendarWrapper.module-62NLSOUD.scss +12 -0
  31. package/dist/iife/GenericModal.module-DW6NSOGA.scss +110 -0
  32. package/dist/iife/GenericModalSection.module-MJ4MTMSP.scss +7 -0
  33. package/dist/iife/GenericNotification.module-DAERSOHE.scss +115 -0
  34. package/dist/iife/GenericTile.module-ZXQ4XWP4.scss +136 -0
  35. package/dist/iife/GuidanceBlock.module-FAHJFZMK.scss +324 -0
  36. package/dist/iife/HeroCard.module-LXHTKJTW.scss +106 -0
  37. package/dist/iife/InputEditModal.module-X3TLJPFO.scss +36 -0
  38. package/dist/iife/KaizenProvider/ThemeProvider/ThemeManager.js +398 -420
  39. package/dist/iife/KaizenProvider/ThemeProvider/ThemeManager.spec.js +404 -423
  40. package/dist/iife/KaizenProvider/ThemeProvider/index.js +412 -434
  41. package/dist/iife/KaizenProvider/index.js +414 -436
  42. package/dist/iife/LikertScaleLegacy.module-JYCJ5CON.scss +298 -0
  43. package/dist/iife/LinkPopover-7NCAPCQ3.scss +22 -0
  44. package/dist/iife/MainActions.module-T43D33YO.scss +16 -0
  45. package/dist/iife/MenuDropdown.module-DYV6JLT6.scss +26 -0
  46. package/dist/iife/MenuItem.module-LD7ZYX4T.scss +99 -0
  47. package/dist/iife/MenuList.module-44RMG7CF.scss +35 -0
  48. package/dist/iife/MobileActions.module-Z6PD4VIR.scss +198 -0
  49. package/dist/iife/ModalAccessibleDescription.module-NIJNKHHO.scss +3 -0
  50. package/dist/iife/ModalAccessibleLabel.module-NG26HDU4.scss +58 -0
  51. package/dist/iife/ModalFooter.module-TK3HAXMB.scss +69 -0
  52. package/dist/iife/ModalHeader.module-6SW7KZ22.scss +23 -0
  53. package/dist/iife/MultiActionTile.module-4Y2NA4H6.scss +3 -0
  54. package/dist/iife/NavigationTabs.module-VDIXMFXJ.scss +108 -0
  55. package/dist/iife/Pagination.module-U5S6WZ5K.scss +124 -0
  56. package/dist/iife/Popover.module-5ZQUBHXG.scss +264 -0
  57. package/dist/iife/ProgressBar.module-RL2UWVEH.scss +91 -0
  58. package/dist/iife/RichTextContent.module-4HA44IM4.scss +5 -0
  59. package/dist/iife/RichTextEditor.module-ZHXEK4XJ.scss +97 -0
  60. package/dist/iife/RoadblockModal.module-KVZCYLF2.scss +45 -0
  61. package/dist/iife/Select.module-6LHWOGGY.scss +391 -0
  62. package/dist/iife/Skirt.module-S3GPHMMQ.scss +32 -0
  63. package/dist/iife/SkirtCard.module-6YQ4PS2K.scss +16 -0
  64. package/dist/iife/SplitButton.module-WMGCIDDK.scss +4 -0
  65. package/dist/iife/StatelessMenu.module-SX2T5P4I.scss +3 -0
  66. package/dist/iife/Table.module-LCDRXCBP.scss +233 -0
  67. package/dist/iife/Tabs.module-BUPNPYW4.scss +172 -0
  68. package/dist/iife/Tag.module-T6PQJLSW.scss +268 -0
  69. package/dist/iife/TileGrid.module-NJQFVYRS.scss +23 -0
  70. package/dist/iife/TimeField.module-B4WNYAUE.scss +75 -0
  71. package/dist/iife/TimeSegment.module-TKOTKIXH.scss +53 -0
  72. package/dist/iife/TitleBlockMenuItem.module-LWVSMJTH.scss +99 -0
  73. package/dist/iife/TitleBlockZen.module-OK3QIC4Y.scss +695 -0
  74. package/dist/iife/ToastNotificationsList.module-EHDVGWDW.scss +26 -0
  75. package/dist/iife/ToggleIconButton.module-COM67MDC.scss +132 -0
  76. package/dist/iife/Toolbar.module-3BZYZE6H.scss +44 -0
  77. package/dist/iife/Toolbar.module-BP3GTBGW.scss +6 -0
  78. package/dist/iife/ToolbarSection.module-LZTHWGO7.scss +15 -0
  79. package/dist/iife/Well.module-4TIRC3HQ.scss +73 -0
  80. package/dist/iife/__future__/index.js +602 -915
  81. package/dist/iife/add-link.icon-2JH25LOT.svg +3 -0
  82. package/dist/iife/arrow-left.icon-RWWYLDT3.svg +17 -0
  83. package/dist/iife/arrow-right.icon-3ZGNCW3O.svg +17 -0
  84. package/dist/iife/bold.icon-FEZQ56AP.svg +3 -0
  85. package/dist/iife/bulletted-list.icon-ZDSXNO72.svg +3 -0
  86. package/dist/iife/caution.icon-BHBJMNMA.svg +1 -0
  87. package/dist/iife/clear-white.icon-O3ZK5Z2K.svg +18 -0
  88. package/dist/iife/close.icon-7H6W45MB.svg +1 -0
  89. package/dist/iife/date-start.icon-NV4EVRXI.svg +17 -0
  90. package/dist/iife/decrease-indent.icon-VAYQUHQG.svg +3 -0
  91. package/dist/iife/edit.icon-YJ4EIXHJ.svg +17 -0
  92. package/dist/iife/ellipsis.icon-DECY5OPU.svg +17 -0
  93. package/dist/iife/exclamation.icon-FJBHW7NP.svg +17 -0
  94. package/dist/iife/external-link.icon-7FNRTMN2.svg +17 -0
  95. package/dist/iife/hamburger.icon-YHQT7RB6.svg +17 -0
  96. package/dist/iife/increase-indent.icon-3XUPJEBD.svg +3 -0
  97. package/dist/iife/index.js +115236 -1958
  98. package/dist/iife/information-white.icon-3DXZDERC.svg +19 -0
  99. package/dist/iife/information.icon-5LHKLG66.svg +17 -0
  100. package/dist/iife/italics.icon-WWQDZP3S.svg +3 -0
  101. package/dist/iife/meatballs.icon-DECY5OPU.svg +17 -0
  102. package/dist/iife/numbered-list.icon-WPE4LE5R.svg +3 -0
  103. package/dist/iife/remove-link.icon-QMFTP7WO.svg +3 -0
  104. package/dist/iife/sort-ascending.icon-E24DTSHO.svg +17 -0
  105. package/dist/iife/sort-descending.icon-4SMPW2PG.svg +17 -0
  106. package/dist/iife/success-white.icon-VXFA2PUU.svg +18 -0
  107. package/dist/iife/underline.icon-ACYVVVSD.svg +3 -0
  108. package/dist/iife/user.icon-24JPACDP.svg +17 -0
  109. package/dist/index.d.ts +41 -1
  110. package/dist/index.js +54 -1
  111. package/dist/styles.css +98 -0
  112. package/package.json +32 -32
  113. package/dist/iife/Icon.module-VD7NKLAR-VD7NKLAR.scss +0 -72
  114. /package/dist/iife/{Dropdown.module-4CIBZTRZ-4CIBZTRZ.scss → Dropdown.module-4CIBZTRZ.scss} +0 -0
  115. /package/dist/iife/{Layout.module-MZ6JYT46-MZ6JYT46.scss → Layout.module-MZ6JYT46.scss} +0 -0
  116. /package/dist/iife/{Margin.module-DJURK5K7-DJURK5K7.scss → Margin.module-DJURK5K7.scss} +0 -0
  117. /package/dist/iife/{Menu.module-N76N74LN-N76N74LN.scss → Menu.module-N76N74LN.scss} +0 -0
  118. /package/dist/iife/{Padding.module-QSNUEZBU-QSNUEZBU.scss → Padding.module-QSNUEZBU.scss} +0 -0
  119. /package/dist/iife/{SkipLink.module-KAZA7PAL-KAZA7PAL.scss → SkipLink.module-KAZA7PAL.scss} +0 -0
  120. /package/dist/iife/{Text.module-SXGFOHGJ-SXGFOHGJ.scss → Text.module-SXGFOHGJ.scss} +0 -0
  121. /package/dist/iife/{VisuallyHidden.module-E5JUNEF5-E5JUNEF5.scss → VisuallyHidden.module-E5JUNEF5.scss} +0 -0
@@ -0,0 +1,58 @@
1
+ @import "~@kaizen/design-tokens/sass/color";
2
+ @import "~@kaizen/design-tokens/sass/border";
3
+ @import "~@kaizen/design-tokens/sass/layout";
4
+
5
+ //TODO - Remove below styles for Heading once responsive styling has been added to the Heading Component
6
+ $ca-breakpoint-small-mobile: 375px;
7
+
8
+ @mixin ca-media-small-mobile {
9
+ @media (max-width: #{$ca-breakpoint-small-mobile}) {
10
+ @content;
11
+ }
12
+ }
13
+
14
+ .modalLabel {
15
+ position: relative;
16
+
17
+ //TODO - Remove below styles for Heading once responsive styling has been added to the Heading Component
18
+ h2 {
19
+ @media (max-width: $layout-breakpoints-medium) {
20
+ font-size: 1.625rem;
21
+ line-height: 2rem;
22
+ }
23
+ @include ca-media-small-mobile {
24
+ font-size: 1.5rem;
25
+ line-height: 1.875rem;
26
+ }
27
+ }
28
+
29
+ &.prominent {
30
+ grid-column-start: 2;
31
+ text-align: left;
32
+ }
33
+
34
+ // Use JS polyfill to simulate :focus-visible, not yet supported by browsers
35
+ // https://github.com/WICG/focus-visible#backwards-compatibility
36
+ :global(.js-focus-visible) & {
37
+ // hide native focus ring when :focus but not :focus-visible
38
+ &:focus {
39
+ outline: none;
40
+ }
41
+
42
+ // show custom focus ring when :focus-visible
43
+ &:global(.focus-visible)::after {
44
+ $focus-ring-offset: calc((#{$border-focus-ring-border-width} * 2) + 1px);
45
+ content: "";
46
+ position: absolute;
47
+ background: transparent;
48
+ border-radius: $border-focus-ring-border-radius;
49
+ border-width: $border-focus-ring-border-width;
50
+ border-style: $border-focus-ring-border-style;
51
+ border-color: $color-blue-500;
52
+ top: calc(-1 * #{$focus-ring-offset});
53
+ left: calc(-1 * #{$focus-ring-offset});
54
+ right: calc(-1 * #{$focus-ring-offset});
55
+ bottom: calc(-1 * #{$focus-ring-offset});
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,69 @@
1
+ @import "~@kaizen/design-tokens/sass/border";
2
+ @import "~@kaizen/design-tokens/sass/spacing";
3
+ @import "~@kaizen/design-tokens/sass/layout";
4
+
5
+ .actions {
6
+ display: flex;
7
+ flex-direction: row-reverse;
8
+ justify-content: flex-start;
9
+ }
10
+
11
+ .actionsAlignStart {
12
+ flex-direction: row-reverse;
13
+ justify-content: flex-end;
14
+ }
15
+
16
+ .padded {
17
+ padding: $spacing-md;
18
+ flex-direction: column;
19
+ @media (min-width: $layout-breakpoints-medium) {
20
+ padding: 0 $spacing-lg $spacing-lg $spacing-lg;
21
+ flex-direction: row-reverse;
22
+ }
23
+ }
24
+ .actionButton {
25
+ width: 100%;
26
+ @media (min-width: $layout-breakpoints-medium) {
27
+ width: inherit;
28
+ }
29
+ }
30
+ .actionButton + .actionButton {
31
+ margin-right: $spacing-sm;
32
+ @media (max-width: $layout-breakpoints-medium - 1px) {
33
+ margin-top: $spacing-sm;
34
+ }
35
+ }
36
+
37
+ .footerWrap {
38
+ align-items: baseline;
39
+ width: 100%;
40
+ box-sizing: border-box;
41
+ }
42
+
43
+ .center {
44
+ display: flex;
45
+ justify-content: center;
46
+ }
47
+
48
+ .border {
49
+ border-top: 1px solid $border-solid-border-color;
50
+ }
51
+
52
+ .start {
53
+ display: flex;
54
+ justify-content: flex-start;
55
+ }
56
+
57
+ .end {
58
+ display: flex;
59
+ justify-content: flex-end;
60
+ }
61
+
62
+ .fixed {
63
+ position: absolute;
64
+ bottom: 0;
65
+ left: 0;
66
+ }
67
+ .filler {
68
+ visibility: hidden;
69
+ }
@@ -0,0 +1,23 @@
1
+ @import "~@kaizen/deprecated-component-library-helpers/styles/layout";
2
+ @import "~@kaizen/component-library/styles/layers";
3
+ @import "~@kaizen/deprecated-component-library-helpers/styles/type";
4
+
5
+ .dismissButton {
6
+ @include ca-position($end: 0, $top: 0);
7
+ position: absolute;
8
+ z-index: $ca-z-index-popover;
9
+ }
10
+
11
+ .layout {
12
+ width: 100%;
13
+ }
14
+
15
+ .fixed {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ }
20
+
21
+ .filler {
22
+ visibility: hidden;
23
+ }
@@ -0,0 +1,3 @@
1
+ .actions {
2
+ display: flex;
3
+ }
@@ -0,0 +1,108 @@
1
+ @import "~@kaizen/design-tokens/sass/border";
2
+ @import "~@kaizen/design-tokens/sass/spacing";
3
+ @import "~@kaizen/design-tokens/sass/typography";
4
+ @import "~@kaizen/design-tokens/sass/color";
5
+ @import "./mixins";
6
+
7
+ .container {
8
+ display: flex;
9
+ -webkit-font-smoothing: antialiased;
10
+ -moz-osx-font-smoothing: grayscale;
11
+ }
12
+
13
+ .linkAnchor {
14
+ display: flex;
15
+ align-items: center;
16
+ padding: 0 $spacing-sm;
17
+ position: relative;
18
+ color: rgba($color-white-rgb, 0.7);
19
+ font-family: $typography-heading-4-font-family;
20
+ font-weight: $typography-heading-4-font-weight;
21
+ font-size: $typography-heading-4-font-size;
22
+ line-height: $typography-heading-4-line-height;
23
+ letter-spacing: $typography-heading-4-letter-spacing;
24
+ text-decoration: none;
25
+ white-space: nowrap;
26
+ margin-right: $spacing-md;
27
+
28
+ &[dir="rtl"],
29
+ [dir="rtl"] & {
30
+ margin-left: $spacing-md;
31
+ margin-right: 0;
32
+ }
33
+
34
+ &:hover {
35
+ color: $color-white;
36
+ text-decoration: none;
37
+ }
38
+
39
+ @include title-block-under-1366 {
40
+ font-family: $typography-heading-5-font-family;
41
+ font-weight: $typography-heading-5-font-weight;
42
+ font-size: $typography-heading-5-font-size;
43
+ line-height: $typography-heading-5-line-height;
44
+ letter-spacing: $typography-heading-5-letter-spacing;
45
+ }
46
+
47
+ @include title-block-under-1440 {
48
+ margin-right: $spacing-xs;
49
+
50
+ &[dir="rtl"],
51
+ [dir="rtl"] & {
52
+ margin-left: $spacing-xs;
53
+ margin-right: 0;
54
+ }
55
+ }
56
+
57
+ @media (max-width: 1189px) {
58
+ margin: 0;
59
+ }
60
+
61
+ &.active {
62
+ color: $color-white;
63
+
64
+ &::before {
65
+ content: "";
66
+ display: block;
67
+ height: 5px;
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ right: 0;
72
+ background-color: $color-white;
73
+ transition: transform cubic-bezier(0.55, 0.085, 0.68, 0.53) 150ms;
74
+ border-radius: 0 0 $border-solid-border-radius $border-solid-border-radius;
75
+
76
+ @include title-block-medium-and-small {
77
+ top: auto;
78
+ bottom: 0;
79
+ border-radius: $border-solid-border-radius $border-solid-border-radius 0
80
+ 0;
81
+ }
82
+ }
83
+ }
84
+ }
85
+
86
+ .linkAnchor.lightBackground {
87
+ color: rgba($color-purple-800-rgb, 0.75);
88
+
89
+ &:hover {
90
+ color: $color-blue-500;
91
+ }
92
+
93
+ &.active {
94
+ color: $color-blue-500;
95
+
96
+ &::before {
97
+ background-color: $color-blue-500;
98
+ top: 3px;
99
+
100
+ @include title-block-medium-and-small {
101
+ top: auto;
102
+ bottom: 0;
103
+ border-radius: $border-solid-border-radius $border-solid-border-radius 0
104
+ 0;
105
+ }
106
+ }
107
+ }
108
+ }
@@ -0,0 +1,124 @@
1
+ @import "~@kaizen/design-tokens/sass/typography";
2
+ @import "~@kaizen/design-tokens/sass/color";
3
+ @import "~@kaizen/design-tokens/sass/border";
4
+ @import "~@kaizen/component-library/styles/border";
5
+ @import "~@kaizen/deprecated-component-library-helpers/styles/type";
6
+
7
+ // Pagination
8
+ .container {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: center;
12
+ }
13
+
14
+ .arrowIconWrapper {
15
+ height: 36px;
16
+ width: 36px;
17
+ border-radius: 18px;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ border: $border-focus-ring-border-width $border-focus-ring-border-style
22
+ $color-blue-300;
23
+ margin: 0 5px;
24
+ background-color: transparent;
25
+ color: $color-blue-500;
26
+ box-sizing: border-box;
27
+
28
+ &:disabled {
29
+ opacity: 0.35;
30
+ pointer-events: none;
31
+ }
32
+
33
+ &:hover {
34
+ background-color: $color-blue-100;
35
+ }
36
+
37
+ &:focus {
38
+ background-color: $color-blue-200;
39
+ &:focus-visible {
40
+ outline: none;
41
+ }
42
+ .pageIndicatorFocusRing {
43
+ border: $border-focus-ring-border-width $border-focus-ring-border-style
44
+ $color-blue-500;
45
+ }
46
+ }
47
+ }
48
+
49
+ // Page indicator
50
+ .pagesIndicatorWrapper {
51
+ display: flex;
52
+ flex-direction: row;
53
+ justify-content: space-around;
54
+ }
55
+
56
+ .pageIndicator,
57
+ .pageIndicatorSelected {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ height: 36px;
62
+ width: 36px;
63
+ border-radius: 18px;
64
+ border: $border-focus-ring-border-width $border-focus-ring-border-style
65
+ transparent;
66
+ background-color: transparent;
67
+ color: $color-blue-500;
68
+ margin: 0 5px;
69
+ font-family: $typography-paragraph-body-font-family;
70
+ font-weight: $typography-paragraph-body-font-weight;
71
+ font-size: $typography-paragraph-body-font-size;
72
+ }
73
+
74
+ .pageIndicatorFocusRing {
75
+ position: absolute;
76
+ padding: 1px;
77
+ border-radius: 50%;
78
+ width: inherit;
79
+ height: inherit;
80
+ }
81
+
82
+ .pageIndicator {
83
+ &:hover {
84
+ background-color: $color-blue-100;
85
+ }
86
+ &:focus-visible {
87
+ outline: none;
88
+ }
89
+ &:focus {
90
+ &:not(.pageIndicatorSelected) {
91
+ background-color: $color-blue-100;
92
+ .pageIndicatorFocusRing {
93
+ border: $border-focus-ring-border-width $border-focus-ring-border-style
94
+ $color-blue-500;
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ .pageIndicatorSelected {
101
+ background-color: $color-blue-500;
102
+ color: $color-white;
103
+ &:focus {
104
+ .pageIndicatorFocusRing {
105
+ border: $border-focus-ring-border-width $border-focus-ring-border-style
106
+ $color-blue-500;
107
+ }
108
+ }
109
+ &:hover {
110
+ background-color: $color-blue-500;
111
+ }
112
+ }
113
+
114
+ // Truncate indicator
115
+ .truncateIndicatorWrapper {
116
+ display: flex;
117
+ align-items: center;
118
+ justify-content: center;
119
+ height: 36px;
120
+ width: 36px;
121
+ background-color: transparent;
122
+ color: rgba($color-purple-800-rgb, 0.7);
123
+ margin: 0 5px;
124
+ }
@@ -0,0 +1,264 @@
1
+ @import "~@kaizen/design-tokens/sass/color";
2
+ @import "~@kaizen/design-tokens/sass/border";
3
+ @import "~@kaizen/design-tokens/sass/spacing";
4
+
5
+ // Sync with PopoverModern.tsx
6
+ $arrow-width: 14px;
7
+ $arrow-height: 7px;
8
+
9
+ $large-width: 450px;
10
+
11
+ @mixin button-reset {
12
+ appearance: none;
13
+ display: inline;
14
+ background: transparent;
15
+ color: inherit;
16
+ font: inherit;
17
+ margin: 0;
18
+ padding: 0;
19
+ border: none;
20
+ }
21
+
22
+ // Suggestion: with this implementation, the anchor point of the popover is at the base of the triangle. But,
23
+ // we would ideally want it at the tip of the triangle. Otherwise, when using the popover, the consumer needs to manually
24
+ // add something like a `margin-top: 8px` to get the popover properly positioned.
25
+ // I didn't update this, as I didn't want to introduce a breaking change.
26
+ @mixin arrow($background-color, $border-color) {
27
+ &::before,
28
+ &::after {
29
+ content: "";
30
+ position: absolute;
31
+ border-left: ($arrow-width / 2) solid transparent;
32
+ border-right: ($arrow-width / 2) solid transparent;
33
+ top: 0;
34
+ left: 0;
35
+ }
36
+
37
+ &::before {
38
+ border-top: $arrow-height solid $border-color;
39
+ }
40
+
41
+ /* The white fill of the triangle */
42
+ &::after {
43
+ border-top: $arrow-height solid $background-color;
44
+ margin-top: -2px;
45
+ z-index: 1;
46
+ }
47
+ }
48
+
49
+ .root {
50
+ width: 220px;
51
+ position: absolute;
52
+ left: 50%;
53
+ // also see the component file under getRootStyle, which will transform the element
54
+ }
55
+
56
+ %box {
57
+ background: $color-white;
58
+ border: $border-solid-border-width $border-solid-border-style $color-gray-300;
59
+ filter: drop-shadow(0 0 7px rgba(0, 0, 0, 0.1));
60
+ border-radius: $border-solid-border-radius;
61
+ color: $color-purple-800;
62
+ text-align: left;
63
+ padding: $spacing-sm 1rem 1rem;
64
+ }
65
+
66
+ .defaultBox {
67
+ @extend %box;
68
+ }
69
+
70
+ .defaultArrow {
71
+ @include arrow(white, $color-gray-300);
72
+ }
73
+
74
+ $informative-box-border-color: $color-blue-300;
75
+
76
+ .informativeBox {
77
+ @extend %box;
78
+ background: $color-blue-100;
79
+ border-color: $informative-box-border-color;
80
+ }
81
+
82
+ .informativeArrow {
83
+ @include arrow($color-blue-100, $informative-box-border-color);
84
+ }
85
+
86
+ $positive-box-border-color: $color-green-300;
87
+
88
+ .positiveBox {
89
+ @extend %box;
90
+ background: $color-green-100;
91
+ border-color: $positive-box-border-color;
92
+ }
93
+
94
+ .positiveArrow {
95
+ @include arrow($color-green-100, $positive-box-border-color);
96
+ }
97
+
98
+ $negative-box-border-color: $color-red-300;
99
+
100
+ .negativeBox {
101
+ @extend %box;
102
+ background: $color-red-100;
103
+ border-color: $negative-box-border-color;
104
+ }
105
+
106
+ .negativeArrow {
107
+ @include arrow($color-red-100, $negative-box-border-color);
108
+ }
109
+
110
+ .cautionaryBox {
111
+ @extend %box;
112
+ background: $color-yellow-100;
113
+ border-color: $color-yellow-400;
114
+ }
115
+
116
+ .cautionaryArrow {
117
+ @include arrow($color-yellow-100, $color-yellow-400);
118
+ }
119
+
120
+ .header {
121
+ position: relative;
122
+ margin-bottom: $spacing-xs;
123
+ display: flex;
124
+ align-items: center;
125
+ white-space: nowrap;
126
+ padding-right: $spacing-md;
127
+ }
128
+
129
+ .container {
130
+ position: relative;
131
+ white-space: pre-line;
132
+ }
133
+
134
+ .icon {
135
+ display: inherit;
136
+ margin-right: $spacing-xs;
137
+ }
138
+
139
+ .informativeIcon {
140
+ color: $color-blue-500;
141
+ }
142
+
143
+ .positiveIcon {
144
+ color: $color-green-400;
145
+ }
146
+
147
+ .negativeIcon {
148
+ color: $color-red-500;
149
+ }
150
+
151
+ .cautionaryIcon {
152
+ color: $color-yellow-500;
153
+ }
154
+
155
+ .close {
156
+ @include button-reset;
157
+ position: absolute;
158
+ right: 0;
159
+ margin-left: auto;
160
+ display: inherit;
161
+ color: rgba($color-purple-800-rgb, 0.7);
162
+
163
+ &:hover {
164
+ color: $color-purple-800;
165
+ }
166
+
167
+ &:global(.focus-visible) {
168
+ color: $color-purple-800;
169
+ outline: $color-blue-500 $border-focus-ring-border-style
170
+ $border-focus-ring-border-width;
171
+ outline-offset: calc(-1 * #{$border-focus-ring-border-width});
172
+ border-radius: $border-borderless-border-radius;
173
+ }
174
+
175
+ :focus {
176
+ outline: none;
177
+ }
178
+ }
179
+
180
+ .arrowWrapper {
181
+ position: absolute;
182
+ // Needed by popper, so it measures the size of the arrow correctly
183
+ width: $arrow-width;
184
+ height: $arrow-height;
185
+ }
186
+
187
+ .arrow {
188
+ // Needed by popper, so it measures the size of the arrow correctly
189
+ width: $arrow-width;
190
+ height: $arrow-height;
191
+ }
192
+
193
+ /**
194
+ * In the legacy popover, the "side" described the location of the arrow, and
195
+ * we use css classes to determine the placement.
196
+ * In the modern popover, the "side" describes the location of the popover
197
+ * relative to the reference element, and we use data attributes to determine
198
+ * the placement.
199
+ * Hence, the confusion below.
200
+ */
201
+ .arrowSideTop,
202
+ [data-popper-placement^="bottom"] .arrowWrapper {
203
+ bottom: 100%;
204
+ left: 50%;
205
+ margin-top: -9px;
206
+
207
+ .arrow {
208
+ transform: rotate(180deg);
209
+ }
210
+ }
211
+
212
+ .arrowSideLeft,
213
+ [data-popper-placement^="left"] .arrowWrapper {
214
+ right: 0;
215
+ margin-right: -10px;
216
+
217
+ .arrow {
218
+ transform: rotate(270deg);
219
+ }
220
+ }
221
+ .arrowSideRight,
222
+ [data-popper-placement^="right"] .arrowWrapper {
223
+ left: 0;
224
+ margin-left: -10px;
225
+
226
+ .arrow {
227
+ transform: rotate(90deg);
228
+ }
229
+ }
230
+
231
+ .arrowSideBottom,
232
+ [data-popper-placement^="top"] .arrowWrapper {
233
+ top: 100%;
234
+ left: 50%;
235
+ }
236
+
237
+ // Legacy component only
238
+ .arrowPositionCenter {
239
+ transform: translateX(-50%);
240
+ }
241
+
242
+ // Legacy component only
243
+ .arrowPositionStart {
244
+ left: $spacing-md;
245
+ right: auto;
246
+ }
247
+
248
+ // Legacy component only
249
+ .arrowPositionEnd {
250
+ right: $spacing-md;
251
+ left: auto;
252
+ }
253
+
254
+ .large {
255
+ width: auto;
256
+ max-width: $large-width;
257
+ }
258
+
259
+ .singleLine {
260
+ text-overflow: ellipsis;
261
+ /* white-space and overflow are required for text-overflow to do anything */
262
+ white-space: nowrap;
263
+ overflow: hidden;
264
+ }