@webority/ui-react 0.9.11 → 0.9.12
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.
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
* tone?: 'neutral'|'success'|'warning'|'danger'|'info',
|
|
21
21
|
* status?: 'upcoming'|'current'|'done'|'on-hold'|'rejected'|'cancelled'|'skipped',
|
|
22
22
|
* title: import('react').ReactNode, description?: import('react').ReactNode,
|
|
23
|
-
* at?: string, by?: string, note?: string }[]} props.items
|
|
23
|
+
* at?: string, time?: string, by?: string, note?: string }[]} props.items
|
|
24
24
|
* Feed variant: newest first. Progress variant: first stage first.
|
|
25
25
|
* `status` drives the dot + rail in the progress variant; `description` is a
|
|
26
26
|
* plain inline subtext under the title (distinct from the boxed `note`).
|
|
27
|
+
* `at` is the date and `time` an optional time-of-day shown beside it — both are
|
|
28
|
+
* pre-formatted strings the caller owns (IST, DD-MMM-YYYY / HH:mm); pass either or both.
|
|
27
29
|
* @param {'feed'|'progress'} [props.variant] Layout mode. Defaults to `feed`.
|
|
28
30
|
* @param {'vertical'|'horizontal'} [props.orientation] Rail direction — vertical (default) stacks
|
|
29
31
|
* items top-to-bottom; horizontal lays dots in a row with the body beneath each. Orthogonal to
|
|
@@ -43,6 +45,7 @@ export default function AppTimeline({ items, variant, orientation, size, classNa
|
|
|
43
45
|
title: import('react').ReactNode;
|
|
44
46
|
description?: import('react').ReactNode;
|
|
45
47
|
at?: string;
|
|
48
|
+
time?: string;
|
|
46
49
|
by?: string;
|
|
47
50
|
note?: string;
|
|
48
51
|
}[];
|
package/dist/ui-react.js
CHANGED
|
@@ -3481,7 +3481,7 @@ var Pe = Symbol("wui.trustedHtml"), q = (e) => String(e ?? "").replace(/&/g, "&a
|
|
|
3481
3481
|
""
|
|
3482
3482
|
])[2], ft = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, Y = null, pt = null;
|
|
3483
3483
|
function mt() {
|
|
3484
|
-
return Y ? Promise.resolve(Y) : (pt ||= Promise.all([import("./
|
|
3484
|
+
return Y ? Promise.resolve(Y) : (pt ||= Promise.all([import("./max-BDKx469G-7aEpYZ9J.js"), import("./examples.mobile.json-BMXTGiGC-Dl_Tt3py.js")]).then(([e, t]) => (Y = {
|
|
3485
3485
|
AsYouType: e.AsYouType,
|
|
3486
3486
|
getExampleNumber: e.getExampleNumber,
|
|
3487
3487
|
isValidPhoneNumber: e.isValidPhoneNumber,
|
|
@@ -6333,11 +6333,11 @@ function nr({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6333
6333
|
}), j = Math.max(1, e.length + +!!h + +!!x + +!!D), M = x && n ? n.reduce((e, t, n) => e + +!!S?.has(r(t, n)), 0) : 0, P = x && n && n.length > 0 && M === n.length, F = M > 0 && !P, I = (e) => {
|
|
6334
6334
|
e && (e.indeterminate = F);
|
|
6335
6335
|
}, L = l !== void 0 && u > 0 ? l : c;
|
|
6336
|
-
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */
|
|
6336
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
|
|
6337
6337
|
className: `table-wrap${b ? ` ${b}` : ""}`,
|
|
6338
6338
|
tabIndex: 0,
|
|
6339
6339
|
...E,
|
|
6340
|
-
children: /* @__PURE__ */ m("table", {
|
|
6340
|
+
children: [/* @__PURE__ */ m("table", {
|
|
6341
6341
|
className: `table table-ledger${y ? ` ${y}` : ""}`,
|
|
6342
6342
|
"aria-label": v,
|
|
6343
6343
|
children: [/* @__PURE__ */ p("thead", { children: /* @__PURE__ */ m("tr", { children: [
|
|
@@ -6440,15 +6440,14 @@ function nr({ columns: e, rows: n, rowKey: r = (e) => e.id, sort: i, onSort: a,
|
|
|
6440
6440
|
children: T(n)
|
|
6441
6441
|
})
|
|
6442
6442
|
})] }, a);
|
|
6443
|
-
}) :
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
})
|
|
6443
|
+
}) : null })]
|
|
6444
|
+
}), !o && !n?.length && /* @__PURE__ */ p("div", {
|
|
6445
|
+
className: "tbl-empty-block",
|
|
6446
|
+
children: typeof L == "string" ? /* @__PURE__ */ p("div", {
|
|
6447
|
+
className: "tbl-empty-plain",
|
|
6448
|
+
children: L
|
|
6449
|
+
}) : L
|
|
6450
|
+
})]
|
|
6452
6451
|
}), _ && !o && _.total > 0 && /* @__PURE__ */ p($n, {
|
|
6453
6452
|
page: _.page,
|
|
6454
6453
|
totalPages: _.totalPages,
|
|
@@ -6616,28 +6615,39 @@ function cr() {
|
|
|
6616
6615
|
}
|
|
6617
6616
|
!e || sr || (sr = !0, console.warn("[@webority/ui-react] <AppDropdown> icon-only toggle has no accessible name — pass `label` or `ariaLabel`."));
|
|
6618
6617
|
}
|
|
6619
|
-
function lr({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items:
|
|
6620
|
-
N("AppDropdown",
|
|
6621
|
-
let
|
|
6622
|
-
return
|
|
6618
|
+
function lr({ icon: e, iconSize: t, toggleClassName: n, label: r, ariaLabel: i, align: a = "end", items: s = [], menuClassName: c = "", linkComponent: l, children: u, trigger: f, ...h }) {
|
|
6619
|
+
N("AppDropdown", h), !f && !i && !r && cr();
|
|
6620
|
+
let g = n ?? (f ? "wui-dropdown-trigger" : "topbar-icon-btn"), [_, v] = d(!1);
|
|
6621
|
+
return o(() => {
|
|
6622
|
+
if (!_) return;
|
|
6623
|
+
let e = () => v(!1);
|
|
6624
|
+
return window.addEventListener("scroll", e, {
|
|
6625
|
+
capture: !0,
|
|
6626
|
+
passive: !0
|
|
6627
|
+
}), window.addEventListener("resize", e), () => {
|
|
6628
|
+
window.removeEventListener("scroll", e, { capture: !0 }), window.removeEventListener("resize", e);
|
|
6629
|
+
};
|
|
6630
|
+
}, [_]), /* @__PURE__ */ m(b, {
|
|
6623
6631
|
align: a,
|
|
6624
|
-
|
|
6632
|
+
show: _,
|
|
6633
|
+
onToggle: (e) => v(e),
|
|
6634
|
+
...h,
|
|
6625
6635
|
children: [/* @__PURE__ */ p(b.Toggle, {
|
|
6626
6636
|
as: ur,
|
|
6627
6637
|
icon: e,
|
|
6628
6638
|
iconSize: t,
|
|
6629
|
-
btnClassName:
|
|
6630
|
-
trigger:
|
|
6639
|
+
btnClassName: g,
|
|
6640
|
+
trigger: f,
|
|
6631
6641
|
title: r,
|
|
6632
|
-
"aria-label": i ?? (
|
|
6642
|
+
"aria-label": i ?? (f ? void 0 : r)
|
|
6633
6643
|
}), /* @__PURE__ */ p(b.Menu, {
|
|
6634
|
-
className:
|
|
6644
|
+
className: c,
|
|
6635
6645
|
renderOnMount: !0,
|
|
6636
6646
|
popperConfig: { strategy: "fixed" },
|
|
6637
|
-
children:
|
|
6647
|
+
children: u ?? s.map((e) => {
|
|
6638
6648
|
if (e.divider) return /* @__PURE__ */ p(b.Divider, {}, e.key);
|
|
6639
|
-
let t = e.to ?
|
|
6640
|
-
as:
|
|
6649
|
+
let t = e.to ? l ? {
|
|
6650
|
+
as: l,
|
|
6641
6651
|
to: e.to
|
|
6642
6652
|
} : {
|
|
6643
6653
|
as: "a",
|
|
@@ -8165,17 +8175,16 @@ function $r({ options: e = [], value: t, onChange: n, label: r, name: i, size: a
|
|
|
8165
8175
|
return c(() => {
|
|
8166
8176
|
let e = v.current, t = y.current;
|
|
8167
8177
|
if (!e || !t) return;
|
|
8168
|
-
let n = () => {
|
|
8169
|
-
let
|
|
8170
|
-
if (!
|
|
8178
|
+
let n = (n) => {
|
|
8179
|
+
let r = e.querySelector(".segmented-option:has(.segmented-input:checked)");
|
|
8180
|
+
if (!r || !e.offsetWidth) {
|
|
8171
8181
|
t.style.opacity = "0";
|
|
8172
8182
|
return;
|
|
8173
8183
|
}
|
|
8174
|
-
|
|
8175
|
-
t.style.width = `${i.width}px`, t.style.transform = `translateX(${i.left - r.left - a}px)`;
|
|
8184
|
+
n || e.classList.remove("is-animated"), t.style.width = `${r.offsetWidth}px`, t.style.transform = `translateX(${r.offsetLeft}px)`, t.style.opacity = "1", n || requestAnimationFrame(() => v.current?.classList.add("is-animated"));
|
|
8176
8185
|
};
|
|
8177
|
-
n();
|
|
8178
|
-
let r = typeof ResizeObserver < "u" ? new ResizeObserver(n) : null;
|
|
8186
|
+
n(!0);
|
|
8187
|
+
let r = typeof ResizeObserver < "u" ? new ResizeObserver(() => n(!1)) : null;
|
|
8179
8188
|
return r?.observe(e), () => r?.disconnect();
|
|
8180
8189
|
}, [
|
|
8181
8190
|
t,
|
|
@@ -9143,9 +9152,15 @@ function bi({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
9143
9152
|
children: [/* @__PURE__ */ p("div", {
|
|
9144
9153
|
className: "timeline-title",
|
|
9145
9154
|
children: e.title
|
|
9146
|
-
}), e.at && /* @__PURE__ */
|
|
9147
|
-
className: "timeline-
|
|
9148
|
-
children: e.at
|
|
9155
|
+
}), (e.at || e.time) && /* @__PURE__ */ m("span", {
|
|
9156
|
+
className: "timeline-when",
|
|
9157
|
+
children: [e.at && /* @__PURE__ */ p("span", {
|
|
9158
|
+
className: "timeline-at",
|
|
9159
|
+
children: e.at
|
|
9160
|
+
}), e.time && /* @__PURE__ */ p("span", {
|
|
9161
|
+
className: "timeline-time",
|
|
9162
|
+
children: e.time
|
|
9163
|
+
})]
|
|
9149
9164
|
})]
|
|
9150
9165
|
}) : /* @__PURE__ */ p("div", {
|
|
9151
9166
|
className: "timeline-title",
|
|
@@ -9155,11 +9170,17 @@ function bi({ items: e = [], variant: t = "feed", orientation: n = "vertical", s
|
|
|
9155
9170
|
className: "timeline-desc",
|
|
9156
9171
|
children: e.description
|
|
9157
9172
|
}),
|
|
9158
|
-
!s && (e.at || e.by) && /* @__PURE__ */ m("div", {
|
|
9173
|
+
!s && (e.at || e.time || e.by) && /* @__PURE__ */ m("div", {
|
|
9159
9174
|
className: "timeline-meta",
|
|
9160
|
-
children: [e.at && /* @__PURE__ */
|
|
9161
|
-
className: "timeline-
|
|
9162
|
-
children: e.at
|
|
9175
|
+
children: [(e.at || e.time) && /* @__PURE__ */ m("span", {
|
|
9176
|
+
className: "timeline-when",
|
|
9177
|
+
children: [e.at && /* @__PURE__ */ p("span", {
|
|
9178
|
+
className: "timeline-at",
|
|
9179
|
+
children: e.at
|
|
9180
|
+
}), e.time && /* @__PURE__ */ p("span", {
|
|
9181
|
+
className: "timeline-time",
|
|
9182
|
+
children: e.time
|
|
9183
|
+
})]
|
|
9163
9184
|
}), e.by && /* @__PURE__ */ p("span", {
|
|
9164
9185
|
className: "timeline-by",
|
|
9165
9186
|
children: e.by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.12",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@webority/
|
|
32
|
-
"@webority/
|
|
31
|
+
"@webority/theme": "0.9.12",
|
|
32
|
+
"@webority/ui-elements": "0.9.12"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"bootstrap": "5.3.3",
|