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

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 (43) hide show
  1. package/_styles.scss +1 -0
  2. package/badge/_badge-styles.scss +9 -1
  3. package/badge/badge.d.ts +3 -1
  4. package/badge/badge.js +2 -1
  5. package/button/_button-styles.scss +5 -1
  6. package/calendar/_calendar-styles.scss +8 -23
  7. package/cascader/_cascader-styles.scss +140 -0
  8. package/cascader/_cascader.scss +4 -0
  9. package/cascader/_index.scss +1 -0
  10. package/cascader/cascader.d.ts +18 -0
  11. package/cascader/cascader.js +18 -0
  12. package/cascader/index.d.ts +1 -0
  13. package/cascader/index.js +1 -0
  14. package/checkbox/_checkbox-styles.scss +10 -2
  15. package/clear-actions/_clear-actions-styles.scss +5 -1
  16. package/empty/_empty-styles.scss +5 -1
  17. package/floating-button/_floating-button-styles.scss +5 -1
  18. package/inline-message/_inline-message-styles.scss +14 -6
  19. package/layout/_layout-styles.scss +40 -16
  20. package/layout/layout.d.ts +6 -1
  21. package/layout/layout.js +6 -1
  22. package/modal/_modal-styles.scss +0 -4
  23. package/modal/modal.d.ts +0 -1
  24. package/modal/modal.js +0 -1
  25. package/navigation/_navigation-styles.scss +36 -17
  26. package/navigation/navigation.d.ts +1 -0
  27. package/navigation/navigation.js +1 -0
  28. package/package.json +3 -3
  29. package/page-footer/_page-footer-styles.scss +1 -1
  30. package/picker/_picker-styles.scss +4 -0
  31. package/picker/picker.d.ts +1 -0
  32. package/picker/picker.js +1 -0
  33. package/progress/_progress-styles.scss +10 -2
  34. package/section/_section-styles.scss +4 -0
  35. package/section/section.d.ts +1 -0
  36. package/section/section.js +1 -0
  37. package/stepper/_stepper-styles.scss +5 -1
  38. package/tag/_tag-styles.scss +4 -1
  39. package/text-field/_text-field-styles.scss +5 -1
  40. package/toggle/_toggle-styles.scss +10 -2
  41. package/upload/_upload-picture-card-styles.scss +43 -0
  42. package/upload/uploadPictureCard.d.ts +2 -0
  43. package/upload/uploadPictureCard.js +2 -0
package/_styles.scss CHANGED
@@ -86,6 +86,7 @@
86
86
  @include _load-styles($options, date-time-range-picker);
87
87
  @include _load-styles($options, slider);
88
88
  @include _load-styles($options, dropdown);
89
+ @include _load-styles($options, cascader);
89
90
 
90
91
  // Data Entry Form
91
92
  @include _load-styles($options, form, form-field);
@@ -71,7 +71,7 @@ $count-type-config: (
71
71
  &.#{$prefix}--dot-#{$type} {
72
72
  @include typography.semantic-variable(body);
73
73
 
74
- column-gap: spacing.semantic-variable(gap, base);
74
+ column-gap: spacing.semantic-variable(gap, tight-fixed);
75
75
  color: map.get($dot-type-config, $type, text-color);
76
76
 
77
77
  &::before {
@@ -81,6 +81,10 @@ $count-type-config: (
81
81
  border-radius: radius.variable(full);
82
82
  background-color: map.get($dot-type-config, $type, icon-color);
83
83
  }
84
+
85
+ &.#{$prefix}--sub {
86
+ @include typography.semantic-variable(caption);
87
+ }
84
88
  }
85
89
  }
86
90
 
@@ -90,6 +94,10 @@ $count-type-config: (
90
94
 
91
95
  column-gap: spacing.semantic-variable(gap, base);
92
96
  color: map.get($dot-type-config, $type, text-color);
97
+
98
+ &.#{$prefix}--sub {
99
+ @include typography.semantic-variable(caption);
100
+ }
93
101
  }
94
102
  }
95
103
 
package/badge/badge.d.ts CHANGED
@@ -3,9 +3,11 @@ export type BadgeVariant = BadgeDotVariant | BadgeCountVariant | BadgeTextVarian
3
3
  export type BadgeTextVariant = 'text-success' | 'text-error' | 'text-warning' | 'text-info' | 'text-inactive';
4
4
  export type BadgeDotVariant = 'dot-success' | 'dot-error' | 'dot-warning' | 'dot-info' | 'dot-inactive';
5
5
  export type BadgeCountVariant = 'count-alert' | 'count-inactive' | 'count-inverse' | 'count-brand' | 'count-info';
6
+ export type BadgeTextSize = 'main' | 'sub';
6
7
  export declare const badgeClasses: {
7
8
  readonly host: "mzn-badge";
8
9
  readonly variant: (variant: BadgeDotVariant | BadgeCountVariant | BadgeTextVariant) => string;
9
- readonly container: (hasChilden: boolean) => "mzn-badge__container--has-children" | "mzn-badge__container";
10
+ readonly size: (size: BadgeTextSize) => string;
11
+ readonly container: (hasChildren: boolean) => "mzn-badge__container--has-children" | "mzn-badge__container";
10
12
  readonly hide: "mzn-badge--hide";
11
13
  };
package/badge/badge.js CHANGED
@@ -2,7 +2,8 @@ const badgePrefix = 'mzn-badge';
2
2
  const badgeClasses = {
3
3
  host: badgePrefix,
4
4
  variant: (variant) => `${badgePrefix}--${variant}`,
5
- container: (hasChilden) => hasChilden
5
+ size: (size) => `${badgePrefix}--${size}`,
6
+ container: (hasChildren) => hasChildren
6
7
  ? `${badgePrefix}__container--has-children`
7
8
  : `${badgePrefix}__container`,
8
9
  hide: `${badgePrefix}--hide`,
@@ -685,7 +685,11 @@ $size-configs: (
685
685
  @if $hierarchy-map {
686
686
  $value: map.get($hierarchy-map, $property);
687
687
 
688
- @return if($value == none, null, $value);
688
+ @if $value == none {
689
+ @return null;
690
+ } @else {
691
+ @return $value;
692
+ }
689
693
  }
690
694
  }
691
695
 
@@ -162,7 +162,6 @@
162
162
  }
163
163
 
164
164
  .#{$cell-prefix} {
165
- --today-dot-color: #{palette.semantic-variable(icon, brand)};
166
165
  --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, neutral-solid)};
167
166
 
168
167
  position: relative;
@@ -178,6 +177,11 @@
178
177
  &--mode-week {
179
178
  width: spacing.semantic-variable(size, element, loose);
180
179
  height: spacing.semantic-variable(size, element, loose);
180
+
181
+ &.#{$cell-prefix}--with-annotation {
182
+ width: spacing.semantic-variable(size, element, extra-wide);
183
+ height: spacing.semantic-variable(size, element, extra-wide);
184
+ }
181
185
  }
182
186
 
183
187
  &--mode-month,
@@ -209,7 +213,7 @@
209
213
  }
210
214
 
211
215
  &--weekend {
212
- --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, brand)};
216
+ --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, neutral)};
213
217
  }
214
218
 
215
219
  &--range-start {
@@ -223,7 +227,6 @@
223
227
  }
224
228
 
225
229
  &--active {
226
- --today-dot-color: #{palette.semantic-variable(icon, fixed-light)};
227
230
  --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, neutral-solid)};
228
231
  }
229
232
 
@@ -237,27 +240,9 @@
237
240
  }
238
241
 
239
242
  &--today {
240
- &::after {
241
- position: absolute;
242
- bottom: 7px;
243
- left: 50%;
244
- z-index: 1;
245
- transform: translateX(-50%);
246
- content: '';
247
- width: spacing.semantic-variable(size, element, micro);
248
- height: spacing.semantic-variable(size, element, micro);
249
- border-radius: 1px;
250
- background-color: var(--today-dot-color);
251
- pointer-events: none;
252
- }
253
-
254
- &.#{$cell-prefix}--with-annotation::after {
255
- display: none;
256
- }
243
+ --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, brand)};
257
244
 
258
- &.#{$cell-prefix}--with-annotation {
259
- --#{$cell-prefix}-text-color: #{palette.semantic-variable(text, brand)};
260
- }
245
+ @include typography.semantic-variable(input-highlight);
261
246
  }
262
247
  }
263
248
 
@@ -0,0 +1,140 @@
1
+ @use 'sass:map';
2
+ @use '~@mezzanine-ui/system/palette' as palette;
3
+ @use '~@mezzanine-ui/system/spacing' as spacing;
4
+ @use '~@mezzanine-ui/system/radius' as radius;
5
+ @use '~@mezzanine-ui/system/effect' as effect;
6
+ @use '~@mezzanine-ui/system/transition' as transition;
7
+ @use '~@mezzanine-ui/system/typography' as typography;
8
+ @use '~@mezzanine-ui/system/motion' as motion;
9
+ @use './cascader' as *;
10
+
11
+ @keyframes #{$prefix}-fade-in {
12
+ from {
13
+ opacity: 0;
14
+ }
15
+
16
+ to {
17
+ opacity: 1;
18
+ }
19
+ }
20
+
21
+ @keyframes #{$prefix}-fade-out {
22
+ from {
23
+ opacity: 1;
24
+ }
25
+
26
+ to {
27
+ opacity: 0;
28
+ }
29
+ }
30
+
31
+ // When trigger shows partial selection (open + navigating), apply brand color to input text.
32
+ // Two-class selector to win over text-field's active state selector.
33
+ .#{$prefix}-trigger--partial.mzn-text-field,
34
+ .#{$prefix}-trigger--partial.mzn-text-field.mzn-text-field--active {
35
+ color: palette.semantic-variable(text, brand);
36
+ }
37
+
38
+ .#{$prefix} {
39
+ position: relative;
40
+ min-width: spacing.semantic-variable(size, container, concentrate-fixed);
41
+
42
+ &--full-width {
43
+ width: 100%;
44
+ }
45
+ }
46
+
47
+ .#{$dropdown-prefix}-panels {
48
+ background-color: palette.semantic-variable('background', base);
49
+ border-radius: radius.variable(roomy);
50
+ box-shadow: effect.variable(shadow, inner-top-and-bottom);
51
+ display: flex;
52
+ flex-direction: row;
53
+ overflow: hidden;
54
+ box-sizing: border-box;
55
+ pointer-events: auto;
56
+ }
57
+
58
+ .#{$panel-prefix} {
59
+ display: flex;
60
+ flex-direction: column;
61
+ width: spacing.semantic-variable(size, container, tight);
62
+ max-height: spacing.semantic-variable(size, container, expanded);
63
+ overflow-y: auto;
64
+ padding: spacing.semantic-variable(padding, vertical, tight)
65
+ spacing.semantic-variable(padding, horizontal, tight);
66
+ box-sizing: border-box;
67
+ animation: #{$prefix}-fade-in motion.duration(fast) motion.easing(standard) both;
68
+
69
+ & + & {
70
+ border-inline-start: 1px solid palette.semantic-variable(separator, neutral-faint);
71
+ }
72
+ }
73
+
74
+ .#{$item-prefix} {
75
+ display: flex;
76
+ align-items: center;
77
+ gap: spacing.semantic-variable(gap, base);
78
+ padding-inline: spacing.semantic-variable(padding, horizontal, base);
79
+ padding-block: spacing.semantic-variable(padding, vertical, base);
80
+ border-radius: radius.variable(base);
81
+ cursor: pointer;
82
+ width: 100%;
83
+ box-sizing: border-box;
84
+ background-color: palette.semantic-variable('background', base);
85
+ list-style: none;
86
+ transition:
87
+ transition.standard(background-color, fast),
88
+ transition.standard(color, fast);
89
+
90
+ &:hover:not(.#{$item-prefix}--active):not(.#{$item-prefix}--disabled) {
91
+ background-color: palette.semantic-variable('background', neutral-faint);
92
+ }
93
+
94
+ &--active {
95
+ background-color: palette.semantic-variable('background', neutral-subtle);
96
+ }
97
+
98
+ &--focused:not(.#{$item-prefix}--disabled) {
99
+ box-shadow: effect.variable(focus, primary);
100
+ position: relative;
101
+ z-index: 1;
102
+ }
103
+
104
+ &--disabled {
105
+ cursor: not-allowed;
106
+
107
+ .#{$item-prefix}-label {
108
+ color: palette.semantic-variable(text, neutral-light);
109
+ }
110
+
111
+ .#{$item-prefix}-append {
112
+ color: palette.semantic-variable(icon, neutral-light);
113
+ }
114
+ }
115
+ }
116
+
117
+ .#{$item-prefix}-label {
118
+ @include typography.semantic-variable(label-primary);
119
+
120
+ flex: 1;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: nowrap;
124
+ color: palette.semantic-variable(text, neutral-solid);
125
+ transition: transition.standard(color, fast);
126
+ font-feature-settings: 'liga' off, 'clig' off;
127
+
128
+ .#{$item-prefix}--selected & {
129
+ color: palette.semantic-variable(text, brand);
130
+ }
131
+ }
132
+
133
+ .#{$item-prefix}-append {
134
+ display: flex;
135
+ align-items: center;
136
+ justify-content: center;
137
+ flex-shrink: 0;
138
+ color: palette.semantic-variable(icon, neutral);
139
+ transition: transition.standard(color, fast);
140
+ }
@@ -0,0 +1,4 @@
1
+ $prefix: mzn-cascader;
2
+ $dropdown-prefix: #{$prefix}-dropdown;
3
+ $panel-prefix: #{$prefix}-panel;
4
+ $item-prefix: #{$prefix}-item;
@@ -0,0 +1 @@
1
+ @forward './cascader';
@@ -0,0 +1,18 @@
1
+ import { TextFieldSize } from '../text-field';
2
+ export type CascaderSize = TextFieldSize;
3
+ export declare const cascaderPrefix = "mzn-cascader";
4
+ export declare const cascaderClasses: {
5
+ readonly host: "mzn-cascader";
6
+ readonly hostFullWidth: "mzn-cascader--full-width";
7
+ readonly dropdown: "mzn-cascader-dropdown";
8
+ readonly dropdownPanels: "mzn-cascader-dropdown-panels";
9
+ readonly panel: "mzn-cascader-panel";
10
+ readonly triggerPartial: "mzn-cascader-trigger--partial";
11
+ readonly item: "mzn-cascader-item";
12
+ readonly itemActive: "mzn-cascader-item--active";
13
+ readonly itemDisabled: "mzn-cascader-item--disabled";
14
+ readonly itemFocused: "mzn-cascader-item--focused";
15
+ readonly itemSelected: "mzn-cascader-item--selected";
16
+ readonly itemLabel: "mzn-cascader-item-label";
17
+ readonly itemAppend: "mzn-cascader-item-append";
18
+ };
@@ -0,0 +1,18 @@
1
+ const cascaderPrefix = 'mzn-cascader';
2
+ const cascaderClasses = {
3
+ host: cascaderPrefix,
4
+ hostFullWidth: `${cascaderPrefix}--full-width`,
5
+ dropdown: `${cascaderPrefix}-dropdown`,
6
+ dropdownPanels: `${cascaderPrefix}-dropdown-panels`,
7
+ panel: `${cascaderPrefix}-panel`,
8
+ triggerPartial: `${cascaderPrefix}-trigger--partial`,
9
+ item: `${cascaderPrefix}-item`,
10
+ itemActive: `${cascaderPrefix}-item--active`,
11
+ itemDisabled: `${cascaderPrefix}-item--disabled`,
12
+ itemFocused: `${cascaderPrefix}-item--focused`,
13
+ itemSelected: `${cascaderPrefix}-item--selected`,
14
+ itemLabel: `${cascaderPrefix}-item-label`,
15
+ itemAppend: `${cascaderPrefix}-item-append`,
16
+ };
17
+
18
+ export { cascaderClasses, cascaderPrefix };
@@ -0,0 +1 @@
1
+ export * from './cascader';
@@ -0,0 +1 @@
1
+ export { cascaderClasses, cascaderPrefix } from './cascader.js';
@@ -83,7 +83,11 @@ $chip-host-states: (
83
83
  @function _get-mode-property($mode-map, $property) {
84
84
  $value: map.get($mode-map, $property);
85
85
 
86
- @return if($value == none, null, $value);
86
+ @if $value == none {
87
+ @return null;
88
+ } @else {
89
+ @return $value;
90
+ }
87
91
  }
88
92
 
89
93
  // Apply mode styles
@@ -214,7 +218,11 @@ $checked-states: (
214
218
  @function _get-state-color($state-map, $property) {
215
219
  $value: map.get($state-map, $property);
216
220
 
217
- @return if($value == none, null, $value);
221
+ @if $value == none {
222
+ @return null;
223
+ } @else {
224
+ @return $value;
225
+ }
218
226
  }
219
227
 
220
228
  // Apply state colors to input
@@ -146,7 +146,11 @@ $variant-hierarchy: (
146
146
  @if $hierarchy-map {
147
147
  $value: map.get($hierarchy-map, $property);
148
148
 
149
- @return if($value == none, null, $value);
149
+ @if $value == none {
150
+ @return null;
151
+ } @else {
152
+ @return $value;
153
+ }
150
154
  }
151
155
  }
152
156
 
@@ -54,7 +54,11 @@ $size-configs: (
54
54
  @if $size-map {
55
55
  $value: map.get($size-map, $property);
56
56
 
57
- @return if($value == none, null, $value);
57
+ @if $value == none {
58
+ @return null;
59
+ } @else {
60
+ @return $value;
61
+ }
58
62
  }
59
63
 
60
64
  @return null;
@@ -50,7 +50,11 @@ $floating: (
50
50
  @if $hierarchy-map {
51
51
  $value: map.get($hierarchy-map, $property);
52
52
 
53
- @return if($value == none, null, $value);
53
+ @if $value == none {
54
+ @return null;
55
+ } @else {
56
+ @return $value;
57
+ }
54
58
  }
55
59
  }
56
60
 
@@ -48,7 +48,11 @@ $variant-hierarchy: (
48
48
  @if $variant-map {
49
49
  $value: map.get($variant-map, $property);
50
50
 
51
- @return if($value == none, null, $value);
51
+ @if $value == none {
52
+ @return null;
53
+ } @else {
54
+ @return $value;
55
+ }
52
56
  }
53
57
 
54
58
  @return null;
@@ -111,11 +115,15 @@ $variant-hierarchy: (
111
115
 
112
116
  @each $severity in $severities {
113
117
  &--#{$severity} {
114
- $variant-key: if(
115
- $severity == 'info',
116
- 'base-info',
117
- if($severity == 'error', 'base-error', 'base-warning')
118
- );
118
+ $variant-key: null;
119
+
120
+ @if $severity == 'info' {
121
+ $variant-key: 'base-info';
122
+ } @else if $severity == 'error' {
123
+ $variant-key: 'base-error';
124
+ } @else {
125
+ $variant-key: 'base-warning';
126
+ }
119
127
 
120
128
  @include _apply-variant-colors($variant-key);
121
129
  }
@@ -6,21 +6,56 @@
6
6
  @use './layout' as *;
7
7
 
8
8
  .#{$prefix} {
9
+ display: flex;
10
+ flex-flow: row nowrap;
11
+
12
+ &__navigation {
13
+ position: sticky;
14
+ top: 0;
15
+ bottom: 0;
16
+ left: 0;
17
+ height: 100dvh;
18
+ z-index: z-index.get(base);
19
+ }
20
+
21
+ &__content-wrapper {
22
+ flex: 1;
23
+ min-inline-size: 0;
24
+ display: flex;
25
+ flex-flow: row nowrap;
26
+ }
27
+
9
28
  &__main {
29
+ flex: 1;
10
30
  min-inline-size: spacing.semantic-variable(size, container, slim);
31
+ overflow: hidden;
11
32
 
12
- .#{$prefix}--open & {
13
- margin-inline-end: calc(var(--mzn-layout-side-panel-width) + 1px);
33
+ &__content {
34
+ min-inline-size: spacing.semantic-variable(size, container, expanded);
14
35
  }
15
36
  }
16
37
 
38
+ &__side-panel {
39
+ background-color: palette.semantic-variable('background', base);
40
+ block-size: 100%;
41
+ display: flex;
42
+ flex-direction: row;
43
+ flex-shrink: 0;
44
+ min-inline-size: spacing.semantic-variable(size, container, slim);
45
+ }
46
+
47
+ &__side-panel-content {
48
+ flex: 1 1 0;
49
+ min-inline-size: 0;
50
+ overflow: hidden;
51
+ }
52
+
17
53
  &__divider {
18
54
  background-color: palette.semantic-variable(separator, neutral-faint);
19
55
  cursor: col-resize;
56
+ flex-shrink: 0;
20
57
  inline-size: 1px;
21
- inset-block: 0;
22
- inset-inline-end: var(--mzn-layout-side-panel-width);
23
- position: fixed;
58
+ position: relative;
24
59
  z-index: z-index.get(base);
25
60
 
26
61
  &::before {
@@ -40,15 +75,4 @@
40
75
  background-color: palette.semantic-variable(separator, neutral-light);
41
76
  }
42
77
  }
43
-
44
- &__side-panel {
45
- background-color: palette.semantic-variable(background, base);
46
- inline-size: var(--mzn-layout-side-panel-width);
47
- inset-block: 0;
48
- inset-inline-end: 0;
49
- min-inline-size: spacing.semantic-variable(size, container, slim);
50
- overflow-y: auto;
51
- position: fixed;
52
- z-index: z-index.get(base);
53
- }
54
78
  }
@@ -3,7 +3,12 @@ export declare const layoutClasses: {
3
3
  readonly divider: "mzn-layout__divider";
4
4
  readonly dividerDragging: "mzn-layout__divider--dragging";
5
5
  readonly host: "mzn-layout";
6
- readonly hostOpen: "mzn-layout--open";
6
+ readonly navigation: "mzn-layout__navigation";
7
+ readonly contentWrapper: "mzn-layout__content-wrapper";
7
8
  readonly main: "mzn-layout__main";
9
+ readonly mainContent: "mzn-layout__main__content";
8
10
  readonly sidePanel: "mzn-layout__side-panel";
11
+ readonly sidePanelContent: "mzn-layout__side-panel-content";
12
+ readonly sidePanelLeft: "mzn-layout__side-panel--left";
13
+ readonly sidePanelRight: "mzn-layout__side-panel--right";
9
14
  };
package/layout/layout.js CHANGED
@@ -3,9 +3,14 @@ const layoutClasses = {
3
3
  divider: `${layoutPrefix}__divider`,
4
4
  dividerDragging: `${layoutPrefix}__divider--dragging`,
5
5
  host: layoutPrefix,
6
- hostOpen: `${layoutPrefix}--open`,
6
+ navigation: `${layoutPrefix}__navigation`,
7
+ contentWrapper: `${layoutPrefix}__content-wrapper`,
7
8
  main: `${layoutPrefix}__main`,
9
+ mainContent: `${layoutPrefix}__main__content`,
8
10
  sidePanel: `${layoutPrefix}__side-panel`,
11
+ sidePanelContent: `${layoutPrefix}__side-panel-content`,
12
+ sidePanelLeft: `${layoutPrefix}__side-panel--left`,
13
+ sidePanelRight: `${layoutPrefix}__side-panel--right`,
9
14
  };
10
15
 
11
16
  export { layoutClasses, layoutPrefix };
@@ -81,10 +81,6 @@ $modalSizes: (
81
81
  @include _full-screen();
82
82
  }
83
83
 
84
- &__overlay {
85
- z-index: z-index.get(modal);
86
- }
87
-
88
84
  &__content-wrapper {
89
85
  display: flex;
90
86
  justify-content: center;
package/modal/modal.d.ts CHANGED
@@ -13,7 +13,6 @@ export declare const modalStatusTypeIcons: {
13
13
  };
14
14
  export declare const modalClasses: {
15
15
  readonly host: "mzn-modal";
16
- readonly overlay: "mzn-modal__overlay";
17
16
  readonly contentWrapper: "mzn-modal__content-wrapper";
18
17
  readonly closeIcon: "mzn-modal__close-icon";
19
18
  readonly modalStatusType: (severity: ModalStatusType) => string;
package/modal/modal.js CHANGED
@@ -11,7 +11,6 @@ const modalStatusTypeIcons = {
11
11
  };
12
12
  const modalClasses = {
13
13
  host: modalPrefix,
14
- overlay: `${modalPrefix}__overlay`,
15
14
  contentWrapper: `${modalPrefix}__content-wrapper`,
16
15
  closeIcon: `${modalPrefix}__close-icon`,
17
16
  modalStatusType: (severity) => `${modalPrefix}--${severity}`,
@@ -41,6 +41,7 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
41
41
 
42
42
  &--expand {
43
43
  width: spacing.semantic-variable(size, container, slim);
44
+ min-width: spacing.semantic-variable(size, container, slim);
44
45
  height: 100%;
45
46
 
46
47
  .#{$prefix}__content {
@@ -50,6 +51,7 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
50
51
 
51
52
  &--collapsed {
52
53
  width: spacing.semantic-variable(size, container, collapsed);
54
+ min-width: spacing.semantic-variable(size, container, collapsed);
53
55
  height: 100%;
54
56
  max-height: 100%;
55
57
 
@@ -275,8 +277,10 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
275
277
  padding: 0;
276
278
  width: 100%;
277
279
 
278
- > :not(:first-child) {
279
- display: none;
280
+ &__content {
281
+ & > :not(:first-child) {
282
+ display: none;
283
+ }
280
284
  }
281
285
  }
282
286
  }
@@ -349,13 +353,13 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
349
353
  }
350
354
 
351
355
  &--active.#{$option-prefix}--open {
352
- .#{$option-prefix}__content {
356
+ & > .#{$option-prefix}__content {
353
357
  background-color: palette.semantic-variable('background', brand-ghost);
354
358
  }
355
359
  }
356
360
 
357
361
  &--active {
358
- .#{$option-prefix}__content {
362
+ & > .#{$option-prefix}__content {
359
363
  .#{$option-prefix}__title {
360
364
  color: palette.semantic-variable(text, brand);
361
365
  }
@@ -367,7 +371,7 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
367
371
  }
368
372
 
369
373
  &--active.#{$option-prefix}--basic {
370
- .#{$option-prefix}__content {
374
+ & > .#{$option-prefix}__content {
371
375
  background-color: palette.semantic-variable('background', brand-faint);
372
376
 
373
377
  .#{$option-prefix}__title {
@@ -457,32 +461,47 @@ $option-height: calc(spacing.semantic-variable(padding, vertical, tight) * 2 + #
457
461
  .#{$user-menu-prefix} {
458
462
  @include btn-utils.reset();
459
463
 
460
- box-sizing: border-box;
461
- display: flex;
462
- align-items: center;
463
- gap: spacing.semantic-variable(gap, tight-fixed);
464
- width: fit-content;
465
- border-radius: radius.variable(base);
466
464
  padding: spacing.semantic-variable(padding, vertical, micro)
467
465
  spacing.semantic-variable(padding, horizontal, tiny);
466
+ max-width: calc(spacing.semantic-variable(size, container, slim) - var(--icons-width) - spacing.semantic-variable(padding, horizontal, comfort-fixed) * 2 - spacing.semantic-variable(gap, tight-fixed));
468
467
 
469
- &__avatar {
468
+ &__content {
469
+ align-items: center;
470
+ border-radius: radius.variable(base);
470
471
  box-sizing: border-box;
471
- width: spacing.semantic-variable(size, element, airy);
472
- height: spacing.semantic-variable(size, element, airy);
473
- border-radius: radius.variable(full);
472
+ display: flex;
473
+ gap: spacing.semantic-variable(gap, tight-fixed);
474
+ position: relative;
475
+ }
476
+
477
+ &__avatar {
478
+ align-items: center;
474
479
  background-color: palette.semantic-variable('background', neutral);
475
- color: palette.semantic-variable(icon, fixed-light);
480
+ border-radius: radius.variable(full);
476
481
  border: 1px solid palette.semantic-variable('background', neutral-subtle);
482
+ box-sizing: border-box;
483
+ color: palette.semantic-variable(icon, fixed-light);
477
484
  display: flex;
478
- align-items: center;
485
+ flex-shrink: 0;
486
+ height: spacing.semantic-variable(size, element, airy);
479
487
  justify-content: center;
488
+ width: spacing.semantic-variable(size, element, airy);
480
489
  }
481
490
 
482
491
  &__user-name {
483
492
  @include typography.semantic-variable(caption);
484
493
 
494
+ align-items: center;
485
495
  color: palette.semantic-variable(text, neutral-solid);
496
+ display: flex;
497
+ flex-shrink: 1;
498
+ overflow-x: hidden;
499
+
500
+ & > span {
501
+ overflow-x: hidden;
502
+ text-overflow: ellipsis;
503
+ white-space: nowrap;
504
+ }
486
505
  }
487
506
 
488
507
  &__icon {
@@ -63,6 +63,7 @@ export declare const navigationOptionCategoryClasses: {
63
63
  export declare const navigationUserMenuPrefix: "mzn-navigation-user-menu";
64
64
  export declare const navigationUserMenuClasses: {
65
65
  readonly host: "mzn-navigation-user-menu";
66
+ readonly content: "mzn-navigation-user-menu__content";
66
67
  readonly open: "mzn-navigation-user-menu--open";
67
68
  readonly avatar: "mzn-navigation-user-menu__avatar";
68
69
  readonly userName: "mzn-navigation-user-menu__user-name";
@@ -63,6 +63,7 @@ const navigationOptionCategoryClasses = {
63
63
  const navigationUserMenuPrefix = `${navigationPrefix}-user-menu`;
64
64
  const navigationUserMenuClasses = {
65
65
  host: navigationUserMenuPrefix,
66
+ content: `${navigationUserMenuPrefix}__content`,
66
67
  open: `${navigationUserMenuPrefix}--open`,
67
68
  avatar: `${navigationUserMenuPrefix}__avatar`,
68
69
  userName: `${navigationUserMenuPrefix}__user-name`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mezzanine-ui/core",
3
- "version": "1.0.0-rc.0",
3
+ "version": "1.0.0-rc.2",
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.0",
44
- "@mezzanine-ui/system": "1.0.0-rc.0",
43
+ "@mezzanine-ui/icons": "1.0.0-rc.2",
44
+ "@mezzanine-ui/system": "1.0.0-rc.2",
45
45
  "lodash": "^4.17.21",
46
46
  "tslib": "^2.8.1"
47
47
  },
@@ -4,7 +4,7 @@
4
4
 
5
5
  .#{$prefix} {
6
6
  width: 100%;
7
- padding: spacing.semantic-variable(padding, vertical, base) spacing.semantic-variable(padding, horizontal, comfort-fixed);
7
+ padding: spacing.semantic-variable(padding, vertical, base) spacing.semantic-variable(padding, horizontal, spacious);
8
8
  background-color: palette.semantic-variable("background", base);
9
9
  display: flex;
10
10
  align-items: center;
@@ -8,6 +8,10 @@
8
8
  display: inline-flex;
9
9
  align-items: center;
10
10
 
11
+ &--range {
12
+ min-width: spacing.semantic-variable(size, container, slender);
13
+ }
14
+
11
15
  &__arrow-icon {
12
16
  display: flex;
13
17
  align-items: center;
@@ -3,6 +3,7 @@ import { DateType } from '../calendar';
3
3
  export declare const pickerPrefix = "mzn-picker";
4
4
  export declare const pickerClasses: {
5
5
  readonly host: "mzn-picker";
6
+ readonly hostRange: "mzn-picker--range";
6
7
  readonly arrowIcon: "mzn-picker__arrow-icon";
7
8
  readonly inputMono: "mzn-picker__input-mono";
8
9
  readonly formattedInput: "mzn-picker__formatted-input";
package/picker/picker.js CHANGED
@@ -2,6 +2,7 @@
2
2
  const pickerPrefix = 'mzn-picker';
3
3
  const pickerClasses = {
4
4
  host: pickerPrefix,
5
+ hostRange: `${pickerPrefix}--range`,
5
6
  arrowIcon: `${pickerPrefix}__arrow-icon`,
6
7
  inputMono: `${pickerPrefix}__input-mono`,
7
8
  formattedInput: `${pickerPrefix}__formatted-input`,
@@ -69,7 +69,11 @@ $status-hierarchy: (
69
69
  @if $type-map {
70
70
  $value: map.get($type-map, $property);
71
71
 
72
- @return if($value == none, null, $value);
72
+ @if $value == none {
73
+ @return null;
74
+ } @else {
75
+ @return $value;
76
+ }
73
77
  }
74
78
 
75
79
  @return null;
@@ -82,7 +86,11 @@ $status-hierarchy: (
82
86
  @if $status-map {
83
87
  $value: map.get($status-map, $property);
84
88
 
85
- @return if($value == none, null, $value);
89
+ @if $value == none {
90
+ @return null;
91
+ } @else {
92
+ @return $value;
93
+ }
86
94
  }
87
95
 
88
96
  @return null;
@@ -14,4 +14,8 @@
14
14
  justify-content: flex-start;
15
15
  align-items: stretch;
16
16
  gap: spacing.semantic-variable(gap, calm);
17
+
18
+ &__content {
19
+ min-height: spacing.semantic-variable(size, container, small);
20
+ }
17
21
  }
@@ -1,4 +1,5 @@
1
1
  export declare const sectionPrefix = "mzn-section";
2
2
  export declare const sectionClasses: {
3
3
  readonly host: "mzn-section";
4
+ readonly hostContent: "mzn-section__content";
4
5
  };
@@ -1,6 +1,7 @@
1
1
  const sectionPrefix = 'mzn-section';
2
2
  const sectionClasses = {
3
3
  host: sectionPrefix,
4
+ hostContent: `${sectionPrefix}__content`,
4
5
  };
5
6
 
6
7
  export { sectionClasses, sectionPrefix };
@@ -49,7 +49,11 @@ $status-colors: (
49
49
  @if $status-map {
50
50
  $value: map.get($status-map, $property);
51
51
 
52
- @return if($value == none, null, $value);
52
+ @if $value == none {
53
+ @return null;
54
+ } @else {
55
+ @return $value;
56
+ }
53
57
  }
54
58
 
55
59
  @return null;
@@ -94,6 +94,7 @@ $tag-type-config: (
94
94
  $tag-size-config: (
95
95
  main: (
96
96
  typography: label-primary,
97
+ height: spacing.semantic-variable(size, element, airy),
97
98
  padding-vertical: spacing.semantic-variable(padding, vertical, tight),
98
99
  padding-horizontal: spacing.semantic-variable(padding, horizontal, tight),
99
100
  padding-text-side: spacing.semantic-variable(padding, horizontal, base),
@@ -101,6 +102,7 @@ $tag-size-config: (
101
102
  ),
102
103
  sub: (
103
104
  typography: label-primary,
105
+ height: spacing.semantic-variable(size, element, gentle-fixed),
104
106
  padding-vertical: spacing.semantic-variable(padding, vertical, micro),
105
107
  padding-horizontal: spacing.semantic-variable(padding, horizontal, micro),
106
108
  padding-text-side: spacing.semantic-variable(padding, horizontal, tiny),
@@ -108,6 +110,7 @@ $tag-size-config: (
108
110
  ),
109
111
  minor: (
110
112
  typography: caption,
113
+ height: spacing.semantic-variable(size, element, gentle-fixed),
111
114
  padding-vertical: spacing.semantic-variable(padding, vertical, micro),
112
115
  padding-horizontal: spacing.semantic-variable(padding, horizontal, micro),
113
116
  padding-text-side: spacing.semantic-variable(padding, horizontal, tiny),
@@ -146,7 +149,6 @@ $tag-size-config: (
146
149
  flex-shrink: 0;
147
150
  border-radius: radius.variable(base);
148
151
  width: fit-content;
149
- height: fit-content;
150
152
  transition:
151
153
  transition.standard(color, fast),
152
154
  transition.standard(background-color, fast),
@@ -209,6 +211,7 @@ $tag-size-config: (
209
211
  map.get($size-config, typography)
210
212
  );
211
213
 
214
+ height: map.get($size-config, height);
212
215
  padding-block: map.get($size-config, padding-vertical);
213
216
  padding-inline: map.get($size-config, padding-horizontal);
214
217
 
@@ -155,7 +155,11 @@ $size-configs: (
155
155
  @if $state-map {
156
156
  $value: map.get($state-map, $property);
157
157
 
158
- @return if($value == none, null, $value);
158
+ @if $value == none {
159
+ @return null;
160
+ } @else {
161
+ @return $value;
162
+ }
159
163
  }
160
164
  }
161
165
 
@@ -71,7 +71,11 @@ $radius: radius.variable(full);
71
71
  @if $switch-map {
72
72
  $value: map.get($switch-map, $switch);
73
73
 
74
- @return if($value == none, null, $value);
74
+ @if $value == none {
75
+ @return null;
76
+ } @else {
77
+ @return $value;
78
+ }
75
79
  }
76
80
  }
77
81
 
@@ -85,7 +89,11 @@ $radius: radius.variable(full);
85
89
  @if $size-map {
86
90
  $value: map.get($size-map, $property);
87
91
 
88
- @return if($value == none, null, $value);
92
+ @if $value == none {
93
+ @return null;
94
+ } @else {
95
+ @return $value;
96
+ }
89
97
  }
90
98
 
91
99
  @return null;
@@ -182,6 +182,49 @@ $image-size: spacing.primitive-variable(140);
182
182
  }
183
183
  }
184
184
 
185
+ &--replace-mode {
186
+ cursor: pointer;
187
+
188
+ .#{$prefix}__container:hover {
189
+ .#{$prefix}__actions--done {
190
+ opacity: 1;
191
+ pointer-events: auto;
192
+ background: palette.semantic-variable(overlay, subtle);
193
+
194
+ .#{$prefix}__replace-label {
195
+ opacity: 1;
196
+ visibility: visible;
197
+ }
198
+
199
+ .#{$prefix}__tools {
200
+ opacity: 1;
201
+ visibility: visible;
202
+ }
203
+ }
204
+ }
205
+ }
206
+
207
+ &__replace-label {
208
+ position: absolute;
209
+ top: 50%;
210
+ left: 50%;
211
+ transform: translate(-50%, -50%);
212
+ background-color: palette.semantic-variable("overlay", default);
213
+ color: palette.semantic-variable(text, fixed-light);
214
+ border-radius: radius.variable(base);
215
+ padding-block: spacing.semantic-variable(padding, vertical, tight);
216
+ padding-inline: spacing.semantic-variable(padding, horizontal, base);
217
+ white-space: nowrap;
218
+ opacity: 0;
219
+ visibility: hidden;
220
+ pointer-events: none;
221
+ transition:
222
+ transition.standard(opacity, fast),
223
+ transition.standard(visibility, fast);
224
+
225
+ @include typography.semantic-variable(input);
226
+ }
227
+
185
228
  &__size {
186
229
  color: palette.semantic-variable(text, neutral);
187
230
  @include typography.semantic-variable(annotation);
@@ -20,6 +20,8 @@ export declare const uploadPictureCardClasses: {
20
20
  readonly errorIcon: "mzn-upload-picture-card__error-icon";
21
21
  readonly error: "mzn-upload-picture-card--error";
22
22
  readonly disabled: "mzn-upload-picture-card--disabled";
23
+ readonly replaceMode: "mzn-upload-picture-card--replace-mode";
24
+ readonly replaceLabel: "mzn-upload-picture-card__replace-label";
23
25
  };
24
26
  /**
25
27
  * Default error message for upload picture card when upload fails.
@@ -16,6 +16,8 @@ const uploadPictureCardClasses = {
16
16
  errorIcon: `${uploadPictureCardPrefix}__error-icon`,
17
17
  error: `${uploadPictureCardPrefix}--error`,
18
18
  disabled: `${uploadPictureCardPrefix}--disabled`,
19
+ replaceMode: `${uploadPictureCardPrefix}--replace-mode`,
20
+ replaceLabel: `${uploadPictureCardPrefix}__replace-label`,
19
21
  };
20
22
  /**
21
23
  * Default error message for upload picture card when upload fails.