impact-nova 0.1.13 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/dashboard-layout.d.ts +21 -6
- package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +32 -33
- package/dist/components/ui/accordion.js +25 -23
- package/dist/components/ui/ag-grid-react/cell-renderers/date-display-renderer.js +32 -21
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.d.ts +3 -5
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/date-cell-editor.js +57 -55
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +5 -0
- package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +50 -52
- package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +1 -1
- package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +34 -34
- package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +8 -11
- package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +17 -17
- package/dist/components/ui/ag-grid-react/headers/header-search-input.js +3 -3
- package/dist/components/ui/alert-dialog.js +45 -40
- package/dist/components/ui/alert.d.ts +21 -4
- package/dist/components/ui/alert.js +45 -25
- package/dist/components/ui/avatar.js +19 -16
- package/dist/components/ui/badge.js +8 -1
- package/dist/components/ui/breadcrumb.js +1 -0
- package/dist/components/ui/button-group.d.ts +1 -1
- package/dist/components/ui/button-group.js +27 -32
- package/dist/components/ui/button-variants.d.ts +1 -1
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +11 -9
- package/dist/components/ui/calendar.d.ts +14 -2
- package/dist/components/ui/calendar.js +443 -376
- package/dist/components/ui/card.js +7 -6
- package/dist/components/ui/checkbox.js +64 -48
- package/dist/components/ui/chips.d.ts +1 -0
- package/dist/components/ui/chips.js +27 -19
- package/dist/components/ui/data-table/data-table-column-list.d.ts +4 -1
- package/dist/components/ui/data-table/data-table-column-list.js +58 -54
- package/dist/components/ui/data-table/data-table-sheet.d.ts +1 -1
- package/dist/components/ui/data-table/data-table-sheet.js +43 -40
- package/dist/components/ui/data-table/data-table-view-options.js +17 -17
- package/dist/components/ui/data-table/data-table.js +21 -20
- package/dist/components/ui/date-picker/date-picker.js +93 -93
- package/dist/components/ui/date-picker/date-range-picker.js +142 -133
- package/dist/components/ui/date-picker/month-picker.js +96 -93
- package/dist/components/ui/date-picker/month-range-picker.js +144 -134
- package/dist/components/ui/date-picker/multi-date-picker.js +43 -45
- package/dist/components/ui/date-picker/multi-month-picker.js +37 -39
- package/dist/components/ui/date-picker/multi-week-picker.js +56 -46
- package/dist/components/ui/date-picker/week-picker.js +119 -109
- package/dist/components/ui/date-picker/week-range-picker.js +170 -147
- package/dist/components/ui/dialog.js +15 -6
- package/dist/components/ui/drawer.js +16 -13
- package/dist/components/ui/dropdown-menu.js +4 -2
- package/dist/components/ui/dynamic-layout.d.ts +2 -2
- package/dist/components/ui/dynamic-layout.js +18 -15
- package/dist/components/ui/empty-container.js +69 -64
- package/dist/components/ui/file-upload.js +113 -106
- package/dist/components/ui/filter-panel/filter-panel.js +49 -46
- package/dist/components/ui/filter-strip/filter-strip.js +41 -37
- package/dist/components/ui/header.js +26 -25
- package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +43 -40
- package/dist/components/ui/hover-card.js +6 -5
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.js +79 -68
- package/dist/components/ui/loader.d.ts +1 -0
- package/dist/components/ui/loader.js +23 -13
- package/dist/components/ui/nested-list/components/NestedListContent.d.ts +1 -3
- package/dist/components/ui/nested-list/components/NestedListContent.js +16 -15
- package/dist/components/ui/nested-list/components/SortableItem.js +116 -80
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.d.ts +13 -1
- package/dist/components/ui/nested-list/hooks/useNestedListDragDrop.js +162 -112
- package/dist/components/ui/nested-list/nested-list.js +182 -189
- package/dist/components/ui/notification-panel/notification-item.js +19 -17
- package/dist/components/ui/notification-panel/notification-list.js +21 -21
- package/dist/components/ui/notification-panel/notification-panel.js +25 -25
- package/dist/components/ui/popover.js +37 -34
- package/dist/components/ui/progress.js +12 -10
- package/dist/components/ui/prompt.js +29 -27
- package/dist/components/ui/radio-group.js +55 -46
- package/dist/components/ui/select/components/Submenu.d.ts +1 -2
- package/dist/components/ui/select/components/Submenu.js +52 -48
- package/dist/components/ui/select/select.js +321 -324
- package/dist/components/ui/sheet.js +18 -15
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +3 -3
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +12 -11
- package/dist/components/ui/slider.js +39 -12
- package/dist/components/ui/smart-input.js +44 -39
- package/dist/components/ui/stepper.js +33 -29
- package/dist/components/ui/switch.js +6 -4
- package/dist/components/ui/tabs.js +50 -45
- package/dist/components/ui/tag-group.d.ts +2 -1
- package/dist/components/ui/tag-group.js +29 -25
- package/dist/components/ui/tag.d.ts +1 -0
- package/dist/components/ui/tag.js +26 -20
- package/dist/components/ui/textarea.js +18 -17
- package/dist/components/ui/toast.d.ts +1 -1
- package/dist/components/ui/toast.js +47 -41
- package/dist/components/ui/toaster.js +42 -42
- package/dist/components/ui/tooltip.js +18 -16
- package/dist/components/ui/types/date-picker.types.d.ts +33 -0
- package/dist/components/ui/types/empty-container.types.d.ts +5 -0
- package/dist/components/ui/types/nested-list.types.d.ts +1 -0
- package/dist/components/ui/types/select.types.d.ts +0 -1
- package/dist/icons/assets/bookmark.svg.js +4 -0
- package/dist/icons/assets/bookmark.svg2.js +5 -0
- package/dist/icons/assets/bookmarkFilled.svg.js +4 -0
- package/dist/icons/assets/bookmarkFilled.svg2.js +5 -0
- package/dist/icons/assets/download.svg.js +4 -0
- package/dist/icons/assets/download.svg2.js +5 -0
- package/dist/icons/index.d.ts +20 -6
- package/dist/icons/index.js +398 -370
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +318 -314
- package/dist/lib/fiscal-calendar.d.ts +62 -0
- package/dist/lib/fiscal-calendar.js +99 -0
- package/dist/lib/utils.d.ts +2 -1
- package/dist/lib/utils.js +29 -13
- package/package.json +5 -5
- package/dist/components/ui/select/hooks/useClickOutside.d.ts +0 -15
- package/dist/components/ui/select/hooks/useClickOutside.js +0 -43
- package/dist/components/ui/select/hooks/useMenuPosition.d.ts +0 -2
- package/dist/components/ui/select/hooks/useMenuPosition.js +0 -89
|
@@ -46,7 +46,14 @@ const i = n(
|
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
function d({ className: r, variant: t, color: a, ...e }) {
|
|
49
|
-
return /* @__PURE__ */ s(
|
|
49
|
+
return /* @__PURE__ */ s(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
className: o(i({ variant: t, color: a }), r),
|
|
53
|
+
"data-component": "badge",
|
|
54
|
+
...e
|
|
55
|
+
}
|
|
56
|
+
);
|
|
50
57
|
}
|
|
51
58
|
export {
|
|
52
59
|
d as Badge,
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonGroupVariants: (props?: {
|
|
4
4
|
orientation?: "horizontal" | "vertical";
|
|
5
|
-
spacing?: "
|
|
5
|
+
spacing?: "sm" | "md" | "lg" | "none";
|
|
6
6
|
} & import('class-variance-authority/types').ClassProp) => string;
|
|
7
7
|
export interface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof buttonGroupVariants> {
|
|
8
8
|
value?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as s, jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
3
|
import { cva as k } from "class-variance-authority";
|
|
4
4
|
import { cn as t } from "../../lib/utils.js";
|
|
5
5
|
import { Info as G } from "../../icons/index.js";
|
|
@@ -23,55 +23,50 @@ const V = k(
|
|
|
23
23
|
spacing: "none"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
), j =
|
|
27
|
-
({ className:
|
|
28
|
-
|
|
26
|
+
), j = o.forwardRef(
|
|
27
|
+
({ className: x, orientation: n = "horizontal", spacing: l = "none", value: v, onValueChange: c, isDisabled: p, children: b, label: m, helperText: u, isError: r, required: g, ...h }, N) => /* @__PURE__ */ s("div", { className: t("grid gap-1.5", x), children: [
|
|
28
|
+
m && /* @__PURE__ */ s(
|
|
29
29
|
"label",
|
|
30
30
|
{
|
|
31
31
|
className: t(
|
|
32
32
|
"text-xs font-medium leading-[18px] text-[#60697d]",
|
|
33
33
|
// Exact legacy color
|
|
34
|
-
|
|
34
|
+
p && "opacity-70",
|
|
35
35
|
r && "text-destructive"
|
|
36
36
|
),
|
|
37
37
|
children: [
|
|
38
|
-
|
|
38
|
+
m,
|
|
39
39
|
" ",
|
|
40
|
-
g && /* @__PURE__ */
|
|
40
|
+
g && /* @__PURE__ */ a("span", { className: "text-destructive", children: "*" })
|
|
41
41
|
]
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ a(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
ref: N,
|
|
48
48
|
className: t(
|
|
49
|
-
V({ orientation:
|
|
49
|
+
V({ orientation: n, spacing: l }),
|
|
50
50
|
""
|
|
51
|
-
// Remove className from here to avoid double application if it was meant for the wrapper,
|
|
52
|
-
// but usually className on the component means the outer container.
|
|
53
|
-
// However, for backward compatibility, if className had width styles, they might break.
|
|
54
|
-
// But since we wrapped it, let's keep className on the wrapper?
|
|
55
|
-
// Actually, usually standard in this library seems to be className on the root.
|
|
56
|
-
// So I will apply className to the wrapper (done above) and NOT here.
|
|
57
|
-
// Wait, existing usage might expect className on the flex container.
|
|
58
|
-
// Let's inspect Input/RadioGroup. They apply className to the wrapper/grid.
|
|
59
|
-
// So applying className to the wrapper is consistent.
|
|
60
51
|
),
|
|
61
52
|
role: "group",
|
|
53
|
+
"data-component": "button-group",
|
|
54
|
+
"data-orientation": n,
|
|
55
|
+
"data-spacing": l,
|
|
62
56
|
...h,
|
|
63
|
-
children:
|
|
64
|
-
if (
|
|
65
|
-
const e =
|
|
66
|
-
return
|
|
67
|
-
disabled: e.props.disabled ||
|
|
57
|
+
children: o.Children.map(b, (i) => {
|
|
58
|
+
if (o.isValidElement(i)) {
|
|
59
|
+
const e = i, d = e.props.value || e.props.children?.toString(), f = v === d, z = n === "horizontal";
|
|
60
|
+
return o.cloneElement(e, {
|
|
61
|
+
disabled: e.props.disabled || p,
|
|
68
62
|
variant: e.props.variant || "tertiary",
|
|
63
|
+
"data-button-group": "item",
|
|
69
64
|
className: t(
|
|
70
65
|
"relative transition-all hover:bg-transparent hover:border-tertiary-border",
|
|
71
66
|
z ? "rounded-none first:rounded-l-md last:rounded-r-md -ml-[1px] first:ml-0" : "rounded-none first:rounded-t-md last:rounded-b-md -mt-[1px] first:mt-0",
|
|
72
|
-
|
|
67
|
+
f ? "z-10 bg-[#eceefd] border-[#4259ee] text-[#4259ee] hover:bg-[#eceefd] hover:border-[#4259ee] hover:text-[#4259ee]" : "text-[#0000008a]",
|
|
73
68
|
"disabled:bg-[#f8f9fb] disabled:text-[#b4bac7] disabled:opacity-100",
|
|
74
|
-
r && !
|
|
69
|
+
r && !f && "border-destructive text-destructive z-10",
|
|
75
70
|
// rudimentary error style for buttons
|
|
76
71
|
// If active and error? Maybe keep active color but allow border to be red?
|
|
77
72
|
// For now let's just stick to the text label error. Button error styles are complex.
|
|
@@ -79,17 +74,17 @@ const V = k(
|
|
|
79
74
|
e.props.className
|
|
80
75
|
),
|
|
81
76
|
onClick: (y) => {
|
|
82
|
-
e.props.onClick?.(y),
|
|
77
|
+
e.props.onClick?.(y), d && c && c(d);
|
|
83
78
|
}
|
|
84
79
|
});
|
|
85
80
|
}
|
|
86
|
-
return
|
|
81
|
+
return i;
|
|
87
82
|
})
|
|
88
83
|
}
|
|
89
84
|
),
|
|
90
|
-
|
|
91
|
-
!r && /* @__PURE__ */
|
|
92
|
-
/* @__PURE__ */
|
|
85
|
+
u && /* @__PURE__ */ s("div", { className: t("flex items-center gap-1", r && "text-destructive"), children: [
|
|
86
|
+
!r && /* @__PURE__ */ a(G, { size: 10, className: "shrink-0 text-muted-foreground" }),
|
|
87
|
+
/* @__PURE__ */ a(
|
|
93
88
|
"p",
|
|
94
89
|
{
|
|
95
90
|
className: t(
|
|
@@ -97,7 +92,7 @@ const V = k(
|
|
|
97
92
|
// Exact legacy color
|
|
98
93
|
r && "text-destructive"
|
|
99
94
|
),
|
|
100
|
-
children:
|
|
95
|
+
children: u
|
|
101
96
|
}
|
|
102
97
|
)
|
|
103
98
|
] })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: {
|
|
2
2
|
variant?: "default" | "link" | "secondary" | "tertiary" | "destructive" | "outline" | "ghost";
|
|
3
|
-
size?: "
|
|
3
|
+
size?: "sm" | "md" | "lg" | "default" | "icon";
|
|
4
4
|
} & import('class-variance-authority/types').ClassProp) => string;
|
|
@@ -2,7 +2,18 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
2
2
|
import { buttonVariants } from './button-variants';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
5
|
+
/**
|
|
6
|
+
* Renders the button as a child element using Radix's Slot pattern.
|
|
7
|
+
* Use this when you want to pass a custom element (e.g. `<a>`) but
|
|
8
|
+
* keep button styling and behavior.
|
|
9
|
+
* @example <Button asChild><a href="/home">Home</a></Button>
|
|
10
|
+
*/
|
|
5
11
|
asChild?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Side of the tooltip for icon-only buttons.
|
|
14
|
+
* Only applies when `size="icon"` and `aria-label` is set.
|
|
15
|
+
* @default "top"
|
|
16
|
+
*/
|
|
6
17
|
tooltipSide?: "top" | "bottom" | "left" | "right";
|
|
7
18
|
}
|
|
8
19
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { Slot as
|
|
3
|
+
import { Slot as u } from "@radix-ui/react-slot";
|
|
4
4
|
import "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as p } from "../../lib/utils.js";
|
|
6
6
|
import { Tooltip as b, TooltipTrigger as h, TooltipContent as T } from "./tooltip.js";
|
|
7
7
|
import { buttonVariants as x } from "./button-variants.js";
|
|
8
8
|
const C = f.forwardRef(
|
|
9
|
-
({ className: r, variant:
|
|
10
|
-
const c = e ?
|
|
9
|
+
({ className: r, variant: n, size: a, asChild: e = !1, tooltipSide: l = "top", ...t }, s) => {
|
|
10
|
+
const c = e ? u : "button", m = a === "icon" && t["aria-label"], i = /* @__PURE__ */ o(
|
|
11
11
|
c,
|
|
12
12
|
{
|
|
13
|
-
className:
|
|
13
|
+
className: p(x({ variant: n, size: a, className: r })),
|
|
14
|
+
"data-variant": n ?? "default",
|
|
15
|
+
"data-size": a ?? "default",
|
|
14
16
|
ref: s,
|
|
15
|
-
...
|
|
17
|
+
...t
|
|
16
18
|
}
|
|
17
19
|
);
|
|
18
20
|
return m ? /* @__PURE__ */ d(b, { children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
+
/* @__PURE__ */ o(h, { asChild: !0, children: t.disabled ? /* @__PURE__ */ o("span", { tabIndex: -1, className: "inline-block outline-none", children: i }) : i }),
|
|
22
|
+
/* @__PURE__ */ o(T, { variant: "tertiary", side: l, children: t["aria-label"] })
|
|
21
23
|
] }) : i;
|
|
22
24
|
}
|
|
23
25
|
);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DayButton, DayPicker, DateRange } from 'react-day-picker';
|
|
2
2
|
import { Button } from './button';
|
|
3
|
+
import { CalendarType, FiscalMode, SelectionMode, FiscalMonthPattern } from '../../lib/fiscal-calendar';
|
|
3
4
|
import * as React from "react";
|
|
4
5
|
export interface WeekSelection {
|
|
5
6
|
year: number;
|
|
@@ -26,7 +27,6 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
26
27
|
onApply?: (date: Date | Date[] | DateRange | undefined) => void;
|
|
27
28
|
onCancel?: () => void;
|
|
28
29
|
onClear?: () => void;
|
|
29
|
-
onPendingChange?: (date: Date | Date[] | DateRange | WeekSelection | WeekSelection[] | WeekRange | MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
|
|
30
30
|
fromYear?: number;
|
|
31
31
|
toYear?: number;
|
|
32
32
|
mode?: "single" | "multiple" | "range";
|
|
@@ -36,11 +36,23 @@ export interface CalendarProps extends Omit<React.ComponentProps<typeof DayPicke
|
|
|
36
36
|
weekMode?: "single" | "multiple" | "range";
|
|
37
37
|
selectedWeeks?: WeekSelection | WeekSelection[] | WeekRange;
|
|
38
38
|
onWeekSelect?: (weeks: WeekSelection | WeekSelection[] | WeekRange | undefined) => void;
|
|
39
|
+
/** Whether to use standard calendar weeks or fiscal weeks. Default: "calendar" */
|
|
40
|
+
calendarType?: CalendarType;
|
|
41
|
+
/** Only relevant when calendarType="fiscal". Default: "basic" */
|
|
42
|
+
fiscalMode?: FiscalMode;
|
|
43
|
+
/** What a click selects. "fiscalMonth" only applies with fiscalMode="advanced"|"custom". Default: "week" */
|
|
44
|
+
selectionMode?: SelectionMode;
|
|
45
|
+
/** Array of 12 week-counts per fiscal month. Required for fiscalMode="custom", optional for "advanced" (defaults to 4-4-5). */
|
|
46
|
+
fiscalMonthPattern?: FiscalMonthPattern;
|
|
47
|
+
/** 1-based month where the fiscal year starts. Default: 1 (January) */
|
|
48
|
+
fiscalYearStartMonth?: number;
|
|
49
|
+
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
39
50
|
monthMode?: "single" | "multiple" | "range";
|
|
40
51
|
selectedMonths?: MonthSelection | MonthSelection[] | MonthRange;
|
|
41
52
|
onMonthSelect?: (months: MonthSelection | MonthSelection[] | MonthRange | undefined) => void;
|
|
42
53
|
}
|
|
43
|
-
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, showFooter, onApply, onCancel, onClear,
|
|
54
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, showFooter, onApply, onCancel, onClear, fromYear, toYear, mode, selected, onSelect, fromDate, toDate, fromMonth, toMonth, pickerType, weekMode, selectedWeeks, onWeekSelect, calendarType, fiscalMode, selectionMode, fiscalMonthPattern, fiscalYearStartMonth, weekStartsOn, // Default Monday
|
|
55
|
+
monthMode, selectedMonths, onMonthSelect, month, defaultMonth, onMonthChange, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
44
56
|
declare function CalendarDayButton({ className, day, modifiers, pickerType, ...props }: React.ComponentProps<typeof DayButton> & {
|
|
45
57
|
pickerType?: "date" | "week" | "month";
|
|
46
58
|
}): import("react/jsx-runtime").JSX.Element;
|