@borisj74/bv-ds 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +178 -83
- package/dist/index.d.cts +82 -25
- package/dist/index.d.ts +82 -25
- package/dist/index.js +178 -83
- package/package.json +3 -2
- package/src/components/CalendarCell/CalendarCell.tsx +63 -10
- package/src/components/CalendarCell/index.ts +5 -1
- package/src/components/CalendarCellDayWeekView/CalendarCellDayWeekView.tsx +28 -2
- package/src/components/CalendarCellDayWeekView/index.ts +5 -1
- package/src/components/CalendarColumnHeader/CalendarColumnHeader.tsx +21 -5
- package/src/components/CalendarColumnHeader/index.ts +2 -0
- package/src/components/CalendarEvent/CalendarEvent.tsx +69 -14
- package/src/components/CalendarEvent/index.ts +6 -1
- package/src/components/CalendarHeader/CalendarHeader.tsx +5 -1
- package/src/components/CalendarRowLabel/CalendarRowLabel.tsx +5 -3
- package/src/components/CalendarTimemarker/CalendarTimemarker.tsx +8 -2
- package/src/components/CalendarTimemarker/index.ts +1 -0
- package/src/components/CalendarViewDropdown/CalendarViewDropdown.tsx +18 -2
- package/src/components/NavAccountCard/NavAccountCard.tsx +12 -18
- package/src/components/NavItemBase/NavItemBase.tsx +4 -7
- package/src/components/NavItemDropdownBase/NavItemDropdownBase.tsx +6 -7
- package/src/components/NavMenuButton/NavMenuButton.tsx +18 -12
- package/src/types/bv-ds-icons.d.ts +6 -0
package/dist/index.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React28 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
+
var bvDsIcons = require('@borisj74/bv-ds-icons');
|
|
5
6
|
|
|
6
7
|
function _interopNamespace(e) {
|
|
7
8
|
if (e && e.__esModule) return e;
|
|
@@ -6117,6 +6118,97 @@ function ButtonUtility({
|
|
|
6117
6118
|
) : null
|
|
6118
6119
|
] });
|
|
6119
6120
|
}
|
|
6121
|
+
var dotClasses = {
|
|
6122
|
+
neutral: "bg-utility-neutral-500",
|
|
6123
|
+
brand: "bg-utility-brand-500",
|
|
6124
|
+
emerald: "bg-utility-emerald-500",
|
|
6125
|
+
blue: "bg-utility-blue-500",
|
|
6126
|
+
indigo: "bg-utility-indigo-500",
|
|
6127
|
+
purple: "bg-utility-purple-500",
|
|
6128
|
+
pink: "bg-utility-pink-500",
|
|
6129
|
+
orange: "bg-utility-orange-500",
|
|
6130
|
+
amber: "bg-utility-amber-500"
|
|
6131
|
+
};
|
|
6132
|
+
var filledClasses = {
|
|
6133
|
+
neutral: "bg-utility-neutral-50 border-utility-neutral-200 text-utility-neutral-700",
|
|
6134
|
+
brand: "bg-utility-brand-50 border-utility-brand-200 text-utility-brand-700",
|
|
6135
|
+
emerald: "bg-utility-emerald-50 border-utility-emerald-200 text-utility-emerald-700",
|
|
6136
|
+
blue: "bg-utility-blue-50 border-utility-blue-200 text-utility-blue-700",
|
|
6137
|
+
indigo: "bg-utility-indigo-50 border-utility-indigo-200 text-utility-indigo-700",
|
|
6138
|
+
purple: "bg-utility-purple-50 border-utility-purple-200 text-utility-purple-700",
|
|
6139
|
+
pink: "bg-utility-pink-50 border-utility-pink-200 text-utility-pink-700",
|
|
6140
|
+
orange: "bg-utility-orange-50 border-utility-orange-200 text-utility-orange-700",
|
|
6141
|
+
amber: "bg-utility-amber-50 border-utility-amber-200 text-utility-amber-700"
|
|
6142
|
+
};
|
|
6143
|
+
var filledHoverClasses = {
|
|
6144
|
+
neutral: "bg-utility-neutral-100",
|
|
6145
|
+
brand: "bg-utility-brand-100",
|
|
6146
|
+
emerald: "bg-utility-emerald-100",
|
|
6147
|
+
blue: "bg-utility-blue-100",
|
|
6148
|
+
indigo: "bg-utility-indigo-100",
|
|
6149
|
+
purple: "bg-utility-purple-100",
|
|
6150
|
+
pink: "bg-utility-pink-100",
|
|
6151
|
+
orange: "bg-utility-orange-100",
|
|
6152
|
+
amber: "bg-utility-amber-100"
|
|
6153
|
+
};
|
|
6154
|
+
var timeClasses = {
|
|
6155
|
+
neutral: "text-utility-neutral-600",
|
|
6156
|
+
brand: "text-utility-brand-600",
|
|
6157
|
+
emerald: "text-utility-emerald-600",
|
|
6158
|
+
blue: "text-utility-blue-600",
|
|
6159
|
+
indigo: "text-utility-indigo-600",
|
|
6160
|
+
purple: "text-utility-purple-600",
|
|
6161
|
+
pink: "text-utility-pink-600",
|
|
6162
|
+
orange: "text-utility-orange-600",
|
|
6163
|
+
amber: "text-utility-amber-600"
|
|
6164
|
+
};
|
|
6165
|
+
function CalendarEvent({
|
|
6166
|
+
title,
|
|
6167
|
+
time: time2,
|
|
6168
|
+
color: color2 = "neutral",
|
|
6169
|
+
filled = false,
|
|
6170
|
+
breakpoint = "desktop",
|
|
6171
|
+
state = "default",
|
|
6172
|
+
className
|
|
6173
|
+
}) {
|
|
6174
|
+
if (breakpoint === "mobile") {
|
|
6175
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6176
|
+
"span",
|
|
6177
|
+
{
|
|
6178
|
+
className: clsx_default("inline-block size-2 rounded-full", dotClasses[color2], className),
|
|
6179
|
+
role: "img",
|
|
6180
|
+
"aria-label": time2 ? `${title}, ${time2}` : title
|
|
6181
|
+
}
|
|
6182
|
+
);
|
|
6183
|
+
}
|
|
6184
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6185
|
+
"div",
|
|
6186
|
+
{
|
|
6187
|
+
className: clsx_default(
|
|
6188
|
+
"flex w-full items-center gap-md rounded-sm border px-md py-xs font-body text-xs",
|
|
6189
|
+
filled ? clsx_default(filledClasses[color2], state === "hover" && filledHoverClasses[color2]) : clsx_default(
|
|
6190
|
+
"border-border-secondary bg-bg-primary text-text-secondary",
|
|
6191
|
+
state === "hover" && "bg-bg-primary-hover"
|
|
6192
|
+
),
|
|
6193
|
+
className
|
|
6194
|
+
),
|
|
6195
|
+
children: [
|
|
6196
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("size-2 shrink-0 rounded-full", dotClasses[color2]), "aria-hidden": true }),
|
|
6197
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: title }),
|
|
6198
|
+
time2 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6199
|
+
"span",
|
|
6200
|
+
{
|
|
6201
|
+
className: clsx_default(
|
|
6202
|
+
"ml-auto shrink-0 font-normal",
|
|
6203
|
+
filled ? timeClasses[color2] : "text-text-tertiary"
|
|
6204
|
+
),
|
|
6205
|
+
children: time2
|
|
6206
|
+
}
|
|
6207
|
+
) : null
|
|
6208
|
+
]
|
|
6209
|
+
}
|
|
6210
|
+
);
|
|
6211
|
+
}
|
|
6120
6212
|
function PlusIcon2() {
|
|
6121
6213
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6122
6214
|
"path",
|
|
@@ -6131,19 +6223,26 @@ function PlusIcon2() {
|
|
|
6131
6223
|
}
|
|
6132
6224
|
function CalendarCell({
|
|
6133
6225
|
date: date2,
|
|
6226
|
+
events,
|
|
6134
6227
|
children,
|
|
6135
6228
|
moreCount,
|
|
6136
|
-
|
|
6229
|
+
isToday,
|
|
6230
|
+
isSelected = false,
|
|
6231
|
+
isDisabled,
|
|
6137
6232
|
current = false,
|
|
6233
|
+
muted = false,
|
|
6234
|
+
breakpoint = "desktop",
|
|
6138
6235
|
onAdd,
|
|
6139
6236
|
className
|
|
6140
6237
|
}) {
|
|
6238
|
+
const today = isToday ?? current;
|
|
6239
|
+
const disabled = isDisabled ?? muted;
|
|
6141
6240
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6142
6241
|
"div",
|
|
6143
6242
|
{
|
|
6144
6243
|
className: clsx_default(
|
|
6145
6244
|
"group relative flex min-h-[120px] flex-col gap-xs bg-bg-primary p-md font-body",
|
|
6146
|
-
|
|
6245
|
+
disabled && "bg-bg-secondary",
|
|
6147
6246
|
className
|
|
6148
6247
|
),
|
|
6149
6248
|
children: [
|
|
@@ -6151,12 +6250,31 @@ function CalendarCell({
|
|
|
6151
6250
|
"span",
|
|
6152
6251
|
{
|
|
6153
6252
|
className: clsx_default(
|
|
6154
|
-
"text-xs font-semibold",
|
|
6155
|
-
|
|
6253
|
+
"flex size-6 items-center justify-center text-xs font-semibold",
|
|
6254
|
+
today ? "rounded-full bg-bg-brand-solid text-white" : isSelected ? "rounded-full bg-bg-secondary text-text-secondary" : disabled ? "text-text-quaternary" : "text-text-secondary"
|
|
6156
6255
|
),
|
|
6157
6256
|
children: date2
|
|
6158
6257
|
}
|
|
6159
6258
|
),
|
|
6259
|
+
events && events.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6260
|
+
"div",
|
|
6261
|
+
{
|
|
6262
|
+
className: clsx_default(
|
|
6263
|
+
breakpoint === "mobile" ? "flex flex-row flex-wrap gap-xxs" : "flex flex-col gap-xs"
|
|
6264
|
+
),
|
|
6265
|
+
children: events.map((ev, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
6266
|
+
CalendarEvent,
|
|
6267
|
+
{
|
|
6268
|
+
title: ev.title,
|
|
6269
|
+
time: ev.time,
|
|
6270
|
+
color: ev.color,
|
|
6271
|
+
filled: true,
|
|
6272
|
+
breakpoint
|
|
6273
|
+
},
|
|
6274
|
+
i
|
|
6275
|
+
))
|
|
6276
|
+
}
|
|
6277
|
+
) : null,
|
|
6160
6278
|
children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-xs", children }) : null,
|
|
6161
6279
|
moreCount && moreCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-text-tertiary", children: [
|
|
6162
6280
|
moreCount,
|
|
@@ -6176,6 +6294,13 @@ function CalendarCell({
|
|
|
6176
6294
|
}
|
|
6177
6295
|
);
|
|
6178
6296
|
}
|
|
6297
|
+
var heightClasses = {
|
|
6298
|
+
empty: "h-[48px]",
|
|
6299
|
+
"30min": "h-[48px]",
|
|
6300
|
+
"60min": "h-[96px]",
|
|
6301
|
+
"90min": "h-[144px]",
|
|
6302
|
+
"120min": "h-[192px]"
|
|
6303
|
+
};
|
|
6179
6304
|
function PlusIcon3() {
|
|
6180
6305
|
return /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6181
6306
|
"path",
|
|
@@ -6189,6 +6314,8 @@ function PlusIcon3() {
|
|
|
6189
6314
|
) });
|
|
6190
6315
|
}
|
|
6191
6316
|
function CalendarCellDayWeekView({
|
|
6317
|
+
type,
|
|
6318
|
+
state = "default",
|
|
6192
6319
|
children,
|
|
6193
6320
|
onAdd,
|
|
6194
6321
|
muted = false,
|
|
@@ -6198,8 +6325,9 @@ function CalendarCellDayWeekView({
|
|
|
6198
6325
|
"div",
|
|
6199
6326
|
{
|
|
6200
6327
|
className: clsx_default(
|
|
6201
|
-
"group relative
|
|
6202
|
-
|
|
6328
|
+
"group relative border-b border-border-secondary p-xs font-body transition-colors hover:bg-bg-secondary",
|
|
6329
|
+
type ? heightClasses[type] : "min-h-[64px]",
|
|
6330
|
+
muted ? "bg-bg-secondary" : state === "hover" ? "bg-bg-secondary" : "bg-bg-primary",
|
|
6203
6331
|
className
|
|
6204
6332
|
),
|
|
6205
6333
|
children: [
|
|
@@ -6221,16 +6349,20 @@ function CalendarCellDayWeekView({
|
|
|
6221
6349
|
function CalendarColumnHeader({
|
|
6222
6350
|
weekday,
|
|
6223
6351
|
date: date2,
|
|
6352
|
+
type,
|
|
6224
6353
|
current = false,
|
|
6225
6354
|
orientation = "vertical",
|
|
6355
|
+
breakpoint = "desktop",
|
|
6226
6356
|
className
|
|
6227
6357
|
}) {
|
|
6358
|
+
const state = type ?? (current ? "selected" : "default");
|
|
6228
6359
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6229
6360
|
"div",
|
|
6230
6361
|
{
|
|
6231
6362
|
className: clsx_default(
|
|
6232
6363
|
"flex items-center justify-center gap-md py-md font-body",
|
|
6233
6364
|
orientation === "vertical" && "flex-col gap-xs",
|
|
6365
|
+
breakpoint === "desktop" && "w-[160px]",
|
|
6234
6366
|
className
|
|
6235
6367
|
),
|
|
6236
6368
|
children: [
|
|
@@ -6240,9 +6372,11 @@ function CalendarColumnHeader({
|
|
|
6240
6372
|
{
|
|
6241
6373
|
className: clsx_default(
|
|
6242
6374
|
"flex items-center justify-center text-xs font-semibold",
|
|
6243
|
-
|
|
6375
|
+
state === "selected" && "size-6 rounded-full bg-bg-brand-solid text-white",
|
|
6376
|
+
state === "today" && "border-b-2 border-border-brand pb-xxs text-text-brand-secondary",
|
|
6377
|
+
state === "default" && "text-text-secondary"
|
|
6244
6378
|
),
|
|
6245
|
-
"aria-current":
|
|
6379
|
+
"aria-current": state !== "default" ? "date" : void 0,
|
|
6246
6380
|
children: date2
|
|
6247
6381
|
}
|
|
6248
6382
|
)
|
|
@@ -6265,51 +6399,6 @@ function CalendarDateIcon({ month, day, className }) {
|
|
|
6265
6399
|
}
|
|
6266
6400
|
);
|
|
6267
6401
|
}
|
|
6268
|
-
var dotClasses = {
|
|
6269
|
-
neutral: "bg-utility-neutral-500",
|
|
6270
|
-
brand: "bg-utility-brand-500",
|
|
6271
|
-
emerald: "bg-utility-emerald-500",
|
|
6272
|
-
blue: "bg-utility-blue-500",
|
|
6273
|
-
indigo: "bg-utility-indigo-500",
|
|
6274
|
-
purple: "bg-utility-purple-500",
|
|
6275
|
-
pink: "bg-utility-pink-500",
|
|
6276
|
-
orange: "bg-utility-orange-500",
|
|
6277
|
-
amber: "bg-utility-amber-500"
|
|
6278
|
-
};
|
|
6279
|
-
var filledClasses = {
|
|
6280
|
-
neutral: "bg-utility-neutral-100 text-utility-neutral-700",
|
|
6281
|
-
brand: "bg-utility-brand-100 text-utility-brand-700",
|
|
6282
|
-
emerald: "bg-utility-emerald-100 text-utility-emerald-700",
|
|
6283
|
-
blue: "bg-utility-blue-100 text-utility-blue-700",
|
|
6284
|
-
indigo: "bg-utility-indigo-100 text-utility-indigo-700",
|
|
6285
|
-
purple: "bg-utility-purple-100 text-utility-purple-700",
|
|
6286
|
-
pink: "bg-utility-pink-100 text-utility-pink-700",
|
|
6287
|
-
orange: "bg-utility-orange-100 text-utility-orange-700",
|
|
6288
|
-
amber: "bg-utility-amber-100 text-utility-amber-700"
|
|
6289
|
-
};
|
|
6290
|
-
function CalendarEvent({
|
|
6291
|
-
title,
|
|
6292
|
-
time: time2,
|
|
6293
|
-
color: color2 = "neutral",
|
|
6294
|
-
filled = false,
|
|
6295
|
-
className
|
|
6296
|
-
}) {
|
|
6297
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6298
|
-
"div",
|
|
6299
|
-
{
|
|
6300
|
-
className: clsx_default(
|
|
6301
|
-
"flex w-full items-center gap-md rounded-sm px-md py-xs font-body text-xs",
|
|
6302
|
-
filled ? filledClasses[color2] : "border border-border-secondary bg-bg-primary text-text-secondary",
|
|
6303
|
-
className
|
|
6304
|
-
),
|
|
6305
|
-
children: [
|
|
6306
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("size-2 shrink-0 rounded-full", dotClasses[color2]), "aria-hidden": true }),
|
|
6307
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-semibold", children: title }),
|
|
6308
|
-
time2 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("ml-auto shrink-0 font-normal", !filled && "text-text-tertiary"), children: time2 }) : null
|
|
6309
|
-
]
|
|
6310
|
-
}
|
|
6311
|
-
);
|
|
6312
|
-
}
|
|
6313
6402
|
var accentClasses = {
|
|
6314
6403
|
neutral: "border-l-utility-neutral-500",
|
|
6315
6404
|
brand: "border-l-utility-brand-500",
|
|
@@ -6376,11 +6465,13 @@ function CalendarEventDayWeekView({
|
|
|
6376
6465
|
function CalendarHeader({
|
|
6377
6466
|
title,
|
|
6378
6467
|
range: range6,
|
|
6468
|
+
supportingText,
|
|
6379
6469
|
badge,
|
|
6380
6470
|
dateIcon,
|
|
6381
6471
|
actions,
|
|
6382
6472
|
className
|
|
6383
6473
|
}) {
|
|
6474
|
+
const subtitle = range6 ?? supportingText;
|
|
6384
6475
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6385
6476
|
"div",
|
|
6386
6477
|
{
|
|
@@ -6396,7 +6487,7 @@ function CalendarHeader({
|
|
|
6396
6487
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold text-text-primary", children: title }),
|
|
6397
6488
|
badge
|
|
6398
6489
|
] }),
|
|
6399
|
-
|
|
6490
|
+
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-text-tertiary", children: subtitle }) : null
|
|
6400
6491
|
] })
|
|
6401
6492
|
] }),
|
|
6402
6493
|
actions ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-md", children: actions }) : null
|
|
@@ -6404,7 +6495,7 @@ function CalendarHeader({
|
|
|
6404
6495
|
}
|
|
6405
6496
|
);
|
|
6406
6497
|
}
|
|
6407
|
-
function CalendarRowLabel({ label, className }) {
|
|
6498
|
+
function CalendarRowLabel({ label, time: time2, className }) {
|
|
6408
6499
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6409
6500
|
"div",
|
|
6410
6501
|
{
|
|
@@ -6412,7 +6503,7 @@ function CalendarRowLabel({ label, className }) {
|
|
|
6412
6503
|
"pr-md text-right text-xs font-medium text-text-quaternary font-body",
|
|
6413
6504
|
className
|
|
6414
6505
|
),
|
|
6415
|
-
children: label
|
|
6506
|
+
children: time2 ?? label
|
|
6416
6507
|
}
|
|
6417
6508
|
);
|
|
6418
6509
|
}
|
|
@@ -6422,15 +6513,17 @@ var Label = ({ time: time2 }) => /* @__PURE__ */ jsxRuntime.jsx("span", { classN
|
|
|
6422
6513
|
function CalendarTimemarker({
|
|
6423
6514
|
time: time2,
|
|
6424
6515
|
align = "left",
|
|
6516
|
+
breakpoint = "desktop",
|
|
6425
6517
|
className
|
|
6426
6518
|
}) {
|
|
6519
|
+
const showLabel = breakpoint === "desktop";
|
|
6427
6520
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx_default("flex w-full items-center gap-xs font-body", className), children: align === "center" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6428
6521
|
/* @__PURE__ */ jsxRuntime.jsx(Dot, {}),
|
|
6429
6522
|
/* @__PURE__ */ jsxRuntime.jsx(Line, {}),
|
|
6430
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { time: time2 }),
|
|
6523
|
+
showLabel ? /* @__PURE__ */ jsxRuntime.jsx(Label, { time: time2 }) : null,
|
|
6431
6524
|
/* @__PURE__ */ jsxRuntime.jsx(Line, {})
|
|
6432
6525
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6433
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { time: time2 }),
|
|
6526
|
+
showLabel ? /* @__PURE__ */ jsxRuntime.jsx(Label, { time: time2 }) : null,
|
|
6434
6527
|
/* @__PURE__ */ jsxRuntime.jsx(Dot, {}),
|
|
6435
6528
|
/* @__PURE__ */ jsxRuntime.jsx(Line, {})
|
|
6436
6529
|
] }) });
|
|
@@ -6455,10 +6548,19 @@ function Chevron2() {
|
|
|
6455
6548
|
function CalendarViewDropdown({
|
|
6456
6549
|
value,
|
|
6457
6550
|
onChange,
|
|
6551
|
+
onSelect,
|
|
6552
|
+
open: openProp,
|
|
6553
|
+
onOpenChange,
|
|
6458
6554
|
options = DEFAULT_OPTIONS,
|
|
6459
6555
|
className
|
|
6460
6556
|
}) {
|
|
6461
|
-
const [
|
|
6557
|
+
const [internalOpen, setInternalOpen] = React28.useState(false);
|
|
6558
|
+
const isControlled = openProp !== void 0;
|
|
6559
|
+
const open = isControlled ? openProp : internalOpen;
|
|
6560
|
+
const setOpen = (next) => {
|
|
6561
|
+
if (!isControlled) setInternalOpen(next);
|
|
6562
|
+
onOpenChange?.(next);
|
|
6563
|
+
};
|
|
6462
6564
|
const selected = options.find((o) => o.value === value) ?? options[0];
|
|
6463
6565
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("relative inline-block font-body", className), children: [
|
|
6464
6566
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -6467,7 +6569,7 @@ function CalendarViewDropdown({
|
|
|
6467
6569
|
type: "button",
|
|
6468
6570
|
"aria-haspopup": "listbox",
|
|
6469
6571
|
"aria-expanded": open,
|
|
6470
|
-
onClick: () => setOpen(
|
|
6572
|
+
onClick: () => setOpen(!open),
|
|
6471
6573
|
className: "inline-flex items-center gap-md rounded-md border border-border-primary bg-bg-primary px-lg py-md text-sm font-semibold text-text-secondary shadow-skeuomorphic transition-colors hover:bg-bg-primary-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-brand focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
6472
6574
|
children: [
|
|
6473
6575
|
selected.label,
|
|
@@ -6488,6 +6590,7 @@ function CalendarViewDropdown({
|
|
|
6488
6590
|
type: "button",
|
|
6489
6591
|
onClick: () => {
|
|
6490
6592
|
onChange?.(opt.value);
|
|
6593
|
+
onSelect?.(opt.value);
|
|
6491
6594
|
setOpen(false);
|
|
6492
6595
|
},
|
|
6493
6596
|
className: "flex w-full items-center gap-md rounded-sm px-md py-xs text-sm font-medium text-text-secondary transition-colors hover:bg-bg-primary-hover",
|
|
@@ -31854,17 +31957,7 @@ function MultiSelect({
|
|
|
31854
31957
|
hint && /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("text-sm", invalid ? "text-text-error-primary" : "text-text-tertiary"), children: hint })
|
|
31855
31958
|
] });
|
|
31856
31959
|
}
|
|
31857
|
-
var
|
|
31858
|
-
var LogOut = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
31859
|
-
"path",
|
|
31860
|
-
{
|
|
31861
|
-
d: "M10.67 11.33 14 8m0 0-3.33-3.33M14 8H6M6 2H4.67c-.93 0-1.4 0-1.76.18-.31.16-.57.42-.73.73C2 3.27 2 3.73 2 4.67v6.66c0 .94 0 1.4.18 1.76.16.31.42.57.73.73.36.18.83.18 1.76.18H6",
|
|
31862
|
-
stroke: "currentColor",
|
|
31863
|
-
strokeWidth: "1.33",
|
|
31864
|
-
strokeLinecap: "round",
|
|
31865
|
-
strokeLinejoin: "round"
|
|
31866
|
-
}
|
|
31867
|
-
) });
|
|
31960
|
+
var IconBox16 = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "overflow-clip relative shrink-0 size-[16px] flex items-center justify-center", children });
|
|
31868
31961
|
var LayeredAvatar = ({ src, online }) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative inline-flex size-10 shrink-0 rounded-full border-[0.75px] border-border-secondary-alt bg-bg-primary p-[1px] shadow-xs", children: [
|
|
31869
31962
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-full overflow-hidden rounded-full border-[0.5px] border-[rgba(0,0,0,0.16)]", children: /* @__PURE__ */ jsxRuntime.jsx("img", { src, alt: "", className: "size-full rounded-full object-cover" }) }),
|
|
31870
31963
|
online !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -31920,7 +32013,7 @@ function NavAccountCard({
|
|
|
31920
32013
|
onClick: onSignOut,
|
|
31921
32014
|
"aria-label": "Sign out",
|
|
31922
32015
|
className: "absolute right-0 top-[15px] flex items-center justify-center rounded-sm p-sm text-fg-quaternary transition-colors hover:text-fg-quaternary-hover",
|
|
31923
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32016
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconBox16, { children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.LogOut01, { className: "w-full h-full" }) })
|
|
31924
32017
|
}
|
|
31925
32018
|
)
|
|
31926
32019
|
]
|
|
@@ -31943,7 +32036,7 @@ function NavAccountCard({
|
|
|
31943
32036
|
"absolute right-[7px] top-[7px] flex items-center justify-center rounded-sm p-sm text-fg-quaternary",
|
|
31944
32037
|
open && "bg-bg-primary-hover"
|
|
31945
32038
|
),
|
|
31946
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32039
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconBox16, { children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ChevronSelectorVertical, { className: "w-full h-full" }) })
|
|
31947
32040
|
}
|
|
31948
32041
|
)
|
|
31949
32042
|
]
|
|
@@ -32084,7 +32177,6 @@ function NavFeaturedCard({
|
|
|
32084
32177
|
}
|
|
32085
32178
|
);
|
|
32086
32179
|
}
|
|
32087
|
-
var ChevronDown2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.33", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32088
32180
|
function NavItemBase({
|
|
32089
32181
|
current = false,
|
|
32090
32182
|
icon,
|
|
@@ -32119,14 +32211,13 @@ function NavItemBase({
|
|
|
32119
32211
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-semibold text-text-secondary", children: label })
|
|
32120
32212
|
] }),
|
|
32121
32213
|
badge != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 rounded-full border border-utility-neutral-200 bg-utility-neutral-50 px-md py-xxs text-xs font-medium text-utility-neutral-700", children: badge }),
|
|
32122
|
-
trailingChevron && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32214
|
+
trailingChevron && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "overflow-clip relative shrink-0 size-[16px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.ChevronDown, { className: "w-full h-full" }) }) })
|
|
32123
32215
|
]
|
|
32124
32216
|
}
|
|
32125
32217
|
)
|
|
32126
32218
|
}
|
|
32127
32219
|
);
|
|
32128
32220
|
}
|
|
32129
|
-
var Chevron5 = ({ up }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 16 16", fill: "none", className: "size-4", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: up ? "M4 10l4-4 4 4" : "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.33", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32130
32221
|
function NavItemDropdownBase({
|
|
32131
32222
|
current = false,
|
|
32132
32223
|
open = false,
|
|
@@ -32158,7 +32249,12 @@ function NavItemDropdownBase({
|
|
|
32158
32249
|
icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-5 shrink-0 items-center justify-center text-fg-quaternary [&>svg]:size-5", children: icon }),
|
|
32159
32250
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-left text-sm font-semibold text-text-secondary", children: label })
|
|
32160
32251
|
] }),
|
|
32161
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32252
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-fg-quaternary", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "overflow-clip relative shrink-0 size-[16px] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32253
|
+
bvDsIcons.ChevronDown,
|
|
32254
|
+
{
|
|
32255
|
+
className: clsx_default("w-full h-full transition-transform", open && "rotate-180")
|
|
32256
|
+
}
|
|
32257
|
+
) }) })
|
|
32162
32258
|
]
|
|
32163
32259
|
}
|
|
32164
32260
|
)
|
|
@@ -32167,8 +32263,7 @@ function NavItemDropdownBase({
|
|
|
32167
32263
|
open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col pb-xs", children })
|
|
32168
32264
|
] });
|
|
32169
32265
|
}
|
|
32170
|
-
var
|
|
32171
|
-
var XClose4 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15 5 5 15M5 5l10 10", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32266
|
+
var IconBox = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "overflow-clip relative shrink-0 size-[20px] flex items-center justify-center", children });
|
|
32172
32267
|
function NavMenuButton({
|
|
32173
32268
|
opened = false,
|
|
32174
32269
|
className,
|
|
@@ -32187,7 +32282,7 @@ function NavMenuButton({
|
|
|
32187
32282
|
className
|
|
32188
32283
|
),
|
|
32189
32284
|
...rest,
|
|
32190
|
-
children: opened ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-70", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32285
|
+
children: opened ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "opacity-70", children: /* @__PURE__ */ jsxRuntime.jsx(IconBox, { children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.XClose, { className: "w-full h-full" }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(IconBox, { children: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Menu02, { className: "w-full h-full" }) })
|
|
32191
32286
|
}
|
|
32192
32287
|
);
|
|
32193
32288
|
}
|
|
@@ -32275,7 +32370,7 @@ function NumberInput({
|
|
|
32275
32370
|
const inc = () => set2(value + step);
|
|
32276
32371
|
const Minus = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32277
32372
|
const Plus = /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 20 20", fill: "none", className: "size-5", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 4.167v11.666M4.167 10h11.666", stroke: "currentColor", strokeWidth: "1.67", strokeLinecap: "round" }) });
|
|
32278
|
-
const
|
|
32373
|
+
const Chevron5 = ({ up }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 12 12", fill: "none", className: clsx_default("size-3", up && "rotate-180"), "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 4.5 6 7.5 9 4.5", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
32279
32374
|
const numberEl = /* @__PURE__ */ jsxRuntime.jsx(
|
|
32280
32375
|
"input",
|
|
32281
32376
|
{
|
|
@@ -32301,9 +32396,9 @@ function NumberInput({
|
|
|
32301
32396
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default(boxClasses(destructive), "gap-0 overflow-hidden p-0"), children: [
|
|
32302
32397
|
numberEl,
|
|
32303
32398
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col self-stretch border-l border-border-primary", children: [
|
|
32304
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: inc, disabled, "aria-label": "Increase", className: "flex flex-1 items-center justify-center px-md text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32399
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: inc, disabled, "aria-label": "Increase", className: "flex flex-1 items-center justify-center px-md text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(Chevron5, { up: true }) }),
|
|
32305
32400
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-px w-full bg-border-primary" }),
|
|
32306
|
-
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: dec, disabled, "aria-label": "Decrease", className: "flex flex-1 items-center justify-center px-md text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32401
|
+
/* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: dec, disabled, "aria-label": "Decrease", className: "flex flex-1 items-center justify-center px-md text-fg-quaternary hover:bg-bg-primary-hover disabled:opacity-60", children: /* @__PURE__ */ jsxRuntime.jsx(Chevron5, { up: false }) })
|
|
32307
32402
|
] })
|
|
32308
32403
|
] });
|
|
32309
32404
|
return /* @__PURE__ */ jsxRuntime.jsx(FieldWrapper, { label, required, hint, destructive, className, children: box });
|