@unpunnyfuns/swatchbook-blocks 0.16.0 → 0.17.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/index.d.mts +19 -17
- package/dist/index.mjs +2299 -2079
- package/dist/index.mjs.map +1 -1
- package/dist/style.css +681 -538
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -246,33 +246,35 @@ interface ColorTableProps {
|
|
|
246
246
|
/** `'asc'` (default) or `'desc'`. */
|
|
247
247
|
sortDir?: SortDir;
|
|
248
248
|
/**
|
|
249
|
-
* Render a fuzzy-search input above the table
|
|
250
|
-
* single-char typo tolerance, out-of-order terms, matches across path +
|
|
251
|
-
* any format value). Defaults to `true`.
|
|
249
|
+
* Render a fuzzy-search input above the table. Defaults to `true`.
|
|
252
250
|
*/
|
|
253
251
|
searchable?: boolean;
|
|
254
252
|
/**
|
|
255
|
-
* Called with the
|
|
256
|
-
*
|
|
253
|
+
* Called with the *currently-selected* variant's dot-path on row click.
|
|
254
|
+
* When set, the built-in expand-in-place behavior is suppressed — the
|
|
255
|
+
* consumer owns follow-up UI.
|
|
257
256
|
*/
|
|
258
257
|
onSelect?(path: string): void;
|
|
259
258
|
/**
|
|
260
259
|
* Map from a display label to a suffix matched against each token's
|
|
261
|
-
* trailing path segment.
|
|
262
|
-
*
|
|
260
|
+
* trailing path segment. Tokens whose leaves match a suffix are grouped
|
|
261
|
+
* under a shared "base" path (the path with the suffix stripped), and
|
|
262
|
+
* the group renders as a single row with a pill selector — clicking a
|
|
263
|
+
* pill swaps the displayed values to that variant. Sibling tokens
|
|
264
|
+
* without a suffix that share the group's base path are labeled `base`.
|
|
263
265
|
*
|
|
264
|
-
*
|
|
265
|
-
* - **Dot segment** (`color.bg.hi.disabled`):
|
|
266
|
-
* the suffix
|
|
267
|
-
* - **Hyphen tail** (`color.bg.hi-d`):
|
|
268
|
-
* `-<suffix>` (`
|
|
266
|
+
* Matches both DTCG-idiomatic and Backmarket-style conventions:
|
|
267
|
+
* - **Dot segment** (`color.bg.hi.disabled`): last dot-segment equals
|
|
268
|
+
* the suffix (`disabled`). Base path = drop the last segment.
|
|
269
|
+
* - **Hyphen tail** (`color.bg.hi-d`): last dot-segment ends in
|
|
270
|
+
* `-<suffix>` (`d`). Base path = trim the `-<suffix>` from the leaf.
|
|
269
271
|
*
|
|
270
|
-
* Longest-suffix-wins
|
|
271
|
-
* `
|
|
272
|
-
* requires an actual hyphen boundary — suffix `0` does not match
|
|
273
|
-
* `neutral-900`. Tokens that don't match any suffix render with no pill.
|
|
272
|
+
* Longest-suffix-wins. Hyphen-tail form requires an actual hyphen
|
|
273
|
+
* boundary — suffix `0` does not match `neutral-900`.
|
|
274
274
|
*
|
|
275
|
-
*
|
|
275
|
+
* Single-member groups render as plain rows (no pill selector). Empty
|
|
276
|
+
* map (default) disables grouping entirely; each token renders as its
|
|
277
|
+
* own row, identical to the pre-grouping behavior.
|
|
276
278
|
*/
|
|
277
279
|
variants?: Record<string, string>;
|
|
278
280
|
}
|