@sproutsocial/racine 31.7.25 → 31.7.26

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,5 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## 31.7.26
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ffdb036]
8
+ - Updated dependencies [e39bbd7]
9
+ - Updated dependencies [32c2ae7]
10
+ - @sproutsocial/seeds-react-chart-legend@1.0.54
11
+ - @sproutsocial/seeds-react-list@0.4.0
12
+ - @sproutsocial/seeds-react-checkbox@1.3.55
13
+ - @sproutsocial/seeds-react-message@1.0.65
14
+ - @sproutsocial/seeds-react-accordion@0.4.67
15
+
3
16
  ## 31.7.25
4
17
 
5
18
  ### Patch Changes
@@ -1017,6 +1017,56 @@
1017
1017
  }
1018
1018
  }
1019
1019
 
1020
+ /* --- seeds-react-chart-legend --- */
1021
+ @layer components {
1022
+ .seeds-chart-legend {
1023
+ --chart-legend-label-color: var(--color-text-subtext);
1024
+ --chart-legend-swatch-gap: var(--space-300);
1025
+ --chart-legend-swatch-size: var(--space-350);
1026
+ --chart-legend-label-gap: var(--space-450);
1027
+ --chart-legend-font-family: var(--font-family);
1028
+ --chart-legend-font-size: var(--font-size-200);
1029
+ --chart-legend-line-height: var(--line-height-200);
1030
+ }
1031
+
1032
+ .seeds-chart-legend-inline {
1033
+ display: flex;
1034
+ justify-content: center;
1035
+ }
1036
+
1037
+ .seeds-chart-legend-label {
1038
+ display: flex;
1039
+ align-items: center;
1040
+ color: var(--chart-legend-label-color, var(--color-text-subtext));
1041
+ white-space: nowrap;
1042
+ text-transform: capitalize;
1043
+ }
1044
+
1045
+ .seeds-chart-legend-inline
1046
+ .seeds-chart-legend-label
1047
+ + .seeds-chart-legend-label {
1048
+ margin-left: var(--chart-legend-label-gap, var(--space-450));
1049
+ }
1050
+
1051
+ .seeds-chart-legend-swatch {
1052
+ margin-right: var(--chart-legend-swatch-gap, var(--space-300));
1053
+ width: var(--chart-legend-swatch-size, var(--space-350));
1054
+ height: var(--chart-legend-swatch-size, var(--space-350));
1055
+ border-radius: 4px;
1056
+ }
1057
+
1058
+ .seeds-chart-legend-text {
1059
+ margin: 0;
1060
+ padding-left: 0;
1061
+ padding-right: 0;
1062
+ font-family: var(--chart-legend-font-family, var(--font-family));
1063
+ font-size: var(--chart-legend-font-size, var(--font-size-200));
1064
+ line-height: var(--chart-legend-line-height, var(--line-height-200));
1065
+ word-break: break-word;
1066
+ hyphens: auto;
1067
+ }
1068
+ }
1069
+
1020
1070
  /* --- seeds-react-chat-bubble --- */
1021
1071
  /**
1022
1072
  * Seeds ChatBubble component classes
@@ -1079,6 +1129,195 @@
1079
1129
  }
1080
1130
  }
1081
1131
 
1132
+ /* --- seeds-react-checkbox --- */
1133
+ /**
1134
+ * Seeds Checkbox component classes
1135
+ * Use these instead of writing out individual Tailwind utility classes.
1136
+ *
1137
+ * Requires @sproutsocial/seeds-react-theme/dist/theme-all.css imported for
1138
+ * CSS variable definitions and dark mode support.
1139
+ *
1140
+ * Usage (default appearance): rendered by CheckboxTailwind on top of
1141
+ * `@base-ui/react`'s Checkbox —
1142
+ * <span class="seeds-checkbox">
1143
+ * <button class="seeds-checkbox-input" role="checkbox">
1144
+ * <span class="seeds-checkbox-indicator">
1145
+ * <Icon class="seeds-checkbox-icon" />
1146
+ * </span>
1147
+ * </button>
1148
+ * <span class="seeds-checkbox-label">Label</span>
1149
+ * </span>
1150
+ *
1151
+ * The default-appearance box is base-ui's `Checkbox.Root` (`<button
1152
+ * role="checkbox">`) and the mark is a real `<Icon>` inside
1153
+ * `Checkbox.Indicator`. State is read from base-ui's ARIA contract
1154
+ * (`aria-checked` = "true" | "mixed" | "false") and its `data-disabled`
1155
+ * attribute, so there is no imperative `indeterminate` sync and no mask-image
1156
+ * pseudo-element — which is what made the previous indeterminate rendering
1157
+ * unreliable.
1158
+ *
1159
+ * All rules are wrapped in `@layer components` so consuming Tailwind utility
1160
+ * classes (e.g. `mx-200`, `p-300`, `inline-flex`) win the cascade over these
1161
+ * component styles.
1162
+ */
1163
+
1164
+ @layer components {
1165
+ /* ----------------------------------------------------------------------------
1166
+ * Default appearance
1167
+ * ------------------------------------------------------------------------- */
1168
+
1169
+ .seeds-checkbox {
1170
+ display: inline-flex;
1171
+ align-items: center;
1172
+ box-sizing: border-box;
1173
+ position: relative;
1174
+ transition: all var(--duration-fast) var(--ease-ease_in);
1175
+ }
1176
+
1177
+ /* Whole control dims when the control is disabled (matches container opacity).
1178
+ base-ui sets both the native `disabled` attribute and `data-disabled`. */
1179
+ .seeds-checkbox:has(.seeds-checkbox-input:disabled),
1180
+ .seeds-checkbox:has(.seeds-checkbox-input[data-disabled]) {
1181
+ opacity: 0.4;
1182
+ }
1183
+
1184
+ /* The box — base-ui's Checkbox.Root <button>. `color` sets the grey mark used
1185
+ for the hover preview; the selected state overrides the mark color below. */
1186
+ .seeds-checkbox .seeds-checkbox-input {
1187
+ box-sizing: border-box;
1188
+ appearance: none;
1189
+ -webkit-appearance: none;
1190
+ display: inline-flex;
1191
+ align-items: center;
1192
+ justify-content: center;
1193
+ position: relative;
1194
+ margin: 0;
1195
+ padding: 0;
1196
+ width: var(--space-400);
1197
+ height: var(--space-400);
1198
+ border: 1px solid var(--color-form-border-base);
1199
+ border-radius: var(--radius-400);
1200
+ background-color: var(--color-form-bg-base);
1201
+ color: var(--color-form-border-base);
1202
+ transition: all var(--duration-fast) var(--ease-ease_in);
1203
+ cursor: pointer;
1204
+ flex-shrink: 0;
1205
+ }
1206
+
1207
+ .seeds-checkbox .seeds-checkbox-input:disabled,
1208
+ .seeds-checkbox .seeds-checkbox-input[data-disabled] {
1209
+ cursor: not-allowed;
1210
+ }
1211
+
1212
+ /* Selected (checked or indeterminate): filled box. The mark color is set here
1213
+ (not on the icon) so it inherits through the seeds Icon's unlayered
1214
+ `.Icon { color: inherit }` rule, which would otherwise win the cascade over a
1215
+ layered color on `.seeds-checkbox-icon`. `--color-icon-inverse` resolves to
1216
+ white in light mode and black in dark mode — matching the SC component's
1217
+ `icon.inverse` checked-mark color (styles.tsx:137). */
1218
+ .seeds-checkbox .seeds-checkbox-input[aria-checked="true"],
1219
+ .seeds-checkbox .seeds-checkbox-input[aria-checked="mixed"] {
1220
+ border-color: var(--color-form-border-selected);
1221
+ background-color: var(--color-form-bg-selected);
1222
+ color: var(--color-icon-inverse);
1223
+ }
1224
+
1225
+ /* Focus ring. The visible box is base-ui's Checkbox.Root <button>, but base-ui
1226
+ also renders a separate hidden <input> for form participation, and focus (on
1227
+ click or Tab) can land on that <input> rather than the button. A plain
1228
+ `.seeds-checkbox-input:focus` only matched the button, so the ring never
1229
+ painted and the box looked unfocusable. Track focus anywhere inside the
1230
+ control and paint the ring on the visible box regardless of which element
1231
+ actually holds focus: base-ui mirrors focus state onto the Root button as
1232
+ `data-focused`, and the `:has(:focus)` wrapper rules catch focus on either
1233
+ the button or the hidden <input>. `:focus` (not `:focus-visible`) keeps parity
1234
+ with the styled-components `focusRing` mixin, which shows the ring on both
1235
+ keyboard focus and click (styles.tsx:115-117). */
1236
+ .seeds-checkbox .seeds-checkbox-input[data-focused],
1237
+ .seeds-checkbox:has(.seeds-checkbox-input:focus) .seeds-checkbox-input,
1238
+ .seeds-checkbox:has(input:focus) .seeds-checkbox-input {
1239
+ box-shadow:
1240
+ 0 0 0 1px var(--color-button-primary-bg-base),
1241
+ 0 0px 0px 4px
1242
+ color-mix(
1243
+ in srgb,
1244
+ var(--color-button-primary-bg-base),
1245
+ transparent 70%
1246
+ );
1247
+ outline: none;
1248
+ }
1249
+
1250
+ .seeds-checkbox .seeds-checkbox-input:focus::-moz-focus-inner {
1251
+ border: 0;
1252
+ }
1253
+
1254
+ /* The mark — a real <Icon> inside Checkbox.Indicator (kept mounted). Hidden by
1255
+ default; shown (inverse) when selected, previewed (grey) on hover. */
1256
+ .seeds-checkbox .seeds-checkbox-indicator {
1257
+ display: inline-flex;
1258
+ align-items: center;
1259
+ justify-content: center;
1260
+ pointer-events: none;
1261
+ }
1262
+
1263
+ .seeds-checkbox .seeds-checkbox-icon {
1264
+ display: inline-flex;
1265
+ align-items: center;
1266
+ justify-content: center;
1267
+ opacity: 0;
1268
+ color: currentColor;
1269
+ pointer-events: none;
1270
+ transition: var(--duration-fast) var(--ease-ease_inout);
1271
+ }
1272
+
1273
+ .seeds-checkbox .seeds-checkbox-icon,
1274
+ .seeds-checkbox .seeds-checkbox-icon .Icon-svg {
1275
+ width: 10px;
1276
+ height: 10px;
1277
+ line-height: 10px;
1278
+ }
1279
+
1280
+ /* Selected: inverse mark, shown. The mark inherits its color from the box's
1281
+ `color: var(--color-icon-inverse)` above (via the Icon's unlayered
1282
+ `color: inherit`), so only opacity is toggled here. */
1283
+ .seeds-checkbox .seeds-checkbox-input[aria-checked="true"] .seeds-checkbox-icon,
1284
+ .seeds-checkbox
1285
+ .seeds-checkbox-input[aria-checked="mixed"]
1286
+ .seeds-checkbox-icon {
1287
+ opacity: 1;
1288
+ }
1289
+
1290
+ /* Hover previews the mark (grey, via the box `color`) unless the control is
1291
+ disabled and unchecked. */
1292
+ .seeds-checkbox
1293
+ .seeds-checkbox-input:not(:disabled):not([data-disabled]):hover
1294
+ .seeds-checkbox-icon {
1295
+ opacity: 1;
1296
+ }
1297
+
1298
+ .seeds-checkbox
1299
+ .seeds-checkbox-input[aria-checked="false"]:disabled:hover
1300
+ .seeds-checkbox-icon,
1301
+ .seeds-checkbox
1302
+ .seeds-checkbox-input[aria-checked="false"][data-disabled]:hover
1303
+ .seeds-checkbox-icon {
1304
+ opacity: 0;
1305
+ }
1306
+
1307
+ .seeds-checkbox-label {
1308
+ margin-left: var(--space-300);
1309
+ font-size: var(--font-size-200);
1310
+ line-height: 1;
1311
+ cursor: pointer;
1312
+ color: var(--color-text-headline);
1313
+ }
1314
+
1315
+ .seeds-checkbox:has(.seeds-checkbox-input:disabled) .seeds-checkbox-label {
1316
+ cursor: not-allowed;
1317
+ opacity: 0.4;
1318
+ }
1319
+ } /* end @layer components */
1320
+
1082
1321
  /* --- seeds-react-collapsible --- */
1083
1322
  /**
1084
1323
  * Seeds Collapsible component classes
@@ -2204,6 +2443,120 @@
2204
2443
  }
2205
2444
  }
2206
2445
 
2446
+ /* --- seeds-react-list --- */
2447
+ /**
2448
+ * Seeds List component classes
2449
+ * Use these instead of writing out individual Tailwind utility classes.
2450
+ *
2451
+ * Requires @sproutsocial/seeds-react-theme/dist/theme-all.css imported for
2452
+ * CSS variable definitions and dark mode support.
2453
+ *
2454
+ * Usage:
2455
+ * <ul class="seeds-list">
2456
+ * <li class="seeds-list-item">…</li>
2457
+ * <li class="seeds-list-item seeds-list-item-bordered">…</li>
2458
+ * </ul>
2459
+ *
2460
+ * Rules live in `@layer components` so that consumer Tailwind utilities
2461
+ * (e.g. mt-300, p-300) win in the cascade and can override these component
2462
+ * styles, rather than tying/beating them on specificity.
2463
+ */
2464
+
2465
+ @layer components {
2466
+ /* List container: strip the browser's default list chrome. */
2467
+ .seeds-list {
2468
+ margin: 0;
2469
+ padding: 0;
2470
+ list-style: none;
2471
+ }
2472
+
2473
+ /* List item: rounded row that stacks with top spacing. The legacy component
2474
+ applies `mt={300}` to every item (including the first), so the class does
2475
+ the same rather than collapsing the first item's margin. */
2476
+ .seeds-list-item {
2477
+ box-sizing: border-box;
2478
+ margin-top: var(--space-300);
2479
+ border-radius: var(--radius-outer);
2480
+ }
2481
+
2482
+ /* Bordered items read as a card/button: 1px container border + padding.
2483
+ borderWidths[500] resolves to 1px; no --border-width var is emitted. */
2484
+ .seeds-list-item-bordered {
2485
+ border: 1px solid var(--color-container-border-base);
2486
+ padding: var(--space-300);
2487
+ }
2488
+
2489
+ /* ListItemContent ---------------------------------------------------- */
2490
+
2491
+ /* Outer row: main content left, aside/actions right, baseline-aligned. */
2492
+ .seeds-list-item-content {
2493
+ display: flex;
2494
+ justify-content: space-between;
2495
+ align-items: baseline;
2496
+ border-radius: var(--radius-outer);
2497
+ }
2498
+
2499
+ /* Main content grows to fill; icon sits to the left of the text block. */
2500
+ .seeds-list-item-content-main {
2501
+ display: flex;
2502
+ flex: 1;
2503
+ }
2504
+
2505
+ /* Icon spacing previously came from Icon's mr={300} system prop. */
2506
+ .seeds-list-item-content-icon {
2507
+ margin-right: var(--space-300);
2508
+ }
2509
+
2510
+ .seeds-list-item-content-text {
2511
+ flex: 1;
2512
+ }
2513
+
2514
+ /* Details byline spacing previously came from its mt={200} system prop.
2515
+ The details node is a Text.Byline, so it also carries `.seeds-text`, whose
2516
+ `margin: 0` sits later in the aggregated component layer and would reset a
2517
+ single-class rule. Qualify with the parent to raise specificity above
2518
+ `.seeds-text` while staying inside the components layer (consumer utilities
2519
+ still win). */
2520
+ .seeds-list-item-content .seeds-list-item-content-details {
2521
+ margin-top: var(--space-200);
2522
+ }
2523
+
2524
+ /* Aside/actions cluster on the right; does not shrink. */
2525
+ .seeds-list-item-content-aside {
2526
+ display: flex;
2527
+ align-items: center;
2528
+ gap: var(--space-300);
2529
+ flex-shrink: 0;
2530
+ }
2531
+
2532
+ .seeds-list-item-content-actions {
2533
+ display: flex;
2534
+ align-items: center;
2535
+ }
2536
+
2537
+ /* ListItemButton ----------------------------------------------------- */
2538
+
2539
+ /* Container reads as a card. radii[500] resolves to 6px (--radius-inner). */
2540
+ .seeds-list-item-button {
2541
+ position: relative;
2542
+ box-sizing: border-box;
2543
+ border: 1px solid var(--color-container-border-base);
2544
+ padding: var(--space-300);
2545
+ border-radius: var(--radius-inner);
2546
+ background-color: var(--color-container-bg-base);
2547
+ color: var(--color-text-body);
2548
+ }
2549
+
2550
+ /* Transparent overlay button that captures clicks across the whole card. */
2551
+ .seeds-list-item-button-overlay {
2552
+ position: absolute;
2553
+ top: 0;
2554
+ left: 0;
2555
+ width: 100%;
2556
+ height: 100%;
2557
+ }
2558
+ }
2559
+
2207
2560
  /* --- seeds-react-loader --- */
2208
2561
  /**
2209
2562
  * Seeds Loader component classes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutsocial/racine",
3
- "version": "31.7.25",
3
+ "version": "31.7.26",
4
4
  "license": "MIT",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -73,7 +73,7 @@
73
73
  },
74
74
  "dependencies": {
75
75
  "@size-limit/file": "^11.1.6",
76
- "@sproutsocial/seeds-react-accordion": "^0.4.66",
76
+ "@sproutsocial/seeds-react-accordion": "^0.4.67",
77
77
  "@sproutsocial/seeds-react-avatar": "^1.1.29",
78
78
  "@sproutsocial/seeds-react-badge": "^2.0.46",
79
79
  "@sproutsocial/seeds-react-banner": "^1.1.36",
@@ -82,9 +82,9 @@
82
82
  "@sproutsocial/seeds-react-button": "^2.3.9",
83
83
  "@sproutsocial/seeds-react-card": "^1.1.55",
84
84
  "@sproutsocial/seeds-react-character-counter": "^1.0.10",
85
- "@sproutsocial/seeds-react-chart-legend": "^1.0.53",
85
+ "@sproutsocial/seeds-react-chart-legend": "^1.0.54",
86
86
  "@sproutsocial/seeds-react-chat-bubble": "^0.2.7",
87
- "@sproutsocial/seeds-react-checkbox": "^1.3.54",
87
+ "@sproutsocial/seeds-react-checkbox": "^1.3.55",
88
88
  "@sproutsocial/seeds-react-collapsible": "^2.0.1",
89
89
  "@sproutsocial/seeds-react-container": "^0.3.26",
90
90
  "@sproutsocial/seeds-react-content-block": "^0.6.1",
@@ -105,10 +105,10 @@
105
105
  "@sproutsocial/seeds-react-keyboard-key": "^1.0.34",
106
106
  "@sproutsocial/seeds-react-label": "^1.0.34",
107
107
  "@sproutsocial/seeds-react-link": "^1.1.24",
108
- "@sproutsocial/seeds-react-list": "^0.3.41",
108
+ "@sproutsocial/seeds-react-list": "^0.4.0",
109
109
  "@sproutsocial/seeds-react-loader": "^1.0.34",
110
110
  "@sproutsocial/seeds-react-loader-button": "^1.0.60",
111
- "@sproutsocial/seeds-react-message": "^1.0.64",
111
+ "@sproutsocial/seeds-react-message": "^1.0.65",
112
112
  "@sproutsocial/seeds-react-mixins": "^4.3.16",
113
113
  "@sproutsocial/seeds-react-modal": "^2.6.1",
114
114
  "@sproutsocial/seeds-react-narrative-kit": "^0.6.7",
@@ -163,7 +163,7 @@
163
163
  "@sproutsocial/seeds-motion": "^1.8.2",
164
164
  "@sproutsocial/seeds-networkcolor": "^2.22.0",
165
165
  "@sproutsocial/seeds-partner-logos": "^2.4.1",
166
- "@sproutsocial/seeds-react-menu": "^1.18.0",
166
+ "@sproutsocial/seeds-react-menu": "^1.18.1",
167
167
  "@sproutsocial/seeds-react-testing-library": "*",
168
168
  "@sproutsocial/seeds-space": "^0.8.1",
169
169
  "@sproutsocial/seeds-testing": "*",