@apliteni/apliteni-ui 0.103.0 → 0.104.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apliteni/apliteni-ui",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "workspaces": [
5
5
  "react"
6
6
  ],
package/react/README.md CHANGED
@@ -32,7 +32,17 @@ import { DataTable, Modal, Button } from '@apliteni/apliteni-ui/react';
32
32
  Both stylesheets. The React one adds what React's own components need — it carries no tokens, no
33
33
  reset and none of the kit's control CSS, so it cannot stand in for the first import.
34
34
 
35
- Components: `Success`, `SuccessPanel`, `SuccessCheck`, `Checkbox`, `Switch`, `SearchField`, `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Modal`, `Confirm`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Tabs`, `Button`, `Badge`, `Pill`, `StatusDot`, `Card`, `Callout`, `Icon`.
35
+ Components: `Success`, `SuccessPanel`, `SuccessCheck`, `Checkbox`, `Switch`, `SearchField`, `EmptyState`, `DataTable`, `Pagination`, `StatBand`, `Modal`, `Confirm`, `Drawer`, `CommandPalette`, `Dropdown`, `BackLink`, `Tooltip`, `Snippet`, `Segmented`, `Tabs`, `Button`, `Badge`, `Pill`, `StatusDot`, `Card`, `Callout`, `Icon`.
36
+
37
+ `Segmented` is a controlled choice toolbar: pass `options`, `value`, `onChange`,
38
+ and a `label` for its accessible name. `size="sm"` compacts it, `block` makes it
39
+ fill its container, and `appearance="underline"` draws the underline strip instead
40
+ of the pill track; omit all three for the standard pill. Options support
41
+ `ariaLabel` and `disabled`; `disabled` on the toolbar disables every choice. What
42
+ each presentation guarantees is in
43
+ docs/components.md#the-rest-of-the-react-surface.
44
+ Reach for it when a choice filters or switches a view in place; use `Tabs` when the
45
+ choice owns a panel, and links when it changes the page.
36
46
 
37
47
  `Pill` renders metadata with the existing pill spacing. Omit `variant` for neutral
38
48
  metadata or use `live` or `soon`. Its children accept React content.
@@ -545,9 +545,11 @@ type SegmentedProps = {
545
545
  onChange: (value: string) => void;
546
546
  label: string;
547
547
  appearance?: 'pill' | 'underline';
548
+ size?: 'sm';
549
+ block?: boolean;
548
550
  disabled?: boolean;
549
551
  };
550
- declare function Segmented({ options, value, onChange, label, appearance, disabled }: SegmentedProps): react.JSX.Element;
552
+ declare function Segmented({ options, value, onChange, label, appearance, size, block, disabled }: SegmentedProps): react.JSX.Element;
551
553
 
552
554
  type Filter = {
553
555
  id: string;
@@ -2519,10 +2519,10 @@ function RowIdentity({ symbol, name, logo, href }) {
2519
2519
  // src/Segmented.tsx
2520
2520
  import { segmentedNextIndex } from "@apliteni/apliteni-ui";
2521
2521
  import { jsx as jsx23 } from "react/jsx-runtime";
2522
- function Segmented({ options, value, onChange, label, appearance = "pill", disabled = false }) {
2522
+ function Segmented({ options, value, onChange, label, appearance = "pill", size, block = false, disabled = false }) {
2523
2523
  const enabled = options.filter((o) => !o.disabled);
2524
2524
  const tabValue = enabled.some((o) => o.value === value) ? value : enabled[0]?.value;
2525
- return /* @__PURE__ */ jsx23("div", { className: `ui-seg${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx23(
2525
+ return /* @__PURE__ */ jsx23("div", { className: `ui-seg${size === "sm" ? " ui-seg--sm" : ""}${block ? " ui-seg--block" : ""}${appearance === "underline" ? " ui-seg--underline" : ""}`, role: "toolbar", "aria-label": label, children: options.map((option) => /* @__PURE__ */ jsx23(
2526
2526
  "button",
2527
2527
  {
2528
2528
  type: "button",
@@ -114,6 +114,7 @@
114
114
  box. #527
115
115
  why: guidelines/layout-and-density.md, the spacing scale */
116
116
  .ui-seg--underline button { position: relative; border-radius: var(--radius-sm); padding: var(--space-3); min-height: var(--tap-min, 44px); white-space: normal; overflow-wrap: anywhere; font-weight: var(--weight-medium); }
117
+ .ui-seg--underline.ui-seg--sm button { padding: var(--space-3); min-height: var(--tap-min, 44px); }
117
118
  /* The chosen tab is its label and one bar under it: no plate, no hairline, no
118
119
  upright rail — those read as a list-row grip. #527 r31. The `outline: 0` that
119
120
  stood here cancelled the accent outline the pill rule gave every chosen button;