@olundot/ui 0.20.0-next.10 → 0.20.0-next.11
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/CHANGELOG.md +22 -0
- package/dist/index.d.ts +36 -24
- package/dist/index.js +156 -43
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @olundot/ui
|
|
2
2
|
|
|
3
|
+
## 0.20.0-next.11
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 708df3d: 떠 있는 `BulkActionBar`(`placement="floating"`, 기본값)를 알약 띠에서 카드로 바꾼다. 화면 폭과 관계없이 모양이 하나다.
|
|
8
|
+
|
|
9
|
+
- 1행: 개수(왼쪽, `role="status"` 그대로)와 선택 해제 ✕(오른쪽, ghost `IconButton` md). 2행: `summary`(있을 때만, 카드 안쪽 폭 전체, `keep-all`로 줄 바꿈, 자르지 않음). 3행: 작업 버튼(오른쪽 맞춤, 넘치면 다음 줄로 감싸며 오른쪽 맞춤 유지).
|
|
10
|
+
- 작업 버튼이 `Button` `appearance="outline"` `size="sm"`(30px)이 된다. 일반은 outline neutral, `variant: "destructive"`는 outline danger, 비활성은 Button의 disabled 꼴이다. 아이콘은 라벨 앞 그대로다. 터치 영역은 위아래로 4px씩만 넓혀(38px) 줄바꿈된 줄과 겹치지 않는다.
|
|
11
|
+
- 간격: 안쪽 여백 위 8 · 좌우 16 · 아래 12, 1행 32, 행 사이 8, 작업 줄 위 12, 버튼 사이 8. 모서리 `--radius-xl`. 폭 `min(360px, 자리 − 32px)`. 구분선이 없다.
|
|
12
|
+
- DOM 순서는 개수 → 작업 → ✕ 그대로다. ✕는 1행 오른쪽에 그려지지만 Tab으로는 맨 뒤다.
|
|
13
|
+
- 카드가 떠 있는 동안 문서 루트에 `--olun-bulk-bar-offset`(카드 높이 + 아래 간격 `16px + env(safe-area-inset-bottom)`)을 둔다. 언마운트, count 0으로 숨김, 높이 0(`display: none`)이면 지운다. 카드가 여럿이면 가장 큰 값이다.
|
|
14
|
+
- `ToastViewport`가 이 값보다 8px 위에 뜬다(값이 없으면 예전처럼 아래 24px).
|
|
15
|
+
- `DataLayout`의 `bulkBar` 자리가 아래 16px에 `env(safe-area-inset-bottom)`을 더한다. 떠 있는 카드와 같은 간격이다.
|
|
16
|
+
|
|
17
|
+
호환성 영향:
|
|
18
|
+
|
|
19
|
+
- floating에서 `trailing`을 받지 않는다. 타입에서 막히고(`placement`가 `"inline"`일 때만 허용), 타입을 우회해 넘기면 그리지 않고 개발 모드에서 경고를 한 번 낸다. 편집·완료 같은 컨트롤은 도구 줄 오른쪽 끝에 둔다. `placement="inline"`의 `trailing`은 그대로다.
|
|
20
|
+
- `BulkActionBarProps`가 `placement` 유니언 타입이 되어 `interface X extends BulkActionBarProps`가 타입 오류를 낸다. `type X = BulkActionBarProps & { … }`로 바꾼다.
|
|
21
|
+
- floating에서 `data-slot="bulk-action-bar-divider"`와 `data-slot="bulk-action-bar-clear"`가 없어진다. ✕는 `IconButton`의 `data-slot="icon-button"`이고 `aria-label="선택 해제"`로 찾는다. 작업 버튼의 `data-slot="bulk-action-bar-action"`과 `data-variant`는 그대로다.
|
|
22
|
+
- 카드 높이가 예전 알약(약 42px)보다 크다. 목록 아래 여백을 카드 높이에 맞추거나 `--olun-bulk-bar-offset`을 쓴다.
|
|
23
|
+
- `placement="inline"`(사용 중단 예정)은 바뀌지 않는다.
|
|
24
|
+
|
|
3
25
|
## 0.20.0-next.10
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1238,21 +1238,17 @@ interface BulkActionBarAction {
|
|
|
1238
1238
|
/** Disabled reason tooltip. */
|
|
1239
1239
|
title?: string;
|
|
1240
1240
|
}
|
|
1241
|
-
interface
|
|
1241
|
+
interface BulkActionBarBaseProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
1242
1242
|
count: number;
|
|
1243
1243
|
actions: BulkActionBarAction[];
|
|
1244
1244
|
onClear: () => void;
|
|
1245
1245
|
emptyHint?: React.ReactNode;
|
|
1246
|
-
/**
|
|
1247
|
-
* `floating` (default) — pill stuck to the bottom of the list.
|
|
1248
|
-
* `inline` — full-width band stuck to the top, placed where the status line sits
|
|
1249
|
-
* under the toolbar. Render it BEFORE the list so it comes first in tab order.
|
|
1250
|
-
* Deprecated: `inline` is removed in the next minor.
|
|
1251
|
-
*/
|
|
1252
|
-
placement?: "floating" | "inline";
|
|
1253
1246
|
/** Count unit — `12명 선택됨`. Defaults to `개`. */
|
|
1254
1247
|
unit?: string;
|
|
1255
|
-
/**
|
|
1248
|
+
/**
|
|
1249
|
+
* Under the count in the floating card, next to it inline — e.g. an "이 조건의 3,214명
|
|
1250
|
+
* 모두 선택" link or a cap notice. The card wraps it at full width, never clips it.
|
|
1251
|
+
*/
|
|
1256
1252
|
summary?: React.ReactNode;
|
|
1257
1253
|
/**
|
|
1258
1254
|
* Inline only: a shorter `summary` (e.g. "모두 선택") swapped in when the band is too
|
|
@@ -1266,28 +1262,44 @@ interface BulkActionBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1266
1262
|
* Takes precedence over `emptyHint`; with neither, the bar hides at count 0.
|
|
1267
1263
|
*/
|
|
1268
1264
|
idleContent?: React.ReactNode;
|
|
1265
|
+
}
|
|
1266
|
+
type BulkActionBarProps = BulkActionBarBaseProps & ({
|
|
1267
|
+
/** `floating` (default) — card stuck to the bottom of the list. */
|
|
1268
|
+
placement?: "floating";
|
|
1269
|
+
/** Not taken by the floating card: edit-mode controls go at the right end of the toolbar. */
|
|
1270
|
+
trailing?: never;
|
|
1271
|
+
} | {
|
|
1269
1272
|
/**
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
*
|
|
1273
|
+
* `inline` — full-width band stuck to the top, placed where the status line sits
|
|
1274
|
+
* under the toolbar. Render it BEFORE the list so it comes first in tab order.
|
|
1275
|
+
* Deprecated: `inline` is removed in the next minor.
|
|
1276
|
+
*/
|
|
1277
|
+
placement: "inline";
|
|
1278
|
+
/**
|
|
1279
|
+
* Inline only: after the clear (✕) button — e.g. an edit-mode "완료" button. On the
|
|
1280
|
+
* idle line it sits at the right end, outside the `role="status"` region, so it is
|
|
1281
|
+
* not re-read whenever `idleContent` changes.
|
|
1273
1282
|
*/
|
|
1274
1283
|
trailing?: React.ReactNode;
|
|
1275
|
-
}
|
|
1284
|
+
});
|
|
1276
1285
|
/**
|
|
1277
1286
|
* OLUN BulkActionBar — multi-select table/list actions.
|
|
1278
1287
|
*
|
|
1279
|
-
* placement="floating" (default) is the bottom
|
|
1280
|
-
*
|
|
1281
|
-
*
|
|
1282
|
-
*
|
|
1283
|
-
*
|
|
1284
|
-
*
|
|
1285
|
-
*
|
|
1288
|
+
* placement="floating" (default) is a card at the bottom of the list: the count
|
|
1289
|
+
* with the clear (✕) button on its right, `summary` under it at full width, then
|
|
1290
|
+
* the actions as outline sm Buttons aligned right, wrapping onto more lines when
|
|
1291
|
+
* they do not fit. `variant: "destructive"` is outline danger. The card is
|
|
1292
|
+
* min(360px, its slot − 32px) wide; while it is mounted the document root carries
|
|
1293
|
+
* `--olun-bulk-bar-offset` (its height + bottom gap) for toasts to clear it.
|
|
1294
|
+
* DOM order stays count → actions → ✕. It takes no `trailing`.
|
|
1295
|
+
*
|
|
1296
|
+
* placement="inline" (deprecated) is a top-sticky band that replaces the status
|
|
1297
|
+
* line under the toolbar, so it comes before the rows in tab order. The band and
|
|
1298
|
+
* the idle line are one 40px line: a long `summary` is clipped or swapped for
|
|
1299
|
+
* `compactSummary`, never wrapped. Its actions are borderless text/icon buttons
|
|
1300
|
+
* between hairline dividers; `trailing` follows the clear button.
|
|
1286
1301
|
*
|
|
1287
|
-
*
|
|
1288
|
-
* hairline dividers — not filled Button components. Destructive actions read as
|
|
1289
|
-
* error-toned text (var(--error)), not a red filled button. Two dividers are
|
|
1290
|
-
* always rendered: count↔actions and actions↔clear.
|
|
1302
|
+
* `unit` sets the count unit, `idleContent` shows while nothing is selected.
|
|
1291
1303
|
*
|
|
1292
1304
|
* @example
|
|
1293
1305
|
* <BulkActionBar count={sel.size} onClear={clear}
|
package/dist/index.js
CHANGED
|
@@ -2777,7 +2777,7 @@ var DataLayout = React17.forwardRef(
|
|
|
2777
2777
|
"div",
|
|
2778
2778
|
{
|
|
2779
2779
|
"data-slot": "data-layout-bulkbar",
|
|
2780
|
-
className: "pointer-events-none sticky bottom-[var(--space-4)] z-20 mt-[var(--space-2)] flex justify-center",
|
|
2780
|
+
className: "pointer-events-none sticky bottom-[calc(var(--space-4)+env(safe-area-inset-bottom))] z-20 mt-[var(--space-2)] flex justify-center",
|
|
2781
2781
|
children: /* @__PURE__ */ jsx16("div", { className: "flex w-full flex-col items-center [&>*:has([data-slot=bulk-action-bar])]:self-stretch [&>*:not(:has([data-slot=bulk-action-bar]))]:pointer-events-auto [&>*]:max-w-full [&_[data-slot=bulk-action-bar]]:pointer-events-auto", children: bulkBar })
|
|
2782
2782
|
}
|
|
2783
2783
|
) : null
|
|
@@ -7639,8 +7639,8 @@ function useVirtualWindow({
|
|
|
7639
7639
|
padBottom: 0
|
|
7640
7640
|
});
|
|
7641
7641
|
const desktopSize = React35.useRef(0);
|
|
7642
|
-
const
|
|
7643
|
-
|
|
7642
|
+
const cardHeights2 = React35.useRef(null);
|
|
7643
|
+
cardHeights2.current ??= new CardHeights();
|
|
7644
7644
|
const update = React35.useRef(() => void 0);
|
|
7645
7645
|
const reported = React35.useRef("");
|
|
7646
7646
|
const latest = React35.useRef({
|
|
@@ -7666,9 +7666,9 @@ function useVirtualWindow({
|
|
|
7666
7666
|
extent = uniformExtent(size);
|
|
7667
7667
|
} else {
|
|
7668
7668
|
if (list) {
|
|
7669
|
-
|
|
7669
|
+
cardHeights2.current.measure(list);
|
|
7670
7670
|
}
|
|
7671
|
-
const { offsets, estimate } =
|
|
7671
|
+
const { offsets, estimate } = cardHeights2.current.offsets(rowIds);
|
|
7672
7672
|
extent = measuredExtent(offsets, estimate);
|
|
7673
7673
|
}
|
|
7674
7674
|
latest.current = { count, layout, extent };
|
|
@@ -8348,6 +8348,35 @@ function ActionButton({ action }) {
|
|
|
8348
8348
|
}
|
|
8349
8349
|
);
|
|
8350
8350
|
}
|
|
8351
|
+
function CardActionButton({ action }) {
|
|
8352
|
+
const Icon = action.icon;
|
|
8353
|
+
return /* @__PURE__ */ jsxs35(
|
|
8354
|
+
Button,
|
|
8355
|
+
{
|
|
8356
|
+
appearance: "outline",
|
|
8357
|
+
tone: action.variant === "destructive" ? "danger" : "neutral",
|
|
8358
|
+
size: "sm",
|
|
8359
|
+
className: "before:-inset-y-[5px]",
|
|
8360
|
+
"data-slot": "bulk-action-bar-action",
|
|
8361
|
+
"data-variant": action.variant ?? "default",
|
|
8362
|
+
disabled: action.disabled,
|
|
8363
|
+
title: action.title,
|
|
8364
|
+
onClick: action.onClick,
|
|
8365
|
+
children: [
|
|
8366
|
+
Icon ? /* @__PURE__ */ jsx39(
|
|
8367
|
+
Icon,
|
|
8368
|
+
{
|
|
8369
|
+
"aria-hidden": "true",
|
|
8370
|
+
"data-slot": "bulk-action-bar-action-icon",
|
|
8371
|
+
size: 16,
|
|
8372
|
+
strokeWidth: 1.75
|
|
8373
|
+
}
|
|
8374
|
+
) : null,
|
|
8375
|
+
action.label
|
|
8376
|
+
]
|
|
8377
|
+
}
|
|
8378
|
+
);
|
|
8379
|
+
}
|
|
8351
8380
|
function Divider() {
|
|
8352
8381
|
return /* @__PURE__ */ jsx39(
|
|
8353
8382
|
"span",
|
|
@@ -8390,24 +8419,24 @@ function ClearButton({ onClear }) {
|
|
|
8390
8419
|
}
|
|
8391
8420
|
);
|
|
8392
8421
|
}
|
|
8422
|
+
var CLEAR_CLEARANCE = 32;
|
|
8393
8423
|
var INLINE_HEIGHT = 40;
|
|
8394
8424
|
var HIT_AREA = 44;
|
|
8395
8425
|
var HIT_INSET = 8;
|
|
8426
|
+
var FLOATING_BOTTOM = "calc(var(--space-4) + env(safe-area-inset-bottom))";
|
|
8396
8427
|
var floatingStyle = {
|
|
8397
8428
|
position: "sticky",
|
|
8398
|
-
bottom:
|
|
8429
|
+
bottom: FLOATING_BOTTOM,
|
|
8399
8430
|
zIndex: 1100,
|
|
8400
8431
|
margin: "0 auto",
|
|
8401
8432
|
display: "flex",
|
|
8402
|
-
|
|
8403
|
-
width: "
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
gap: "var(--space-2)",
|
|
8407
|
-
borderRadius: 9999,
|
|
8433
|
+
boxSizing: "border-box",
|
|
8434
|
+
width: "min(360px, calc(100% - var(--space-8)))",
|
|
8435
|
+
flexDirection: "column",
|
|
8436
|
+
borderRadius: "var(--radius-xl)",
|
|
8408
8437
|
border: "1px solid var(--border)",
|
|
8409
8438
|
background: "var(--bg-raised)",
|
|
8410
|
-
padding: "var(--space-
|
|
8439
|
+
padding: "var(--space-2) var(--space-4) var(--space-3)",
|
|
8411
8440
|
boxShadow: "var(--shadow-8)"
|
|
8412
8441
|
};
|
|
8413
8442
|
var inlineStyle = {
|
|
@@ -8449,7 +8478,49 @@ function warnInlineOnce() {
|
|
|
8449
8478
|
warnedInline = true;
|
|
8450
8479
|
console.warn('BulkActionBar: placement="inline" is deprecated and removed in the next minor. Use "floating".');
|
|
8451
8480
|
}
|
|
8481
|
+
var warnedTrailing = false;
|
|
8482
|
+
function warnTrailingOnce() {
|
|
8483
|
+
if (warnedTrailing || typeof process === "undefined" || process.env.NODE_ENV === "production") {
|
|
8484
|
+
return;
|
|
8485
|
+
}
|
|
8486
|
+
warnedTrailing = true;
|
|
8487
|
+
console.warn("BulkActionBar: the floating card ignores `trailing`. Put edit-mode controls at the right end of the toolbar.");
|
|
8488
|
+
}
|
|
8489
|
+
var OFFSET_PROPERTY = "--olun-bulk-bar-offset";
|
|
8490
|
+
var cardHeights = /* @__PURE__ */ new Map();
|
|
8491
|
+
function writeOffset() {
|
|
8492
|
+
const root = document.documentElement;
|
|
8493
|
+
const height = Math.max(0, ...cardHeights.values());
|
|
8494
|
+
if (height > 0) root.style.setProperty(OFFSET_PROPERTY, `calc(${height}px + ${FLOATING_BOTTOM})`);
|
|
8495
|
+
else root.style.removeProperty(OFFSET_PROPERTY);
|
|
8496
|
+
}
|
|
8497
|
+
function reportHeight(key, card) {
|
|
8498
|
+
const height = card.offsetHeight;
|
|
8499
|
+
if (height > 0) cardHeights.set(key, height);
|
|
8500
|
+
else cardHeights.delete(key);
|
|
8501
|
+
writeOffset();
|
|
8502
|
+
}
|
|
8452
8503
|
var useIsomorphicLayoutEffect2 = typeof window === "undefined" ? React36.useEffect : React36.useLayoutEffect;
|
|
8504
|
+
function useBottomOffset(card) {
|
|
8505
|
+
const [key] = React36.useState(() => ({}));
|
|
8506
|
+
React36.useEffect(() => {
|
|
8507
|
+
if (!card) return;
|
|
8508
|
+
const report = () => reportHeight(key, card);
|
|
8509
|
+
report();
|
|
8510
|
+
const observer = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(report);
|
|
8511
|
+
observer?.observe(card);
|
|
8512
|
+
if (!observer) window.addEventListener("resize", report);
|
|
8513
|
+
return () => {
|
|
8514
|
+
observer?.disconnect();
|
|
8515
|
+
if (!observer) window.removeEventListener("resize", report);
|
|
8516
|
+
cardHeights.delete(key);
|
|
8517
|
+
writeOffset();
|
|
8518
|
+
};
|
|
8519
|
+
}, [key, card]);
|
|
8520
|
+
useIsomorphicLayoutEffect2(() => {
|
|
8521
|
+
if (card && typeof ResizeObserver === "undefined") reportHeight(key, card);
|
|
8522
|
+
});
|
|
8523
|
+
}
|
|
8453
8524
|
function useCompactSummary(slot, enabled) {
|
|
8454
8525
|
const [fullWidth, setFullWidth] = React36.useState(null);
|
|
8455
8526
|
const measure = React36.useCallback(() => {
|
|
@@ -8487,7 +8558,9 @@ function BulkActionBar({
|
|
|
8487
8558
|
}) {
|
|
8488
8559
|
const inline = placement === "inline";
|
|
8489
8560
|
if (inline) warnInlineOnce();
|
|
8490
|
-
const
|
|
8561
|
+
const hasTrailing = trailing !== void 0 && trailing !== null;
|
|
8562
|
+
if (!inline && hasTrailing) warnTrailingOnce();
|
|
8563
|
+
const trailingSlot = inline && hasTrailing ? /* @__PURE__ */ jsx39(
|
|
8491
8564
|
"div",
|
|
8492
8565
|
{
|
|
8493
8566
|
"data-slot": "bulk-action-bar-trailing",
|
|
@@ -8505,6 +8578,8 @@ function BulkActionBar({
|
|
|
8505
8578
|
summaryElement,
|
|
8506
8579
|
inline && compactSummary !== void 0 && compactSummary !== null
|
|
8507
8580
|
);
|
|
8581
|
+
const [card, setCard] = React36.useState(null);
|
|
8582
|
+
useBottomOffset(card);
|
|
8508
8583
|
if (count === 0 && idleContent !== void 0 && trailingSlot) {
|
|
8509
8584
|
return /* @__PURE__ */ jsxs35(
|
|
8510
8585
|
"div",
|
|
@@ -8559,16 +8634,31 @@ function BulkActionBar({
|
|
|
8559
8634
|
"span",
|
|
8560
8635
|
{
|
|
8561
8636
|
"data-slot": "bulk-action-bar-count",
|
|
8562
|
-
style: {
|
|
8563
|
-
paddingLeft: inline ? void 0 : "var(--space-2)",
|
|
8637
|
+
style: inline ? {
|
|
8564
8638
|
paddingRight: "var(--space-1)",
|
|
8565
8639
|
fontFamily: "var(--font-sans)",
|
|
8566
8640
|
fontSize: 13,
|
|
8567
|
-
fontWeight:
|
|
8641
|
+
fontWeight: 600,
|
|
8568
8642
|
fontVariantNumeric: "tabular-nums",
|
|
8569
8643
|
color: "var(--text-primary)",
|
|
8570
8644
|
whiteSpace: "nowrap"
|
|
8571
|
-
}
|
|
8645
|
+
} : (
|
|
8646
|
+
// First row, 32px like the ✕ beside it; the right padding keeps text clear of it,
|
|
8647
|
+
// and a long unbroken unit or hint breaks instead of running under it.
|
|
8648
|
+
{
|
|
8649
|
+
display: "flex",
|
|
8650
|
+
minHeight: 32,
|
|
8651
|
+
alignItems: "center",
|
|
8652
|
+
paddingRight: CLEAR_CLEARANCE,
|
|
8653
|
+
fontFamily: "var(--font-sans)",
|
|
8654
|
+
fontSize: 13,
|
|
8655
|
+
fontWeight: 500,
|
|
8656
|
+
fontVariantNumeric: "tabular-nums",
|
|
8657
|
+
color: "var(--text-primary)",
|
|
8658
|
+
wordBreak: "keep-all",
|
|
8659
|
+
overflowWrap: "anywhere"
|
|
8660
|
+
}
|
|
8661
|
+
),
|
|
8572
8662
|
children: count > 0 ? `${count.toLocaleString("ko-KR")}${unit} \uC120\uD0DD\uB428` : emptyHint
|
|
8573
8663
|
}
|
|
8574
8664
|
);
|
|
@@ -8578,7 +8668,7 @@ function BulkActionBar({
|
|
|
8578
8668
|
ref: setSummaryElement,
|
|
8579
8669
|
"data-slot": "bulk-action-bar-summary",
|
|
8580
8670
|
style: {
|
|
8581
|
-
display:
|
|
8671
|
+
display: "flex",
|
|
8582
8672
|
minWidth: 0,
|
|
8583
8673
|
alignItems: "center",
|
|
8584
8674
|
columnGap: "var(--space-3)",
|
|
@@ -8601,27 +8691,30 @@ function BulkActionBar({
|
|
|
8601
8691
|
whiteSpace: "nowrap",
|
|
8602
8692
|
contain: "inline-size"
|
|
8603
8693
|
}
|
|
8604
|
-
) :
|
|
8694
|
+
) : (
|
|
8695
|
+
// Its own row at the card's full inner width; wraps, never clips.
|
|
8696
|
+
{ flexWrap: "wrap", lineHeight: 1.5, wordBreak: "keep-all", overflowWrap: "anywhere" }
|
|
8697
|
+
)
|
|
8605
8698
|
},
|
|
8606
8699
|
children: compact ? compactSummary : summary
|
|
8607
8700
|
}
|
|
8608
8701
|
) : null;
|
|
8609
|
-
const actionGroup = /* @__PURE__ */ jsx39(
|
|
8610
|
-
"div",
|
|
8611
|
-
{
|
|
8612
|
-
"data-slot": "bulk-action-bar-actions",
|
|
8613
|
-
style: {
|
|
8614
|
-
display: "flex",
|
|
8615
|
-
minWidth: 0,
|
|
8616
|
-
flexWrap: inline ? "nowrap" : "wrap",
|
|
8617
|
-
alignItems: "center",
|
|
8618
|
-
justifyContent: "flex-end",
|
|
8619
|
-
gap: 2
|
|
8620
|
-
},
|
|
8621
|
-
children: actions.map((action) => /* @__PURE__ */ jsx39(ActionButton, { action }, action.key))
|
|
8622
|
-
}
|
|
8623
|
-
);
|
|
8624
8702
|
if (inline) {
|
|
8703
|
+
const actionGroup = /* @__PURE__ */ jsx39(
|
|
8704
|
+
"div",
|
|
8705
|
+
{
|
|
8706
|
+
"data-slot": "bulk-action-bar-actions",
|
|
8707
|
+
style: {
|
|
8708
|
+
display: "flex",
|
|
8709
|
+
minWidth: 0,
|
|
8710
|
+
flexWrap: "nowrap",
|
|
8711
|
+
alignItems: "center",
|
|
8712
|
+
justifyContent: "flex-end",
|
|
8713
|
+
gap: 2
|
|
8714
|
+
},
|
|
8715
|
+
children: actions.map((action) => /* @__PURE__ */ jsx39(ActionButton, { action }, action.key))
|
|
8716
|
+
}
|
|
8717
|
+
);
|
|
8625
8718
|
return /* @__PURE__ */ jsxs35(
|
|
8626
8719
|
"div",
|
|
8627
8720
|
{
|
|
@@ -8686,6 +8779,7 @@ function BulkActionBar({
|
|
|
8686
8779
|
"animate-[olun-bulk-action-bar-in_var(--dur-fast)_var(--ease-out)_both] motion-reduce:animate-none",
|
|
8687
8780
|
className
|
|
8688
8781
|
),
|
|
8782
|
+
ref: setCard,
|
|
8689
8783
|
style: { ...floatingStyle, ...style },
|
|
8690
8784
|
...props,
|
|
8691
8785
|
children: [
|
|
@@ -8697,8 +8791,8 @@ function BulkActionBar({
|
|
|
8697
8791
|
style: {
|
|
8698
8792
|
display: "flex",
|
|
8699
8793
|
minWidth: 0,
|
|
8700
|
-
|
|
8701
|
-
|
|
8794
|
+
flexDirection: "column",
|
|
8795
|
+
rowGap: "var(--space-2)"
|
|
8702
8796
|
},
|
|
8703
8797
|
children: [
|
|
8704
8798
|
countLabel,
|
|
@@ -8706,11 +8800,29 @@ function BulkActionBar({
|
|
|
8706
8800
|
]
|
|
8707
8801
|
}
|
|
8708
8802
|
),
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8803
|
+
actions.length > 0 ? /* @__PURE__ */ jsx39(
|
|
8804
|
+
"div",
|
|
8805
|
+
{
|
|
8806
|
+
"data-slot": "bulk-action-bar-actions",
|
|
8807
|
+
style: {
|
|
8808
|
+
display: "flex",
|
|
8809
|
+
flexWrap: "wrap",
|
|
8810
|
+
justifyContent: "flex-end",
|
|
8811
|
+
gap: "var(--space-2)",
|
|
8812
|
+
marginTop: "var(--space-3)"
|
|
8813
|
+
},
|
|
8814
|
+
children: actions.map((action) => /* @__PURE__ */ jsx39(CardActionButton, { action }, action.key))
|
|
8815
|
+
}
|
|
8816
|
+
) : null,
|
|
8817
|
+
/* @__PURE__ */ jsx39(
|
|
8818
|
+
IconButton,
|
|
8819
|
+
{
|
|
8820
|
+
icon: X4,
|
|
8821
|
+
"aria-label": "\uC120\uD0DD \uD574\uC81C",
|
|
8822
|
+
onClick: onClear,
|
|
8823
|
+
style: { position: "absolute", top: "var(--space-2)", right: "var(--space-2)" }
|
|
8824
|
+
}
|
|
8825
|
+
)
|
|
8714
8826
|
]
|
|
8715
8827
|
}
|
|
8716
8828
|
);
|
|
@@ -10321,7 +10433,8 @@ var toastVariants = cva21(
|
|
|
10321
10433
|
);
|
|
10322
10434
|
var toastViewportVariants = cva21(
|
|
10323
10435
|
[
|
|
10324
|
-
|
|
10436
|
+
// A floating BulkActionBar publishes --olun-bulk-bar-offset while it is up; sit 8px above it.
|
|
10437
|
+
"fixed bottom-[max(var(--space-6),calc(var(--olun-bulk-bar-offset,0px)+var(--space-2)))] right-[var(--space-6)] z-[var(--z-toast,50)]",
|
|
10325
10438
|
"flex w-[min(420px,calc(100vw-var(--space-12)))] list-none flex-col gap-[var(--space-2)]",
|
|
10326
10439
|
"pointer-events-none outline-none"
|
|
10327
10440
|
].join(" ")
|