@brightlocal/ui-components 2.10.0 → 2.12.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 +3 -1
- package/component-meta.json +200 -17
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +42 -25
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +16 -4
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +57 -53
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +7 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +82 -81
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +19 -10
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +173 -169
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +14 -2
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +37 -37
- package/dist/button.cjs +1 -1
- package/dist/button.js +25 -25
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +3 -3
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +2 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +85 -82
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +37 -4
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +213 -163
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +11 -0
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +43 -38
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +12 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +235 -230
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +106 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +385 -120
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +10 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +96 -96
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +38 -30
- package/dist/drawer.d.ts +2 -2
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +5 -0
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +15 -7
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +406 -395
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +8 -5
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +164 -170
- package/dist/input-group.d.ts +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +10 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +108 -106
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +36 -37
- package/dist/list.d.ts +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +25 -22
- package/dist/map.cjs +1 -0
- package/dist/map.d.ts +207 -0
- package/dist/map.d.ts.map +1 -0
- package/dist/map.js +256 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +29 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +26 -25
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +6 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +27 -19
- package/dist/resizable.d.ts +1 -1
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +7 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +52 -51
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +16 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +38 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +6 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +42 -41
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +13 -11
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -30
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +101 -52
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts +5 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +111 -110
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +1 -2
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +49 -50
- package/package.json +4 -5
- package/src/blocks/data-table.tsx +26 -9
- package/src/blocks/input-list.tsx +12 -1
- package/src/blocks/sidebar.tsx +61 -44
- package/src/components/badge.tsx +22 -5
- package/src/components/breadcrumb.tsx +43 -26
- package/src/components/button.tsx +13 -13
- package/src/components/callout.tsx +5 -4
- package/src/components/card.tsx +35 -19
- package/src/components/carousel.tsx +134 -13
- package/src/components/chip.tsx +22 -2
- package/src/components/combobox.tsx +18 -3
- package/src/components/command.tsx +644 -17
- package/src/components/date-picker.tsx +17 -3
- package/src/components/dialog.tsx +17 -4
- package/src/components/drawer.tsx +2 -2
- package/src/components/global-layout.tsx +15 -2
- package/src/components/input-chip.tsx +114 -66
- package/src/components/input-password.tsx +73 -49
- package/src/components/link.tsx +29 -17
- package/src/components/logo.tsx +10 -2
- package/src/components/map.tsx +597 -0
- package/src/components/pagination.tsx +44 -11
- package/src/components/rating.tsx +20 -2
- package/src/components/select.tsx +9 -1
- package/src/components/separator.tsx +40 -25
- package/src/components/sheet.tsx +28 -20
- package/src/components/skeleton.tsx +13 -2
- package/src/components/sonner.tsx +9 -3
- package/src/components/tabs.tsx +118 -22
- package/src/components/text-reveal-motion.tsx +7 -1
- package/src/components/typography.tsx +6 -7
- package/src/hooks/use-breakpoint.ts +2 -3
- package/src/index.ts +1 -0
|
@@ -37,7 +37,7 @@ interface TypographyBaseProps {
|
|
|
37
37
|
// H1 - Main page heading
|
|
38
38
|
// =============================================================================
|
|
39
39
|
const h1Variants = cva(
|
|
40
|
-
"self-stretch text-foreground text-4xl font-extrabold font-
|
|
40
|
+
"self-stretch text-foreground text-4xl font-extrabold font-display leading-10 lg:text-5xl lg:leading-12"
|
|
41
41
|
);
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -83,7 +83,7 @@ TypographyH1.displayName = "TypographyH1";
|
|
|
83
83
|
// H2 - Section heading
|
|
84
84
|
// =============================================================================
|
|
85
85
|
const h2Variants = cva(
|
|
86
|
-
"text-foreground text-3xl font-semibold font-
|
|
86
|
+
"text-foreground text-3xl font-semibold font-display leading-9"
|
|
87
87
|
);
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -129,7 +129,7 @@ TypographyH2.displayName = "TypographyH2";
|
|
|
129
129
|
// H3 - Subsection heading
|
|
130
130
|
// =============================================================================
|
|
131
131
|
const h3Variants = cva(
|
|
132
|
-
"text-foreground text-2xl font-semibold font-
|
|
132
|
+
"text-foreground text-2xl font-semibold font-display leading-8"
|
|
133
133
|
);
|
|
134
134
|
|
|
135
135
|
/**
|
|
@@ -175,7 +175,7 @@ TypographyH3.displayName = "TypographyH3";
|
|
|
175
175
|
// H4 - Minor heading
|
|
176
176
|
// =============================================================================
|
|
177
177
|
const h4Variants = cva(
|
|
178
|
-
"text-foreground text-xl font-semibold font-
|
|
178
|
+
"text-foreground text-xl font-semibold font-display leading-7"
|
|
179
179
|
);
|
|
180
180
|
|
|
181
181
|
/**
|
|
@@ -360,7 +360,7 @@ TypographyList.displayName = "TypographyList";
|
|
|
360
360
|
// Inline Code
|
|
361
361
|
// =============================================================================
|
|
362
362
|
const inlineCodeVariants = cva(
|
|
363
|
-
"inline-flex justify-center items-center gap-2 bg-muted rounded-md px-
|
|
363
|
+
"inline-flex justify-center items-center gap-2 bg-muted rounded-md px-1.5 py-0.5 text-foreground text-sm font-normal font-mono leading-5"
|
|
364
364
|
);
|
|
365
365
|
|
|
366
366
|
/**
|
|
@@ -409,7 +409,7 @@ TypographyInlineCode.displayName = "TypographyInlineCode";
|
|
|
409
409
|
// Code Block
|
|
410
410
|
// =============================================================================
|
|
411
411
|
const codeVariants = cva(
|
|
412
|
-
"block w-full p-4 bg-
|
|
412
|
+
"block w-full p-4 bg-muted rounded-lg border border-border text-muted-foreground text-base font-normal font-mono leading-6 overflow-x-auto focus-visible:shadow-default outline-none"
|
|
413
413
|
);
|
|
414
414
|
|
|
415
415
|
/**
|
|
@@ -652,7 +652,6 @@ export {
|
|
|
652
652
|
TypographyH4,
|
|
653
653
|
TypographyP,
|
|
654
654
|
TypographyBlockquote,
|
|
655
|
-
blockquoteVariants,
|
|
656
655
|
TypographyList,
|
|
657
656
|
TypographyInlineCode,
|
|
658
657
|
TypographyCode,
|
|
@@ -39,7 +39,7 @@ export function isBelowBreakpoint(size: Breakpoint = "sm"): boolean {
|
|
|
39
39
|
* @default "sm"
|
|
40
40
|
*/
|
|
41
41
|
export function useIsBelowBreakpoint(size: Breakpoint = "sm") {
|
|
42
|
-
const [isBelow, setIsBelow] = React.useState
|
|
42
|
+
const [isBelow, setIsBelow] = React.useState(() => isBelowBreakpoint(size));
|
|
43
43
|
|
|
44
44
|
React.useEffect(() => {
|
|
45
45
|
const bp = getBreakpointValue(size);
|
|
@@ -48,11 +48,10 @@ export function useIsBelowBreakpoint(size: Breakpoint = "sm") {
|
|
|
48
48
|
setIsBelow(window.innerWidth < bp);
|
|
49
49
|
};
|
|
50
50
|
mql.addEventListener("change", onChange);
|
|
51
|
-
setIsBelow(window.innerWidth < bp);
|
|
52
51
|
return () => mql.removeEventListener("change", onChange);
|
|
53
52
|
}, [size]);
|
|
54
53
|
|
|
55
|
-
return
|
|
54
|
+
return isBelow;
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
export type { Breakpoint };
|
package/src/index.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from "./components/label";
|
|
|
36
36
|
export * from "./components/link";
|
|
37
37
|
export * from "./components/list";
|
|
38
38
|
export * from "./components/logo";
|
|
39
|
+
export * from "./components/map";
|
|
39
40
|
export * from "./components/menubar";
|
|
40
41
|
export * from "./components/navigation-menu";
|
|
41
42
|
export * from "./components/pagination";
|