@mezzanine-ui/core 1.0.3-rc.0 → 1.0.3
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.
- package/alert-banner/alertBanner.d.ts +3 -3
- package/calendar/_calendar-styles.scss +5 -4
- package/calendarMethodsDayjs/index.js +14 -8
- package/card/_card-styles.scss +1 -1
- package/checkbox/_checkbox-styles.scss +1 -1
- package/inline-message/inlineMessage.d.ts +3 -3
- package/layout/_layout-styles.scss +2 -0
- package/message/message.d.ts +4 -4
- package/modal/_modal-styles.scss +2 -2
- package/modal/modal.d.ts +5 -5
- package/notification-center/notificationCenter.d.ts +4 -4
- package/package.json +1 -1
- package/picker/_picker-styles.scss +1 -1
- package/progress/_progress-styles.scss +1 -1
- package/table/_table-styles.scss +3 -1
- package/typography/typography.d.ts +5 -5
- package/upload/_upload-item-styles.scss +2 -2
- package/upload/_upload-picture-card-styles.scss +1 -0
- package/upload/_uploader-styles.scss +1 -0
|
@@ -8,9 +8,9 @@ export type AlertBannerSeverity = 'info' | 'warning' | 'error';
|
|
|
8
8
|
export declare const alertBannerPrefix = "mzn-alert-banner";
|
|
9
9
|
export declare const alertBannerGroupPrefix = "mzn-alert-banner-group";
|
|
10
10
|
export declare const alertBannerIcons: {
|
|
11
|
-
readonly info:
|
|
12
|
-
readonly warning:
|
|
13
|
-
readonly error:
|
|
11
|
+
readonly info: import("@mezzanine-ui/icons").IconDefinition;
|
|
12
|
+
readonly warning: import("@mezzanine-ui/icons").IconDefinition;
|
|
13
|
+
readonly error: import("@mezzanine-ui/icons").IconDefinition;
|
|
14
14
|
};
|
|
15
15
|
export declare const alertBannerClasses: {
|
|
16
16
|
readonly host: "mzn-alert-banner";
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
.#{$week-prefix} {
|
|
59
59
|
height: 100%;
|
|
60
|
-
padding-top:
|
|
60
|
+
padding-top: spacing.semantic-variable(size, element, extra-wide);
|
|
61
61
|
display: flex;
|
|
62
62
|
flex-flow: column;
|
|
63
63
|
|
|
@@ -158,13 +158,13 @@
|
|
|
158
158
|
.#{$prefix}--quarter & {
|
|
159
159
|
padding: spacing.semantic-variable(padding, vertical, tiny) 0;
|
|
160
160
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
161
|
-
grid-auto-rows:
|
|
161
|
+
grid-auto-rows: spacing.semantic-variable(size, element, roomy);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
.#{$prefix}--half-year & {
|
|
165
165
|
padding: spacing.semantic-variable(padding, vertical, tiny) 0;
|
|
166
166
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
167
|
-
grid-auto-rows:
|
|
167
|
+
grid-auto-rows: spacing.semantic-variable(size, element, roomy);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
&--with-border {
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
|
|
248
248
|
.#{$prefix}--quarter &,
|
|
249
249
|
.#{$prefix}--half-year & {
|
|
250
|
-
padding-top:
|
|
250
|
+
padding-top: spacing.semantic-variable(size, element, roomy);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
&--today {
|
|
@@ -365,6 +365,7 @@
|
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
.#{$quick-select-prefix} {
|
|
368
|
+
// allow-hardcoded: quick-select panel固定寬度 128px 不在 primitive scale
|
|
368
369
|
width: 128px;
|
|
369
370
|
border-radius: radius.variable(roomy);
|
|
370
371
|
padding: spacing.semantic-variable(padding, vertical, comfort) spacing.semantic-variable(padding, horizontal, comfort);
|
|
@@ -347,17 +347,23 @@ const CalendarMethodsDayjs = {
|
|
|
347
347
|
const halfYear = Math.ceil(quarter / 2);
|
|
348
348
|
return result.format(format.replace('n', halfYear.toString()));
|
|
349
349
|
}
|
|
350
|
-
// Handle week-year formats (moment-compatible tokens not native to dayjs)
|
|
351
|
-
// gggg
|
|
352
|
-
//
|
|
350
|
+
// Handle week-year formats (moment-compatible tokens not native to dayjs).
|
|
351
|
+
// - gggg / ww: locale-aware week year / number (Sunday-first locales use
|
|
352
|
+
// dayjs default `year()` + `week()`; Monday-first locales fall back to
|
|
353
|
+
// ISO values because dayjs does not expose a locale `weekYear()`).
|
|
354
|
+
// - GGGG / WW: ISO-8601 week year / number regardless of locale.
|
|
353
355
|
if (format.includes('gggg') || format.includes('GGGG')) {
|
|
354
356
|
const isMon = isMondayFirst(locale);
|
|
355
|
-
const
|
|
356
|
-
const
|
|
357
|
+
const localeYear = isMon ? result.isoWeekYear() : result.year();
|
|
358
|
+
const localeWeek = isMon ? result.isoWeek() : result.week();
|
|
359
|
+
const isoYear = result.isoWeekYear();
|
|
360
|
+
const isoWeek = result.isoWeek();
|
|
357
361
|
return format
|
|
358
|
-
.replace(/
|
|
359
|
-
.replace(
|
|
360
|
-
.replace(/
|
|
362
|
+
.replace(/GGGG/g, String(isoYear))
|
|
363
|
+
.replace(/WW/g, String(isoWeek).padStart(2, '0'))
|
|
364
|
+
.replace(/gggg/g, String(localeYear))
|
|
365
|
+
.replace(/ww/g, String(localeWeek).padStart(2, '0'))
|
|
366
|
+
.replace(/\[([^\]]*)\]/g, '$1');
|
|
361
367
|
}
|
|
362
368
|
return result.format(format);
|
|
363
369
|
},
|
package/card/_card-styles.scss
CHANGED
|
@@ -321,7 +321,7 @@ $file-icon-color: (
|
|
|
321
321
|
flex-shrink: 0;
|
|
322
322
|
width: spacing.semantic-variable(size, element, roomy);
|
|
323
323
|
height: spacing.semantic-variable(size, element, roomy);
|
|
324
|
-
margin:
|
|
324
|
+
margin: spacing.primitive-variable(2);
|
|
325
325
|
border-radius: radius.variable(base);
|
|
326
326
|
background-color: map.get($file-icon-color, default);
|
|
327
327
|
display: flex;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare const inlineMessagePrefix = "mzn-inline-message";
|
|
2
2
|
export declare const inlineMessageIcons: {
|
|
3
|
-
readonly info:
|
|
4
|
-
readonly warning:
|
|
5
|
-
readonly error:
|
|
3
|
+
readonly info: import("@mezzanine-ui/icons").IconDefinition;
|
|
4
|
+
readonly warning: import("@mezzanine-ui/icons").IconDefinition;
|
|
5
|
+
readonly error: import("@mezzanine-ui/icons").IconDefinition;
|
|
6
6
|
};
|
|
7
7
|
export type InlineMessageSeverity = keyof typeof inlineMessageIcons;
|
|
8
8
|
export declare const inlineMessageClasses: {
|
|
@@ -61,7 +61,9 @@
|
|
|
61
61
|
&::before {
|
|
62
62
|
content: '';
|
|
63
63
|
inset-block: 0;
|
|
64
|
+
// allow-hardcoded: column resize handle hit-area 向左偏 4px 讓觸擊範圍跨越 divider
|
|
64
65
|
inset-inline-start: -4px;
|
|
66
|
+
// allow-hardcoded: 9px 觸擊寬度(divider 1px 左右各 4px 擴充),不在 primitive scale
|
|
65
67
|
inline-size: 9px;
|
|
66
68
|
position: absolute;
|
|
67
69
|
}
|
package/message/message.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import { SeverityWithInfo } from '@mezzanine-ui/system/severity';
|
|
|
2
2
|
export type MessageSeverity = SeverityWithInfo | 'loading';
|
|
3
3
|
export declare const messagePrefix = "mzn-message";
|
|
4
4
|
export declare const messageIcons: {
|
|
5
|
-
readonly success:
|
|
6
|
-
readonly warning:
|
|
7
|
-
readonly error:
|
|
8
|
-
readonly info:
|
|
5
|
+
readonly success: import("@mezzanine-ui/icons").IconDefinition;
|
|
6
|
+
readonly warning: import("@mezzanine-ui/icons").IconDefinition;
|
|
7
|
+
readonly error: import("@mezzanine-ui/icons").IconDefinition;
|
|
8
|
+
readonly info: import("@mezzanine-ui/icons").IconDefinition;
|
|
9
9
|
};
|
|
10
10
|
export declare const messageClasses: {
|
|
11
11
|
readonly host: "mzn-message";
|
package/modal/_modal-styles.scss
CHANGED
|
@@ -143,8 +143,8 @@ $modalSizes: (
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
&__status-type-icon {
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
146
|
+
width: spacing.semantic-variable(size, element, roomy);
|
|
147
|
+
height: spacing.semantic-variable(size, element, roomy);
|
|
148
148
|
display: flex;
|
|
149
149
|
flex-shrink: 0;
|
|
150
150
|
align-items: center;
|
package/modal/modal.d.ts
CHANGED
|
@@ -28,11 +28,11 @@ export type ModalSize = 'tight' | 'narrow' | 'regular' | 'wide';
|
|
|
28
28
|
export type ModalType = 'extended' | 'extendedSplit' | 'standard' | 'mediaPreview' | 'verification';
|
|
29
29
|
export declare const modalPrefix = "mzn-modal";
|
|
30
30
|
export declare const modalStatusTypeIcons: {
|
|
31
|
-
readonly success:
|
|
32
|
-
readonly warning:
|
|
33
|
-
readonly error:
|
|
34
|
-
readonly info:
|
|
35
|
-
readonly email:
|
|
31
|
+
readonly success: import("@mezzanine-ui/icons").IconDefinition;
|
|
32
|
+
readonly warning: import("@mezzanine-ui/icons").IconDefinition;
|
|
33
|
+
readonly error: import("@mezzanine-ui/icons").IconDefinition;
|
|
34
|
+
readonly info: import("@mezzanine-ui/icons").IconDefinition;
|
|
35
|
+
readonly email: import("@mezzanine-ui/icons").IconDefinition;
|
|
36
36
|
readonly delete: import("@mezzanine-ui/icons").IconDefinition;
|
|
37
37
|
};
|
|
38
38
|
export declare const modalClasses: {
|
|
@@ -9,10 +9,10 @@ export type NotificationType = 'notification' | 'drawer';
|
|
|
9
9
|
export declare const notificationPrefix = "mzn-notification-center";
|
|
10
10
|
export declare const notificationRootPrefix = "mzn-notification-center-root";
|
|
11
11
|
export declare const notificationIcons: {
|
|
12
|
-
success:
|
|
13
|
-
warning:
|
|
14
|
-
error:
|
|
15
|
-
info:
|
|
12
|
+
success: import("@mezzanine-ui/icons").IconDefinition;
|
|
13
|
+
warning: import("@mezzanine-ui/icons").IconDefinition;
|
|
14
|
+
error: import("@mezzanine-ui/icons").IconDefinition;
|
|
15
|
+
info: import("@mezzanine-ui/icons").IconDefinition;
|
|
16
16
|
};
|
|
17
17
|
export declare const notificationClasses: {
|
|
18
18
|
readonly notificationsContainer: "mzn-notification-center__notifications-container";
|
package/package.json
CHANGED
|
@@ -234,7 +234,7 @@ $status-hierarchy: (
|
|
|
234
234
|
top: 50%;
|
|
235
235
|
transform: translate(-50%, -50%);
|
|
236
236
|
width: 1px;
|
|
237
|
-
height:
|
|
237
|
+
height: spacing.semantic-variable(size, element, tiny);
|
|
238
238
|
margin-top: calc(-1 * (2px + #{spacing.semantic-variable(gap, slim)} / 2));
|
|
239
239
|
pointer-events: none;
|
|
240
240
|
background-color: palette.semantic-variable(border, neutral-strong);
|
package/table/_table-styles.scss
CHANGED
|
@@ -103,7 +103,7 @@ $z-index-config: (
|
|
|
103
103
|
&::after {
|
|
104
104
|
position: absolute;
|
|
105
105
|
inset-block: 0;
|
|
106
|
-
width:
|
|
106
|
+
width: spacing.primitive-variable(10);
|
|
107
107
|
content: '';
|
|
108
108
|
pointer-events: none;
|
|
109
109
|
transition: transition.standard(box-shadow);
|
|
@@ -335,6 +335,7 @@ $z-index-config: (
|
|
|
335
335
|
|
|
336
336
|
&--separator {
|
|
337
337
|
td {
|
|
338
|
+
// allow-hardcoded: separator row border 3px visual emphasis, thicker than the 1px cell borders; no token for border-width > 1px
|
|
338
339
|
border-bottom: 3px solid palette.semantic-variable("background", neutral-subtle);
|
|
339
340
|
}
|
|
340
341
|
}
|
|
@@ -627,6 +628,7 @@ $z-index-config: (
|
|
|
627
628
|
}
|
|
628
629
|
|
|
629
630
|
.#{$prefix}__empty {
|
|
631
|
+
// allow-hardcoded: empty-state min-height 200px guarantees a consistent body height regardless of row count; not in primitive scale
|
|
630
632
|
min-height: 200px;
|
|
631
633
|
text-align: center;
|
|
632
634
|
vertical-align: middle;
|
|
@@ -19,11 +19,11 @@ export interface TypographyCssVars {
|
|
|
19
19
|
}
|
|
20
20
|
export declare const typographyClasses: {
|
|
21
21
|
readonly type: (type: TypographySemanticType) => string;
|
|
22
|
-
readonly align:
|
|
23
|
-
readonly color:
|
|
24
|
-
readonly display:
|
|
25
|
-
readonly ellipsis:
|
|
26
|
-
readonly noWrap:
|
|
22
|
+
readonly align: "mzn-typography--align";
|
|
23
|
+
readonly color: "mzn-typography--color";
|
|
24
|
+
readonly display: "mzn-typography--display";
|
|
25
|
+
readonly ellipsis: "mzn-typography--ellipsis";
|
|
26
|
+
readonly noWrap: "mzn-typography--nowrap";
|
|
27
27
|
};
|
|
28
28
|
export declare function toTypographyCssVars(variables: TypographyCssVars): CssVarInterpolations;
|
|
29
29
|
export {};
|
|
@@ -131,13 +131,13 @@ $thumbnail-image-size: spacing.primitive-variable(40);
|
|
|
131
131
|
border-color: palette.semantic-variable(text, fixed-light);
|
|
132
132
|
border-radius: 50%;
|
|
133
133
|
content: '';
|
|
134
|
-
height:
|
|
134
|
+
height: spacing.primitive-variable(10);
|
|
135
135
|
left: 50%;
|
|
136
136
|
pointer-events: none;
|
|
137
137
|
position: absolute;
|
|
138
138
|
top: 50%;
|
|
139
139
|
transform: translate(-50%, -50%);
|
|
140
|
-
width:
|
|
140
|
+
width: spacing.primitive-variable(10);
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
|
|
@@ -304,6 +304,7 @@ $image-size: spacing.primitive-variable(140);
|
|
|
304
304
|
position: relative;
|
|
305
305
|
|
|
306
306
|
&::before {
|
|
307
|
+
// allow-hardcoded: focus ring 2px border width for visual emphasis; no token for border-width > 1px
|
|
307
308
|
border-width: 2px;
|
|
308
309
|
border-style: solid;
|
|
309
310
|
border-color: palette.semantic-variable(border, fixed-light);
|
|
@@ -43,6 +43,7 @@ $square-size: spacing.primitive-variable(140);
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&:not(.#{$prefix}--button):active {
|
|
46
|
+
// allow-hardcoded: active-state 2px border width for visual emphasis; no token for border-width > 1px
|
|
46
47
|
border-width: 2px;
|
|
47
48
|
border-style: solid;
|
|
48
49
|
border-color: palette.semantic-variable(border, brand);
|