wimui 0.17.0 → 0.18.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/dist/components/ai/ChatUI/chat-ui.module.cjs +1 -1
- package/dist/components/ai/ChatUI/chat-ui.module.js +2 -2
- package/dist/components/ai/PromptInput/prompt-input.module.cjs +1 -1
- package/dist/components/ai/PromptInput/prompt-input.module.js +1 -1
- package/dist/components/charts/GanttChart/GanttChart.cjs +1 -1
- package/dist/components/charts/GanttChart/GanttChart.js +106 -117
- package/dist/components/charts/GanttChart/gantt-chart.module.cjs +1 -1
- package/dist/components/charts/GanttChart/gantt-chart.module.js +10 -12
- package/dist/components/data-display/Avatar/avatar.module.cjs +1 -1
- package/dist/components/data-display/Avatar/avatar.module.js +10 -11
- package/dist/components/data-display/Badge/badge.module.cjs +1 -1
- package/dist/components/data-display/Badge/badge.module.js +9 -10
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +71 -73
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +9 -9
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.d.ts +2 -0
- package/dist/components/data-display/Chip/Chip.js +5 -3
- package/dist/components/data-display/Chip/chip.module.cjs +1 -1
- package/dist/components/data-display/Chip/chip.module.js +12 -13
- package/dist/components/data-display/Leaderboard/leaderboard.module.cjs +1 -1
- package/dist/components/data-display/Leaderboard/leaderboard.module.js +1 -1
- package/dist/components/data-display/SortableList/sortable-list.module.cjs +1 -1
- package/dist/components/data-display/SortableList/sortable-list.module.js +1 -1
- package/dist/components/data-display/SwipeAction/swipe-action.module.cjs +1 -1
- package/dist/components/data-display/SwipeAction/swipe-action.module.js +1 -1
- package/dist/components/data-display/Table/Table.cjs +1 -1
- package/dist/components/data-display/Table/Table.js +14 -11
- package/dist/components/data-display/Table/table.module.cjs +1 -1
- package/dist/components/data-display/Table/table.module.js +30 -29
- package/dist/components/data-display/Tag/Tag.cjs +1 -1
- package/dist/components/data-display/Tag/Tag.d.ts +6 -2
- package/dist/components/data-display/Tag/Tag.js +18 -16
- package/dist/components/data-display/Tag/tag.module.cjs +1 -1
- package/dist/components/data-display/Tag/tag.module.js +11 -12
- package/dist/components/data-display/Timeline/timeline.module.cjs +1 -1
- package/dist/components/data-display/Timeline/timeline.module.js +1 -1
- package/dist/components/feedback/Banner/banner.module.cjs +1 -1
- package/dist/components/feedback/Banner/banner.module.js +2 -2
- package/dist/components/feedback/Indicator/indicator.module.cjs +1 -1
- package/dist/components/feedback/Indicator/indicator.module.js +6 -6
- package/dist/components/feedback/Loader/loader.module.cjs +1 -1
- package/dist/components/feedback/Loader/loader.module.js +4 -4
- package/dist/components/feedback/Notification/notification.module.cjs +1 -1
- package/dist/components/feedback/Notification/notification.module.js +2 -2
- package/dist/components/feedback/Progress/progress.module.cjs +1 -1
- package/dist/components/feedback/Progress/progress.module.js +9 -10
- package/dist/components/feedback/ProgressRing/progress-ring.module.cjs +1 -1
- package/dist/components/feedback/ProgressRing/progress-ring.module.js +9 -10
- package/dist/components/feedback/ScrollProgress/scrollprogress.module.cjs +1 -1
- package/dist/components/feedback/ScrollProgress/scrollprogress.module.js +1 -1
- package/dist/components/feedback/Snackbar/snackbar.module.cjs +1 -1
- package/dist/components/feedback/Snackbar/snackbar.module.js +7 -7
- package/dist/components/feedback/Spinner/spinner.module.cjs +1 -1
- package/dist/components/feedback/Spinner/spinner.module.js +4 -4
- package/dist/components/form/Button/button.module.cjs +1 -1
- package/dist/components/form/Button/button.module.js +2 -2
- package/dist/components/form/Input/input.module.cjs +1 -1
- package/dist/components/form/Input/input.module.js +1 -1
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +1 -1
- package/dist/components/form/InputGroup/input-group.module.cjs +1 -1
- package/dist/components/form/InputGroup/input-group.module.js +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.cjs +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.js +1 -1
- package/dist/components/form/PhoneInput/phone-input.module.cjs +1 -1
- package/dist/components/form/PhoneInput/phone-input.module.js +1 -1
- package/dist/components/form/RichTextEditor/rich-text-editor.module.cjs +1 -1
- package/dist/components/form/RichTextEditor/rich-text-editor.module.js +1 -1
- package/dist/components/form/Select/select.module.cjs +1 -1
- package/dist/components/form/Select/select.module.js +1 -1
- package/dist/components/form/Textarea/textarea.module.cjs +1 -1
- package/dist/components/form/Textarea/textarea.module.js +1 -1
- package/dist/components/layout/AppShell/AppShell.cjs +1 -1
- package/dist/components/layout/AppShell/AppShell.js +61 -58
- package/dist/components/layout/AppShell/warn-discarded-sidebar.cjs +2 -0
- package/dist/components/layout/AppShell/warn-discarded-sidebar.d.ts +3 -0
- package/dist/components/layout/AppShell/warn-discarded-sidebar.js +4 -0
- package/dist/components/layout/Dashboard/dashboard.module.cjs +1 -1
- package/dist/components/layout/Dashboard/dashboard.module.js +13 -13
- package/dist/components/layout/Transition/Transition.d.ts +1 -1
- package/dist/components/media/Gallery/gallery.module.cjs +1 -1
- package/dist/components/media/Gallery/gallery.module.js +11 -11
- package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.d.ts +7 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.js +15 -14
- package/dist/components/overlay/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.js +1 -1
- package/dist/components/overlay/ContextMenu/context-menu.module.cjs +1 -1
- package/dist/components/overlay/ContextMenu/context-menu.module.js +1 -1
- package/dist/components/overlay/Menu/menu.module.cjs +1 -1
- package/dist/components/overlay/Menu/menu.module.js +1 -1
- package/dist/i18n/generated/keys.d.ts +1 -1
- package/dist/i18n/generated/resources.cjs +1 -1
- package/dist/i18n/generated/resources.js +12 -3
- package/dist/llms-full.txt +10 -7
- package/dist/llms.txt +4 -4
- package/dist/locales/en/components.json +2 -1
- package/dist/locales/ja/components.json +2 -1
- package/dist/locales/pt/components.json +2 -1
- package/dist/styles.css +2 -2
- package/dist/types/generated-intents.d.ts +3 -3
- package/dist/types/generated-tokens.d.ts +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +3 -3
- package/package.json +16 -13
|
@@ -5,31 +5,31 @@ import n from "../../../icon/chevron-right.js";
|
|
|
5
5
|
import { Icon as r } from "../../media/Icon/Icon.js";
|
|
6
6
|
import { isSameDay as i, isToday as a, useCalendar as o } from "./useCalendar.js";
|
|
7
7
|
import s from "./calendar.module.js";
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import { jsx as
|
|
8
|
+
import { useMemo as c, useState as l } from "react";
|
|
9
|
+
import u from "classnames";
|
|
10
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/data-display/Calendar/Calendar.tsx
|
|
12
|
-
var
|
|
13
|
-
let { t:
|
|
14
|
-
defaultValue:
|
|
15
|
-
value:
|
|
16
|
-
minDate:
|
|
17
|
-
maxDate:
|
|
18
|
-
disabledDates:
|
|
19
|
-
isDateDisabled:
|
|
20
|
-
weekStartsOn:
|
|
21
|
-
}), [
|
|
12
|
+
var p = ({ className: p, disabled: m = !1, value: h, defaultValue: g, onChange: _, rangeMode: v = !1, range: y, defaultRange: b, onRangeChange: x, minDate: S, maxDate: C, disabledDates: w, isDateDisabled: T, weekStartsOn: E = 0, ...D }) => {
|
|
13
|
+
let { t: O, i18n: k } = e("common"), { handlePrevMonth: A, handleNextMonth: j, handlePrevYear: M, handleNextYear: N, year: P, month: F, daysGrid: I, isDateDisabled: L } = o({
|
|
14
|
+
defaultValue: g || v && b?.start || void 0,
|
|
15
|
+
value: h || v && y?.start || void 0,
|
|
16
|
+
minDate: S,
|
|
17
|
+
maxDate: C,
|
|
18
|
+
disabledDates: w,
|
|
19
|
+
isDateDisabled: T,
|
|
20
|
+
weekStartsOn: E
|
|
21
|
+
}), [R, z] = l(b || {
|
|
22
22
|
start: null,
|
|
23
23
|
end: null
|
|
24
|
-
}),
|
|
25
|
-
if (!(
|
|
24
|
+
}), B = y || R, V = (e) => {
|
|
25
|
+
if (!(m || L(e))) if (v) {
|
|
26
26
|
let t;
|
|
27
|
-
if (!
|
|
27
|
+
if (!B.start || B.start && B.end) t = {
|
|
28
28
|
start: e,
|
|
29
29
|
end: null
|
|
30
30
|
};
|
|
31
31
|
else {
|
|
32
|
-
let n =
|
|
32
|
+
let n = B.start, r = e;
|
|
33
33
|
t = r < n ? {
|
|
34
34
|
start: r,
|
|
35
35
|
end: n
|
|
@@ -38,15 +38,15 @@ var f = ({ className: f, disabled: p = !1, value: m, defaultValue: h, onChange:
|
|
|
38
38
|
end: r
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
} else
|
|
43
|
-
},
|
|
44
|
-
if (!
|
|
41
|
+
y || z(t), x?.(t);
|
|
42
|
+
} else _?.(e);
|
|
43
|
+
}, H = (e) => {
|
|
44
|
+
if (!m) switch (e.key) {
|
|
45
45
|
case "PageUp":
|
|
46
|
-
e.preventDefault(), e.ctrlKey ?
|
|
46
|
+
e.preventDefault(), e.ctrlKey ? M() : A();
|
|
47
47
|
break;
|
|
48
48
|
case "PageDown":
|
|
49
|
-
e.preventDefault(), e.ctrlKey ?
|
|
49
|
+
e.preventDefault(), e.ctrlKey ? N() : j();
|
|
50
50
|
break;
|
|
51
51
|
case "Home":
|
|
52
52
|
e.preventDefault();
|
|
@@ -55,70 +55,68 @@ var f = ({ className: f, disabled: p = !1, value: m, defaultValue: h, onChange:
|
|
|
55
55
|
e.preventDefault();
|
|
56
56
|
break;
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
if (!
|
|
60
|
-
let t = new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = new Date(
|
|
58
|
+
}, U = (e) => v ? i(e, B.start) || i(e, B.end) : i(e, h || null), W = (e) => {
|
|
59
|
+
if (!v || !B.start || !B.end) return !1;
|
|
60
|
+
let t = new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime(), n = new Date(B.start.getFullYear(), B.start.getMonth(), B.start.getDate()).getTime(), r = new Date(B.end.getFullYear(), B.end.getMonth(), B.end.getDate()).getTime();
|
|
61
61
|
return t > n && t < r;
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
className: l("wim-calendar", s.root, p && s.disabled, f),
|
|
73
|
-
onKeyDown: B,
|
|
62
|
+
}, G = [...c(() => {
|
|
63
|
+
let e = new Intl.DateTimeFormat(k.language, {
|
|
64
|
+
weekday: "short",
|
|
65
|
+
timeZone: "UTC"
|
|
66
|
+
});
|
|
67
|
+
return Array.from({ length: 7 }, (t, n) => e.format(new Date(Date.UTC(1970, 0, 4 + n))));
|
|
68
|
+
}, [k.language])];
|
|
69
|
+
return E === 1 && G.push(G.shift()), /* @__PURE__ */ f("div", {
|
|
70
|
+
className: u("wim-calendar", s.root, m && s.disabled, p),
|
|
71
|
+
onKeyDown: H,
|
|
74
72
|
role: "application",
|
|
75
|
-
"aria-label":
|
|
76
|
-
...
|
|
77
|
-
children: [/* @__PURE__ */
|
|
73
|
+
"aria-label": O("a11y.calendar"),
|
|
74
|
+
...D,
|
|
75
|
+
children: [/* @__PURE__ */ f("div", {
|
|
78
76
|
className: s.header,
|
|
79
77
|
children: [
|
|
80
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ d("button", {
|
|
81
79
|
type: "button",
|
|
82
80
|
className: s.navBtn,
|
|
83
|
-
onClick:
|
|
84
|
-
disabled:
|
|
85
|
-
"aria-label":
|
|
86
|
-
children: /* @__PURE__ */
|
|
81
|
+
onClick: A,
|
|
82
|
+
disabled: m,
|
|
83
|
+
"aria-label": O("a11y.prev_month"),
|
|
84
|
+
children: /* @__PURE__ */ d(r, {
|
|
87
85
|
component: t,
|
|
88
86
|
size: "sm"
|
|
89
87
|
})
|
|
90
88
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ f("div", {
|
|
92
90
|
className: s.title,
|
|
93
91
|
"aria-live": "polite",
|
|
94
92
|
children: [
|
|
95
|
-
|
|
93
|
+
P,
|
|
96
94
|
" / ",
|
|
97
|
-
|
|
95
|
+
F + 1
|
|
98
96
|
]
|
|
99
97
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ d("button", {
|
|
101
99
|
type: "button",
|
|
102
100
|
className: s.navBtn,
|
|
103
|
-
onClick:
|
|
104
|
-
disabled:
|
|
105
|
-
"aria-label":
|
|
106
|
-
children: /* @__PURE__ */
|
|
101
|
+
onClick: j,
|
|
102
|
+
disabled: m,
|
|
103
|
+
"aria-label": O("a11y.next_month"),
|
|
104
|
+
children: /* @__PURE__ */ d(r, {
|
|
107
105
|
component: n,
|
|
108
106
|
size: "sm"
|
|
109
107
|
})
|
|
110
108
|
})
|
|
111
109
|
]
|
|
112
|
-
}), /* @__PURE__ */
|
|
110
|
+
}), /* @__PURE__ */ f("div", {
|
|
113
111
|
className: s.grid,
|
|
114
112
|
role: "grid",
|
|
115
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ d("div", {
|
|
116
114
|
role: "row",
|
|
117
|
-
children:
|
|
118
|
-
let n = (t + (
|
|
119
|
-
return /* @__PURE__ */
|
|
115
|
+
children: G.map((e, t) => {
|
|
116
|
+
let n = (t + (E || 0)) % 7;
|
|
117
|
+
return /* @__PURE__ */ d("div", {
|
|
120
118
|
role: "columnheader",
|
|
121
|
-
className:
|
|
119
|
+
className: u(s.weekday, {
|
|
122
120
|
[s.sunday]: n === 0,
|
|
123
121
|
[s.saturday]: n === 6
|
|
124
122
|
}),
|
|
@@ -127,36 +125,36 @@ var f = ({ className: f, disabled: p = !1, value: m, defaultValue: h, onChange:
|
|
|
127
125
|
})
|
|
128
126
|
}), (() => {
|
|
129
127
|
let e = [];
|
|
130
|
-
for (let t = 0; t <
|
|
131
|
-
return e.map((e, t) => /* @__PURE__ */
|
|
128
|
+
for (let t = 0; t < I.length; t += 7) e.push(I.slice(t, t + 7));
|
|
129
|
+
return e.map((e, t) => /* @__PURE__ */ d("div", {
|
|
132
130
|
role: "row",
|
|
133
131
|
children: e.map((e, n) => {
|
|
134
|
-
let r = t * 7 + n, o =
|
|
135
|
-
return /* @__PURE__ */
|
|
132
|
+
let r = t * 7 + n, o = U(e.date), c = W(e.date), l = m || L(e.date), f = a(e.date), p = !e.currentMonth, h = v && i(e.date, B.start), g = v && i(e.date, B.end), _ = `${e.date.getFullYear()}-${e.date.getMonth() + 1}-${e.date.getDate()}`;
|
|
133
|
+
return /* @__PURE__ */ d("button", {
|
|
136
134
|
type: "button",
|
|
137
135
|
role: "gridcell",
|
|
138
136
|
"aria-selected": o,
|
|
139
137
|
"aria-current": f ? "date" : void 0,
|
|
140
138
|
"data-calendar-day": !0,
|
|
141
139
|
"data-selected": o || void 0,
|
|
142
|
-
"data-other-month":
|
|
143
|
-
className:
|
|
140
|
+
"data-other-month": p || void 0,
|
|
141
|
+
className: u(s.day, {
|
|
144
142
|
[s.selected]: o,
|
|
145
143
|
[s.inRange]: c,
|
|
146
144
|
[s.rangeStart]: h,
|
|
147
145
|
[s.rangeEnd]: g,
|
|
148
|
-
[s.disabled]:
|
|
146
|
+
[s.disabled]: l,
|
|
149
147
|
[s.today]: f,
|
|
150
|
-
[s.otherMonth]:
|
|
148
|
+
[s.otherMonth]: p,
|
|
151
149
|
[s.sunday]: e.date.getDay() === 0,
|
|
152
150
|
[s.saturday]: e.date.getDay() === 6
|
|
153
151
|
}),
|
|
154
|
-
onClick: () =>
|
|
152
|
+
onClick: () => V(e.date),
|
|
155
153
|
onKeyDown: (t) => {
|
|
156
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
154
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), V(e.date));
|
|
157
155
|
},
|
|
158
|
-
disabled:
|
|
159
|
-
"aria-label":
|
|
156
|
+
disabled: l,
|
|
157
|
+
"aria-label": _,
|
|
160
158
|
children: e.date.getDate()
|
|
161
159
|
}, r);
|
|
162
160
|
})
|
|
@@ -166,4 +164,4 @@ var f = ({ className: f, disabled: p = !1, value: m, defaultValue: h, onChange:
|
|
|
166
164
|
});
|
|
167
165
|
};
|
|
168
166
|
//#endregion
|
|
169
|
-
export {
|
|
167
|
+
export { p as Calendar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_p0w58_2`,t=`_disabled_p0w58_12`,n=`_header_p0w58_15`,r=`_day_p0w58_16`,i=`_title_p0w58_25`,a=`_navBtn_p0w58_30`,o=`_grid_p0w58_51`,s=`_weekday_p0w58_59`,c=`_sunday_p0w58_69`,l=`_saturday_p0w58_72`,u=`_selected_p0w58_89`,d=`_otherMonth_p0w58_98`,f=`_today_p0w58_101`,p=`_inRange_p0w58_114`,m=`_rangeStart_p0w58_121`,h=`_rangeEnd_p0w58_125`,g={root:e,disabled:t,header:n,day:r,title:i,navBtn:a,grid:o,weekday:s,sunday:c,saturday:l,selected:u,otherMonth:d,today:f,inRange:p,rangeStart:m,rangeEnd:h};exports.day=r,exports.default=g,exports.disabled=t,exports.grid=o,exports.header=n,exports.inRange=p,exports.navBtn=a,exports.otherMonth=d,exports.rangeEnd=h,exports.rangeStart=m,exports.root=e,exports.saturday=l,exports.selected=u,exports.sunday=c,exports.title=i,exports.today=f,exports.weekday=s;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Calendar/calendar.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_p0w58_2", t = "_disabled_p0w58_12", n = "_header_p0w58_15", r = "_day_p0w58_16", i = "_title_p0w58_25", a = "_navBtn_p0w58_30", o = "_grid_p0w58_51", s = "_weekday_p0w58_59", c = "_sunday_p0w58_69", l = "_saturday_p0w58_72", u = "_selected_p0w58_89", d = "_otherMonth_p0w58_98", f = "_today_p0w58_101", p = "_inRange_p0w58_114", m = "_rangeStart_p0w58_121", h = "_rangeEnd_p0w58_125", g = {
|
|
4
4
|
root: e,
|
|
5
5
|
disabled: t,
|
|
6
6
|
header: n,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
day: r,
|
|
8
|
+
title: i,
|
|
9
|
+
navBtn: a,
|
|
10
|
+
grid: o,
|
|
11
|
+
weekday: s,
|
|
12
|
+
sunday: c,
|
|
13
|
+
saturday: l,
|
|
14
14
|
selected: u,
|
|
15
15
|
otherMonth: d,
|
|
16
16
|
today: f,
|
|
@@ -19,4 +19,4 @@ var e = "_root_1ksv8_2", t = "_disabled_1ksv8_12", n = "_header_1ksv8_16", r = "
|
|
|
19
19
|
rangeEnd: h
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|
|
22
|
-
export {
|
|
22
|
+
export { r as day, g as default, t as disabled, o as grid, n as header, p as inRange, a as navBtn, d as otherMonth, h as rangeEnd, m as rangeStart, e as root, l as saturday, u as selected, c as sunday, i as title, f as today, s as weekday };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../icon/close.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../_internal/mergeRefs.cjs"),o=require("./chip.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({asChild:e=!1,children:s,content:u,onClick:d,onDelete:f,avatar:p,icon:m,selected:h=!1,disabled:g=!1,intent:_=`primary`,variant:v=`solid`,size:y=`md`,deleteAriaLabel:b,className:x,...S},C)=>{let{t:w}=n.useWimTranslation(`common`),T=b??w(`a11y.delete`),E=e?t.Root:d?`button`:`span`,D=u??s;return(0,l.jsxs)(E,{ref:a.mergeRefs(C),className:(0,c.default)(`wim-chip`,o.default.root,o.default[_],o.default[v],o.default[y],h&&o.default.selected,d&&!g&&o.default.clickable,g&&o.default.disabled,x),onClick:g?void 0:d,...!e&&d?{disabled:g}:{},type:e?void 0:d?`button`:void 0,...S,children:[p&&(0,l.jsx)(`span`,{className:o.default.avatar,children:p}),!p&&m&&(0,l.jsx)(`span`,{className:o.default.icon,children:m}),(0,l.jsx)(
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../icon/close.cjs"),i=require("../../media/Icon/Icon.cjs"),a=require("../../_internal/mergeRefs.cjs"),o=require("./chip.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=s.default.forwardRef(({asChild:e=!1,children:s,content:u,onClick:d,onDelete:f,avatar:p,icon:m,selected:h=!1,disabled:g=!1,intent:_=`primary`,variant:v=`solid`,size:y=`md`,deleteAriaLabel:b,className:x,...S},C)=>{let{t:w}=n.useWimTranslation(`common`),T=b??w(`a11y.delete`);if(e&&f)throw Error("[wimui] Chip: `asChild` cannot be combined with `onDelete`. Use a removable Chip without asChild, or put the delete control on the slotted child yourself.");let E=e?t.Root:d?`button`:`span`,D=u??s;return(0,l.jsxs)(E,{ref:a.mergeRefs(C),className:(0,c.default)(`wim-chip`,o.default.root,o.default[_],o.default[v],o.default[y],h&&o.default.selected,d&&!g&&o.default.clickable,g&&o.default.disabled,x),onClick:g?void 0:d,...!e&&d?{disabled:g}:{},type:e?void 0:d?`button`:void 0,...S,children:[p&&(0,l.jsx)(`span`,{className:o.default.avatar,children:p}),!p&&m&&(0,l.jsx)(`span`,{className:o.default.icon,children:m}),e?(0,l.jsx)(t.Slottable,{children:D}):(0,l.jsx)(`span`,{className:o.default.label,children:D}),f&&!g&&(0,l.jsx)(`button`,{type:`button`,className:o.default.delete,"data-chip-delete":!0,onClick:e=>{e.stopPropagation(),f(e)},"aria-label":T,children:(0,l.jsx)(i.Icon,{component:r.default,size:`sm`})})]})});u.displayName=`Chip`,exports.Chip=u;
|
|
@@ -3,6 +3,7 @@ import { ComponentSizeBasic, IndicatorIntent, IndicatorVariant } from '../../../
|
|
|
3
3
|
export type ChipProps = React.HTMLAttributes<HTMLElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* If true, the chip will be rendered as its child, merging its props onto that child.
|
|
6
|
+
* Cannot be combined with `onDelete` (T99).
|
|
6
7
|
*/
|
|
7
8
|
asChild?: boolean;
|
|
8
9
|
/** Content to display */
|
|
@@ -38,6 +39,7 @@ export type ChipProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
38
39
|
export declare const Chip: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
|
|
39
40
|
/**
|
|
40
41
|
* If true, the chip will be rendered as its child, merging its props onto that child.
|
|
42
|
+
* Cannot be combined with `onDelete` (T99).
|
|
41
43
|
*/
|
|
42
44
|
asChild?: boolean;
|
|
43
45
|
/** Content to display */
|
|
@@ -10,7 +10,9 @@ import c from "classnames";
|
|
|
10
10
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/data-display/Chip/Chip.tsx
|
|
12
12
|
var d = s.forwardRef(({ asChild: s = !1, children: d, content: f, onClick: p, onDelete: m, avatar: h, icon: g, selected: _ = !1, disabled: v = !1, intent: y = "primary", variant: b = "solid", size: x = "md", deleteAriaLabel: S, className: C, ...w }, T) => {
|
|
13
|
-
let { t: E } = n("common"), D = S ?? E("a11y.delete")
|
|
13
|
+
let { t: E } = n("common"), D = S ?? E("a11y.delete");
|
|
14
|
+
if (s && m) throw Error("[wimui] Chip: `asChild` cannot be combined with `onDelete`. Use a removable Chip without asChild, or put the delete control on the slotted child yourself.");
|
|
15
|
+
let O = s ? e : p ? "button" : "span", k = f ?? d;
|
|
14
16
|
return /* @__PURE__ */ u(O, {
|
|
15
17
|
ref: a(T),
|
|
16
18
|
className: c("wim-chip", o.root, o[y], o[b], o[x], _ && o.selected, p && !v && o.clickable, v && o.disabled, C),
|
|
@@ -27,9 +29,9 @@ var d = s.forwardRef(({ asChild: s = !1, children: d, content: f, onClick: p, on
|
|
|
27
29
|
className: o.icon,
|
|
28
30
|
children: g
|
|
29
31
|
}),
|
|
30
|
-
/* @__PURE__ */ l("span", {
|
|
32
|
+
s ? /* @__PURE__ */ l(t, { children: k }) : /* @__PURE__ */ l("span", {
|
|
31
33
|
className: o.label,
|
|
32
|
-
children:
|
|
34
|
+
children: k
|
|
33
35
|
}),
|
|
34
36
|
m && !v && /* @__PURE__ */ l("button", {
|
|
35
37
|
type: "button",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_rvx31_2`,t=`_md_rvx31_19`,n=`_avatar_rvx31_24`,r=`_sm_rvx31_29`,i=`_lg_rvx31_39`,a=`_clickable_rvx31_49`,o=`_primary_rvx31_60`,s=`_solid_rvx31_60`,c=`_outline_rvx31_66`,l=`_subtle_rvx31_71`,u=`_success_rvx31_77`,d=`_warning_rvx31_94`,f=`_danger_rvx31_111`,p=`_info_rvx31_128`,m=`_neutral_rvx31_145`,h=`_selected_rvx31_162`,g=`_disabled_rvx31_165`,_=`_label_rvx31_189`,v=`_icon_rvx31_194`,y={root:e,md:t,avatar:n,sm:r,lg:i,clickable:a,primary:o,solid:s,outline:c,subtle:l,success:u,warning:d,danger:f,info:p,neutral:m,selected:h,disabled:g,delete:`_delete_rvx31_173`,label:_,icon:v};exports.avatar=n,exports.clickable=a,exports.danger=f,exports.default=y,exports.disabled=g,exports.icon=v,exports.info=p,exports.label=_,exports.lg=i,exports.md=t,exports.neutral=m,exports.outline=c,exports.primary=o,exports.root=e,exports.selected=h,exports.sm=r,exports.solid=s,exports.subtle=l,exports.success=u,exports.warning=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Chip/chip.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_rvx31_2", t = "_md_rvx31_19", n = "_avatar_rvx31_24", r = "_sm_rvx31_29", i = "_lg_rvx31_39", a = "_clickable_rvx31_49", o = "_primary_rvx31_60", s = "_solid_rvx31_60", c = "_outline_rvx31_66", l = "_subtle_rvx31_71", u = "_success_rvx31_77", d = "_warning_rvx31_94", f = "_danger_rvx31_111", p = "_info_rvx31_128", m = "_neutral_rvx31_145", h = "_selected_rvx31_162", g = "_disabled_rvx31_165", _ = "_label_rvx31_189", v = "_icon_rvx31_194", y = {
|
|
4
4
|
root: e,
|
|
5
5
|
md: t,
|
|
6
6
|
avatar: n,
|
|
@@ -11,17 +11,16 @@ var e = "_root_1ugo3_2", t = "_md_1ugo3_19", n = "_avatar_1ugo3_26", r = "_sm_1u
|
|
|
11
11
|
solid: s,
|
|
12
12
|
outline: c,
|
|
13
13
|
subtle: l,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
icon: y
|
|
14
|
+
success: u,
|
|
15
|
+
warning: d,
|
|
16
|
+
danger: f,
|
|
17
|
+
info: p,
|
|
18
|
+
neutral: m,
|
|
19
|
+
selected: h,
|
|
20
|
+
disabled: g,
|
|
21
|
+
delete: "_delete_rvx31_173",
|
|
22
|
+
label: _,
|
|
23
|
+
icon: v
|
|
25
24
|
};
|
|
26
25
|
//#endregion
|
|
27
|
-
export { n as avatar, a as clickable,
|
|
26
|
+
export { n as avatar, a as clickable, f as danger, y as default, g as disabled, v as icon, p as info, _ as label, i as lg, t as md, m as neutral, c as outline, o as primary, e as root, h as selected, r as sm, s as solid, l as subtle, u as success, d as warning };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_9dy8y_3`,t=`_sm_9dy8y_13`,n=`_item_9dy8y_13`,r=`_rank_9dy8y_17`,i=`_avatar_9dy8y_17`,a=`_lg_9dy8y_21`,o=`_highlight_9dy8y_39`,s=`_rank1_9dy8y_43`,c=`_rank2_9dy8y_55`,l=`_rank3_9dy8y_59`,u=`_name_9dy8y_84`,d=`_score_9dy8y_92`,f=`_scoreValue_9dy8y_98`,p=`_unit_9dy8y_103`,m={root:e,sm:t,item:n,rank:r,avatar:i,lg:a,highlight:o,rank1:s,rank2:c,rank3:l,name:u,score:d,scoreValue:f,unit:p};exports.avatar=i,exports.default=m,exports.highlight=o,exports.item=n,exports.lg=a,exports.name=u,exports.rank=r,exports.rank1=s,exports.rank2=c,exports.rank3=l,exports.root=e,exports.score=d,exports.scoreValue=f,exports.sm=t,exports.unit=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Leaderboard/leaderboard.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_9dy8y_3", t = "_sm_9dy8y_13", n = "_item_9dy8y_13", r = "_rank_9dy8y_17", i = "_avatar_9dy8y_17", a = "_lg_9dy8y_21", o = "_highlight_9dy8y_39", s = "_rank1_9dy8y_43", c = "_rank2_9dy8y_55", l = "_rank3_9dy8y_59", u = "_name_9dy8y_84", d = "_score_9dy8y_92", f = "_scoreValue_9dy8y_98", p = "_unit_9dy8y_103", m = {
|
|
4
4
|
root: e,
|
|
5
5
|
sm: t,
|
|
6
6
|
item: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_9r5ds_3`,t=`_item_9r5ds_13`,n=`_disabled_9r5ds_26`,r=`_dragging_9r5ds_37`,i=`_over_9r5ds_46`,a=`_dragHandle_9r5ds_67`,o={root:e,item:t,disabled:n,dragging:r,over:i,dragHandle:a};exports.default=o,exports.disabled=n,exports.dragHandle=a,exports.dragging=r,exports.item=t,exports.over=i,exports.root=e;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/SortableList/sortable-list.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_9r5ds_3", t = "_item_9r5ds_13", n = "_disabled_9r5ds_26", r = "_dragging_9r5ds_37", i = "_over_9r5ds_46", a = "_dragHandle_9r5ds_67", o = {
|
|
4
4
|
root: e,
|
|
5
5
|
item: t,
|
|
6
6
|
disabled: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_container_8pbgw_2`,t=`_actions_8pbgw_10`,n=`_left_8pbgw_17`,r=`_right_8pbgw_20`,i=`_action_8pbgw_10`,a=`_primary_8pbgw_45`,o=`_danger_8pbgw_48`,s=`_warning_8pbgw_51`,c=`_success_8pbgw_55`,l=`_neutral_8pbgw_58`,u=`_label_8pbgw_61`,d=`_content_8pbgw_64`,f={container:e,actions:t,left:n,right:r,action:i,primary:a,danger:o,warning:s,success:c,neutral:l,label:u,content:d};exports.action=i,exports.actions=t,exports.container=e,exports.content=d,exports.danger=o,exports.default=f,exports.label=u,exports.left=n,exports.neutral=l,exports.primary=a,exports.right=r,exports.success=c,exports.warning=s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/SwipeAction/swipe-action.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_container_8pbgw_2", t = "_actions_8pbgw_10", n = "_left_8pbgw_17", r = "_right_8pbgw_20", i = "_action_8pbgw_10", a = "_primary_8pbgw_45", o = "_danger_8pbgw_48", s = "_warning_8pbgw_51", c = "_success_8pbgw_55", l = "_neutral_8pbgw_58", u = "_label_8pbgw_61", d = "_content_8pbgw_64", f = {
|
|
4
4
|
container: e,
|
|
5
5
|
actions: t,
|
|
6
6
|
left: n,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../icon/chevron-down.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("./table.module.cjs"),a=require("./useTableSort.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=o.default.forwardRef(({asChild:e=!1,striped:n=!1,bordered:r=!1,hoverable:a=!1,fullWidth:o=!1,stickyHeader:l=!1,scrollbar:u=`default`,mobileCard:d=!1,height:f,maxHeight:p,containerClassName:m,card:h=!1,className:g,children:_,...v},y)=>{let b={height:f,maxHeight:p,overflow:f||p?`auto`:void 0},x=e?t.Root:`table`;return(0,c.jsx)(`div`,{className:(0,s.default)(i.default.container,l&&i.default.sticky,u===`subtle`&&i.default.subtleScrollbar,u===`hidden`&&i.default.noScrollbar,h&&i.default.cardContainer,m),style:b,tabIndex:f||p?0:void 0,role:`none`,"data-testid":`table-container`,children:(0,c.jsx)(x,{className:(0,s.default)(i.default.root,n&&i.default.striped,r&&i.default.bordered,a&&i.default.hoverable,o&&i.default.fullWidth,l&&i.default.stickyHeader,d===`md`?i.default.mobileCardMd:d&&i.default.mobileCard,`wim-table`,g),ref:y,"data-testid":`table-root`,...v,children:(0,c.jsx)(t.Slottable,{children:_})})})}),u=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...a},o)=>(0,c.jsx)(e?t.Root:`thead`,{className:(0,s.default)(i.default.header,n),ref:o,"data-testid":`table-header`,...a,children:(0,c.jsx)(t.Slottable,{children:r})})),d=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...a},o)=>(0,c.jsx)(e?t.Root:`tbody`,{className:(0,s.default)(i.default.body,n),ref:o,"data-testid":`table-body`,...a,children:(0,c.jsx)(t.Slottable,{children:r})})),f=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...i},a)=>(0,c.jsx)(e?t.Root:`tfoot`,{className:n,ref:a,"data-testid":`table-footer`,...i,children:(0,c.jsx)(t.Slottable,{children:r})})),p=o.default.forwardRef(({asChild:e=!1,selected:n=!1,className:r,children:a,...o},l)=>(0,c.jsx)(e?t.Root:`tr`,{className:(0,s.default)(i.default.row,n&&i.default.selected,r),ref:l,"data-testid":`table-row`,...o,children:(0,c.jsx)(t.Slottable,{children:a})})),m=o.default.forwardRef(({asChild:e=!1,sortable:a=!1,sortDirection:o=`none`,onSort:l,selection:u=!1,stickyLeft:d=!1,stickyRight:f=!1,leftOffset:p,rightOffset:m,stickyZIndex:h,className:g,style:_,children:v,...y},b)=>(0,c.jsx)(e?t.Root:`th`,{className:(0,s.default)(i.default.head,a&&i.default.sortable,u&&i.default.selection,d&&i.default.stickyLeft,f&&i.default.stickyRight,g),style:{..._,left:d?p===void 0?0:p:void 0,right:f?m===void 0?0:m:void 0,zIndex:h===void 0?void 0:h},ref:b,"data-testid":`table-head`,...y,onClick:a?l:y.onClick,tabIndex:y.tabIndex===void 0?a?0:void 0:y.tabIndex,"aria-sort":a?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,onKeyDown:e=>{a&&l&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(e)),y.onKeyDown?.(e)},children:(0,c.jsxs)(`div`,{className:i.default.headContent,children:[(0,c.jsx)(t.Slottable,{children:v}),a&&(0,c.jsx)(`span`,{className:(0,s.default)(i.default.sortIcon,i.default[o]),children:(0,c.jsx)(r.Icon,{component:n.default,size:`sm`})})]})})),h=o.default.forwardRef(({asChild:e=!1,selection:n=!1,label:r,stickyLeft:a=!1,stickyRight:o=!1,leftOffset:l,rightOffset:u,stickyZIndex:d,className:f,style:p,children:m,...h},g)=>(0,c.jsx)(e?t.Root:`td`,{className:(0,s.default)(i.default.cell,n&&i.default.selection,a&&i.default.stickyLeft,o&&i.default.stickyRight,f),style:{...p,left:a?l===void 0?0:l:void 0,right:o?u===void 0?0:u:void 0,zIndex:d===void 0?void 0:d},"data-label":r,ref:g,"data-testid":`table-cell`,...h,children:(0,c.jsx)(t.Slottable,{children:m})}));l.displayName=`Table`,u.displayName=`Table.Header`,d.displayName=`Table.Body`,f.displayName=`Table.Footer`,p.displayName=`Table.Row`,m.displayName=`Table.Head`,h.displayName=`Table.Cell`;var g=l;g.Header=u,g.Body=d,g.Footer=f,g.Row=p,g.Head=m,g.Cell=h,exports.Table=g,exports.default=g,exports.TableBody=d,exports.TableCell=h,exports.TableFooter=f,exports.TableHead=m,exports.TableHeader=u,exports.TableRow=p,exports.getNextSortDirection=a.getNextSortDirection,exports.useTableSort=a.useTableSort;
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../icon/chevron-down.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("./table.module.cjs"),a=require("./useTableSort.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=o.default.forwardRef(({asChild:e=!1,striped:n=!1,bordered:r=!1,hoverable:a=!1,fullWidth:o=!1,stickyHeader:l=!1,scrollbar:u=`default`,mobileCard:d=!1,height:f,maxHeight:p,containerClassName:m,card:h=!1,className:g,children:_,...v},y)=>{let b={height:f,maxHeight:p,overflow:f||p?`auto`:void 0},x=e?t.Root:`table`;return(0,c.jsx)(`div`,{className:i.default.scope,children:(0,c.jsx)(`div`,{className:(0,s.default)(i.default.container,l&&i.default.sticky,u===`subtle`&&i.default.subtleScrollbar,u===`hidden`&&i.default.noScrollbar,h&&i.default.cardContainer,m),style:b,tabIndex:f||p?0:void 0,role:`none`,"data-testid":`table-container`,children:(0,c.jsx)(x,{className:(0,s.default)(i.default.root,n&&i.default.striped,r&&i.default.bordered,a&&i.default.hoverable,o&&i.default.fullWidth,l&&i.default.stickyHeader,d===`md`?i.default.mobileCardMd:d&&i.default.mobileCard,`wim-table`,g),ref:y,"data-testid":`table-root`,...v,children:(0,c.jsx)(t.Slottable,{children:_})})})})}),u=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...a},o)=>(0,c.jsx)(e?t.Root:`thead`,{className:(0,s.default)(i.default.header,n),ref:o,"data-testid":`table-header`,...a,children:(0,c.jsx)(t.Slottable,{children:r})})),d=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...a},o)=>(0,c.jsx)(e?t.Root:`tbody`,{className:(0,s.default)(i.default.body,n),ref:o,"data-testid":`table-body`,...a,children:(0,c.jsx)(t.Slottable,{children:r})})),f=o.default.forwardRef(({asChild:e=!1,className:n,children:r,...i},a)=>(0,c.jsx)(e?t.Root:`tfoot`,{className:n,ref:a,"data-testid":`table-footer`,...i,children:(0,c.jsx)(t.Slottable,{children:r})})),p=o.default.forwardRef(({asChild:e=!1,selected:n=!1,className:r,children:a,...o},l)=>(0,c.jsx)(e?t.Root:`tr`,{className:(0,s.default)(i.default.row,n&&i.default.selected,r),ref:l,"data-testid":`table-row`,...o,children:(0,c.jsx)(t.Slottable,{children:a})})),m=o.default.forwardRef(({asChild:e=!1,sortable:a=!1,sortDirection:o=`none`,onSort:l,selection:u=!1,stickyLeft:d=!1,stickyRight:f=!1,leftOffset:p,rightOffset:m,stickyZIndex:h,className:g,style:_,children:v,...y},b)=>(0,c.jsx)(e?t.Root:`th`,{className:(0,s.default)(i.default.head,a&&i.default.sortable,u&&i.default.selection,d&&i.default.stickyLeft,f&&i.default.stickyRight,g),style:{..._,left:d?p===void 0?0:p:void 0,right:f?m===void 0?0:m:void 0,zIndex:h===void 0?void 0:h},ref:b,"data-testid":`table-head`,...y,onClick:a?l:y.onClick,tabIndex:y.tabIndex===void 0?a?0:void 0:y.tabIndex,"aria-sort":a?o===`asc`?`ascending`:o===`desc`?`descending`:`none`:void 0,onKeyDown:e=>{a&&l&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(e)),y.onKeyDown?.(e)},children:(0,c.jsxs)(`div`,{className:i.default.headContent,children:[(0,c.jsx)(t.Slottable,{children:v}),a&&(0,c.jsx)(`span`,{className:(0,s.default)(i.default.sortIcon,i.default[o]),children:(0,c.jsx)(r.Icon,{component:n.default,size:`sm`})})]})})),h=o.default.forwardRef(({asChild:e=!1,selection:n=!1,label:r,stickyLeft:a=!1,stickyRight:o=!1,leftOffset:l,rightOffset:u,stickyZIndex:d,className:f,style:p,children:m,...h},g)=>(0,c.jsx)(e?t.Root:`td`,{className:(0,s.default)(i.default.cell,n&&i.default.selection,a&&i.default.stickyLeft,o&&i.default.stickyRight,f),style:{...p,left:a?l===void 0?0:l:void 0,right:o?u===void 0?0:u:void 0,zIndex:d===void 0?void 0:d},"data-label":r,ref:g,"data-testid":`table-cell`,...h,children:(0,c.jsx)(t.Slottable,{children:m})}));l.displayName=`Table`,u.displayName=`Table.Header`,d.displayName=`Table.Body`,f.displayName=`Table.Footer`,p.displayName=`Table.Row`,m.displayName=`Table.Head`,h.displayName=`Table.Cell`;var g=l;g.Header=u,g.Body=d,g.Footer=f,g.Row=p,g.Head=m,g.Cell=h,exports.Table=g,exports.default=g,exports.TableBody=d,exports.TableCell=h,exports.TableFooter=f,exports.TableHead=m,exports.TableHeader=u,exports.TableRow=p,exports.getNextSortDirection=a.getNextSortDirection,exports.useTableSort=a.useTableSort;
|
|
@@ -15,17 +15,20 @@ var d = s.forwardRef(({ asChild: n = !1, striped: r = !1, bordered: a = !1, hove
|
|
|
15
15
|
overflow: p || m ? "auto" : void 0
|
|
16
16
|
}, S = n ? e : "table";
|
|
17
17
|
return /* @__PURE__ */ l("div", {
|
|
18
|
-
className:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
18
|
+
className: i.scope,
|
|
19
|
+
children: /* @__PURE__ */ l("div", {
|
|
20
|
+
className: c(i.container, u && i.sticky, d === "subtle" && i.subtleScrollbar, d === "hidden" && i.noScrollbar, g && i.cardContainer, h),
|
|
21
|
+
style: x,
|
|
22
|
+
tabIndex: p || m ? 0 : void 0,
|
|
23
|
+
role: "none",
|
|
24
|
+
"data-testid": "table-container",
|
|
25
|
+
children: /* @__PURE__ */ l(S, {
|
|
26
|
+
className: c(i.root, r && i.striped, a && i.bordered, o && i.hoverable, s && i.fullWidth, u && i.stickyHeader, f === "md" ? i.mobileCardMd : f && i.mobileCard, "wim-table", _),
|
|
27
|
+
ref: b,
|
|
28
|
+
"data-testid": "table-root",
|
|
29
|
+
...y,
|
|
30
|
+
children: /* @__PURE__ */ l(t, { children: v })
|
|
31
|
+
})
|
|
29
32
|
})
|
|
30
33
|
});
|
|
31
34
|
}), f = s.forwardRef(({ asChild: n = !1, className: r, children: a, ...o }, s) => /* @__PURE__ */ l(n ? e : "thead", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_scope_wv4j1_6`,t=`_container_wv4j1_16`,n=`_mobileCard_wv4j1_24`,r=`_mobileCardMd_wv4j1_24`,i=`_sticky_wv4j1_27`,a=`_cardContainer_wv4j1_30`,o=`_root_wv4j1_5`,s=`_fullWidth_wv4j1_75`,c=`_striped_wv4j1_78`,l=`_bordered_wv4j1_82`,u=`_hoverable_wv4j1_89`,d=`_stickyLeft_wv4j1_93`,f=`_stickyRight_wv4j1_93`,p=`_stickyHeader_wv4j1_96`,m=`_selection_wv4j1_197`,h=`_header_wv4j1_22`,g=`_body_wv4j1_22`,_=`_row_wv4j1_314`,v=`_selected_wv4j1_319`,y=`_head_wv4j1_22`,b=`_sortable_wv4j1_330`,x=`_cell_wv4j1_357`,S=`_headContent_wv4j1_387`,C=`_sortIcon_wv4j1_395`,w=`_asc_wv4j1_400`,T=`_desc_wv4j1_404`,E=`_noScrollbar_wv4j1_407`,D=`_subtleScrollbar_wv4j1_415`,O={scope:e,container:t,mobileCard:n,mobileCardMd:r,sticky:i,cardContainer:a,root:o,fullWidth:s,striped:c,bordered:l,hoverable:u,stickyLeft:d,stickyRight:f,stickyHeader:p,selection:m,header:h,body:g,row:_,selected:v,head:y,sortable:b,cell:x,headContent:S,sortIcon:C,asc:w,desc:T,noScrollbar:E,subtleScrollbar:D};exports.asc=w,exports.body=g,exports.bordered=l,exports.cardContainer=a,exports.cell=x,exports.container=t,exports.default=O,exports.desc=T,exports.fullWidth=s,exports.head=y,exports.headContent=S,exports.header=h,exports.hoverable=u,exports.mobileCard=n,exports.mobileCardMd=r,exports.noScrollbar=E,exports.root=o,exports.row=_,exports.scope=e,exports.selected=v,exports.selection=m,exports.sortIcon=C,exports.sortable=b,exports.sticky=i,exports.stickyHeader=p,exports.stickyLeft=d,exports.stickyRight=f,exports.striped=c,exports.subtleScrollbar=D;
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/data-display/Table/table.module.scss
|
|
3
|
-
var e = "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
3
|
+
var e = "_scope_wv4j1_6", t = "_container_wv4j1_16", n = "_mobileCard_wv4j1_24", r = "_mobileCardMd_wv4j1_24", i = "_sticky_wv4j1_27", a = "_cardContainer_wv4j1_30", o = "_root_wv4j1_5", s = "_fullWidth_wv4j1_75", c = "_striped_wv4j1_78", l = "_bordered_wv4j1_82", u = "_hoverable_wv4j1_89", d = "_stickyLeft_wv4j1_93", f = "_stickyRight_wv4j1_93", p = "_stickyHeader_wv4j1_96", m = "_selection_wv4j1_197", h = "_header_wv4j1_22", g = "_body_wv4j1_22", _ = "_row_wv4j1_314", v = "_selected_wv4j1_319", y = "_head_wv4j1_22", b = "_sortable_wv4j1_330", x = "_cell_wv4j1_357", S = "_headContent_wv4j1_387", C = "_sortIcon_wv4j1_395", w = "_asc_wv4j1_400", T = "_desc_wv4j1_404", E = "_noScrollbar_wv4j1_407", D = "_subtleScrollbar_wv4j1_415", O = {
|
|
4
|
+
scope: e,
|
|
5
|
+
container: t,
|
|
6
|
+
mobileCard: n,
|
|
7
|
+
mobileCardMd: r,
|
|
8
|
+
sticky: i,
|
|
9
|
+
cardContainer: a,
|
|
10
|
+
root: o,
|
|
11
|
+
fullWidth: s,
|
|
12
|
+
striped: c,
|
|
13
|
+
bordered: l,
|
|
14
|
+
hoverable: u,
|
|
15
|
+
stickyLeft: d,
|
|
16
|
+
stickyRight: f,
|
|
17
|
+
stickyHeader: p,
|
|
18
|
+
selection: m,
|
|
19
|
+
header: h,
|
|
20
|
+
body: g,
|
|
21
|
+
row: _,
|
|
22
|
+
selected: v,
|
|
23
|
+
head: y,
|
|
24
|
+
sortable: b,
|
|
25
|
+
cell: x,
|
|
26
|
+
headContent: S,
|
|
27
|
+
sortIcon: C,
|
|
28
|
+
asc: w,
|
|
29
|
+
desc: T,
|
|
30
|
+
noScrollbar: E,
|
|
31
|
+
subtleScrollbar: D
|
|
31
32
|
};
|
|
32
33
|
//#endregion
|
|
33
|
-
export {
|
|
34
|
+
export { w as asc, g as body, l as bordered, a as cardContainer, x as cell, t as container, O as default, T as desc, s as fullWidth, y as head, S as headContent, h as header, u as hoverable, n as mobileCard, r as mobileCardMd, E as noScrollbar, o as root, _ as row, e as scope, v as selected, m as selection, C as sortIcon, b as sortable, i as sticky, p as stickyHeader, d as stickyLeft, f as stickyRight, c as striped, D as subtleScrollbar };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/close.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("../../_internal/IndicatorBase.cjs"),a=require("./tag.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=o.default.forwardRef(({
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../icon/close.cjs"),r=require("../../media/Icon/Icon.cjs"),i=require("../../_internal/IndicatorBase.cjs"),a=require("./tag.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=o.default.forwardRef(({asChild:e=!1,children:o,content:l,icon:u,onDelete:d,disabled:f,interactive:p=!1,className:m,...h},g)=>{let{t:_}=t.useWimTranslation(`common`);if(e&&d)throw Error("[wimui] Tag: `asChild` cannot be combined with `onDelete`. Use a removable Tag without asChild, or put the delete control on the slotted child yourself.");let v=l??o;return(0,c.jsx)(i.IndicatorBase,{ref:g,asChild:e,styles:a.default,icon:u,className:(0,s.default)(`wim-tag`,m,{[a.default.disabled]:f}),interactive:p,...h,children:d?(0,c.jsxs)(c.Fragment,{children:[v,(0,c.jsx)(`button`,{type:`button`,className:a.default.closeButton,onClick:e=>{e.stopPropagation(),d(e)},"aria-label":_(`a11y.close`),children:(0,c.jsx)(r.Icon,{component:n.default,size:`sm`})})]}):v})});l.displayName=`Tag`,exports.Tag=l;
|