@selectwin/kit 0.1.257 → 0.1.258
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 +44 -0
- package/dist/SelectActionList.d.ts +5 -0
- package/dist/SelectActionList.js +55 -39
- package/dist/SelectAppFrame.d.ts +8 -2
- package/dist/SelectAppFrame.js +124 -119
- package/dist/SelectAvatarGroup.d.ts +31 -0
- package/dist/SelectAvatarGroup.js +39 -0
- package/dist/SelectBadge.d.ts +1 -1
- package/dist/SelectChannelPreview.d.ts +15 -5
- package/dist/SelectChannelPreview.js +94 -54
- package/dist/SelectFieldset.d.ts +14 -0
- package/dist/SelectFieldset.js +27 -0
- package/dist/SelectFilterBar.d.ts +6 -1
- package/dist/SelectFilterBar.js +153 -123
- package/dist/SelectImageUploadField.d.ts +5 -3
- package/dist/SelectImageUploadField.js +26 -26
- package/dist/SelectKanban.d.ts +13 -1
- package/dist/SelectKanban.js +72 -50
- package/dist/SelectLocale.d.ts +34 -0
- package/dist/SelectLocale.js +560 -521
- package/dist/SelectModal.d.ts +10 -4
- package/dist/SelectModal.js +158 -137
- package/dist/SelectSegmented.d.ts +7 -0
- package/dist/SelectSegmented.js +51 -43
- package/dist/SelectSideNav.d.ts +2 -1
- package/dist/SelectSideNav.js +156 -135
- package/dist/SelectSortable.d.ts +47 -1
- package/dist/SelectSortable.js +138 -19
- package/dist/SelectSteps.d.ts +3 -0
- package/dist/SelectSteps.js +42 -31
- package/dist/SelectTimeline.d.ts +4 -0
- package/dist/SelectTimeline.js +20 -9
- package/dist/index.d.ts +7 -0
- package/dist/index.js +186 -184
- package/dist/internal/navCount.d.ts +21 -0
- package/dist/internal/navCount.js +27 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/SelectSortable.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
1
|
+
import { ComponentPropsWithoutRef, FocusEvent, KeyboardEvent, PointerEvent, ReactNode } from 'react';
|
|
2
2
|
type SelectSortableItemOwnProps = {
|
|
3
3
|
/** O item que está sendo arrastado: sobe por cima dos outros, com sombra. */
|
|
4
4
|
dragging?: boolean;
|
|
@@ -25,4 +25,50 @@ export declare const SelectDragHandle: import('react').ForwardRefExoticComponent
|
|
|
25
25
|
export declare function SelectDragPreview({ children }: {
|
|
26
26
|
children?: ReactNode;
|
|
27
27
|
}): import("react").JSX.Element;
|
|
28
|
+
/** 0.1.258: a lista com o item de `from` no lugar `to` (a conta do arrasto e a de quem grava). PURA. */
|
|
29
|
+
export declare function selectSortableOrder<T>(items: readonly T[], from: number, to: number): T[];
|
|
30
|
+
export interface SelectSortableOptions {
|
|
31
|
+
/** Os ids na ordem de agora. */
|
|
32
|
+
ids: readonly string[];
|
|
33
|
+
/** O item de `from` vai para `to` (a tela grava; `selectSortableOrder` faz a conta). */
|
|
34
|
+
onMove: (from: number, to: number) => void;
|
|
35
|
+
/** O nome do item, para a alça e o leitor de tela ("Nome"). Padrão: "item 2". */
|
|
36
|
+
getLabel?: (id: string, index: number) => string;
|
|
37
|
+
/** O eixo da lista: `y` (o padrão, as setas para cima e para baixo) ou `x` (para os lados). */
|
|
38
|
+
axis?: 'y' | 'x';
|
|
39
|
+
/** Nada se move (o só para ler). */
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/** O que o `handle(id)` devolve: as props do `SelectDragHandle`. */
|
|
43
|
+
export interface SelectSortableHandleProps {
|
|
44
|
+
ref: (el: HTMLButtonElement | null) => void;
|
|
45
|
+
label: string;
|
|
46
|
+
dragging: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
'aria-describedby': string;
|
|
49
|
+
'aria-pressed': boolean;
|
|
50
|
+
onPointerDown: (event: PointerEvent<HTMLButtonElement>) => void;
|
|
51
|
+
onPointerMove: (event: PointerEvent<HTMLButtonElement>) => void;
|
|
52
|
+
onPointerUp: (event: PointerEvent<HTMLButtonElement>) => void;
|
|
53
|
+
onPointerCancel: (event: PointerEvent<HTMLButtonElement>) => void;
|
|
54
|
+
onKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
55
|
+
onBlur: (event: FocusEvent<HTMLButtonElement>) => void;
|
|
56
|
+
}
|
|
57
|
+
/** O que o `item(id)` devolve: as props do `SelectSortableItem`. */
|
|
58
|
+
export interface SelectSortableItemBinding {
|
|
59
|
+
ref: (el: HTMLDivElement | null) => void;
|
|
60
|
+
dragging: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface SelectSortable {
|
|
63
|
+
/** Os ids na ordem da prévia (com o item no lugar novo enquanto se move): desenhe nesta ordem. */
|
|
64
|
+
order: string[];
|
|
65
|
+
/** O id do item que se move agora, ou `null`. */
|
|
66
|
+
active: string | null;
|
|
67
|
+
item: (id: string) => SelectSortableItemBinding;
|
|
68
|
+
handle: (id: string) => SelectSortableHandleProps;
|
|
69
|
+
/** As instruções e a região que fala: desenhe uma vez, perto da lista. */
|
|
70
|
+
live: ReactNode;
|
|
71
|
+
}
|
|
72
|
+
/** 0.1.258: a lista que se ordena pelo ponteiro (o mouse e o dedo) e pelo teclado, com os avisos ao leitor de tela. */
|
|
73
|
+
export declare function useSelectSortable({ ids, onMove, getLabel, axis, disabled }: SelectSortableOptions): SelectSortable;
|
|
28
74
|
export {};
|
package/dist/SelectSortable.js
CHANGED
|
@@ -1,31 +1,150 @@
|
|
|
1
1
|
import { GripIcon as e } from "./icons.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useSelectMessages as t } from "./SelectLocale.js";
|
|
3
|
+
import { forwardRef as n, useId as r, useLayoutEffect as i, useRef as a, useState as o } from "react";
|
|
4
|
+
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
5
|
//#region src/SelectSortable.tsx
|
|
5
|
-
var
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
-
ref:
|
|
8
|
-
...
|
|
9
|
-
className: `select-sortitem${e && !t ? " is-dragging" : ""}${t ? " is-ghost" : ""}${
|
|
6
|
+
var u = n(function({ dragging: e = !1, ghost: t = !1, className: n, ...r }, i) {
|
|
7
|
+
return /* @__PURE__ */ c("div", {
|
|
8
|
+
ref: i,
|
|
9
|
+
...r,
|
|
10
|
+
className: `select-sortitem${e && !t ? " is-dragging" : ""}${t ? " is-ghost" : ""}${n ? " " + n : ""}`
|
|
10
11
|
});
|
|
11
|
-
}),
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
ref:
|
|
12
|
+
}), d = n(function({ dragging: t = !1, variant: n = "inline", label: r = "Arrastar para reordenar", className: i, ...a }, o) {
|
|
13
|
+
return /* @__PURE__ */ c("button", {
|
|
14
|
+
ref: o,
|
|
14
15
|
type: "button",
|
|
15
|
-
"aria-label":
|
|
16
|
-
title:
|
|
17
|
-
...
|
|
18
|
-
className: `select-draghandle${
|
|
19
|
-
children: /* @__PURE__ */
|
|
16
|
+
"aria-label": r,
|
|
17
|
+
title: r,
|
|
18
|
+
...a,
|
|
19
|
+
className: `select-draghandle${n === "floating" ? " select-draghandle--floating" : ""}${t ? " is-dragging" : ""}${i ? " " + i : ""}`,
|
|
20
|
+
children: /* @__PURE__ */ c(e, {})
|
|
20
21
|
});
|
|
21
22
|
});
|
|
22
|
-
function
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
function f({ children: t }) {
|
|
24
|
+
return /* @__PURE__ */ l("span", {
|
|
24
25
|
className: "select-dragpreview",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ c(e, {}), t]
|
|
26
27
|
});
|
|
27
28
|
}
|
|
29
|
+
function p(e, t, n) {
|
|
30
|
+
let r = e.slice();
|
|
31
|
+
if (t === n || t < 0 || t >= r.length) return r;
|
|
32
|
+
let [i] = r.splice(t, 1);
|
|
33
|
+
return r.splice(Math.max(0, Math.min(n, r.length)), 0, i), r;
|
|
34
|
+
}
|
|
35
|
+
function m({ ids: e, onMove: n, getLabel: u, axis: d = "y", disabled: f = !1 }) {
|
|
36
|
+
let m = t().sortable, h = r(), g = a(/* @__PURE__ */ new Map()), _ = a(/* @__PURE__ */ new Map()), v = a([]), y = a(null), [b, x] = o(null), [S, C] = o("");
|
|
37
|
+
i(() => {
|
|
38
|
+
let e = y.current;
|
|
39
|
+
if (!e) return;
|
|
40
|
+
y.current = null;
|
|
41
|
+
let t = _.current.get(e);
|
|
42
|
+
t && document.activeElement !== t && t.focus({ preventScroll: !0 });
|
|
43
|
+
});
|
|
44
|
+
let w = e.length, T = b ? e.indexOf(b.id) : -1, E = b && T >= 0 ? b : null, D = E ? p(e, T, E.to) : e.slice(), O = (t) => {
|
|
45
|
+
let n = e.indexOf(t);
|
|
46
|
+
return (u == null ? void 0 : u(t, n)) ?? m.item(n + 1);
|
|
47
|
+
}, k = (e) => {
|
|
48
|
+
if (!E) {
|
|
49
|
+
x(null);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let t = O(E.id);
|
|
53
|
+
x(null), E.by === "keyboard" && (y.current = E.id), e && E.to !== T ? (n(T, E.to), C(m.dropped(t, E.to + 1, w))) : e ? E.by === "keyboard" && C(m.dropped(t, T + 1, w)) : C(m.canceled(t, T + 1));
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
order: D,
|
|
57
|
+
active: (E == null ? void 0 : E.id) ?? null,
|
|
58
|
+
item: (e) => ({
|
|
59
|
+
ref: (t) => {
|
|
60
|
+
t ? g.current.set(e, t) : g.current.delete(e);
|
|
61
|
+
},
|
|
62
|
+
dragging: (E == null ? void 0 : E.id) === e
|
|
63
|
+
}),
|
|
64
|
+
handle: (t) => {
|
|
65
|
+
let n = e.indexOf(t), r = (E == null ? void 0 : E.id) === t, i = r && (E == null ? void 0 : E.by) === "keyboard";
|
|
66
|
+
return {
|
|
67
|
+
ref: (e) => {
|
|
68
|
+
e ? _.current.set(t, e) : _.current.delete(t);
|
|
69
|
+
},
|
|
70
|
+
label: m.handle(O(t)),
|
|
71
|
+
dragging: r,
|
|
72
|
+
...f ? { disabled: !0 } : {},
|
|
73
|
+
"aria-describedby": h,
|
|
74
|
+
"aria-pressed": i,
|
|
75
|
+
onPointerDown: (r) => {
|
|
76
|
+
if (!(f || r.button !== 0 || E)) {
|
|
77
|
+
try {
|
|
78
|
+
var i, a;
|
|
79
|
+
(i = (a = r.currentTarget).setPointerCapture) == null || i.call(a, r.pointerId);
|
|
80
|
+
} catch {}
|
|
81
|
+
v.current = e.map((e) => {
|
|
82
|
+
var t;
|
|
83
|
+
let n = (t = g.current.get(e)) == null ? void 0 : t.getBoundingClientRect();
|
|
84
|
+
return n ? d === "y" ? n.top + n.height / 2 : n.left + n.width / 2 : 0;
|
|
85
|
+
}), x({
|
|
86
|
+
id: t,
|
|
87
|
+
to: n,
|
|
88
|
+
by: "pointer"
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
onPointerMove: (e) => {
|
|
93
|
+
if (!r || (E == null ? void 0 : E.by) !== "pointer") return;
|
|
94
|
+
let t = d === "y" ? e.clientY : e.clientX, n = v.current.filter((e, n) => n !== T && e < t).length;
|
|
95
|
+
n !== E.to && x({
|
|
96
|
+
...E,
|
|
97
|
+
to: n
|
|
98
|
+
});
|
|
99
|
+
},
|
|
100
|
+
onPointerUp: () => {
|
|
101
|
+
r && (E == null ? void 0 : E.by) === "pointer" && k(!0);
|
|
102
|
+
},
|
|
103
|
+
onPointerCancel: () => {
|
|
104
|
+
r && (E == null ? void 0 : E.by) === "pointer" && k(!1);
|
|
105
|
+
},
|
|
106
|
+
onKeyDown: (e) => {
|
|
107
|
+
if (f) return;
|
|
108
|
+
if (e.key === " " || e.key === "Enter") {
|
|
109
|
+
e.preventDefault(), i ? k(!0) : E || (x({
|
|
110
|
+
id: t,
|
|
111
|
+
to: n,
|
|
112
|
+
by: "keyboard"
|
|
113
|
+
}), C(m.grabbed(O(t), n + 1, w)));
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (!i || !E) return;
|
|
117
|
+
if (e.key === "Escape") {
|
|
118
|
+
e.preventDefault(), k(!1);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
let r = d === "y" ? e.key === "ArrowUp" : e.key === "ArrowLeft", a = d === "y" ? e.key === "ArrowDown" : e.key === "ArrowRight";
|
|
122
|
+
if (!r && !a) return;
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
let o = Math.max(0, Math.min(w - 1, E.to + (a ? 1 : -1)));
|
|
125
|
+
o !== E.to && (y.current = t, x({
|
|
126
|
+
...E,
|
|
127
|
+
to: o
|
|
128
|
+
}), C(m.moved(O(t), o + 1, w)));
|
|
129
|
+
},
|
|
130
|
+
onBlur: () => {
|
|
131
|
+
i && y.current !== t && k(!1);
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
live: /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("span", {
|
|
136
|
+
id: h,
|
|
137
|
+
className: "select-visually-hidden",
|
|
138
|
+
children: m.instructions
|
|
139
|
+
}), /* @__PURE__ */ c("span", {
|
|
140
|
+
className: "select-visually-hidden",
|
|
141
|
+
"aria-live": "assertive",
|
|
142
|
+
"aria-atomic": "true",
|
|
143
|
+
children: S
|
|
144
|
+
})] })
|
|
145
|
+
};
|
|
146
|
+
}
|
|
28
147
|
//#endregion
|
|
29
|
-
export {
|
|
148
|
+
export { d as SelectDragHandle, f as SelectDragPreview, u as SelectSortableItem, p as selectSortableOrder, m as useSelectSortable };
|
|
30
149
|
|
|
31
150
|
//# sourceMappingURL=SelectSortable.js.map
|
package/dist/SelectSteps.d.ts
CHANGED
|
@@ -4,11 +4,14 @@ export type SelectStepState = 'done' | 'current' | 'error' | 'pending';
|
|
|
4
4
|
/**
|
|
5
5
|
* Um passo: só o rótulo, ou rótulo + descrição (a descrição só aparece na vertical) + o
|
|
6
6
|
* `state`, que vence o que sai do `current` (antes = feito, ele = atual, depois = pendente).
|
|
7
|
+
* 0.1.258: `locked` (o cadeado: a etapa automática) e `lockedLabel` (o que o leitor de tela ouve; padrão "automática").
|
|
7
8
|
*/
|
|
8
9
|
export type SelectStepItem = string | {
|
|
9
10
|
label: string;
|
|
10
11
|
description?: string;
|
|
11
12
|
state?: SelectStepState;
|
|
13
|
+
locked?: boolean;
|
|
14
|
+
lockedLabel?: string;
|
|
12
15
|
};
|
|
13
16
|
type SelectStepsOwnProps = {
|
|
14
17
|
steps: SelectStepItem[];
|
package/dist/SelectSteps.js
CHANGED
|
@@ -1,62 +1,73 @@
|
|
|
1
|
-
import { CheckIcon as e } from "./icons.js";
|
|
2
|
-
import { useSelectMessages as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Fragment as
|
|
1
|
+
import { CheckIcon as e, LockIcon as t } from "./icons.js";
|
|
2
|
+
import { useSelectMessages as n } from "./SelectLocale.js";
|
|
3
|
+
import { forwardRef as r } from "react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
5
|
//#region src/SelectSteps.tsx
|
|
6
|
-
var
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
ref:
|
|
10
|
-
...
|
|
11
|
-
className: `select-steps${
|
|
12
|
-
children:
|
|
13
|
-
let
|
|
6
|
+
var s = r(function({ steps: r, current: s, onSelect: c, orientation: l = "horizontal", connected: u = !1, className: d, ...f }, p) {
|
|
7
|
+
let m = n(), h = l === "vertical";
|
|
8
|
+
return /* @__PURE__ */ a("ol", {
|
|
9
|
+
ref: p,
|
|
10
|
+
...f,
|
|
11
|
+
className: `select-steps${h ? " select-steps--vertical" : ""}${u && !h ? " select-steps--connected" : ""}${d ? " " + d : ""}`,
|
|
12
|
+
children: r.map((n, r) => {
|
|
13
|
+
let l = typeof n == "string" ? { label: n } : n, u = l.state ?? (r < s ? "done" : r === s ? "current" : "pending"), d = !!c && r !== s && (u === "done" || u === "error"), f = /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("span", {
|
|
14
14
|
className: "select-steps__num",
|
|
15
15
|
"aria-hidden": "true",
|
|
16
|
-
children:
|
|
17
|
-
|
|
16
|
+
children: [u === "done" ? /* @__PURE__ */ a(e, {}) : u === "error" ? "!" : r + 1, l.locked ? /* @__PURE__ */ a("span", {
|
|
17
|
+
className: "select-steps__lock",
|
|
18
|
+
children: /* @__PURE__ */ a(t, {})
|
|
19
|
+
}) : null]
|
|
20
|
+
}), /* @__PURE__ */ o("span", {
|
|
18
21
|
className: "select-steps__text",
|
|
19
22
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
23
|
+
/* @__PURE__ */ a("span", {
|
|
21
24
|
className: "select-steps__label",
|
|
22
|
-
children:
|
|
25
|
+
children: l.label
|
|
23
26
|
}),
|
|
24
|
-
l
|
|
27
|
+
l.locked && /* @__PURE__ */ o("span", {
|
|
25
28
|
className: "select-steps__sr",
|
|
26
29
|
children: [
|
|
27
30
|
"(",
|
|
28
|
-
|
|
31
|
+
l.lockedLabel ?? m.lock.label,
|
|
29
32
|
")"
|
|
30
33
|
]
|
|
31
34
|
}),
|
|
32
|
-
|
|
35
|
+
u === "error" && /* @__PURE__ */ o("span", {
|
|
33
36
|
className: "select-steps__sr",
|
|
34
37
|
children: [
|
|
35
38
|
"(",
|
|
36
|
-
|
|
39
|
+
m.common.needsAttention,
|
|
37
40
|
")"
|
|
38
41
|
]
|
|
39
42
|
}),
|
|
40
|
-
|
|
43
|
+
u === "done" && /* @__PURE__ */ o("span", {
|
|
44
|
+
className: "select-steps__sr",
|
|
45
|
+
children: [
|
|
46
|
+
"(",
|
|
47
|
+
m.common.done,
|
|
48
|
+
")"
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
h && l.description && /* @__PURE__ */ a("span", {
|
|
41
52
|
className: "select-steps__desc",
|
|
42
|
-
children:
|
|
53
|
+
children: l.description
|
|
43
54
|
})
|
|
44
55
|
]
|
|
45
56
|
})] });
|
|
46
|
-
return /* @__PURE__ */
|
|
47
|
-
className: `select-steps__step select-steps__step--${
|
|
48
|
-
"aria-current":
|
|
49
|
-
children:
|
|
57
|
+
return /* @__PURE__ */ a("li", {
|
|
58
|
+
className: `select-steps__step select-steps__step--${u === "pending" ? "todo" : u}`,
|
|
59
|
+
"aria-current": u === "current" ? "step" : void 0,
|
|
60
|
+
children: d ? /* @__PURE__ */ a("button", {
|
|
50
61
|
type: "button",
|
|
51
62
|
className: "select-steps__btn",
|
|
52
|
-
onClick: () =>
|
|
53
|
-
children:
|
|
54
|
-
}) :
|
|
55
|
-
},
|
|
63
|
+
onClick: () => c(r),
|
|
64
|
+
children: f
|
|
65
|
+
}) : f
|
|
66
|
+
}, r);
|
|
56
67
|
})
|
|
57
68
|
});
|
|
58
69
|
});
|
|
59
70
|
//#endregion
|
|
60
|
-
export {
|
|
71
|
+
export { s as SelectSteps };
|
|
61
72
|
|
|
62
73
|
//# sourceMappingURL=SelectSteps.js.map
|
package/dist/SelectTimeline.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ export interface SelectTimelineItem {
|
|
|
8
8
|
tone?: SelectTimelineTone;
|
|
9
9
|
/** Selo ao lado do título. */
|
|
10
10
|
badge?: ReactNode;
|
|
11
|
+
/** 0.1.258: o ícone do marcador (o tipo do evento), no lugar do ponto, no tom do evento. */
|
|
12
|
+
icon?: ReactNode;
|
|
13
|
+
/** 0.1.258: o tipo do evento para o leitor de tela, antes do título ("Ligação"). O ícone fica fora da leitura. */
|
|
14
|
+
iconLabel?: string;
|
|
11
15
|
}
|
|
12
16
|
type SelectTimelineOwnProps = {
|
|
13
17
|
items: SelectTimelineItem[];
|
package/dist/SelectTimeline.js
CHANGED
|
@@ -19,22 +19,26 @@ var r = {
|
|
|
19
19
|
let f = {
|
|
20
20
|
"--tl-final": r[e.length ? ((d = e[0]) == null ? void 0 : d.tone) ?? "default" : "default"],
|
|
21
21
|
...c
|
|
22
|
-
}, p = a === "each", m = o === "start";
|
|
22
|
+
}, p = a === "each", m = o === "start", h = e.some((e) => e.icon != null && e.icon !== !1);
|
|
23
23
|
return /* @__PURE__ */ t("ul", {
|
|
24
24
|
ref: u,
|
|
25
25
|
...l,
|
|
26
|
-
className: `select-timeline${p ? " select-timeline--each" : ""}${m ? " select-timeline--timestart" : ""}${s ? " " + s : ""}`,
|
|
26
|
+
className: `select-timeline${p ? " select-timeline--each" : ""}${m ? " select-timeline--timestart" : ""}${h ? " select-timeline--icons" : ""}${s ? " " + s : ""}`,
|
|
27
27
|
style: f,
|
|
28
28
|
children: e.map((e, r) => {
|
|
29
|
-
let a = !p && r === 0, o = p ? { "--tl-dot": i[e.tone ?? "default"] } : void 0;
|
|
29
|
+
let a = !p && r === 0, o = p ? { "--tl-dot": i[e.tone ?? "default"] } : void 0, s = e.icon != null && e.icon !== !1;
|
|
30
30
|
return /* @__PURE__ */ n("li", {
|
|
31
|
-
className: "select-timeline__item"
|
|
31
|
+
className: `select-timeline__item${s ? " select-timeline__item--icon" : ""}`,
|
|
32
32
|
children: [
|
|
33
33
|
m && e.timestamp != null && /* @__PURE__ */ t("span", {
|
|
34
34
|
className: "select-timeline__when",
|
|
35
35
|
children: e.timestamp
|
|
36
36
|
}),
|
|
37
|
-
/* @__PURE__ */ t("span", {
|
|
37
|
+
s ? /* @__PURE__ */ t("span", {
|
|
38
|
+
className: `select-timeline__marker select-timeline__marker--${e.tone ?? "default"}`,
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
children: e.icon
|
|
41
|
+
}) : /* @__PURE__ */ t("span", {
|
|
38
42
|
className: `select-timeline__dot${a ? " select-timeline__dot--final" : ""}${p ? " select-timeline__dot--toned" : ""}`,
|
|
39
43
|
style: o,
|
|
40
44
|
"aria-hidden": "true"
|
|
@@ -46,10 +50,17 @@ var r = {
|
|
|
46
50
|
className: "select-timeline__head",
|
|
47
51
|
children: [/* @__PURE__ */ n("span", {
|
|
48
52
|
className: "select-timeline__title",
|
|
49
|
-
children: [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
children: [
|
|
54
|
+
e.iconLabel ? /* @__PURE__ */ t("span", {
|
|
55
|
+
className: "select-visually-hidden",
|
|
56
|
+
children: `${e.iconLabel}: `
|
|
57
|
+
}) : null,
|
|
58
|
+
e.title,
|
|
59
|
+
e.badge != null && /* @__PURE__ */ t("span", {
|
|
60
|
+
className: "select-timeline__badge",
|
|
61
|
+
children: e.badge
|
|
62
|
+
})
|
|
63
|
+
]
|
|
53
64
|
}), !m && e.timestamp != null && /* @__PURE__ */ t("span", {
|
|
54
65
|
className: "select-timeline__time",
|
|
55
66
|
children: e.timestamp
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,13 @@ export { SelectText } from './SelectText';
|
|
|
57
57
|
export { SelectBox, SelectStack, SelectInline, SelectGrid } from './SelectLayout';
|
|
58
58
|
export { SelectScrollArea } from './SelectScrollArea';
|
|
59
59
|
export type { SelectScrollAreaProps, SelectScrollAreaElement, SelectScrollAxis } from './SelectScrollArea';
|
|
60
|
+
export { SelectAvatarGroup } from './SelectAvatarGroup';
|
|
61
|
+
export type { SelectAvatarGroupProps, SelectAvatarGroupPerson } from './SelectAvatarGroup';
|
|
62
|
+
export { SelectFieldset } from './SelectFieldset';
|
|
63
|
+
export type { SelectFieldsetProps } from './SelectFieldset';
|
|
64
|
+
export type { SelectNavCount } from './internal/navCount';
|
|
65
|
+
export { useSelectSortable, selectSortableOrder } from './SelectSortable';
|
|
66
|
+
export type { SelectSortable, SelectSortableOptions, SelectSortableHandleProps, SelectSortableItemBinding } from './SelectSortable';
|
|
60
67
|
export { SelectPage, SelectPageBackProvider, SelectPageHeader } from './SelectPage';
|
|
61
68
|
export { SelectFormLayout } from './SelectFormLayout';
|
|
62
69
|
export { SelectSkeleton } from './SelectSkeleton';
|