@itwin/itwinui-css 1.0.0-dev.0 → 1.0.0-dev.1

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 (239) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/css/alert.css +16 -27
  3. package/css/all.css +723 -817
  4. package/css/avatar.css +1 -1
  5. package/css/blockquote.css +2 -2
  6. package/css/breadcrumbs.css +19 -13
  7. package/css/button.css +30 -56
  8. package/css/carousel.css +5 -4
  9. package/css/checkbox.css +10 -7
  10. package/css/code.css +1 -0
  11. package/css/color-picker.css +10 -10
  12. package/css/date-picker.css +1 -1
  13. package/css/dialog.css +12 -9
  14. package/css/expandable-block.css +8 -19
  15. package/css/fieldset.css +2 -2
  16. package/css/file-upload.css +11 -20
  17. package/css/footer.css +28 -28
  18. package/css/global.css +65 -65
  19. package/css/header.css +12 -6
  20. package/css/information-panel.css +12 -7
  21. package/css/input.css +18 -10
  22. package/css/location-marker.css +8 -2
  23. package/css/menu.css +14 -7
  24. package/css/non-ideal-state.css +5 -5
  25. package/css/progress-indicator.css +10 -6
  26. package/css/radio-tile.css +19 -10
  27. package/css/radio.css +10 -7
  28. package/css/select.css +25 -19
  29. package/css/side-navigation.css +14 -19
  30. package/css/skip-to-content.css +2 -2
  31. package/css/slider.css +108 -40
  32. package/css/stepper.css +4 -4
  33. package/css/table.css +28 -28
  34. package/css/tabs.css +17 -10
  35. package/css/tag.css +5 -5
  36. package/css/text.css +7 -7
  37. package/css/tile.css +45 -69
  38. package/css/time-picker.css +3 -3
  39. package/css/toast.css +13 -11
  40. package/css/toggle-switch.css +5 -5
  41. package/css/tree.css +13 -20
  42. package/css/utils.css +104 -44
  43. package/css/workflow-diagram.css +1 -1
  44. package/package.json +8 -11
  45. package/css/icon.css +0 -117
  46. package/css/textarea.css +0 -96
  47. package/scss/alert/alert.scss +0 -89
  48. package/scss/alert/classes.scss +0 -33
  49. package/scss/alert/index.scss +0 -3
  50. package/scss/anchor/anchor.scss +0 -78
  51. package/scss/anchor/classes.scss +0 -11
  52. package/scss/anchor/index.scss +0 -3
  53. package/scss/avatar/avatar-sizes.scss +0 -23
  54. package/scss/avatar/avatar.scss +0 -215
  55. package/scss/avatar/classes.scss +0 -27
  56. package/scss/avatar/index.scss +0 -3
  57. package/scss/backdrop/backdrop.scss +0 -27
  58. package/scss/backdrop/classes.scss +0 -7
  59. package/scss/backdrop/index.scss +0 -3
  60. package/scss/badge/badge.scss +0 -34
  61. package/scss/badge/classes.scss +0 -7
  62. package/scss/badge/index.scss +0 -3
  63. package/scss/blockquote/blockquote.scss +0 -26
  64. package/scss/blockquote/classes.scss +0 -7
  65. package/scss/blockquote/index.scss +0 -3
  66. package/scss/breadcrumbs/breadcrumbs.scss +0 -119
  67. package/scss/breadcrumbs/classes.scss +0 -31
  68. package/scss/breadcrumbs/index.scss +0 -3
  69. package/scss/button/borderless.scss +0 -36
  70. package/scss/button/button-group.scss +0 -118
  71. package/scss/button/button.scss +0 -119
  72. package/scss/button/classes.scss +0 -80
  73. package/scss/button/default.scss +0 -51
  74. package/scss/button/idea.scss +0 -12
  75. package/scss/button/index.scss +0 -9
  76. package/scss/button/split-button.scss +0 -45
  77. package/scss/button/variant.scss +0 -44
  78. package/scss/carousel/carousel.scss +0 -113
  79. package/scss/carousel/classes.scss +0 -15
  80. package/scss/carousel/index.scss +0 -3
  81. package/scss/checkbox/checkbox.scss +0 -154
  82. package/scss/checkbox/classes.scss +0 -7
  83. package/scss/checkbox/index.scss +0 -3
  84. package/scss/classes.scss +0 -52
  85. package/scss/code/classes.scss +0 -11
  86. package/scss/code/code.scss +0 -16
  87. package/scss/code/codeblock.scss +0 -59
  88. package/scss/code/index.scss +0 -4
  89. package/scss/color-picker/classes.scss +0 -43
  90. package/scss/color-picker/color-picker.scss +0 -241
  91. package/scss/color-picker/index.scss +0 -3
  92. package/scss/date-picker/classes.scss +0 -47
  93. package/scss/date-picker/date-picker.scss +0 -246
  94. package/scss/date-picker/index.scss +0 -3
  95. package/scss/dialog/classes.scss +0 -48
  96. package/scss/dialog/dialog.scss +0 -178
  97. package/scss/dialog/index.scss +0 -3
  98. package/scss/expandable-block/block.scss +0 -165
  99. package/scss/expandable-block/classes.scss +0 -7
  100. package/scss/expandable-block/index.scss +0 -3
  101. package/scss/fieldset/classes.scss +0 -7
  102. package/scss/fieldset/fieldset.scss +0 -29
  103. package/scss/fieldset/index.scss +0 -3
  104. package/scss/file-upload/classes.scss +0 -7
  105. package/scss/file-upload/file-upload.scss +0 -80
  106. package/scss/file-upload/index.scss +0 -3
  107. package/scss/footer/classes.scss +0 -7
  108. package/scss/footer/footer.scss +0 -55
  109. package/scss/footer/index.scss +0 -3
  110. package/scss/header/classes.scss +0 -79
  111. package/scss/header/header-buttons.scss +0 -316
  112. package/scss/header/header.scss +0 -75
  113. package/scss/header/index.scss +0 -4
  114. package/scss/icon/classes.scss +0 -27
  115. package/scss/icon/icon.scss +0 -65
  116. package/scss/icon/index.scss +0 -3
  117. package/scss/index.scss +0 -50
  118. package/scss/information-panel/classes.scss +0 -27
  119. package/scss/information-panel/index.scss +0 -3
  120. package/scss/information-panel/information-panel.scss +0 -215
  121. package/scss/input/classes.scss +0 -15
  122. package/scss/input/index.scss +0 -4
  123. package/scss/input/input-with-icon.scss +0 -37
  124. package/scss/input/input.scss +0 -70
  125. package/scss/keyboard/classes.scss +0 -7
  126. package/scss/keyboard/index.scss +0 -3
  127. package/scss/keyboard/keyboard.scss +0 -29
  128. package/scss/location-marker/classes.scss +0 -15
  129. package/scss/location-marker/data-rich.scss +0 -49
  130. package/scss/location-marker/default.scss +0 -19
  131. package/scss/location-marker/index.scss +0 -6
  132. package/scss/location-marker/location-marker.scss +0 -11
  133. package/scss/location-marker/me.scss +0 -29
  134. package/scss/menu/classes.scss +0 -21
  135. package/scss/menu/index.scss +0 -3
  136. package/scss/menu/menu.scss +0 -185
  137. package/scss/non-ideal-state/classes.scss +0 -7
  138. package/scss/non-ideal-state/index.scss +0 -3
  139. package/scss/non-ideal-state/non-ideal-state.scss +0 -56
  140. package/scss/progress-indicator/classes.scss +0 -31
  141. package/scss/progress-indicator/index.scss +0 -5
  142. package/scss/progress-indicator/linear.scss +0 -108
  143. package/scss/progress-indicator/overlay.scss +0 -51
  144. package/scss/progress-indicator/radial.scss +0 -155
  145. package/scss/radio/classes.scss +0 -7
  146. package/scss/radio/index.scss +0 -3
  147. package/scss/radio/radio.scss +0 -18
  148. package/scss/radio-tile/classes.scss +0 -31
  149. package/scss/radio-tile/index.scss +0 -3
  150. package/scss/radio-tile/radio-tile.scss +0 -167
  151. package/scss/select/classes.scss +0 -27
  152. package/scss/select/index.scss +0 -3
  153. package/scss/select/select.scss +0 -124
  154. package/scss/side-navigation/classes.scss +0 -15
  155. package/scss/side-navigation/index.scss +0 -3
  156. package/scss/side-navigation/side-navigation.scss +0 -202
  157. package/scss/skip-to-content/classes.scss +0 -7
  158. package/scss/skip-to-content/index.scss +0 -3
  159. package/scss/skip-to-content/skip-to-content.scss +0 -40
  160. package/scss/slider/classes.scss +0 -27
  161. package/scss/slider/index.scss +0 -3
  162. package/scss/slider/slider.scss +0 -135
  163. package/scss/stepper/classes.scss +0 -32
  164. package/scss/stepper/index.scss +0 -3
  165. package/scss/stepper/stepper.scss +0 -151
  166. package/scss/style/baseline.scss +0 -4
  167. package/scss/style/color.scss +0 -39
  168. package/scss/style/elevation.scss +0 -11
  169. package/scss/style/global-variables.scss +0 -23
  170. package/scss/style/global.scss +0 -69
  171. package/scss/style/icon-sizes.scss +0 -14
  172. package/scss/style/index.scss +0 -11
  173. package/scss/style/space.scss +0 -11
  174. package/scss/style/speed.scss +0 -8
  175. package/scss/style/theme.scss +0 -443
  176. package/scss/style/typography.scss +0 -55
  177. package/scss/surface/classes.scss +0 -7
  178. package/scss/surface/index.scss +0 -3
  179. package/scss/surface/surface.scss +0 -17
  180. package/scss/table/classes.scss +0 -64
  181. package/scss/table/column-filter.scss +0 -34
  182. package/scss/table/index.scss +0 -6
  183. package/scss/table/paginator.scss +0 -79
  184. package/scss/table/sizes.scss +0 -31
  185. package/scss/table/table-densities.scss +0 -11
  186. package/scss/table/table.scss +0 -482
  187. package/scss/tabs/borderless.scss +0 -59
  188. package/scss/tabs/classes.scss +0 -44
  189. package/scss/tabs/default.scss +0 -89
  190. package/scss/tabs/index.scss +0 -6
  191. package/scss/tabs/pill.scss +0 -38
  192. package/scss/tabs/tabs.scss +0 -192
  193. package/scss/tag/classes.scss +0 -30
  194. package/scss/tag/index.scss +0 -3
  195. package/scss/tag/tag.scss +0 -89
  196. package/scss/text/classes.scss +0 -40
  197. package/scss/text/index.scss +0 -5
  198. package/scss/text/mixins.scss +0 -43
  199. package/scss/text/muted.scss +0 -7
  200. package/scss/text/skeleton.scss +0 -43
  201. package/scss/textarea/classes.scss +0 -7
  202. package/scss/textarea/index.scss +0 -3
  203. package/scss/textarea/textarea.scss +0 -15
  204. package/scss/tile/classes.scss +0 -51
  205. package/scss/tile/index.scss +0 -3
  206. package/scss/tile/tile.scss +0 -340
  207. package/scss/time-picker/classes.scss +0 -16
  208. package/scss/time-picker/index.scss +0 -3
  209. package/scss/time-picker/time-picker.scss +0 -63
  210. package/scss/toast/categories.scss +0 -22
  211. package/scss/toast/classes.scss +0 -98
  212. package/scss/toast/index.scss +0 -4
  213. package/scss/toast/toast.scss +0 -70
  214. package/scss/toggle-switch/classes.scss +0 -11
  215. package/scss/toggle-switch/index.scss +0 -3
  216. package/scss/toggle-switch/toggle-switch.scss +0 -203
  217. package/scss/tooltip/classes.scss +0 -24
  218. package/scss/tooltip/index.scss +0 -3
  219. package/scss/tooltip/tooltip.scss +0 -40
  220. package/scss/tree/classes.scss +0 -19
  221. package/scss/tree/index.scss +0 -3
  222. package/scss/tree/tree.scss +0 -126
  223. package/scss/utils/classes.scss +0 -6
  224. package/scss/utils/index.scss +0 -6
  225. package/scss/utils/input-container/classes.scss +0 -39
  226. package/scss/utils/input-container/index.scss +0 -3
  227. package/scss/utils/input-container/input-container.scss +0 -285
  228. package/scss/utils/mixins.scss +0 -171
  229. package/scss/utils/notification-marker/classes.scss +0 -9
  230. package/scss/utils/notification-marker/index.scss +0 -3
  231. package/scss/utils/notification-marker/notification-marker.scss +0 -55
  232. package/scss/utils/popover/classes.scss +0 -7
  233. package/scss/utils/popover/index.scss +0 -3
  234. package/scss/utils/popover/popover.scss +0 -21
  235. package/scss/variables.scss +0 -3
  236. package/scss/workflow-diagram/classes.scss +0 -15
  237. package/scss/workflow-diagram/index.scss +0 -3
  238. package/scss/workflow-diagram/workflow-diagram.scss +0 -64
  239. package/src/index.scss +0 -50
@@ -1,26 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
- @import '../utils/index';
5
-
6
- @mixin iui-blockquote {
7
- @include iui-reset;
8
- display: block;
9
- position: relative;
10
- padding: $iui-baseline $iui-m;
11
- margin: $iui-baseline 0;
12
- text-align: justify;
13
- box-shadow: $iui-elevation-2;
14
- border-radius: $iui-border-radius;
15
- background-color: var(--iui-color-background-1);
16
- border-left: $iui-s solid var(--iui-color-foreground-primary);
17
-
18
- > footer {
19
- text-align: right;
20
- color: var(--iui-text-color-muted);
21
-
22
- > cite {
23
- font-style: normal;
24
- }
25
- }
26
- }
@@ -1,7 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './index';
4
-
5
- .iui-blockquote {
6
- @include iui-blockquote;
7
- }
@@ -1,3 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './blockquote';
@@ -1,119 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
- @import '../anchor/index';
5
- @import '../button/borderless';
6
- @import '../utils/index';
7
-
8
- @mixin iui-breadcrumbs($breadcrumbs-height: $iui-component-height) {
9
- @include iui-reset;
10
- display: flex;
11
- align-items: center;
12
- height: $breadcrumbs-height;
13
- }
14
-
15
- @mixin iui-breadcrumbs-list {
16
- @include iui-reset;
17
- display: flex;
18
- align-items: center;
19
- list-style-type: none;
20
- user-select: none;
21
- height: 100%;
22
- }
23
-
24
- @mixin iui-breadcrumbs-item {
25
- display: flex;
26
- align-items: center;
27
- height: 100%;
28
-
29
- > * {
30
- max-width: 26ch;
31
- }
32
- }
33
-
34
- @mixin iui-breadcrumbs-item-overrides {
35
- > * {
36
- padding: 0 $iui-s;
37
- overflow: hidden;
38
- white-space: nowrap;
39
- text-overflow: ellipsis;
40
-
41
- &:not(.iui-button) {
42
- color: var(--iui-text-color);
43
- }
44
- }
45
-
46
- > :any-link {
47
- @include iui-anchor;
48
- box-sizing: border-box;
49
- line-height: $iui-component-height;
50
-
51
- &:focus {
52
- outline-offset: -1px;
53
- }
54
- }
55
-
56
- .iui-button {
57
- &.iui-button {
58
- @include iui-button-borderless;
59
- border: none;
60
- }
61
-
62
- > span {
63
- overflow: hidden;
64
- white-space: nowrap;
65
- text-overflow: ellipsis;
66
- }
67
-
68
- &:not([aria-current]) {
69
- &,
70
- &:hover,
71
- &:active {
72
- --_iui-button-text-color: var(--iui-color-foreground-primary);
73
- }
74
- }
75
- }
76
- }
77
-
78
- @mixin iui-breadcrumbs-text {
79
- padding: 0 $iui-s;
80
- overflow: hidden;
81
- white-space: nowrap;
82
- text-overflow: ellipsis;
83
- line-height: $iui-component-height;
84
-
85
- @at-root a#{&} {
86
- @include iui-anchor;
87
-
88
- &:focus {
89
- outline-offset: -1px;
90
- }
91
- }
92
- }
93
-
94
- @mixin iui-breadcrumbs-button {
95
- @include iui-button;
96
- @include iui-button-borderless;
97
- padding: 0;
98
- border: none;
99
- color: var(--iui-color-foreground-primary);
100
-
101
- &[aria-current] {
102
- color: var(--iui-text-color);
103
- }
104
- }
105
-
106
- @mixin iui-breadcrumbs-separator {
107
- display: flex;
108
- margin: 0 $iui-xxs;
109
-
110
- svg {
111
- width: $iui-icons-small;
112
- height: $iui-icons-small;
113
- display: flex; // needed for vertical alignment of webcomponents
114
- fill: var(--iui-icons-color);
115
- @media (forced-colors: active) {
116
- fill: CanvasText;
117
- }
118
- }
119
- }
@@ -1,31 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './index';
4
-
5
- .iui-breadcrumbs {
6
- @include iui-breadcrumbs;
7
- }
8
-
9
- .iui-breadcrumbs-list {
10
- @include iui-breadcrumbs-list;
11
- }
12
-
13
- .iui-breadcrumbs-item {
14
- @include iui-breadcrumbs-item;
15
- }
16
-
17
- .iui-breadcrumbs-item-overrides {
18
- @include iui-breadcrumbs-item-overrides;
19
- }
20
-
21
- .iui-breadcrumbs-text {
22
- @include iui-breadcrumbs-text;
23
- }
24
-
25
- .iui-breadcrumbs-button {
26
- @include iui-breadcrumbs-button;
27
- }
28
-
29
- .iui-breadcrumbs-separator {
30
- @include iui-breadcrumbs-separator;
31
- }
@@ -1,3 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './breadcrumbs';
@@ -1,36 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
- @import './button';
5
-
6
- @mixin iui-button-borderless {
7
- --_iui-button-text-color: var(--iui-text-color);
8
- --_iui-button-background-color: transparent;
9
- --_iui-button-border-color: transparent;
10
- --_iui-button-icon-margin-x: #{$iui-component-offset};
11
- @include iui-button-size(medium, borderless);
12
-
13
- &:where(:hover, :active) {
14
- --_iui-button-text-color: var(--iui-color-foreground-body);
15
- --_iui-button-background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-6));
16
- }
17
-
18
- &:where(:focus) {
19
- outline-offset: -1px;
20
- outline-width: 1px;
21
- }
22
-
23
- &:where([disabled], :disabled, [aria-disabled='true']) {
24
- --_iui-button-text-color: var(--iui-text-color-placeholder);
25
- --_iui-button-background-color: transparent;
26
- --_iui-button-border-color: transparent;
27
- }
28
- }
29
-
30
- @mixin iui-button-borderless-active {
31
- --_iui-button-background-color: rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6));
32
-
33
- &:where([disabled], :disabled, [aria-disabled='true']) {
34
- --_iui-button-background-color: rgba(var(--iui-color-foreground-body-rgb), 0.05);
35
- }
36
- }
@@ -1,118 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
-
5
- /// Mixin for button group or input+button combo group.
6
- /// @arg $orientation must be one of: horizontal, vertical
7
- /// Note: Vertical button-group should be used for icon buttons only.
8
- @mixin iui-button-group($orientation: horizontal) {
9
- display: inline-flex;
10
- align-items: center;
11
- isolation: isolate;
12
- pointer-events: none;
13
-
14
- @if $orientation != 'horizontal' {
15
- flex-direction: column;
16
- max-height: 100%;
17
- }
18
-
19
- $childZindexSelector: '.iui-input-container, .iui-button, .iui-input:where(:not(.iui-input-container .iui-input))';
20
- $childBorderSelector: '.iui-input, .iui-button:where(:not([data-iui-variant="borderless"]))';
21
- $disabledSelector: '&:disabled, &.iui-disabled, &[aria-disabled="true"]';
22
-
23
- > * {
24
- display: flex;
25
-
26
- > * {
27
- pointer-events: all;
28
- }
29
-
30
- #{$childZindexSelector} {
31
- position: relative;
32
-
33
- // Adds stripe to active button
34
- @if $orientation == 'horizontal' {
35
- --_iui-button-active-stripe-inset: #{$iui-xxs} #{$iui-xxs} calc(100% - #{$iui-xs});
36
- } @else {
37
- --_iui-button-active-stripe-inset: #{$iui-xxs} calc(100% - #{$iui-xs}) #{$iui-xxs} #{$iui-xxs};
38
- }
39
-
40
- &:hover {
41
- z-index: 1;
42
- }
43
-
44
- #{$disabledSelector} {
45
- z-index: -1;
46
- }
47
-
48
- &:focus,
49
- &:focus-within {
50
- &,
51
- &:where([aria-disabled='true']) {
52
- z-index: 2;
53
- }
54
- }
55
- }
56
-
57
- #{$childBorderSelector} {
58
- // Reset border radius
59
- border-radius: 0;
60
-
61
- transition-duration: 0ms; // disable exit animation to avoid border flicker
62
-
63
- &:hover,
64
- &:focus {
65
- transition-duration: $iui-speed-fast; // re-enable enter animation
66
- }
67
- }
68
-
69
- // Add rounded corners to first and last items
70
- &:first-child {
71
- #{$childBorderSelector} {
72
- border-top-left-radius: $iui-border-radius;
73
-
74
- @if $orientation == 'horizontal' {
75
- border-bottom-left-radius: $iui-border-radius;
76
- } @else {
77
- border-top-right-radius: $iui-border-radius;
78
- }
79
- }
80
- }
81
-
82
- &:last-child {
83
- #{$childBorderSelector} {
84
- border-bottom-right-radius: $iui-border-radius;
85
-
86
- @if $orientation == 'horizontal' {
87
- border-top-right-radius: $iui-border-radius;
88
- } @else {
89
- border-bottom-left-radius: $iui-border-radius;
90
- }
91
- }
92
- }
93
-
94
- // Use negative margin to make adjacent borders overlap
95
- + * {
96
- @if $orientation == 'horizontal' {
97
- margin-left: -1px;
98
- } @else {
99
- margin-top: -1px;
100
- }
101
- }
102
-
103
- // Add slight border between disabled items
104
- &:not(:first-child) :not([data-iui-variant='borderless']) {
105
- #{$disabledSelector} {
106
- @if $orientation == 'horizontal' {
107
- border-left-color: var(--iui-color-background-4);
108
- } @else {
109
- border-top-color: var(--iui-color-background-4);
110
- }
111
- }
112
- }
113
- }
114
- }
115
-
116
- @mixin iui-button-group-overflow-x {
117
- width: 100%;
118
- }
@@ -1,119 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
-
5
- $iui-button-padding: $iui-xs * 4;
6
- $iui-button-padding-small: $iui-xs * 2;
7
- $iui-button-padding-large: $iui-xs * 6;
8
-
9
- @mixin iui-button {
10
- @include iui-reset;
11
- font-family: inherit;
12
- display: inline-flex;
13
- align-items: center;
14
- vertical-align: middle;
15
- justify-content: center;
16
- position: relative;
17
- border-radius: $iui-border-radius;
18
- line-height: $iui-line-height;
19
- font-size: $iui-font-size;
20
- font-weight: $iui-font-weight-normal;
21
- user-select: none;
22
- cursor: pointer;
23
- white-space: nowrap;
24
- border: 1px solid var(--_iui-button-border-color);
25
- background: var(--_iui-button-background-color);
26
- color: var(--_iui-button-text-color);
27
- gap: var(--_iui-button-gap);
28
- height: var(--_iui-button-height);
29
- padding-inline: var(--_iui-button-padding-inline);
30
- transition: background-color $iui-speed-fast ease-out, border-color $iui-speed-fast ease-out;
31
- -webkit-tap-highlight-color: transparent;
32
- text-decoration: none;
33
- @include iui-button-size;
34
- @include iui-focus;
35
- }
36
-
37
- @mixin iui-button-icon {
38
- width: $iui-icons-default;
39
- height: $iui-icons-default;
40
- transition: fill $iui-speed-fast ease-out;
41
- fill: currentColor;
42
-
43
- &:only-child {
44
- margin-left: var(--_iui-button-icon-margin-x);
45
- margin-right: var(--_iui-button-icon-margin-x);
46
- }
47
- }
48
-
49
- @mixin iui-button-active {
50
- --_iui-button-active-stripe-inset: initial;
51
- --_iui-button-active-stripe-color: var(--iui-color-foreground-primary);
52
- --_iui-button-text-color: var(--iui-color-foreground-primary);
53
-
54
- // Shows active stripe only if --_iui-button-active-stripe-inset is set (from outside)
55
- &::after {
56
- content: '';
57
- position: absolute;
58
- inset: var(--_iui-button-active-stripe-inset);
59
- background-color: var(--_iui-button-active-stripe-color);
60
- }
61
-
62
- &[disabled],
63
- &:disabled,
64
- &[aria-disabled='true'] {
65
- --_iui-button-active-stripe-color: var(--iui-text-color-placeholder);
66
- --_iui-button-text-color: var(--iui-text-color-placeholder);
67
- }
68
- }
69
-
70
- @mixin iui-button-dropdown($size: default) {
71
- @if $size == default {
72
- --_iui-button-padding-inline: #{$iui-button-padding} #{$iui-s};
73
- }
74
-
75
- @if $size == small {
76
- --_iui-button-padding-inline: #{$iui-button-padding-small} #{$iui-xs};
77
- }
78
-
79
- @if $size == large {
80
- --_iui-button-padding-inline: #{$iui-button-padding-large} #{$iui-sm};
81
- }
82
- }
83
-
84
- /// Mixin for applying padding and margins to various button sizes.
85
- /// @arg size - must be one of: small, medium, large
86
- /// @arg styleType - must be one of: default, borderless
87
- @mixin iui-button-size($size: medium, $styleType: default) {
88
- @if $size == medium {
89
- --_iui-button-gap: #{$iui-s};
90
- --_iui-button-height: #{$iui-component-height};
91
- --_iui-button-padding-inline: #{$iui-button-padding};
92
-
93
- @if $styleType == borderless {
94
- --_iui-button-padding-inline: #{$iui-s};
95
- }
96
- }
97
-
98
- @if $size == small {
99
- --_iui-button-gap: #{$iui-xs};
100
- --_iui-button-height: #{$iui-component-height-small};
101
- --_iui-button-padding-inline: #{$iui-button-padding-small};
102
-
103
- @if $styleType == borderless {
104
- --_iui-button-padding-inline: #{$iui-xxs};
105
- }
106
- }
107
-
108
- @if $size == large {
109
- font-size: $iui-font-size-leading;
110
-
111
- --_iui-button-gap: #{$iui-sm};
112
- --_iui-button-height: #{$iui-component-height-large};
113
- --_iui-button-padding-inline: #{$iui-button-padding-large};
114
-
115
- @if $styleType == borderless {
116
- --_iui-button-padding-inline: #{$iui-sm};
117
- }
118
- }
119
- }
@@ -1,80 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './index';
4
-
5
- .iui-button {
6
- @include iui-button;
7
- @include iui-button-default;
8
-
9
- &[data-iui-size='small'] {
10
- @include iui-button-size(small);
11
- }
12
-
13
- &[data-iui-size='large'] {
14
- @include iui-button-size(large);
15
- }
16
-
17
- &[data-iui-variant='borderless'] {
18
- @include iui-button-borderless;
19
-
20
- &[data-iui-size='small'] {
21
- @include iui-button-size(small, borderless);
22
- }
23
-
24
- &[data-iui-size='large'] {
25
- @include iui-button-size(large, borderless);
26
- }
27
- }
28
-
29
- &[data-iui-active='true'] {
30
- @include iui-button-default-active;
31
-
32
- &[data-iui-variant='borderless'] {
33
- @include iui-button-borderless-active;
34
- }
35
- }
36
-
37
- &[data-iui-variant='high-visibility'] {
38
- @include iui-button-variant(high-visibility);
39
- }
40
-
41
- &[data-iui-variant='cta'] {
42
- @include iui-button-variant(cta);
43
- }
44
-
45
- &[data-iui-variant='idea'] {
46
- @include iui-button-idea;
47
- }
48
- }
49
-
50
- .iui-button-icon {
51
- @include iui-button-icon;
52
- }
53
-
54
- .iui-button-dropdown {
55
- @include iui-button-dropdown;
56
-
57
- &[data-iui-size='small'] {
58
- @include iui-button-dropdown(small);
59
- }
60
-
61
- &[data-iui-size='large'] {
62
- @include iui-button-dropdown(large);
63
- }
64
- }
65
-
66
- .iui-button-split {
67
- @include iui-button-split;
68
- }
69
-
70
- .iui-button-group {
71
- @include iui-button-group;
72
- }
73
-
74
- .iui-button-group-vertical {
75
- @include iui-button-group(vertical);
76
- }
77
-
78
- .iui-button-group-overflow-x {
79
- @include iui-button-group-overflow-x;
80
- }
@@ -1,51 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
- @import '../utils/index';
5
-
6
- @mixin iui-button-default {
7
- --_iui-button-text-color: var(--iui-text-color);
8
- --_iui-button-background-color: var(--iui-color-background-1);
9
- --_iui-button-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
10
-
11
- &:hover,
12
- &:active {
13
- --_iui-button-text-color: var(--iui-color-foreground-body);
14
- --_iui-button-background-color: var(--iui-color-background-1-overlay);
15
- --_iui-button-border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-1));
16
- @include iui-notification-marker-hover;
17
- }
18
-
19
- &:focus {
20
- outline-offset: -2px;
21
- outline-width: 2px;
22
- }
23
-
24
- &[disabled],
25
- &:disabled,
26
- &[aria-disabled='true'] {
27
- --_iui-button-text-color: var(--iui-text-color-placeholder);
28
- --_iui-button-background-color: var(--iui-color-background-disabled);
29
- --_iui-button-border-color: var(--iui-color-background-disabled);
30
-
31
- cursor: not-allowed;
32
- outline-offset: -1px;
33
- outline-width: 1px;
34
- outline-color: var(--iui-color-foreground-primary);
35
- }
36
- }
37
-
38
- @mixin iui-button-default-active {
39
- @include iui-button-active;
40
- --_iui-button-background-color: linear-gradient(
41
- rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6)),
42
- rgba(var(--iui-color-foreground-primary-rgb), var(--iui-opacity-6))
43
- ),
44
- linear-gradient(var(--iui-color-background-1), var(--iui-color-background-1));
45
-
46
- &[disabled],
47
- &:disabled,
48
- &[aria-disabled='true'] {
49
- --_iui-button-background-color: var(--iui-color-background-disabled);
50
- }
51
- }
@@ -1,12 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
-
5
- @mixin iui-button-idea {
6
- @include iui-button-variant(high-visibility);
7
- border-radius: $iui-border-radius-round;
8
- box-shadow: $iui-elevation-24;
9
- position: fixed;
10
- bottom: $iui-baseline;
11
- right: $iui-m;
12
- }
@@ -1,9 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import './button';
4
- @import './default';
5
- @import './borderless';
6
- @import './variant';
7
- @import './idea';
8
- @import './button-group';
9
- @import './split-button';
@@ -1,45 +0,0 @@
1
- // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
- // See LICENSE.md in the project root for license terms and full copyright notice.
3
- @import '../style/index';
4
-
5
- @mixin iui-button-split {
6
- @include iui-button-group;
7
-
8
- &:hover {
9
- background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-6));
10
- }
11
-
12
- > * {
13
- // #region Sizing
14
- &:last-child {
15
- > .iui-button {
16
- --_iui-button-padding-inline: #{$iui-xs};
17
- }
18
-
19
- > [data-iui-size='small'] {
20
- --_iui-button-padding-inline: #{$iui-xxs};
21
- }
22
-
23
- > [data-iui-size='large'] {
24
- --_iui-button-padding-inline: #{$iui-s};
25
- }
26
- }
27
- // #endregion Sizing
28
-
29
- // #region Border between buttons for high-visibility and cta
30
- &:first-child {
31
- > [data-iui-variant='high-visibility'],
32
- > [data-iui-variant='cta'] {
33
- border-right-color: rgba(var(--iui-color-foreground-accessory-rgb), var(--iui-opacity-4));
34
- }
35
- }
36
-
37
- &:last-child {
38
- > [data-iui-variant='high-visibility'],
39
- > [data-iui-variant='cta'] {
40
- border-left-color: rgba(var(--iui-color-foreground-accessory-rgb), var(--iui-opacity-4));
41
- }
42
- }
43
- // #endregion Border between buttons for high-visibility and cta
44
- }
45
- }