@leta-io/components 0.5.0 → 0.5.2
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 +9 -3
- package/dist/index.js +23 -16
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1527,8 +1527,10 @@ interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
1527
1527
|
* dropdown (the overlay itself is a separate component); for `global-client`
|
|
1528
1528
|
* it optionally navigates to the client home. When omitted, the
|
|
1529
1529
|
* `global-client` root renders as a non-interactive label (matching Figma).
|
|
1530
|
+
* Receives the click event: anchor a switcher to `e.currentTarget` (Safari does
|
|
1531
|
+
* not focus buttons on click, so `document.activeElement` is unreliable).
|
|
1530
1532
|
*/
|
|
1531
|
-
onClientClick?: () => void;
|
|
1533
|
+
onClientClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
1532
1534
|
}
|
|
1533
1535
|
/**
|
|
1534
1536
|
* Breadcrumbs — a horizontal trail showing the user's location in a hierarchy,
|
|
@@ -4941,8 +4943,12 @@ interface TopBarProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'
|
|
|
4941
4943
|
};
|
|
4942
4944
|
/** Fired when the notification bell is clicked. */
|
|
4943
4945
|
onNotificationsClick?: () => void;
|
|
4944
|
-
/**
|
|
4945
|
-
|
|
4946
|
+
/**
|
|
4947
|
+
* Fired when the User-Menu is clicked, with the click event — anchor the menu to
|
|
4948
|
+
* `e.currentTarget`, not `document.activeElement` (Safari doesn't focus buttons
|
|
4949
|
+
* on click, so `activeElement` is `<body>` and the menu lands at 0,0).
|
|
4950
|
+
*/
|
|
4951
|
+
onUserMenuClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
4946
4952
|
/**
|
|
4947
4953
|
* Show the global search field in the centre of the bar (Figma 2026-10-06 — it
|
|
4948
4954
|
* moved here from the Side Bar). Default `true`.
|
package/dist/index.js
CHANGED
|
@@ -836,11 +836,17 @@ var BUTTON_STYLES = `
|
|
|
836
836
|
}
|
|
837
837
|
/* Plain underline spans the whole content row (icons + label), not just the
|
|
838
838
|
text run \u2014 text-decoration:underline only underlines inline text, leaving
|
|
839
|
-
the flex-item icons un-underlined. A
|
|
840
|
-
|
|
841
|
-
icon
|
|
839
|
+
the flex-item icons un-underlined. A 1px line painted across the bottom of
|
|
840
|
+
the flex container runs under the leading icon, label, gap and trailing
|
|
841
|
+
icon. It is painted INSIDE the box (Figma's Underline is a zero-height
|
|
842
|
+
vector at the bottom of the 20/16px box), so it adds no height: a
|
|
843
|
+
border-bottom made Medium 21 and Small 17 (fixed 2026-10-21).
|
|
844
|
+
currentColor tracks --leta-btn-text across states. */
|
|
842
845
|
.leta-btn--plain.leta-btn--underline {
|
|
843
|
-
|
|
846
|
+
background-image: linear-gradient(currentColor, currentColor);
|
|
847
|
+
background-size: 100% var(--stroke-xs);
|
|
848
|
+
background-position: 0 100%;
|
|
849
|
+
background-repeat: no-repeat;
|
|
844
850
|
}
|
|
845
851
|
`;
|
|
846
852
|
function ensureStylesInjected2() {
|
|
@@ -4638,7 +4644,10 @@ var UserMenu = /* @__PURE__ */ React40.forwardRef(function UserMenu2({ name, ava
|
|
|
4638
4644
|
border: "none",
|
|
4639
4645
|
cursor: "pointer",
|
|
4640
4646
|
backgroundColor: SURFACE2[eff],
|
|
4641
|
-
|
|
4647
|
+
// Figma 2026-10-21: a 1px ring OUTSIDE the 68×40 pill (an outer spread, so
|
|
4648
|
+
// the box doesn't grow). At Idle the ring matches the surface and is meant
|
|
4649
|
+
// to be invisible; Hover/Pressed show it.
|
|
4650
|
+
boxShadow: `0 0 0 var(--stroke-xs) ${BORDER2[eff]}`,
|
|
4642
4651
|
...style
|
|
4643
4652
|
},
|
|
4644
4653
|
onMouseEnter: (e) => {
|
|
@@ -7241,6 +7250,7 @@ var TopFilter = /* @__PURE__ */ React57.forwardRef(
|
|
|
7241
7250
|
const pressed = forcedState ? forcedState === "pressed" : pressedLive;
|
|
7242
7251
|
const split = advanced && !!onChevronClick;
|
|
7243
7252
|
const stateSurface = pressed ? "var(--surface-neutral-top-filter-tab-pressed)" : hovered ? "var(--surface-neutral-top-filter-tab-hover)" : "var(--surface-neutral-top-filter-tab-idle)";
|
|
7253
|
+
const selectedSurface = pressed || hovered ? stateSurface : "var(--surface-neutral-top-filter-tab-active)";
|
|
7244
7254
|
const stateBorder = pressed ? "var(--border-neutral-top-filter-tab-pressed)" : hovered ? "var(--border-neutral-top-filter-tab-hover)" : "var(--border-neutral-top-filter-tab-idle)";
|
|
7245
7255
|
const selectedRing = `inset 0 0 0 var(--stroke-sm) var(--border-secondary-top-filter-tab-active)`;
|
|
7246
7256
|
const hoverHandlers = {
|
|
@@ -7288,11 +7298,9 @@ var TopFilter = /* @__PURE__ */ React57.forwardRef(
|
|
|
7288
7298
|
height: 40,
|
|
7289
7299
|
padding: "var(--padding-8px) var(--padding-12px)",
|
|
7290
7300
|
borderRadius: "var(--rounding-lg)",
|
|
7291
|
-
//
|
|
7292
|
-
//
|
|
7293
|
-
|
|
7294
|
-
// variable, reported as Figma hygiene).
|
|
7295
|
-
backgroundColor: stateSurface,
|
|
7301
|
+
// Selected → the 1.5px ring plus the selected surface (`top-filter-tab-active`
|
|
7302
|
+
// at Idle-Selected; hover/pressed surfaces otherwise).
|
|
7303
|
+
backgroundColor: selected ? selectedSurface : stateSurface,
|
|
7296
7304
|
color: "var(--text-default-label)",
|
|
7297
7305
|
// 1px unselected, 1.5px selected (all six of each in Figma).
|
|
7298
7306
|
boxShadow: selected ? selectedRing : `inset 0 0 0 var(--stroke-xs) ${stateBorder}`,
|
|
@@ -7334,7 +7342,7 @@ var TopFilter = /* @__PURE__ */ React57.forwardRef(
|
|
|
7334
7342
|
height: 40,
|
|
7335
7343
|
padding: 0,
|
|
7336
7344
|
borderRadius: "var(--rounding-lg)",
|
|
7337
|
-
backgroundColor: selected ?
|
|
7345
|
+
backgroundColor: selected ? selectedSurface : "transparent",
|
|
7338
7346
|
color: "var(--text-default-label)",
|
|
7339
7347
|
border: "none",
|
|
7340
7348
|
cursor: "pointer",
|
|
@@ -7966,8 +7974,7 @@ var PRESET = {
|
|
|
7966
7974
|
// Added 2026-10-06 (Figma `Type=Calendar`, desktop). Figma reads "No Schedule";
|
|
7967
7975
|
// sentence-cased like every other preset title (2026-10-02 ruling).
|
|
7968
7976
|
"calendar": { illustration: "calendar", heading: "No schedule", description: "All schedules will be displayed here" },
|
|
7969
|
-
// Added 2026-10-21 (Figma `Type=Recording
|
|
7970
|
-
// Mobile variant still carries the Comments copy (a copy-paste slip in the Library).
|
|
7977
|
+
// Added 2026-10-21 (Figma `Type=Recording`, Desktop + Mobile — same copy in both).
|
|
7971
7978
|
"recording": { illustration: "recordings", heading: "No recordings", description: "All recordings will be displayed here" }
|
|
7972
7979
|
};
|
|
7973
7980
|
var ILLUSTRATION_SIZE = 150;
|
|
@@ -12302,9 +12309,9 @@ var MapSearchInput = /* @__PURE__ */ React94.forwardRef(function MapSearchInput2
|
|
|
12302
12309
|
boxSizing: "border-box",
|
|
12303
12310
|
borderRadius: "var(--rounding-xl)",
|
|
12304
12311
|
overflow: "hidden",
|
|
12305
|
-
//
|
|
12306
|
-
//
|
|
12307
|
-
boxShadow:
|
|
12312
|
+
// Every open state draws a 1px Border/neutral/default outline (Figma,
|
|
12313
|
+
// 2026-10-21 — it was Active Results only until the designer aligned them).
|
|
12314
|
+
boxShadow: "inset 0 0 0 var(--stroke-xs) var(--border-neutral-default), var(--shadow-neutral-2)",
|
|
12308
12315
|
backgroundColor: "var(--surface-neutral-bg-default)",
|
|
12309
12316
|
...style
|
|
12310
12317
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leta-io/components",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "LETA React component library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"country-flag-icons": "^1.6.17",
|
|
29
29
|
"leaflet": "^1.9.4",
|
|
30
30
|
"lottie-web": "^5.12.2",
|
|
31
|
-
"@leta-io/icons": "0.5.
|
|
32
|
-
"@leta-io/design-tokens": "0.5.
|
|
31
|
+
"@leta-io/icons": "0.5.2",
|
|
32
|
+
"@leta-io/design-tokens": "0.5.2"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^18.0.0 || ^19.0.0",
|