@itwin/core-react 5.0.0-dev.2 → 5.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 (158) hide show
  1. package/CHANGELOG.md +49 -1
  2. package/lib/cjs/core-react/_geometry.scss +70 -0
  3. package/lib/cjs/core-react/_helpers.scss +54 -0
  4. package/lib/cjs/core-react/_math.scss +13 -0
  5. package/lib/cjs/core-react/_scrollbar.scss +57 -0
  6. package/lib/cjs/core-react/_typography.scss +44 -0
  7. package/lib/cjs/core-react/_z-index.scss +51 -0
  8. package/lib/cjs/core-react/autosuggest/AutoSuggest.scss +79 -0
  9. package/lib/cjs/core-react/badge/DeprecatedBadge.scss +11 -0
  10. package/lib/cjs/core-react/badge/NewBadge.scss +12 -0
  11. package/lib/cjs/core-react/badge/TechnicalPreviewBadge.scss +11 -0
  12. package/lib/cjs/core-react/base/base.scss +44 -0
  13. package/lib/cjs/core-react/base/classes.scss +27 -0
  14. package/lib/cjs/core-react/base/index.scss +5 -0
  15. package/lib/cjs/core-react/button/UnderlinedButton.scss +29 -0
  16. package/lib/cjs/core-react/checklistbox/CheckListBox.scss +22 -0
  17. package/lib/cjs/core-react/classes.scss +9 -0
  18. package/lib/cjs/core-react/colorthemes.scss +12 -0
  19. package/lib/cjs/core-react/colorvariables.scss +139 -0
  20. package/lib/cjs/core-react/contextmenu/ContextMenu.scss +226 -0
  21. package/lib/cjs/core-react/contextmenu/PopupContextMenu.scss +8 -0
  22. package/lib/cjs/core-react/dialog/Dialog.scss +57 -0
  23. package/lib/cjs/core-react/elementseparator/ElementSeparator.scss +93 -0
  24. package/lib/cjs/core-react/icons/IconComponent.scss +19 -0
  25. package/lib/cjs/core-react/icons/SvgPath.scss +15 -0
  26. package/lib/cjs/core-react/icons/WebFontIcon.scss +15 -0
  27. package/lib/cjs/core-react/icons/classes.scss +18 -0
  28. package/lib/cjs/core-react/icons/index.scss +6 -0
  29. package/lib/cjs/core-react/icons/mixins.scss +27 -0
  30. package/lib/cjs/core-react/icons/variables.scss +12 -0
  31. package/lib/cjs/core-react/imagecheckbox/ImageCheckBox.scss +51 -0
  32. package/lib/cjs/core-react/index.scss +18 -0
  33. package/lib/cjs/core-react/inputs/classes.scss +12 -0
  34. package/lib/cjs/core-react/inputs/iconinput/IconInput.scss +33 -0
  35. package/lib/cjs/core-react/inputs/index.scss +9 -0
  36. package/lib/cjs/core-react/inputs/input-label.scss +95 -0
  37. package/lib/cjs/core-react/inputs/input.scss +56 -0
  38. package/lib/cjs/core-react/inputs/numberinput/NumberInput.scss +88 -0
  39. package/lib/cjs/core-react/inputs/variables.scss +41 -0
  40. package/lib/cjs/core-react/layout-variables.scss +15 -0
  41. package/lib/cjs/core-react/listbox/Listbox.scss +54 -0
  42. package/lib/cjs/core-react/loading/LoadingBar.scss +27 -0
  43. package/lib/cjs/core-react/loading/LoadingPrompt.scss +29 -0
  44. package/lib/cjs/core-react/loading/LoadingSpinner.scss +24 -0
  45. package/lib/cjs/core-react/loading/LoadingStatus.scss +20 -0
  46. package/lib/cjs/core-react/loading/index.scss +5 -0
  47. package/lib/cjs/core-react/loading/mixins.scss +57 -0
  48. package/lib/cjs/core-react/messagebox/MessageBox.scss +52 -0
  49. package/lib/cjs/core-react/popup/Popup.scss +239 -0
  50. package/lib/cjs/core-react/radialmenu/RadialMenu.scss +55 -0
  51. package/lib/cjs/core-react/searchbox/SearchBox.scss +45 -0
  52. package/lib/cjs/core-react/settings/SettingsContainer.scss +65 -0
  53. package/lib/cjs/core-react/style/baseline.scss +11 -0
  54. package/lib/cjs/core-react/style/breakpoints.scss +59 -0
  55. package/lib/cjs/core-react/style/colors.scss +77 -0
  56. package/lib/cjs/core-react/style/index.scss +10 -0
  57. package/lib/cjs/core-react/style/mixins.scss +23 -0
  58. package/lib/cjs/core-react/style/opacity.scss +16 -0
  59. package/lib/cjs/core-react/style/themecolors.scss +133 -0
  60. package/lib/cjs/core-react/tabs/classes.scss +9 -0
  61. package/lib/cjs/core-react/tabs/index.scss +5 -0
  62. package/lib/cjs/core-react/tabs/tabs.scss +99 -0
  63. package/lib/cjs/core-react/tabs/vertical.scss +53 -0
  64. package/lib/cjs/core-react/text/FilteredText.scss +8 -0
  65. package/lib/cjs/core-react/text/block.scss +15 -0
  66. package/lib/cjs/core-react/text/body.scss +13 -0
  67. package/lib/cjs/core-react/text/classes.scss +18 -0
  68. package/lib/cjs/core-react/text/disabled.scss +7 -0
  69. package/lib/cjs/core-react/text/index.scss +10 -0
  70. package/lib/cjs/core-react/text/mixins.scss +26 -0
  71. package/lib/cjs/core-react/text/muted.scss +7 -0
  72. package/lib/cjs/core-react/tree/Branch.scss +13 -0
  73. package/lib/cjs/core-react/tree/ExpansionToggle.scss +32 -0
  74. package/lib/cjs/core-react/tree/Node.scss +68 -0
  75. package/lib/cjs/core-react/tree/Placeholder.scss +17 -0
  76. package/lib/cjs/core-react/tree/Tree.scss +22 -0
  77. package/lib/core-react/messagebox/MessageBox.d.ts.map +1 -1
  78. package/lib/core-react/messagebox/MessageBox.js +41 -29
  79. package/lib/core-react/messagebox/MessageBox.js.map +1 -1
  80. package/lib/core-react/messagebox/MessageBox.scss +3 -6
  81. package/lib/core-react/popup/Popup.js +6 -6
  82. package/lib/core-react/popup/Popup.js.map +1 -1
  83. package/lib/esm/core-react/_geometry.scss +70 -0
  84. package/lib/esm/core-react/_helpers.scss +54 -0
  85. package/lib/esm/core-react/_math.scss +13 -0
  86. package/lib/esm/core-react/_scrollbar.scss +57 -0
  87. package/lib/esm/core-react/_typography.scss +44 -0
  88. package/lib/esm/core-react/_z-index.scss +51 -0
  89. package/lib/esm/core-react/autosuggest/AutoSuggest.scss +79 -0
  90. package/lib/esm/core-react/badge/DeprecatedBadge.scss +11 -0
  91. package/lib/esm/core-react/badge/NewBadge.scss +12 -0
  92. package/lib/esm/core-react/badge/TechnicalPreviewBadge.scss +11 -0
  93. package/lib/esm/core-react/base/base.scss +44 -0
  94. package/lib/esm/core-react/base/classes.scss +27 -0
  95. package/lib/esm/core-react/base/index.scss +5 -0
  96. package/lib/esm/core-react/button/UnderlinedButton.scss +29 -0
  97. package/lib/esm/core-react/checklistbox/CheckListBox.scss +22 -0
  98. package/lib/esm/core-react/classes.scss +9 -0
  99. package/lib/esm/core-react/colorthemes.scss +12 -0
  100. package/lib/esm/core-react/colorvariables.scss +139 -0
  101. package/lib/esm/core-react/contextmenu/ContextMenu.scss +226 -0
  102. package/lib/esm/core-react/contextmenu/PopupContextMenu.scss +8 -0
  103. package/lib/esm/core-react/dialog/Dialog.scss +57 -0
  104. package/lib/esm/core-react/elementseparator/ElementSeparator.scss +93 -0
  105. package/lib/esm/core-react/icons/IconComponent.scss +19 -0
  106. package/lib/esm/core-react/icons/SvgPath.scss +15 -0
  107. package/lib/esm/core-react/icons/WebFontIcon.scss +15 -0
  108. package/lib/esm/core-react/icons/classes.scss +18 -0
  109. package/lib/esm/core-react/icons/index.scss +6 -0
  110. package/lib/esm/core-react/icons/mixins.scss +27 -0
  111. package/lib/esm/core-react/icons/variables.scss +12 -0
  112. package/lib/esm/core-react/imagecheckbox/ImageCheckBox.scss +51 -0
  113. package/lib/esm/core-react/index.scss +18 -0
  114. package/lib/esm/core-react/inputs/classes.scss +12 -0
  115. package/lib/esm/core-react/inputs/iconinput/IconInput.scss +33 -0
  116. package/lib/esm/core-react/inputs/index.scss +9 -0
  117. package/lib/esm/core-react/inputs/input-label.scss +95 -0
  118. package/lib/esm/core-react/inputs/input.scss +56 -0
  119. package/lib/esm/core-react/inputs/numberinput/NumberInput.scss +88 -0
  120. package/lib/esm/core-react/inputs/variables.scss +41 -0
  121. package/lib/esm/core-react/layout-variables.scss +15 -0
  122. package/lib/esm/core-react/listbox/Listbox.scss +54 -0
  123. package/lib/esm/core-react/loading/LoadingBar.scss +27 -0
  124. package/lib/esm/core-react/loading/LoadingPrompt.scss +29 -0
  125. package/lib/esm/core-react/loading/LoadingSpinner.scss +24 -0
  126. package/lib/esm/core-react/loading/LoadingStatus.scss +20 -0
  127. package/lib/esm/core-react/loading/index.scss +5 -0
  128. package/lib/esm/core-react/loading/mixins.scss +57 -0
  129. package/lib/esm/core-react/messagebox/MessageBox.scss +52 -0
  130. package/lib/esm/core-react/popup/Popup.scss +239 -0
  131. package/lib/esm/core-react/radialmenu/RadialMenu.scss +55 -0
  132. package/lib/esm/core-react/searchbox/SearchBox.scss +45 -0
  133. package/lib/esm/core-react/settings/SettingsContainer.scss +65 -0
  134. package/lib/esm/core-react/style/baseline.scss +11 -0
  135. package/lib/esm/core-react/style/breakpoints.scss +59 -0
  136. package/lib/esm/core-react/style/colors.scss +77 -0
  137. package/lib/esm/core-react/style/index.scss +10 -0
  138. package/lib/esm/core-react/style/mixins.scss +23 -0
  139. package/lib/esm/core-react/style/opacity.scss +16 -0
  140. package/lib/esm/core-react/style/themecolors.scss +133 -0
  141. package/lib/esm/core-react/tabs/classes.scss +9 -0
  142. package/lib/esm/core-react/tabs/index.scss +5 -0
  143. package/lib/esm/core-react/tabs/tabs.scss +99 -0
  144. package/lib/esm/core-react/tabs/vertical.scss +53 -0
  145. package/lib/esm/core-react/text/FilteredText.scss +8 -0
  146. package/lib/esm/core-react/text/block.scss +15 -0
  147. package/lib/esm/core-react/text/body.scss +13 -0
  148. package/lib/esm/core-react/text/classes.scss +18 -0
  149. package/lib/esm/core-react/text/disabled.scss +7 -0
  150. package/lib/esm/core-react/text/index.scss +10 -0
  151. package/lib/esm/core-react/text/mixins.scss +26 -0
  152. package/lib/esm/core-react/text/muted.scss +7 -0
  153. package/lib/esm/core-react/tree/Branch.scss +13 -0
  154. package/lib/esm/core-react/tree/ExpansionToggle.scss +32 -0
  155. package/lib/esm/core-react/tree/Node.scss +68 -0
  156. package/lib/esm/core-react/tree/Placeholder.scss +17 -0
  157. package/lib/esm/core-react/tree/Tree.scss +22 -0
  158. package/package.json +7 -13
@@ -0,0 +1,51 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "sass:map";
6
+ @use "sass:meta";
7
+ @use "_helpers";
8
+
9
+ @forward "_helpers";
10
+
11
+ // Order matters, last is top-most on screen.
12
+ $uicore-internal-z-index-layers: view-overlay, view-content-dialog,
13
+ content-card-popup, widget-grip, drop-target, dragged-widget, zone-target,
14
+ zone-outline, toolbar-panels, tool-settings-popup, status-overflow-popup,
15
+ status-popup, modal-frontstage-overlay, modal-frontstage, dialog, dialog-popup,
16
+ status-message, tooltip, context-menu-z, dragdrop, cursor-overlay, drag-target,
17
+ drag-preview, backstage-overlay, backstage, keyin-palette-overlay;
18
+
19
+ $uicore-z-index-step: 1000;
20
+
21
+ @function uicore-internal-get-next-z-index-step($counter) {
22
+ @return $counter + $uicore-z-index-step;
23
+ }
24
+
25
+ $uicore-internal-z-index-layer-map: helpers.uicore-map-from-array-with-result-arg(
26
+ $uicore-internal-z-index-layers,
27
+ meta.get-function(uicore-internal-get-next-z-index-step),
28
+ 0
29
+ );
30
+
31
+ // Use this to get z-index value
32
+ @function uicore-get-z-index($layer) {
33
+ @if map.has-key($uicore-internal-z-index-layer-map, $layer) {
34
+ @return map.get($uicore-internal-z-index-layer-map, $layer);
35
+ } @else {
36
+ @error "Failed to get z-index for $layer: #{$layer}";
37
+ }
38
+ }
39
+
40
+ // Use this to add z-index property
41
+ @mixin uicore-z-index($layer) {
42
+ z-index: uicore-get-z-index($layer);
43
+ }
44
+
45
+ // Use this to add a CSS variable for each z-index layer
46
+ @mixin uicore-z-index-variables() {
47
+ @each $layer in $uicore-internal-z-index-layers {
48
+ $z-index: uicore-get-z-index($layer);
49
+ --uicore-z-index-#{$layer}: #{$z-index};
50
+ }
51
+ }
@@ -0,0 +1,79 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "../scrollbar" as *;
6
+ @use "../inputs/variables" as *;
7
+
8
+ .uicore-autosuggest__container {
9
+ position: relative;
10
+ }
11
+
12
+ .uicore-autosuggest__input {
13
+ min-height: 28px !important;
14
+ padding: $uicore-iui-input-padding !important;
15
+ }
16
+
17
+ .uicore-autosuggest__input--focused {
18
+ outline: none;
19
+ }
20
+
21
+ .uicore-autosuggest__input::-ms-clear {
22
+ display: none;
23
+ }
24
+
25
+ .uicore-autosuggest__input--open {
26
+ border-bottom-left-radius: 0;
27
+ border-bottom-right-radius: 0;
28
+ }
29
+
30
+ .uicore-autosuggest__suggestions-container {
31
+ display: none;
32
+ }
33
+
34
+ .uicore-autosuggest__suggestions-container--open {
35
+ display: block;
36
+ position: absolute;
37
+ width: 100%;
38
+ border: 1px solid var(--iui-color-border-foreground);
39
+ border-top: 0;
40
+ background-color: var(--iui-color-background);
41
+ border-bottom-left-radius: 4px;
42
+ border-bottom-right-radius: 4px;
43
+ box-sizing: border-box;
44
+ max-height: 400px;
45
+ overflow-y: auto;
46
+ z-index: 2;
47
+
48
+ @include uicore-touch-scrolling;
49
+ @include uicore-scrollbar();
50
+ }
51
+
52
+ .uicore-autosuggest__suggestions-list {
53
+ margin: 0;
54
+ padding: 0;
55
+ list-style-type: none;
56
+ }
57
+
58
+ .uicore-autosuggest__suggestion {
59
+ cursor: pointer;
60
+ padding: 5px 10px;
61
+ }
62
+
63
+ .uicore-autosuggest__suggestion--highlighted {
64
+ background-color: var(--iui-color-background-accent-muted);
65
+ }
66
+
67
+ .uicore-autosuggest__section-container {
68
+ border-top: 1px dashed var(--iui-color-background-backdrop-hover);
69
+ }
70
+
71
+ .uicore-autosuggest__section-container--first {
72
+ border-top: 0;
73
+ }
74
+
75
+ .uicore-autosuggest__section-title {
76
+ padding: 10px 0 0 10px;
77
+ font-size: var(--iui-font-size-0);
78
+ color: var(--iui-color-background-backdrop-hover);
79
+ }
@@ -0,0 +1,11 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ .core-badge-deprecatedBadge {
6
+ transform: rotate(270deg);
7
+
8
+ svg {
9
+ fill: rgba(0, 0, 0, 0.85);
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ .core-badge-newBadge {
6
+ color: var(--iui-color-text-positive);
7
+ transform: rotate(270deg);
8
+
9
+ svg {
10
+ fill: currentColor;
11
+ }
12
+ }
@@ -0,0 +1,11 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ .core-badge-technicalPreviewBadge {
6
+ transform: rotate(270deg);
7
+
8
+ svg {
9
+ fill: rgba(0, 0, 0, 0.85);
10
+ }
11
+ }
@@ -0,0 +1,44 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "../_scrollbar";
6
+
7
+ @forward "../_scrollbar";
8
+
9
+ @mixin uicore-centered {
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ }
14
+
15
+ @mixin uicore-full-height {
16
+ height: 100%;
17
+ }
18
+
19
+ @mixin uicore-full-width {
20
+ width: 100%;
21
+ }
22
+
23
+ @mixin uicore-full-size {
24
+ @include uicore-full-height;
25
+ @include uicore-full-width;
26
+ }
27
+
28
+ @mixin uicore-fill-centered {
29
+ @include uicore-centered;
30
+ @include uicore-full-size;
31
+ }
32
+
33
+ @mixin uicore-scrollview {
34
+ @include uicore-full-size;
35
+ overflow-y: auto;
36
+
37
+ @include scrollbar.uicore-touch-scrolling;
38
+ @include scrollbar.uicore-scrollbar();
39
+ }
40
+
41
+ @mixin uicore-flex-wrap-container {
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ }
@@ -0,0 +1,27 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "./index" as *;
6
+
7
+ .uicore-centered {
8
+ @include uicore-centered;
9
+ }
10
+ .uicore-full-height {
11
+ @include uicore-full-height;
12
+ }
13
+ .uicore-full-width {
14
+ @include uicore-full-width;
15
+ }
16
+ .uicore-full-size {
17
+ @include uicore-full-size;
18
+ }
19
+ .uicore-fill-centered {
20
+ @include uicore-fill-centered;
21
+ }
22
+ .uicore-scrollview {
23
+ @include uicore-scrollview;
24
+ }
25
+ .uicore-flex-wrap-container {
26
+ @include uicore-flex-wrap-container;
27
+ }
@@ -0,0 +1,5 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @forward "./base";
@@ -0,0 +1,29 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ $color: var(--iui-color-icon-accent);
6
+ $hoverColor: var(--iui-color-text-accent-hover);
7
+
8
+ .core-underlined-button {
9
+ background: transparent;
10
+ color: $color;
11
+ border: 0px solid $color;
12
+ border-bottom-width: 1px;
13
+
14
+ width: fit-content;
15
+
16
+ cursor: pointer;
17
+
18
+ &:hover {
19
+ color: $hoverColor;
20
+ border-color: $hoverColor;
21
+ }
22
+
23
+ &:focus {
24
+ color: $hoverColor;
25
+ border-color: $hoverColor;
26
+ background-color: hsl(var(--iui-opacity-6));
27
+ outline: none;
28
+ }
29
+ }
@@ -0,0 +1,22 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ .core-chk-listbox {
7
+ margin: 0;
8
+ padding: 0;
9
+ list-style: none;
10
+ position: relative;
11
+
12
+ > li > .core-chk-listboxitem-checkbox {
13
+ margin: 4px 0;
14
+ }
15
+
16
+ > .core-chk-listbox-separator {
17
+ height: 1px;
18
+ background: var(--iui-color-border-foreground);
19
+ margin: 4px 0;
20
+ pointer-events: none;
21
+ }
22
+ }
@@ -0,0 +1,9 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "./base/classes" as *;
6
+ @use "./icons/classes" as *;
7
+ @use "./inputs/classes" as *;
8
+ @use "./tabs/classes" as *;
9
+ @use "./text/classes" as *;
@@ -0,0 +1,12 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ // cspell:ignore colorvariables
6
+
7
+ /** @note: This file should only be imported by UiCore.ts.
8
+ * It should NOT be imported by any *.scss or other ui-core files.
9
+ */
10
+
11
+ $background: var(--iui-color-background);
12
+ $accent: var(--iui-color-background-accent);
@@ -0,0 +1,139 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+
6
+ // cspell:ignore mediumgray titlebar toolbutton outoffocus
7
+
8
+ /** @note: This file should only be imported by UiCore.ts.
9
+ * It should NOT be imported by any *.scss or other ui-core files.
10
+ */
11
+
12
+ [data-root-container="appui-root-id"] {
13
+ // NEEDSWORK - Need to deprecate these accessory colors
14
+ --buic-accessory-hollow: rgb(255, 255, 255);
15
+ --buic-accessory-primary: rgb(000, 139, 225);
16
+ --buic-accessory-success: rgb(083, 162, 026);
17
+ --buic-accessory-alert: rgb(211, 010, 010);
18
+ --buic-accessory-warning: rgb(241, 139, 018);
19
+ --buic-accessory-primary-tint: rgb(165, 215, 245);
20
+ --buic-accessory-success-tint: rgb(195, 225, 175);
21
+ --buic-accessory-alert-tint: rgb(239, 169, 169);
22
+ --buic-accessory-warning-tint: rgb(249, 215, 171);
23
+
24
+ --buic-background-1: var(--iui-color-background);
25
+ --buic-background-2: var(--iui-color-background-hover);
26
+ --buic-background-3: var(--iui-color-background-backdrop);
27
+ --buic-background-4: var(--iui-color-background-backdrop-hover);
28
+ --buic-background-5: var(--iui-color-background-disabled);
29
+ --buic-background-editable: var(--iui-color-background);
30
+ --buic-background-primary: var(--iui-color-background-accent);
31
+ --buic-background-tooltip: hsl(var(--iui-color-background-hsl) / 0.9);
32
+ --buic-background-scrollbar: hsl(
33
+ var(--iui-color-foreground-hsl) / var(--iui-opacity-4)
34
+ );
35
+ --buic-background-scrollbar-hover: hsl(
36
+ var(--iui-color-foreground-hsl) / var(--iui-opacity-3)
37
+ );
38
+
39
+ --buic-foreground-body-rgb: var(--iui-color-foreground-hsl);
40
+ --buic-foreground-body: var(--iui-color-text);
41
+
42
+ --buic-foreground-body-reverse-rgb: var(--iui-color-foreground-hsl);
43
+ --buic-foreground-body-reverse: hsl(
44
+ var(--iui-color-background-hsl) / var(--iui-opacity-2)
45
+ );
46
+ --buic-foreground-muted: var(--iui-color-text-muted);
47
+ --buic-foreground-disabled: var(--iui-color-text-disabled);
48
+ --buic-foreground-activehover: var(--iui-color-text);
49
+
50
+ --buic-inputs-border: hsl(
51
+ var(--iui-color-foreground-hsl) / var(--iui-opacity-4)
52
+ );
53
+ --buic-inputs-boxshadow: var(--iui-focus-box-shadow);
54
+ --buic-popup-boxshadow: var(--buic-inputs-boxshadow);
55
+
56
+ --buic-foreground-primary: var(--iui-color-icon-accent);
57
+ --buic-foreground-primary-tone: var(--iui-color-text-accent-hover);
58
+ --buic-foreground-focus: var(--iui-color-text-accent-hover);
59
+ --buic-foreground-focus-border: var(--buic-inputs-border);
60
+ --buic-focus-boxshadow: hsl(
61
+ var(--iui-color-accent-hsl) / var(--iui-opacity-4)
62
+ );
63
+
64
+ // The following two are still in use by DatePicker and there is no itwinui equivalent
65
+ --buic-focus-boxshadow-gradient1: hsl(
66
+ var(--buic-foreground-primary-tone-rgb) / 0
67
+ );
68
+ --buic-focus-boxshadow-gradient2: hsl(
69
+ var(--buic-foreground-primary-rgb) / 0.65
70
+ );
71
+
72
+ --buic-foreground-accessory: var(--iui-color-white);
73
+ --buic-foreground-success: var(--iui-color-text-positive);
74
+ --buic-foreground-positive: var(--iui-color-text-positive);
75
+ --buic-foreground-positive-rgb: var(--iui-color-positive-hsl);
76
+ --buic-foreground-alert: var(--iui-color-text-negative);
77
+ --buic-foreground-negative: var(--iui-color-text-negative);
78
+ --buic-foreground-negative-rgb: var(--iui-color-negative-hsl);
79
+ --buic-foreground-warning: var(--iui-color-text-warning);
80
+ --buic-foreground-warning-rgb: var(--iui-color-warning-hsl);
81
+
82
+ --buic-background-focus-overlay: hsl(var(--iui-opacity-6));
83
+ --buic-background-hover-overlay: hsl(
84
+ var(--iui-color-accent-hsl) / var(--iui-opacity-5)
85
+ );
86
+ --buic-background-active-overlay: hsl(
87
+ var(--iui-color-accent-hsl) / var(--iui-opacity-5)
88
+ );
89
+ --buic-background-pressed-overlay: hsl(var(--iui-color-accent-hsl) / 0.3);
90
+
91
+ --buic-background-card: var(--buic-background-tooltip);
92
+ --buic-background-striped_row: hsl(var(--iui-color-foreground-hsl) / 0.03);
93
+
94
+ /** background.5 */
95
+ --buic-background-titlebar: var(--buic-background-5);
96
+ --buic-background-dialog-stroke: var(--buic-background-5);
97
+ --buic-background-widget-stroke: var(--buic-background-5);
98
+ --buic-background-control-stroke: var(--buic-background-5);
99
+ --buic-background-panel-stroke: var(--buic-background-5);
100
+ --buic-background-toolbutton-stroke: var(--buic-background-5);
101
+
102
+ /** background.4 */
103
+ --buic-background-titlebar-outoffocus: var(--buic-background-4);
104
+ --buic-background-divider: var(--buic-background-4);
105
+ --buic-background-widget-element-stroke: var(--buic-background-4);
106
+ --buic-background-statusbar: var(--buic-background-4);
107
+ --buic-background-table-header: var(--buic-background-4);
108
+ --buic-background-control-stroke-disabled: var(--buic-background-4);
109
+
110
+ /** background.3 */
111
+ --buic-background-tab-inactive: var(--buic-background-3);
112
+ --buic-background-toolbutton-inactive: var(--buic-background-3);
113
+ --buic-background-context-menu: var(--buic-background-3);
114
+ --buic-background-widget-panel: var(--buic-background-3);
115
+ --buic-background-placeholder: var(--buic-background-3);
116
+ --buic-background-control-disabled: var(--buic-background-3);
117
+
118
+ /** background.2 */
119
+ --buic-background-tab-active: var(--buic-background-2);
120
+ --buic-background-dialog: var(--buic-background-2);
121
+ --buic-background-widget: var(--buic-background-2);
122
+ --buic-background-window: var(--buic-background-2);
123
+ --buic-background-toolbar: var(--buic-background-2);
124
+ --buic-background-panel: var(--buic-background-2);
125
+
126
+ /** background.1 */
127
+ --buic-background-control: var(--buic-background-1);
128
+
129
+ // Color variables
130
+ --buic-row-selection: var(--iui-color-background-accent-muted);
131
+ --buic-row-hover: var(--iui-color-background-hover);
132
+
133
+ /* Unused gradient variables, left for backwards compatibility */
134
+ --buic-button-gradient1: rgba(var(--iui-color-foreground-body-invert-rgb), 0);
135
+ --buic-button-gradient2: rgba(
136
+ var(--iui-color-foreground-body-invert-rgb),
137
+ 0.25
138
+ );
139
+ }
@@ -0,0 +1,226 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ @use "../icons/variables" as *;
6
+ @use "../style/baseline" as *;
7
+ @use "../z-index" as *;
8
+
9
+ $uicore-menu-padding: $uicore-bordered-padding;
10
+ $uicore-menu-top-bottom-padding: calc(#{$uicore-menu-padding} * 0.6667);
11
+
12
+ .core-context-menu-global {
13
+ position: fixed;
14
+ width: 0px;
15
+ height: 0px;
16
+
17
+ @include uicore-z-index(context-menu-z);
18
+ }
19
+
20
+ .core-context-menu {
21
+ color: var(--iui-color-text);
22
+ width: 0px;
23
+ height: 0px;
24
+ position: relative;
25
+
26
+ @include uicore-z-index(context-menu-z);
27
+
28
+ &:hover {
29
+ color: var(--iui-color-text-hover);
30
+ cursor: auto;
31
+ }
32
+
33
+ .core-context-menu-container {
34
+ position: absolute;
35
+ border-radius: var(--iui-border-radius-1);
36
+ padding: 4px 0;
37
+ box-shadow: var(--iui-shadow-1);
38
+ background-color: var(--iui-color-background);
39
+ text-overflow: ellipsis;
40
+ min-width: max-content;
41
+ max-width: 350px;
42
+ visibility: hidden;
43
+ transform: scaleY(0);
44
+ display: table;
45
+ border: 1px solid var(--iui-color-border);
46
+
47
+ &.core-context-menu-floating {
48
+ position: fixed;
49
+ }
50
+
51
+ &.core-context-menu-opened {
52
+ visibility: inherit;
53
+ transform-origin: top;
54
+ transform: scaleY(1);
55
+ }
56
+
57
+ &.core-context-menu-center {
58
+ transform: translate(-50%, -50%);
59
+ }
60
+
61
+ &.core-context-menu-right {
62
+ transform: translate(0%, -50%);
63
+ }
64
+
65
+ &.core-context-menu-left {
66
+ transform: translate(-100%, -50%);
67
+ }
68
+
69
+ &.core-context-menu-top {
70
+ transform: translate(-50%, -100%);
71
+
72
+ &.core-context-menu-right {
73
+ transform: translate(0%, -100%);
74
+ }
75
+
76
+ &.core-context-menu-left {
77
+ transform: translate(-100%, -100%);
78
+ }
79
+ }
80
+
81
+ &.core-context-menu-bottom {
82
+ transform: translate(-50%, 0%);
83
+
84
+ &.core-context-menu-right {
85
+ transform: translate(0%, 0%);
86
+ }
87
+
88
+ &.core-context-menu-left {
89
+ transform: translate(-100%, 0%);
90
+ }
91
+ }
92
+
93
+ .core-context-menu-item {
94
+ display: flex;
95
+ cursor: default;
96
+ padding: $uicore-menu-top-bottom-padding $uicore-menu-padding;
97
+ width: calc(100% - 2 * #{$uicore-menu-padding});
98
+ align-items: center;
99
+ position: relative;
100
+ box-sizing: content-box;
101
+
102
+ &:hover {
103
+ background-color: var(--iui-color-background-hover);
104
+ }
105
+
106
+ &.core-context-menu-is-selected {
107
+ background-color: var(--iui-color-background-accent-muted);
108
+ }
109
+
110
+ &.core-context-menu-disabled {
111
+ color: var(--iui-color-text-disabled);
112
+ }
113
+
114
+ &.core-context-menu-hidden {
115
+ display: none;
116
+ }
117
+
118
+ > .core-context-menu-icon {
119
+ flex-shrink: 0;
120
+ flex-grow: 0;
121
+ width: $uicore-icons-small;
122
+ height: var(--iui-size-l);
123
+ font-size: var(--iui-font-size-2);
124
+ line-height: var(--iui-size-l);
125
+ text-align: center;
126
+ margin-right: $uicore-unbordered-padding;
127
+ opacity: var(--iui-opacity-2);
128
+ display: flex;
129
+ align-items: center;
130
+
131
+ &.core-context-menu-icon-right {
132
+ margin-left: $uicore-unbordered-padding;
133
+ margin-right: 0;
134
+ }
135
+ }
136
+
137
+ > .core-context-menu-content {
138
+ flex-shrink: 0;
139
+ flex-grow: 1;
140
+ font-size: var(--iui-font-size-1);
141
+ text-align: left;
142
+ }
143
+
144
+ > .core-context-menu-badge {
145
+ position: absolute;
146
+ top: 0;
147
+ left: 0;
148
+ }
149
+
150
+ &:focus {
151
+ outline: none;
152
+ }
153
+ }
154
+
155
+ &:focus {
156
+ border: 1px solid var(--iui-color-background-backdrop-hover);
157
+ box-shadow: var(--iui-shadow-1);
158
+ outline: 0px;
159
+
160
+ > .core-context-menu-item.is-selected,
161
+ > .context-submenu > .core-context-menu-item.is-selected {
162
+ // .is-selected being applied on hover, overriding with hover color
163
+ background-color: var(--iui-color-background-hover);
164
+ }
165
+ }
166
+
167
+ .core-context-submenu {
168
+ display: flex;
169
+
170
+ &.core-context-menu-top {
171
+ flex-direction: column;
172
+ align-items: center;
173
+ }
174
+
175
+ &.core-context-menu-left {
176
+ flex-direction: row-reverse;
177
+ align-items: center;
178
+ }
179
+
180
+ &.core-context-menu-right {
181
+ flex-direction: row;
182
+ align-items: center;
183
+ }
184
+
185
+ &.core-context-menu-center {
186
+ flex-direction: column;
187
+ align-items: center;
188
+ }
189
+
190
+ &.core-context-menu-top.core-context-menu-left {
191
+ flex-direction: column;
192
+ align-items: flex-start;
193
+ }
194
+
195
+ &.core-context-menu-top.core-context-menu-right {
196
+ flex-direction: row;
197
+ align-items: flex-end;
198
+ }
199
+
200
+ &.core-context-menu-bottom.core-context-menu-left {
201
+ flex-direction: row-reverse;
202
+ align-items: flex-start;
203
+ }
204
+
205
+ &.core-context-menu-bottom.core-context-menu-right {
206
+ flex-direction: row;
207
+ align-items: flex-start;
208
+ }
209
+
210
+ .core-context-submenu-container .core-context-submenu-arrow {
211
+ margin-left: var(--iui-size-s);
212
+ margin-top: var(--iui-size-3xs);
213
+ margin-bottom: calc(var(--iui-size-3xs) * -1);
214
+ }
215
+ }
216
+ }
217
+
218
+ .core-context-menu-divider {
219
+ border-bottom: 1px solid var(--iui-color-border-foreground);
220
+ height: 0px;
221
+ }
222
+
223
+ .core-context-submenu-popup {
224
+ transform: translateY(-5px); // Compensate for the vertical padding
225
+ }
226
+ }