impact-nova 2.1.0-alpha.9 → 2.2.1
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 +6 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-editor.js +73 -94
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.d.ts +53 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/split-cell-focus.js +98 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +15 -13
- package/dist/components/data/ag-grid-react/headers/custom-header.js +56 -58
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.d.ts +12 -0
- package/dist/components/data/ag-grid-react/headers/custom-inner-header-group.js +31 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.d.ts +10 -0
- package/dist/components/data/ag-grid-react/headers/header-search-active-state.js +38 -0
- package/dist/components/data/ag-grid-react/index.js +166 -163
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -4
- package/dist/components/data/ag-grid-react/theme.js +0 -2
- package/dist/components/data/data-table/data-table-column-list.js +1 -1
- package/dist/components/data/data-table/data-table-saved-views.js +1 -1
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +7 -6
- package/dist/components/data/nested-list/components/SortableItem.d.ts +3 -1
- package/dist/components/data/nested-list/components/SortableItem.js +111 -109
- package/dist/components/data-display/calendar/calendar-footer-emphasis.d.ts +28 -0
- package/dist/components/data-display/calendar/calendar-footer-emphasis.js +8 -0
- package/dist/components/data-display/calendar/calendar-footer.d.ts +4 -1
- package/dist/components/data-display/calendar/calendar-footer.js +60 -38
- package/dist/components/data-display/calendar/calendar.js +86 -82
- package/dist/components/data-display/calendar/calendar.types.d.ts +2 -0
- package/dist/components/data-display/calendar/use-calendar-state.d.ts +3 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- package/dist/components/flows/filter-strip/filter-strip.js +36 -29
- package/dist/components/flows/filter-strip/filter-summary.js +2 -2
- package/dist/components/forms/date-picker/date-input-behavior.d.ts +118 -0
- package/dist/components/forms/date-picker/date-input-behavior.js +164 -0
- package/dist/components/forms/date-picker/date-picker.js +202 -138
- package/dist/components/forms/date-picker/date-range-picker.js +302 -215
- package/dist/components/forms/date-picker/month-picker.js +160 -119
- package/dist/components/forms/date-picker/month-range-picker.js +302 -245
- package/dist/components/forms/date-picker/multi-date-picker.js +94 -80
- package/dist/components/forms/date-picker/multi-month-picker.js +97 -83
- package/dist/components/forms/date-picker/multi-week-picker.js +107 -93
- package/dist/components/forms/date-picker/week-picker.js +230 -140
- package/dist/components/forms/date-picker/week-range-picker.js +332 -226
- package/dist/components/forms/file-upload/file-upload.js +312 -174
- package/dist/components/forms/file-upload/file-upload.types.d.ts +17 -2
- package/dist/components/layout/dynamic-layout/dynamic-layout.variants.d.ts +1 -1
- package/dist/components/layout/header/header.js +45 -38
- package/dist/components/layout/horizontal-scroller/index.d.ts +1 -0
- package/dist/components/layout/horizontal-scroller/index.js +3 -2
- package/dist/components/ui/local-raster-icons/assets/excel-error-icon.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/assets/file-upload-error.webp.js +4 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.d.ts +2 -0
- package/dist/components/ui/local-raster-icons/rasterIcons.js +32 -22
- package/dist/components/ui/show.d.ts +10 -0
- package/dist/components/ui/show.js +7 -0
- package/dist/components/ui/show.types.d.ts +5 -0
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +29 -17
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +12 -0
- package/dist/i18n/locales/es.js +12 -0
- package/dist/i18n/locales/hi.js +12 -0
- package/dist/i18n/locales/kn.js +12 -0
- package/dist/impact-nova-base.scss +6 -2
- package/dist/impact-nova-components.css +141 -16
- package/dist/impact-nova-tokens.scss +12 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +273 -271
- package/dist/lib/utils.js +40 -24
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +36 -4
- package/dist/theme/tailwind-colors.js +3 -1
- package/package.json +15 -6
- package/tailwind.config.d.ts +3 -0
- package/dist/components/data/ag-grid-react/headers/custom-header-group.d.ts +0 -10
- package/dist/components/data/ag-grid-react/headers/custom-header-group.js +0 -58
|
@@ -1,166 +1,168 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import R, { useMemo as
|
|
3
|
-
import { useSortable as
|
|
4
|
-
import { useDroppable as
|
|
5
|
-
import { Checkbox as
|
|
6
|
-
import { ChevronRight as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { useImpactNovaI18n as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
return e ?
|
|
12
|
-
},
|
|
13
|
-
const { t:
|
|
14
|
-
setNodeRef:
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import R, { useMemo as j } from "react";
|
|
3
|
+
import { useSortable as _ } from "@dnd-kit/sortable";
|
|
4
|
+
import { useDroppable as H } from "@dnd-kit/core";
|
|
5
|
+
import { Checkbox as D } from "../../../forms/checkbox/checkbox.js";
|
|
6
|
+
import { ChevronRight as $, Drag as E } from "impact-nova-icons";
|
|
7
|
+
import { cn as d } from "../../../../lib/utils.js";
|
|
8
|
+
import { useImpactNovaI18n as k } from "../../../../i18n/use-impact-nova-i18n.js";
|
|
9
|
+
const z = "flex shrink-0 items-center h-5 gap-0.5", A = "flex h-5 w-4 shrink-0 items-center justify-center", O = "flex h-5 w-5 shrink-0 cursor-grab active:cursor-grabbing items-center justify-center rounded-sm text-content-icon transition-colors hover:bg-canvas-muted hover:text-content", P = (e, r) => {
|
|
10
|
+
const s = "group flex items-start gap-2 py-1 pr-2 rounded transition-colors duration-150 min-w-0";
|
|
11
|
+
return e ? d(s, "opacity-40 bg-canvas-muted") : r ? d(s, "bg-feedback-error-surface border border-destructive animate-pulse") : d(s, "hover:bg-canvas-muted");
|
|
12
|
+
}, G = ({ item: e, isAnyDragging: r, renderActions: s }) => {
|
|
13
|
+
const { t: n } = k(), a = !e.children || e.children.length === 0, {
|
|
14
|
+
setNodeRef: l,
|
|
15
15
|
isOver: o
|
|
16
|
-
} =
|
|
16
|
+
} = H({
|
|
17
17
|
id: `droppable-${e.id}`,
|
|
18
18
|
data: { sectionId: e.id },
|
|
19
|
-
disabled: !
|
|
19
|
+
disabled: !a
|
|
20
20
|
});
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
21
|
+
return /* @__PURE__ */ i("div", { ref: a ? l : void 0, children: [
|
|
22
|
+
/* @__PURE__ */ i(
|
|
23
23
|
"div",
|
|
24
24
|
{
|
|
25
|
-
className:
|
|
25
|
+
className: d(
|
|
26
26
|
"flex items-center justify-between px-2 py-0 text-xs font-[500] leading-4 text-navigation-muted select-none",
|
|
27
27
|
e.id === "root-scrollable" ? "mt-2 pt-2 pb-1 border-t border-solid border-stroke-subtle" : "mt-1 pb-1",
|
|
28
|
-
o && r &&
|
|
28
|
+
o && r && a && "bg-canvas-tint rounded"
|
|
29
29
|
),
|
|
30
30
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ i("div", { className: "flex items-center", children: [
|
|
32
32
|
e.label,
|
|
33
|
-
o && r &&
|
|
33
|
+
o && r && a && /* @__PURE__ */ t("span", { className: "ml-2 text-brand text-[11px]", children: n("nestedList.dropHere") })
|
|
34
34
|
] }),
|
|
35
|
-
|
|
35
|
+
s?.(e, { isLeaf: !1, level: 0 })
|
|
36
36
|
]
|
|
37
37
|
}
|
|
38
38
|
),
|
|
39
|
-
|
|
39
|
+
a && /* @__PURE__ */ t(
|
|
40
40
|
"div",
|
|
41
41
|
{
|
|
42
|
-
className:
|
|
42
|
+
className: d(
|
|
43
43
|
"mx-2 my-1 rounded border-2 border-dashed min-h-[36px] flex items-center justify-center text-[11px] transition-colors",
|
|
44
44
|
o && r ? "border-brand bg-canvas-tint text-brand" : "border-stroke-hairline text-content-empty"
|
|
45
45
|
),
|
|
46
|
-
children:
|
|
46
|
+
children: n(o && r ? "nestedList.releaseToDrop" : "nestedList.dragHere")
|
|
47
47
|
}
|
|
48
48
|
)
|
|
49
49
|
] });
|
|
50
|
-
},
|
|
50
|
+
}, M = ({
|
|
51
51
|
item: e,
|
|
52
52
|
level: r,
|
|
53
|
-
indentLevel:
|
|
54
|
-
isCollapsed:
|
|
55
|
-
onToggle:
|
|
56
|
-
onToggleCollapse:
|
|
53
|
+
indentLevel: s,
|
|
54
|
+
isCollapsed: n,
|
|
55
|
+
onToggle: a,
|
|
56
|
+
onToggleCollapse: l,
|
|
57
57
|
isAnyDragging: o = !1,
|
|
58
|
-
enableDragDrop:
|
|
59
|
-
enableCollapse:
|
|
60
|
-
shouldBlink:
|
|
61
|
-
isDragDisabled:
|
|
62
|
-
renderLabelExtras:
|
|
63
|
-
renderActions:
|
|
58
|
+
enableDragDrop: N = !0,
|
|
59
|
+
enableCollapse: g = !0,
|
|
60
|
+
shouldBlink: y = !1,
|
|
61
|
+
isDragDisabled: f = !1,
|
|
62
|
+
renderLabelExtras: m,
|
|
63
|
+
renderActions: x
|
|
64
64
|
}) => {
|
|
65
|
-
const { t: h } =
|
|
66
|
-
attributes:
|
|
67
|
-
listeners:
|
|
68
|
-
setNodeRef:
|
|
69
|
-
isDragging:
|
|
70
|
-
} =
|
|
65
|
+
const { t: h } = k(), v = e.category === "structure", p = e.children && e.children.length > 0, b = !p && e.category !== "structure", C = j(() => !e.children || e.children.length === 0 || e.children.every((u) => u.checked) ? !1 : e.children.some((u) => u.checked), [e.children]), {
|
|
66
|
+
attributes: L,
|
|
67
|
+
listeners: w,
|
|
68
|
+
setNodeRef: S,
|
|
69
|
+
isDragging: I
|
|
70
|
+
} = _({
|
|
71
71
|
id: e.id,
|
|
72
72
|
data: {
|
|
73
73
|
level: r,
|
|
74
74
|
hasChildren: p,
|
|
75
|
-
isExpanded: !
|
|
75
|
+
isExpanded: !n
|
|
76
76
|
},
|
|
77
|
-
disabled:
|
|
77
|
+
disabled: v || e.disabled || f
|
|
78
78
|
});
|
|
79
|
-
return
|
|
79
|
+
return v ? /* @__PURE__ */ t(G, { item: e, isAnyDragging: o, renderActions: x }) : /* @__PURE__ */ t(
|
|
80
80
|
"div",
|
|
81
81
|
{
|
|
82
|
-
ref:
|
|
82
|
+
ref: S,
|
|
83
83
|
className: "relative",
|
|
84
84
|
"data-item-id": e.id,
|
|
85
85
|
"data-level": r,
|
|
86
86
|
"data-checked": e.checked,
|
|
87
87
|
"data-disabled": e.disabled,
|
|
88
|
-
"data-collapsed":
|
|
89
|
-
children: /* @__PURE__ */
|
|
88
|
+
"data-collapsed": n,
|
|
89
|
+
children: /* @__PURE__ */ i(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className:
|
|
92
|
+
className: P(I, y),
|
|
93
93
|
style: {
|
|
94
|
-
paddingLeft: `${8 +
|
|
94
|
+
paddingLeft: `${8 + s * 20}px`
|
|
95
95
|
},
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
97
|
+
/* @__PURE__ */ i("div", { className: z, children: [
|
|
98
|
+
/* @__PURE__ */ t("div", { className: A, children: g && p && /* @__PURE__ */ t(
|
|
99
|
+
"button",
|
|
100
|
+
{
|
|
101
|
+
type: "button",
|
|
102
|
+
onClick: (c) => {
|
|
103
|
+
c.stopPropagation(), l(e.id);
|
|
104
|
+
},
|
|
105
|
+
onMouseDown: (c) => c.stopPropagation(),
|
|
106
|
+
className: "flex h-4 w-4 items-center justify-center rounded-full p-0 hover:bg-canvas-muted transition-colors text-content-icon hover:text-brand",
|
|
107
|
+
"aria-label": h(n ? "nestedList.expand" : "nestedList.collapse"),
|
|
108
|
+
children: /* @__PURE__ */ t(
|
|
109
|
+
$,
|
|
110
|
+
{
|
|
111
|
+
size: "16px",
|
|
112
|
+
className: d("transition-transform", !n && "rotate-90")
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
) }),
|
|
117
|
+
/* @__PURE__ */ t("div", { className: "flex h-5 w-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ t(
|
|
118
|
+
D,
|
|
119
|
+
{
|
|
120
|
+
id: `checkbox-${e.id}`,
|
|
121
|
+
checked: C ? "indeterminate" : e.checked,
|
|
122
|
+
onCheckedChange: () => a(e.id),
|
|
123
|
+
disabled: e.disabled,
|
|
124
|
+
className: "mr-0",
|
|
125
|
+
"aria-label": e.label
|
|
126
|
+
}
|
|
127
|
+
) }),
|
|
128
|
+
N && !f ? /* @__PURE__ */ t(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
...L,
|
|
132
|
+
...w,
|
|
133
|
+
"aria-label": `${h("aria.dragHandle")}: ${e.label}`,
|
|
134
|
+
className: O,
|
|
135
|
+
style: {
|
|
136
|
+
pointerEvents: "auto",
|
|
137
|
+
position: "relative",
|
|
138
|
+
zIndex: 30,
|
|
139
|
+
touchAction: "none"
|
|
140
|
+
},
|
|
141
|
+
onPointerDown: (c) => {
|
|
142
|
+
c.stopPropagation();
|
|
143
|
+
},
|
|
144
|
+
children: /* @__PURE__ */ t(E, { size: "14px" })
|
|
145
|
+
}
|
|
146
|
+
) : /* @__PURE__ */ t("div", { className: "w-5 shrink-0", "aria-hidden": !0 })
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ t(
|
|
147
149
|
"label",
|
|
148
150
|
{
|
|
149
151
|
htmlFor: `checkbox-${e.id}`,
|
|
150
|
-
className: "min-w-0 flex-1
|
|
151
|
-
children:
|
|
152
|
-
/* @__PURE__ */ t("span", { className: "break-words", children: e.label }),
|
|
153
|
-
y?.(e, { isLeaf: x, level: r })
|
|
154
|
-
]
|
|
152
|
+
className: "min-w-0 flex-1 min-h-5 text-[13px] leading-5 text-content capitalize cursor-pointer select-none",
|
|
153
|
+
children: /* @__PURE__ */ t("span", { className: "break-words", children: e.label })
|
|
155
154
|
}
|
|
156
155
|
),
|
|
157
|
-
/* @__PURE__ */ t("div", { className: "shrink-0
|
|
156
|
+
m?.(e, { isLeaf: b, level: r }) ? /* @__PURE__ */ t("div", { className: "shrink-0 self-center flex items-center", children: m(e, { isLeaf: b, level: r }) }) : null,
|
|
157
|
+
/* @__PURE__ */ t("div", { className: "shrink-0 self-center flex items-center", children: x?.(e, { isLeaf: b, level: r }) })
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
160
|
)
|
|
161
161
|
}
|
|
162
162
|
);
|
|
163
|
-
},
|
|
163
|
+
}, W = R.memo(M);
|
|
164
164
|
export {
|
|
165
|
-
|
|
165
|
+
O as DRAG_HANDLE_CLASS,
|
|
166
|
+
z as LEADING_RAIL_CLASS,
|
|
167
|
+
W as SortableItem
|
|
166
168
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DateRange } from 'react-day-picker';
|
|
2
|
+
import { MonthRange, MonthSelection, WeekRange, WeekSelection } from './calendar.types';
|
|
3
|
+
export type FooterButtonEmphasis = "apply" | "cancel" | "neutral";
|
|
4
|
+
type RangeLike = {
|
|
5
|
+
from?: unknown;
|
|
6
|
+
to?: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type FooterFlashTarget = "apply" | "cancel";
|
|
9
|
+
export declare function resolveRangeFooterFlashTarget(range: RangeLike | undefined): FooterFlashTarget | null;
|
|
10
|
+
export declare function resolveFooterFlashTarget(params: {
|
|
11
|
+
pickerType: "date" | "week" | "month";
|
|
12
|
+
mode: "single" | "multiple" | "range";
|
|
13
|
+
weekMode: "single" | "multiple" | "range";
|
|
14
|
+
monthMode: "single" | "multiple" | "range";
|
|
15
|
+
pendingSelection?: Date | Date[] | DateRange;
|
|
16
|
+
pendingWeekSelection?: WeekSelection | WeekSelection[] | WeekRange;
|
|
17
|
+
pendingMonthSelection?: MonthSelection | MonthSelection[] | MonthRange;
|
|
18
|
+
}): FooterFlashTarget | null;
|
|
19
|
+
export declare function resolveFooterButtonEmphasis(params: {
|
|
20
|
+
pickerType: "date" | "week" | "month";
|
|
21
|
+
mode: "single" | "multiple" | "range";
|
|
22
|
+
weekMode: "single" | "multiple" | "range";
|
|
23
|
+
monthMode: "single" | "multiple" | "range";
|
|
24
|
+
pendingSelection?: Date | Date[] | DateRange;
|
|
25
|
+
pendingWeekSelection?: WeekSelection | WeekSelection[] | WeekRange;
|
|
26
|
+
pendingMonthSelection?: MonthSelection | MonthSelection[] | MonthRange;
|
|
27
|
+
}): FooterButtonEmphasis;
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DateRange } from 'react-day-picker';
|
|
2
2
|
import { FiscalMonthPattern } from '../../../lib/fiscal-calendar';
|
|
3
|
+
import { FooterFlashTarget } from './calendar-footer-emphasis';
|
|
3
4
|
import { MonthRange, MonthSelection, WeekRange, WeekSelection } from './calendar.types';
|
|
4
5
|
export interface CalendarFooterProps {
|
|
5
6
|
pickerType: "date" | "week" | "month";
|
|
@@ -14,6 +15,8 @@ export interface CalendarFooterProps {
|
|
|
14
15
|
pendingMonthSelection?: MonthSelection | MonthSelection[] | MonthRange;
|
|
15
16
|
disableApply: boolean;
|
|
16
17
|
isApplyDisabled: boolean;
|
|
18
|
+
footerFlashKey?: number;
|
|
19
|
+
footerFlashTarget?: FooterFlashTarget;
|
|
17
20
|
labels: {
|
|
18
21
|
clear: string;
|
|
19
22
|
cancel: string;
|
|
@@ -26,4 +29,4 @@ export interface CalendarFooterProps {
|
|
|
26
29
|
onCancel: () => void;
|
|
27
30
|
onApply: () => void;
|
|
28
31
|
}
|
|
29
|
-
export declare function CalendarFooter({ pickerType, mode, weekMode, monthMode, calendarType, selectionMode, resolvedFiscalPattern, pendingSelection, pendingWeekSelection, pendingMonthSelection, disableApply, isApplyDisabled, labels, onClear, onCancel, onApply, }: CalendarFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function CalendarFooter({ pickerType, mode, weekMode, monthMode, calendarType, selectionMode, resolvedFiscalPattern, pendingSelection, pendingWeekSelection, pendingMonthSelection, disableApply, isApplyDisabled, footerFlashKey, footerFlashTarget, labels, onClear, onCancel, onApply, }: CalendarFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,65 +1,87 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
import "react";
|
|
3
|
+
import { cn as s } from "../../../lib/utils.js";
|
|
4
|
+
import { Button as m } from "../../primitives/button/button.js";
|
|
5
|
+
import { formatDateRangeFooterSummary as j, formatWeekFooterSummary as A, formatMonthFooterSummary as F } from "./calendar-footer-summary.js";
|
|
6
|
+
const p = "relative isolate overflow-hidden animate-flash-highlight motion-reduce:animate-none", _ = {
|
|
7
|
+
"--flash-overlay": "color-mix(in srgb, white 55%, transparent)"
|
|
8
|
+
};
|
|
9
|
+
function $({
|
|
10
|
+
pickerType: a,
|
|
11
|
+
mode: d,
|
|
12
|
+
weekMode: l,
|
|
13
|
+
monthMode: o,
|
|
14
|
+
calendarType: x,
|
|
15
|
+
selectionMode: h,
|
|
16
|
+
resolvedFiscalPattern: u,
|
|
17
|
+
pendingSelection: g,
|
|
18
|
+
pendingWeekSelection: v,
|
|
19
|
+
pendingMonthSelection: y,
|
|
20
|
+
disableApply: N,
|
|
21
|
+
isApplyDisabled: S,
|
|
22
|
+
footerFlashKey: i = 0,
|
|
23
|
+
footerFlashTarget: f,
|
|
18
24
|
labels: e,
|
|
19
|
-
onClear:
|
|
20
|
-
onCancel:
|
|
21
|
-
onApply:
|
|
25
|
+
onClear: L,
|
|
26
|
+
onCancel: w,
|
|
27
|
+
onApply: C
|
|
22
28
|
}) {
|
|
29
|
+
const H = a === "month" && o !== "single" || d === "range" || l === "range" || l === "multiple", c = i > 0 && f === "cancel", r = i > 0 && f === "apply";
|
|
23
30
|
return /* @__PURE__ */ n(
|
|
24
31
|
"div",
|
|
25
32
|
{
|
|
26
|
-
className:
|
|
33
|
+
className: s(
|
|
27
34
|
"flex items-center gap-2 border-t p-3 pt-3",
|
|
28
|
-
|
|
35
|
+
H ? "justify-between" : "justify-end"
|
|
29
36
|
),
|
|
30
37
|
children: [
|
|
31
|
-
|
|
38
|
+
d === "range" && a === "date" ? /* @__PURE__ */ n("div", { className: "flex flex-row items-center gap-1 text-xs font-medium leading-[18px] text-content-tertiary", children: [
|
|
32
39
|
e.selected,
|
|
33
|
-
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children:
|
|
40
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children: j(g) })
|
|
34
41
|
] }) : null,
|
|
35
|
-
|
|
42
|
+
a === "week" && (l === "range" || l === "multiple") ? /* @__PURE__ */ n("div", { className: "flex flex-row items-center gap-1 text-xs font-medium leading-[18px] text-content-tertiary", children: [
|
|
36
43
|
e.selected,
|
|
37
|
-
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children:
|
|
38
|
-
selection:
|
|
39
|
-
calendarType:
|
|
40
|
-
selectionMode:
|
|
41
|
-
resolvedFiscalPattern:
|
|
44
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children: A({
|
|
45
|
+
selection: v,
|
|
46
|
+
calendarType: x,
|
|
47
|
+
selectionMode: h,
|
|
48
|
+
resolvedFiscalPattern: u
|
|
42
49
|
}) })
|
|
43
50
|
] }) : null,
|
|
44
|
-
|
|
51
|
+
a === "month" && (o === "range" || o === "multiple") ? /* @__PURE__ */ n("div", { className: "flex flex-row items-center gap-1 text-xs font-medium leading-[18px] text-content-tertiary", children: [
|
|
45
52
|
e.selected,
|
|
46
|
-
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children:
|
|
53
|
+
/* @__PURE__ */ t("span", { className: "font-semibold text-content", children: F(y, {
|
|
47
54
|
single: e.monthSingle,
|
|
48
55
|
plural: e.monthPlural
|
|
49
56
|
}) })
|
|
50
57
|
] }) : null,
|
|
51
58
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
52
|
-
/* @__PURE__ */ t(
|
|
53
|
-
/* @__PURE__ */ t(
|
|
59
|
+
/* @__PURE__ */ t(m, { variant: "link", size: "sm", onClick: L, children: e.clear }),
|
|
60
|
+
/* @__PURE__ */ t(
|
|
61
|
+
m,
|
|
62
|
+
{
|
|
63
|
+
variant: "outline",
|
|
64
|
+
size: "sm",
|
|
65
|
+
"data-footer-flash": c ? "cancel" : void 0,
|
|
66
|
+
className: s(c && p),
|
|
67
|
+
onClick: w,
|
|
68
|
+
children: e.cancel
|
|
69
|
+
},
|
|
70
|
+
c ? `footer-cancel-${i}` : "footer-cancel"
|
|
71
|
+
),
|
|
54
72
|
/* @__PURE__ */ t(
|
|
55
|
-
|
|
73
|
+
m,
|
|
56
74
|
{
|
|
57
75
|
variant: "default",
|
|
58
76
|
size: "sm",
|
|
59
|
-
|
|
60
|
-
|
|
77
|
+
"data-footer-flash": r ? "apply" : void 0,
|
|
78
|
+
style: r ? _ : void 0,
|
|
79
|
+
className: s(r && p),
|
|
80
|
+
onClick: C,
|
|
81
|
+
disabled: N || S,
|
|
61
82
|
children: e.apply
|
|
62
|
-
}
|
|
83
|
+
},
|
|
84
|
+
r ? `footer-apply-${i}` : "footer-apply"
|
|
63
85
|
)
|
|
64
86
|
] })
|
|
65
87
|
]
|
|
@@ -67,5 +89,5 @@ function D({
|
|
|
67
89
|
);
|
|
68
90
|
}
|
|
69
91
|
export {
|
|
70
|
-
|
|
92
|
+
$ as CalendarFooter
|
|
71
93
|
};
|