@stackone/malachite 0.62.0 → 0.62.1

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.ts CHANGED
@@ -943,6 +943,14 @@ export declare interface MalachiteTheme {
943
943
  trackChecked: string;
944
944
  knob: string;
945
945
  };
946
+ segmentedControl: {
947
+ trackBackground: string;
948
+ itemForeground: string;
949
+ itemHoverForeground: string;
950
+ selectedBackground: string;
951
+ selectedForeground: string;
952
+ selectedShadow: string;
953
+ };
946
954
  dropdown: {
947
955
  border: string;
948
956
  borderActive: string;
@@ -1221,6 +1229,7 @@ export declare interface PartialMalachiteTheme {
1221
1229
  buttonList?: Partial<MalachiteTheme['colors']['buttonList']>;
1222
1230
  pillButton?: Partial<MalachiteTheme['colors']['pillButton']>;
1223
1231
  toggle?: Partial<MalachiteTheme['colors']['toggle']>;
1232
+ segmentedControl?: Partial<MalachiteTheme['colors']['segmentedControl']>;
1224
1233
  dropdown?: Partial<MalachiteTheme['colors']['dropdown']>;
1225
1234
  tag?: Partial<MalachiteTheme['colors']['tag']>;
1226
1235
  numberTag?: Partial<MalachiteTheme['colors']['numberTag']>;
@@ -1342,6 +1351,43 @@ declare interface SectionTitleProps {
1342
1351
  style?: default_2.CSSProperties;
1343
1352
  }
1344
1353
 
1354
+ /**
1355
+ * A pill track of mutually-exclusive options — the segmented "one of these" control.
1356
+ *
1357
+ * Owns the track background, the selected-thumb chrome and the radiogroup semantics in
1358
+ * one place, so consumers never hand-roll a track around `PillButton` (whose `default`
1359
+ * variant tokens are tuned for standalone filter pills, not for a sunken track).
1360
+ *
1361
+ * Selection is conveyed non-visually via `role="radio"` + `aria-checked`, and by a
1362
+ * foreground-colour change as well as the thumb, so it does not rest on background
1363
+ * colour alone.
1364
+ */
1365
+ export declare const SegmentedControl: <T extends string = string>({ options, value, onChange, size, fullWidth, disabled, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, }: SegmentedControlProps<T>) => JSX_2.Element;
1366
+
1367
+ export declare interface SegmentedControlOption<T extends string = string> {
1368
+ value: T;
1369
+ label: string;
1370
+ icon?: default_2.ReactNode;
1371
+ disabled?: boolean;
1372
+ }
1373
+
1374
+ export declare interface SegmentedControlProps<T extends string = string> {
1375
+ options: SegmentedControlOption<T>[];
1376
+ /** The selected option's value. A value not present in `options` renders nothing selected. */
1377
+ value: T;
1378
+ onChange: (value: T) => void;
1379
+ size?: SegmentedControlSize;
1380
+ /** Stretch the track to its container and split it into equal segments. */
1381
+ fullWidth?: boolean;
1382
+ /** Disables every segment. Individual segments can also be disabled via `options`. */
1383
+ disabled?: boolean;
1384
+ 'aria-label'?: string;
1385
+ 'aria-labelledby'?: string;
1386
+ className?: string;
1387
+ }
1388
+
1389
+ export declare type SegmentedControlSize = 'small' | 'medium';
1390
+
1345
1391
  /**
1346
1392
  * ShadowEscape renders its children OUTSIDE the Shadow DOM to avoid React hook issues.
1347
1393
  * This is used internally by form components to escape Shadow DOM boundaries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as s, b as t, c as o, d as i, B as r, e as n, f as l, C as p, g as T, h as d, i as m, j as c, k as S, l as h, m as u, D as g, n as C, o as y, p as F, F as w, q as x, r as f, s as k, t as v, u as B, v as L, w as P, x as b, I as A, K as D, L as z, y as R, M, z as I, N, O as V, P as j, E as q, G as E, H as G, J as H, Q as J, R as K, S as O, T as W, U as Q, V as U, W as X, X as Y, Y as Z, Z as $, $ as _, a0 as aa, a1 as ea, a2 as sa, a3 as ta, a4 as oa, a5 as ia, a6 as ra, a7 as na, a8 as la, a9 as pa, aa as Ta, ab as da, ac as ma, ad as ca, ae as Sa, af as ha, ag as ua, ah as ga, ai as Ca, aj as ya, ak as Fa, al as wa, am as xa, an as fa, ao as ka, ap as va, aq as Ba, ar as La, as as Pa, at as ba } from "./index-CAu3SySY.js";
1
+ import { A as s, b as t, c as o, d as i, B as r, e as n, f as l, C as p, g as T, h as d, i as m, j as S, k as c, l as h, m as u, D as g, n as C, o as y, p as F, F as w, q as x, r as f, s as k, t as v, u as B, v as L, w as P, x as b, I as A, K as D, L as z, y as R, M, z as I, N, O as V, P as j, E as q, G as E, H as G, J as H, Q as J, R as K, S as O, T as W, U as Q, V as U, W as X, X as Y, Y as Z, Z as $, $ as _, a0 as aa, a1 as ea, a2 as sa, a3 as ta, a4 as oa, a5 as ia, a6 as ra, a7 as na, a8 as la, a9 as pa, aa as Ta, ab as da, ac as ma, ad as Sa, ae as ca, af as ha, ag as ua, ah as ga, ai as Ca, aj as ya, ak as Fa, al as wa, am as xa, an as fa, ao as ka, ap as va, aq as Ba, ar as La, as as Pa, at as ba, au as Aa } from "./index-Bi3n5zTv.js";
2
2
  export {
3
3
  s as Accordion,
4
4
  t as ActionMenu,
@@ -11,8 +11,8 @@ export {
11
11
  T as Checkbox,
12
12
  d as ClampText,
13
13
  m as CodeBlock,
14
- c as CollapsibleSection,
15
- S as Confetti,
14
+ S as CollapsibleSection,
15
+ c as Confetti,
16
16
  h as ConnectionHeader,
17
17
  u as CustomIcons,
18
18
  g as DefinitionRow,
@@ -44,43 +44,44 @@ export {
44
44
  J as Progress,
45
45
  K as Radio,
46
46
  O as Search,
47
- W as ShadowEscape,
48
- Q as SidePanel,
49
- U as SidePanelNavFooter,
50
- X as Skeleton,
51
- Y as Spacer,
52
- Z as SpacingSize,
53
- $ as Spinner,
54
- _ as SplitScreenLayout,
55
- aa as StatBadge,
56
- ea as Statistic,
57
- sa as StatusBadge,
58
- ta as Stepper,
59
- oa as Surface,
60
- ia as SurfaceRow,
61
- ra as Swatch,
62
- na as Table,
63
- la as Tabs,
64
- pa as Tag,
65
- Ta as TextArea,
66
- da as ThemeScope,
67
- ma as Toggle,
47
+ W as SegmentedControl,
48
+ Q as ShadowEscape,
49
+ U as SidePanel,
50
+ X as SidePanelNavFooter,
51
+ Y as Skeleton,
52
+ Z as Spacer,
53
+ $ as SpacingSize,
54
+ _ as Spinner,
55
+ aa as SplitScreenLayout,
56
+ ea as StatBadge,
57
+ sa as Statistic,
58
+ ta as StatusBadge,
59
+ oa as Stepper,
60
+ ia as Surface,
61
+ ra as SurfaceRow,
62
+ na as Swatch,
63
+ la as Table,
64
+ pa as Tabs,
65
+ Ta as Tag,
66
+ da as TextArea,
67
+ ma as ThemeScope,
68
+ Sa as Toggle,
68
69
  ca as Toolbar,
69
- Sa as Tooltip,
70
- ha as TruncatedTooltip,
71
- ua as Typography,
72
- ga as WizardLayout,
73
- Ca as applyCustomTheme,
74
- ya as applyDarkTheme,
75
- Fa as applyLightTheme,
76
- wa as applyTheme,
77
- xa as applyThemeVars,
78
- fa as darkTheme,
79
- ka as defaultTheme,
80
- va as getCurrentTheme,
81
- Ba as getCurrentThemeMode,
82
- La as initializeTheme,
83
- Pa as resetTheme,
84
- ba as toggleTheme
70
+ ha as Tooltip,
71
+ ua as TruncatedTooltip,
72
+ ga as Typography,
73
+ Ca as WizardLayout,
74
+ ya as applyCustomTheme,
75
+ Fa as applyDarkTheme,
76
+ wa as applyLightTheme,
77
+ xa as applyTheme,
78
+ fa as applyThemeVars,
79
+ ka as darkTheme,
80
+ va as defaultTheme,
81
+ Ba as getCurrentTheme,
82
+ La as getCurrentThemeMode,
83
+ Pa as initializeTheme,
84
+ ba as resetTheme,
85
+ Aa as toggleTheme
85
86
  };
86
87
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackone/malachite",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.js",