@godxjp/ui 13.5.1 → 13.6.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/app/index.js +4 -4
- package/dist/{checkbox-iicX1PfF.d.ts → checkbox-DAIwpMHO.d.ts} +1 -1
- package/dist/{chunk-HOQSAUHZ.js → chunk-2FJ5TMQU.js} +1 -1
- package/dist/{chunk-LCKET5WL.js → chunk-2JW2QLUU.js} +3 -3
- package/dist/{chunk-LIOHE3RU.js → chunk-3JQDPNTA.js} +1 -1
- package/dist/{chunk-BIC6D4EL.js → chunk-5XFFEW2P.js} +2 -2
- package/dist/chunk-6AIYMYSG.js +98 -0
- package/dist/{chunk-IHNZCBES.js → chunk-6MZMMMHV.js} +28 -8
- package/dist/{chunk-RR2SSSQS.js → chunk-6VUW6EKH.js} +2 -2
- package/dist/{chunk-DKW3XS2A.js → chunk-B7R7DHZF.js} +1 -1
- package/dist/{chunk-ITOHGSPS.js → chunk-C7W5BO7R.js} +3 -0
- package/dist/{chunk-QVLCFPKF.js → chunk-DVV6UYVS.js} +3 -3
- package/dist/{chunk-IYSGELQC.js → chunk-GFDKJY63.js} +3 -3
- package/dist/{chunk-2XH6QAOC.js → chunk-HS73G2C3.js} +1 -1
- package/dist/{chunk-4GHHVXUR.js → chunk-I472SSN2.js} +2 -2
- package/dist/{chunk-XBFXYKJS.js → chunk-J254ZX3A.js} +4 -4
- package/dist/{chunk-JCDLEXBB.js → chunk-KNI7QI4J.js} +2 -2
- package/dist/{chunk-3JIPRB2T.js → chunk-LFO5BJ4H.js} +2 -2
- package/dist/{chunk-46UVXYPU.js → chunk-LTKHPOE3.js} +1 -1
- package/dist/{chunk-PXOPMYPJ.js → chunk-OIAT773P.js} +28 -7
- package/dist/{chunk-CLEBTIY3.js → chunk-PKSHDFKP.js} +121 -103
- package/dist/{chunk-6EBULOWM.js → chunk-QTEPKNQE.js} +1 -1
- package/dist/{chunk-E2CTBKYL.js → chunk-RBXVCWXL.js} +2 -2
- package/dist/{chunk-WW47N4ID.js → chunk-UDMFKYZG.js} +3 -3
- package/dist/{chunk-QEHMSZBQ.js → chunk-UKTVFPRV.js} +27 -7
- package/dist/{chunk-YY5PUFBL.js → chunk-UVGI2RPC.js} +4 -4
- package/dist/{chunk-QHS4U3SS.js → chunk-W2RYT6NT.js} +3 -3
- package/dist/{chunk-CA247VOA.js → chunk-XZH3URGD.js} +28 -1
- package/dist/chunk-ZOMIELKI.js +86 -0
- package/dist/{chunk-BTTKHJMC.js → chunk-ZYJRZLMZ.js} +1 -1
- package/dist/components/admin/index.d.ts +2 -2
- package/dist/components/admin/index.js +26 -26
- package/dist/components/data-display/badge.js +3 -3
- package/dist/components/data-display/card.d.ts +2 -2
- package/dist/components/data-display/carousel.js +3 -3
- package/dist/components/data-display/index.js +7 -7
- package/dist/components/data-entry/calendar.d.ts +1 -1
- package/dist/components/data-entry/calendar.js +4 -2
- package/dist/components/data-entry/cascader.d.ts +1 -1
- package/dist/components/data-entry/cascader.js +4 -4
- package/dist/components/data-entry/checkbox.d.ts +2 -2
- package/dist/components/data-entry/color-picker.d.ts +1 -1
- package/dist/components/data-entry/color-picker.js +4 -4
- package/dist/components/data-entry/date-picker.d.ts +2 -2
- package/dist/components/data-entry/date-picker.js +6 -6
- package/dist/components/data-entry/date-range-picker.d.ts +2 -2
- package/dist/components/data-entry/date-range-picker.js +6 -6
- package/dist/components/data-entry/index.d.ts +4 -4
- package/dist/components/data-entry/index.js +20 -20
- package/dist/components/data-entry/input.d.ts +12 -2
- package/dist/components/data-entry/input.js +3 -1
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/select.d.ts +1 -1
- package/dist/components/data-entry/select.js +5 -5
- package/dist/components/data-entry/slider.d.ts +1 -1
- package/dist/components/data-entry/switch.d.ts +1 -1
- package/dist/components/data-entry/textarea.d.ts +12 -2
- package/dist/components/data-entry/textarea.js +3 -1
- package/dist/components/data-entry/time-input.js +2 -2
- package/dist/components/data-entry/time-picker.d.ts +2 -2
- package/dist/components/data-entry/time-picker.js +5 -5
- package/dist/components/data-entry/transfer.d.ts +2 -2
- package/dist/components/data-entry/transfer.js +6 -6
- package/dist/components/data-entry/tree-select.d.ts +1 -1
- package/dist/components/data-entry/tree-select.js +4 -4
- package/dist/components/data-entry/upload.d.ts +2 -2
- package/dist/components/data-entry/upload.js +7 -7
- package/dist/components/data-grid/index.js +6 -6
- package/dist/components/feedback/alert.js +5 -5
- package/dist/components/feedback/dialog.js +5 -5
- package/dist/components/feedback/index.js +8 -8
- package/dist/components/general/button.d.ts +2 -1
- package/dist/components/general/button.js +3 -1
- package/dist/components/general/index.d.ts +1 -1
- package/dist/components/general/index.js +3 -1
- package/dist/components/layout/index.js +4 -4
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/navigation/pagination.js +6 -6
- package/dist/components/navigation/steps.js +3 -3
- package/dist/components/query/index.d.ts +2 -2
- package/dist/components/query/index.js +5 -5
- package/dist/components/ui/index.d.ts +3 -3
- package/dist/components/ui/index.js +25 -25
- package/dist/{data-entry.prop-D92hPBuo.d.ts → data-entry.prop-vn5VGnwY.d.ts} +18 -2
- package/dist/{general.prop-CBQ_KVtR.d.ts → general.prop-CzcLDzMw.d.ts} +8 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +34 -34
- package/dist/lib/datetime/index.js +1 -1
- package/dist/props/components/index.d.ts +3 -3
- package/dist/props/index.d.ts +3 -3
- package/dist/{query.prop-CsRuaXNb.d.ts → query.prop-DAILZ0x5.d.ts} +1 -1
- package/dist/{search-input-D29GSk0W.d.ts → search-input-Oxwpv_s9.d.ts} +1 -1
- package/dist/styles/control.css +24 -1
- package/package.json +1 -1
- package/dist/chunk-BNXPDUO4.js +0 -28
- package/dist/chunk-HCCID4YY.js +0 -11
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Command, CommandList, CommandItem, CommandGroup } from './chunk-3R3QVJCB.js';
|
|
2
|
-
import { Input } from './chunk-
|
|
3
|
-
import { Button } from './chunk-
|
|
2
|
+
import { Input } from './chunk-6AIYMYSG.js';
|
|
3
|
+
import { Button } from './chunk-XZH3URGD.js';
|
|
4
4
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
5
5
|
import { controlTriggerClass, controlOpenRingClass } from './chunk-B4K4BXEF.js';
|
|
6
|
-
import { useTranslation } from './chunk-
|
|
6
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
7
7
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
10
|
-
import { ChevronDown, ChevronUp,
|
|
10
|
+
import { ChevronDown, ChevronUp, Loader2, X, ChevronsUpDown } from 'lucide-react';
|
|
11
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
12
|
|
|
13
13
|
var DEBOUNCE_MS = 250;
|
|
@@ -147,105 +147,123 @@ function SearchSelect({
|
|
|
147
147
|
const optionTestId = (optionValue) => dataTestId ? `${dataTestId}-option-${optionValue}` : void 0;
|
|
148
148
|
const activeOption = flatOrdered[activeIndex];
|
|
149
149
|
const activeOptionId = activeOption ? optionDomId(activeOption.value) : void 0;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
150
|
+
const showClear = clearable && Boolean(value) && !disabled;
|
|
151
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
152
|
+
/* @__PURE__ */ jsxs(
|
|
153
|
+
Popover,
|
|
154
|
+
{
|
|
155
|
+
open,
|
|
156
|
+
onOpenChange: (next) => {
|
|
157
|
+
setOpen(next);
|
|
158
|
+
if (!next) setQuery("");
|
|
159
|
+
},
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
162
|
+
Button,
|
|
163
|
+
{
|
|
164
|
+
id,
|
|
165
|
+
type: "button",
|
|
166
|
+
variant: "outline",
|
|
167
|
+
role: "combobox",
|
|
168
|
+
"aria-expanded": open,
|
|
169
|
+
disabled,
|
|
170
|
+
"data-testid": dataTestId,
|
|
171
|
+
className: cn(
|
|
172
|
+
"w-full justify-start font-normal",
|
|
173
|
+
controlOpenRingClass,
|
|
174
|
+
// Reserve trailing room for the clear + chevron overlay rendered below.
|
|
175
|
+
showClear ? "pe-14" : "pe-9"
|
|
176
|
+
),
|
|
177
|
+
children: /* @__PURE__ */ jsx("span", { className: cn("truncate text-start", !value && "text-muted-foreground"), children: currentLabel })
|
|
178
|
+
}
|
|
179
|
+
) }),
|
|
180
|
+
name ? /* @__PURE__ */ jsx("input", { type: "hidden", name, value }) : null,
|
|
181
|
+
/* @__PURE__ */ jsx(
|
|
182
|
+
PopoverContent,
|
|
183
|
+
{
|
|
184
|
+
align: "start",
|
|
185
|
+
sideOffset: 4,
|
|
186
|
+
collisionPadding: 12,
|
|
187
|
+
className: "flex max-h-[min(24rem,var(--radix-popover-content-available-height))] w-max max-w-[min(32rem,calc(100vw-1.5rem))] min-w-[var(--radix-popover-trigger-width)] flex-col p-0",
|
|
188
|
+
children: /* @__PURE__ */ jsxs(Command, { shouldFilter: false, className: "flex min-h-0 flex-col", children: [
|
|
189
|
+
/* @__PURE__ */ jsx("div", { className: "border-border shrink-0 border-b p-2", children: /* @__PURE__ */ jsx(
|
|
190
|
+
Input,
|
|
191
|
+
{
|
|
192
|
+
autoFocus: true,
|
|
193
|
+
"aria-controls": listId,
|
|
194
|
+
"aria-autocomplete": "list",
|
|
195
|
+
"aria-activedescendant": activeOptionId,
|
|
196
|
+
value: query,
|
|
197
|
+
onChange: (event) => setQuery(event.target.value),
|
|
198
|
+
onKeyDown,
|
|
199
|
+
placeholder: searchPlaceholder ?? t("dataEntry.searchSelect.search")
|
|
200
|
+
}
|
|
201
|
+
) }),
|
|
202
|
+
/* @__PURE__ */ jsxs(
|
|
203
|
+
CommandList,
|
|
204
|
+
{
|
|
205
|
+
id: listId,
|
|
206
|
+
role: "listbox",
|
|
207
|
+
className: "min-h-0 flex-1 overflow-y-auto p-1",
|
|
208
|
+
onScroll,
|
|
209
|
+
children: [
|
|
210
|
+
grouped.map((group) => {
|
|
211
|
+
const rows = group.items.map(({ option, index }) => /* @__PURE__ */ jsx(
|
|
212
|
+
CommandItem,
|
|
213
|
+
{
|
|
214
|
+
id: optionDomId(option.value),
|
|
215
|
+
role: "option",
|
|
216
|
+
value: option.value,
|
|
217
|
+
"data-testid": optionTestId(option.value),
|
|
218
|
+
"aria-selected": activeIndex === index,
|
|
219
|
+
disabled: option.disabled,
|
|
220
|
+
className: cn(
|
|
221
|
+
// Selected = persistent bg-accent + medium weight (NO check icon — saves width),
|
|
222
|
+
// matching the plain SelectItem's `data-[state=checked]` convention; active =
|
|
223
|
+
// hover/keyboard accent. Same bg so selection stays coherent across both Selects.
|
|
224
|
+
value === option.value && "bg-accent text-foreground font-medium",
|
|
225
|
+
activeIndex === index && "bg-accent text-accent-foreground"
|
|
226
|
+
),
|
|
227
|
+
onMouseEnter: () => setActiveIndex(index),
|
|
228
|
+
onSelect: () => select(option),
|
|
229
|
+
children: renderOption ? /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: renderOption(option) }) : /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
230
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-sm", children: option.label }),
|
|
231
|
+
option.sublabel ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground truncate text-xs", children: option.sublabel }) : null
|
|
232
|
+
] })
|
|
233
|
+
},
|
|
234
|
+
option.value
|
|
235
|
+
));
|
|
236
|
+
return group.heading ? /* @__PURE__ */ jsx(CommandGroup, { heading: group.heading, children: rows }, group.heading) : /* @__PURE__ */ jsx(React.Fragment, { children: rows }, "__ungrouped");
|
|
237
|
+
}),
|
|
238
|
+
loading ? /* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex items-center gap-2 px-2 py-3 text-sm", children: [
|
|
239
|
+
/* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin", "aria-hidden": "true" }),
|
|
240
|
+
loadingMessage ?? t("dataEntry.searchSelect.loading")
|
|
241
|
+
] }) : null,
|
|
242
|
+
!loading && loaded.length === 0 ? /* @__PURE__ */ jsx("div", { className: "text-muted-foreground px-2 py-6 text-center text-sm", children: emptyMessage ?? t("dataEntry.searchSelect.empty") }) : null
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
)
|
|
246
|
+
] })
|
|
247
|
+
}
|
|
248
|
+
)
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
/* @__PURE__ */ jsxs("div", { className: "pointer-events-none absolute inset-y-0 end-3 flex items-center gap-1", children: [
|
|
253
|
+
showClear ? /* @__PURE__ */ jsx(
|
|
254
|
+
"button",
|
|
255
|
+
{
|
|
256
|
+
type: "button",
|
|
257
|
+
"aria-label": clearLabel ?? t("dataEntry.searchSelect.clear"),
|
|
258
|
+
"data-testid": optionTestId("clear"),
|
|
259
|
+
className: "pointer-events-auto flex size-4 items-center justify-center rounded-sm opacity-50 hover:opacity-100 focus-visible:opacity-100",
|
|
260
|
+
onClick: clear,
|
|
261
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
|
|
262
|
+
}
|
|
263
|
+
) : null,
|
|
264
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50", "aria-hidden": "true" })
|
|
265
|
+
] })
|
|
266
|
+
] });
|
|
249
267
|
}
|
|
250
268
|
function isDataSelect(props) {
|
|
251
269
|
return "options" in props || "loadOptions" in props;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-
|
|
1
|
+
import { APP_TIME_FORMATS, isAppDateFormat, isAppTimeFormat, isAppLocale, translate, getDateFnsLocale, syncI18nLocale, syncDatetimeContext, disableLiveRelativeFormatting, enableLiveRelativeFormatting, getDayPickerLocale, APP_REQUEST_HEADER_DATE_FORMAT, APP_REQUEST_HEADER_TIME_FORMAT, resolveDefaultDateFormat } from './chunk-C7W5BO7R.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Input } from './chunk-
|
|
1
|
+
import { Input } from './chunk-6AIYMYSG.js';
|
|
2
2
|
import { Label } from './chunk-7PWBC4BY.js';
|
|
3
|
-
import { useTranslation } from './chunk-
|
|
3
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
4
4
|
import { useDebouncedValue } from './chunk-LFW37FGG.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
6
6
|
import * as React from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { overlayHeaderToneClass } from './chunk-VU4GFGDG.js';
|
|
2
|
-
import { Input } from './chunk-
|
|
3
|
-
import { buttonVariants, Button } from './chunk-
|
|
2
|
+
import { Input } from './chunk-6AIYMYSG.js';
|
|
3
|
+
import { buttonVariants, Button } from './chunk-XZH3URGD.js';
|
|
4
4
|
import { Label } from './chunk-7PWBC4BY.js';
|
|
5
|
-
import { useTranslation } from './chunk-
|
|
5
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Input } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Input } from './chunk-6AIYMYSG.js';
|
|
2
|
+
import { Button } from './chunk-XZH3URGD.js';
|
|
3
3
|
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
4
|
-
import { useTranslation, usePickerLocales } from './chunk-
|
|
5
|
-
import { normalizeHhmm, isValidHhmm } from './chunk-
|
|
4
|
+
import { useTranslation, usePickerLocales } from './chunk-QTEPKNQE.js';
|
|
5
|
+
import { normalizeHhmm, isValidHhmm } from './chunk-C7W5BO7R.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import { Clock } from 'lucide-react';
|
|
8
|
+
import { X, Clock } from 'lucide-react';
|
|
9
9
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
11
|
function pad2(n) {
|
|
@@ -208,7 +208,8 @@ function TimePicker({
|
|
|
208
208
|
className,
|
|
209
209
|
id,
|
|
210
210
|
name,
|
|
211
|
-
minuteStep = 5
|
|
211
|
+
minuteStep = 5,
|
|
212
|
+
allowClear = true
|
|
212
213
|
}) {
|
|
213
214
|
const { t } = useTranslation();
|
|
214
215
|
const { timeFormat } = usePickerLocales();
|
|
@@ -226,6 +227,11 @@ function TimePicker({
|
|
|
226
227
|
if (!isControlled) setInternal(next);
|
|
227
228
|
onValueChange?.(next);
|
|
228
229
|
};
|
|
230
|
+
const showClear = allowClear && Boolean(value) && !disabled;
|
|
231
|
+
const clear = () => {
|
|
232
|
+
setValue("");
|
|
233
|
+
setText("");
|
|
234
|
+
};
|
|
229
235
|
return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
|
|
230
236
|
/* @__PURE__ */ jsx(
|
|
231
237
|
Input,
|
|
@@ -240,7 +246,7 @@ function TimePicker({
|
|
|
240
246
|
role: "combobox",
|
|
241
247
|
"aria-expanded": open,
|
|
242
248
|
"aria-haspopup": "dialog",
|
|
243
|
-
className: "pe-
|
|
249
|
+
className: cn("tabular-nums", showClear ? "pe-16" : "pe-10"),
|
|
244
250
|
onClick: () => {
|
|
245
251
|
if (!disabled) setOpen(true);
|
|
246
252
|
},
|
|
@@ -263,6 +269,20 @@ function TimePicker({
|
|
|
263
269
|
}
|
|
264
270
|
}
|
|
265
271
|
),
|
|
272
|
+
showClear ? /* @__PURE__ */ jsx(
|
|
273
|
+
Button,
|
|
274
|
+
{
|
|
275
|
+
type: "button",
|
|
276
|
+
variant: "ghost",
|
|
277
|
+
size: "icon",
|
|
278
|
+
disabled,
|
|
279
|
+
tabIndex: -1,
|
|
280
|
+
"aria-label": t("common.clear") ?? "Clear",
|
|
281
|
+
className: "text-muted-foreground absolute inset-y-0 end-8 h-full px-2 hover:bg-transparent",
|
|
282
|
+
onClick: clear,
|
|
283
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4 shrink-0", "aria-hidden": "true" })
|
|
284
|
+
}
|
|
285
|
+
) : null,
|
|
266
286
|
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
267
287
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
268
288
|
Button,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
3
|
-
import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-
|
|
4
|
-
import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-
|
|
1
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-PKSHDFKP.js';
|
|
2
|
+
import { Button } from './chunk-XZH3URGD.js';
|
|
3
|
+
import { useOptionalAppContext, useTranslation, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel, resolveTimezonePickerOptions, getTimezoneLabel, APP_LOCALES } from './chunk-QTEPKNQE.js';
|
|
4
|
+
import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-C7W5BO7R.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { useId } from 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { humanError } from './chunk-
|
|
1
|
+
import { humanError } from './chunk-2FJ5TMQU.js';
|
|
2
2
|
import { Flex } from './chunk-INIIF7F7.js';
|
|
3
|
-
import { Button } from './chunk-
|
|
4
|
-
import { useTranslation } from './chunk-
|
|
3
|
+
import { Button } from './chunk-XZH3URGD.js';
|
|
4
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import { Info, CheckCircle2, TriangleAlert, AlertCircle, X, RefreshCw } from 'lucide-react';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
1
2
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -5,6 +6,15 @@ import { cva } from 'class-variance-authority';
|
|
|
5
6
|
import { Loader2 } from 'lucide-react';
|
|
6
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
|
|
9
|
+
var buttonCountClass = {
|
|
10
|
+
default: "bg-primary-foreground/15",
|
|
11
|
+
destructive: "bg-destructive-foreground/15",
|
|
12
|
+
secondary: "bg-secondary-foreground/15",
|
|
13
|
+
outline: "bg-foreground/8 text-muted-foreground",
|
|
14
|
+
dashed: "bg-foreground/8 text-muted-foreground",
|
|
15
|
+
ghost: "bg-foreground/8 text-muted-foreground",
|
|
16
|
+
link: "bg-foreground/8 text-muted-foreground"
|
|
17
|
+
};
|
|
8
18
|
var buttonVariants = cva("ui-button", {
|
|
9
19
|
variants: {
|
|
10
20
|
variant: {
|
|
@@ -46,16 +56,30 @@ var Button = React.forwardRef(
|
|
|
46
56
|
asChild = false,
|
|
47
57
|
loading = false,
|
|
48
58
|
loadingText,
|
|
59
|
+
count,
|
|
49
60
|
disabled,
|
|
50
61
|
children,
|
|
51
62
|
...props
|
|
52
63
|
}, ref) => {
|
|
64
|
+
const { locale } = useTranslation();
|
|
53
65
|
const Comp = asChild ? Slot : "button";
|
|
54
66
|
const isLoading = !asChild && loading;
|
|
55
67
|
const content = isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
68
|
/* @__PURE__ */ jsx(Loader2, { className: "animate-spin", "aria-hidden": "true" }),
|
|
57
69
|
loadingText ?? children
|
|
58
70
|
] }) : children;
|
|
71
|
+
const showCount = !asChild && count != null;
|
|
72
|
+
const countNode = showCount ? /* @__PURE__ */ jsx(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "button-count",
|
|
76
|
+
className: cn(
|
|
77
|
+
"inline-flex min-w-4 items-center justify-center rounded-[var(--radius-pill)] px-1 text-xs leading-none tabular-nums",
|
|
78
|
+
buttonCountClass[variant ?? "default"]
|
|
79
|
+
),
|
|
80
|
+
children: new Intl.NumberFormat(locale).format(count)
|
|
81
|
+
}
|
|
82
|
+
) : null;
|
|
59
83
|
return /* @__PURE__ */ jsx(
|
|
60
84
|
Comp,
|
|
61
85
|
{
|
|
@@ -77,7 +101,10 @@ var Button = React.forwardRef(
|
|
|
77
101
|
),
|
|
78
102
|
ref,
|
|
79
103
|
...props,
|
|
80
|
-
children:
|
|
104
|
+
children: asChild ? children : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
105
|
+
content,
|
|
106
|
+
countNode
|
|
107
|
+
] })
|
|
81
108
|
}
|
|
82
109
|
);
|
|
83
110
|
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { controlMultilineClass } from './chunk-B4K4BXEF.js';
|
|
2
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
3
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { X } from 'lucide-react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var Textarea = React.forwardRef(
|
|
9
|
+
({ className, allowClear = false, onClear, value, defaultValue, onChange, ...props }, ref) => {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const innerRef = React.useRef(null);
|
|
12
|
+
const setRefs = React.useCallback(
|
|
13
|
+
(node) => {
|
|
14
|
+
innerRef.current = node;
|
|
15
|
+
if (typeof ref === "function") ref(node);
|
|
16
|
+
else if (ref) ref.current = node;
|
|
17
|
+
},
|
|
18
|
+
[ref]
|
|
19
|
+
);
|
|
20
|
+
const [hasText, setHasText] = React.useState(
|
|
21
|
+
() => String(value ?? defaultValue ?? "").length > 0
|
|
22
|
+
);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (value !== void 0) setHasText(String(value).length > 0);
|
|
25
|
+
}, [value]);
|
|
26
|
+
const handleChange = (event) => {
|
|
27
|
+
if (value === void 0) setHasText(event.target.value.length > 0);
|
|
28
|
+
onChange?.(event);
|
|
29
|
+
};
|
|
30
|
+
const clear = () => {
|
|
31
|
+
const el = innerRef.current;
|
|
32
|
+
if (el) {
|
|
33
|
+
const setter = Object.getOwnPropertyDescriptor(
|
|
34
|
+
window.HTMLTextAreaElement.prototype,
|
|
35
|
+
"value"
|
|
36
|
+
)?.set;
|
|
37
|
+
setter?.call(el, "");
|
|
38
|
+
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
39
|
+
el.focus();
|
|
40
|
+
}
|
|
41
|
+
setHasText(false);
|
|
42
|
+
onClear?.();
|
|
43
|
+
};
|
|
44
|
+
if (!allowClear) {
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
"textarea",
|
|
47
|
+
{
|
|
48
|
+
ref: setRefs,
|
|
49
|
+
value,
|
|
50
|
+
defaultValue,
|
|
51
|
+
onChange,
|
|
52
|
+
className: cn(controlMultilineClass, className),
|
|
53
|
+
...props
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
const showClear = hasText && !props.disabled && !props.readOnly;
|
|
58
|
+
return /* @__PURE__ */ jsxs("span", { "data-slot": "textarea-affix-wrapper", className: "relative block w-full", children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
"textarea",
|
|
61
|
+
{
|
|
62
|
+
ref: setRefs,
|
|
63
|
+
value,
|
|
64
|
+
defaultValue,
|
|
65
|
+
onChange: handleChange,
|
|
66
|
+
className: cn(controlMultilineClass, showClear && "pe-9", className),
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
showClear ? /* @__PURE__ */ jsx(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
tabIndex: -1,
|
|
75
|
+
"aria-label": t("common.clear") ?? "Clear",
|
|
76
|
+
onClick: clear,
|
|
77
|
+
className: "text-muted-foreground hover:text-foreground absolute end-2 top-2 inline-flex size-5 items-center justify-center rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:opacity-100",
|
|
78
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-4", "aria-hidden": "true" })
|
|
79
|
+
}
|
|
80
|
+
) : null
|
|
81
|
+
] });
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
Textarea.displayName = "Textarea";
|
|
85
|
+
|
|
86
|
+
export { Textarea };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { toneNeutralClass, toneMutedClass, toneInfoClass, toneDestructiveClass, toneWarningClass, toneSuccessClass } from './chunk-B4K4BXEF.js';
|
|
2
|
-
import { useTranslation } from './chunk-
|
|
2
|
+
import { useTranslation } from './chunk-QTEPKNQE.js';
|
|
3
3
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
4
4
|
import { cva } from 'class-variance-authority';
|
|
5
5
|
import { XCircle, Pause, CheckCircle2, Circle, Trash2, AlertCircle, Clock, Play } from 'lucide-react';
|
|
@@ -3,7 +3,7 @@ export { c as FlexProp, P as PageContainerProp, P as PageContainerProps } from '
|
|
|
3
3
|
export { F as Flex, P as PageContainer } from '../../flex-X2EFU1d5.js';
|
|
4
4
|
export { C as ColumnDef, D as DataTable, a as Density, b as Descriptions, E as EmptyState } from '../../data-table-DRr70ULe.js';
|
|
5
5
|
export { Badge } from '../data-display/badge.js';
|
|
6
|
-
export { F as Field, a as FormField, S as SearchInput } from '../../search-input-
|
|
6
|
+
export { F as Field, a as FormField, S as SearchInput } from '../../search-input-Oxwpv_s9.js';
|
|
7
7
|
export { a as SkeletonDetail, c as SkeletonRows, d as SkeletonStat, e as SkeletonTable } from '../../skeleton-cj9kh5wo.js';
|
|
8
8
|
export { Alert, AlertActions, AlertContent, AlertDescription, AlertQueryError, AlertTitle } from '../feedback/alert.js';
|
|
9
9
|
export { Upload, useUploadDraft } from '../data-entry/upload.js';
|
|
@@ -18,7 +18,7 @@ export { AlertDialog, Dialog, DialogContent, DialogDescription, DialogFooter, Di
|
|
|
18
18
|
export { Toaster } from '../feedback/sonner.js';
|
|
19
19
|
export { toast } from 'sonner';
|
|
20
20
|
export { useDebouncedValue, useTimeoutFlag } from '../../lib/hooks.js';
|
|
21
|
-
export { B as collectUploadCommitActions, E as createUploadItem } from '../../data-entry.prop-
|
|
21
|
+
export { B as collectUploadCommitActions, E as createUploadItem } from '../../data-entry.prop-vn5VGnwY.js';
|
|
22
22
|
export { j as formatDate } from '../../format-date-ByyZoqI5.js';
|
|
23
23
|
import '../../shared.prop-BvMSLFJ6.js';
|
|
24
24
|
import 'react';
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import '../../chunk-GJXOBDER.js';
|
|
2
|
-
export { PageContainer } from '../../chunk-
|
|
3
|
-
export { sonnerToast as toast } from '../../chunk-ES4Q3KGL.js';
|
|
2
|
+
export { PageContainer } from '../../chunk-I472SSN2.js';
|
|
4
3
|
import '../../chunk-XK3M3VRR.js';
|
|
5
4
|
import '../../chunk-W4REF4TD.js';
|
|
6
|
-
export {
|
|
7
|
-
|
|
8
|
-
export { Toaster } from '../../chunk-TO7URV7U.js';
|
|
9
|
-
export { Toolbar, ToolbarGroup } from '../../chunk-YY5PUFBL.js';
|
|
10
|
-
import '../../chunk-HL3G4SVG.js';
|
|
11
|
-
import '../../chunk-B73NA66T.js';
|
|
5
|
+
export { Toolbar, ToolbarGroup } from '../../chunk-UVGI2RPC.js';
|
|
6
|
+
export { Steps } from '../../chunk-LTKHPOE3.js';
|
|
12
7
|
import '../../chunk-WGWI7EGL.js';
|
|
13
|
-
export { Pagination } from '../../chunk-
|
|
14
|
-
export { Steps } from '../../chunk-46UVXYPU.js';
|
|
8
|
+
export { Pagination } from '../../chunk-2JW2QLUU.js';
|
|
15
9
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from '../../chunk-V3N266PT.js';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
10
|
+
import '../../chunk-HL3G4SVG.js';
|
|
11
|
+
import '../../chunk-B73NA66T.js';
|
|
12
|
+
import '../../chunk-LMKUKCTN.js';
|
|
13
|
+
export { sonnerToast as toast } from '../../chunk-ES4Q3KGL.js';
|
|
14
|
+
export { SkeletonDetail, SkeletonRows, SkeletonStat, SkeletonTable } from '../../chunk-2BR7KFCP.js';
|
|
15
|
+
export { Toaster } from '../../chunk-TO7URV7U.js';
|
|
16
|
+
import '../../chunk-32WO3YLB.js';
|
|
17
|
+
export { Alert, AlertActions, AlertContent, AlertDescription, AlertQueryError, AlertTitle } from '../../chunk-W2RYT6NT.js';
|
|
18
|
+
export { Transfer } from '../../chunk-DVV6UYVS.js';
|
|
19
|
+
export { TreeSelect } from '../../chunk-5XFFEW2P.js';
|
|
20
|
+
export { Upload, collectUploadCommitActions, createUploadItem, useUploadDraft } from '../../chunk-J254ZX3A.js';
|
|
21
|
+
export { SearchInput } from '../../chunk-RBXVCWXL.js';
|
|
22
|
+
export { formatBytes, formatCurrency, humanError, shortId } from '../../chunk-2FJ5TMQU.js';
|
|
23
|
+
export { AlertDialog, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from '../../chunk-UDMFKYZG.js';
|
|
21
24
|
import '../../chunk-VU4GFGDG.js';
|
|
22
|
-
|
|
25
|
+
import '../../chunk-PKSHDFKP.js';
|
|
23
26
|
import '../../chunk-TBJBVEIP.js';
|
|
24
|
-
|
|
25
|
-
export { SearchInput } from '../../chunk-E2CTBKYL.js';
|
|
26
|
-
import '../../chunk-CLEBTIY3.js';
|
|
27
|
-
export { Cascader } from '../../chunk-RR2SSSQS.js';
|
|
27
|
+
export { Cascader } from '../../chunk-6VUW6EKH.js';
|
|
28
28
|
import '../../chunk-SMLKNECP.js';
|
|
29
29
|
import '../../chunk-3R3QVJCB.js';
|
|
30
|
-
import '../../chunk-
|
|
31
|
-
export { DataTable, Descriptions } from '../../chunk-
|
|
30
|
+
import '../../chunk-6AIYMYSG.js';
|
|
31
|
+
export { DataTable, Descriptions } from '../../chunk-KNI7QI4J.js';
|
|
32
32
|
import '../../chunk-DV52WNXO.js';
|
|
33
33
|
export { EmptyState } from '../../chunk-YD7V2HGZ.js';
|
|
34
34
|
export { Flex } from '../../chunk-INIIF7F7.js';
|
|
35
35
|
import '../../chunk-BE6GJGKJ.js';
|
|
36
36
|
export { Field } from '../../chunk-44YRPSZ7.js';
|
|
37
|
-
import '../../chunk-
|
|
38
|
-
export { Badge } from '../../chunk-
|
|
37
|
+
import '../../chunk-XZH3URGD.js';
|
|
38
|
+
export { Badge } from '../../chunk-ZYJRZLMZ.js';
|
|
39
39
|
import '../../chunk-DY5C44UP.js';
|
|
40
40
|
import '../../chunk-3KPEZ5CF.js';
|
|
41
41
|
import '../../chunk-IJ5ALJGA.js';
|
|
@@ -43,7 +43,7 @@ import '../../chunk-B4K4BXEF.js';
|
|
|
43
43
|
export { FormField } from '../../chunk-76S3TQFH.js';
|
|
44
44
|
import '../../chunk-C3PKEV6S.js';
|
|
45
45
|
import '../../chunk-7PWBC4BY.js';
|
|
46
|
-
import '../../chunk-
|
|
47
|
-
export { formatDate } from '../../chunk-
|
|
46
|
+
import '../../chunk-QTEPKNQE.js';
|
|
47
|
+
export { formatDate } from '../../chunk-C7W5BO7R.js';
|
|
48
48
|
export { useDebouncedValue, useTimeoutFlag } from '../../chunk-LFW37FGG.js';
|
|
49
49
|
import '../../chunk-U7N2A7A3.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { Badge } from '../../chunk-
|
|
1
|
+
export { Badge } from '../../chunk-ZYJRZLMZ.js';
|
|
2
2
|
import '../../chunk-B4K4BXEF.js';
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-QTEPKNQE.js';
|
|
4
|
+
import '../../chunk-C7W5BO7R.js';
|
|
5
5
|
import '../../chunk-U7N2A7A3.js';
|