@moda/om 19.9.0 → 20.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 (69) hide show
  1. package/README.md +1 -2
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/styles.css +1 -1
  5. package/index.scss +1 -0
  6. package/package.json +4 -3
  7. package/src/components/AspectRatioBox/AspectRatioBox.scss +1 -1
  8. package/src/components/Badge/Badge.scss +17 -17
  9. package/src/components/Breadcrumbs/Breadcrumb/Breadcrumb.scss +5 -5
  10. package/src/components/Breadcrumbs/Breadcrumbs.scss +2 -2
  11. package/src/components/Breakpoint/Breakpoint.scss +9 -7
  12. package/src/components/Button/Button.scss +45 -44
  13. package/src/components/Checkbox/Checkbox.scss +11 -11
  14. package/src/components/Clickable/Clickable.scss +3 -3
  15. package/src/components/ColorSwatch/ColorSwatch.scss +9 -9
  16. package/src/components/Constrain/Constrain.scss +9 -8
  17. package/src/components/Constrain/ExceedConstrain.scss +7 -7
  18. package/src/components/ControlLink/ControlLink.scss +6 -6
  19. package/src/components/DefinitionList/DefinitionList.scss +5 -5
  20. package/src/components/Dialog/Dialog.scss +4 -4
  21. package/src/components/Divider/Divider.scss +5 -5
  22. package/src/components/Expandable/Expandable.scss +17 -17
  23. package/src/components/Field/Field.scss +7 -7
  24. package/src/components/Label/Label.scss +4 -4
  25. package/src/components/Loading/Loading.scss +4 -4
  26. package/src/components/LoadingBalls/LoadingBalls.scss +2 -2
  27. package/src/components/LoadingShapes/LoadingShapes.scss +2 -2
  28. package/src/components/Modal/Modal.scss +1 -1
  29. package/src/components/ModalOverlay/ModalOverlay.scss +6 -6
  30. package/src/components/Overlay/Overlay.scss +4 -4
  31. package/src/components/Paginator/Paginator.scss +10 -10
  32. package/src/components/PasswordInput/PasswordInput.scss +4 -4
  33. package/src/components/Popover/Popover.scss +9 -9
  34. package/src/components/PromoBanner/PromoBanner.scss +9 -9
  35. package/src/components/RadioButton/RadioButton.scss +14 -14
  36. package/src/components/SearchInput/SearchInput.scss +4 -4
  37. package/src/components/Select/MultiSelect.scss +14 -14
  38. package/src/components/Select/Select.scss +25 -25
  39. package/src/components/Select/SelectOption.scss +7 -7
  40. package/src/components/Select/SelectOptions.scss +8 -8
  41. package/src/components/SelectableButton/SelectableButton.scss +13 -13
  42. package/src/components/SlidingPane/SlidingPane.scss +7 -7
  43. package/src/components/Stack/Stack.scss +6 -4
  44. package/src/components/Tabs/Tab.scss +6 -6
  45. package/src/components/Tabs/TabList.scss +3 -3
  46. package/src/components/Tabs/TabPanels.scss +2 -2
  47. package/src/components/Tag/Tag.scss +8 -8
  48. package/src/components/Text/Text.scss +4 -3
  49. package/src/components/TextInput/TextInput.scss +2 -2
  50. package/src/components/Textarea/Textarea.scss +3 -3
  51. package/src/components/Toast/Toast.scss +6 -6
  52. package/src/components/VerticalDivider/VerticalDivider.scss +3 -3
  53. package/src/index.scss +3 -3
  54. package/src/mixins/_mixins.scss +7 -7
  55. package/src/mixins/font-smoothing/_font-smoothing.scss +0 -2
  56. package/src/mixins/font-smoothing/font-smoothing.stories.scss +3 -3
  57. package/src/mixins/global-styles/_global-styles.scss +6 -5
  58. package/src/mixins/input-styles/_input-styles.scss +14 -12
  59. package/src/mixins/overflow-scroll/_overflow-scroll.scss +0 -2
  60. package/src/mixins/overflow-scroll/overflow-scroll.stories.scss +3 -3
  61. package/src/mixins/stack/_stack.scss +3 -3
  62. package/src/mixins/stack/stack.stories.scss +3 -3
  63. package/src/mixins/thin-underline/_thin-underline.scss +0 -2
  64. package/src/mixins/thin-underline/thin-underline.stories.scss +2 -2
  65. package/src/mixins/visually-hidden/_visually-hidden.scss +0 -2
  66. package/src/mixins/visually-hidden/visually-hidden.stories.scss +2 -2
  67. package/src/utilities/States/State.scss +4 -4
  68. package/src/utilities/States/States.scss +2 -2
  69. package/src/utilities/States/StatesProps.scss +8 -8
@@ -1,22 +1,23 @@
1
- @import '~om';
1
+ @use 'sass:map';
2
+ @use '~@moda/om';
2
3
 
3
4
  .Constrain {
4
5
  width: 90%;
5
6
  margin: 0 auto;
6
- max-width: map-get($breakpoints, xl);
7
+ max-width: map.get(om.$breakpoints, xl);
7
8
 
8
- @include breakpoint(md, $prop: max-width) {
9
+ @include om.breakpoint(md, $prop: max-width) {
9
10
  width: 100%;
10
- padding: spacing(0, 6);
11
+ padding: om.spacing(0, 6);
11
12
  }
12
13
 
13
- @include breakpoint(sm, $prop: max-width) {
14
+ @include om.breakpoint(sm, $prop: max-width) {
14
15
  width: 100%;
15
- padding: spacing(0, 4);
16
+ padding: om.spacing(0, 4);
16
17
  }
17
18
 
18
- @include breakpoint(xs, $prop: max-width) {
19
+ @include om.breakpoint(xs, $prop: max-width) {
19
20
  width: 100%;
20
- padding: spacing(0, 2);
21
+ padding: om.spacing(0, 2);
21
22
  }
22
23
  }
@@ -1,15 +1,15 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .ExceedConstrain {
4
- @include breakpoint(md, $prop: max-width) {
5
- margin: 0 -#{space(6)};
4
+ @include om.breakpoint(md, $prop: max-width) {
5
+ margin: 0 -#{om.space(6)};
6
6
  }
7
7
 
8
- @include breakpoint(sm, $prop: max-width) {
9
- margin: 0 -#{space(4)};
8
+ @include om.breakpoint(sm, $prop: max-width) {
9
+ margin: 0 -#{om.space(4)};
10
10
  }
11
11
 
12
- @include breakpoint(xs, $prop: max-width) {
13
- margin: 0 -#{space(2)};
12
+ @include om.breakpoint(xs, $prop: max-width) {
13
+ margin: 0 -#{om.space(2)};
14
14
  }
15
15
  }
@@ -1,25 +1,25 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .ControlLink {
4
4
  $self: &;
5
- @include text(body1);
5
+ @include om.text(body1);
6
6
 
7
7
  display: inline-flex;
8
8
 
9
9
  &:hover,
10
10
  &:focus {
11
11
  &:not(#{$self}--disabled) {
12
- @include thin-underline();
13
- color: color(ink);
12
+ @include om.thin-underline();
13
+ color: om.color(ink);
14
14
  opacity: 0.7;
15
15
  }
16
16
  }
17
17
 
18
18
  &--underlined {
19
- @include thin-underline();
19
+ @include om.thin-underline();
20
20
  }
21
21
 
22
22
  &--disabled {
23
- color: color(fog);
23
+ color: om.color(fog);
24
24
  }
25
25
  }
@@ -1,7 +1,7 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .DefinitionList {
4
- @include text(body1);
4
+ @include om.text(body1);
5
5
  margin: 0;
6
6
 
7
7
  > dt,
@@ -11,14 +11,14 @@
11
11
  }
12
12
 
13
13
  > dt {
14
- color: color(ink);
15
- margin-right: space(2);
14
+ color: om.color(ink);
15
+ margin-right: om.space(2);
16
16
  }
17
17
 
18
18
  > dd {
19
19
  &,
20
20
  > a {
21
- color: color(cement);
21
+ color: om.color(cement);
22
22
  }
23
23
 
24
24
  > a {
@@ -1,15 +1,15 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Dialog {
4
4
  max-width: 90vw;
5
- background-color: color('snow');
5
+ background-color: om.color('snow');
6
6
  text-align: center;
7
7
 
8
8
  &__content {
9
- padding: spacing(6);
9
+ padding: om.spacing(6);
10
10
  }
11
11
 
12
- @include breakpoint(md) {
12
+ @include om.breakpoint(md) {
13
13
  max-width: 40rem;
14
14
  }
15
15
  }
@@ -1,4 +1,4 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Divider {
4
4
  $self: &;
@@ -12,14 +12,14 @@
12
12
  content: '';
13
13
  flex: 1;
14
14
  border: none;
15
- background-color: color(elephant);
15
+ background-color: om.color(elephant);
16
16
  height: 1px;
17
17
  width: 50%;
18
18
  }
19
19
 
20
20
  &__text {
21
21
  width: auto;
22
- padding: 0 space(4);
22
+ padding: 0 om.space(4);
23
23
  }
24
24
 
25
25
  &--two-line {
@@ -28,8 +28,8 @@
28
28
  $space-between-lines: 0.175rem;
29
29
  $offset: calc($space-between-lines / 2);
30
30
  transform: translateY(calc(-#{$offset}));
31
- background-color: color(ink);
32
- box-shadow: 0 $space-between-lines 0 0 color(ink);
31
+ background-color: om.color(ink);
32
+ box-shadow: 0 $space-between-lines 0 0 om.color(ink);
33
33
  }
34
34
  }
35
35
 
@@ -1,4 +1,4 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Expandable {
4
4
  $self: &;
@@ -7,12 +7,12 @@
7
7
  flex-direction: column;
8
8
 
9
9
  &__name {
10
- @include text(body1);
10
+ @include om.text(body1);
11
11
 
12
12
  position: relative;
13
13
  text-align: left;
14
14
  cursor: pointer;
15
- padding: spacing(3, 5, 3, 0);
15
+ padding: om.spacing(3, 5, 3, 0);
16
16
  user-select: none;
17
17
  overflow: hidden;
18
18
  text-overflow: ellipsis;
@@ -20,28 +20,28 @@
20
20
 
21
21
  &__icon {
22
22
  height: 100%;
23
- padding-top: space(4);
23
+ padding-top: om.space(4);
24
24
  position: absolute;
25
25
  right: 0;
26
26
  top: 0;
27
27
  }
28
28
 
29
29
  &__contents {
30
- @include stack(2);
31
- @include text(body1);
30
+ @include om.stack(2);
31
+ @include om.text(body1);
32
32
 
33
- padding-bottom: space(3);
33
+ padding-bottom: om.space(3);
34
34
  display: none;
35
- color: color(ink);
35
+ color: om.color(ink);
36
36
 
37
37
  ul,
38
38
  ol {
39
- padding-left: space(4);
39
+ padding-left: om.space(4);
40
40
  list-style: disc;
41
41
  }
42
42
 
43
43
  a {
44
- color: color(ink);
44
+ color: om.color(ink);
45
45
  }
46
46
  }
47
47
 
@@ -56,8 +56,8 @@
56
56
  right: 0;
57
57
  transform: translateY(-50%);
58
58
  height: 1px;
59
- width: space(4);
60
- background-color: color(ink);
59
+ width: om.space(4);
60
+ background-color: om.color(ink);
61
61
  }
62
62
 
63
63
  &::before {
@@ -80,22 +80,22 @@
80
80
  }
81
81
 
82
82
  &--with-border {
83
- border-top: 1px solid color(noise);
83
+ border-top: 1px solid om.color(noise);
84
84
  }
85
85
 
86
86
  &--dark-background {
87
- border-color: color(cement);
88
- color: color('snow');
87
+ border-color: om.color(cement);
88
+ color: om.color('snow');
89
89
 
90
90
  #{$self}__name {
91
91
  &::before,
92
92
  &::after {
93
- background-color: color('snow');
93
+ background-color: om.color('snow');
94
94
  }
95
95
  }
96
96
 
97
97
  #{$self}__contents {
98
- color: color('snow');
98
+ color: om.color('snow');
99
99
  }
100
100
  }
101
101
  }
@@ -1,7 +1,7 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Field {
4
- @include stack(1);
4
+ @include om.stack(1);
5
5
 
6
6
  &__context {
7
7
  position: relative;
@@ -10,23 +10,23 @@
10
10
  &__icon {
11
11
  position: absolute;
12
12
  top: 50%;
13
- right: space(2);
14
- color: color(code-red);
13
+ right: om.space(2);
14
+ color: om.color(code-red);
15
15
  transform: translateY(-50%);
16
16
  pointer-events: none;
17
17
  }
18
18
 
19
19
  &__label,
20
20
  &__error {
21
- @include text(body1);
21
+ @include om.text(body1);
22
22
  }
23
23
 
24
24
  &__label {
25
- color: color(cement);
25
+ color: om.color(cement);
26
26
  }
27
27
 
28
28
  &__error {
29
- color: color(code-red);
29
+ color: om.color(code-red);
30
30
  // Offset error border-thickness
31
31
  padding-top: 1px;
32
32
  }
@@ -1,11 +1,11 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Label {
4
- @include text(body1);
4
+ @include om.text(body1);
5
5
 
6
- color: color(cement);
6
+ color: om.color(cement);
7
7
 
8
8
  &--hidden {
9
- @include visually-hidden();
9
+ @include om.visually-hidden();
10
10
  }
11
11
  }
@@ -1,7 +1,7 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Loading {
4
- padding: space(5);
4
+ padding: om.space(5);
5
5
  display: flex;
6
6
  align-items: center;
7
7
  justify-content: center;
@@ -13,8 +13,8 @@
13
13
  .Diamond,
14
14
  .ArcWindow,
15
15
  .Circle {
16
- width: space(7);
17
- height: space(7);
16
+ width: om.space(7);
17
+ height: om.space(7);
18
18
  opacity: 1;
19
19
  animation: fade 1s linear;
20
20
  }
@@ -1,5 +1,5 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .LoadingBalls {
4
- fill: color(ink);
4
+ fill: om.color(ink);
5
5
  }
@@ -1,9 +1,9 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .LoadingShapes__item--current {
4
4
  // stylelint-disable-next-line plugin/selector-bem-pattern
5
5
  path {
6
- fill: color('snow');
6
+ fill: om.color('snow');
7
7
  transition: fill 1s;
8
8
  }
9
9
  }
@@ -1,4 +1,4 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Modal {
4
4
  position: fixed;
@@ -1,15 +1,15 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .ModalOverlay {
4
4
  background: rgba(255, 255, 255, 0.9);
5
- padding: spacing(8, 6);
5
+ padding: om.spacing(8, 6);
6
6
 
7
- @include breakpoint(sm, $prop: max-width) {
8
- padding: spacing(8, 4);
7
+ @include om.breakpoint(sm, $prop: max-width) {
8
+ padding: om.spacing(8, 4);
9
9
  }
10
10
 
11
- @include breakpoint(xs, $prop: max-width) {
12
- padding: spacing(8, 2);
11
+ @include om.breakpoint(xs, $prop: max-width) {
12
+ padding: om.spacing(8, 2);
13
13
  }
14
14
 
15
15
  &__content {
@@ -1,17 +1,17 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Overlay {
4
- @include stack(2);
4
+ @include om.stack(2);
5
5
 
6
6
  position: absolute;
7
7
  top: 0;
8
8
  right: 0;
9
9
  bottom: 0;
10
10
  left: 0;
11
- background-color: color('snow', 0.9);
11
+ background-color: om.color('snow', 0.9);
12
12
  justify-content: center;
13
13
  align-items: center;
14
- color: color('ink');
14
+ color: om.color('ink');
15
15
  animation: slow-in 0.5s;
16
16
 
17
17
  @keyframes slow-in {
@@ -1,21 +1,21 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Paginator {
4
4
  display: flex;
5
5
  justify-content: center;
6
6
 
7
7
  &__button {
8
- @include text(body1);
8
+ @include om.text(body1);
9
9
 
10
10
  border: none;
11
- height: space(6);
12
- width: space(6);
11
+ height: om.space(6);
12
+ width: om.space(6);
13
13
  display: flex;
14
14
  justify-content: center;
15
15
  align-items: center;
16
16
  cursor: pointer;
17
- margin-right: space(1);
18
- margin-left: space(1);
17
+ margin-right: om.space(1);
18
+ margin-left: om.space(1);
19
19
  background-color: transparent;
20
20
 
21
21
  &:first-child {
@@ -27,7 +27,7 @@
27
27
  }
28
28
 
29
29
  &:hover {
30
- background-color: color(noise);
30
+ background-color: om.color(noise);
31
31
  }
32
32
 
33
33
  &--next,
@@ -36,16 +36,16 @@
36
36
  }
37
37
 
38
38
  &--currentPage {
39
- background-color: color(noise);
39
+ background-color: om.color(noise);
40
40
  }
41
41
  }
42
42
 
43
43
  &__next-chevron {
44
- margin-left: space(2);
44
+ margin-left: om.space(2);
45
45
  }
46
46
 
47
47
  &__previous-chevron {
48
- margin-right: space(2);
48
+ margin-right: om.space(2);
49
49
  }
50
50
 
51
51
  &__button--ellipsis {
@@ -1,4 +1,4 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .PasswordInput {
4
4
  position: relative;
@@ -9,10 +9,10 @@
9
9
 
10
10
  &__password-action {
11
11
  position: absolute;
12
- top: space(2);
13
- right: space(6);
12
+ top: om.space(2);
13
+ right: om.space(6);
14
14
 
15
- @include breakpoint(sm, $prop: max-width) {
15
+ @include om.breakpoint(sm, $prop: max-width) {
16
16
  top: 0.7rem;
17
17
  }
18
18
  }
@@ -1,17 +1,17 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .Popover {
4
4
  $self: &;
5
- $caret-size: space(2);
5
+ $caret-size: om.space(2);
6
6
  $border-width: calc(1rem / 16);
7
- $offset: space(2);
7
+ $offset: om.space(2);
8
8
 
9
9
  position: relative;
10
10
 
11
11
  &__content {
12
12
  position: absolute;
13
- background-color: color('snow');
14
- border: $border-width solid color(elephant);
13
+ background-color: om.color('snow');
14
+ border: $border-width solid om.color(elephant);
15
15
  z-index: 1;
16
16
 
17
17
  // Fills space of offset so hover works without issue
@@ -119,11 +119,11 @@
119
119
  top: auto;
120
120
  bottom: -($border-width + $offset);
121
121
  border-top: none;
122
- border-bottom: $caret-size solid color('snow');
122
+ border-bottom: $caret-size solid om.color('snow');
123
123
  }
124
124
 
125
125
  &:before {
126
- border-bottom: $caret-size solid color(ink);
126
+ border-bottom: $caret-size solid om.color(ink);
127
127
  }
128
128
  }
129
129
  }
@@ -137,12 +137,12 @@
137
137
  &:before {
138
138
  top: -($border-width + $offset);
139
139
  bottom: auto;
140
- border-top: $caret-size solid color('snow');
140
+ border-top: $caret-size solid om.color('snow');
141
141
  border-bottom: none;
142
142
  }
143
143
 
144
144
  &:before {
145
- border-top: $caret-size solid color(ink);
145
+ border-top: $caret-size solid om.color(ink);
146
146
  }
147
147
  }
148
148
  }
@@ -1,12 +1,12 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .PromoBanner {
4
4
  $self: &;
5
5
 
6
- @include text(body2);
6
+ @include om.text(body2);
7
7
 
8
- background-color: color(cream);
9
- border-top: space(1) solid color(burnt-orange);
8
+ background-color: om.color(cream);
9
+ border-top: om.space(1) solid om.color(burnt-orange);
10
10
 
11
11
  &__constrain {
12
12
  display: flex;
@@ -15,8 +15,8 @@
15
15
  }
16
16
 
17
17
  &__child {
18
- min-width: space(11);
19
- padding: spacing(2, 3);
18
+ min-width: om.space(11);
19
+ padding: om.spacing(2, 3);
20
20
 
21
21
  &--center {
22
22
  flex: 1;
@@ -33,13 +33,13 @@
33
33
  }
34
34
 
35
35
  > a {
36
- color: color(ink);
36
+ color: om.color(ink);
37
37
 
38
- @include thin-underline();
38
+ @include om.thin-underline();
39
39
  }
40
40
  }
41
41
 
42
- @include breakpoint(sm, $prop: max-width) {
42
+ @include om.breakpoint(sm, $prop: max-width) {
43
43
  #{$self}__child--left,
44
44
  #{$self}__child--right {
45
45
  display: none;
@@ -1,16 +1,16 @@
1
- @import '~om';
1
+ @use '~@moda/om';
2
2
 
3
3
  .RadioButton {
4
- $radio-button-size: space(4);
5
- $radio-button-check-offset: space(1);
4
+ $radio-button-size: om.space(4);
5
+ $radio-button-check-offset: om.space(1);
6
6
 
7
- @include stack(2, $direction: horizontal);
7
+ @include om.stack(2, $direction: horizontal);
8
8
 
9
9
  position: relative;
10
10
  align-items: center;
11
11
  user-select: none;
12
12
  cursor: pointer;
13
- color: color(ink);
13
+ color: om.color(ink);
14
14
 
15
15
  &__indicator {
16
16
  position: relative;
@@ -19,10 +19,10 @@
19
19
  flex-shrink: 0;
20
20
  border: 1px solid;
21
21
  border-radius: 50%;
22
- background-color: color('snow');
22
+ background-color: om.color('snow');
23
23
 
24
24
  &--checked {
25
- background-color: color(ink);
25
+ background-color: om.color(ink);
26
26
 
27
27
  &::after {
28
28
  content: '';
@@ -33,27 +33,27 @@
33
33
  bottom: $radio-button-check-offset;
34
34
  left: $radio-button-check-offset;
35
35
  border-radius: 50%;
36
- background-color: color('snow');
36
+ background-color: om.color('snow');
37
37
  }
38
38
  }
39
39
 
40
40
  &--disabled {
41
- color: color(elephant);
41
+ color: om.color(elephant);
42
42
  pointer-events: none;
43
- background-color: color('snow');
43
+ background-color: om.color('snow');
44
44
  &::after {
45
- background-color: color(elephant);
45
+ background-color: om.color(elephant);
46
46
  }
47
47
  }
48
48
  }
49
49
 
50
50
  &__input {
51
- @include visually-hidden();
51
+ @include om.visually-hidden();
52
52
  }
53
53
 
54
54
  &__label {
55
- @include text(body1);
55
+ @include om.text(body1);
56
56
 
57
- color: color(ink);
57
+ color: om.color(ink);
58
58
  }
59
59
  }