@hjmds/design-contracts 1.33.2 → 1.34.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.
- package/dist/card.d.ts +1 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +4 -2
- package/dist/card.js.map +1 -1
- package/dist/catalog.d.ts +27 -35
- package/dist/catalog.d.ts.map +1 -1
- package/dist/colors.d.ts +3 -0
- package/dist/colors.d.ts.map +1 -1
- package/dist/colors.js +4 -0
- package/dist/colors.js.map +1 -1
- package/dist/component-recipes.d.ts +26 -34
- package/dist/component-recipes.d.ts.map +1 -1
- package/dist/component-recipes.js +15 -60
- package/dist/component-recipes.js.map +1 -1
- package/dist/tag.d.ts +1 -1
- package/dist/tag.js +1 -1
- package/dist/tag.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/generated/component-maturity.md +1 -1
- package/docs/generated/renderer-evidence.json +3 -3
- package/docs/generated/renderer-evidence.md +1 -1
- package/docs/generated/showcase-manifest.json +1 -1
- package/docs/theme-palette.md +4 -0
- package/docs/usage/SELECTION.md +5 -1
- package/docs/usage/components/badge.md +12 -6
- package/docs/usage/components/card.md +7 -2
- package/docs/usage/components/comment-thread-row.md +3 -0
- package/docs/usage/components/menu.md +7 -5
- package/docs/usage/components/screen-layout.md +4 -2
- package/docs/usage/components/search-screen.md +4 -4
- package/docs/usage/components/top-bar.md +2 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { solidAccentColor, themeColor } from "./color-references.js";
|
|
1
2
|
import { collectionItemContract, fieldFrameContract, floatingSurfaceContract, focusIndicatorContract, formSupportContract, } from "./component-contracts.js";
|
|
2
3
|
import { backdrop, breakpoint, control, glyph, layer, largeTextThreshold, layout, fontWeight, motion, motionPreset, opacity, radius, spacing, stroke, typography, } from "./foundations.js";
|
|
3
4
|
import { buttonRecipe } from "./base-recipes.js";
|
|
@@ -137,7 +138,7 @@ export const selectionGroupRecipe = {
|
|
|
137
138
|
states: { disabledOpacity: opacity.disabled },
|
|
138
139
|
};
|
|
139
140
|
export const badgeRecipe = {
|
|
140
|
-
slots: ["root", "icon", "label"],
|
|
141
|
+
slots: ["root", "icon", "label", "trailing"],
|
|
141
142
|
defaults: { tone: "neutral", size: "medium", variant: "filled" },
|
|
142
143
|
variants: {
|
|
143
144
|
filled: {
|
|
@@ -149,68 +150,22 @@ export const badgeRecipe = {
|
|
|
149
150
|
borderFallback: semanticColors.border.default,
|
|
150
151
|
},
|
|
151
152
|
},
|
|
153
|
+
// 2026-10-18: match the Today Baseball status plate reference: solid fill,
|
|
154
|
+
// white copy and compact rounded corners. Outline retains its tone-colored copy.
|
|
152
155
|
tones: {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
strong: {
|
|
162
|
-
content: semanticColors.content.inverse,
|
|
163
|
-
outlineContent: semanticColors.content.primary,
|
|
164
|
-
background: semanticColors.content.primary,
|
|
165
|
-
border: null,
|
|
166
|
-
},
|
|
167
|
-
brand: {
|
|
168
|
-
content: semanticColors.content.brand,
|
|
169
|
-
outlineContent: semanticColors.content.brand,
|
|
170
|
-
// The brand tint now means "selected" everywhere (see
|
|
171
|
-
// `selectionControlRecipe`/`segmentedControlRecipe`), so a badge that
|
|
172
|
-
// only labels something — a season, a grade, a question number —
|
|
173
|
-
// cannot wear it: rows of static badges started reading as a filter
|
|
174
|
-
// with one option switched on. The plate goes neutral and the brand
|
|
175
|
-
// stays in the copy.
|
|
176
|
-
background: semanticColors.canvas,
|
|
177
|
-
border: semanticColors.border.default,
|
|
178
|
-
},
|
|
179
|
-
info: {
|
|
180
|
-
content: semanticColors.feedback.info.foreground,
|
|
181
|
-
outlineContent: semanticColors.feedback.info.foreground,
|
|
182
|
-
background: semanticColors.canvas,
|
|
183
|
-
border: semanticColors.feedback.info.border,
|
|
184
|
-
},
|
|
185
|
-
success: {
|
|
186
|
-
content: semanticColors.feedback.success.foreground,
|
|
187
|
-
outlineContent: semanticColors.feedback.success.foreground,
|
|
188
|
-
background: semanticColors.feedback.success.badgeBackground,
|
|
189
|
-
border: semanticColors.feedback.success.border,
|
|
190
|
-
},
|
|
191
|
-
warning: {
|
|
192
|
-
content: semanticColors.feedback.warning.foreground,
|
|
193
|
-
outlineContent: semanticColors.feedback.warning.foreground,
|
|
194
|
-
background: semanticColors.feedback.warning.badgeBackground,
|
|
195
|
-
border: semanticColors.feedback.warning.border,
|
|
196
|
-
},
|
|
197
|
-
attention: {
|
|
198
|
-
content: semanticColors.feedback.attention.foreground,
|
|
199
|
-
outlineContent: semanticColors.feedback.attention.foreground,
|
|
200
|
-
background: semanticColors.feedback.attention.badgeBackground,
|
|
201
|
-
border: semanticColors.feedback.attention.border,
|
|
202
|
-
},
|
|
203
|
-
danger: {
|
|
204
|
-
content: semanticColors.feedback.danger.foreground,
|
|
205
|
-
outlineContent: semanticColors.feedback.danger.foreground,
|
|
206
|
-
background: semanticColors.feedback.danger.badgeBackground,
|
|
207
|
-
border: semanticColors.feedback.danger.border,
|
|
208
|
-
},
|
|
156
|
+
neutral: { content: semanticColors.content.inverse, outlineContent: semanticColors.content.secondary, background: themeColor("neutralFill"), border: null },
|
|
157
|
+
strong: { content: semanticColors.content.inverse, outlineContent: semanticColors.content.primary, background: themeColor("strongFill"), border: null },
|
|
158
|
+
brand: { content: semanticColors.content.inverse, outlineContent: semanticColors.content.brand, background: semanticColors.action.brand.background, border: null },
|
|
159
|
+
info: { content: semanticColors.content.inverse, outlineContent: semanticColors.feedback.info.foreground, background: solidAccentColor("info"), border: semanticColors.feedback.info.border },
|
|
160
|
+
success: { content: semanticColors.content.inverse, outlineContent: semanticColors.feedback.success.foreground, background: solidAccentColor("success"), border: semanticColors.feedback.success.border },
|
|
161
|
+
warning: { content: semanticColors.content.inverse, outlineContent: semanticColors.feedback.warning.foreground, background: solidAccentColor("warning"), border: semanticColors.feedback.warning.border },
|
|
162
|
+
attention: { content: semanticColors.content.inverse, outlineContent: semanticColors.feedback.attention.foreground, background: solidAccentColor("attention"), border: semanticColors.feedback.attention.border },
|
|
163
|
+
danger: { content: semanticColors.action.danger.content, outlineContent: semanticColors.content.danger, background: semanticColors.action.danger.background, border: semanticColors.feedback.danger.border },
|
|
209
164
|
},
|
|
210
165
|
sizes: {
|
|
211
166
|
small: {
|
|
212
167
|
minHeight: 20,
|
|
213
|
-
paddingHorizontal: spacing.
|
|
168
|
+
paddingHorizontal: spacing.xs,
|
|
214
169
|
gap: spacing.xxs,
|
|
215
170
|
textVariant: "caption",
|
|
216
171
|
},
|
|
@@ -221,9 +176,9 @@ export const badgeRecipe = {
|
|
|
221
176
|
textVariant: "caption",
|
|
222
177
|
},
|
|
223
178
|
},
|
|
224
|
-
radius: "
|
|
179
|
+
radius: "sm",
|
|
225
180
|
borderWidth: stroke.default,
|
|
226
|
-
fontWeight: fontWeight.
|
|
181
|
+
fontWeight: fontWeight.bold,
|
|
227
182
|
};
|
|
228
183
|
/** Search is a field specialization with stable affordance and clear targets. */
|
|
229
184
|
export const searchFieldRecipe = {
|