@brightlocal/ui-components 2.27.0 → 3.1.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/README.md +7 -1
- package/component-meta.json +568 -143
- package/deprecations.json +298 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +36 -0
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +74 -61
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +18 -18
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +11 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +31 -28
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +4 -4
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +15 -11
- package/dist/blocks/empty-state.cjs +1 -0
- package/dist/blocks/empty-state.d.ts +172 -0
- package/dist/blocks/empty-state.d.ts.map +1 -0
- package/dist/blocks/empty-state.js +147 -0
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +124 -108
- package/dist/blocks/progress-state.cjs +1 -0
- package/dist/blocks/{progress-screen.d.ts → progress-state.d.ts} +30 -18
- package/dist/blocks/progress-state.d.ts.map +1 -0
- package/dist/blocks/{progress-screen.js → progress-state.js} +100 -71
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +160 -161
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button-group.cjs +1 -0
- package/dist/button-group.d.ts +36 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +47 -0
- package/dist/button.cjs +1 -1
- package/dist/button.js +12 -12
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +37 -38
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +24 -2
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +57 -55
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +42 -3
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +102 -91
- package/dist/chart-empty.cjs +1 -0
- package/dist/chart-empty.d.ts +59 -0
- package/dist/chart-empty.d.ts.map +1 -0
- package/dist/chart-empty.js +29 -0
- package/dist/chart.cjs +6 -6
- package/dist/chart.d.ts +46 -13
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +172 -157
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +38 -4
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +100 -84
- package/dist/combobox.cjs +2 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +81 -79
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +23 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +248 -225
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +26 -29
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +75 -10
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +346 -334
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +13 -5
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +54 -53
- package/dist/description.cjs +1 -1
- package/dist/description.js +5 -5
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +20 -20
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +8 -11
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +17 -20
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +8 -1
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +96 -65
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +130 -12
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +146 -127
- package/dist/grid.cjs +1 -0
- package/dist/grid.d.ts +56 -0
- package/dist/grid.d.ts.map +1 -0
- package/dist/grid.js +32 -0
- package/dist/header.d.ts +13 -0
- package/dist/header.d.ts.map +1 -1
- package/dist/hooks/use-delayed-pending.cjs +1 -0
- package/dist/hooks/use-delayed-pending.d.ts +34 -0
- package/dist/hooks/use-delayed-pending.d.ts.map +1 -0
- package/dist/hooks/use-delayed-pending.js +17 -0
- package/dist/hooks/use-mobile.cjs +1 -0
- package/dist/hooks/use-mobile.js +8 -0
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.js +13 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -527
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +25 -25
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +9 -9
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +17 -9
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +73 -72
- package/dist/input.cjs +1 -1
- package/dist/input.js +9 -9
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +25 -28
- package/dist/lib/block-illustration.cjs +1 -0
- package/dist/lib/block-illustration.d.ts +28 -0
- package/dist/lib/block-illustration.d.ts.map +1 -0
- package/dist/lib/block-illustration.js +21 -0
- package/dist/lib/empty-canvas.cjs +1 -0
- package/dist/lib/empty-canvas.d.ts +27 -0
- package/dist/lib/empty-canvas.d.ts.map +1 -0
- package/dist/lib/empty-canvas.js +62 -0
- package/dist/lib/empty-chip.cjs +1 -0
- package/dist/lib/empty-chip.d.ts +4 -0
- package/dist/lib/empty-chip.d.ts.map +1 -0
- package/dist/lib/empty-chip.js +13 -0
- package/dist/lib/optical-center.cjs +1 -0
- package/dist/lib/optical-center.d.ts +12 -0
- package/dist/lib/optical-center.d.ts.map +1 -0
- package/dist/lib/optical-center.js +11 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +28 -5
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +62 -58
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +60 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +187 -164
- package/dist/media-empty.cjs +1 -0
- package/dist/media-empty.d.ts +72 -0
- package/dist/media-empty.d.ts.map +1 -0
- package/dist/media-empty.js +45 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +17 -20
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +7 -7
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +130 -1
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +193 -102
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +2 -26
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +79 -118
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +15 -6
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +38 -36
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +13 -2
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +92 -87
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +8 -8
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.js +2 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +38 -3
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +43 -20
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.js +26 -26
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +40 -40
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +31 -28
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.d.ts +10 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +8 -8
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.js +8 -8
- package/dist/typography-heading.cjs +1 -0
- package/dist/typography-heading.d.ts +129 -0
- package/dist/typography-heading.d.ts.map +1 -0
- package/dist/typography-heading.js +95 -0
- package/dist/typography-text.cjs +1 -0
- package/dist/typography-text.d.ts +127 -0
- package/dist/typography-text.d.ts.map +1 -0
- package/dist/typography-text.js +92 -0
- package/dist/typography.d.ts +13 -0
- package/dist/typography.d.ts.map +1 -1
- package/package.json +35 -7
- package/src/blocks/empty-state.tsx +412 -0
- package/src/blocks/input-list.tsx +66 -36
- package/src/blocks/{progress-screen.tsx → progress-state.tsx} +154 -93
- package/src/blocks/sidebar.tsx +25 -26
- package/src/components/accordion.tsx +82 -27
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/alert.tsx +27 -13
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +8 -4
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button-group.tsx +112 -0
- package/src/components/button.tsx +4 -4
- package/src/components/calendar.tsx +5 -6
- package/src/components/callout.tsx +48 -15
- package/src/components/card.tsx +89 -19
- package/src/components/chart-empty.tsx +116 -0
- package/src/components/chart.tsx +103 -32
- package/src/components/chip.tsx +88 -13
- package/src/components/combobox.tsx +12 -10
- package/src/components/command.tsx +64 -13
- package/src/components/context-menu.tsx +6 -9
- package/src/components/data-table.tsx +135 -20
- package/src/components/date-picker.tsx +18 -7
- package/src/components/description.tsx +1 -1
- package/src/components/dialog.tsx +2 -2
- package/src/components/drawer.tsx +2 -5
- package/src/components/dropdown-menu.tsx +8 -11
- package/src/components/field.tsx +89 -16
- package/src/components/global-layout.tsx +210 -39
- package/src/components/grid.tsx +130 -0
- package/src/components/header.tsx +13 -0
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input-password.tsx +24 -12
- package/src/components/input.tsx +1 -1
- package/src/components/label.tsx +10 -13
- package/src/components/list.tsx +13 -9
- package/src/components/map.tsx +101 -5
- package/src/components/media-empty.tsx +156 -0
- package/src/components/menubar.tsx +7 -10
- package/src/components/navigation-menu.tsx +1 -1
- package/src/components/pagination.tsx +286 -1
- package/src/components/progress.tsx +35 -113
- package/src/components/scroll-area.tsx +23 -10
- package/src/components/select.tsx +35 -10
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/skeleton.tsx +78 -7
- package/src/components/sonner.tsx +2 -2
- package/src/components/stepper.tsx +3 -3
- package/src/components/table.tsx +6 -3
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +10 -0
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/components/tooltip.tsx +1 -1
- package/src/components/typography-heading.tsx +253 -0
- package/src/components/typography-text.tsx +250 -0
- package/src/components/typography.tsx +13 -0
- package/src/hooks/use-delayed-pending.ts +60 -0
- package/src/index.ts +11 -1
- package/src/lib/block-illustration.tsx +88 -0
- package/src/lib/empty-canvas.tsx +128 -0
- package/src/lib/empty-chip.ts +24 -0
- package/src/lib/optical-center.tsx +45 -0
- package/src/lib/utils.ts +26 -0
- package/dist/blocks/progress-screen.cjs +0 -1
- package/dist/blocks/progress-screen.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),p=require("react"),i=require("@brightlocal/icons"),g=require("@brightlocal/ui-components/lib/utils"),f=require("./lib/empty-canvas.cjs");function y(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const b=y(p),n={image:{icon:s.jsx(i.Image,{strokeWidth:2}),message:"No photo available"},video:{icon:s.jsx(i.Video,{strokeWidth:2}),message:"No video available"}},r=b.forwardRef(({className:t,dataHook:a,variant:e="image",icon:o,message:c,trackingEl:l,trackingLabel:m,...u},d)=>s.jsx(f.EmptyCanvas,{ref:d,className:g.cn("size-full",t),"data-variant":e,dataHook:a,icon:o??n[e].icon,message:c??n[e].message,slot:"media-empty",trackingEl:l,trackingLabel:m,...u}));r.displayName="MediaEmpty";exports.MediaEmpty=r;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Which medium the slot holds. Picks the glyph and the default line — the
|
|
4
|
+
* treatment is identical.
|
|
5
|
+
*/
|
|
6
|
+
type MediaEmptyVariant = "image" | "video";
|
|
7
|
+
/**
|
|
8
|
+
* Props for the MediaEmpty component.
|
|
9
|
+
*/
|
|
10
|
+
export interface MediaEmptyProps extends Omit<React.ComponentPropsWithoutRef<"div">, "children" | "title"> {
|
|
11
|
+
/**
|
|
12
|
+
* Required data-hook attribute for automated testing. The parts derive
|
|
13
|
+
* theirs from it: `-icon`, `-message`.
|
|
14
|
+
* @example "location-photo-empty"
|
|
15
|
+
*/
|
|
16
|
+
dataHook: string;
|
|
17
|
+
/**
|
|
18
|
+
* Which medium the slot holds — picks the glyph and the default line.
|
|
19
|
+
* @default "image"
|
|
20
|
+
*/
|
|
21
|
+
variant?: MediaEmptyVariant;
|
|
22
|
+
/**
|
|
23
|
+
* Overrides the variant's glyph, for a slot neither variant names.
|
|
24
|
+
* @default the variant's glyph
|
|
25
|
+
*/
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* The one line under the glyph. No trailing period.
|
|
29
|
+
* @default "No photo available" at variant image, "No video available" at variant video
|
|
30
|
+
*/
|
|
31
|
+
message?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Tracking element identifier for analytics.
|
|
34
|
+
*/
|
|
35
|
+
trackingEl?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Tracking label for analytics context.
|
|
38
|
+
*/
|
|
39
|
+
trackingLabel?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A media slot with nothing in it — the reserved frame, filled with a muted
|
|
43
|
+
* surface, a bare icon, and one quiet line.
|
|
44
|
+
*
|
|
45
|
+
* The frame is the consumer's: this fills it, and corners the consumer overlays
|
|
46
|
+
* on the frame keep rendering above it.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <AspectRatio dataHook="location-photo" ratio={16 / 9}>
|
|
51
|
+
* {photoUrl ? (
|
|
52
|
+
* <img alt={t("location.photo.alt", { businessName })} className="size-full object-cover" src={photoUrl} />
|
|
53
|
+
* ) : (
|
|
54
|
+
* <MediaEmpty dataHook="location-photo-empty" message={t("location.photo.empty")} />
|
|
55
|
+
* )}
|
|
56
|
+
* {status ? (
|
|
57
|
+
* <div className="absolute top-3 right-3">
|
|
58
|
+
* <LocationStatusBadge status={status} />
|
|
59
|
+
* </div>
|
|
60
|
+
* ) : null}
|
|
61
|
+
* </AspectRatio>
|
|
62
|
+
*
|
|
63
|
+
* // A video well: same canvas, the video glyph and line.
|
|
64
|
+
* <AspectRatio dataHook="tour-video" ratio={16 / 9}>
|
|
65
|
+
* <MediaEmpty dataHook="tour-video-empty" variant="video" />
|
|
66
|
+
* </AspectRatio>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const MediaEmpty: React.ForwardRefExoticComponent<MediaEmptyProps & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
export { MediaEmpty };
|
|
71
|
+
export type { MediaEmptyVariant };
|
|
72
|
+
//# sourceMappingURL=media-empty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-empty.d.ts","sourceRoot":"","sources":["../../src/components/media-empty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B;;;GAGG;AACH,KAAK,iBAAiB,GAAG,OAAO,GAAG,OAAO,CAAC;AAW3C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EACrC,UAAU,GAAG,OAAO,CACrB;IACC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,QAAA,MAAM,UAAU,wFAgCf,CAAC;AAIF,OAAO,EAAE,UAAU,EAAE,CAAC;AAEtB,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { Video as f, Image as g } from "@brightlocal/icons";
|
|
4
|
+
import { cn as n } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
+
import { EmptyCanvas as y } from "./lib/empty-canvas.js";
|
|
6
|
+
const a = {
|
|
7
|
+
image: { icon: /* @__PURE__ */ o(g, { strokeWidth: 2 }), message: "No photo available" },
|
|
8
|
+
video: { icon: /* @__PURE__ */ o(f, { strokeWidth: 2 }), message: "No video available" }
|
|
9
|
+
}, N = l.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
className: m,
|
|
12
|
+
dataHook: i,
|
|
13
|
+
variant: e = "image",
|
|
14
|
+
icon: s,
|
|
15
|
+
message: t,
|
|
16
|
+
trackingEl: r,
|
|
17
|
+
trackingLabel: p,
|
|
18
|
+
...d
|
|
19
|
+
}, c) => (
|
|
20
|
+
/* `size-full`, unlike the chart and map placeholders: a media slot's frame
|
|
21
|
+
already has both dimensions — that is what reserving an aspect ratio
|
|
22
|
+
means — so this one fills rather than asking for a height. No radius
|
|
23
|
+
either: the frame clips, and a radius here would draw a second, smaller
|
|
24
|
+
corner inside the card's own. */
|
|
25
|
+
/* @__PURE__ */ o(
|
|
26
|
+
y,
|
|
27
|
+
{
|
|
28
|
+
ref: c,
|
|
29
|
+
className: n("size-full", m),
|
|
30
|
+
"data-variant": e,
|
|
31
|
+
dataHook: i,
|
|
32
|
+
icon: s ?? a[e].icon,
|
|
33
|
+
message: t ?? a[e].message,
|
|
34
|
+
slot: "media-empty",
|
|
35
|
+
trackingEl: r,
|
|
36
|
+
trackingLabel: p,
|
|
37
|
+
...d
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
N.displayName = "MediaEmpty";
|
|
43
|
+
export {
|
|
44
|
+
N as MediaEmpty
|
|
45
|
+
};
|
package/dist/menubar.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),f=require("@radix-ui/react-menubar"),d=require("@brightlocal/icons"),u=require("@brightlocal/ui-components/lib/utils");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const o=m(f);function l({className:e,dataHook:t,defaultValue:n,...a}){return r.jsx(o.Root,{className:u.cn("border-border bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",e),"data-hook":t,"data-slot":"menubar","data-tracking-el":"menubar","data-tracking-label":t,defaultValue:n,...a})}l.displayName="Menubar";function x({value:e,...t}){return r.jsx(o.Menu,{"data-slot":"menubar-menu",value:e,...t})}function g({className:e,...t}){return r.jsx(o.Trigger,{className:u.cn("text-foreground duration-fast text-label flex cursor-pointer items-center justify-center gap-2 rounded-xs px-3 py-1 transition-colors ease-out","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground focus:outline-none","data-[state=open]:bg-accent data-[state=open]:text-accent-foreground","disabled:pointer-events-none disabled:opacity-50",e),"data-slot":"menubar-trigger",...t})}function p({align:e="start",alignOffset:t=-4,className:n,sideOffset:a=8,...s}){return r.jsx(o.Portal,{children:r.jsx(o.Content,{align:e,alignOffset:t,className:u.cn("border-border bg-popover text-popover-foreground z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) rounded-md border p-1 shadow-md",u.FLOATING_CONTENT_ANIMATION,n),"data-slot":"menubar-content",sideOffset:a,...s})})}function M({className:e,disabled:t,inset:n,...a}){return r.jsx(o.Item,{className:u.cn("text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm px-2 py-1.5 transition-colors ease-out outline-none","hover:bg-accent hover:text-foreground","focus:bg-accent focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",e),"data-slot":"menubar-item",disabled:t,...a})}function j({checked:e,children:t,className:n,closeOnSelect:a=!0,onCheckedChange:s,onSelect:i,...c}){return r.jsxs(o.CheckboxItem,{checked:e,className:u.cn("text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8 transition-colors ease-out outline-none","hover:bg-accent hover:text-foreground","focus:bg-accent focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n),"data-slot":"menubar-checkbox-item",onCheckedChange:s,onSelect:b=>{a||b.preventDefault(),i?.(b)},...c,children:[r.jsx("span",{className:"absolute left-2 flex size-4 items-center justify-center",children:r.jsx(o.ItemIndicator,{children:r.jsx(d.Check,{className:"text-foreground"})})}),t]})}function h({onValueChange:e,value:t,...n}){return r.jsx(o.RadioGroup,{"data-slot":"menubar-radio-group",value:t,onValueChange:e,...n})}function N({children:e,className:t,closeOnSelect:n=!0,onSelect:a,value:s,...i}){return r.jsxs(o.RadioItem,{className:u.cn("text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8 transition-colors ease-out outline-none","hover:bg-accent hover:text-foreground","focus:bg-accent focus:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),"data-slot":"menubar-radio-item",value:s,onSelect:c=>{n||c.preventDefault(),a?.(c)},...i,children:[r.jsx("span",{className:"absolute left-3 flex size-2 items-center justify-center",children:r.jsx(o.ItemIndicator,{children:r.jsx(d.Circle,{className:"fill-foreground",size:8})})}),e]})}function v({className:e,inset:t,...n}){return r.jsx(o.Label,{className:u.cn("text-foreground text-label-sm px-2 py-1.5",t&&"pl-8",e),"data-slot":"menubar-label",...n})}function y({className:e,...t}){return r.jsx(o.Separator,{className:u.cn("bg-border -mx-1 my-1 h-px",e),"data-slot":"menubar-separator",...t})}function S({className:e,...t}){return r.jsx("span",{className:u.cn("text-muted-foreground text-body-xs ml-auto",e),"data-slot":"menubar-shortcut",...t})}function I({...e}){return r.jsx(o.Sub,{"data-slot":"menubar-sub",...e})}function T({children:e,className:t,inset:n,...a}){return r.jsxs(o.SubTrigger,{className:u.cn("text-foreground duration-fast text-label flex cursor-pointer items-center justify-between rounded-xs px-2 py-1.5 transition-colors ease-out outline-none","hover:bg-accent hover:text-foreground","focus:bg-accent focus:text-foreground","data-[state=open]:bg-accent data-[state=open]:text-foreground","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",t),"data-slot":"menubar-sub-trigger",...a,children:[e,r.jsx(d.ChevronRight,{className:"ml-auto"})]})}function C({className:e,...t}){return r.jsx(o.SubContent,{className:u.cn("border-border bg-popover text-popover-foreground z-50 min-w-[8rem] origin-(--radix-menubar-content-transform-origin) rounded-md border p-1 shadow-lg",u.FLOATING_CONTENT_ANIMATION,e),"data-slot":"menubar-sub-content",...t})}exports.Menubar=l;exports.MenubarCheckboxItem=j;exports.MenubarContent=p;exports.MenubarItem=M;exports.MenubarLabel=v;exports.MenubarMenu=x;exports.MenubarRadioGroup=h;exports.MenubarRadioItem=N;exports.MenubarSeparator=y;exports.MenubarShortcut=S;exports.MenubarSub=I;exports.MenubarSubContent=C;exports.MenubarSubTrigger=T;exports.MenubarTrigger=g;
|
package/dist/menubar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../src/components/menubar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAQ5D;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,OAAO,CAAC,EACf,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG;IACtD;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,2CAeA;kBA7BQ,OAAO;;;AAiChB;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,GAAG;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,2CAIA;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,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C,OAAO,gBAAgB,CAAC,UAAU,CAAC,GAAG;IAC5D;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,2CAmBA;AAED;;GAEG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,UAAU,CAAC,2CAY1D;AAED,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,GACf,CAAC"}
|
package/dist/menubar.js
CHANGED
|
@@ -39,7 +39,7 @@ function y({
|
|
|
39
39
|
n.Trigger,
|
|
40
40
|
{
|
|
41
41
|
className: u(
|
|
42
|
-
"text-foreground duration-fast flex cursor-pointer items-center justify-center gap-2 rounded-xs px-3 py-1
|
|
42
|
+
"text-foreground duration-fast text-label flex cursor-pointer items-center justify-center gap-2 rounded-xs px-3 py-1 transition-colors ease-out",
|
|
43
43
|
"hover:bg-accent hover:text-accent-foreground",
|
|
44
44
|
"focus:bg-accent focus:text-accent-foreground focus:outline-none",
|
|
45
45
|
"data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
|
@@ -84,7 +84,7 @@ function I({
|
|
|
84
84
|
n.Item,
|
|
85
85
|
{
|
|
86
86
|
className: u(
|
|
87
|
-
"text-foreground duration-fast relative flex cursor-pointer items-center justify-between rounded-sm px-2 py-1.5
|
|
87
|
+
"text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm px-2 py-1.5 transition-colors ease-out outline-none",
|
|
88
88
|
"hover:bg-accent hover:text-foreground",
|
|
89
89
|
"focus:bg-accent focus:text-foreground",
|
|
90
90
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -111,7 +111,7 @@ function S({
|
|
|
111
111
|
{
|
|
112
112
|
checked: e,
|
|
113
113
|
className: u(
|
|
114
|
-
"text-foreground duration-fast relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8
|
|
114
|
+
"text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8 transition-colors ease-out outline-none",
|
|
115
115
|
"hover:bg-accent hover:text-foreground",
|
|
116
116
|
"focus:bg-accent focus:text-foreground",
|
|
117
117
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -130,7 +130,7 @@ function S({
|
|
|
130
130
|
}
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function C({
|
|
134
134
|
onValueChange: e,
|
|
135
135
|
value: t,
|
|
136
136
|
...o
|
|
@@ -145,7 +145,7 @@ function w({
|
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function j({
|
|
149
149
|
children: e,
|
|
150
150
|
className: t,
|
|
151
151
|
closeOnSelect: o = !0,
|
|
@@ -157,7 +157,7 @@ function C({
|
|
|
157
157
|
n.RadioItem,
|
|
158
158
|
{
|
|
159
159
|
className: u(
|
|
160
|
-
"text-foreground duration-fast relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8
|
|
160
|
+
"text-foreground duration-fast text-label relative flex cursor-pointer items-center justify-between rounded-sm py-1.5 pr-2 pl-8 transition-colors ease-out outline-none",
|
|
161
161
|
"hover:bg-accent hover:text-foreground",
|
|
162
162
|
"focus:bg-accent focus:text-foreground",
|
|
163
163
|
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
@@ -176,7 +176,7 @@ function C({
|
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function w({
|
|
180
180
|
className: e,
|
|
181
181
|
inset: t,
|
|
182
182
|
...o
|
|
@@ -185,7 +185,7 @@ function j({
|
|
|
185
185
|
n.Label,
|
|
186
186
|
{
|
|
187
187
|
className: u(
|
|
188
|
-
"text-foreground px-2 py-1.5
|
|
188
|
+
"text-foreground text-label-sm px-2 py-1.5",
|
|
189
189
|
t && "pl-8",
|
|
190
190
|
e
|
|
191
191
|
),
|
|
@@ -194,7 +194,7 @@ function j({
|
|
|
194
194
|
}
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function T({
|
|
198
198
|
className: e,
|
|
199
199
|
...t
|
|
200
200
|
}) {
|
|
@@ -207,17 +207,14 @@ function k({
|
|
|
207
207
|
}
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function k({
|
|
211
211
|
className: e,
|
|
212
212
|
...t
|
|
213
213
|
}) {
|
|
214
214
|
return /* @__PURE__ */ r(
|
|
215
215
|
"span",
|
|
216
216
|
{
|
|
217
|
-
className: u(
|
|
218
|
-
"text-muted-foreground ml-auto text-xs tracking-widest",
|
|
219
|
-
e
|
|
220
|
-
),
|
|
217
|
+
className: u("text-muted-foreground text-body-xs ml-auto", e),
|
|
221
218
|
"data-slot": "menubar-shortcut",
|
|
222
219
|
...t
|
|
223
220
|
}
|
|
@@ -238,7 +235,7 @@ function z({
|
|
|
238
235
|
n.SubTrigger,
|
|
239
236
|
{
|
|
240
237
|
className: u(
|
|
241
|
-
"text-foreground duration-fast flex cursor-pointer items-center justify-between rounded-xs px-2 py-1.5
|
|
238
|
+
"text-foreground duration-fast text-label flex cursor-pointer items-center justify-between rounded-xs px-2 py-1.5 transition-colors ease-out outline-none",
|
|
242
239
|
"hover:bg-accent hover:text-foreground",
|
|
243
240
|
"focus:bg-accent focus:text-foreground",
|
|
244
241
|
"data-[state=open]:bg-accent data-[state=open]:text-foreground",
|
|
@@ -277,12 +274,12 @@ export {
|
|
|
277
274
|
S as MenubarCheckboxItem,
|
|
278
275
|
M as MenubarContent,
|
|
279
276
|
I as MenubarItem,
|
|
280
|
-
|
|
277
|
+
w as MenubarLabel,
|
|
281
278
|
N as MenubarMenu,
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
279
|
+
C as MenubarRadioGroup,
|
|
280
|
+
j as MenubarRadioItem,
|
|
281
|
+
T as MenubarSeparator,
|
|
282
|
+
k as MenubarShortcut,
|
|
286
283
|
R as MenubarSub,
|
|
287
284
|
A as MenubarSubContent,
|
|
288
285
|
z as MenubarSubTrigger,
|
package/dist/navigation-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),R=require("react"),_=require("@radix-ui/react-navigation-menu"),T=require("@brightlocal/icons"),s=require("@brightlocal/ui-components/lib/utils");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),R=require("react"),_=require("@radix-ui/react-navigation-menu"),T=require("@brightlocal/icons"),s=require("@brightlocal/ui-components/lib/utils");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const d=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,d.get?d:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const o=m(R),r=m(_),v=o.forwardRef(({className:e,children:t,dataHook:a,delayDuration:d=50,...u},c)=>n.jsxs(r.Root,{ref:c,className:s.cn("relative z-10 flex max-w-max flex-1 items-center justify-center",e),"data-hook":a,"data-slot":"navigation-menu",delayDuration:d,...u,children:[t,n.jsx(l,{})]}));v.displayName="NavigationMenu";const p=o.forwardRef(({className:e,...t},a)=>n.jsx(r.List,{ref:a,className:s.cn("group flex flex-1 list-none items-center justify-center gap-1",e),"data-slot":"navigation-menu-list",...t}));p.displayName="NavigationMenuList";const N=o.forwardRef((e,t)=>n.jsx(r.Item,{ref:t,"data-slot":"navigation-menu-item",...e}));N.displayName="NavigationMenuItem";const I=400,b=o.forwardRef(({className:e,children:t,onClick:a,onPointerDown:d,onPointerEnter:u,...c},M)=>{const f=o.useRef(""),g=o.useRef(0);return n.jsxs(r.Trigger,{ref:M,className:s.cn(["group inline-flex h-9 w-max items-center justify-center gap-1","rounded-md px-4 py-2","text-label","text-foreground","duration-fast transition-colors ease-out","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=open]:bg-accent/50"],e),"data-slot":"navigation-menu-trigger",onClick:i=>{const j=i.currentTarget.getAttribute("data-state")==="open",y=i.timeStamp-g.current<I;f.current==="mouse"&&i.detail>0&&j&&y&&i.preventDefault(),a?.(i)},onPointerDown:i=>{f.current=i.pointerType,d?.(i)},onPointerEnter:i=>{g.current=i.timeStamp,u?.(i)},...c,children:[t,n.jsx(T.ChevronDown,{"aria-hidden":"true",className:"duration-base relative top-[1px] ml-1 transition-transform ease-in-out group-data-[state=open]:rotate-180",size:12})]})});b.displayName="NavigationMenuTrigger";const x=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Content,{ref:a,className:s.cn(["data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out top-0 left-0 w-full","data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out","data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52","data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52","duration-base ease-emphasized","md:absolute md:w-auto"],e),"data-slot":"navigation-menu-content",role:"group",...t}));x.displayName="NavigationMenuContent";const h=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Link,{ref:a,className:s.cn(["block rounded-md p-3 leading-none no-underline select-none","duration-fast transition-colors ease-out outline-none","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground","focus-visible:bg-accent focus-visible:ring-ring focus-visible:shadow-[0_0_0_4px_rgba(163,163,163,0.1)] focus-visible:ring-1 focus-visible:outline-none"],e),"data-slot":"navigation-menu-link",...t}));h.displayName="NavigationMenuLink";const l=o.forwardRef(({className:e,...t},a)=>n.jsx("div",{className:s.cn("absolute top-full left-0 z-50 flex justify-center"),children:n.jsx(r.Viewport,{ref:a,className:s.cn(["origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)]","bg-popover text-popover-foreground w-full overflow-hidden rounded-md border shadow-sm","duration-base ease-emphasized transition-[width,height]","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:duration-fast data-[state=closed]:ease-in","md:w-[var(--radix-navigation-menu-viewport-width)]"],e),"data-slot":"navigation-menu-viewport",...t})}));l.displayName="NavigationMenuViewport";const w=o.forwardRef(({className:e,...t},a)=>n.jsx(r.Indicator,{ref:a,className:s.cn(["top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden","data-[state=visible]:animate-in data-[state=hidden]:animate-out","data-[state=hidden]:fade-out data-[state=visible]:fade-in"],e),"data-slot":"navigation-menu-indicator",...t,children:n.jsx("div",{className:"bg-border relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm shadow-md"})}));w.displayName="NavigationMenuIndicator";exports.NavigationMenu=v;exports.NavigationMenuContent=x;exports.NavigationMenuIndicator=w;exports.NavigationMenuItem=N;exports.NavigationMenuLink=h;exports.NavigationMenuList=p;exports.NavigationMenuTrigger=b;exports.NavigationMenuViewport=l;
|
package/dist/navigation-menu.js
CHANGED
|
@@ -3,13 +3,13 @@ import * as i from "react";
|
|
|
3
3
|
import * as s from "@radix-ui/react-navigation-menu";
|
|
4
4
|
import { ChevronDown as b } from "@brightlocal/icons";
|
|
5
5
|
import { cn as r } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
const h = i.forwardRef(({ className: t, children: e, dataHook: a, delayDuration: d = 50, ...
|
|
6
|
+
const h = i.forwardRef(({ className: t, children: e, dataHook: a, delayDuration: d = 50, ...l }, u) => (
|
|
7
7
|
// Radix defaults delayDuration to 200ms, which reads as a laggy hover-open.
|
|
8
8
|
// Match Base UI's snappier 50ms default (still overridable via props).
|
|
9
9
|
/* @__PURE__ */ f(
|
|
10
10
|
s.Root,
|
|
11
11
|
{
|
|
12
|
-
ref:
|
|
12
|
+
ref: u,
|
|
13
13
|
className: r(
|
|
14
14
|
"relative z-10 flex max-w-max flex-1 items-center justify-center",
|
|
15
15
|
t
|
|
@@ -17,7 +17,7 @@ const h = i.forwardRef(({ className: t, children: e, dataHook: a, delayDuration:
|
|
|
17
17
|
"data-hook": a,
|
|
18
18
|
"data-slot": "navigation-menu",
|
|
19
19
|
delayDuration: d,
|
|
20
|
-
...
|
|
20
|
+
...l,
|
|
21
21
|
children: [
|
|
22
22
|
e,
|
|
23
23
|
/* @__PURE__ */ n(g, {})
|
|
@@ -49,7 +49,7 @@ const x = i.forwardRef((t, e) => /* @__PURE__ */ n(
|
|
|
49
49
|
));
|
|
50
50
|
x.displayName = "NavigationMenuItem";
|
|
51
51
|
const M = 400, y = i.forwardRef(
|
|
52
|
-
({ className: t, children: e, onClick: a, onPointerDown: d, onPointerEnter:
|
|
52
|
+
({ className: t, children: e, onClick: a, onPointerDown: d, onPointerEnter: l, ...u }, p) => {
|
|
53
53
|
const c = i.useRef(""), m = i.useRef(0);
|
|
54
54
|
return /* @__PURE__ */ f(
|
|
55
55
|
s.Trigger,
|
|
@@ -59,7 +59,7 @@ const M = 400, y = i.forwardRef(
|
|
|
59
59
|
[
|
|
60
60
|
"group inline-flex h-9 w-max items-center justify-center gap-1",
|
|
61
61
|
"rounded-md px-4 py-2",
|
|
62
|
-
"text-
|
|
62
|
+
"text-label",
|
|
63
63
|
"text-foreground",
|
|
64
64
|
"duration-fast transition-colors ease-out",
|
|
65
65
|
"hover:bg-accent hover:text-accent-foreground",
|
|
@@ -79,9 +79,9 @@ const M = 400, y = i.forwardRef(
|
|
|
79
79
|
c.current = o.pointerType, d?.(o);
|
|
80
80
|
},
|
|
81
81
|
onPointerEnter: (o) => {
|
|
82
|
-
m.current = o.timeStamp,
|
|
82
|
+
m.current = o.timeStamp, l?.(o);
|
|
83
83
|
},
|
|
84
|
-
...
|
|
84
|
+
...u,
|
|
85
85
|
children: [
|
|
86
86
|
e,
|
|
87
87
|
/* @__PURE__ */ n(
|
package/dist/pagination.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),A=require("react"),m=require("@brightlocal/icons"),H=require("class-variance-authority"),d=require("@brightlocal/ui-components/lib/utils"),R=require("@brightlocal/ui-components/hooks/use-breakpoint");function S(i){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>i[e]})}}return n.default=i,Object.freeze(n)}const f=S(A);function B({page:i,totalPages:n}){const r=R.useIsBelowBreakpoint("sm")?5:7;return f.useMemo(()=>{const t=Math.max(5,r),o=[];if(o.push("previous"),n<=t)for(let u=1;u<=n;u++)o.push(u);else{const u=Math.floor((t-5)/2),h=t-3,v=n-h;if(i<=h){for(let l=1;l<=t-2;l++)o.push(l);o.push("ellipsis",n)}else if(i>=v){o.push(1,"ellipsis");for(let l=n-(t-3);l<=n;l++)o.push(l)}else{o.push(1,"ellipsis");for(let l=i-u;l<=i+u;l++)o.push(l);o.push("ellipsis",n)}}return o.push("next"),o},[i,n,r])}const C=H.cva(["inline-flex items-center justify-center","h-9 w-9","rounded-full","text-label","transition-colors duration-fast ease-out","focus-visible:outline-none focus-visible:shadow-default"],{variants:{variant:{previous:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],next:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],link:["text-foreground","hover:bg-accent hover:text-accent-foreground","aria-[current=page]:bg-background aria-[current=page]:border aria-[current=page]:border-input","dark:aria-[current=page]:bg-input/30","aria-[current=page]:hover:bg-accent","aria-[current=page]:focus-visible:border-ring","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],ellipsis:["relative","cursor-default","text-foreground","pointer-events-none"]}},defaultVariants:{variant:"link"}});function j({className:i,dataHook:n,trackingEl:e,trackingLabel:r,ariaLabel:s,...t}){return a.jsx("nav",{"aria-label":s??"Pagination",className:d.cn("mx-auto flex w-full justify-center",i),"data-hook":n,"data-slot":"pagination","data-tracking-el":e||"pagination","data-tracking-label":r,role:"navigation",...t})}j.displayName="Pagination";function L({className:i,...n}){return a.jsx("ul",{className:d.cn("flex flex-row items-center gap-2",i),"data-slot":"pagination-content",...n})}function x(i){return a.jsx("li",{"data-slot":"pagination-item",...i})}const b=f.forwardRef(({className:i,variant:n,isActive:e,children:r,...s},t)=>a.jsx("button",{ref:t,"aria-current":e?"page":void 0,className:d.cn(C({variant:n}),i),"data-active":e,"data-slot":"pagination-button",type:"button",...s,children:r}));b.displayName="PaginationButton";const y=f.forwardRef(({className:i,disabled:n,ariaLabel:e,...r},s)=>a.jsx(b,{ref:s,"aria-disabled":n,"aria-label":e??"Go to previous page",className:i,disabled:n,variant:"previous",...r,children:a.jsx(m.ChevronLeft,{})}));y.displayName="PaginationPrevious";const P=f.forwardRef(({className:i,disabled:n,ariaLabel:e,...r},s)=>a.jsx(b,{ref:s,"aria-disabled":n,"aria-label":e??"Go to next page",className:i,disabled:n,variant:"next",...r,children:a.jsx(m.ChevronRight,{})}));P.displayName="PaginationNext";const k=f.forwardRef(({className:i,page:n,isActive:e,ariaLabel:r,...s},t)=>a.jsx(b,{ref:t,"aria-label":r?r.replace("{page}",String(n)):`Go to page ${n}`,className:i,isActive:e,variant:"link",...s,children:n}));k.displayName="PaginationLink";function q({className:i,srLabel:n="More pages",...e}){return a.jsxs("span",{"aria-hidden":"true",className:d.cn(C({variant:"ellipsis"}),i),"data-slot":"pagination-ellipsis",...e,children:[a.jsx(m.MoreHorizontal,{}),a.jsx("span",{className:"sr-only",children:n})]})}const O=f.forwardRef(({className:i,page:n,totalPages:e,onPageChange:r,dataHook:s,totalItems:t,pageSize:o,renderCaption:u,ariaLabel:h,prevAriaLabel:v,nextAriaLabel:l,pageAriaLabel:$,ellipsisSrLabel:T,trackingEl:V,trackingLabel:G,..._},D)=>{const E=B({page:n,totalPages:e}),F=R.useIsBelowBreakpoint("sm"),p=(()=>{if(F||u===null||t===void 0||o===void 0||!Number.isFinite(o)||o<=0||!Number.isFinite(t)||t<0)return null;const c=Math.max(1,Math.ceil(t/o)),g=Math.min(Math.max(1,Math.floor(n)||1),c),N=t===0?0:(g-1)*o+1,M=Math.min(g*o,t);return u?u({page:g,totalPages:e,from:N,to:M,total:t}):t===0?null:`Showing ${N} to ${M} of ${t} results`})(),w=e>1;return p==null&&!w?null:a.jsxs("div",{ref:D,className:d.cn("flex min-h-9 w-full flex-wrap items-center gap-x-4 gap-y-2",p==null?"justify-center":"justify-between",i),"data-hook":s,"data-slot":"pagination-controls","data-tracking-el":V||"pagination-controls","data-tracking-label":G,..._,children:[p!=null&&a.jsx("span",{className:"text-body-sm text-muted-foreground whitespace-nowrap","data-slot":"pagination-caption",children:p}),w&&a.jsx(j,{ariaLabel:h,className:d.cn(p!=null&&"mx-0 w-auto grow justify-end"),dataHook:`${s}-nav`,children:a.jsx(L,{children:E.map((c,g)=>c==="previous"?a.jsx(x,{children:a.jsx(y,{ariaLabel:v,disabled:n<=1,onClick:()=>r(n-1)})},"previous"):c==="next"?a.jsx(x,{children:a.jsx(P,{ariaLabel:l,disabled:n>=e,onClick:()=>r(n+1)})},"next"):c==="ellipsis"?a.jsx(x,{children:a.jsx(q,{srLabel:T})},`ellipsis-${g}`):a.jsx(x,{children:a.jsx(k,{ariaLabel:$,isActive:c===n,page:c,onClick:()=>r(c)})},c))})})]})});O.displayName="PaginationControls";exports.Pagination=j;exports.PaginationButton=b;exports.PaginationContent=L;exports.PaginationControls=O;exports.PaginationEllipsis=q;exports.PaginationItem=x;exports.PaginationLink=k;exports.PaginationNext=P;exports.PaginationPrevious=y;exports.usePagination=B;
|
package/dist/pagination.d.ts
CHANGED
|
@@ -104,6 +104,135 @@ interface PaginationEllipsisProps extends React.ComponentProps<"span"> {
|
|
|
104
104
|
srLabel?: string;
|
|
105
105
|
}
|
|
106
106
|
declare function PaginationEllipsis({ className, srLabel, ...props }: PaginationEllipsisProps): import("react/jsx-runtime").JSX.Element;
|
|
107
|
+
/**
|
|
108
|
+
* Numbers a `PaginationControls` caption is built from. Passed to
|
|
109
|
+
* `renderCaption` so the consumer owns wording, order and pluralization.
|
|
110
|
+
*/
|
|
111
|
+
interface PaginationCaptionInfo {
|
|
112
|
+
/**
|
|
113
|
+
* Current page (1-based), clamped to the last page the totals allow — so it
|
|
114
|
+
* can differ from the `page` prop for the render in which an async total
|
|
115
|
+
* shrinks under an out-of-range page.
|
|
116
|
+
*/
|
|
117
|
+
page: number;
|
|
118
|
+
/** Total number of pages, exactly as passed. */
|
|
119
|
+
totalPages: number;
|
|
120
|
+
/** First item shown on this page (1-based, 0 when there are no items). */
|
|
121
|
+
from: number;
|
|
122
|
+
/** Last item shown on this page. Never less than `from`. */
|
|
123
|
+
to: number;
|
|
124
|
+
/** Total items across all pages. */
|
|
125
|
+
total: number;
|
|
126
|
+
}
|
|
127
|
+
interface PaginationControlsProps extends Omit<React.ComponentProps<"div">, "children" | "onChange"> {
|
|
128
|
+
/** Current page (1-based). Controlled — the consumer owns the value. */
|
|
129
|
+
page: number;
|
|
130
|
+
/** Total number of pages. */
|
|
131
|
+
totalPages: number;
|
|
132
|
+
/**
|
|
133
|
+
* Called with the requested page (1-based) when the user picks a page or
|
|
134
|
+
* steps with previous/next. Never called outside `1..totalPages`.
|
|
135
|
+
*/
|
|
136
|
+
onPageChange: (page: number) => void;
|
|
137
|
+
/** Data hook for automated testing (REQUIRED). The nav gets `{dataHook}-nav`. */
|
|
138
|
+
dataHook: string;
|
|
139
|
+
/**
|
|
140
|
+
* Total items across all pages. Provide together with `pageSize` to render
|
|
141
|
+
* the results caption; without both, no caption renders.
|
|
142
|
+
*/
|
|
143
|
+
totalItems?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Items per page. Only used to derive the caption's `from`/`to`; must be a
|
|
146
|
+
* positive number, or no caption renders.
|
|
147
|
+
*/
|
|
148
|
+
pageSize?: number;
|
|
149
|
+
/**
|
|
150
|
+
* Render the results caption. Receives the derived numbers; you own wording,
|
|
151
|
+
* order and pluralization. Return `null` to hide it.
|
|
152
|
+
* @default Renders "Showing {from} to {to} of {total} results", or nothing when `total` is 0.
|
|
153
|
+
*/
|
|
154
|
+
renderCaption?: ((info: PaginationCaptionInfo) => React.ReactNode) | null;
|
|
155
|
+
/**
|
|
156
|
+
* Accessible label for the pagination navigation.
|
|
157
|
+
* @default "Pagination"
|
|
158
|
+
*/
|
|
159
|
+
ariaLabel?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Accessible label for the previous-page button.
|
|
162
|
+
* @default "Go to previous page"
|
|
163
|
+
*/
|
|
164
|
+
prevAriaLabel?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Accessible label for the next-page button.
|
|
167
|
+
* @default "Go to next page"
|
|
168
|
+
*/
|
|
169
|
+
nextAriaLabel?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Accessible label for a page button.
|
|
172
|
+
* Supports `{page}` placeholder for interpolation.
|
|
173
|
+
* @default "Go to page {page}"
|
|
174
|
+
*/
|
|
175
|
+
pageAriaLabel?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Screen-reader-only label for the ellipsis.
|
|
178
|
+
* @default "More pages"
|
|
179
|
+
*/
|
|
180
|
+
ellipsisSrLabel?: string;
|
|
181
|
+
/** Tracking element identifier for analytics. */
|
|
182
|
+
trackingEl?: string;
|
|
183
|
+
/** Tracking label for analytics context. */
|
|
184
|
+
trackingLabel?: string;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Pagination with the previous/next/ellipsis/page-link wiring done for you —
|
|
188
|
+
* the composed counterpart to the primitives below.
|
|
189
|
+
*
|
|
190
|
+
* Controlled: the consumer holds `page` and updates it from `onPageChange`.
|
|
191
|
+
* Pass `totalItems` + `pageSize` to get the results caption; the caption sits
|
|
192
|
+
* on the left with the nav pushed right, and without one the nav centres.
|
|
193
|
+
* Below the `sm` viewport breakpoint the caption is removed and the nav
|
|
194
|
+
* centres, and from `sm` up the bar wraps inside narrow containers instead of
|
|
195
|
+
* overflowing — the same responsive rules as `DataTablePagination` (DS-998).
|
|
196
|
+
*
|
|
197
|
+
* There is nothing to navigate on a single page, so the nav hides itself at
|
|
198
|
+
* `totalPages <= 1` and the component renders nothing at all when the caption
|
|
199
|
+
* is empty too (same rule as `DataTablePagination`, DS-900).
|
|
200
|
+
*
|
|
201
|
+
* Reach for the primitives (`Pagination`, `PaginationContent`,
|
|
202
|
+
* `PaginationItem`, …) plus `usePagination` only when you need a layout or an
|
|
203
|
+
* item set this doesn't cover. Inside a `DataTable`, use `DataTablePagination`
|
|
204
|
+
* instead so pagination stays in sync with sorting and filtering.
|
|
205
|
+
*
|
|
206
|
+
* @example
|
|
207
|
+
* const [page, setPage] = React.useState(1);
|
|
208
|
+
*
|
|
209
|
+
* <PaginationControls
|
|
210
|
+
* dataHook="results-pagination"
|
|
211
|
+
* page={page}
|
|
212
|
+
* pageSize={10}
|
|
213
|
+
* totalItems={30}
|
|
214
|
+
* totalPages={3}
|
|
215
|
+
* onPageChange={setPage}
|
|
216
|
+
* />
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* // Localised caption and labels
|
|
220
|
+
* <PaginationControls
|
|
221
|
+
* ariaLabel={t("pagination.nav")}
|
|
222
|
+
* dataHook="results-pagination"
|
|
223
|
+
* nextAriaLabel={t("pagination.next")}
|
|
224
|
+
* page={page}
|
|
225
|
+
* pageSize={10}
|
|
226
|
+
* prevAriaLabel={t("pagination.prev")}
|
|
227
|
+
* renderCaption={({ from, to, total }) =>
|
|
228
|
+
* t("pagination.caption", { from, to, total })
|
|
229
|
+
* }
|
|
230
|
+
* totalItems={30}
|
|
231
|
+
* totalPages={3}
|
|
232
|
+
* onPageChange={setPage}
|
|
233
|
+
* />
|
|
234
|
+
*/
|
|
235
|
+
declare const PaginationControls: React.ForwardRefExoticComponent<Omit<PaginationControlsProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
107
236
|
export type { PaginationItemType };
|
|
108
|
-
export { Pagination, PaginationContent, PaginationItem, PaginationButton, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis, type PaginationProps, type PaginationButtonProps, type PaginationLinkProps, type PaginationPreviousProps, type PaginationNextProps, type PaginationEllipsisProps, };
|
|
237
|
+
export { Pagination, PaginationContent, PaginationControls, PaginationItem, PaginationButton, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis, type PaginationCaptionInfo, type PaginationControlsProps, type PaginationProps, type PaginationButtonProps, type PaginationLinkProps, type PaginationPreviousProps, type PaginationNextProps, type PaginationEllipsisProps, };
|
|
109
238
|
//# sourceMappingURL=pagination.d.ts.map
|
package/dist/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACt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