@robert-stackflow/oneui 0.6.57 → 0.6.59

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/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.6.59
2
+
3
+ - Align dialog titles and close buttons on a shared centerline and separate the header from scrolling content.
4
+
5
+ ## 0.6.58
6
+
7
+ - Toast 堆叠列表与可滚动的通知正文沿用全局主题滚动条样式。
8
+
1
9
  ## 0.6.57
2
10
 
3
11
  - 灯箱未放大时支持向下拖动退出。图片和背景随手势变化,短距离拖动自然复位,松手退出从当前位置衔接原图 Hero 动画。
@@ -142,7 +142,7 @@ function Dialog({
142
142
  content.headerIcon && /* @__PURE__ */ jsx("span", { className: s.dialogIcon, "aria-hidden": "true", children: content.headerIcon }),
143
143
  /* @__PURE__ */ jsx("h2", { id: titleId, children: content.title })
144
144
  ] }),
145
- /* @__PURE__ */ jsx(IconButton, { label: closeLabel, onClick: onClose, disabled: busy, children: /* @__PURE__ */ jsx(X, {}) })
145
+ /* @__PURE__ */ jsx(IconButton, { className: s.dialogClose, tooltip: false, label: closeLabel, onClick: onClose, disabled: busy, children: /* @__PURE__ */ jsx(X, {}) })
146
146
  ] }),
147
147
  /* @__PURE__ */ jsx("div", { className: s.dialogBody, children: content.children }),
148
148
  content.footer && /* @__PURE__ */ jsx("footer", { className: s.dialogFooter, children: content.footer })
@@ -1,153 +1,152 @@
1
- .dialog {
2
- width: min(var(--dialog-width), calc(100vw - 32px));
3
- max-height: calc(100dvh - var(--dialog-inset));
4
- padding: 0;
5
- color: var(--fg);
6
- background: var(--surface);
7
- border: 1px solid var(--line);
8
- border-radius: calc(var(--radius) + 3px);
9
- box-shadow: var(--shadow-dialog);
10
- overflow: hidden;
11
- }
12
-
13
- .dialog[open] {
14
- display: flex;
15
- flex-direction: column;
16
- }
17
-
18
- .dialog::backdrop {
19
- background: var(--overlay);
20
- backdrop-filter: blur(3px);
21
- animation: fade-in var(--popup-enter);
22
- }
23
- .dialog[data-placement="top"] {
24
- margin-top: min(10dvh, 96px);
25
- margin-bottom: auto;
26
- }
27
- .dialogHeader {
28
- flex-shrink: 0;
29
- display: flex;
30
- align-items: flex-start;
31
- justify-content: space-between;
32
- gap: 16px;
33
- padding: 24px 24px 20px;
34
- }
35
- .dialogHeading {
36
- display: flex;
37
- align-items: center;
38
- gap: 14px;
39
- min-width: 0;
40
- }
41
- .dialogHeading h2 {
42
- min-width: 0;
43
- overflow-wrap: anywhere;
44
- font-size: 18px;
45
- font-weight: 600;
46
- line-height: 1.5;
47
- }
48
- .dialogHeader > button {
49
- flex-shrink: 0;
50
- margin-top: -3px;
51
- margin-right: -6px;
52
- color: var(--muted);
53
- }
54
- .dialogIcon {
55
- display: inline-flex;
56
- align-items: center;
57
- justify-content: center;
58
- flex: 0 0 21px;
59
- width: 21px;
60
- height: 25px;
61
- color: var(--dialog-tone, var(--accent-ink, var(--accent)));
62
- }
63
- .dialogIcon > svg {
64
- width: 21px;
65
- height: 21px;
66
- stroke-width: 1.7;
67
- }
68
- .dialog[data-tone="info"] {
69
- --dialog-tone: var(--accent-ink, var(--accent));
70
- }
71
- .dialog[data-tone="success"] {
72
- --dialog-tone: var(--success);
73
- }
74
- .dialog[data-tone="warning"] {
75
- --dialog-tone: var(--warning);
76
- }
77
- .dialog[data-tone="danger"] {
78
- --dialog-tone: var(--danger);
79
- }
80
- .dialogBody {
81
- min-height: 0;
82
- overflow: auto;
83
- overscroll-behavior: contain;
84
- padding: 0 24px 24px;
85
- }
86
- .dialogBody > p {
87
- color: var(--muted);
88
- font-size: 12px;
89
- line-height: 1.8;
90
- }
91
- .dialogFooter {
92
- flex-shrink: 0;
93
- flex-wrap: wrap;
94
- display: flex;
95
- justify-content: flex-end;
96
- gap: 8px;
97
- padding: 14px 24px;
98
- border-top: var(--separator-width) var(--separator-style)
99
- var(--separator-color);
100
- background: var(--canvas);
101
- }
102
- .wide {
103
- width: min(var(--dialog-wide-width), calc(100vw - 32px));
104
- }
105
- .small {
106
- width: min(420px, calc(100vw - 32px));
107
- }
108
- .dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogHeader {
109
- padding: 22px 24px 12px;
110
- }
111
- .dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogHeading {
112
- gap: 10px;
113
- }
114
- .dialog:is([data-variant="message"], [data-variant="confirm"])
115
- .dialogHeader
116
- h2 {
117
- font-size: 17px;
118
- }
119
- .dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogBody {
120
- padding: 0 24px 24px;
121
- }
122
- .closing {
123
- pointer-events: none;
124
- }
125
- .dialog.closing::backdrop {
126
- background: transparent;
127
- backdrop-filter: blur(0);
128
- transition:
129
- background var(--popup-exit),
130
- backdrop-filter var(--popup-exit);
131
- }
132
-
133
- @media (max-width: 600px) {
134
- .dialog {
135
- max-height: calc(100dvh - 24px);
136
- }
137
- .dialogBody {
138
- padding: 0 20px 20px;
139
- }
140
- .dialogHeader,
141
- .dialogFooter {
142
- padding: 18px 20px;
143
- }
144
- }
145
-
146
- @keyframes fade-in {
147
- from {
148
- opacity: 0;
149
- }
150
- to {
151
- opacity: 1;
152
- }
153
- }
1
+ .dialog {
2
+ width: min(var(--dialog-width), calc(100vw - 32px));
3
+ max-height: calc(100dvh - var(--dialog-inset));
4
+ padding: 0;
5
+ color: var(--fg);
6
+ background: var(--surface);
7
+ border: 1px solid var(--line);
8
+ border-radius: calc(var(--radius) + 3px);
9
+ box-shadow: var(--shadow-dialog);
10
+ overflow: hidden;
11
+ }
12
+
13
+ .dialog[open] {
14
+ display: flex;
15
+ flex-direction: column;
16
+ }
17
+
18
+ .dialog::backdrop {
19
+ background: var(--overlay);
20
+ backdrop-filter: blur(3px);
21
+ animation: fade-in var(--popup-enter);
22
+ }
23
+ .dialog[data-placement="top"] {
24
+ margin-top: min(10dvh, 96px);
25
+ margin-bottom: auto;
26
+ }
27
+ .dialogHeader {
28
+ flex-shrink: 0;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ gap: 16px;
33
+ padding: 12px 8px 12px 20px;
34
+ border-bottom: var(--separator-width) var(--separator-style) var(--separator-color);
35
+ }
36
+ .dialogHeading {
37
+ display: flex;
38
+ align-items: center;
39
+ gap: 14px;
40
+ min-width: 0;
41
+ }
42
+ .dialogHeading h2 {
43
+ min-width: 0;
44
+ overflow-wrap: anywhere;
45
+ font-size: 18px;
46
+ font-weight: 600;
47
+ line-height: 1.5;
48
+ }
49
+ .dialogClose {
50
+ flex-shrink: 0;
51
+ margin: 0;
52
+ color: var(--muted);
53
+ }
54
+ .dialogIcon {
55
+ display: inline-flex;
56
+ align-items: center;
57
+ justify-content: center;
58
+ flex: 0 0 21px;
59
+ width: 21px;
60
+ height: 25px;
61
+ color: var(--dialog-tone, var(--accent-ink, var(--accent)));
62
+ }
63
+ .dialogIcon > svg {
64
+ width: 21px;
65
+ height: 21px;
66
+ stroke-width: 1.7;
67
+ }
68
+ .dialog[data-tone="info"] {
69
+ --dialog-tone: var(--accent-ink, var(--accent));
70
+ }
71
+ .dialog[data-tone="success"] {
72
+ --dialog-tone: var(--success);
73
+ }
74
+ .dialog[data-tone="warning"] {
75
+ --dialog-tone: var(--warning);
76
+ }
77
+ .dialog[data-tone="danger"] {
78
+ --dialog-tone: var(--danger);
79
+ }
80
+ .dialogBody {
81
+ min-height: 0;
82
+ overflow: auto;
83
+ overscroll-behavior: contain;
84
+ padding: 18px 20px 20px;
85
+ }
86
+ .dialogBody > p {
87
+ color: var(--muted);
88
+ font-size: 12px;
89
+ line-height: 1.8;
90
+ }
91
+ .dialogFooter {
92
+ flex-shrink: 0;
93
+ flex-wrap: wrap;
94
+ display: flex;
95
+ justify-content: flex-end;
96
+ gap: 8px;
97
+ padding: 14px 24px;
98
+ border-top: var(--separator-width) var(--separator-style)
99
+ var(--separator-color);
100
+ background: var(--canvas);
101
+ }
102
+ .wide {
103
+ width: min(var(--dialog-wide-width), calc(100vw - 32px));
104
+ }
105
+ .small {
106
+ width: min(420px, calc(100vw - 32px));
107
+ }
108
+ .dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogHeading {
109
+ gap: 10px;
110
+ }
111
+ .dialog:is([data-variant="message"], [data-variant="confirm"])
112
+ .dialogHeader
113
+ h2 {
114
+ font-size: 17px;
115
+ }
116
+ .dialog:is([data-variant="message"], [data-variant="confirm"]) .dialogBody {
117
+ padding: 18px 20px 20px;
118
+ }
119
+ .closing {
120
+ pointer-events: none;
121
+ }
122
+ .dialog.closing::backdrop {
123
+ background: transparent;
124
+ backdrop-filter: blur(0);
125
+ transition:
126
+ background var(--popup-exit),
127
+ backdrop-filter var(--popup-exit);
128
+ }
129
+
130
+ @media (max-width: 600px) {
131
+ .dialog {
132
+ max-height: calc(100dvh - 24px);
133
+ }
134
+ .dialogBody {
135
+ padding: 16px;
136
+ }
137
+ .dialogHeader {
138
+ padding: 10px 8px 10px 16px;
139
+ }
140
+ .dialogFooter {
141
+ padding: 18px 20px;
142
+ }
143
+ }
144
+
145
+ @keyframes fade-in {
146
+ from {
147
+ opacity: 0;
148
+ }
149
+ to {
150
+ opacity: 1;
151
+ }
152
+ }
@@ -26,7 +26,6 @@
26
26
  overflow-x: clip;
27
27
  overflow-y: auto;
28
28
  overscroll-behavior: contain;
29
- scrollbar-width: thin;
30
29
  scrollbar-gutter: stable both-edges;
31
30
  pointer-events: none;
32
31
  }
@@ -102,7 +101,6 @@
102
101
  box-sizing: border-box;
103
102
  max-height: min(320px, calc(100dvh - 80px));
104
103
  overflow: auto;
105
- scrollbar-width: thin;
106
104
  }
107
105
  .copy {
108
106
  flex: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robert-stackflow/oneui",
3
- "version": "0.6.57",
3
+ "version": "0.6.59",
4
4
  "description": "OneUI React components, application shell and portable visual themes",
5
5
  "type": "module",
6
6
  "sideEffects": [