@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
package/dist/pagination.js
CHANGED
|
@@ -3,7 +3,7 @@ import * as l from "react";
|
|
|
3
3
|
import { MoreHorizontal as v, ChevronRight as x, ChevronLeft as b } from "@brightlocal/icons";
|
|
4
4
|
import { cva as N } from "class-variance-authority";
|
|
5
5
|
import { cn as f } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
-
function
|
|
6
|
+
function G({
|
|
7
7
|
page: t,
|
|
8
8
|
totalPages: i,
|
|
9
9
|
siblingCount: n = 1,
|
|
@@ -84,13 +84,13 @@ function k({
|
|
|
84
84
|
dataHook: i,
|
|
85
85
|
trackingEl: n,
|
|
86
86
|
trackingLabel: a,
|
|
87
|
-
ariaLabel: s
|
|
87
|
+
ariaLabel: s,
|
|
88
88
|
...r
|
|
89
89
|
}) {
|
|
90
90
|
return /* @__PURE__ */ o(
|
|
91
91
|
"nav",
|
|
92
92
|
{
|
|
93
|
-
"aria-label": s,
|
|
93
|
+
"aria-label": s ?? "Pagination",
|
|
94
94
|
className: f("mx-auto flex w-full justify-center", t),
|
|
95
95
|
"data-hook": i,
|
|
96
96
|
"data-slot": "pagination",
|
|
@@ -102,7 +102,7 @@ function k({
|
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
k.displayName = "Pagination";
|
|
105
|
-
function
|
|
105
|
+
function L({
|
|
106
106
|
className: t,
|
|
107
107
|
...i
|
|
108
108
|
}) {
|
|
@@ -115,7 +115,7 @@ function G({
|
|
|
115
115
|
}
|
|
116
116
|
);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function S(t) {
|
|
119
119
|
return /* @__PURE__ */ o("li", { "data-slot": "pagination-item", ...t });
|
|
120
120
|
}
|
|
121
121
|
const d = l.forwardRef(({ className: t, variant: i, isActive: n, children: a, ...s }, r) => /* @__PURE__ */ o(
|
|
@@ -132,54 +132,55 @@ const d = l.forwardRef(({ className: t, variant: i, isActive: n, children: a, ..
|
|
|
132
132
|
}
|
|
133
133
|
));
|
|
134
134
|
d.displayName = "PaginationButton";
|
|
135
|
-
const w = l.forwardRef(({ className: t, disabled: i,
|
|
135
|
+
const w = l.forwardRef(({ className: t, disabled: i, ariaLabel: n, ...a }, s) => /* @__PURE__ */ o(
|
|
136
136
|
d,
|
|
137
137
|
{
|
|
138
|
-
ref:
|
|
138
|
+
ref: s,
|
|
139
139
|
"aria-disabled": i,
|
|
140
|
-
"aria-label": "Go to previous page",
|
|
140
|
+
"aria-label": n ?? "Go to previous page",
|
|
141
141
|
className: t,
|
|
142
142
|
disabled: i,
|
|
143
143
|
variant: "previous",
|
|
144
|
-
...
|
|
144
|
+
...a,
|
|
145
145
|
children: /* @__PURE__ */ o(b, {})
|
|
146
146
|
}
|
|
147
147
|
));
|
|
148
148
|
w.displayName = "PaginationPrevious";
|
|
149
149
|
const P = l.forwardRef(
|
|
150
|
-
({ className: t, disabled: i,
|
|
150
|
+
({ className: t, disabled: i, ariaLabel: n, ...a }, s) => /* @__PURE__ */ o(
|
|
151
151
|
d,
|
|
152
152
|
{
|
|
153
|
-
ref:
|
|
153
|
+
ref: s,
|
|
154
154
|
"aria-disabled": i,
|
|
155
|
-
"aria-label": "Go to next page",
|
|
155
|
+
"aria-label": n ?? "Go to next page",
|
|
156
156
|
className: t,
|
|
157
157
|
disabled: i,
|
|
158
158
|
variant: "next",
|
|
159
|
-
...
|
|
159
|
+
...a,
|
|
160
160
|
children: /* @__PURE__ */ o(x, {})
|
|
161
161
|
}
|
|
162
162
|
)
|
|
163
163
|
);
|
|
164
164
|
P.displayName = "PaginationNext";
|
|
165
165
|
const M = l.forwardRef(
|
|
166
|
-
({ className: t, page: i, isActive: n,
|
|
166
|
+
({ className: t, page: i, isActive: n, ariaLabel: a, ...s }, r) => /* @__PURE__ */ o(
|
|
167
167
|
d,
|
|
168
168
|
{
|
|
169
|
-
ref:
|
|
170
|
-
"aria-label": `Go to page ${i}`,
|
|
169
|
+
ref: r,
|
|
170
|
+
"aria-label": a ? a.replace("{page}", String(i)) : `Go to page ${i}`,
|
|
171
171
|
className: t,
|
|
172
172
|
isActive: n,
|
|
173
173
|
variant: "link",
|
|
174
|
-
...
|
|
174
|
+
...s,
|
|
175
175
|
children: i
|
|
176
176
|
}
|
|
177
177
|
)
|
|
178
178
|
);
|
|
179
179
|
M.displayName = "PaginationLink";
|
|
180
|
-
function
|
|
180
|
+
function B({
|
|
181
181
|
className: t,
|
|
182
|
-
|
|
182
|
+
srLabel: i = "More pages",
|
|
183
|
+
...n
|
|
183
184
|
}) {
|
|
184
185
|
return /* @__PURE__ */ h(
|
|
185
186
|
"span",
|
|
@@ -187,10 +188,10 @@ function S({
|
|
|
187
188
|
"aria-hidden": "true",
|
|
188
189
|
className: f(u({ variant: "ellipsis" }), t),
|
|
189
190
|
"data-slot": "pagination-ellipsis",
|
|
190
|
-
...
|
|
191
|
+
...n,
|
|
191
192
|
children: [
|
|
192
193
|
/* @__PURE__ */ o(v, {}),
|
|
193
|
-
/* @__PURE__ */ o("span", { className: "sr-only", children:
|
|
194
|
+
/* @__PURE__ */ o("span", { className: "sr-only", children: i })
|
|
194
195
|
]
|
|
195
196
|
}
|
|
196
197
|
);
|
|
@@ -198,11 +199,11 @@ function S({
|
|
|
198
199
|
export {
|
|
199
200
|
k as Pagination,
|
|
200
201
|
d as PaginationButton,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
L as PaginationContent,
|
|
203
|
+
B as PaginationEllipsis,
|
|
204
|
+
S as PaginationItem,
|
|
204
205
|
M as PaginationLink,
|
|
205
206
|
P as PaginationNext,
|
|
206
207
|
w as PaginationPrevious,
|
|
207
|
-
|
|
208
|
+
G as usePagination
|
|
208
209
|
};
|
package/dist/rating.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 l=require("react/jsx-runtime"),j=require("react"),c=require("@brightlocal/icons"),y=require("@brightlocal/ui-components/lib/utils");function R(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,s.get?s:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const h=R(j),d=h.forwardRef(({value:t,dataHook:a,ariaLabel:e,trackingEl:s,trackingLabel:u,className:g,...m},f)=>{const r=Math.max(0,Math.min(5,t));return l.jsx("div",{ref:f,"aria-label":e?e.replace("{value}",String(r)):`Rating: ${r} out of 5 stars`,className:y.cn("flex items-center gap-0.5",g),"data-hook":a,"data-slot":"rating","data-tracking-el":s,"data-tracking-label":u,role:"img",...m,children:[...Array(5)].map((v,i)=>{const p=i+1,n=r>=p,o=!n&&r>i,b=o?((r-i)*100).toFixed(0):n?"100":"0";return l.jsxs("div",{className:"relative","data-slot":"rating-star",children:[l.jsx(c.StarRating,{className:"fill-muted stroke-muted","data-slot":"rating-star-base"}),(n||o)&&l.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 overflow-hidden","data-slot":"rating-star-fill",style:{width:`${b}%`},children:l.jsx(c.StarRating,{className:"fill-yellow-400 stroke-yellow-400"})})]},i)})})});d.displayName="Rating";exports.Rating=d;
|
package/dist/rating.d.ts
CHANGED
|
@@ -12,6 +12,12 @@ export interface RatingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
12
|
* Data hook for testing
|
|
13
13
|
*/
|
|
14
14
|
dataHook: string;
|
|
15
|
+
/**
|
|
16
|
+
* Accessible label for the rating.
|
|
17
|
+
* Supports `{value}` placeholder for interpolation.
|
|
18
|
+
* @default "Rating: {value} out of 5 stars"
|
|
19
|
+
*/
|
|
20
|
+
ariaLabel?: string;
|
|
15
21
|
/**
|
|
16
22
|
* Optional tracking element identifier
|
|
17
23
|
*/
|
package/dist/rating.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/components/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../../src/components/rating.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,MAAM,oFAqEX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
package/dist/rating.js
CHANGED
|
@@ -1,42 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { StarRating as
|
|
1
|
+
import { jsx as e, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { StarRating as i } from "@brightlocal/icons";
|
|
4
4
|
import { cn as y } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
-
const N =
|
|
6
|
-
({
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const N = v.forwardRef(
|
|
6
|
+
({
|
|
7
|
+
value: o,
|
|
8
|
+
dataHook: n,
|
|
9
|
+
ariaLabel: r,
|
|
10
|
+
trackingEl: d,
|
|
11
|
+
trackingLabel: c,
|
|
12
|
+
className: m,
|
|
13
|
+
...g
|
|
14
|
+
}, f) => {
|
|
15
|
+
const a = Math.max(0, Math.min(5, o));
|
|
16
|
+
return /* @__PURE__ */ e(
|
|
9
17
|
"div",
|
|
10
18
|
{
|
|
11
19
|
ref: f,
|
|
12
|
-
"aria-label": `Rating: ${a} out of 5 stars`,
|
|
20
|
+
"aria-label": r ? r.replace("{value}", String(a)) : `Rating: ${a} out of 5 stars`,
|
|
13
21
|
className: y("flex items-center gap-0.5", m),
|
|
14
|
-
"data-hook":
|
|
22
|
+
"data-hook": n,
|
|
15
23
|
"data-slot": "rating",
|
|
16
|
-
"data-tracking-el":
|
|
17
|
-
"data-tracking-label":
|
|
24
|
+
"data-tracking-el": d,
|
|
25
|
+
"data-tracking-label": c,
|
|
18
26
|
role: "img",
|
|
19
|
-
...
|
|
27
|
+
...g,
|
|
20
28
|
children: [...Array(5)].map((R, t) => {
|
|
21
|
-
const
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
29
|
+
const p = t + 1, l = a >= p, s = !l && a > t, u = s ? ((a - t) * 100).toFixed(0) : l ? "100" : "0";
|
|
30
|
+
return /* @__PURE__ */ h("div", { className: "relative", "data-slot": "rating-star", children: [
|
|
31
|
+
/* @__PURE__ */ e(
|
|
32
|
+
i,
|
|
25
33
|
{
|
|
26
34
|
className: "fill-muted stroke-muted",
|
|
27
35
|
"data-slot": "rating-star-base"
|
|
28
36
|
}
|
|
29
37
|
),
|
|
30
|
-
(
|
|
38
|
+
(l || s) && /* @__PURE__ */ e(
|
|
31
39
|
"div",
|
|
32
40
|
{
|
|
33
41
|
"aria-hidden": "true",
|
|
34
42
|
className: "absolute inset-0 overflow-hidden",
|
|
35
43
|
"data-slot": "rating-star-fill",
|
|
36
44
|
style: {
|
|
37
|
-
width: `${
|
|
45
|
+
width: `${u}%`
|
|
38
46
|
},
|
|
39
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ e(i, { className: "fill-yellow-400 stroke-yellow-400" })
|
|
40
48
|
}
|
|
41
49
|
)
|
|
42
50
|
] }, t);
|
package/dist/resizable.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ type ResizablePanelProps = React.ComponentProps<typeof ResizablePrimitive.Panel>
|
|
|
28
28
|
/**
|
|
29
29
|
* Individual resizable panel within a panel group.
|
|
30
30
|
*/
|
|
31
|
-
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<Omit<React.HTMLAttributes<HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLLinkElement | HTMLMapElement | HTMLButtonElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLVideoElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement |
|
|
31
|
+
declare const ResizablePanel: React.ForwardRefExoticComponent<Omit<Omit<React.HTMLAttributes<HTMLSpanElement | HTMLElement | HTMLDivElement | HTMLObjectElement | HTMLSlotElement | HTMLStyleElement | HTMLLinkElement | HTMLMapElement | HTMLButtonElement | HTMLDialogElement | HTMLFormElement | HTMLImageElement | HTMLOptionElement | HTMLTableElement | HTMLTimeElement | HTMLVideoElement | HTMLAnchorElement | HTMLAreaElement | HTMLAudioElement | HTMLBaseElement | HTMLQuoteElement | HTMLBodyElement | HTMLBRElement | HTMLCanvasElement | HTMLTableColElement | HTMLDataElement | HTMLDataListElement | HTMLModElement | HTMLDetailsElement | HTMLDListElement | HTMLEmbedElement | HTMLFieldSetElement | HTMLHeadingElement | HTMLHeadElement | HTMLHRElement | HTMLHtmlElement | HTMLIFrameElement | HTMLInputElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLMetaElement | HTMLMeterElement | HTMLOListElement | HTMLOptGroupElement | HTMLOutputElement | HTMLParagraphElement | HTMLPreElement | HTMLProgressElement | HTMLScriptElement | HTMLSelectElement | HTMLSourceElement | HTMLTemplateElement | HTMLTableSectionElement | HTMLTableCellElement | HTMLTextAreaElement | HTMLTitleElement | HTMLTableRowElement | HTMLTrackElement | HTMLUListElement | HTMLMenuElement | HTMLTableCaptionElement | HTMLPictureElement>, "id" | "onResize"> & {
|
|
32
32
|
className?: string;
|
|
33
33
|
collapsedSize?: number | undefined;
|
|
34
34
|
collapsible?: boolean | undefined;
|
package/dist/select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
2
|
-
Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,[r]);const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),q=require("react"),C=require("@radix-ui/react-select"),c=require("@brightlocal/icons"),D=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils"),I=require("./lib/use-dev-warning.cjs");function f(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:()=>e[a]})}}return r.default=e,Object.freeze(r)}const _=f(q),o=f(C);function b({children:e,...r}){return t.jsx(o.Root,{"data-slot":"select",...r,children:e})}b.displayName="Select";function g(e){return t.jsx(o.Group,{"data-slot":"select-group",...e})}g.displayName="SelectGroup";function x(e){return t.jsx(o.Value,{"data-slot":"select-value",...e})}x.displayName="SelectValue";const B=D.cva(["relative flex w-full h-9 items-center justify-between gap-2","px-3 py-2","border border-border rounded-sm outline-none transition-[border-color,box-shadow,background-color]","bg-neutral-50 border-neutral-300","dark:bg-white/5 dark:border-white/15","text-sm font-normal font-sans text-foreground","[&>span]:block [&>span]:truncate","data-[placeholder]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"]);function v({className:e,children:r,placeholder:a,dataHook:s,error:i,selectLabel:d,...l}){const p=i||l["aria-invalid"]===!0||l["aria-invalid"]==="true",w=l["aria-required"]===!0||l["aria-required"]==="true",N=l["aria-label"]||d||a||"Select an option",k=p?"border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive":"";return t.jsxs(o.Trigger,{...l,"aria-invalid":p?"true":void 0,"aria-label":N,"aria-required":w?"true":void 0,className:n.cn(B(),k,e),"data-hook":s,"data-slot":"select-trigger",children:[r,t.jsx(o.Icon,{asChild:!0,children:t.jsx(c.ChevronDown,{className:"text-muted-foreground"})})]})}v.displayName="SelectTrigger";function S({className:e,children:r,position:a="popper",...s}){const i=_.useRef(null);I.useDevWarning(()=>i.current?i.current.querySelectorAll('[data-slot="select-item"]').length>=100:!1,`Select contains many items. For large lists (100+), consider using <Combobox> which supports search and filtering.
|
|
2
|
+
Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,[r]);const d=n.cn("relative z-50 overflow-hidden","min-w-[8rem]","rounded-md border border-border bg-popover shadow-md","text-popover-foreground","max-h-[var(--radix-select-content-available-height)]","origin-[var(--radix-select-content-transform-origin)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"),l=a==="popper"&&n.cn("data-[side=bottom]:translate-y-1","data-[side=left]:-translate-x-1","data-[side=right]:translate-x-1","data-[side=top]:-translate-y-1");return t.jsx(o.Portal,{children:t.jsxs(o.Content,{className:n.cn(d,l,e),"data-slot":"select-content",position:a,...s,children:[t.jsx(u,{}),t.jsx(o.Viewport,{ref:i,className:n.cn("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),t.jsx(m,{})]})})}S.displayName="SelectContent";function h({className:e,...r}){return t.jsx(o.Label,{className:n.cn("text-muted-foreground px-2 py-1.5 text-xs font-medium",e),"data-slot":"select-label",...r})}h.displayName="SelectLabel";function y({className:e,children:r,...a}){const s=n.cn("relative flex w-full cursor-default select-none items-center gap-2","rounded py-1.5 pl-2 pr-8","text-sm font-normal leading-5 text-popover-foreground","focus:bg-accent focus:text-accent-foreground","hover:bg-accent/50 hover:text-accent-foreground","outline-none focus:outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0");return t.jsxs(o.Item,{className:n.cn(s,e),"data-slot":"select-item",...a,children:[t.jsx("span",{className:"absolute right-2 flex size-4 items-center justify-center",children:t.jsx(o.ItemIndicator,{children:t.jsx(c.Check,{})})}),t.jsx(o.ItemText,{children:r})]})}y.displayName="SelectItem";function j({className:e,...r}){return t.jsx(o.Separator,{className:n.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),"data-slot":"select-separator",...r})}j.displayName="SelectSeparator";function u({className:e,...r}){return t.jsx(o.ScrollUpButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...r,children:t.jsx(c.ChevronUp,{})})}u.displayName="SelectScrollUpButton";function m({className:e,...r}){return t.jsx(o.ScrollDownButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...r,children:t.jsx(c.ChevronDown,{})})}m.displayName="SelectScrollDownButton";exports.Select=b;exports.SelectContent=S;exports.SelectGroup=g;exports.SelectItem=y;exports.SelectLabel=h;exports.SelectScrollDownButton=m;exports.SelectScrollUpButton=u;exports.SelectSeparator=j;exports.SelectTrigger=v;exports.SelectValue=x;
|
package/dist/select.d.ts
CHANGED
|
@@ -49,11 +49,17 @@ interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive
|
|
|
49
49
|
dataHook?: string;
|
|
50
50
|
/** Whether the select trigger has an error state */
|
|
51
51
|
error?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Accessible label for the select trigger.
|
|
54
|
+
* Priority: aria-label > selectLabel > placeholder > "Select an option"
|
|
55
|
+
* @default "Select an option"
|
|
56
|
+
*/
|
|
57
|
+
selectLabel?: string;
|
|
52
58
|
}
|
|
53
59
|
/**
|
|
54
60
|
* SelectTrigger - The button that opens the select dropdown
|
|
55
61
|
*/
|
|
56
|
-
declare function SelectTrigger({ className, children, placeholder, dataHook, error, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare function SelectTrigger({ className, children, placeholder, dataHook, error, selectLabel, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
63
|
declare namespace SelectTrigger {
|
|
58
64
|
var displayName: string;
|
|
59
65
|
}
|
package/dist/select.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAW1D,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAChD,OAAO,eAAe,CAAC,IAAI,CAC5B;IACC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAMlD;kBANQ,MAAM;;;AAUf;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AAQpB;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AA6CpB,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CACvD,OAAO,eAAe,CAAC,OAAO,CAC/B;IACC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAW1D,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAChD,OAAO,eAAe,CAAC,IAAI,CAC5B;IACC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAMlD;kBANQ,MAAM;;;AAUf;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AAQpB;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AA6CpB,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CACvD,OAAO,eAAe,CAAC,OAAO,CAC/B;IACC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,WAAW,EACX,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAoCpB;kBA5CQ,aAAa;;;AAgDtB;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAqEtD;kBA1EQ,aAAa;;;AA8EtB;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAWpD;kBAdQ,WAAW;;;AAkBpB;;;;;;;;;;;;GAYG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAoCnD;kBAxCQ,UAAU;;;AA4CnB;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,2CAQxD;kBAXQ,eAAe;;;AAexB;;GAEG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,cAAc,CAAC,2CAa7D;kBAhBQ,oBAAoB;;;AAoB7B;;GAEG;AACH,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,2CAa/D;kBAhBQ,sBAAsB;;;AAoB/B,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC"}
|
package/dist/select.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as h from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-select";
|
|
4
|
-
import { Check as
|
|
5
|
-
import { cva as
|
|
4
|
+
import { Check as S, ChevronDown as m, ChevronUp as x } from "@brightlocal/icons";
|
|
5
|
+
import { cva as y } from "class-variance-authority";
|
|
6
6
|
import { cn as a } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
-
import { useDevWarning as
|
|
8
|
-
function
|
|
7
|
+
import { useDevWarning as w } from "./lib/use-dev-warning.js";
|
|
8
|
+
function N({ children: e, ...r }) {
|
|
9
9
|
return /* @__PURE__ */ t(o.Root, { "data-slot": "select", ...r, children: e });
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
function
|
|
11
|
+
N.displayName = "Select";
|
|
12
|
+
function k(e) {
|
|
13
13
|
return /* @__PURE__ */ t(o.Group, { "data-slot": "select-group", ...e });
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
function
|
|
15
|
+
k.displayName = "SelectGroup";
|
|
16
|
+
function C(e) {
|
|
17
17
|
return /* @__PURE__ */ t(o.Value, { "data-slot": "select-value", ...e });
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
const
|
|
19
|
+
C.displayName = "SelectValue";
|
|
20
|
+
const I = y([
|
|
21
21
|
// Base layout
|
|
22
22
|
"relative flex w-full h-9 items-center justify-between gap-2",
|
|
23
23
|
"px-3 py-2",
|
|
@@ -41,47 +41,48 @@ const C = x([
|
|
|
41
41
|
// Icon styles (chevron and custom icons)
|
|
42
42
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0"
|
|
43
43
|
]);
|
|
44
|
-
function
|
|
44
|
+
function j({
|
|
45
45
|
className: e,
|
|
46
46
|
children: r,
|
|
47
47
|
placeholder: l,
|
|
48
48
|
dataHook: s,
|
|
49
49
|
error: i,
|
|
50
|
+
selectLabel: d,
|
|
50
51
|
...n
|
|
51
52
|
}) {
|
|
52
|
-
const
|
|
53
|
+
const u = i || n["aria-invalid"] === !0 || n["aria-invalid"] === "true", b = n["aria-required"] === !0 || n["aria-required"] === "true", g = n["aria-label"] || d || l || "Select an option", v = u ? "border-destructive-40 dark:border-destructive-40 focus-visible:border-destructive-40 dark:focus-visible:border-destructive-40 focus-visible:shadow-destructive data-[state=open]:border-destructive-40 dark:data-[state=open]:border-destructive-40 data-[state=open]:shadow-destructive" : "";
|
|
53
54
|
return /* @__PURE__ */ c(
|
|
54
55
|
o.Trigger,
|
|
55
56
|
{
|
|
56
57
|
...n,
|
|
57
|
-
"aria-invalid":
|
|
58
|
-
"aria-label":
|
|
59
|
-
"aria-required":
|
|
60
|
-
className: a(
|
|
58
|
+
"aria-invalid": u ? "true" : void 0,
|
|
59
|
+
"aria-label": g,
|
|
60
|
+
"aria-required": b ? "true" : void 0,
|
|
61
|
+
className: a(I(), v, e),
|
|
61
62
|
"data-hook": s,
|
|
62
63
|
"data-slot": "select-trigger",
|
|
63
64
|
children: [
|
|
64
65
|
r,
|
|
65
|
-
/* @__PURE__ */ t(o.Icon, { asChild: !0, children: /* @__PURE__ */ t(
|
|
66
|
+
/* @__PURE__ */ t(o.Icon, { asChild: !0, children: /* @__PURE__ */ t(m, { className: "text-muted-foreground" }) })
|
|
66
67
|
]
|
|
67
68
|
}
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
|
-
|
|
71
|
-
function
|
|
71
|
+
j.displayName = "SelectTrigger";
|
|
72
|
+
function B({
|
|
72
73
|
className: e,
|
|
73
74
|
children: r,
|
|
74
75
|
position: l = "popper",
|
|
75
76
|
...s
|
|
76
77
|
}) {
|
|
77
|
-
const i =
|
|
78
|
-
|
|
78
|
+
const i = h.useRef(null);
|
|
79
|
+
w(
|
|
79
80
|
() => i.current ? i.current.querySelectorAll('[data-slot="select-item"]').length >= 100 : !1,
|
|
80
81
|
`Select contains many items. For large lists (100+), consider using <Combobox> which supports search and filtering.
|
|
81
82
|
Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
82
83
|
[r]
|
|
83
84
|
);
|
|
84
|
-
const
|
|
85
|
+
const d = a(
|
|
85
86
|
// Base appearance
|
|
86
87
|
"relative z-50 overflow-hidden",
|
|
87
88
|
"min-w-[8rem]",
|
|
@@ -98,7 +99,7 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
98
99
|
"data-[side=left]:slide-in-from-right-2",
|
|
99
100
|
"data-[side=right]:slide-in-from-left-2",
|
|
100
101
|
"data-[side=top]:slide-in-from-bottom-2"
|
|
101
|
-
),
|
|
102
|
+
), n = l === "popper" && a(
|
|
102
103
|
"data-[side=bottom]:translate-y-1",
|
|
103
104
|
"data-[side=left]:-translate-x-1",
|
|
104
105
|
"data-[side=right]:translate-x-1",
|
|
@@ -107,12 +108,12 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
107
108
|
return /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ c(
|
|
108
109
|
o.Content,
|
|
109
110
|
{
|
|
110
|
-
className: a(
|
|
111
|
+
className: a(d, n, e),
|
|
111
112
|
"data-slot": "select-content",
|
|
112
113
|
position: l,
|
|
113
114
|
...s,
|
|
114
115
|
children: [
|
|
115
|
-
/* @__PURE__ */ t(
|
|
116
|
+
/* @__PURE__ */ t(p, {}),
|
|
116
117
|
/* @__PURE__ */ t(
|
|
117
118
|
o.Viewport,
|
|
118
119
|
{
|
|
@@ -124,13 +125,13 @@ Import: import { Combobox } from "@brightlocal/ui-components/combobox"`,
|
|
|
124
125
|
children: r
|
|
125
126
|
}
|
|
126
127
|
),
|
|
127
|
-
/* @__PURE__ */ t(
|
|
128
|
+
/* @__PURE__ */ t(f, {})
|
|
128
129
|
]
|
|
129
130
|
}
|
|
130
131
|
) });
|
|
131
132
|
}
|
|
132
|
-
|
|
133
|
-
function
|
|
133
|
+
B.displayName = "SelectContent";
|
|
134
|
+
function q({
|
|
134
135
|
className: e,
|
|
135
136
|
...r
|
|
136
137
|
}) {
|
|
@@ -146,8 +147,8 @@ function B({
|
|
|
146
147
|
}
|
|
147
148
|
);
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
-
function
|
|
150
|
+
q.displayName = "SelectLabel";
|
|
151
|
+
function D({
|
|
151
152
|
className: e,
|
|
152
153
|
children: r,
|
|
153
154
|
...l
|
|
@@ -174,14 +175,14 @@ function q({
|
|
|
174
175
|
"data-slot": "select-item",
|
|
175
176
|
...l,
|
|
176
177
|
children: [
|
|
177
|
-
/* @__PURE__ */ t("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(
|
|
178
|
+
/* @__PURE__ */ t("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(o.ItemIndicator, { children: /* @__PURE__ */ t(S, {}) }) }),
|
|
178
179
|
/* @__PURE__ */ t(o.ItemText, { children: r })
|
|
179
180
|
]
|
|
180
181
|
}
|
|
181
182
|
);
|
|
182
183
|
}
|
|
183
|
-
|
|
184
|
-
function
|
|
184
|
+
D.displayName = "SelectItem";
|
|
185
|
+
function R({
|
|
185
186
|
className: e,
|
|
186
187
|
...r
|
|
187
188
|
}) {
|
|
@@ -194,8 +195,8 @@ function D({
|
|
|
194
195
|
}
|
|
195
196
|
);
|
|
196
197
|
}
|
|
197
|
-
|
|
198
|
-
function
|
|
198
|
+
R.displayName = "SelectSeparator";
|
|
199
|
+
function p({
|
|
199
200
|
className: e,
|
|
200
201
|
...r
|
|
201
202
|
}) {
|
|
@@ -208,12 +209,12 @@ function m({
|
|
|
208
209
|
),
|
|
209
210
|
"data-slot": "select-scroll-up-button",
|
|
210
211
|
...r,
|
|
211
|
-
children: /* @__PURE__ */ t(
|
|
212
|
+
children: /* @__PURE__ */ t(x, {})
|
|
212
213
|
}
|
|
213
214
|
);
|
|
214
215
|
}
|
|
215
|
-
|
|
216
|
-
function
|
|
216
|
+
p.displayName = "SelectScrollUpButton";
|
|
217
|
+
function f({
|
|
217
218
|
className: e,
|
|
218
219
|
...r
|
|
219
220
|
}) {
|
|
@@ -226,20 +227,20 @@ function p({
|
|
|
226
227
|
),
|
|
227
228
|
"data-slot": "select-scroll-down-button",
|
|
228
229
|
...r,
|
|
229
|
-
children: /* @__PURE__ */ t(
|
|
230
|
+
children: /* @__PURE__ */ t(m, {})
|
|
230
231
|
}
|
|
231
232
|
);
|
|
232
233
|
}
|
|
233
|
-
|
|
234
|
+
f.displayName = "SelectScrollDownButton";
|
|
234
235
|
export {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
236
|
+
N as Select,
|
|
237
|
+
B as SelectContent,
|
|
238
|
+
k as SelectGroup,
|
|
239
|
+
D as SelectItem,
|
|
240
|
+
q as SelectLabel,
|
|
241
|
+
f as SelectScrollDownButton,
|
|
242
|
+
p as SelectScrollUpButton,
|
|
243
|
+
R as SelectSeparator,
|
|
244
|
+
j as SelectTrigger,
|
|
245
|
+
C as SelectValue
|
|
245
246
|
};
|
package/dist/separator.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),c=require("@brightlocal/ui-components/lib/utils");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const i=h(m),n=i.forwardRef(({className:t,orientation:e="horizontal",decorative:a=!0,dataHook:r,trackingEl:s,trackingLabel:l,...p},u)=>{const f=a?{role:"none"}:e==="vertical"?{"aria-orientation":"vertical",role:"separator"}:{};return i.createElement(e==="horizontal"?"hr":"div",{ref:u,className:c.cn("bg-border shrink-0",e==="horizontal"?"h-px w-full border-0":"h-full w-px",t),"data-hook":r,"data-orientation":e,"data-slot":"separator","data-tracking-el":s,"data-tracking-label":l,...f,...p})});n.displayName="Separator";const d=i.forwardRef(({className:t,children:e,dataHook:a,trackingEl:r,trackingLabel:s},l)=>o.jsxs("div",{ref:l,className:c.cn("flex items-center gap-2",t),"data-hook":a,"data-slot":"separator-with-text","data-tracking-el":r,"data-tracking-label":s,children:[o.jsx(n,{className:"flex-1"}),o.jsx("span",{className:"text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap",children:e}),o.jsx(n,{className:"flex-1"})]}));d.displayName="SeparatorWithText";exports.Separator=n;exports.SeparatorWithText=d;
|
package/dist/separator.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
2
|
/**
|
|
4
3
|
* Orientation variants for Separator
|
|
5
4
|
*/
|
|
@@ -7,7 +6,19 @@ export type SeparatorOrientation = "horizontal" | "vertical";
|
|
|
7
6
|
/**
|
|
8
7
|
* Props for the Separator component.
|
|
9
8
|
*/
|
|
10
|
-
interface SeparatorProps extends React.
|
|
9
|
+
interface SeparatorProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
10
|
+
/**
|
|
11
|
+
* Visual orientation of the separator.
|
|
12
|
+
* Horizontal renders a native `<hr>`, vertical renders a `<div>`.
|
|
13
|
+
* @default "horizontal"
|
|
14
|
+
*/
|
|
15
|
+
orientation?: SeparatorOrientation;
|
|
16
|
+
/**
|
|
17
|
+
* When true, the separator is purely decorative (role="none").
|
|
18
|
+
* When false, it carries separator semantics for assistive technology.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
decorative?: boolean;
|
|
11
22
|
/**
|
|
12
23
|
* Data hook for automated testing
|
|
13
24
|
*/
|
|
@@ -23,9 +34,10 @@ interface SeparatorProps extends React.ComponentProps<typeof SeparatorPrimitive.
|
|
|
23
34
|
}
|
|
24
35
|
/**
|
|
25
36
|
* Separator visually divides content using a horizontal or vertical line.
|
|
26
|
-
*
|
|
37
|
+
* Horizontal orientation renders a semantic `<hr>` element.
|
|
38
|
+
* Vertical orientation renders a `<div>` with appropriate ARIA attributes.
|
|
27
39
|
*/
|
|
28
|
-
declare const Separator: React.ForwardRefExoticComponent<
|
|
40
|
+
declare const Separator: React.ForwardRefExoticComponent<SeparatorProps & React.RefAttributes<HTMLElement>>;
|
|
29
41
|
/**
|
|
30
42
|
* Props for the SeparatorWithText component.
|
|
31
43
|
*/
|
package/dist/separator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7D;;GAEG;AACH,UAAU,cAAe,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IACpE;;;;OAIG;IACH,WAAW,CAAC,EAAE,oBAAoB,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,QAAA,MAAM,SAAS,oFAsCd,CAAC;AAIF;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,+FAoBrB,CAAC;AAIH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;AAExC,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC"}
|