@povio/ui 3.4.0-rc.25 → 3.4.0-rc.26
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/{Autocomplete-Ce3ygKxG.d.ts → Autocomplete-0tckACUz.d.ts} +1 -1
- package/dist/{BottomSheet-BWKej2PR.d.ts → BottomSheet-BZXBtOHF.d.ts} +1 -2
- package/dist/{BottomSheet-BNGGxiX7.js → BottomSheet-CEyxZ2Nd.js} +6 -50
- package/dist/BottomSheet.lazy-DT02808T.d.ts +5 -0
- package/dist/{Breadcrumbs-DentRJc_.js → Breadcrumbs-Cbl2-M7J.js} +2 -2
- package/dist/{Calendar-CzDZnIF0.js → Calendar-Dc1UbbAq.js} +4 -4
- package/dist/{DatePicker-O55fFlKg.js → DatePicker-BdRp_rG7.js} +4 -4
- package/dist/{DatePickerInput-CQKtbsQd.js → DatePickerInput-D3kmFpMZ.js} +1 -1
- package/dist/{DateRangePicker-CnxuqAB1.js → DateRangePicker-XhfuEunT.js} +4 -4
- package/dist/{DateTimePicker-B39ywgjx.js → DateTimePicker-_PD3JGVy.js} +4 -4
- package/dist/{Dialog-DpLXaUXz.js → Dialog-CXVxCqvL.js} +1 -1
- package/dist/Drawer-XaAwht0J.js +98 -0
- package/dist/{Form-DsbBBmgz.d.ts → Form-BX_x2VGS.d.ts} +1 -1
- package/dist/{InputItem-D4UmXpyc.js → InputItem-DWuSzs16.js} +5 -5
- package/dist/{Inputs-CnwGtVmt.d.ts → Inputs-B5F_klPo.d.ts} +1 -1
- package/dist/{Inputs-4vWHEAZ1.js → Inputs-D4duTr-F.js} +1 -1
- package/dist/{ListBox-BCW74bzR.js → ListBox-lSDt9Q4j.js} +1 -1
- package/dist/{Menu-DF3r5ssn.js → Menu-DDKo6fUO.js} +3 -3
- package/dist/{Menu-CVgRPAB3.d.ts → Menu-ucX0h-jq.d.ts} +1 -1
- package/dist/{MenuDesktop-CEftscnb.js → MenuDesktop-AnvU8TNb.js} +1 -1
- package/dist/{MenuItem-xJq_qdIf.d.ts → MenuItem--lQvt0VV.d.ts} +1 -1
- package/dist/{Modal-DdKOgTpG.js → Modal-BrOOpTQ4.js} +2 -2
- package/dist/{Modal-HBOqpsZ3.js → Modal-CAAJgOQb.js} +1 -1
- package/dist/{QuerySelect-CuZjxrle.d.ts → QuerySelect-tupQOlAT.d.ts} +2 -2
- package/dist/{ResponsivePopover-C8IriWcI.d.ts → ResponsivePopover-B-Z9sFxq.d.ts} +2 -1
- package/dist/{Select-C_cXfp8z.js → Select-BXhqcKAI.js} +1 -1
- package/dist/{Select-BQ9YJzFg.d.ts → Select-Do5qWHLj.d.ts} +1 -1
- package/dist/{SelectBase-Ds3nqzVg.d.ts → SelectBase-aSvWd7Cx.d.ts} +1 -1
- package/dist/{SplitButton-Cv9ej6Or.d.ts → SplitButton-DxrWH3EX.d.ts} +1 -1
- package/dist/TableDnd-CuHxANWh.js +133 -0
- package/dist/{TextEditor-CAh3oyK3.js → TextEditor-Co_gbkPT.js} +4 -4
- package/dist/{TimePicker-BY6IMP4p.js → TimePicker-dftQtlWT.js} +2 -2
- package/dist/Toast-BDoTQFr5.js +49 -0
- package/dist/{Toast-DDkev3SZ.d.ts → Toast-JL9yaI35.d.ts} +1 -2
- package/dist/ToastContainer-9OS5SK5K.d.ts +5 -0
- package/dist/ToastContainer-TRM91co1.js +23 -0
- package/dist/ToastRenderer-Dpax9sKV.js +40 -0
- package/dist/{autocomplete-NiLahf70.d.ts → autocomplete-bNuG6_dG.d.ts} +2 -2
- package/dist/components/action-modal.js +1 -1
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/bottom-sheet.d.ts +3 -2
- package/dist/components/bottom-sheet.js +108 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/drawer.d.ts +5 -2
- package/dist/components/drawer.js +80 -87
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/input-upload.js +1 -1
- package/dist/components/menu.d.ts +2 -2
- package/dist/components/menu.js +2 -2
- package/dist/components/modal.js +1 -1
- package/dist/components/query-autocomplete.d.ts +2 -2
- package/dist/components/query-select.d.ts +1 -1
- package/dist/components/query-select.js +1 -1
- package/dist/components/responsive-popover.d.ts +1 -1
- package/dist/components/responsive-popover.js +2 -2
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -2
- package/dist/components/toast.js +3 -2
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +37 -64
- package/dist/config/confirmation.js +1 -1
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/confirmation.context-2-6G831n.js +117 -0
- package/dist/confirmation.dialog-Cveu3s5D.js +16 -0
- package/dist/{datePickerValue.utils-BoOLaZk_.js → datePickerValue.utils-469FeRCl.js} +1 -1
- package/dist/{Toast-trOdO6gl.js → dist-B4xyoAhc.js} +1 -288
- package/dist/dom.utils-CeVnXH-T.js +49 -0
- package/dist/{dynamicInputs-CiJNkz3F.d.ts → dynamicInputs-CecPNXsF.d.ts} +18 -18
- package/dist/index.d.ts +20 -18
- package/dist/index.js +21 -18
- package/dist/{logger-BPhG2izn.js → logger-WPC6ostp.js} +1 -1
- package/dist/{query-autocomplete-B3qBhSDk.d.ts → query-autocomplete-CHtcx_ND.d.ts} +2 -2
- package/dist/{query-select-BNNjF0Bc.d.ts → query-select-CD0iFQqR.d.ts} +2 -2
- package/dist/{queryAutocomplete.types-CpLHyvqN.d.ts → queryAutocomplete.types-DaTDttX5.d.ts} +2 -2
- package/dist/rhf/autocomplete.d.ts +2 -2
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/input-upload.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/query-autocomplete.d.ts +1 -1
- package/dist/rhf/query-select.d.ts +1 -1
- package/dist/rhf/select.d.ts +2 -2
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/text-editor.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf.d.ts +20 -18
- package/dist/rhf.js +21 -18
- package/dist/{rolldown-runtime-DUp30N8C.js → rolldown-runtime-B-lAHAz2.js} +10 -1
- package/dist/{select-CYuTeweS.d.ts → select-D80pWSgi.d.ts} +2 -2
- package/dist/{staticDateTimeSegments-CAEX9ogz.js → staticDateTimeSegments-BOFCK9Ub.js} +4 -4
- package/dist/{staticSelect.utils-Blrqx6Y6.js → staticSelect.utils-Bh1OVHuT.js} +5 -5
- package/dist/tanstack/autocomplete.d.ts +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/input-upload.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/query-select.d.ts +1 -1
- package/dist/tanstack/select.d.ts +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/table.d.ts +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-editor.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack.d.ts +19 -17
- package/dist/tanstack.js +28 -25
- package/dist/text-editor.js +1 -1
- package/dist/toast.cva-BGJCi2qq.js +211 -0
- package/dist/toast.runtime--mTw_-fT.js +18 -0
- package/dist/toastActivation.store-BELtcr76.js +16 -0
- package/dist/{uiConfig.context-bpfilZZ_.d.ts → uiConfig.context-B27wINPD.d.ts} +3 -3
- package/dist/{useFilter-BQRb0JpC.js → useFilter-DjR64hmy.js} +1 -1
- package/dist/{useFormAutosave-DJJdcgK-.js → useFormAutosave-DtYELduH.js} +1 -1
- package/dist/{useTableColumnConfig-DaAi30uc.js → useTableColumnConfig-CR0gk7hI.js} +53 -71
- package/dist/{useTableNav-BoQOVqZF.d.ts → useTableNav-CFHbvYvu.d.ts} +1 -1
- package/dist/{useToast-gQ9gzrbt.d.ts → useToast-B55ZUvwy.d.ts} +1 -1
- package/dist/utils/logger.js +1 -1
- package/package.json +1 -1
- package/dist/confirmation.context-C1-ZF9CW.js +0 -80
- package/dist/{FileUpload-CnYu5cmB.js → FileUpload-CNM9dv4D.js} +1 -1
- package/dist/{InputUpload-CAk3IStC.js → InputUpload-BQpUaRQl.js} +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
3
|
+
import { t as compoundMapper } from "./compoundMapper-Di3SKZnS.js";
|
|
4
|
+
//#region src/components/status/Toast/toast.cva.ts
|
|
5
|
+
const toastContainerDefinition = UIOverrides.defineConfig({
|
|
6
|
+
base: ["m-toast-gap-margin-mobile w-auto gap-toast-gap-margin-mobile p-0 md:m-toast-gap-margin-desktop md:gap-toast-gap-margin-desktop"],
|
|
7
|
+
config: { variants: { position: {
|
|
8
|
+
"bottom-right": "right-0 bottom-0",
|
|
9
|
+
"bottom-left": "bottom-0 left-0",
|
|
10
|
+
"top-right": "top-0 right-0",
|
|
11
|
+
"top-left": "top-0 left-0",
|
|
12
|
+
"bottom-center": "bottom-0",
|
|
13
|
+
"top-center": "top-0"
|
|
14
|
+
} } }
|
|
15
|
+
});
|
|
16
|
+
const toastWrapper = clsx("m-0! min-h-0! w-auto! max-w-toast bg-transparent! p-0! shadow-none!");
|
|
17
|
+
const toastDefinition = UIOverrides.defineConfig({
|
|
18
|
+
base: ["m-0 inline-flex w-auto flex-col items-center overflow-hidden rounded-toast-rounding-default shadow-4 md:flex-row"],
|
|
19
|
+
config: {
|
|
20
|
+
variants: {
|
|
21
|
+
variant: {
|
|
22
|
+
outlined: "border bg-elevation-fill-default-1 text-text-default-1",
|
|
23
|
+
contained: "text-text-inverted-1"
|
|
24
|
+
},
|
|
25
|
+
color: {
|
|
26
|
+
neutral: "",
|
|
27
|
+
success: "",
|
|
28
|
+
warning: "",
|
|
29
|
+
error: ""
|
|
30
|
+
},
|
|
31
|
+
position: {
|
|
32
|
+
"bottom-right": "",
|
|
33
|
+
"bottom-left": "",
|
|
34
|
+
"bottom-center": "",
|
|
35
|
+
"top-right": "",
|
|
36
|
+
"top-left": "",
|
|
37
|
+
"top-center": ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
compoundVariants: [
|
|
41
|
+
{
|
|
42
|
+
variant: "outlined",
|
|
43
|
+
color: "neutral",
|
|
44
|
+
className: "border-elevation-outline-default-1"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
variant: "outlined",
|
|
48
|
+
color: "success",
|
|
49
|
+
className: "border-elevation-outline-success-1"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
variant: "outlined",
|
|
53
|
+
color: "warning",
|
|
54
|
+
className: "border-elevation-outline-warning-1"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
variant: "outlined",
|
|
58
|
+
color: "error",
|
|
59
|
+
className: "border-elevation-outline-error-1"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
variant: "contained",
|
|
63
|
+
color: "neutral",
|
|
64
|
+
className: "bg-elevation-fill-inverted-1"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
variant: "contained",
|
|
68
|
+
color: "success",
|
|
69
|
+
className: "bg-elevation-fill-success-1"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
variant: "contained",
|
|
73
|
+
color: "warning",
|
|
74
|
+
className: "bg-elevation-fill-warning-1"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
variant: "contained",
|
|
78
|
+
color: "error",
|
|
79
|
+
className: "bg-elevation-fill-error-1"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
variant: "outlined",
|
|
84
|
+
color: "neutral"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
const buttonColorVariant = compoundMapper({
|
|
89
|
+
compoundVariants: [
|
|
90
|
+
{
|
|
91
|
+
variant: "outlined",
|
|
92
|
+
color: "neutral",
|
|
93
|
+
value: { color: "secondary" }
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
variant: "outlined",
|
|
97
|
+
color: "success",
|
|
98
|
+
value: { color: "success" }
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
variant: "outlined",
|
|
102
|
+
color: "warning",
|
|
103
|
+
value: { color: "warning" }
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
variant: "outlined",
|
|
107
|
+
color: "error",
|
|
108
|
+
value: { color: "error" }
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
variant: "contained",
|
|
112
|
+
color: "neutral",
|
|
113
|
+
value: {
|
|
114
|
+
color: "primary",
|
|
115
|
+
inverted: true
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
variant: "contained",
|
|
120
|
+
color: "success",
|
|
121
|
+
value: {
|
|
122
|
+
color: "success",
|
|
123
|
+
inverted: true
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
variant: "contained",
|
|
128
|
+
color: "warning",
|
|
129
|
+
value: {
|
|
130
|
+
color: "warning",
|
|
131
|
+
inverted: true
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
variant: "contained",
|
|
136
|
+
color: "error",
|
|
137
|
+
value: {
|
|
138
|
+
color: "error",
|
|
139
|
+
inverted: true
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
defaultVariants: {
|
|
144
|
+
variant: "outlined",
|
|
145
|
+
color: "neutral"
|
|
146
|
+
},
|
|
147
|
+
default: { color: "secondary" }
|
|
148
|
+
});
|
|
149
|
+
const statusIconDefinition = UIOverrides.defineConfig({
|
|
150
|
+
base: ["size-6 shrink-0"],
|
|
151
|
+
config: {
|
|
152
|
+
variants: {
|
|
153
|
+
variant: {
|
|
154
|
+
outlined: "",
|
|
155
|
+
contained: "text-text-inverted-1"
|
|
156
|
+
},
|
|
157
|
+
color: {
|
|
158
|
+
neutral: "",
|
|
159
|
+
success: "",
|
|
160
|
+
warning: "",
|
|
161
|
+
error: ""
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
compoundVariants: [
|
|
165
|
+
{
|
|
166
|
+
variant: "outlined",
|
|
167
|
+
color: "neutral",
|
|
168
|
+
className: "text-text-default-2"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
variant: "outlined",
|
|
172
|
+
color: "success",
|
|
173
|
+
className: "text-text-success-1"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
variant: "outlined",
|
|
177
|
+
color: "warning",
|
|
178
|
+
className: "text-text-warning-1"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
variant: "outlined",
|
|
182
|
+
color: "error",
|
|
183
|
+
className: "text-text-error-1"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
defaultVariants: {
|
|
187
|
+
variant: "outlined",
|
|
188
|
+
color: "neutral"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
const statusSeparatorDefinition = UIOverrides.defineConfig({
|
|
193
|
+
base: ["h-px shrink-0 self-stretch md:h-auto md:w-px"],
|
|
194
|
+
config: {
|
|
195
|
+
variants: {
|
|
196
|
+
variant: {
|
|
197
|
+
outlined: "",
|
|
198
|
+
contained: "hidden"
|
|
199
|
+
},
|
|
200
|
+
color: {
|
|
201
|
+
neutral: "bg-elevation-outline-default-1",
|
|
202
|
+
success: "bg-elevation-outline-success-1",
|
|
203
|
+
warning: "bg-elevation-outline-warning-1",
|
|
204
|
+
error: "bg-elevation-outline-error-1"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
defaultVariants: { color: "neutral" }
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
//#endregion
|
|
211
|
+
export { toastDefinition as a, toastContainerDefinition as i, statusIconDefinition as n, toastWrapper as o, statusSeparatorDefinition as r, buttonColorVariant as t };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { t as Toast } from "./Toast-BDoTQFr5.js";
|
|
2
|
+
import { n as y } from "./dist-B4xyoAhc.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/status/Toast/toast.runtime.tsx
|
|
5
|
+
const showToast = (id, color, params, options) => {
|
|
6
|
+
(color === "neutral" ? y.info : y[color])(/* @__PURE__ */ jsx(Toast, {
|
|
7
|
+
color,
|
|
8
|
+
...params
|
|
9
|
+
}), {
|
|
10
|
+
...options,
|
|
11
|
+
toastId: id,
|
|
12
|
+
position: params.position,
|
|
13
|
+
data: { variant: params.variant }
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
const dismissToast = (id) => y.dismiss(id);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { dismissToast, showToast };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/components/status/Toast/toastActivation.store.ts
|
|
2
|
+
let active = false;
|
|
3
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
4
|
+
const activateToastRenderer = () => {
|
|
5
|
+
if (active) return;
|
|
6
|
+
active = true;
|
|
7
|
+
listeners.forEach((listener) => listener());
|
|
8
|
+
};
|
|
9
|
+
const subscribeToToastActivation = (listener) => {
|
|
10
|
+
listeners.add(listener);
|
|
11
|
+
return () => listeners.delete(listener);
|
|
12
|
+
};
|
|
13
|
+
const isToastRendererActive = () => active;
|
|
14
|
+
const isToastRendererInactive = () => false;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { subscribeToToastActivation as i, isToastRendererActive as n, isToastRendererInactive as r, activateToastRenderer as t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as BottomSheetProps } from "./BottomSheet-BZXBtOHF.js";
|
|
2
2
|
import { r as ButtonProps } from "./Button-OxjPE7Hf.js";
|
|
3
3
|
import { i as CheckboxProps } from "./Checkbox-Di3VlWJj.js";
|
|
4
4
|
import { o as TextInputProps } from "./FormField-CpPQoyv_.js";
|
|
5
5
|
import { i as NumberInputProps } from "./NumberInput-Cr_nD98h.js";
|
|
6
6
|
import { r as RadioGroupProps } from "./RadioGroup-iry4UYlW.js";
|
|
7
|
-
import { t as SelectBaseProps } from "./SelectBase-
|
|
7
|
+
import { t as SelectBaseProps } from "./SelectBase-aSvWd7Cx.js";
|
|
8
8
|
import { r as SliderProps } from "./Slider-CdZdFERe.js";
|
|
9
9
|
import { r as ToggleProps } from "./Toggle-vHKDihtx.js";
|
|
10
10
|
import { n as ActionModalProps } from "./ActionModal-C4lfhfPx.js";
|
|
11
11
|
import { r as ToastPosition } from "./index-B8r_kiw4.js";
|
|
12
|
-
import {
|
|
12
|
+
import { r as ToastProps } from "./Toast-JL9yaI35.js";
|
|
13
13
|
import { n as TagProps } from "./Tag-DkTx1S7H.js";
|
|
14
14
|
import { r as DatePickerProps } from "./DatePicker-EJTAeVRc.js";
|
|
15
15
|
import { i as DateRangeRelativeOption } from "./DateRangePicker-CMWUdyh1.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-
|
|
1
|
+
import { R as $325a3faab7a68acd$export$a16aca283550c30d } from "./Dialog-CXVxCqvL.js";
|
|
2
2
|
import { useCallback, useMemo } from "react";
|
|
3
3
|
//#region ../../node_modules/.bun/@react-aria+i18n@3.12.15+67f6792bdf102c28/node_modules/@react-aria/i18n/dist/useFilter.mjs
|
|
4
4
|
function $bb77f239b46e8c72$export$3274cf84b703fff(options) {
|
|
@@ -3,7 +3,7 @@ import { t as ZodArray } from "./schemas-BkfyFvBp.js";
|
|
|
3
3
|
import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
|
|
4
4
|
import { t as ZodUtils } from "./zod.utils-Nz_Tbo_v.js";
|
|
5
5
|
import { n as getDefaultInputComponentType } from "./dynamicInputs-D8j0ko24.js";
|
|
6
|
-
import { t as InputItem } from "./InputItem-
|
|
6
|
+
import { t as InputItem } from "./InputItem-DWuSzs16.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -15,20 +15,16 @@ import { t as DateUtils } from "./date.utils-B8_QF9y6.js";
|
|
|
15
15
|
import { f as ZodISODateTime, i as ZodEnum, l as ZodString, n as ZodBoolean, o as ZodNumber, s as ZodObject, t as ZodArray } from "./schemas-BkfyFvBp.js";
|
|
16
16
|
import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
|
|
17
17
|
import { t as ZodUtils } from "./zod.utils-Nz_Tbo_v.js";
|
|
18
|
-
import { t as Modal } from "./Modal-
|
|
18
|
+
import { t as Modal } from "./Modal-BrOOpTQ4.js";
|
|
19
19
|
import { Pagination } from "./components/pagination.js";
|
|
20
|
-
import { t as logger } from "./logger-
|
|
20
|
+
import { t as logger } from "./logger-WPC6ostp.js";
|
|
21
21
|
import { t as useTranslationMemo } from "./useTranslationMemo-CrZbeyBv.js";
|
|
22
22
|
import { t as UIRouter } from "./router.context-VhvhlIvV.js";
|
|
23
23
|
import { t as RoutingUtils } from "./routing.utils-UTQonIhB.js";
|
|
24
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
24
|
+
import { Suspense, lazy, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
25
25
|
import { c } from "react/compiler-runtime";
|
|
26
26
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
27
|
import { useTranslation } from "react-i18next";
|
|
28
|
-
import { DndContext, KeyboardSensor, MouseSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
29
|
-
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
30
|
-
import { SortableContext, arrayMove, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
31
|
-
import { CSS } from "@dnd-kit/utilities";
|
|
32
28
|
import { createPaginatedRowModel, createSortedRowModel, flexRender, stockFeatures, tableFeatures, useTable } from "@tanstack/react-table";
|
|
33
29
|
import i18next from "i18next";
|
|
34
30
|
/**
|
|
@@ -518,6 +514,10 @@ function useTableNav(options) {
|
|
|
518
514
|
}
|
|
519
515
|
//#endregion
|
|
520
516
|
//#region src/components/table/Table.tsx
|
|
517
|
+
const DndProvider = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DndProvider })));
|
|
518
|
+
const SortableRows = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.SortableRows })));
|
|
519
|
+
const DraggableRow = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DraggableRow })));
|
|
520
|
+
const DragHandle = lazy(() => import("./TableDnd-CuHxANWh.js").then((module) => ({ default: module.DragHandle })));
|
|
521
521
|
const tableFeaturesConfig = tableFeatures({
|
|
522
522
|
...stockFeatures,
|
|
523
523
|
sortedRowModel: createSortedRowModel(),
|
|
@@ -536,49 +536,17 @@ const renderCell = (Comp, props) => {
|
|
|
536
536
|
return typeof rendered === "string" ? /* @__PURE__ */ jsx(CellText, { children: rendered }) : rendered;
|
|
537
537
|
};
|
|
538
538
|
const RowDragHandleCell = ({ rowId }) => {
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
});
|
|
547
|
-
};
|
|
548
|
-
const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
|
|
549
|
-
const DraggableRow = ({ row, showCellBorder, onRowClick, onDoubleClick, tableRowCva, tableDataCva, hasOnClick, ...props }) => {
|
|
550
|
-
const { transform, transition, setNodeRef, isDragging } = useSortable({ id: row.id });
|
|
551
|
-
const style = {
|
|
552
|
-
transform: CSS.Transform.toString(transform),
|
|
553
|
-
transition,
|
|
554
|
-
opacity: isDragging ? .8 : 1,
|
|
555
|
-
zIndex: isDragging ? 1 : 0,
|
|
556
|
-
position: "relative"
|
|
557
|
-
};
|
|
558
|
-
return /* @__PURE__ */ jsx("tr", {
|
|
559
|
-
ref: setNodeRef,
|
|
560
|
-
style,
|
|
561
|
-
"data-clickable": hasOnClick || row.getCanSelect() || void 0,
|
|
562
|
-
"data-selected": row.getIsSelected() || void 0,
|
|
563
|
-
className: clsx(tableRowCva(props)),
|
|
564
|
-
onClick: () => {
|
|
565
|
-
if (onRowClick) {
|
|
566
|
-
onRowClick(row.original);
|
|
567
|
-
return;
|
|
568
|
-
}
|
|
569
|
-
if (row.getCanSelect()) row.toggleSelected();
|
|
570
|
-
},
|
|
571
|
-
onDoubleClick: () => onDoubleClick?.(row.original),
|
|
572
|
-
children: row.getVisibleCells().map((cell, cellIndex) => {
|
|
573
|
-
const columnMeta = cell.column.columnDef.meta ?? {};
|
|
574
|
-
return /* @__PURE__ */ jsx("td", {
|
|
575
|
-
tabIndex: -1,
|
|
576
|
-
className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta.cellClass, columnMeta.width),
|
|
577
|
-
children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
|
|
578
|
-
}, cell.id);
|
|
539
|
+
return /* @__PURE__ */ jsx(DragHandle, {
|
|
540
|
+
id: rowId,
|
|
541
|
+
children: (dragProps) => /* @__PURE__ */ jsx(InlineIconButton, {
|
|
542
|
+
...dragProps,
|
|
543
|
+
className: "cursor-move p-1",
|
|
544
|
+
label: "Drag handle",
|
|
545
|
+
icon: GripVertical
|
|
579
546
|
})
|
|
580
547
|
});
|
|
581
548
|
};
|
|
549
|
+
const AutoDragHandleCell = ({ row }) => /* @__PURE__ */ jsx(RowDragHandleCell, { rowId: row.id });
|
|
582
550
|
const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, className, sorting, setSorting, columnOrder, setColumnOrder, columnVisibility, setColumnVisibility, bulkSelectionActions: ActionHeader, enableDragDrop = false, onDragEnd, onReorder, getRowId, enableRowSelection, enableMultiRowSelection = false, defaultSelectedRows, onRowSelectionChange, ...props }) => {
|
|
583
551
|
const tableRowCva = UIOverrides.useCva("table.rowCva", tableRowDefinition);
|
|
584
552
|
const theadCva = UIOverrides.useCva("table.theadCva", theadDefinition);
|
|
@@ -659,7 +627,12 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
|
|
|
659
627
|
if (onReorder) {
|
|
660
628
|
const oldIndex = items.findIndex((item_0) => getRowId(item_0) === active.id);
|
|
661
629
|
const newIndex = items.findIndex((item_1) => getRowId(item_1) === over.id);
|
|
662
|
-
if (oldIndex !== -1 && newIndex !== -1)
|
|
630
|
+
if (oldIndex !== -1 && newIndex !== -1) {
|
|
631
|
+
const reorderedItems = [...items];
|
|
632
|
+
const [movedItem] = reorderedItems.splice(oldIndex, 1);
|
|
633
|
+
reorderedItems.splice(newIndex, 0, movedItem);
|
|
634
|
+
onReorder(reorderedItems);
|
|
635
|
+
}
|
|
663
636
|
}
|
|
664
637
|
onDragEnd?.(event);
|
|
665
638
|
}
|
|
@@ -669,7 +642,6 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
|
|
|
669
642
|
items,
|
|
670
643
|
getRowId
|
|
671
644
|
]);
|
|
672
|
-
const sensors = useSensors(useSensor(MouseSensor, {}), useSensor(TouchSensor, {}), useSensor(KeyboardSensor, {}));
|
|
673
645
|
const selectedRows = table.getSelectedRowModel().rows;
|
|
674
646
|
const columnCount = table.getHeaderGroups()[0].headers.length;
|
|
675
647
|
const isAnyRowSelected = selectedRows.length > 0 && !!ActionHeader;
|
|
@@ -716,19 +688,29 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
|
|
|
716
688
|
}), /* @__PURE__ */ jsx("tbody", {
|
|
717
689
|
ref,
|
|
718
690
|
className: "relative",
|
|
719
|
-
children: enableDragDrop ? /* @__PURE__ */ jsx(
|
|
691
|
+
children: enableDragDrop ? /* @__PURE__ */ jsx(SortableRows, {
|
|
720
692
|
items: dataIds,
|
|
721
|
-
strategy: verticalListSortingStrategy,
|
|
722
693
|
children: table.getRowModel().rows.map((row_0) => /* @__PURE__ */ jsx(DraggableRow, {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
694
|
+
id: row_0.id,
|
|
695
|
+
className: clsx(tableRowCva({ ...props })),
|
|
696
|
+
isClickable: hasOnClick || row_0.getCanSelect(),
|
|
697
|
+
isSelected: row_0.getIsSelected(),
|
|
698
|
+
onClick: () => {
|
|
699
|
+
if (onRowClick) {
|
|
700
|
+
onRowClick(row_0.original);
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
if (row_0.getCanSelect()) row_0.toggleSelected();
|
|
704
|
+
},
|
|
705
|
+
onDoubleClick: () => onDoubleClick?.(row_0.original),
|
|
706
|
+
children: row_0.getVisibleCells().map((cell, cellIndex) => {
|
|
707
|
+
const columnMeta_0 = cell.column.columnDef.meta ?? {};
|
|
708
|
+
return /* @__PURE__ */ jsx("td", {
|
|
709
|
+
tabIndex: -1,
|
|
710
|
+
className: clsx(tableDataCva({ hasRightBorder: cellIndex > 0 && showCellBorder }), columnMeta_0.cellClass, columnMeta_0.width),
|
|
711
|
+
children: renderCell(cell.column.columnDef.cell, CustomCellContext(cell.getContext()))
|
|
712
|
+
}, cell.id);
|
|
713
|
+
})
|
|
732
714
|
}, row_0.id))
|
|
733
715
|
}) : table.getRowModel().rows.map((row_1) => {
|
|
734
716
|
return /* @__PURE__ */ jsx("tr", {
|
|
@@ -743,24 +725,24 @@ const Table$1 = ({ items, showCellBorder, columns, onRowClick, onDoubleClick, cl
|
|
|
743
725
|
onDoubleClick: () => onDoubleClick?.(row_1.original),
|
|
744
726
|
"data-clickable": hasOnClick || row_1.getCanSelect() || void 0,
|
|
745
727
|
"data-selected": row_1.getIsSelected() || void 0,
|
|
746
|
-
children: row_1.getVisibleCells().map((
|
|
747
|
-
const
|
|
728
|
+
children: row_1.getVisibleCells().map((cell_0, cellIndex_0) => {
|
|
729
|
+
const columnMeta_1 = cell_0.column.columnDef.meta ?? {};
|
|
748
730
|
return /* @__PURE__ */ jsx("td", {
|
|
749
731
|
tabIndex: -1,
|
|
750
|
-
className: clsx(tableDataCva({ hasRightBorder:
|
|
751
|
-
children: renderCell(
|
|
752
|
-
},
|
|
732
|
+
className: clsx(tableDataCva({ hasRightBorder: cellIndex_0 > 0 && showCellBorder }), columnMeta_1.cellClass, columnMeta_1.width),
|
|
733
|
+
children: renderCell(cell_0.column.columnDef.cell, CustomCellContext(cell_0.getContext()))
|
|
734
|
+
}, cell_0.id);
|
|
753
735
|
})
|
|
754
736
|
}, row_1.id);
|
|
755
737
|
})
|
|
756
738
|
})]
|
|
757
739
|
});
|
|
758
|
-
if (enableDragDrop) return /* @__PURE__ */ jsx(
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
740
|
+
if (enableDragDrop) return /* @__PURE__ */ jsx(Suspense, {
|
|
741
|
+
fallback: null,
|
|
742
|
+
children: /* @__PURE__ */ jsx(DndProvider, {
|
|
743
|
+
onDragEnd: handleDragEnd,
|
|
744
|
+
children: tableElement
|
|
745
|
+
})
|
|
764
746
|
});
|
|
765
747
|
return tableElement;
|
|
766
748
|
};
|
|
@@ -2,9 +2,9 @@ import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-Bd
|
|
|
2
2
|
import { c as ZodObject, h as output, i as ZodEnum } from "./schemas-CAtYiHoz.js";
|
|
3
3
|
import { t as FieldPath } from "./form.binding-DWlFTecs.js";
|
|
4
4
|
import { ComponentType, Dispatch, KeyboardEvent, ReactNode, SetStateAction } from "react";
|
|
5
|
-
import { DragEndEvent, UniqueIdentifier } from "@dnd-kit/core";
|
|
6
5
|
import { CellContext, ColumnDef, ColumnMeta, ColumnOrderState, ColumnVisibilityState, OnChangeFn, PaginationState, Row, RowData, RowSelectionState, SortingState, StockFeatures, Table } from "@tanstack/react-table";
|
|
7
6
|
import { TFunction } from "i18next";
|
|
7
|
+
import { DragEndEvent, UniqueIdentifier } from "@dnd-kit/core";
|
|
8
8
|
//#region src/components/table/ColumnConfig.d.ts
|
|
9
9
|
type ColumnDef$4<TData extends RowData, TValue = unknown> = ColumnDef<StockFeatures, TData, TValue>;
|
|
10
10
|
type VisibilityState$2 = ColumnVisibilityState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as ToastOptions$1, r as ToastPosition, t as Id } from "./index-B8r_kiw4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { r as ToastProps } from "./Toast-JL9yaI35.js";
|
|
3
3
|
//#region src/components/status/Toast/useToast.d.ts
|
|
4
4
|
interface ToastParams extends Omit<ToastProps, "color"> {
|
|
5
5
|
position?: ToastPosition;
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as logger } from "../logger-
|
|
1
|
+
import { t as logger } from "../logger-WPC6ostp.js";
|
|
2
2
|
export { logger };
|
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import "./i18n-C2TBJvnh.js";
|
|
2
|
-
import { ActionModal } from "./components/action-modal.js";
|
|
3
|
-
import { createContext, use, useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
//#region src/config/confirmation.context.tsx
|
|
7
|
-
let Confirmation;
|
|
8
|
-
(function(_Confirmation) {
|
|
9
|
-
const DEFAULT_STATE = {
|
|
10
|
-
heading: "",
|
|
11
|
-
description: "",
|
|
12
|
-
isOpen: false,
|
|
13
|
-
primaryAction: {
|
|
14
|
-
label: "",
|
|
15
|
-
onPress: () => {}
|
|
16
|
-
},
|
|
17
|
-
secondaryAction: {
|
|
18
|
-
label: "",
|
|
19
|
-
onPress: () => {}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const Context = createContext(null);
|
|
23
|
-
_Confirmation.Provider = ({ children }) => {
|
|
24
|
-
const [state, setState] = useState(DEFAULT_STATE);
|
|
25
|
-
const { t } = useTranslation("ui");
|
|
26
|
-
const onCancel = () => setState(DEFAULT_STATE);
|
|
27
|
-
const confirm = useCallback(async ({ heading, description, buttonSize, textAlign, modalClassName, cancelLabel = t(($) => $.ui.confirmation.cancel), confirmLabel = t(($_0) => $_0.ui.confirmation.confirm), confirmVariant, confirmColor, cancelVariant, cancelColor }) => {
|
|
28
|
-
return new Promise((resolve) => {
|
|
29
|
-
setState({
|
|
30
|
-
heading,
|
|
31
|
-
description,
|
|
32
|
-
buttonSize,
|
|
33
|
-
textAlign,
|
|
34
|
-
modalClassName,
|
|
35
|
-
primaryAction: {
|
|
36
|
-
label: confirmLabel,
|
|
37
|
-
onPress() {
|
|
38
|
-
setState({
|
|
39
|
-
...state,
|
|
40
|
-
isOpen: false,
|
|
41
|
-
heading: "",
|
|
42
|
-
description: ""
|
|
43
|
-
});
|
|
44
|
-
resolve(true);
|
|
45
|
-
},
|
|
46
|
-
variant: confirmVariant,
|
|
47
|
-
color: confirmColor
|
|
48
|
-
},
|
|
49
|
-
secondaryAction: {
|
|
50
|
-
label: cancelLabel,
|
|
51
|
-
onPress() {
|
|
52
|
-
onCancel();
|
|
53
|
-
resolve(false);
|
|
54
|
-
},
|
|
55
|
-
variant: cancelVariant,
|
|
56
|
-
color: cancelColor
|
|
57
|
-
},
|
|
58
|
-
isOpen: !state.isOpen
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}, [state, t]);
|
|
62
|
-
const value = useMemo(() => ({ confirm }), [confirm]);
|
|
63
|
-
return /* @__PURE__ */ jsxs(Context.Provider, {
|
|
64
|
-
value,
|
|
65
|
-
children: [/* @__PURE__ */ jsx(ActionModal, {
|
|
66
|
-
...state,
|
|
67
|
-
onClose: state.secondaryAction?.onPress ?? onCancel,
|
|
68
|
-
primaryAction: state.primaryAction,
|
|
69
|
-
secondaryAction: state.secondaryAction
|
|
70
|
-
}), children]
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
_Confirmation.useConfirmation = () => {
|
|
74
|
-
const context = use(Context);
|
|
75
|
-
if (!context) throw new Error("Confirmation.useConfirmation must be used within a Confirmation.Provider");
|
|
76
|
-
return context;
|
|
77
|
-
};
|
|
78
|
-
})(Confirmation || (Confirmation = {}));
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Confirmation as t };
|
|
@@ -10,9 +10,9 @@ import { t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
|
10
10
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
11
11
|
import { t as Button } from "./Button-CtPMeT8f.js";
|
|
12
12
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
13
|
-
import "./i18n-C2TBJvnh.js";
|
|
14
13
|
import { TextButton } from "./components/text-button.js";
|
|
15
14
|
import { t as FieldController } from "./form.binding-DyZ4fH8l.js";
|
|
15
|
+
import "./i18n-C2TBJvnh.js";
|
|
16
16
|
import { t as FileUtils } from "./file.utils-DqQxnuAm.js";
|
|
17
17
|
import { t as ProgressBar } from "./ProgressBar-C8dtVA-1.js";
|
|
18
18
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
@@ -9,9 +9,9 @@ import { n as cva, t as UIOverrides } from "./uiOverrides.context-Bfm2n-n8.js";
|
|
|
9
9
|
import { t as Typography } from "./Typography-AcUd9df8.js";
|
|
10
10
|
import { t as Button } from "./Button-CtPMeT8f.js";
|
|
11
11
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
12
|
-
import "./i18n-C2TBJvnh.js";
|
|
13
12
|
import { TextButton } from "./components/text-button.js";
|
|
14
13
|
import { t as FieldController } from "./form.binding-DyZ4fH8l.js";
|
|
14
|
+
import "./i18n-C2TBJvnh.js";
|
|
15
15
|
import { a as inputSizeDefinition } from "./input.cva-KYGD4Bdz.js";
|
|
16
16
|
import { t as FileUtils } from "./file.utils-DqQxnuAm.js";
|
|
17
17
|
import { memo, useState } from "react";
|