@ztwoint/z-ui 0.1.126 → 0.1.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/column-reorder/column-reorder.hook.js +11 -9
- package/dist/components/column-reorder/column-reorder.js +23 -19
- package/dist/components/column-reorder/column-reorder.type.d.ts +3 -0
- package/dist/components/column-reorder/components/column-item/column-item.hook.d.ts +13 -2
- package/dist/components/column-reorder/components/column-item/column-item.hook.js +57 -39
- package/dist/components/column-reorder/components/column-item/column-item.js +111 -45
- package/dist/components/column-reorder/components/column-item/column-item.type.d.ts +2 -0
- package/dist/components/{chart-card → primitives/chart-card}/chart-card.js +2 -2
- package/dist/components/primitives/index.d.ts +2 -0
- package/dist/components/primitives/popconfirm/popconfirm.const.d.ts +20 -0
- package/dist/components/primitives/popconfirm/popconfirm.const.js +22 -0
- package/dist/components/primitives/popconfirm/popconfirm.d.ts +4 -0
- package/dist/components/primitives/popconfirm/popconfirm.hook.d.ts +14 -0
- package/dist/components/primitives/popconfirm/popconfirm.hook.js +32 -0
- package/dist/components/primitives/popconfirm/popconfirm.js +78 -0
- package/dist/components/primitives/popconfirm/popconfirm.type.d.ts +24 -0
- package/dist/components/primitives/popconfirm/popconfirm.utils.d.ts +3 -0
- package/dist/components/primitives/popconfirm/popconfirm.utils.js +6 -0
- package/dist/components/primitives/select-compact/select-compact.js +17 -0
- package/dist/components/{table-card → primitives/table-card}/table-card.js +74 -73
- package/dist/components/{table-card → primitives/table-card}/table-card.type.d.ts +3 -3
- package/dist/components/table/components/cell/avatar-cell.js +5 -4
- package/dist/components/table/table-provider.js +3 -2
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +80 -78
- package/dist/types/components/column-reorder/column-reorder.type.d.ts +3 -0
- package/dist/types/components/column-reorder/components/column-item/column-item.hook.d.ts +13 -2
- package/dist/types/components/column-reorder/components/column-item/column-item.type.d.ts +2 -0
- package/dist/types/components/primitives/index.d.ts +2 -0
- package/dist/types/components/primitives/popconfirm/popconfirm.const.d.ts +20 -0
- package/dist/types/components/primitives/popconfirm/popconfirm.d.ts +4 -0
- package/dist/types/components/primitives/popconfirm/popconfirm.hook.d.ts +14 -0
- package/dist/types/components/primitives/popconfirm/popconfirm.type.d.ts +24 -0
- package/dist/types/components/primitives/popconfirm/popconfirm.utils.d.ts +3 -0
- package/dist/types/components/{table-card → primitives/table-card}/table-card.type.d.ts +4 -4
- package/dist/types/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/components/select-compact/select-compact.js +0 -17
- /package/dist/components/{chart-card → primitives/chart-card}/builders/bar-chart-builder.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/bar-chart-builder.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/chart-builder-factory.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/chart-builder-factory.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/pie-chart-builder.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/builders/pie-chart-builder.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/chart-card-states.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/chart-card-states.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/chart-card.config.types.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/chart-card.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/chart-card.types.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/config/colors.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/config/colors.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/config/defaults.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/config/defaults.js +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/index.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/validators/config-validator.d.ts +0 -0
- /package/dist/components/{chart-card → primitives/chart-card}/validators/config-validator.js +0 -0
- /package/dist/components/{select-compact → primitives/select-compact}/select-compact.d.ts +0 -0
- /package/dist/components/{table-card → primitives/table-card}/index.d.ts +0 -0
- /package/dist/components/{table-card → primitives/table-card}/table-card.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/builders/bar-chart-builder.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/builders/chart-builder-factory.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/builders/pie-chart-builder.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/chart-card-states.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/chart-card.config.types.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/chart-card.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/chart-card.types.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/config/colors.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/config/defaults.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/index.d.ts +0 -0
- /package/dist/types/components/{chart-card → primitives/chart-card}/validators/config-validator.d.ts +0 -0
- /package/dist/types/components/{select-compact → primitives/select-compact}/select-compact.d.ts +0 -0
- /package/dist/types/components/{table-card → primitives/table-card}/index.d.ts +0 -0
- /package/dist/types/components/{table-card → primitives/table-card}/table-card.d.ts +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ export * from './components/file-upload-area';
|
|
|
10
10
|
export * from './components/input/input';
|
|
11
11
|
export * from './components/nav-header';
|
|
12
12
|
export * from './components/select/z2-select';
|
|
13
|
-
export * from './components/select-compact/select-compact';
|
|
13
|
+
export * from './components/primitives/select-compact/select-compact';
|
|
14
14
|
export * from './components/stepper';
|
|
15
15
|
export * from './components/stepper-item/stepper-item';
|
|
16
16
|
export * from './components/tab/tab';
|
|
17
17
|
export * from './components/table';
|
|
18
18
|
export * from './components/tooltip/tooltip';
|
|
19
|
-
export * from './components/table-card';
|
|
19
|
+
export * from './components/primitives/table-card';
|
|
20
20
|
export * from './components/badge/badge';
|
|
21
21
|
export * from './components/avatar/avatar';
|
|
22
22
|
export * from './components/text-preset/text-preset';
|
|
@@ -27,9 +27,10 @@ export * from './components/radio/z2-radio';
|
|
|
27
27
|
export * from './components/assets/icons';
|
|
28
28
|
export * from './components/segmented-control';
|
|
29
29
|
export * from './components/popover/popover';
|
|
30
|
+
export * from './components/primitives/popconfirm/popconfirm';
|
|
30
31
|
export * from './components/dynamic-table';
|
|
31
32
|
export * from './components/chart';
|
|
32
|
-
export * from './components/chart-card';
|
|
33
|
+
export * from './components/primitives/chart-card';
|
|
33
34
|
export * from './components/radio-card/radio-card';
|
|
34
35
|
export * from './components/z2map';
|
|
35
36
|
export * from './lib/theme.hook';
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import { Input as Uo } from "./components/input/input.js";
|
|
|
30
30
|
import { NavHeader as qo } from "./components/nav-header/nav-header.js";
|
|
31
31
|
import { NavItem as Jo } from "./components/nav-header/nav-item/nav-item.js";
|
|
32
32
|
import { Z2Select as Yo, Z2SelectContent as jo, Z2SelectGroup as Ko, Z2SelectItem as $o, Z2SelectLabel as oe, Z2SelectScrollDownButton as ee, Z2SelectScrollUpButton as re, Z2SelectSeparator as te, Z2SelectTrigger as ae, Z2SelectValue as pe } from "./components/select/z2-select.js";
|
|
33
|
-
import { Z2SelectCompact as le } from "./components/select-compact/select-compact.js";
|
|
33
|
+
import { Z2SelectCompact as le } from "./components/primitives/select-compact/select-compact.js";
|
|
34
34
|
import { Z2Stepper as me } from "./components/stepper/stepper.js";
|
|
35
35
|
import { Z2StepperItem as xe } from "./components/stepper-item/stepper-item.js";
|
|
36
36
|
import { Z2Tabs as ue, Z2TabsContent as Ze, Z2TabsList as ce, Z2TabsTrigger as se } from "./components/tab/tab.js";
|
|
@@ -61,7 +61,7 @@ import { PaginationInfo as ur } from "./components/table/components/pagination/c
|
|
|
61
61
|
import { PaginationQuickJumper as cr } from "./components/table/components/pagination/components/pagination-quick-jumper.js";
|
|
62
62
|
import "react";
|
|
63
63
|
import { Z2Tooltip as Cr } from "./components/tooltip/tooltip.js";
|
|
64
|
-
import { default as Sr } from "./components/table-card/table-card.js";
|
|
64
|
+
import { default as Sr } from "./components/primitives/table-card/table-card.js";
|
|
65
65
|
import { Badge as Tr, badgeVariants as Dr } from "./components/badge/badge.js";
|
|
66
66
|
import { Avatar as wr, AvatarWithLabel as Br } from "./components/avatar/avatar.js";
|
|
67
67
|
import { Z2TextPreset as hr } from "./components/text-preset/text-preset.js";
|
|
@@ -110,30 +110,31 @@ import { default as xa } from "./components/assets/icons/right-square-bracket.js
|
|
|
110
110
|
import { SegmentedControl as ua } from "./components/segmented-control/controller.js";
|
|
111
111
|
import { SegmentedControlItem as ca } from "./components/segmented-control/item.js";
|
|
112
112
|
import { Popover as Ca, PopoverAnchor as ba, PopoverContent as Sa, PopoverTrigger as Ia } from "./components/popover/popover.js";
|
|
113
|
-
import {
|
|
114
|
-
import {
|
|
115
|
-
import {
|
|
116
|
-
import {
|
|
117
|
-
import {
|
|
118
|
-
import {
|
|
119
|
-
import {
|
|
120
|
-
import {
|
|
121
|
-
import {
|
|
122
|
-
import {
|
|
123
|
-
import {
|
|
124
|
-
import {
|
|
125
|
-
import {
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
import {
|
|
129
|
-
import {
|
|
130
|
-
import {
|
|
131
|
-
import {
|
|
132
|
-
import {
|
|
133
|
-
import {
|
|
134
|
-
import {
|
|
135
|
-
import {
|
|
136
|
-
import {
|
|
113
|
+
import { Popconfirm as Da } from "./components/primitives/popconfirm/popconfirm.js";
|
|
114
|
+
import { Z2Table as wa, Z2TableBase as Ba, Z2TableBody as va, Z2TableBodyRow as ha, Z2TableBodyRowCell as La, Z2TableBodyRowExpandded as Ma, Z2TableBodyRowSkeleton as Pa, Z2TableBodyRowSkeletonCell as Ra, Z2TableEmpty as Aa, Z2TableHead as Ea, Z2TableHeadRow as ya, Z2TableHeadRowCell as ka, Z2TableHeadRowCellResize as Na, Z2TableLoader as Ha, Z2TableRowSelect as _a, Z2TableRowSelectAll as Fa, Z2TableRowSpacer as Oa } from "./components/dynamic-table/z2-table.js";
|
|
115
|
+
import { Z2TableContainer as Va, Z2TableProvider as Wa, Z2TableRoot as Ua, useZ2Table as Xa } from "./components/dynamic-table/z2-table-context.js";
|
|
116
|
+
import { Z2TablePagination as za } from "./components/dynamic-table/z2-table-pagination.js";
|
|
117
|
+
import { Z2TableColumnHeader as Qa } from "./components/dynamic-table/z2-column-header.js";
|
|
118
|
+
import { Chart as ja } from "./components/chart/chart.js";
|
|
119
|
+
import { ChartCard as $a } from "./components/primitives/chart-card/chart-card.js";
|
|
120
|
+
import { EmptyState as ep, ErrorState as rp, LoadingState as tp } from "./components/primitives/chart-card/chart-card-states.js";
|
|
121
|
+
import { COLOR_PALETTES as pp, UI_COLORS as np, getThemePalette as lp } from "./components/primitives/chart-card/config/colors.js";
|
|
122
|
+
import { validateChartConfig as mp, validateChartData as dp } from "./components/primitives/chart-card/validators/config-validator.js";
|
|
123
|
+
import { buildBarChartOptions as ip } from "./components/primitives/chart-card/builders/bar-chart-builder.js";
|
|
124
|
+
import { buildLineChartOptions as Zp } from "./components/primitives/chart-card/builders/line-chart-builder.js";
|
|
125
|
+
import { buildChartOptions as sp, isChartTypeSupported as Cp, registeredChartTypes as bp } from "./components/primitives/chart-card/builders/chart-builder-factory.js";
|
|
126
|
+
import { Z2RadioCard as Ip } from "./components/radio-card/radio-card.js";
|
|
127
|
+
import { default as Dp } from "./components/z2map/map.js";
|
|
128
|
+
import { DEFAULT_MAP_CONFIG as wp, MAP_VARIANTS as Bp, PIN_SIZES as vp } from "./components/z2map/map.constants.js";
|
|
129
|
+
import { MapPinComponent as Lp } from "./components/z2map/components/map-pin.js";
|
|
130
|
+
import { MapPinContent as Pp } from "./components/z2map/components/map-pin-content.js";
|
|
131
|
+
import { MapControls as Ap } from "./components/z2map/components/map-controls.js";
|
|
132
|
+
import { MapZoomControl as yp } from "./components/z2map/components/map-zoom-control.js";
|
|
133
|
+
import { MapStyleControl as Np } from "./components/z2map/components/map-style-control.js";
|
|
134
|
+
import { useTheme as _p } from "./lib/theme.hook.js";
|
|
135
|
+
import { cn as Op } from "./lib/utils.js";
|
|
136
|
+
import { Z2PopoverTrigger as Vp } from "./components/collapsible-side-nav-bar/popover/popover-trigger.js";
|
|
137
|
+
import { Z2PopoverContent as Up } from "./components/collapsible-side-nav-bar/popover/popover-content.js";
|
|
137
138
|
export {
|
|
138
139
|
p as Alert,
|
|
139
140
|
m as AlertCirclesIcon,
|
|
@@ -147,10 +148,10 @@ export {
|
|
|
147
148
|
Tr as Badge,
|
|
148
149
|
ke as BooleanCell,
|
|
149
150
|
x as Button,
|
|
150
|
-
|
|
151
|
+
pp as COLOR_PALETTES,
|
|
151
152
|
pa as ChainIcon,
|
|
152
|
-
|
|
153
|
-
|
|
153
|
+
ja as Chart,
|
|
154
|
+
$a as ChartCard,
|
|
154
155
|
zr as CheckIcon,
|
|
155
156
|
ze as ChevronDownIcon,
|
|
156
157
|
Qr as ChevronLeftIcon,
|
|
@@ -162,7 +163,7 @@ export {
|
|
|
162
163
|
K as CountryFlags,
|
|
163
164
|
Vo as DEFAULT_ACCEPT,
|
|
164
165
|
Be as DEFAULT_EMPTY_MESSAGE,
|
|
165
|
-
|
|
166
|
+
wp as DEFAULT_MAP_CONFIG,
|
|
166
167
|
O as DatabaseCopy,
|
|
167
168
|
G as DatabaseCopyIcon,
|
|
168
169
|
ta as DescendingSortingIcon,
|
|
@@ -172,9 +173,9 @@ export {
|
|
|
172
173
|
lt as DoubleChevronRightIcon,
|
|
173
174
|
mt as DragHandleIcon,
|
|
174
175
|
Zo as DropdownContext,
|
|
175
|
-
|
|
176
|
+
ep as EmptyState,
|
|
176
177
|
la as EraserIcon,
|
|
177
|
-
|
|
178
|
+
rp as ErrorState,
|
|
178
179
|
Oo as FileUploadArea,
|
|
179
180
|
ea as FilterIcon,
|
|
180
181
|
xt as HomeIcon,
|
|
@@ -186,24 +187,25 @@ export {
|
|
|
186
187
|
He as LinkCell,
|
|
187
188
|
Ct as LinkIcon,
|
|
188
189
|
St as ListTreeIcon,
|
|
189
|
-
|
|
190
|
-
|
|
190
|
+
tp as LoadingState,
|
|
191
|
+
Bp as MAP_VARIANTS,
|
|
191
192
|
xr as MagnifierIcon,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
193
|
+
Ap as MapControls,
|
|
194
|
+
Lp as MapPinComponent,
|
|
195
|
+
Pp as MapPinContent,
|
|
196
|
+
Np as MapStyleControl,
|
|
197
|
+
yp as MapZoomControl,
|
|
197
198
|
Tt as MediaRecordIcon,
|
|
198
199
|
gt as MinusIcon,
|
|
199
200
|
qo as NavHeader,
|
|
200
201
|
Jo as NavItem,
|
|
201
202
|
Ee as NumberCell,
|
|
202
203
|
Bt as OctagonWarningIcon,
|
|
203
|
-
|
|
204
|
+
vp as PIN_SIZES,
|
|
204
205
|
ur as PaginationInfo,
|
|
205
206
|
cr as PaginationQuickJumper,
|
|
206
207
|
ht as PinIcon,
|
|
208
|
+
Da as Popconfirm,
|
|
207
209
|
Ca as Popover,
|
|
208
210
|
ba as PopoverAnchor,
|
|
209
211
|
Sa as PopoverContent,
|
|
@@ -238,7 +240,7 @@ export {
|
|
|
238
240
|
Qe as TableRow,
|
|
239
241
|
Rr as TreeCheckboxSelect,
|
|
240
242
|
jt as TriangleWarningIcon,
|
|
241
|
-
|
|
243
|
+
np as UI_COLORS,
|
|
242
244
|
Et as UploadIcon,
|
|
243
245
|
zt as Vector3Icon,
|
|
244
246
|
kt as VectorIcon,
|
|
@@ -289,11 +291,11 @@ export {
|
|
|
289
291
|
To as Z2DropdownSubItem,
|
|
290
292
|
Do as Z2DropdownSubTrigger,
|
|
291
293
|
Gt as Z2Icon,
|
|
292
|
-
|
|
294
|
+
Dp as Z2Map,
|
|
293
295
|
E as Z2Popover,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
296
|
+
Up as Z2PopoverContent,
|
|
297
|
+
Vp as Z2PopoverTrigger,
|
|
298
|
+
Ip as Z2RadioCard,
|
|
297
299
|
Gr as Z2RadioGroup,
|
|
298
300
|
Vr as Z2RadioGroupIndicator,
|
|
299
301
|
Wr as Z2RadioGroupItem,
|
|
@@ -320,28 +322,28 @@ export {
|
|
|
320
322
|
Wt as Z2SlashIcon,
|
|
321
323
|
me as Z2Stepper,
|
|
322
324
|
xe as Z2StepperItem,
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
325
|
+
wa as Z2Table,
|
|
326
|
+
Ba as Z2TableBase,
|
|
327
|
+
va as Z2TableBody,
|
|
328
|
+
ha as Z2TableBodyRow,
|
|
329
|
+
La as Z2TableBodyRowCell,
|
|
330
|
+
Ma as Z2TableBodyRowExpandded,
|
|
331
|
+
Pa as Z2TableBodyRowSkeleton,
|
|
332
|
+
Ra as Z2TableBodyRowSkeletonCell,
|
|
333
|
+
Qa as Z2TableColumnHeader,
|
|
334
|
+
Va as Z2TableContainer,
|
|
335
|
+
Aa as Z2TableEmpty,
|
|
336
|
+
Ea as Z2TableHead,
|
|
337
|
+
ya as Z2TableHeadRow,
|
|
338
|
+
ka as Z2TableHeadRowCell,
|
|
339
|
+
Na as Z2TableHeadRowCellResize,
|
|
340
|
+
Ha as Z2TableLoader,
|
|
341
|
+
za as Z2TablePagination,
|
|
342
|
+
Wa as Z2TableProvider,
|
|
343
|
+
Ua as Z2TableRoot,
|
|
344
|
+
_a as Z2TableRowSelect,
|
|
345
|
+
Fa as Z2TableRowSelectAll,
|
|
346
|
+
Oa as Z2TableRowSpacer,
|
|
345
347
|
ue as Z2Tabs,
|
|
346
348
|
Ze as Z2TabsContent,
|
|
347
349
|
ce as Z2TabsList,
|
|
@@ -349,19 +351,19 @@ export {
|
|
|
349
351
|
hr as Z2TextPreset,
|
|
350
352
|
Cr as Z2Tooltip,
|
|
351
353
|
Dr as badgeVariants,
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
354
|
+
ip as buildBarChartOptions,
|
|
355
|
+
sp as buildChartOptions,
|
|
356
|
+
Zp as buildLineChartOptions,
|
|
355
357
|
i as buttonVariants,
|
|
356
|
-
|
|
358
|
+
Op as cn,
|
|
357
359
|
ge as extractCellValue,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
360
|
+
lp as getThemePalette,
|
|
361
|
+
Cp as isChartTypeSupported,
|
|
362
|
+
bp as registeredChartTypes,
|
|
361
363
|
Me as useTableContext,
|
|
362
|
-
|
|
364
|
+
_p as useTheme,
|
|
363
365
|
R as useZ2SideNavBar,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
366
|
+
Xa as useZ2Table,
|
|
367
|
+
mp as validateChartConfig,
|
|
368
|
+
dp as validateChartData
|
|
367
369
|
};
|
|
@@ -3,12 +3,15 @@ export type ColumnType = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
label: [string, string];
|
|
5
5
|
icon: React.ReactNode;
|
|
6
|
+
editedLabel?: string;
|
|
6
7
|
};
|
|
7
8
|
export interface ColumnReOrderProps {
|
|
8
9
|
columns: ColumnType[];
|
|
9
10
|
onReorder?: (reorderedColumns: ColumnType[]) => void;
|
|
10
11
|
onRemove?: (columnId: string) => void;
|
|
12
|
+
onEdit?: (columnId: string, newLabel: string) => void;
|
|
11
13
|
renderAction?: (column: ColumnType, onRemove: ((columnId: string) => void) | undefined) => React.ReactNode;
|
|
12
14
|
className?: string;
|
|
13
15
|
disabled?: boolean;
|
|
16
|
+
editable?: boolean;
|
|
14
17
|
}
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ColumnType } from '../../column-reorder.type';
|
|
2
3
|
import { ColumnItemState } from './column-item.type';
|
|
3
4
|
export declare const idle: ColumnItemState;
|
|
4
|
-
export declare const useColumnItemDragAndDrop: (column: ColumnType, index: number, disabled?: boolean) => {
|
|
5
|
-
ref:
|
|
5
|
+
export declare const useColumnItemDragAndDrop: (column: ColumnType, index: number, disabled?: boolean, onEdit?: (columnId: string, newLabel: string) => void) => {
|
|
6
|
+
ref: React.RefObject<HTMLDivElement | null>;
|
|
6
7
|
state: ColumnItemState;
|
|
8
|
+
isEditing: boolean;
|
|
9
|
+
editValue: string;
|
|
10
|
+
setEditValue: React.Dispatch<React.SetStateAction<string>>;
|
|
11
|
+
handleEditClick: () => void;
|
|
12
|
+
handleSave: () => void;
|
|
13
|
+
handleCancel: () => void;
|
|
14
|
+
handleKeyDown: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
15
|
+
groupLabel: string;
|
|
16
|
+
fieldLabel: string;
|
|
17
|
+
fullLabel: string;
|
|
7
18
|
};
|
|
@@ -16,6 +16,8 @@ export interface ColumnItemProps {
|
|
|
16
16
|
column: ColumnType;
|
|
17
17
|
index: number;
|
|
18
18
|
onRemove?: (columnId: string) => void;
|
|
19
|
+
onEdit?: (columnId: string, newLabel: string) => void;
|
|
19
20
|
renderAction?: (column: ColumnType, onRemove?: (columnId: string) => void) => ReactNode;
|
|
20
21
|
disabled?: boolean;
|
|
22
|
+
editable?: boolean;
|
|
21
23
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const POPCONFIRM_PLACEMENTS: {
|
|
2
|
+
readonly TOP: "top";
|
|
3
|
+
readonly TOP_LEFT: "topLeft";
|
|
4
|
+
readonly TOP_RIGHT: "topRight";
|
|
5
|
+
readonly BOTTOM: "bottom";
|
|
6
|
+
readonly BOTTOM_LEFT: "bottomLeft";
|
|
7
|
+
readonly BOTTOM_RIGHT: "bottomRight";
|
|
8
|
+
readonly LEFT: "left";
|
|
9
|
+
readonly LEFT_TOP: "leftTop";
|
|
10
|
+
readonly LEFT_BOTTOM: "leftBottom";
|
|
11
|
+
readonly RIGHT: "right";
|
|
12
|
+
readonly RIGHT_TOP: "rightTop";
|
|
13
|
+
readonly RIGHT_BOTTOM: "rightBottom";
|
|
14
|
+
};
|
|
15
|
+
export type PopconfirmPlacement = (typeof POPCONFIRM_PLACEMENTS)[keyof typeof POPCONFIRM_PLACEMENTS];
|
|
16
|
+
export declare const POPCONFIRM_DEFAULT_CONFIG: {
|
|
17
|
+
readonly okText: "OK";
|
|
18
|
+
readonly cancelText: "Cancel";
|
|
19
|
+
readonly placement: PopconfirmPlacement;
|
|
20
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface UsePopconfirmProps {
|
|
2
|
+
open?: boolean;
|
|
3
|
+
onOpenChange?: (open: boolean) => void;
|
|
4
|
+
onConfirm?: () => void | Promise<void>;
|
|
5
|
+
onCancel?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const usePopconfirm: (props: UsePopconfirmProps) => {
|
|
8
|
+
open: boolean;
|
|
9
|
+
confirmLoading: boolean;
|
|
10
|
+
handleOpenChange: (newOpen: boolean) => void;
|
|
11
|
+
handleConfirm: () => Promise<void>;
|
|
12
|
+
handleCancel: () => void;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PopconfirmPlacement } from './popconfirm.const';
|
|
3
|
+
export interface PopconfirmProps {
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
onConfirm?: () => void | Promise<void>;
|
|
7
|
+
onCancel?: () => void;
|
|
8
|
+
okText?: string;
|
|
9
|
+
cancelText?: string;
|
|
10
|
+
placement?: PopconfirmPlacement;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
okButtonProps?: {
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
cancelButtonProps?: {
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { PopconfirmPlacement } from './popconfirm.const';
|
|
2
|
+
export declare const mapPlacementToRadixSide: (placement: PopconfirmPlacement) => "top" | "bottom" | "left" | "right";
|
|
3
|
+
export declare const mapPlacementToRadixAlign: (placement: PopconfirmPlacement) => "start" | "center" | "end";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TableProps, TableSchema, TableSearch, TableSort } from '
|
|
3
|
-
import { TableFilter, FilterRule } from '
|
|
4
|
-
import { PaginationProps, PaginationInfoProps, PaginationQuickJumperProps } from '
|
|
5
|
-
import { FilterSchema } from '
|
|
2
|
+
import { TableProps, TableSchema, TableSearch, TableSort } from '../../table/table.type';
|
|
3
|
+
import { TableFilter, FilterRule } from '../../table-filter/table-filter.type';
|
|
4
|
+
import { PaginationProps, PaginationInfoProps, PaginationQuickJumperProps } from '../../table/components/pagination/pagination.type';
|
|
5
|
+
import { FilterSchema } from '../../table-filter/table-filter.type';
|
|
6
6
|
export interface TableCardProps {
|
|
7
7
|
dataSource: Record<string, unknown>[];
|
|
8
8
|
schema: TableSchema;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export * from './components/file-upload-area';
|
|
|
11
11
|
export * from './components/input/input';
|
|
12
12
|
export * from './components/nav-header';
|
|
13
13
|
export * from './components/select/z2-select';
|
|
14
|
-
export * from './components/select-compact/select-compact';
|
|
14
|
+
export * from './components/primitives/select-compact/select-compact';
|
|
15
15
|
export * from './components/stepper';
|
|
16
16
|
export * from './components/stepper-item/stepper-item';
|
|
17
17
|
export * from './components/tab/tab';
|
|
18
18
|
export * from './components/table';
|
|
19
19
|
export * from './components/tooltip/tooltip';
|
|
20
|
-
export * from './components/table-card';
|
|
20
|
+
export * from './components/primitives/table-card';
|
|
21
21
|
export * from './components/badge/badge';
|
|
22
22
|
export * from './components/avatar/avatar';
|
|
23
23
|
export * from './components/text-preset/text-preset';
|
|
@@ -28,9 +28,10 @@ export * from './components/radio/z2-radio';
|
|
|
28
28
|
export * from './components/assets/icons';
|
|
29
29
|
export * from './components/segmented-control';
|
|
30
30
|
export * from './components/popover/popover';
|
|
31
|
+
export * from './components/primitives/popconfirm/popconfirm';
|
|
31
32
|
export * from './components/dynamic-table';
|
|
32
33
|
export * from './components/chart';
|
|
33
|
-
export * from './components/chart-card';
|
|
34
|
+
export * from './components/primitives/chart-card';
|
|
34
35
|
export * from './components/radio-card/radio-card';
|
|
35
36
|
export * from './components/z2map';
|
|
36
37
|
export * from './lib/theme.hook';
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { Z2Select as i, Z2SelectTrigger as m, Z2SelectValue as S, Z2SelectContent as Z, Z2SelectItem as d } from "../select/z2-select.js";
|
|
3
|
-
function f({
|
|
4
|
-
value: t,
|
|
5
|
-
onChange: c,
|
|
6
|
-
options: r,
|
|
7
|
-
placeholder: a = "Select field",
|
|
8
|
-
className: n
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ u(i, { value: t || "", onValueChange: c, children: [
|
|
11
|
-
/* @__PURE__ */ e(m, { className: n, children: /* @__PURE__ */ e(S, { placeholder: a }) }),
|
|
12
|
-
/* @__PURE__ */ e(Z, { children: r.map((l) => /* @__PURE__ */ e(d, { value: l.value, children: l.label }, l.value)) })
|
|
13
|
-
] });
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
f as Z2SelectCompact
|
|
17
|
-
};
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/bar-chart-builder.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/chart-builder-factory.d.ts
RENAMED
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/chart-builder-factory.js
RENAMED
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.d.ts
RENAMED
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.js
RENAMED
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/builders/pie-chart-builder.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/validators/config-validator.d.ts
RENAMED
|
File without changes
|
/package/dist/components/{chart-card → primitives/chart-card}/validators/config-validator.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{chart-card → primitives/chart-card}/builders/bar-chart-builder.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{chart-card → primitives/chart-card}/builders/line-chart-builder.d.ts
RENAMED
|
File without changes
|
/package/dist/types/components/{chart-card → primitives/chart-card}/builders/pie-chart-builder.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{chart-card → primitives/chart-card}/chart-card.config.types.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/types/components/{chart-card → primitives/chart-card}/validators/config-validator.d.ts
RENAMED
|
File without changes
|
/package/dist/types/components/{select-compact → primitives/select-compact}/select-compact.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|