@mezzanine-ui/core 1.0.0-rc.2 → 1.0.0-rc.4

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.
@@ -1,5 +1,5 @@
1
- import { Size } from '@mezzanine-ui/system/size';
2
- export type AutoCompleteInputSize = Size;
1
+ import { GeneralSize } from '@mezzanine-ui/system/size';
2
+ export type AutoCompleteInputSize = GeneralSize;
3
3
  export type AutoCompleteMode = 'single' | 'multiple';
4
4
  export type AutoCompleteTriggerType = 'default' | 'error';
5
5
  export type AutoCompleteSelector = 'input' | 'selection';
@@ -20,7 +20,9 @@
20
20
  @include button.reset();
21
21
 
22
22
  border-radius: radius.variable(tiny);
23
+ line-height: 0;
23
24
  position: relative;
25
+ transition: transition.standard(background-color, fast), transition.standard(box-shadow, fast);
24
26
 
25
27
  & > :first-child {
26
28
  color: palette.semantic-variable(icon, neutral);
@@ -28,8 +30,13 @@
28
30
  }
29
31
 
30
32
  &:focus-visible {
33
+ background-color: palette.semantic-variable('background', base);
31
34
  box-shadow: effect.variable(focus, primary);
32
35
  }
36
+
37
+ &:hover > :first-child {
38
+ color: palette.semantic-variable(icon, brand);
39
+ }
33
40
  }
34
41
 
35
42
  &__menu {
@@ -67,8 +74,17 @@
67
74
  white-space: nowrap;
68
75
 
69
76
  &:focus-visible {
77
+ background-color: palette.semantic-variable('background', base);
70
78
  box-shadow: effect.variable(focus, primary);
71
79
  }
80
+
81
+ &:hover {
82
+ color: palette.semantic-variable(text, brand);
83
+
84
+ .#{$prefix}__item__icon {
85
+ color: palette.semantic-variable(icon, brand);
86
+ }
87
+ }
72
88
  }
73
89
 
74
90
  &__icon {
@@ -79,6 +95,14 @@
79
95
  &--current {
80
96
  .#{$prefix}__item__trigger {
81
97
  color: palette.semantic-variable(text, neutral-solid);
98
+
99
+ &:hover {
100
+ color: palette.semantic-variable(text, neutral-solid);
101
+
102
+ .#{$prefix}__item__icon {
103
+ color: palette.semantic-variable(icon, neutral);
104
+ }
105
+ }
82
106
  }
83
107
  }
84
108
 
@@ -89,6 +113,14 @@
89
113
  .#{$prefix}__item__icon {
90
114
  color: palette.semantic-variable(icon, neutral-solid);
91
115
  }
116
+
117
+ &:hover {
118
+ color: palette.semantic-variable(text, neutral-solid);
119
+
120
+ .#{$prefix}__item__icon {
121
+ color: palette.semantic-variable(icon, neutral-solid);
122
+ }
123
+ }
92
124
  }
93
125
  }
94
126
  }
@@ -134,13 +166,3 @@
134
166
  }
135
167
  }
136
168
  }
137
-
138
- a.#{$prefix}__item, button.#{$prefix}__item:not(.#{$prefix}__item--expanded) {
139
- &:hover {
140
- color: palette.semantic-variable(text, brand);
141
-
142
- .#{$prefix}__item__icon {
143
- color: palette.semantic-variable(icon, brand);
144
- }
145
- }
146
- }
@@ -56,6 +56,8 @@
56
56
  }
57
57
 
58
58
  &--sub {
59
+ gap: spacing.semantic-variable(gap, base);
60
+
59
61
  .#{$prefix}__action-area {
60
62
  gap: spacing.semantic-variable(gap, base);
61
63
  }
@@ -352,13 +352,21 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
352
352
  }
353
353
  }
354
354
 
355
- &--active.#{$option-prefix}--open {
355
+ &--active:not(.#{$option-prefix}--open):not(.#{$option-prefix}--basic) {
356
356
  & > .#{$option-prefix}__content {
357
357
  background-color: palette.semantic-variable('background', brand-ghost);
358
+
359
+ .#{$option-prefix}__title {
360
+ color: palette.semantic-variable(text, neutral-solid);
361
+ }
362
+
363
+ .#{$option-prefix}__icon {
364
+ color: palette.semantic-variable(icon, neutral-solid);
365
+ }
358
366
  }
359
367
  }
360
368
 
361
- &--active {
369
+ &--active.#{$option-prefix}--open {
362
370
  & > .#{$option-prefix}__content {
363
371
  .#{$option-prefix}__title {
364
372
  color: palette.semantic-variable(text, brand);
@@ -367,6 +375,10 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
367
375
  .#{$option-prefix}__icon {
368
376
  color: palette.semantic-variable(icon, brand);
369
377
  }
378
+
379
+ .#{$option-prefix}__toggle-icon {
380
+ color: palette.semantic-variable(icon, neutral-solid);
381
+ }
370
382
  }
371
383
  }
372
384
 
@@ -388,6 +400,7 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
388
400
  @include utils.reset();
389
401
 
390
402
  display: grid;
403
+ gap: spacing.semantic-variable(gap, tight);
391
404
  }
392
405
 
393
406
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/core",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.4",
4
4
  "description": "Core for mezzanine-ui",
5
5
  "author": "Mezzanine",
6
6
  "repository": {
@@ -40,8 +40,8 @@
40
40
  }
41
41
  },
42
42
  "dependencies": {
43
- "@mezzanine-ui/icons": "1.0.0-rc.2",
44
- "@mezzanine-ui/system": "1.0.0-rc.2",
43
+ "@mezzanine-ui/icons": "1.0.0-rc.4",
44
+ "@mezzanine-ui/system": "1.0.0-rc.4",
45
45
  "lodash": "^4.17.21",
46
46
  "tslib": "^2.8.1"
47
47
  },
@@ -1,5 +1,8 @@
1
1
  @use 'sass:map';
2
+ @use '~@mezzanine-ui/system/effect' as effect;
3
+ @use '~@mezzanine-ui/system/motion' as motion;
2
4
  @use '~@mezzanine-ui/system/palette';
5
+ @use '~@mezzanine-ui/system/radius';
3
6
  @use '~@mezzanine-ui/system/spacing';
4
7
  @use '~@mezzanine-ui/system/transition';
5
8
  @use '~@mezzanine-ui/system/typography';
@@ -70,9 +73,29 @@ $status-colors: (
70
73
 
71
74
  $dotBoxShadowMargin: #{spacing.semantic-variable(size, element, tiny)};
72
75
 
76
+ @keyframes stepper-dot-breath {
77
+ 0% {
78
+ box-shadow: 0 0 0 0 transparent;
79
+ }
80
+
81
+ 50% {
82
+ box-shadow: 0 0 0 #{$dotBoxShadowMargin} palette.semantic-variable(background, brand-subtle);
83
+ }
84
+
85
+ 100% {
86
+ box-shadow: 0 0 0 #{$dotBoxShadowMargin} transparent;
87
+ }
88
+ }
89
+
73
90
  .#{$prefix-step} {
74
91
  &--interactive {
92
+ border-radius: radius.variable(base);
75
93
  cursor: pointer;
94
+ outline: none;
95
+
96
+ &:focus-visible {
97
+ box-shadow: effect.variable(focus, primary);
98
+ }
76
99
  }
77
100
 
78
101
  // transitions
@@ -253,6 +276,17 @@ $dotBoxShadowMargin: #{spacing.semantic-variable(size, element, tiny)};
253
276
  }
254
277
  }
255
278
 
279
+ &--dot {
280
+ &.#{$prefix-step}--processing {
281
+ .#{$prefix-step}__status-indicator-dot {
282
+ @include motion.pattern(breathe, animation);
283
+
284
+ animation-iteration-count: infinite;
285
+ animation-name: stepper-dot-breath;
286
+ }
287
+ }
288
+ }
289
+
256
290
  &__status-indicator {
257
291
  width: spacing.semantic-variable(size, element, relaxed);
258
292
  height: spacing.semantic-variable(size, element, relaxed);
@@ -26,19 +26,33 @@
26
26
  position: absolute;
27
27
  }
28
28
 
29
+ &.#{$prefix}--main {
30
+ padding: spacing.semantic-variable(padding, vertical, spacious) spacing.semantic-variable(padding, horizontal, spacious) 0;
31
+ }
32
+
29
33
  .#{$prefix}__item {
30
34
  padding: spacing.semantic-variable(padding, vertical, base) 0 spacing.semantic-variable(padding, vertical, comfort);
31
35
  }
32
36
 
37
+ &.#{$prefix}--sub .#{$prefix}__item {
38
+ padding: spacing.semantic-variable(padding, vertical, tight) 0 spacing.semantic-variable(padding, vertical, calm);
39
+ }
40
+
33
41
  .#{$prefix}__active-bar {
34
42
  border-bottom: spacing.semantic-variable(size, element, hairline) solid palette.semantic-variable(border, brand);
35
43
  bottom: 0;
36
44
  height: spacing.semantic-variable(size, element, hairline);
37
45
  left: var(--active-bar-shift, 0);
38
46
  position: absolute;
39
- transition: transition.standard(left, moderate), transition.standard(width, moderate);
47
+ transition: transition.standard(left, moderate), transition.standard(width, moderate), transition.standard(border-color, fast);
40
48
  width: var(--active-bar-length, 0);
41
49
  }
50
+
51
+ &:has(.#{$prefix}__item--active.#{$prefix}__item--error) {
52
+ .#{$prefix}__active-bar {
53
+ border-bottom-color: palette.semantic-variable(border, error);
54
+ }
55
+ }
42
56
  }
43
57
 
44
58
  &--vertical {
@@ -55,11 +69,19 @@
55
69
  position: absolute;
56
70
  }
57
71
 
72
+ &.#{$prefix}--main {
73
+ padding: 0 0 0 spacing.semantic-variable(padding, horizontal, spacious);
74
+ }
75
+
58
76
  .#{$prefix}__item {
59
77
  padding: spacing.semantic-variable(padding, vertical, calm) spacing.semantic-variable(padding, horizontal, base) spacing.semantic-variable(padding, vertical, calm) 0;
60
78
  width: fit-content;
61
79
  }
62
80
 
81
+ &.#{$prefix}--sub .#{$prefix}__item {
82
+ padding: spacing.semantic-variable(padding, vertical, base) spacing.semantic-variable(padding, horizontal, base) spacing.semantic-variable(padding, vertical, base) 0;
83
+ }
84
+
63
85
  .#{$prefix}__active-bar {
64
86
  $vertical-spacing: spacing.semantic-variable(padding, vertical, tiny);
65
87
 
@@ -68,9 +90,15 @@
68
90
  position: absolute;
69
91
  right: 0;
70
92
  top: calc(var(--active-bar-shift, 0) + #{$vertical-spacing});
71
- transition: transition.standard(top, moderate), transition.standard(height, moderate);
93
+ transition: transition.standard(top, moderate), transition.standard(height, moderate), transition.standard(border-color, fast);
72
94
  width: spacing.semantic-variable(size, element, hairline);
73
95
  }
96
+
97
+ &:has(.#{$prefix}__item--active.#{$prefix}__item--error) {
98
+ .#{$prefix}__active-bar {
99
+ border-right-color: palette.semantic-variable(border, error);
100
+ }
101
+ }
74
102
  }
75
103
 
76
104
  &__item {
@@ -81,10 +109,12 @@
81
109
  box-sizing: border-box;
82
110
  color: palette.semantic-variable(text, neutral-strong);
83
111
  display: flex;
112
+ transition: transition.standard(color, fast);
84
113
 
85
114
  &__icon {
86
115
  color: palette.semantic-variable(icon, neutral-strong);
87
116
  margin-right: spacing.semantic-variable(gap, base);
117
+ transition: transition.standard(color, fast);
88
118
  }
89
119
 
90
120
  &__badge {
@@ -92,7 +122,7 @@
92
122
  }
93
123
 
94
124
  &:hover:not(&--active) {
95
- color: palette.semantic-variable(text, neutral-solid);
125
+ color: palette.semantic-variable(text, brand);
96
126
 
97
127
  .#{$prefix}__item__icon {
98
128
  color: palette.semantic-variable(icon, brand);
@@ -120,6 +150,14 @@
120
150
  }
121
151
  }
122
152
 
153
+ &--error {
154
+ color: palette.semantic-variable(text, error);
155
+
156
+ .#{$prefix}__item__icon {
157
+ color: palette.semantic-variable(icon, error);
158
+ }
159
+ }
160
+
123
161
  &:disabled {
124
162
  color: palette.semantic-variable(text, neutral-light);
125
163
  cursor: default;
package/tab/tab.d.ts CHANGED
@@ -3,9 +3,12 @@ export declare const tabClasses: {
3
3
  readonly host: "mzn-tab";
4
4
  readonly tabHorizontal: "mzn-tab--horizontal";
5
5
  readonly tabVertical: "mzn-tab--vertical";
6
+ readonly tabSizeMain: "mzn-tab--main";
7
+ readonly tabSizeSub: "mzn-tab--sub";
6
8
  readonly tabActiveBar: "mzn-tab__active-bar";
7
9
  readonly tabItem: "mzn-tab__item";
8
10
  readonly tabItemActive: "mzn-tab__item--active";
11
+ readonly tabItemError: "mzn-tab__item--error";
9
12
  readonly tabItemIcon: "mzn-tab__item__icon";
10
13
  readonly tabItemBadge: "mzn-tab__item__badge";
11
14
  };
package/tab/tab.js CHANGED
@@ -3,9 +3,12 @@ const tabClasses = {
3
3
  host: tabPrefix,
4
4
  tabHorizontal: `${tabPrefix}--horizontal`,
5
5
  tabVertical: `${tabPrefix}--vertical`,
6
+ tabSizeMain: `${tabPrefix}--main`,
7
+ tabSizeSub: `${tabPrefix}--sub`,
6
8
  tabActiveBar: `${tabPrefix}__active-bar`,
7
9
  tabItem: `${tabPrefix}__item`,
8
10
  tabItemActive: `${tabPrefix}__item--active`,
11
+ tabItemError: `${tabPrefix}__item--error`,
9
12
  tabItemIcon: `${tabPrefix}__item__icon`,
10
13
  tabItemBadge: `${tabPrefix}__item__badge`,
11
14
  };
@@ -337,6 +337,24 @@ $z-index-config: (
337
337
  }
338
338
  }
339
339
 
340
+ &--state-added {
341
+ td {
342
+ background-color: palette.semantic-variable("background", brand-ghost);
343
+ }
344
+ }
345
+
346
+ &--state-deleted {
347
+ td {
348
+ background-color: palette.semantic-variable("background", error-ghost);
349
+ }
350
+ }
351
+
352
+ &--state-disabled {
353
+ td {
354
+ background-color: palette.semantic-variable("background", neutral-subtle);
355
+ }
356
+ }
357
+
340
358
  &--zebra {
341
359
  td {
342
360
  background-color: palette.semantic-variable("background", neutral-ghost);
package/table/table.d.ts CHANGED
@@ -21,6 +21,9 @@ export declare const tableClasses: {
21
21
  readonly bodyRowSelected: "mzn-table__body__row--selected";
22
22
  readonly bodyRowSeparator: "mzn-table__body__row--separator";
23
23
  readonly bodyRowZebra: "mzn-table__body__row--zebra";
24
+ readonly bodyRowStateAdded: "mzn-table__body__row--state-added";
25
+ readonly bodyRowStateDeleted: "mzn-table__body__row--state-deleted";
26
+ readonly bodyRowStateDisabled: "mzn-table__body__row--state-disabled";
24
27
  readonly bulkActions: "mzn-table__bulk-actions";
25
28
  readonly bulkActionsFixed: "mzn-table__bulk-actions--fixed";
26
29
  readonly bulkActionsSelectionSummary: "mzn-table__bulk-actions__selection-summary";
@@ -93,6 +96,8 @@ export type HighlightMode = 'cell' | 'column' | 'row' | 'cross';
93
96
  export type FixedType = boolean | 'start' | 'end';
94
97
  /** Table size type */
95
98
  export type TableSize = 'main' | 'sub';
99
+ /** Row state for semantic background color overrides */
100
+ export type TableRowState = 'added' | 'deleted' | 'disabled';
96
101
  /**
97
102
  * Title menu configuration for table column header dropdown
98
103
  */
package/table/table.js CHANGED
@@ -17,6 +17,9 @@ const tableClasses = {
17
17
  bodyRowSelected: `${tableBodyPrefix}__row--selected`,
18
18
  bodyRowSeparator: `${tableBodyPrefix}__row--separator`,
19
19
  bodyRowZebra: `${tableBodyPrefix}__row--zebra`,
20
+ bodyRowStateAdded: `${tableBodyPrefix}__row--state-added`,
21
+ bodyRowStateDeleted: `${tableBodyPrefix}__row--state-deleted`,
22
+ bodyRowStateDisabled: `${tableBodyPrefix}__row--state-disabled`,
20
23
  bulkActions: `${tablePrefix}__bulk-actions`,
21
24
  bulkActionsFixed: `${tablePrefix}__bulk-actions--fixed`,
22
25
  bulkActionsSelectionSummary: `${tablePrefix}__bulk-actions__selection-summary`,
@@ -323,6 +323,38 @@ $size-configs: (
323
323
  }
324
324
  }
325
325
 
326
+ &--clearing {
327
+ & > .#{$prefix}__clear-icon {
328
+ opacity: 1;
329
+ pointer-events: auto;
330
+ }
331
+
332
+ .#{$prefix}__suffix--overlay {
333
+ .#{$prefix}__suffix-content {
334
+ opacity: 0;
335
+ pointer-events: none;
336
+ }
337
+
338
+ .#{$prefix}__clear-icon {
339
+ opacity: 1;
340
+ pointer-events: auto;
341
+ }
342
+ }
343
+ }
344
+
345
+ &__suffix--overlay {
346
+ display: grid;
347
+
348
+ .#{$prefix}__suffix-content,
349
+ .#{$prefix}__clear-icon {
350
+ grid-area: 1 / 1;
351
+ }
352
+ }
353
+
354
+ &__suffix-content {
355
+ transition: transition.standard(opacity, fast);
356
+ }
357
+
326
358
  &--disabled {
327
359
  cursor: not-allowed;
328
360
  pointer-events: none;
@@ -7,6 +7,9 @@ export declare const textFieldClasses: {
7
7
  readonly active: "mzn-text-field--active";
8
8
  readonly clearIcon: "mzn-text-field__clear-icon";
9
9
  readonly clearable: "mzn-text-field--clearable";
10
+ readonly clearing: "mzn-text-field--clearing";
11
+ readonly suffixContent: "mzn-text-field__suffix-content";
12
+ readonly suffixOverlay: "mzn-text-field__suffix--overlay";
10
13
  readonly disabled: "mzn-text-field--disabled";
11
14
  readonly error: "mzn-text-field--error";
12
15
  readonly fullWidth: "mzn-text-field--full-width";
@@ -5,6 +5,9 @@ const textFieldClasses = {
5
5
  active: `${textFieldPrefix}--active`,
6
6
  clearIcon: `${textFieldPrefix}__clear-icon`,
7
7
  clearable: `${textFieldPrefix}--clearable`,
8
+ clearing: `${textFieldPrefix}--clearing`,
9
+ suffixContent: `${textFieldPrefix}__suffix-content`,
10
+ suffixOverlay: `${textFieldPrefix}__suffix--overlay`,
8
11
  disabled: `${textFieldPrefix}--disabled`,
9
12
  error: `${textFieldPrefix}--error`,
10
13
  fullWidth: `${textFieldPrefix}--full-width`,