@konstructio/ui 0.1.2-alpha.95 → 0.1.2-alpha.97

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.
@@ -9,12 +9,12 @@ import { AlertDialog as c } from "./AlertDialog/AlertDialog.js";
9
9
  import { Autocomplete as D } from "./Autocomplete/Autocomplete.js";
10
10
  import { t as V } from "../Loading-DNlO4qxs.js";
11
11
  import { Badge as w } from "./Badge/Badge.js";
12
- import { Typography as R } from "./Typography/Typography.js";
12
+ import { Typography as S } from "./Typography/Typography.js";
13
13
  import { ButtonGroup as h } from "./ButtonGroup/ButtonGroup.js";
14
14
  import { Card as L } from "./Card/Card.js";
15
- import { DatePicker as I } from "./Datepicker/DatePicker.js";
16
- import { Radio as P } from "./Radio/Radio.js";
17
- import { RadioGroup as F } from "./RadioGroup/RadioGroup.js";
15
+ import { DatePicker as E } from "./Datepicker/DatePicker.js";
16
+ import { Radio as I } from "./Radio/Radio.js";
17
+ import { RadioGroup as P } from "./RadioGroup/RadioGroup.js";
18
18
  import { TimePicker as A } from "./TimePicker/TimePicker.js";
19
19
  import { DateRangePicker as M } from "./DateRangePicker/DateRangePicker.js";
20
20
  import { Divider as y } from "./Divider/Divider.js";
@@ -36,12 +36,12 @@ import { RadioCard as cr } from "./RadioCard/RadioCard.js";
36
36
  import { RadioCardGroup as Dr } from "./RadioCardGroup/RadioCardGroup.js";
37
37
  import { Range as Vr } from "./Range/Range.js";
38
38
  import { Select as wr } from "./Select/Select.js";
39
- import { Footer as Rr } from "./Sidebar/components/Footer/Footer.js";
39
+ import { Footer as Sr } from "./Sidebar/components/Footer/Footer.js";
40
40
  import { Label as hr } from "./Sidebar/components/Label/Label.js";
41
41
  import { Logo as Lr } from "./Sidebar/components/Logo/Logo.js";
42
- import { NavigationGroup as Ir } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
43
- import { NavigationOption as Pr } from "./Sidebar/components/NavigationOption/NavigationOption.js";
44
- import { NavigationSeparator as Fr } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
42
+ import { NavigationGroup as Er } from "./Sidebar/components/NavigationGroup/NavigationGroup.js";
43
+ import { NavigationOption as Ir } from "./Sidebar/components/NavigationOption/NavigationOption.js";
44
+ import { NavigationSeparator as Pr } from "./Sidebar/components/NavigationSeparator/NavigationSeparator.js";
45
45
  import { Navigation as Ar } from "./Sidebar/components/Navigation/Navigation.js";
46
46
  import { Sidebar as Mr } from "./Sidebar/Sidebar.js";
47
47
  import { Slider as yr } from "./Slider/Slider.js";
@@ -58,10 +58,10 @@ import { Tag as co } from "./Tag/Tag.js";
58
58
  import { TagSelect as Do } from "./TagSelect/TagSelect.js";
59
59
  import { TextArea as Vo } from "./TextArea/TextArea.js";
60
60
  import { t as wo } from "../Toast-CWyLcmNX.js";
61
- import { Tooltip as Ro } from "./Tooltip/Tooltip.js";
62
- import { VirtualizedTableEvent as ho, sendCollapseRowEvent as Bo, sendExpandRowEvent as Lo, sendToggleRowEvent as xo } from "./VirtualizedTable/events/index.js";
63
- import { TruncateText as No } from "./VirtualizedTable/components/TruncateText/TruncateText.js";
64
- import { VirtualizedTable as Eo } from "./VirtualizedTable/VirtualizedTable.js";
61
+ import { Tooltip as So } from "./Tooltip/Tooltip.js";
62
+ import { VirtualizedTableEvent as ho, sendCollapseRowEvent as Bo, sendExpandRowEvent as Lo, sendResetFiltersEvent as xo, sendToggleRowEvent as Eo } from "./VirtualizedTable/events/index.js";
63
+ import { TruncateText as Io } from "./VirtualizedTable/components/TruncateText/TruncateText.js";
64
+ import { VirtualizedTable as Po } from "./VirtualizedTable/VirtualizedTable.js";
65
65
  export {
66
66
  l as Alert,
67
67
  c as AlertDialog,
@@ -76,7 +76,7 @@ export {
76
76
  eo as Content,
77
77
  n as Counter,
78
78
  H as DateFilterDropdown,
79
- I as DatePicker,
79
+ E as DatePicker,
80
80
  K as DateRangeFilterDropdown,
81
81
  M as DateRangePicker,
82
82
  y as Divider,
@@ -84,7 +84,7 @@ export {
84
84
  wr as Dropdown,
85
85
  m as DropdownButton,
86
86
  $ as Filter,
87
- Rr as Footer,
87
+ Sr as Footer,
88
88
  or as ImageUpload,
89
89
  a as Input,
90
90
  hr as Label,
@@ -95,17 +95,17 @@ export {
95
95
  pr as Modal,
96
96
  ar as MultiSelectDropdown,
97
97
  Ar as Navigation,
98
- Ir as NavigationGroup,
99
- Pr as NavigationOption,
100
- Fr as NavigationSeparator,
98
+ Er as NavigationGroup,
99
+ Ir as NavigationOption,
100
+ Pr as NavigationSeparator,
101
101
  n as NumberInput,
102
102
  nr as PhoneNumberInput,
103
103
  lr as PieChart,
104
104
  gr as ProgressBar,
105
- P as Radio,
105
+ I as Radio,
106
106
  cr as RadioCard,
107
107
  Dr as RadioCardGroup,
108
- F as RadioGroup,
108
+ P as RadioGroup,
109
109
  Vr as Range,
110
110
  wr as Select,
111
111
  Mr as Sidebar,
@@ -122,16 +122,17 @@ export {
122
122
  Z as TimeFilterDropdown,
123
123
  A as TimePicker,
124
124
  wo as Toast,
125
- Ro as Tooltip,
125
+ So as Tooltip,
126
126
  so as Trigger,
127
- No as TruncateText,
128
- R as Typography,
129
- Eo as VirtualizedTable,
127
+ Io as TruncateText,
128
+ S as Typography,
129
+ Po as VirtualizedTable,
130
130
  ho as VirtualizedTableEvent,
131
131
  jr as horizontalConnectorWrapperVariants,
132
132
  Bo as sendCollapseRowEvent,
133
133
  Lo as sendExpandRowEvent,
134
- xo as sendToggleRowEvent,
134
+ xo as sendResetFiltersEvent,
135
+ Eo as sendToggleRowEvent,
135
136
  qr as stepConnectorVariants,
136
137
  Hr as stepContentVariants,
137
138
  Jr as stepDescriptionVariants,
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { t as o } from "./Checkbox-BvRmHWxk.js";
2
2
  import { t as m } from "./DropdownButton-CWwjA3zI.js";
3
- import { t as p } from "./Breadcrumb-xLKDl92B.js";
3
+ import { t as e } from "./Breadcrumb-xLKDl92B.js";
4
4
  import { t as a } from "./Input-BZG7N8m1.js";
5
5
  import { t as n } from "./Counter-C1o8YZoR.js";
6
6
  import { i as l, t as d } from "./utils-COaoD3PI.js";
7
7
  import { Alert as g } from "./components/Alert/Alert.js";
8
8
  import { Button as c } from "./components/Button/Button.js";
9
9
  import { AlertDialog as D } from "./components/AlertDialog/AlertDialog.js";
10
- import { Autocomplete as b } from "./components/Autocomplete/Autocomplete.js";
10
+ import { Autocomplete as V } from "./components/Autocomplete/Autocomplete.js";
11
11
  import { t as w } from "./Loading-DNlO4qxs.js";
12
- import { Badge as h } from "./components/Badge/Badge.js";
12
+ import { Badge as S } from "./components/Badge/Badge.js";
13
13
  import { Typography as x } from "./components/Typography/Typography.js";
14
14
  import { ButtonGroup as L } from "./components/ButtonGroup/ButtonGroup.js";
15
- import { Card as I } from "./components/Card/Card.js";
16
- import { useMediaQuery as E } from "./hooks/useMediaQuery.js";
15
+ import { Card as E } from "./components/Card/Card.js";
16
+ import { useMediaQuery as I } from "./hooks/useMediaQuery.js";
17
17
  import { useToggle as M } from "./hooks/useToggle.js";
18
18
  import { DatePicker as A } from "./components/Datepicker/DatePicker.js";
19
19
  import { Radio as y } from "./components/Radio/Radio.js";
@@ -27,20 +27,20 @@ import { DateFilterDropdown as _ } from "./components/Filter/components/DateFilt
27
27
  import { DateRangeFilterDropdown as rr } from "./components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js";
28
28
  import { TextMultiSelect as tr } from "./components/Filter/components/TextMultiSelect/TextMultiSelect.js";
29
29
  import { TimeFilterDropdown as ir } from "./components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js";
30
- import { Filter as er } from "./components/Filter/Filter.js";
30
+ import { Filter as pr } from "./components/Filter/Filter.js";
31
31
  import { t as fr } from "./ImageUpload-DebL0hwF.js";
32
32
  import { LineChart as sr } from "./components/LineChart/LineChart.js";
33
33
  import { t as dr } from "./Modal-IyDr5vIx.js";
34
34
  import { t as gr } from "./components-C_LekSz_.js";
35
35
  import { PhoneNumberInput as cr } from "./components/PhoneNumberInput/PhoneNumberInput.js";
36
36
  import { PieChart as Dr } from "./components/PieChart/PieChart.js";
37
- import { ProgressBar as br } from "./components/ProgressBar/ProgressBar.js";
37
+ import { ProgressBar as Vr } from "./components/ProgressBar/ProgressBar.js";
38
38
  import { RadioCard as wr } from "./components/RadioCard/RadioCard.js";
39
- import { RadioCardGroup as hr } from "./components/RadioCardGroup/RadioCardGroup.js";
39
+ import { RadioCardGroup as Sr } from "./components/RadioCardGroup/RadioCardGroup.js";
40
40
  import { Range as xr } from "./components/Range/Range.js";
41
41
  import { Select as Lr } from "./components/Select/Select.js";
42
- import { Footer as Ir } from "./components/Sidebar/components/Footer/Footer.js";
43
- import { Label as Er } from "./components/Sidebar/components/Label/Label.js";
42
+ import { Footer as Er } from "./components/Sidebar/components/Footer/Footer.js";
43
+ import { Label as Ir } from "./components/Sidebar/components/Label/Label.js";
44
44
  import { Logo as Mr } from "./components/Sidebar/components/Logo/Logo.js";
45
45
  import { NavigationGroup as Ar } from "./components/Sidebar/components/NavigationGroup/NavigationGroup.js";
46
46
  import { NavigationOption as yr } from "./components/Sidebar/components/NavigationOption/NavigationOption.js";
@@ -49,36 +49,36 @@ import { Navigation as Ur } from "./components/Sidebar/components/Navigation/Nav
49
49
  import { Sidebar as jr } from "./components/Sidebar/Sidebar.js";
50
50
  import { Slider as Hr } from "./components/Slider/Slider.js";
51
51
  import { t as Kr } from "./Spinner-BB1muhcJ.js";
52
- import { horizontalConnectorWrapperVariants as Yr, stepConnectorVariants as Zr, stepContentVariants as _r, stepDescriptionVariants as $r, stepIndicatorVariants as ro, stepItemVariants as oo, stepLabelVariants as to, stepListVariants as mo, stepVariants as io, stepperVariants as po } from "./components/Stepper/Stepper.variants.js";
52
+ import { horizontalConnectorWrapperVariants as Yr, stepConnectorVariants as Zr, stepContentVariants as _r, stepDescriptionVariants as $r, stepIndicatorVariants as ro, stepItemVariants as oo, stepLabelVariants as to, stepListVariants as mo, stepVariants as io, stepperVariants as eo } from "./components/Stepper/Stepper.variants.js";
53
53
  import { Stepper as ao } from "./components/Stepper/Stepper.js";
54
54
  import { t as no } from "./Switch-CT2R9JgM.js";
55
55
  import { Table as lo } from "./components/Table/Table.js";
56
56
  import { Content as go } from "./components/Tabs/components/Content.js";
57
57
  import { List as co } from "./components/Tabs/components/List.js";
58
58
  import { Trigger as Do } from "./components/Tabs/components/Trigger.js";
59
- import { Tabs as bo } from "./components/Tabs/Tabs.js";
59
+ import { Tabs as Vo } from "./components/Tabs/Tabs.js";
60
60
  import { Tag as wo } from "./components/Tag/Tag.js";
61
- import { TagSelect as ho } from "./components/TagSelect/TagSelect.js";
61
+ import { TagSelect as So } from "./components/TagSelect/TagSelect.js";
62
62
  import { TextArea as xo } from "./components/TextArea/TextArea.js";
63
63
  import { t as Lo } from "./Toast-CWyLcmNX.js";
64
- import { Tooltip as Io } from "./components/Tooltip/Tooltip.js";
65
- import { VirtualizedTableEvent as Eo, sendCollapseRowEvent as Fo, sendExpandRowEvent as Mo, sendToggleRowEvent as ko } from "./components/VirtualizedTable/events/index.js";
66
- import { TruncateText as Go } from "./components/VirtualizedTable/components/TruncateText/TruncateText.js";
67
- import { VirtualizedTable as zo } from "./components/VirtualizedTable/VirtualizedTable.js";
68
- import { ThemeContext as Qo } from "./contexts/theme.context.js";
69
- import { useTheme as Wo } from "./contexts/theme.hook.js";
70
- import { t as qo } from "./theme.provider-BC_aCvPM.js";
64
+ import { Tooltip as Eo } from "./components/Tooltip/Tooltip.js";
65
+ import { VirtualizedTableEvent as Io, sendCollapseRowEvent as No, sendExpandRowEvent as Mo, sendResetFiltersEvent as ko, sendToggleRowEvent as Ao } from "./components/VirtualizedTable/events/index.js";
66
+ import { TruncateText as yo } from "./components/VirtualizedTable/components/TruncateText/TruncateText.js";
67
+ import { VirtualizedTable as Oo } from "./components/VirtualizedTable/VirtualizedTable.js";
68
+ import { ThemeContext as Uo } from "./contexts/theme.context.js";
69
+ import { useTheme as jo } from "./contexts/theme.hook.js";
70
+ import { t as Ho } from "./theme.provider-BC_aCvPM.js";
71
71
  import "./contexts/index.js";
72
72
  export {
73
73
  g as Alert,
74
74
  D as AlertDialog,
75
- b as Autocomplete,
76
- h as Badge,
75
+ V as Autocomplete,
76
+ S as Badge,
77
77
  Y as BadgeMultiSelect,
78
- p as Breadcrumb,
78
+ e as Breadcrumb,
79
79
  c as Button,
80
80
  L as ButtonGroup,
81
- I as Card,
81
+ E as Card,
82
82
  o as Checkbox,
83
83
  go as Content,
84
84
  n as Counter,
@@ -90,11 +90,11 @@ export {
90
90
  K as Drawer,
91
91
  Lr as Dropdown,
92
92
  m as DropdownButton,
93
- er as Filter,
94
- Ir as Footer,
93
+ pr as Filter,
94
+ Er as Footer,
95
95
  fr as ImageUpload,
96
96
  a as Input,
97
- Er as Label,
97
+ Ir as Label,
98
98
  sr as LineChart,
99
99
  co as List,
100
100
  w as Loading,
@@ -108,10 +108,10 @@ export {
108
108
  n as NumberInput,
109
109
  cr as PhoneNumberInput,
110
110
  Dr as PieChart,
111
- br as ProgressBar,
111
+ Vr as ProgressBar,
112
112
  y as Radio,
113
113
  wr as RadioCard,
114
- hr as RadioCardGroup,
114
+ Sr as RadioCardGroup,
115
115
  O as RadioGroup,
116
116
  xr as Range,
117
117
  Lr as Select,
@@ -121,28 +121,29 @@ export {
121
121
  ao as Stepper,
122
122
  no as Switch,
123
123
  lo as Table,
124
- bo as Tabs,
124
+ Vo as Tabs,
125
125
  wo as Tag,
126
- ho as TagSelect,
126
+ So as TagSelect,
127
127
  xo as TextArea,
128
128
  tr as TextMultiSelect,
129
- Qo as ThemeContext,
130
- qo as ThemeProvider,
129
+ Uo as ThemeContext,
130
+ Ho as ThemeProvider,
131
131
  ir as TimeFilterDropdown,
132
132
  U as TimePicker,
133
133
  Lo as Toast,
134
- Io as Tooltip,
134
+ Eo as Tooltip,
135
135
  Do as Trigger,
136
- Go as TruncateText,
136
+ yo as TruncateText,
137
137
  x as Typography,
138
- zo as VirtualizedTable,
139
- Eo as VirtualizedTableEvent,
138
+ Oo as VirtualizedTable,
139
+ Io as VirtualizedTableEvent,
140
140
  d as cn,
141
141
  Yr as horizontalConnectorWrapperVariants,
142
142
  l as resolveColor,
143
- Fo as sendCollapseRowEvent,
143
+ No as sendCollapseRowEvent,
144
144
  Mo as sendExpandRowEvent,
145
- ko as sendToggleRowEvent,
145
+ ko as sendResetFiltersEvent,
146
+ Ao as sendToggleRowEvent,
146
147
  Zr as stepConnectorVariants,
147
148
  _r as stepContentVariants,
148
149
  $r as stepDescriptionVariants,
@@ -151,8 +152,8 @@ export {
151
152
  to as stepLabelVariants,
152
153
  mo as stepListVariants,
153
154
  io as stepVariants,
154
- po as stepperVariants,
155
- E as useMediaQuery,
156
- Wo as useTheme,
155
+ eo as stepperVariants,
156
+ I as useMediaQuery,
157
+ jo as useTheme,
157
158
  M as useToggle
158
159
  };
@@ -9,6 +9,7 @@ type VirtualizedTableCompound = (<TData extends RowData>(props: Props<TData>) =>
9
9
  sendExpandRowEvent: (tableId: string, rowId: string) => void;
10
10
  sendCollapseRowEvent: (tableId: string, rowId: string) => void;
11
11
  sendToggleRowEvent: (tableId: string, rowId: string) => void;
12
+ sendResetFiltersEvent: (tableId: string) => void;
12
13
  };
13
14
  displayName?: string;
14
15
  };
@@ -155,6 +155,8 @@ export type Props<TData extends RowDataPrimitive> = VariantProps<typeof virtuali
155
155
  classNameHoverRow?: string;
156
156
  queryOptions?: Omit<UseQueryOptions<any, any, any, any>, 'queryKey' | 'queryFn'>;
157
157
  isLoading?: boolean;
158
+ /** Rendered in place of rows when the table has no data (and is not loading). */
159
+ emptyState?: ReactNode;
158
160
  getRowId?: (originalRow: TData, index: number) => string;
159
161
  fetchData?: (params: Record<string, string | number | string[] | number[] | undefined>, signal?: AbortSignal) => Promise<{
160
162
  data: TData[];
@@ -1,3 +1,3 @@
1
1
  import { RowData } from '../../VirtualizedTable.types';
2
2
  import { BodyProps } from './Body.types';
3
- export declare const Body: <TData extends RowData = RowData>({ isLoading, showPagination, }: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const Body: <TData extends RowData = RowData>({ isLoading, showPagination, emptyState, }: BodyProps<TData>) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
+ import { ReactNode } from 'react';
1
2
  import { RowData } from '../../VirtualizedTable.types';
2
3
  export type BodyProps<_TData extends RowData = RowData> = {
3
4
  isLoading?: boolean;
4
5
  showPagination?: boolean;
6
+ emptyState?: ReactNode;
5
7
  };
@@ -3,6 +3,7 @@ export type { Option } from '../../../../../components/Filter/Filter.types';
3
3
  /** @deprecated Use `ActionFilterConfig` with `type: 'action'` in the `filters` array instead */
4
4
  export type FilterAction = ActionFilterConfig;
5
5
  export type Props = {
6
+ id: string | string[] | number | number[];
6
7
  filters?: FilterConfig[];
7
8
  /** @deprecated Use `filters` instead */
8
9
  multiSelectFilter?: MultiSelectFilter[];
@@ -1,12 +1,14 @@
1
1
  export declare enum VirtualizedTableEvent {
2
2
  EXPAND_ROW = "@konstructio/VirtualizedTable/event-EXPAND_ROW",
3
3
  COLLAPSE_ROW = "@konstructio/VirtualizedTable/event-COLLAPSE_ROW",
4
- TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW"
4
+ TOGGLE_ROW = "@konstructio/VirtualizedTable/event-TOGGLE_ROW",
5
+ RESET_FILTERS = "@konstructio/VirtualizedTable/event-RESET_FILTERS"
5
6
  }
6
7
  export type VirtualizedTableEventDetail = {
7
8
  tableId: string;
8
- rowId: string;
9
+ rowId?: string;
9
10
  };
10
11
  export declare const sendExpandRowEvent: (tableId: string, rowId: string) => void;
11
12
  export declare const sendCollapseRowEvent: (tableId: string, rowId: string) => void;
12
13
  export declare const sendToggleRowEvent: (tableId: string, rowId: string) => void;
14
+ export declare const sendResetFiltersEvent: (tableId: string) => void;
@@ -45,7 +45,7 @@ export * from './Toast/Toast';
45
45
  export * from './Tooltip/Tooltip';
46
46
  export * from './Typography/Typography';
47
47
  export * from './VirtualizedTable/VirtualizedTable';
48
- export { sendExpandRowEvent, sendCollapseRowEvent, sendToggleRowEvent, VirtualizedTableEvent, } from './VirtualizedTable/events';
48
+ export { sendExpandRowEvent, sendCollapseRowEvent, sendToggleRowEvent, sendResetFiltersEvent, VirtualizedTableEvent, } from './VirtualizedTable/events';
49
49
  export type { VirtualizedTableEventDetail } from './VirtualizedTable/events';
50
50
  export type { ColumnDef, RowData, FilterConfig, ActionFilterConfig, BadgeMultiSelectFilterConfig, TextMultiSelectFilterConfig, DateFilterConfig, DateRangeFilterConfig, TimeFilterConfig, } from './VirtualizedTable/VirtualizedTable.types';
51
51
  export type { Step, StepperClassNames, StepperIcons, StepperProps, StepSize, StepStatus, StepVariant, } from './Stepper/Stepper.types';
package/dist/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@konstructio/ui",
3
3
  "description": "A set of reusable and customizable React components built for konstruct.io",
4
4
  "private": false,
5
- "version": "0.1.2-alpha.94",
5
+ "version": "0.1.2-alpha.96",
6
6
  "type": "module",
7
7
  "license": "MIT",
8
8
  "main": "dist/index.js",