@godxjp/ui 7.0.0 → 8.0.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.d.ts +2 -2
- package/dist/{app.prop-IobwLwaM.d.ts → app.prop-DnIXFzLi.d.ts} +9 -9
- package/dist/{checkbox-CK2mYEpD.d.ts → checkbox-ChRsR7Nk.d.ts} +2 -2
- package/dist/{chunk-3UGU5TYP.js → chunk-25RYBC5T.js} +2 -2
- package/dist/{chunk-CQBADMFG.js → chunk-26CPAKUP.js} +3 -2
- package/dist/{chunk-TT2L7JM6.js → chunk-3TS3G4U3.js} +3 -3
- package/dist/{chunk-ZS6DTAM2.js → chunk-4MMIMZMK.js} +1 -1
- package/dist/{chunk-6TSU4IHV.js → chunk-4R7RQDXI.js} +23 -21
- package/dist/{chunk-OXKY5QMK.js → chunk-6QXQQAOQ.js} +6 -6
- package/dist/{chunk-JJCGMCTL.js → chunk-A22MCA3X.js} +6 -6
- package/dist/{chunk-VXXKR5U4.js → chunk-A7PKMT7Y.js} +4 -4
- package/dist/{chunk-HKQITNB3.js → chunk-AINW5WYN.js} +5 -4
- package/dist/{chunk-OGFWIXRO.js → chunk-C5H655GK.js} +218 -53
- package/dist/{chunk-ZLK5SPT6.js → chunk-EOTOCNT7.js} +1 -1
- package/dist/{chunk-ARDVPIF4.js → chunk-G2WYOCDL.js} +5 -5
- package/dist/chunk-HKD6ERY7.js +1 -0
- package/dist/{chunk-V6UWJKZF.js → chunk-HTEL5DQI.js} +1 -1
- package/dist/{chunk-ICM6XBST.js → chunk-IBK5D2Q6.js} +2 -1
- package/dist/{chunk-IK7I3ABN.js → chunk-IOGU3ZWF.js} +2 -2
- package/dist/{chunk-HJEBRCXL.js → chunk-M4PZNAMV.js} +1 -0
- package/dist/{chunk-2QG3OVAD.js → chunk-N43OKOFT.js} +7 -5
- package/dist/{chunk-ZR2TIBPG.js → chunk-NG23LVTM.js} +4 -4
- package/dist/{chunk-E76QIYSY.js → chunk-O24Z3ULJ.js} +4 -4
- package/dist/{chunk-L6J44O74.js → chunk-OJZ6C2HM.js} +2 -2
- package/dist/{chunk-2HLWHQJA.js → chunk-P4HFJQID.js} +5 -4
- package/dist/{chunk-EXBWDW5E.js → chunk-RGIYKJPW.js} +7 -7
- package/dist/{chunk-ZKIAZDVU.js → chunk-RGPF3HU6.js} +4 -4
- package/dist/{chunk-FBHN6OO4.js → chunk-SKIRU7GC.js} +2 -2
- package/dist/chunk-TILFZBTE.js +50 -0
- package/dist/{chunk-6UFKWOEW.js → chunk-TMDGV4CN.js} +15 -11
- package/dist/{chunk-7AMHT5Z5.js → chunk-UIYEAUWA.js} +30 -13
- package/dist/{chunk-25ZZ2W3M.js → chunk-WN52SCGE.js} +5 -5
- package/dist/{chunk-EQRQM6RF.js → chunk-WTVLZVBA.js} +28 -8
- package/dist/{chunk-Y3XBNUTD.js → chunk-XDUZ7JJL.js} +2 -2
- package/dist/chunk-XMBCNMJI.js +61 -0
- package/dist/{chunk-RVY4F7LK.js → chunk-XZM2GNAY.js} +7 -7
- package/dist/{chunk-NTUHJ37K.js → chunk-Z6HNY2PL.js} +9 -9
- package/dist/components/admin/index.d.ts +19 -19
- package/dist/components/admin/index.js +30 -30
- package/dist/components/data-display/badge.d.ts +7 -4
- package/dist/components/data-display/badge.js +2 -2
- package/dist/components/data-display/card.d.ts +2 -2
- package/dist/components/data-display/index.d.ts +6 -6
- package/dist/components/data-display/index.js +8 -8
- package/dist/components/data-display/table.js +2 -2
- package/dist/components/data-entry/autocomplete.d.ts +5 -5
- package/dist/components/data-entry/autocomplete.js +6 -6
- package/dist/components/data-entry/calendar.d.ts +5 -5
- package/dist/components/data-entry/calendar.js +3 -3
- package/dist/components/data-entry/cascader.d.ts +6 -6
- package/dist/components/data-entry/cascader.js +7 -7
- package/dist/components/data-entry/checkbox.d.ts +6 -6
- package/dist/components/data-entry/checkbox.js +2 -2
- package/dist/components/data-entry/color-picker.d.ts +6 -6
- package/dist/components/data-entry/color-picker.js +2 -2
- package/dist/components/data-entry/command.d.ts +11 -11
- package/dist/components/data-entry/command.js +2 -2
- package/dist/components/data-entry/date-picker.d.ts +6 -6
- package/dist/components/data-entry/date-picker.js +5 -5
- package/dist/components/data-entry/date-range-picker.d.ts +6 -6
- package/dist/components/data-entry/date-range-picker.js +5 -5
- package/dist/components/data-entry/index.d.ts +11 -21
- package/dist/components/data-entry/index.js +25 -83
- package/dist/components/data-entry/radio.d.ts +5 -5
- package/dist/components/data-entry/radio.js +2 -2
- package/dist/components/data-entry/select.d.ts +5 -5
- package/dist/components/data-entry/select.js +6 -6
- package/dist/components/data-entry/slider.d.ts +5 -5
- package/dist/components/data-entry/switch.d.ts +5 -5
- package/dist/components/data-entry/textarea.js +2 -2
- package/dist/components/data-entry/time-picker.d.ts +6 -6
- package/dist/components/data-entry/time-picker.js +3 -3
- package/dist/components/data-entry/transfer.d.ts +7 -7
- package/dist/components/data-entry/transfer.js +4 -4
- package/dist/components/data-entry/tree-select.d.ts +6 -6
- package/dist/components/data-entry/tree-select.js +7 -7
- package/dist/components/data-entry/upload.d.ts +7 -7
- package/dist/components/data-entry/upload.js +5 -5
- package/dist/components/feedback/alert.d.ts +7 -5
- package/dist/components/feedback/alert.js +3 -3
- package/dist/components/feedback/dialog.d.ts +9 -6
- package/dist/components/feedback/dialog.js +2 -2
- package/dist/components/feedback/index.d.ts +6 -6
- package/dist/components/feedback/index.js +7 -6
- package/dist/components/general/button.d.ts +4 -4
- package/dist/components/general/button.js +1 -1
- package/dist/components/general/index.d.ts +3 -3
- package/dist/components/general/index.js +1 -1
- package/dist/components/layout/index.d.ts +10 -9
- package/dist/components/layout/index.js +3 -3
- package/dist/components/navigation/index.d.ts +13 -13
- package/dist/components/navigation/index.js +10 -10
- package/dist/components/navigation/pagination.d.ts +5 -5
- package/dist/components/navigation/pagination.js +7 -7
- package/dist/components/navigation/steps.d.ts +6 -6
- package/dist/components/navigation/steps.js +2 -2
- package/dist/components/query/index.d.ts +12 -7
- package/dist/components/query/index.js +4 -4
- package/dist/components/ui/index.d.ts +12 -12
- package/dist/components/ui/index.js +30 -30
- package/dist/{data-display.prop-CXP9Jfdn.d.ts → data-display.prop-Cf2p9QC4.d.ts} +6 -5
- package/dist/{data-entry.prop-CpSx5dX6.d.ts → data-entry.prop-CDkOajPj.d.ts} +38 -28
- package/dist/{data-table-C5lcmAwE.d.ts → data-table-B_q7j992.d.ts} +4 -4
- package/dist/{data.prop-BmLaGLb7.d.ts → data.prop-DMYMNl6L.d.ts} +2 -2
- package/dist/{feedback.prop-BnBpUzNK.d.ts → feedback.prop-BR5JOpPl.d.ts} +8 -5
- package/dist/filter-bar-DvVXm_d1.d.ts +14 -0
- package/dist/form/index.d.ts +3 -3
- package/dist/{form.prop-BHgpuFFm.d.ts → form.prop-Bc6r6JJW.d.ts} +1 -1
- package/dist/{general.prop-D7brMPNL.d.ts → general.prop-DoHDCRmL.d.ts} +2 -2
- package/dist/index.d.ts +22 -22
- package/dist/index.js +43 -30
- package/dist/inline-DqfYlGKj.d.ts +18 -0
- package/dist/{interaction.prop-Cdn7wOtq.d.ts → interaction.prop-DSFizzP6.d.ts} +8 -6
- package/dist/{layout.prop-MwHm4-Zl.d.ts → layout.prop-Baq9muDN.d.ts} +27 -13
- package/dist/layout.prop-CXvl2rVR.d.ts +16 -0
- package/dist/{navigation.prop-DAH4ysXj.d.ts → navigation.prop-8DgElO0c.d.ts} +12 -8
- package/dist/{navigation.prop-Hu7s7MJa.d.ts → navigation.prop-BKlxd-j7.d.ts} +2 -5
- package/dist/props/components/index.d.ts +14 -14
- package/dist/props/index.d.ts +14 -14
- package/dist/props/index.js +2 -2
- package/dist/props/registry.d.ts +251 -56
- package/dist/props/registry.js +1 -1
- package/dist/props/vocabulary/index.d.ts +5 -5
- package/dist/{query.prop-hIPrk2zI.d.ts → query.prop-DuODxsiU.d.ts} +12 -8
- package/dist/{search-input-rR2XDrjv.d.ts → search-input-cezAxpgb.d.ts} +7 -2
- package/dist/{shared.prop-BNRJc9K0.d.ts → shared.prop-BsNSXeqD.d.ts} +9 -3
- package/dist/{skeleton-CqFO4dRc.d.ts → skeleton-uWAjSacg.d.ts} +4 -2
- package/dist/styles/alert-layout.css +38 -18
- package/dist/styles/badge-layout.css +2 -2
- package/dist/styles/card-layout.css +5 -5
- package/dist/styles/density.css +10 -10
- package/dist/styles/dialog-layout.css +4 -4
- package/dist/styles/index.css +6 -9
- package/dist/styles/layout.css +95 -14
- package/dist/styles/table-layout.css +3 -3
- package/dist/theme/example.service.css +0 -5
- package/dist/tokens/base.css +7 -7
- package/dist/tokens/components/badge.css +7 -0
- package/dist/tokens/{primitives → components}/card.css +2 -3
- package/dist/tokens/{primitives → components}/control.css +10 -0
- package/dist/tokens/components/feedback.css +17 -0
- package/dist/tokens/{primitives → components}/table.css +2 -2
- package/dist/tokens/foundation.css +7 -22
- package/package.json +5 -3
- package/scripts/ui-audit.mjs +22 -0
- package/dist/chunk-S66TJXJU.js +0 -33
- package/dist/filter-bar-zSKz7YCR.d.ts +0 -10
- package/dist/inline-CV3A46np.d.ts +0 -10
- package/dist/layout.prop-4TCNvyQZ.d.ts +0 -20
- package/dist/tokens/primitives/badge.css +0 -13
- package/dist/tokens/primitives/feedback.css +0 -17
- /package/dist/{chunk-LDSLS6HE.js → chunk-2H65B4JA.js} +0 -0
- /package/dist/tokens/{primitives → components}/navigation.css +0 -0
- /package/dist/tokens/{primitives → semantic}/layout.css +0 -0
package/dist/app/index.d.ts
CHANGED
|
@@ -5,12 +5,12 @@ import * as date_fns from 'date-fns';
|
|
|
5
5
|
import { Locale } from 'date-fns';
|
|
6
6
|
import { vi } from 'react-day-picker/locale';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { a as AppProviderProp, A as AppContextValue } from '../app.prop-
|
|
8
|
+
import { a as AppProviderProp, A as AppContextValue } from '../app.prop-DnIXFzLi.js';
|
|
9
9
|
import { j as formatDate, a as FormatDateOptions } from '../format-date-ByyZoqI5.js';
|
|
10
10
|
export { F as FormatDateKind, b as FormatDatetimeOptions, d as detectFormatDateKind, f as formatAppDate, c as formatAppDateLong, e as formatAppDateTime, g as formatAppRelative, h as formatAppTime, i as formatCalendarDate, k as formatTimeOfDay, m as isFormatDateValue } from '../format-date-ByyZoqI5.js';
|
|
11
11
|
export { getDatetimeContext, isValidHhmm, normalizeHhmm, parseDateInput, syncDatetimeContext } from '../lib/datetime/index.js';
|
|
12
12
|
export { usePickerLocales, useTranslation } from '../i18n/index.js';
|
|
13
|
-
import '../shared.prop-
|
|
13
|
+
import '../shared.prop-BsNSXeqD.js';
|
|
14
14
|
import 'react';
|
|
15
15
|
import '@date-fns/tz';
|
|
16
16
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Locale } from 'date-fns';
|
|
2
2
|
import { DayPickerProps } from 'react-day-picker';
|
|
3
3
|
import { h as AppLocale, l as AppTimezoneDefault, k as AppTimezone, j as AppTimeFormat, g as AppDateFormat, i as AppRequestHeaders } from './types-mvzYGrma.js';
|
|
4
|
-
import { C as ChildrenProp, a as ClassNameProp,
|
|
4
|
+
import { C as ChildrenProp, a as ClassNameProp, c as DisabledProp, I as IdProp, V as ValueProp, g as OnValueChangeProp } from './shared.prop-BsNSXeqD.js';
|
|
5
5
|
|
|
6
6
|
/** App shell prop types — @see docs/COMPONENTS.md#app */
|
|
7
7
|
|
|
@@ -40,16 +40,16 @@ type LocalePickerProp = {
|
|
|
40
40
|
disabled?: DisabledProp;
|
|
41
41
|
id?: IdProp;
|
|
42
42
|
/** Controlled value; default reads/writes AppProvider. */
|
|
43
|
-
value?: AppLocale
|
|
44
|
-
|
|
43
|
+
value?: ValueProp<AppLocale>;
|
|
44
|
+
onValueChange?: OnValueChangeProp<AppLocale>;
|
|
45
45
|
};
|
|
46
46
|
/** @see TimezonePicker */
|
|
47
47
|
type TimezonePickerProp = {
|
|
48
48
|
className?: ClassNameProp;
|
|
49
49
|
disabled?: DisabledProp;
|
|
50
50
|
id?: IdProp;
|
|
51
|
-
value?: AppTimezone
|
|
52
|
-
|
|
51
|
+
value?: ValueProp<AppTimezone>;
|
|
52
|
+
onValueChange?: OnValueChangeProp<AppTimezone>;
|
|
53
53
|
/** Override AppProvider list; omit to use context or full IANA. */
|
|
54
54
|
options?: readonly AppTimezone[];
|
|
55
55
|
};
|
|
@@ -58,16 +58,16 @@ type TimeFormatPickerProp = {
|
|
|
58
58
|
className?: ClassNameProp;
|
|
59
59
|
disabled?: DisabledProp;
|
|
60
60
|
id?: IdProp;
|
|
61
|
-
value?: AppTimeFormat
|
|
62
|
-
|
|
61
|
+
value?: ValueProp<AppTimeFormat>;
|
|
62
|
+
onValueChange?: OnValueChangeProp<AppTimeFormat>;
|
|
63
63
|
};
|
|
64
64
|
/** @see DateFormatPicker */
|
|
65
65
|
type DateFormatPickerProp = {
|
|
66
66
|
className?: ClassNameProp;
|
|
67
67
|
disabled?: DisabledProp;
|
|
68
68
|
id?: IdProp;
|
|
69
|
-
value?: AppDateFormat
|
|
70
|
-
|
|
69
|
+
value?: ValueProp<AppDateFormat>;
|
|
70
|
+
onValueChange?: OnValueChangeProp<AppDateFormat>;
|
|
71
71
|
};
|
|
72
72
|
/** Value exposed by `useAppContext`. */
|
|
73
73
|
type AppContextValue = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { c as CheckboxGroupProp } from './data-entry.prop-
|
|
4
|
+
import { c as CheckboxGroupProp } from './data-entry.prop-CDkOajPj.js';
|
|
5
5
|
|
|
6
|
-
declare function CheckboxGroup({ value: controlledValue, defaultValue,
|
|
6
|
+
declare function CheckboxGroup({ value: controlledValue, defaultValue, onValueChange, options, orientation, disabled, name, className, children, }: CheckboxGroupProp): react_jsx_runtime.JSX.Element;
|
|
7
7
|
|
|
8
8
|
/** Checkbox — dùng standalone hoặc `Checkbox.Group` với `options` (Ant Design style). */
|
|
9
9
|
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Field, choiceGroupClassName } from './chunk-26CPAKUP.js';
|
|
2
2
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
@@ -61,7 +61,7 @@ function RadioGroupOptions({
|
|
|
61
61
|
className: choiceGroupClassName(orientation, className),
|
|
62
62
|
children: options.map((opt, index) => {
|
|
63
63
|
const id = `${reactId}-${opt.value}-${index}`;
|
|
64
|
-
return /* @__PURE__ */ jsx(
|
|
64
|
+
return /* @__PURE__ */ jsx(Field, { id, label: opt.label, description: opt.description, children: /* @__PURE__ */ jsx(RadioItem, { id, value: opt.value, disabled: opt.disabled }) }, opt.value);
|
|
65
65
|
})
|
|
66
66
|
}
|
|
67
67
|
);
|
|
@@ -2,7 +2,7 @@ import { Label } from './chunk-7PWBC4BY.js';
|
|
|
2
2
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
function Field({ id, label, description, className, children }) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-choice-field", className), children: [
|
|
7
7
|
/* @__PURE__ */ jsx("div", { className: "ui-choice-control", children }),
|
|
8
8
|
/* @__PURE__ */ jsxs("div", { className: "ui-choice-content", children: [
|
|
@@ -11,10 +11,11 @@ function ChoiceField({ id, label, description, className, children }) {
|
|
|
11
11
|
] })
|
|
12
12
|
] });
|
|
13
13
|
}
|
|
14
|
+
var ChoiceField = Field;
|
|
14
15
|
|
|
15
16
|
// src/components/data-entry/choice-option.ts
|
|
16
17
|
function choiceGroupClassName(_orientation = "vertical", className) {
|
|
17
18
|
return cn("ui-choice-group", className);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export { ChoiceField, choiceGroupClassName };
|
|
21
|
+
export { ChoiceField, Field, choiceGroupClassName };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { controlIconClass } from './chunk-ICM6XBST.js';
|
|
2
1
|
import { Input } from './chunk-VOHTRR5X.js';
|
|
2
|
+
import { controlIconClass } from './chunk-IBK5D2Q6.js';
|
|
3
3
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
4
4
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
5
5
|
import * as React from 'react';
|
|
@@ -12,7 +12,7 @@ function normalizeHex(value) {
|
|
|
12
12
|
}
|
|
13
13
|
function ColorPicker({
|
|
14
14
|
value = "#2563eb",
|
|
15
|
-
|
|
15
|
+
onValueChange,
|
|
16
16
|
disabled,
|
|
17
17
|
className,
|
|
18
18
|
id,
|
|
@@ -28,7 +28,7 @@ function ColorPicker({
|
|
|
28
28
|
return;
|
|
29
29
|
}
|
|
30
30
|
setDraft(null);
|
|
31
|
-
|
|
31
|
+
onValueChange?.(normalized);
|
|
32
32
|
};
|
|
33
33
|
return /* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker", className), children: [
|
|
34
34
|
/* @__PURE__ */ jsxs("div", { className: cn("ui-color-picker-swatch", controlIconClass), children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-
|
|
2
|
-
import { Button } from './chunk-
|
|
1
|
+
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './chunk-G2WYOCDL.js';
|
|
2
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
3
3
|
import { useTranslation, useOptionalAppContext, APP_LOCALES, resolveTimezonePickerOptions, getTimezoneLabel, APP_TIME_FORMAT_OPTIONS, getTimeFormatLabel } from './chunk-RLGHEV4A.js';
|
|
4
4
|
import { APP_DATE_FORMAT_OPTIONS, getDateFormatLabel } from './chunk-FXFJF4YA.js';
|
|
5
5
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
@@ -8,27 +8,29 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
8
8
|
import { Link } from 'react-router-dom';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
|
|
11
|
-
function
|
|
11
|
+
function Toolbar({
|
|
12
12
|
onClear,
|
|
13
13
|
hasActiveFilters = true,
|
|
14
14
|
className,
|
|
15
15
|
children
|
|
16
16
|
}) {
|
|
17
17
|
const { t } = useTranslation();
|
|
18
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("ui-
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("ui-toolbar", className), children: [
|
|
19
19
|
children,
|
|
20
|
-
onClear && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onClear, className: "ui-
|
|
20
|
+
onClear && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onClear, className: "ui-toolbar-clear", children: [
|
|
21
21
|
/* @__PURE__ */ jsx(X, { "aria-hidden": "true" }),
|
|
22
22
|
t("common.clearFilters")
|
|
23
23
|
] })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-xs ui-
|
|
28
|
-
/* @__PURE__ */ jsx("div", { className: "ui-
|
|
26
|
+
function ToolbarGroup({ label, className, children }) {
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("ui-stack-xs ui-toolbar-group", className), children: [
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "ui-toolbar-label", children: label }),
|
|
29
29
|
children
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
|
+
var FilterBar = Toolbar;
|
|
33
|
+
var FilterGroup = ToolbarGroup;
|
|
32
34
|
function PageHeader({ title, description, breadcrumb, actions, className }) {
|
|
33
35
|
return /* @__PURE__ */ jsxs("header", { className: cn("ui-page-header", className), children: [
|
|
34
36
|
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", className: "ui-breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "ui-breadcrumb-list", children: breadcrumb.map((item, i) => {
|
|
@@ -54,13 +56,13 @@ function PageHeader({ title, description, breadcrumb, actions, className }) {
|
|
|
54
56
|
] })
|
|
55
57
|
] });
|
|
56
58
|
}
|
|
57
|
-
function LocalePicker({ className, disabled, id, value,
|
|
59
|
+
function LocalePicker({ className, disabled, id, value, onValueChange }) {
|
|
58
60
|
const ctx = useOptionalAppContext();
|
|
59
61
|
const { t } = useTranslation();
|
|
60
62
|
const current = value ?? ctx?.locale;
|
|
61
|
-
const handleChange =
|
|
63
|
+
const handleChange = onValueChange ?? ctx?.setLocale;
|
|
62
64
|
if (current === void 0 || !handleChange) {
|
|
63
|
-
throw new Error("LocalePicker requires <AppProvider> or controlled value +
|
|
65
|
+
throw new Error("LocalePicker requires <AppProvider> or controlled value + onValueChange");
|
|
64
66
|
}
|
|
65
67
|
return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
|
|
66
68
|
/* @__PURE__ */ jsxs(
|
|
@@ -83,16 +85,16 @@ function TimezonePicker({
|
|
|
83
85
|
disabled,
|
|
84
86
|
id,
|
|
85
87
|
value,
|
|
86
|
-
|
|
88
|
+
onValueChange,
|
|
87
89
|
options: optionsProp
|
|
88
90
|
}) {
|
|
89
91
|
const ctx = useOptionalAppContext();
|
|
90
92
|
const { t, locale, fallbackLocale } = useTranslation();
|
|
91
93
|
const current = value ?? ctx?.timezone;
|
|
92
|
-
const handleChange =
|
|
94
|
+
const handleChange = onValueChange ?? ctx?.setTimezone;
|
|
93
95
|
const configured = optionsProp ?? ctx?.timezoneOptions;
|
|
94
96
|
if (current === void 0 || !handleChange) {
|
|
95
|
-
throw new Error("TimezonePicker requires <AppProvider> or controlled value +
|
|
97
|
+
throw new Error("TimezonePicker requires <AppProvider> or controlled value + onValueChange");
|
|
96
98
|
}
|
|
97
99
|
const options = React.useMemo(
|
|
98
100
|
() => resolveTimezonePickerOptions(configured, current),
|
|
@@ -119,14 +121,14 @@ function TimeFormatPicker({
|
|
|
119
121
|
disabled,
|
|
120
122
|
id,
|
|
121
123
|
value,
|
|
122
|
-
|
|
124
|
+
onValueChange
|
|
123
125
|
}) {
|
|
124
126
|
const ctx = useOptionalAppContext();
|
|
125
127
|
const { t, locale, fallbackLocale } = useTranslation();
|
|
126
128
|
const current = value ?? ctx?.timeFormat;
|
|
127
|
-
const handleChange =
|
|
129
|
+
const handleChange = onValueChange ?? ctx?.setTimeFormat;
|
|
128
130
|
if (current === void 0 || !handleChange) {
|
|
129
|
-
throw new Error("TimeFormatPicker requires <AppProvider> or controlled value +
|
|
131
|
+
throw new Error("TimeFormatPicker requires <AppProvider> or controlled value + onValueChange");
|
|
130
132
|
}
|
|
131
133
|
return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
|
|
132
134
|
/* @__PURE__ */ jsxs(
|
|
@@ -149,14 +151,14 @@ function DateFormatPicker({
|
|
|
149
151
|
disabled,
|
|
150
152
|
id,
|
|
151
153
|
value,
|
|
152
|
-
|
|
154
|
+
onValueChange
|
|
153
155
|
}) {
|
|
154
156
|
const ctx = useOptionalAppContext();
|
|
155
157
|
const { t, locale, fallbackLocale } = useTranslation();
|
|
156
158
|
const current = value ?? ctx?.dateFormat;
|
|
157
|
-
const handleChange =
|
|
159
|
+
const handleChange = onValueChange ?? ctx?.setDateFormat;
|
|
158
160
|
if (current === void 0 || !handleChange) {
|
|
159
|
-
throw new Error("DateFormatPicker requires <AppProvider> or controlled value +
|
|
161
|
+
throw new Error("DateFormatPicker requires <AppProvider> or controlled value + onValueChange");
|
|
160
162
|
}
|
|
161
163
|
return /* @__PURE__ */ jsxs(Select, { value: current, onValueChange: handleChange, disabled, children: [
|
|
162
164
|
/* @__PURE__ */ jsxs(
|
|
@@ -175,4 +177,4 @@ function DateFormatPicker({
|
|
|
175
177
|
] });
|
|
176
178
|
}
|
|
177
179
|
|
|
178
|
-
export { DateFormatPicker, FilterBar, FilterGroup, LocalePicker, PageHeader, TimeFormatPicker, TimezonePicker };
|
|
180
|
+
export { DateFormatPicker, FilterBar, FilterGroup, LocalePicker, PageHeader, TimeFormatPicker, TimezonePicker, Toolbar, ToolbarGroup };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Command, CommandList, CommandItem, CommandGroup } from './chunk-
|
|
2
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
1
|
+
import { Command, CommandList, CommandItem, CommandGroup } from './chunk-HTEL5DQI.js';
|
|
3
2
|
import { Input } from './chunk-VOHTRR5X.js';
|
|
4
|
-
import {
|
|
3
|
+
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
4
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
5
5
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import * as React from 'react';
|
|
@@ -11,7 +11,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
11
11
|
var DEBOUNCE_MS = 250;
|
|
12
12
|
function SearchSelect({
|
|
13
13
|
value = "",
|
|
14
|
-
|
|
14
|
+
onValueChange,
|
|
15
15
|
options: staticOptions,
|
|
16
16
|
loadOptions,
|
|
17
17
|
renderOption,
|
|
@@ -103,12 +103,12 @@ function SearchSelect({
|
|
|
103
103
|
const select = (option) => {
|
|
104
104
|
if (option.disabled) return;
|
|
105
105
|
setPicked(option);
|
|
106
|
-
|
|
106
|
+
onValueChange?.(option.value, option);
|
|
107
107
|
setOpen(false);
|
|
108
108
|
};
|
|
109
109
|
const clear = () => {
|
|
110
110
|
setPicked(null);
|
|
111
|
-
|
|
111
|
+
onValueChange?.("", void 0);
|
|
112
112
|
setOpen(false);
|
|
113
113
|
};
|
|
114
114
|
const onScroll = (event) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeTreeOptions, collectAllExpandableKeys, filterVisibleTree, flattenVisibleTree, findNodeByValue, reactNodeText, getDescendantValues } from './chunk-SMLKNECP.js';
|
|
2
|
-
import { Checkbox } from './chunk-
|
|
3
|
-
import { Command, CommandInput } from './chunk-V6UWJKZF.js';
|
|
4
|
-
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
2
|
+
import { Checkbox } from './chunk-O24Z3ULJ.js';
|
|
5
3
|
import { ScrollArea } from './chunk-3KPEZ5CF.js';
|
|
6
|
-
import {
|
|
4
|
+
import { Command, CommandInput } from './chunk-HTEL5DQI.js';
|
|
5
|
+
import { Popover, PopoverTrigger, PopoverContent } from './chunk-DY5C44UP.js';
|
|
6
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
7
7
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
8
8
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
9
9
|
import * as React from 'react';
|
|
@@ -38,7 +38,7 @@ function TreeSelectRoot({
|
|
|
38
38
|
treeData: treeDataProp,
|
|
39
39
|
value,
|
|
40
40
|
defaultValue,
|
|
41
|
-
|
|
41
|
+
onValueChange,
|
|
42
42
|
multiple,
|
|
43
43
|
treeCheckable,
|
|
44
44
|
treeCheckStrictly,
|
|
@@ -73,7 +73,7 @@ function TreeSelectRoot({
|
|
|
73
73
|
}, [options, expandedKeys, search, showSearch]);
|
|
74
74
|
const commit = (next) => {
|
|
75
75
|
if (!isControlled) setInternal(next);
|
|
76
|
-
|
|
76
|
+
onValueChange?.(checkable || multiple ? next : next[0] ?? void 0);
|
|
77
77
|
};
|
|
78
78
|
const toggleExpand = (key) => {
|
|
79
79
|
setExpandedKeys((prev) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Inline, densityClass } from './chunk-TILFZBTE.js';
|
|
2
|
+
import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-4MMIMZMK.js';
|
|
3
|
+
import { Button } from './chunk-M4PZNAMV.js';
|
|
4
|
+
import { tableCellPaddingClass, tableRowHeightClass, controlIconSmClass } from './chunk-IBK5D2Q6.js';
|
|
5
5
|
import { useTranslation } from './chunk-RLGHEV4A.js';
|
|
6
6
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
7
7
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tableCellPaddingClass, tableRowHeightClass } from './chunk-
|
|
1
|
+
import { tableCellPaddingClass, tableRowHeightClass } from './chunk-IBK5D2Q6.js';
|
|
2
2
|
import { cn } from './chunk-U7N2A7A3.js';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
@@ -45,12 +45,13 @@ function SkeletonDetail() {
|
|
|
45
45
|
] }, i)) })
|
|
46
46
|
] });
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-
|
|
48
|
+
function SkeletonStat() {
|
|
49
|
+
return /* @__PURE__ */ jsxs("div", { className: "ui-skeleton-stat", "aria-busy": "true", children: [
|
|
50
50
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-24" }),
|
|
51
51
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-[length:var(--control-height)] w-32" }),
|
|
52
52
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20" })
|
|
53
53
|
] });
|
|
54
54
|
}
|
|
55
|
+
var SkeletonCard = SkeletonStat;
|
|
55
56
|
|
|
56
|
-
export { Skeleton, SkeletonCard, SkeletonDetail, SkeletonRows, SkeletonTable };
|
|
57
|
+
export { Skeleton, SkeletonCard, SkeletonDetail, SkeletonRows, SkeletonStat, SkeletonTable };
|