@progressiveui/styles 10.30.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 (265) hide show
  1. package/CHANGELOG.md +621 -0
  2. package/README.md +85 -0
  3. package/index-with-tokens.scss +26 -0
  4. package/index.scss +12 -0
  5. package/package.json +42 -0
  6. package/scss/_breakpoint.scss +2 -0
  7. package/scss/_config.scss +30 -0
  8. package/scss/_feature-flags.scss +1 -0
  9. package/scss/_font-face.scss +13 -0
  10. package/scss/_global-defaults.scss +14 -0
  11. package/scss/_grid.scss +32 -0
  12. package/scss/_motion.scss +67 -0
  13. package/scss/_reset.scss +172 -0
  14. package/scss/_spacing.scss +4 -0
  15. package/scss/_theme.scss +102 -0
  16. package/scss/_themes.scss +14 -0
  17. package/scss/_type.scss +143 -0
  18. package/scss/_zone.scss +26 -0
  19. package/scss/components/_index.scss +82 -0
  20. package/scss/components/accordion/_accordion.legacy.scss +348 -0
  21. package/scss/components/accordion/_accordion.scss +118 -0
  22. package/scss/components/accordion/_index.scss +4 -0
  23. package/scss/components/anchor-navigation/_anchor-navigation.scss +37 -0
  24. package/scss/components/anchor-navigation/_index.scss +4 -0
  25. package/scss/components/auth-layout/_auth-layout.scss +55 -0
  26. package/scss/components/auth-layout/_index.scss +11 -0
  27. package/scss/components/avatar/_avatar.scss +61 -0
  28. package/scss/components/avatar/_index.scss +4 -0
  29. package/scss/components/banner-navigation/_banner-navigation.scss +80 -0
  30. package/scss/components/banner-navigation/_index.scss +4 -0
  31. package/scss/components/blockquote/_blockquote.scss +156 -0
  32. package/scss/components/blockquote/_index.scss +4 -0
  33. package/scss/components/breadcrumb/_breadcrumb.scss +89 -0
  34. package/scss/components/breadcrumb/_index.scss +4 -0
  35. package/scss/components/button/_button.scss +520 -0
  36. package/scss/components/button/_index.scss +5 -0
  37. package/scss/components/button/_mixins.scss +92 -0
  38. package/scss/components/button/_vars.scss +69 -0
  39. package/scss/components/card/_card-external.scss +149 -0
  40. package/scss/components/card/_card.scss +138 -0
  41. package/scss/components/card/_index.scss +7 -0
  42. package/scss/components/checkbox/_checkbox.scss +195 -0
  43. package/scss/components/checkbox/_index.scss +11 -0
  44. package/scss/components/code-snippet/_code-snippet.scss +581 -0
  45. package/scss/components/code-snippet/_index.scss +11 -0
  46. package/scss/components/code-snippet/_mixins.scss +21 -0
  47. package/scss/components/col/_col.scss +54 -0
  48. package/scss/components/col/_index.scss +4 -0
  49. package/scss/components/combo-box/_combo-box.scss +45 -0
  50. package/scss/components/combo-box/_index.scss +11 -0
  51. package/scss/components/content-switcher/_content-switcher.scss +132 -0
  52. package/scss/components/content-switcher/_index.scss +11 -0
  53. package/scss/components/context-menu/_context-menu.scss +26 -0
  54. package/scss/components/context-menu/_index.scss +11 -0
  55. package/scss/components/credits/_credits.scss +30 -0
  56. package/scss/components/credits/_index.scss +11 -0
  57. package/scss/components/data-table/_data-table.scss +1005 -0
  58. package/scss/components/data-table/_index.scss +12 -0
  59. package/scss/components/data-table/_mixins.scss +38 -0
  60. package/scss/components/data-table/_vars.scss +13 -0
  61. package/scss/components/data-table/action/_data-table-action.scss +587 -0
  62. package/scss/components/data-table/action/_index.scss +11 -0
  63. package/scss/components/data-table/expandable/_data-table-expandable.scss +411 -0
  64. package/scss/components/data-table/expandable/_index.scss +11 -0
  65. package/scss/components/data-table/skeleton/_data-table-skeleton.scss +72 -0
  66. package/scss/components/data-table/skeleton/_index.scss +11 -0
  67. package/scss/components/data-table/sort/_data-table-sort.scss +245 -0
  68. package/scss/components/data-table/sort/_index.scss +11 -0
  69. package/scss/components/date-picker/_date-picker.scss +896 -0
  70. package/scss/components/date-picker/_flatpickr.scss +538 -0
  71. package/scss/components/date-picker/_index.scss +11 -0
  72. package/scss/components/date-picker-new/_date-picker-new.scss +100 -0
  73. package/scss/components/date-picker-new/_index.scss +4 -0
  74. package/scss/components/date-picker-new/react-datepicker/datepicker.scss +692 -0
  75. package/scss/components/date-picker-new/react-datepicker/mixins.scss +88 -0
  76. package/scss/components/date-picker-new/react-datepicker/variables.scss +20 -0
  77. package/scss/components/dropdown/_dropdown.scss +493 -0
  78. package/scss/components/dropdown/_index.scss +11 -0
  79. package/scss/components/empty/_empty.scss +105 -0
  80. package/scss/components/empty/_index.scss +11 -0
  81. package/scss/components/file-uploader/_file-uploader.scss +321 -0
  82. package/scss/components/file-uploader/_index.scss +11 -0
  83. package/scss/components/footer/_footer.scss +258 -0
  84. package/scss/components/footer/_footer_external.scss +153 -0
  85. package/scss/components/footer/_index.scss +14 -0
  86. package/scss/components/form/_form.scss +146 -0
  87. package/scss/components/form/_index.scss +4 -0
  88. package/scss/components/form-controls/_form-controls.scss +53 -0
  89. package/scss/components/form-controls/_index.scss +11 -0
  90. package/scss/components/form-error/_form-error.scss +25 -0
  91. package/scss/components/form-error/_index.scss +11 -0
  92. package/scss/components/form-group/_form-group.scss +109 -0
  93. package/scss/components/form-group/_index.scss +11 -0
  94. package/scss/components/form-hint/_form-hint.scss +28 -0
  95. package/scss/components/form-hint/_index.scss +11 -0
  96. package/scss/components/form-wizard/_form-wizard.scss +48 -0
  97. package/scss/components/form-wizard/_index.scss +11 -0
  98. package/scss/components/grid/_grid.scss +80 -0
  99. package/scss/components/grid/_index.scss +4 -0
  100. package/scss/components/hero/_hero-external.scss +84 -0
  101. package/scss/components/hero/_hero.scss +321 -0
  102. package/scss/components/hero/_index.scss +14 -0
  103. package/scss/components/icon/_icon.scss +19 -0
  104. package/scss/components/icon/_index.scss +11 -0
  105. package/scss/components/info-bar/_index.scss +11 -0
  106. package/scss/components/info-bar/_info-bar.scss +21 -0
  107. package/scss/components/inline-loading/_index.scss +11 -0
  108. package/scss/components/inline-loading/_inline-loading.scss +159 -0
  109. package/scss/components/inline-loading/_keyframes.scss +12 -0
  110. package/scss/components/input/_index.scss +11 -0
  111. package/scss/components/input/_input.scss +87 -0
  112. package/scss/components/input/_vars.scss +31 -0
  113. package/scss/components/item/_index.scss +11 -0
  114. package/scss/components/item/_item.scss +227 -0
  115. package/scss/components/link/_index.scss +11 -0
  116. package/scss/components/link/_link.scss +109 -0
  117. package/scss/components/list/_index.scss +4 -0
  118. package/scss/components/list/_list.scss +144 -0
  119. package/scss/components/list-box/_index.scss +11 -0
  120. package/scss/components/list-box/_list-box.scss +813 -0
  121. package/scss/components/loading/_animation.scss +39 -0
  122. package/scss/components/loading/_functions.scss +10 -0
  123. package/scss/components/loading/_index.scss +11 -0
  124. package/scss/components/loading/_keyframes.scss +48 -0
  125. package/scss/components/loading/_loading.scss +72 -0
  126. package/scss/components/loading/_mixins.scss +42 -0
  127. package/scss/components/loading/_vars.scss +26 -0
  128. package/scss/components/main-navigation/_index.scss +14 -0
  129. package/scss/components/main-navigation/_main-navigation.scss +360 -0
  130. package/scss/components/main-navigation/_main-navigation_external.scss +527 -0
  131. package/scss/components/menu/_index.scss +11 -0
  132. package/scss/components/menu/_menu.scss +143 -0
  133. package/scss/components/modal/_index.scss +11 -0
  134. package/scss/components/modal/_mixins.scss +10 -0
  135. package/scss/components/modal/_modal.scss +224 -0
  136. package/scss/components/module/_index.scss +4 -0
  137. package/scss/components/module/_module.scss +199 -0
  138. package/scss/components/multiselect/_index.scss +11 -0
  139. package/scss/components/multiselect/_multiselect.scss +103 -0
  140. package/scss/components/notification/_index.scss +21 -0
  141. package/scss/components/notification/_inline-notification.scss +321 -0
  142. package/scss/components/notification/_mixins.scss +41 -0
  143. package/scss/components/notification/_notification.scss +480 -0
  144. package/scss/components/notification/_toast-notification.scss +249 -0
  145. package/scss/components/notification/_tokens.scss +126 -0
  146. package/scss/components/number-input/_index.scss +11 -0
  147. package/scss/components/number-input/_number-input.scss +195 -0
  148. package/scss/components/overflow-menu/_index.scss +11 -0
  149. package/scss/components/overflow-menu/_overflow-menu.scss +351 -0
  150. package/scss/components/pagination/_index.scss +11 -0
  151. package/scss/components/pagination/_pagination.scss +214 -0
  152. package/scss/components/pagination-nav/_index.scss +11 -0
  153. package/scss/components/pagination-nav/_mixins.scss +38 -0
  154. package/scss/components/pagination-nav/_pagination-nav.scss +171 -0
  155. package/scss/components/popover/_index.scss +11 -0
  156. package/scss/components/popover/_popover.scss +323 -0
  157. package/scss/components/progress-bar/_index.scss +11 -0
  158. package/scss/components/progress-bar/_progress-bar.scss +82 -0
  159. package/scss/components/progress-indicator/_index.scss +11 -0
  160. package/scss/components/progress-indicator/_progress-indicator.scss +328 -0
  161. package/scss/components/radio-button/_index.scss +4 -0
  162. package/scss/components/radio-button/_radio-button.scss +239 -0
  163. package/scss/components/react-dropzone/_index.scss +11 -0
  164. package/scss/components/react-dropzone/_react-dropzone.scss +58 -0
  165. package/scss/components/react-select/_index.scss +11 -0
  166. package/scss/components/react-select/_react-select.scss +90 -0
  167. package/scss/components/read-more/_index.scss +11 -0
  168. package/scss/components/read-more/_read-more.scss +102 -0
  169. package/scss/components/search/_index.scss +4 -0
  170. package/scss/components/search/_search.scss +436 -0
  171. package/scss/components/secondary-navigation/_index.scss +4 -0
  172. package/scss/components/secondary-navigation/_secondary-navigation.scss +61 -0
  173. package/scss/components/select/_index.scss +11 -0
  174. package/scss/components/select/_select.scss +224 -0
  175. package/scss/components/sidebar/_index.scss +11 -0
  176. package/scss/components/sidebar/_sidebar.scss +118 -0
  177. package/scss/components/skeleton-text/_index.scss +4 -0
  178. package/scss/components/skeleton-text/_skeleton-text.scss +22 -0
  179. package/scss/components/slider/_index.scss +4 -0
  180. package/scss/components/slider/_slider.scss +274 -0
  181. package/scss/components/step-navigation/_index.scss +4 -0
  182. package/scss/components/step-navigation/_step-navigation.scss +136 -0
  183. package/scss/components/step-navigation-item/_index.scss +4 -0
  184. package/scss/components/step-navigation-item/_step-navigation-item.scss +377 -0
  185. package/scss/components/story/_index.scss +11 -0
  186. package/scss/components/story/_story.scss +519 -0
  187. package/scss/components/structured-list/_index.scss +11 -0
  188. package/scss/components/structured-list/_mixins.scss +59 -0
  189. package/scss/components/structured-list/_structured-list.scss +235 -0
  190. package/scss/components/sub-navigation/_index.scss +4 -0
  191. package/scss/components/sub-navigation/_sub-navigation.scss +113 -0
  192. package/scss/components/table/_index.scss +11 -0
  193. package/scss/components/table/table.scss +88 -0
  194. package/scss/components/tabs/_index.scss +4 -0
  195. package/scss/components/tabs/_tabs.scss +185 -0
  196. package/scss/components/tabs/_vars.scss +23 -0
  197. package/scss/components/tag/_index.scss +12 -0
  198. package/scss/components/tag/_mixins.scss +19 -0
  199. package/scss/components/tag/_tag.scss +137 -0
  200. package/scss/components/tag/_tokens.scss +702 -0
  201. package/scss/components/text-area/_index.scss +11 -0
  202. package/scss/components/text-area/_text-area.scss +120 -0
  203. package/scss/components/text-input/_index.scss +11 -0
  204. package/scss/components/text-input/_text-input.scss +19 -0
  205. package/scss/components/tile/_index.scss +11 -0
  206. package/scss/components/tile/_tile.scss +269 -0
  207. package/scss/components/time-picker/_index.scss +11 -0
  208. package/scss/components/time-picker/_time-picker.scss +94 -0
  209. package/scss/components/toggle/_index.scss +11 -0
  210. package/scss/components/toggle/_toggle.scss +192 -0
  211. package/scss/components/tooltip/_index.scss +11 -0
  212. package/scss/components/tooltip/_mixins.scss +107 -0
  213. package/scss/components/tooltip/_tooltip.scss +128 -0
  214. package/scss/components/tooltip/_vars.scss +6 -0
  215. package/scss/components/tooltip/animations/fade.scss +10 -0
  216. package/scss/components/tooltip/themes/light-border.scss +158 -0
  217. package/scss/components/tooltip/themes/light.scss +28 -0
  218. package/scss/components/treeview/_index.scss +11 -0
  219. package/scss/components/treeview/_treeview.scss +177 -0
  220. package/scss/components/ui-shell/_functions.scss +19 -0
  221. package/scss/components/ui-shell/_index.scss +11 -0
  222. package/scss/components/ui-shell/_mixins.scss +56 -0
  223. package/scss/components/ui-shell/_ui-shell.scss +23 -0
  224. package/scss/components/ui-shell/content/_content.scss +34 -0
  225. package/scss/components/ui-shell/content/_index.scss +11 -0
  226. package/scss/components/ui-shell/header/_header.scss +382 -0
  227. package/scss/components/ui-shell/header/_index.scss +11 -0
  228. package/scss/components/ui-shell/header-panel/_header-panel.scss +41 -0
  229. package/scss/components/ui-shell/header-panel/_index.scss +11 -0
  230. package/scss/components/ui-shell/side-nav/_index.scss +11 -0
  231. package/scss/components/ui-shell/side-nav/_side-nav.scss +526 -0
  232. package/scss/components/ui-shell/switcher/_index.scss +11 -0
  233. package/scss/components/ui-shell/switcher/_switcher.scss +78 -0
  234. package/scss/components/unit/_index.scss +11 -0
  235. package/scss/components/unit/_unit.scss +277 -0
  236. package/scss/components/user/_index.scss +11 -0
  237. package/scss/components/user/_user.scss +104 -0
  238. package/scss/components/value/_index.scss +11 -0
  239. package/scss/components/value/_value.scss +41 -0
  240. package/scss/components/wrapper/_index.scss +11 -0
  241. package/scss/components/wrapper/_wrapper.scss +71 -0
  242. package/scss/utilities/_box-shadow.scss +14 -0
  243. package/scss/utilities/_button-reset.scss +31 -0
  244. package/scss/utilities/_component-reset.scss +25 -0
  245. package/scss/utilities/_component-tokens.scss +27 -0
  246. package/scss/utilities/_convert.scss +41 -0
  247. package/scss/utilities/_custom-property.scss +56 -0
  248. package/scss/utilities/_focus-outline.scss +68 -0
  249. package/scss/utilities/_high-contrast-mode.scss +37 -0
  250. package/scss/utilities/_index.scss +24 -0
  251. package/scss/utilities/_input-base.scss +63 -0
  252. package/scss/utilities/_keyframes.scss +76 -0
  253. package/scss/utilities/_layer-set.scss +31 -0
  254. package/scss/utilities/_layer.scss +52 -0
  255. package/scss/utilities/_placeholder-colors.scss +10 -0
  256. package/scss/utilities/_read-only.scss +19 -0
  257. package/scss/utilities/_rotate.scss +19 -0
  258. package/scss/utilities/_rtl.scss +21 -0
  259. package/scss/utilities/_skeleton.scss +44 -0
  260. package/scss/utilities/_text-gradient.scss +20 -0
  261. package/scss/utilities/_text-overflow.scss +23 -0
  262. package/scss/utilities/_text-truncate.scss +29 -0
  263. package/scss/utilities/_visually-hidden.scss +38 -0
  264. package/scss/utilities/_z-index.scss +38 -0
  265. package/styles.css +1 -0
@@ -0,0 +1,56 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use '../config';
9
+
10
+ // Some CSS Custom Property terminology
11
+ // @see https://www.w3.org/TR/css-variables-1/
12
+ //
13
+ // <custom-property-name>:
14
+ // Any valid identifer that starts with two dashes (--)
15
+ //
16
+ // A declaration:
17
+ // CSS Custom Properties can be used as declarations in a CSS selector. They
18
+ // take on the form of:
19
+ //
20
+ // <custom-property-name>: <declaration-value>;
21
+ //
22
+ // The var() notation:
23
+ // You can use a CSS Custom Property as a substitute for a value of another
24
+ // property using the var() function. This function has the following syntax:
25
+ //
26
+ // var( <custom-property-name> [, <declarative-value> ]? )
27
+ //
28
+ // This function takes in an optional fallback value if the CSS Custom
29
+ // Property has not been previously defined
30
+
31
+ /// Get the <custom-property-name> for a given string
32
+ /// @param {String} $name
33
+ /// @returns {String}
34
+ @function get-name($name) {
35
+ @return --#{config.$prefix}-#{$name};
36
+ }
37
+
38
+ /// Get the var() representation for a given token
39
+ /// @param {String} $name
40
+ /// @param {Any} $fallback
41
+ /// @returns var()
42
+ @function get-var($name, $fallback: false) {
43
+ @if $fallback {
44
+ @return var(--#{config.$prefix}-#{$name}, #{$fallback});
45
+ }
46
+ @return var(--#{config.$prefix}-#{$name});
47
+ }
48
+
49
+ /// Emit a declaration which sets the value of a CSS Custom Property using the
50
+ /// $name as the <custom-property-name> and the $value as the
51
+ /// <declaration-value>
52
+ /// @param {String} $name
53
+ /// @param {any} $value
54
+ @mixin declaration($name, $value) {
55
+ #{get-name($name)}: #{$value};
56
+ }
@@ -0,0 +1,68 @@
1
+ @use "../theme";
2
+
3
+ /// Adds outline styles depending on specific type
4
+ /// @access public
5
+ /// @param {String} $type ['border'] - Type of outline from: `border`, `blurred`, `outline`, `invalid`, `reset`
6
+ /// @example @include focus-outline('outline');
7
+ /// @group utilities
8
+ @mixin focus-outline($type: "border") {
9
+ @if ($type == "border") {
10
+ outline: 1px solid theme.$field-focus;
11
+ border-color: theme.$field-focus; //update $focus color
12
+ //box-shadow: 0px 2px 8px 0 theme.$focus; //get new token
13
+
14
+ @media screen and (prefers-contrast) {
15
+ outline-style: dotted;
16
+ }
17
+ }
18
+
19
+ @if ($type == "blurred") {
20
+ box-shadow: 0 0 0 3px theme.$field-focus; //theme.$focus; //get new token
21
+ outline: 1px solid transparent;
22
+ }
23
+
24
+ @if ($type == "outline") {
25
+ outline: 2px solid theme.$field-focus;
26
+ outline-offset: -2px;
27
+
28
+ @media screen and (prefers-contrast) {
29
+ outline-style: dotted;
30
+ }
31
+ }
32
+
33
+ @if ($type == "invalid") {
34
+ outline: 2px solid theme.$support-error-main;
35
+ outline-offset: -2px;
36
+
37
+ @media screen and (prefers-contrast) {
38
+ outline-style: dotted;
39
+ }
40
+ }
41
+
42
+ @if ($type == "reset") {
43
+ outline: 2px solid transparent;
44
+ outline-offset: -2px;
45
+ }
46
+
47
+ @if ($type == "border-important") {
48
+ outline: 2px solid theme.$field-focus !important;
49
+ outline-offset: -1px;
50
+ }
51
+
52
+ @if ($type == "border-focus") {
53
+ border-radius: var(--border-radius-100);
54
+ outline: var(--focus-200__color) solid var(--focus-200__width);
55
+ }
56
+
57
+ @if ($type == "border-focus-small") {
58
+ border-radius: var(--border-radius-100);
59
+ outline: var(--focus-100__color) solid var(--focus-100__width);
60
+ }
61
+
62
+ @if ($type == "border-small") {
63
+ //outline: 2px solid theme.$action-default-link-default-hover;
64
+ outline-offset: 2px;
65
+ border-radius: var(--border-radius-100);
66
+ outline: var(--focus-100__color) solid var(--focus-100__width);
67
+ }
68
+ }
@@ -0,0 +1,37 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ /// Windows HCM Mixin
9
+ /// @access public
10
+ /// @example @include high-contrast-mode;
11
+ /// @group utilities
12
+ /// Set HCM styles at the end of each file to ensure they are not overwritten
13
+ @mixin high-contrast-mode($type: '') {
14
+ @media screen and (-ms-high-contrast: active),
15
+ (forced-colors: active),
16
+ (prefers-contrast) {
17
+ @if ($type == 'icon-fill') {
18
+ fill: ButtonText;
19
+ }
20
+
21
+ @if ($type == 'focus') {
22
+ color: Highlight;
23
+ outline: 1px solid Highlight;
24
+ }
25
+
26
+ @if ($type == 'outline') {
27
+ outline: 1px solid transparent;
28
+ }
29
+
30
+ @if ($type == 'disabled') {
31
+ color: GrayText;
32
+ fill: GrayText;
33
+ }
34
+
35
+ @content;
36
+ }
37
+ }
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright IBM Corp. 2018, 2018
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @forward 'box-shadow';
9
+ @forward 'button-reset' as button-*;
10
+ @forward 'component-reset' as component-*;
11
+ @forward 'convert' show em, rem;
12
+ @forward 'focus-outline';
13
+ @forward 'high-contrast-mode';
14
+ @forward 'keyframes';
15
+ @forward 'placeholder-colors';
16
+ @forward 'rotate';
17
+ @forward 'skeleton';
18
+ @forward 'text-overflow';
19
+ @forward 'text-truncate';
20
+ @forward 'tooltip';
21
+ @forward 'visually-hidden';
22
+ @forward 'z-index';
23
+ @forward 'rlt';
24
+ @forward 'read-only';
@@ -0,0 +1,63 @@
1
+ @use "../theme" as *;
2
+ @use "../spacing" as *;
3
+ @use "../utilities/placeholder-colors" as *;
4
+ @use "../utilities/focus-outline" as *;
5
+ @use "../utilities/read-only" as *;
6
+ @use "../type" as *;
7
+
8
+ /// Adds placeholder text color
9
+ /// @access public
10
+ /// @example @include input-base;
11
+ /// @group utilities
12
+
13
+ $input-border: 1px solid var(--neutral-100__color); //TODO
14
+ $input-height: 40px;
15
+ $input-border-radius: 0px;
16
+
17
+ @mixin input-base {
18
+ @include font-family("sans");
19
+ @include type-style("input");
20
+ height: $input-height;
21
+ min-width: 10rem;
22
+ width: 100%;
23
+ padding: 0 $spacing-03;
24
+ color: $text-body-default;
25
+ appearance: none;
26
+ //TODO: dynamic font-size
27
+ font-size: 1em;
28
+ background-color: $fill-field;
29
+ order: 2;
30
+ border: $input-border;
31
+ border-color: var(--neutral-100__color);
32
+ border-radius: $input-border-radius;
33
+ border-radius: $field-border-radius;
34
+ box-shadow: none;
35
+
36
+ //TODO
37
+ // @include print {
38
+ // background: var(--ui-01) !important;
39
+ // border-color: var(--ui-06);
40
+ // padding: 0 $spacing-02;
41
+ // height: $input-height * 0.7;
42
+ // }
43
+ &::placeholder {
44
+ @include placeholder-colors;
45
+ }
46
+
47
+ &:focus {
48
+ @include focus-outline("border");
49
+ }
50
+
51
+ &:disabled {
52
+ opacity: 0.5;
53
+ cursor: not-allowed;
54
+ }
55
+
56
+ &:disabled:hover {
57
+ border: $input-border;
58
+ }
59
+
60
+ /*&:read-only {
61
+ @include read-only('border');
62
+ }*/
63
+ }
@@ -0,0 +1,76 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @mixin content-visible {
9
+ opacity: 1;
10
+ visibility: inherit;
11
+ }
12
+
13
+ @mixin content-hidden {
14
+ opacity: 0;
15
+ visibility: hidden;
16
+ }
17
+
18
+ @keyframes hide-feedback {
19
+ 0% {
20
+ @include content-visible;
21
+ }
22
+ 100% {
23
+ @include content-hidden;
24
+ }
25
+ }
26
+
27
+ @keyframes show-feedback {
28
+ 0% {
29
+ @include content-hidden;
30
+ }
31
+ 100% {
32
+ @include content-visible;
33
+ }
34
+ }
35
+
36
+ @keyframes skeleton {
37
+ 0% {
38
+ opacity: 0.3;
39
+ transform: scaleX(0);
40
+ transform-origin: left;
41
+ }
42
+ 20% {
43
+ opacity: 1;
44
+ transform: scaleX(1);
45
+ transform-origin: left;
46
+ }
47
+ 28% {
48
+ transform: scaleX(1);
49
+ transform-origin: right;
50
+ }
51
+ 51% {
52
+ transform: scaleX(0);
53
+ transform-origin: right;
54
+ }
55
+ 58% {
56
+ transform: scaleX(0);
57
+ transform-origin: right;
58
+ }
59
+ 82% {
60
+ transform: scaleX(1);
61
+ transform-origin: right;
62
+ }
63
+ 83% {
64
+ transform: scaleX(1);
65
+ transform-origin: left;
66
+ }
67
+ 96% {
68
+ transform: scaleX(0);
69
+ transform-origin: left;
70
+ }
71
+ 100% {
72
+ opacity: 0.3;
73
+ transform: scaleX(0);
74
+ transform-origin: left;
75
+ }
76
+ }
@@ -0,0 +1,31 @@
1
+ @use "sass:list";
2
+ @use "sass:meta";
3
+ @use "../config" as *;
4
+ @use "./custom-property";
5
+
6
+ /// Define a map of layer sets, each set should have values for each layer in
7
+ /// the application. The key of this map is used for the CSS Custom Property
8
+ /// name whose value is updated as more layers are added.
9
+ /// @type {Map}
10
+ $layer-sets: () !default;
11
+
12
+ /// Emit the layer tokens defined in $layer-sets for the given $level
13
+ /// @param {Number} $level
14
+ @mixin -emit-layer-tokens($level) {
15
+ @each $key, $layer-set in $layer-sets {
16
+ $value: list.nth($layer-set, $level);
17
+ @include custom-property.declaration($key, $value);
18
+ }
19
+ }
20
+
21
+ :root {
22
+ @include -emit-layer-tokens(1);
23
+ }
24
+
25
+ .#{$prefix}--layer {
26
+ @include -emit-layer-tokens(2);
27
+
28
+ .#{$prefix}--layer {
29
+ @include -emit-layer-tokens(3);
30
+ }
31
+ }
@@ -0,0 +1,52 @@
1
+ //-------------------------------------------
2
+ // 📑 Layer
3
+ // ------------------------------------------
4
+ //
5
+ // Layer || Elevation
6
+ // ==========================================
7
+ // 0 - Base || 0
8
+ // 1 - Flat || 1
9
+ // 2 - Raised || 2
10
+ // 3 - Overlay || 8
11
+ // 4 - Pop-out || 24
12
+ // ==========================================
13
+ // Custom: Left Nav || 16
14
+ // Custom: Global Header || 12
15
+ //
16
+
17
+ // Box shadow variables
18
+ $box-shadow: rgba(0, 0, 0, 0.1);
19
+ $box-shadow--hover: rgba(0, 0, 0, 0.2);
20
+ $box-shadow--raised: 0 1px 2px 0 $box-shadow;
21
+ $box-shadow--overlay: 0 4px 8px 0 $box-shadow;
22
+ $box-shadow--sticky-nav: 0 6px 12px 0 $box-shadow;
23
+ $box-shadow--temporary-nav: 0 8px 16px 0 $box-shadow;
24
+ $box-shadow--pop-out: 0 8px 24px 0 $box-shadow;
25
+ $box-shadow--pop-out--hover: 0 5px 32px 0 $box-shadow--hover;
26
+
27
+ // Layer box-shadow map
28
+ $layer-shadows: (
29
+ base: none,
30
+ flat: none,
31
+ raised: $box-shadow--raised,
32
+ overlay: $box-shadow--overlay,
33
+ pop-out: $box-shadow--pop-out,
34
+ pop-out--hover: $box-shadow--pop-out--hover,
35
+ temporary-nav: $box-shadow--temporary-nav,
36
+ sticky-nav: $box-shadow--sticky-nav,
37
+ );
38
+
39
+ // Layer mixin
40
+ @mixin layer($layer) {
41
+ @if global-variable-exists('css--use-layer') ==
42
+ false or
43
+ $css--use-layer ==
44
+ true
45
+ {
46
+ @if map-has-key($layer-shadows, $layer) {
47
+ box-shadow: #{map-get($layer-shadows, $layer)};
48
+ } @else {
49
+ @warn '#{$layer} is not a valid layer.';
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,10 @@
1
+ @use "../theme" as *;
2
+
3
+ /// Adds placeholder text color
4
+ /// @access public
5
+ /// @example @include placeholder-colors;
6
+ /// @group utilities
7
+ @mixin placeholder-colors {
8
+ color: $text-field-placeholder; //undefined var error
9
+ opacity: 1;
10
+ }
@@ -0,0 +1,19 @@
1
+
2
+ @use '../theme' as *;
3
+
4
+ /// Adds placeholder text color
5
+ /// @access public
6
+ /// @example @include read-only;
7
+ /// @group utilities
8
+
9
+ @mixin read-only($type: 'border') {
10
+ @if ($type == 'border') {
11
+ border-color: $border-subtle;
12
+ &:hover,
13
+ &:focus {
14
+ border-color: $border-subtle;
15
+ outline: none;
16
+ box-shadow: none;
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ /// Adds rotational transformation
9
+ /// @access public
10
+ /// @param {Number} $deg - How many degrees to rotate
11
+ /// @param {Number} $speed - Speed of rotation
12
+ /// @param {Value} $origin [center] - `transform-origin`
13
+ /// @example @include rotate(90deg, 300ms);
14
+ /// @group utilities
15
+ @mixin rotate($deg, $speed, $origin: center) {
16
+ transform: rotate($deg);
17
+ transform-origin: $origin;
18
+ transition: transform $speed;
19
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Right to left Support added
3
+ */
4
+
5
+ /// Adds text overflow styling
6
+ /// @access public
7
+ /// @example @include rtl;
8
+ /// @content
9
+ /// @group utilities
10
+
11
+ @mixin ltr() {
12
+ body[dir='ltr'] & {
13
+ @content;
14
+ }
15
+ }
16
+
17
+ @mixin rtl() {
18
+ [dir='rtl'] & {
19
+ @content;
20
+ }
21
+ }
@@ -0,0 +1,44 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use 'keyframes';
9
+ @use '../theme' as *;
10
+
11
+ /// Skeleton loading animation
12
+ /// @access public
13
+ /// @example @include skeleton;
14
+ /// @group utilities
15
+ @mixin skeleton {
16
+ position: relative;
17
+ padding: 0;
18
+ border: none;
19
+ background: #d1e5f4; //$skeleton-background;
20
+ box-shadow: none;
21
+ pointer-events: none;
22
+
23
+ &:hover,
24
+ &:focus,
25
+ &:active {
26
+ border: none;
27
+ cursor: default;
28
+ outline: none;
29
+ }
30
+
31
+ &::before {
32
+ position: absolute;
33
+ width: 100%;
34
+ height: 100%;
35
+ animation: 3000ms ease-in-out skeleton infinite;
36
+ background: #e7f1f9; //$skeleton-element;
37
+ content: '';
38
+ will-change: transform-origin, transform, opacity;
39
+
40
+ @media (prefers-reduced-motion: reduce) {
41
+ animation: none;
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,20 @@
1
+ //-------------------------
2
+ // 🎌 Text Gradient Blur
3
+ //-------------------------
4
+
5
+ // Layer mixin
6
+ @mixin text-gradient() {
7
+ &:after {
8
+ position: absolute;
9
+ bottom: 0;
10
+ left: 0;
11
+ content: "";
12
+ height: calcRem(70px);
13
+ width: 100%;
14
+ background: linear-gradient(
15
+ to bottom,
16
+ rgba(255, 255, 255, 0) 0%,
17
+ rgba(255, 255, 255, 0.8) 90%
18
+ );
19
+ }
20
+ }
@@ -0,0 +1,23 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ /// Adds text overflow styling
9
+ /// @access public
10
+ /// @param {Number} $width [false] - Value of width if you want to set width, else nothing
11
+ /// @example @include text-overflow(300px);
12
+ /// @group utilities
13
+ @mixin text-overflow($width: false) {
14
+ display: block;
15
+ overflow-x: hidden;
16
+ text-overflow: ellipsis;
17
+ white-space: nowrap;
18
+
19
+ // apply a width if width parameter exists
20
+ @if ($width) {
21
+ width: $width;
22
+ }
23
+ }
@@ -0,0 +1,29 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ // Text truncation at the end of text
9
+ /// @access public
10
+ /// @group utilities
11
+ @mixin text-truncate-end {
12
+ display: inline-block;
13
+ overflow: hidden;
14
+ width: 100%;
15
+ text-overflow: ellipsis;
16
+ white-space: nowrap;
17
+ }
18
+
19
+ // Text truncation at the beginning of text
20
+ /// @access public
21
+ /// @group utilities
22
+ @mixin text-truncate-front {
23
+ display: inline-block;
24
+ overflow: hidden;
25
+ width: 100%;
26
+ direction: rtl;
27
+ text-overflow: ellipsis;
28
+ white-space: nowrap;
29
+ }
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ @use '../config' as *;
9
+
10
+ /// Include styles for screen reader/assistive text
11
+ /// @access public
12
+ /// @group utilities
13
+ @mixin visually-hidden {
14
+ position: absolute;
15
+ overflow: hidden;
16
+ width: 1px;
17
+ height: 1px;
18
+ padding: 0;
19
+ border: 0;
20
+ margin: -1px;
21
+ clip: rect(0, 0, 0, 0);
22
+ visibility: inherit;
23
+ white-space: nowrap;
24
+ }
25
+
26
+ .#{$prefix}--assistive-text,
27
+ .#{$prefix}--visually-hidden {
28
+ position: absolute;
29
+ overflow: hidden;
30
+ width: 1px;
31
+ height: 1px;
32
+ padding: 0;
33
+ border: 0;
34
+ margin: -1px;
35
+ clip: rect(0, 0, 0, 0);
36
+ visibility: inherit;
37
+ white-space: nowrap;
38
+ }
@@ -0,0 +1,38 @@
1
+ //
2
+ // Copyright IBM Corp. 2021
3
+ //
4
+ // This source code is licensed under the Apache-2.0 license found in the
5
+ // LICENSE file in the root directory of this source tree.
6
+ //
7
+
8
+ /// @access public
9
+ /// @type Map
10
+ /// @group utilities
11
+ $z-indexes: (
12
+ // Dropdowns that render outside of a Modal should render above a Modal.
13
+ // Dropdowns below the modal will close when the Modal is opened, so
14
+ // having a higher z-index *should* not cause issues.
15
+ dropdown: 9100,
16
+ modal: 9000,
17
+ header: 8000,
18
+ overlay: 6000,
19
+ floating: 6000,
20
+ footer: 5000,
21
+ hidden: - 1,
22
+ overflowHidden: - 1
23
+ );
24
+
25
+ /// @access public
26
+ /// @param {String} $layer - Value from `$z-indexes` map
27
+ /// @group utilities
28
+ /// @example - scss
29
+ /// .modal {
30
+ /// z-index: z('modal');
31
+ /// }
32
+ @function z($layer) {
33
+ @if not map-has-key($z-indexes, $layer) {
34
+ @warn 'No layer found for `#{$layer}` in $z-indexes map. Property omitted.';
35
+ }
36
+
37
+ @return map-get($z-indexes, $layer);
38
+ }