aplance-ui 1.5.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/api.d.ts +2 -1
- package/dist/api.js +103 -68
- package/dist/api.js.map +1 -1
- package/dist/frameworks/vite-react/vite.config.ts.template +1 -1
- package/dist/index.js +103 -68
- package/dist/index.js.map +1 -1
- package/package.json +12 -6
- package/registry/components/primitives/modal/modal.module.css +9 -3
- package/registry/components/primitives/popover/popover-context.ts +2 -0
- package/registry/components/primitives/popover/popover.tsx +47 -2
- package/registry/components/ui/chart/chart.tsx +51 -30
- package/registry/components/ui/chart/types.ts +5 -1
- package/registry/components/ui/data-table/checkbox-column.tsx +12 -8
- package/registry/components/ui/data-table/data-table.module.css +41 -19
- package/registry/components/ui/data-table/data-table.tsx +1285 -1238
- package/registry/components/ui/data-table/filter-bar.tsx +56 -13
- package/registry/components/ui/data-table/filter-modal.tsx +16 -82
- package/registry/components/ui/data-table/filter-sheet.tsx +97 -0
- package/registry/components/ui/data-table/filters.tsx +21 -21
- package/registry/components/ui/data-table/pagination-bar.tsx +4 -6
- package/registry/components/ui/data-table/types.ts +149 -80
- package/registry/components/ui/data-table/useDataTable.tsx +35 -16
- package/registry/components/ui/data-table/utils.ts +691 -471
- package/registry/components/ui/input-fields/date-picker/calendar.tsx +7 -15
- package/registry/components/ui/input-fields/date-picker/date-picker.tsx +1 -1
- package/registry/components/ui/input-fields/date-picker/types.ts +3 -3
- package/registry/components/ui/input-fields/emoji-picker/emoji-palette.tsx +1 -1
- package/registry/registry.json +16 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent
|
|
1
|
+
import type { ChangeEvent } from "react";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import {
|
|
4
4
|
IconChevronDown,
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
getDefaultClassNames,
|
|
11
11
|
type ClassNames,
|
|
12
12
|
type DayPickerProps,
|
|
13
|
-
|
|
13
|
+
type DropdownProps,
|
|
14
|
+
} from "@daypicker/react";
|
|
14
15
|
import { CustomSelect } from "../custom-select/custom-select";
|
|
15
16
|
import sButton from "../../button/button.module.css";
|
|
16
17
|
import s from "./calendar.module.css";
|
|
@@ -28,25 +29,16 @@ type CalendarChevronProps = {
|
|
|
28
29
|
orientation?: ChevronOrientation;
|
|
29
30
|
};
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
disabled: boolean;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
type CalendarDropdownProps = Omit<ComponentProps<"select">, "children"> & {
|
|
38
|
-
options?: CalendarDropdownOption[];
|
|
39
|
-
classNames: ClassNames;
|
|
40
|
-
components: unknown;
|
|
41
|
-
};
|
|
42
|
-
|
|
32
|
+
// Typed from DayPicker's own `DropdownProps`, so the override tracks the
|
|
33
|
+
// props DayPicker actually passes (v10 no longer sends `classNames` or
|
|
34
|
+
// `components` to it).
|
|
43
35
|
const renderDropdown = ({
|
|
44
36
|
options,
|
|
45
37
|
value,
|
|
46
38
|
disabled,
|
|
47
39
|
onChange,
|
|
48
40
|
className,
|
|
49
|
-
}:
|
|
41
|
+
}: DropdownProps) => {
|
|
50
42
|
const resolvedValue =
|
|
51
43
|
typeof value === "number" || typeof value === "string"
|
|
52
44
|
? String(value)
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type KeyboardEvent,
|
|
8
8
|
} from "react";
|
|
9
9
|
import clsx from "clsx";
|
|
10
|
-
import type { DateRange as RDPDateRange, Matcher } from "react
|
|
10
|
+
import type { DateRange as RDPDateRange, Matcher } from "@daypicker/react";
|
|
11
11
|
import { IconCalendar } from "@tabler/icons-react";
|
|
12
12
|
import {
|
|
13
13
|
Popover,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
|
-
import type { Matcher } from "react
|
|
2
|
+
import type { Matcher } from "@daypicker/react";
|
|
3
3
|
import type { BaseInputFieldProps } from "../common/types";
|
|
4
4
|
import type {
|
|
5
5
|
Align,
|
|
@@ -32,7 +32,7 @@ export type CommonDatePickerProps = Omit<
|
|
|
32
32
|
minDate?: Date;
|
|
33
33
|
/** Disable days after this date. */
|
|
34
34
|
maxDate?: Date;
|
|
35
|
-
/** Any additional
|
|
35
|
+
/** Any additional DayPicker matcher(s) for disabled days. */
|
|
36
36
|
disabledDates?: Matcher | Matcher[];
|
|
37
37
|
|
|
38
38
|
/** Close popover after selection (default: false). */
|
|
@@ -65,7 +65,7 @@ export type CommonDatePickerProps = Omit<
|
|
|
65
65
|
/** How many months the calendar renders. Defaults: single=1, range=2. */
|
|
66
66
|
numberOfMonths?: number;
|
|
67
67
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
68
|
-
/** Passed through to react
|
|
68
|
+
/** Passed through to DayPicker (`@daypicker/react`). */
|
|
69
69
|
captionLayout?: CalendarProps["captionLayout"];
|
|
70
70
|
showWeekNumber?: boolean;
|
|
71
71
|
|
|
@@ -71,7 +71,7 @@ export const EmojiPalette = ({
|
|
|
71
71
|
if (flatChars.length === 0 || !focusedChar) return;
|
|
72
72
|
const idx = flatChars.indexOf(focusedChar);
|
|
73
73
|
if (idx === -1) return;
|
|
74
|
-
let next
|
|
74
|
+
let next: number;
|
|
75
75
|
switch (e.key) {
|
|
76
76
|
case "ArrowRight":
|
|
77
77
|
next = Math.min(idx + 1, flatChars.length - 1);
|
package/registry/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.aplance.com/registry.schema.json",
|
|
3
3
|
"version": 4,
|
|
4
|
-
"generated": "2026-11-
|
|
4
|
+
"generated": "2026-11-14T12:42:36.861Z",
|
|
5
5
|
"units": [
|
|
6
6
|
{
|
|
7
7
|
"name": "accordion",
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"externalDeps": [
|
|
109
109
|
"clsx",
|
|
110
110
|
"react",
|
|
111
|
+
"react-is",
|
|
111
112
|
"recharts"
|
|
112
113
|
]
|
|
113
114
|
},
|
|
@@ -215,6 +216,7 @@
|
|
|
215
216
|
"components/ui/data-table/data-table.tsx",
|
|
216
217
|
"components/ui/data-table/filter-bar.tsx",
|
|
217
218
|
"components/ui/data-table/filter-modal.tsx",
|
|
219
|
+
"components/ui/data-table/filter-sheet.tsx",
|
|
218
220
|
"components/ui/data-table/filters.tsx",
|
|
219
221
|
"components/ui/data-table/pagination-bar.tsx",
|
|
220
222
|
"components/ui/data-table/types.ts",
|
|
@@ -224,7 +226,9 @@
|
|
|
224
226
|
"clientFiles": [
|
|
225
227
|
"components/ui/data-table/checkbox-column.tsx",
|
|
226
228
|
"components/ui/data-table/data-table.tsx",
|
|
229
|
+
"components/ui/data-table/filter-bar.tsx",
|
|
227
230
|
"components/ui/data-table/filter-modal.tsx",
|
|
231
|
+
"components/ui/data-table/filter-sheet.tsx",
|
|
228
232
|
"components/ui/data-table/filters.tsx",
|
|
229
233
|
"components/ui/data-table/pagination-bar.tsx",
|
|
230
234
|
"components/ui/data-table/types.ts",
|
|
@@ -281,10 +285,10 @@
|
|
|
281
285
|
"time-picker"
|
|
282
286
|
],
|
|
283
287
|
"externalDeps": [
|
|
288
|
+
"@daypicker/react",
|
|
284
289
|
"@tabler/icons-react",
|
|
285
290
|
"clsx",
|
|
286
|
-
"react"
|
|
287
|
-
"react-day-picker"
|
|
291
|
+
"react"
|
|
288
292
|
]
|
|
289
293
|
},
|
|
290
294
|
{
|
|
@@ -970,23 +974,24 @@
|
|
|
970
974
|
},
|
|
971
975
|
"baseDevDependencies": {
|
|
972
976
|
"postcss": "^8.4.49",
|
|
973
|
-
"postcss-preset-env": "^11.
|
|
977
|
+
"postcss-preset-env": "^11.6.2",
|
|
974
978
|
"@csstools/postcss-global-data": "^4.0.0",
|
|
975
|
-
"autoprefixer": "^10.
|
|
979
|
+
"autoprefixer": "^10.6.2"
|
|
976
980
|
},
|
|
977
981
|
"utilitiesDevDependencies": {
|
|
978
982
|
"postcss-token-utilities": "^1.8.0"
|
|
979
983
|
},
|
|
980
984
|
"packageVersions": {
|
|
981
|
-
"@
|
|
982
|
-
"@
|
|
985
|
+
"@daypicker/react": "^10.0.2",
|
|
986
|
+
"@tabler/icons-react": "^3.51.0",
|
|
987
|
+
"@tanstack/react-table": "^9.3.1",
|
|
983
988
|
"clsx": "^2.1.1",
|
|
984
989
|
"react": ">=19.0.0",
|
|
985
|
-
"react-colorful": "^5.
|
|
986
|
-
"react-day-picker": "^9.14.0",
|
|
990
|
+
"react-colorful": "^5.8.1",
|
|
987
991
|
"react-dom": ">=19.0.0",
|
|
988
|
-
"
|
|
989
|
-
"
|
|
992
|
+
"react-is": "^19.0.0",
|
|
993
|
+
"recharts": "^3.10.1",
|
|
994
|
+
"sonner": "^2.0.8"
|
|
990
995
|
}
|
|
991
996
|
}
|
|
992
997
|
}
|