impact-nova 1.3.0 → 1.5.2

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.
Files changed (117) hide show
  1. package/README.md +49 -0
  2. package/dist/components/layout/dashboard-layout.d.ts +15 -1
  3. package/dist/components/ui/accordion-nested-list/accordion-nested-list.js +65 -64
  4. package/dist/components/ui/accordion.js +38 -34
  5. package/dist/components/ui/ag-grid-react/cell-renderers/badge-cell-renderer.js +1 -1
  6. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.d.ts +58 -0
  7. package/dist/components/ui/ag-grid-react/cell-renderers/cell-renderer-utils.js +104 -0
  8. package/dist/components/ui/ag-grid-react/cell-renderers/editors/input-cell-editor.js +62 -54
  9. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.d.ts +4 -6
  10. package/dist/components/ui/ag-grid-react/cell-renderers/editors/split-cell-editor.js +54 -68
  11. package/dist/components/ui/ag-grid-react/cell-renderers/index.d.ts +3 -1
  12. package/dist/components/ui/ag-grid-react/cell-renderers/index.js +33 -27
  13. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.d.ts +3 -0
  14. package/dist/components/ui/ag-grid-react/cell-renderers/input-display-renderer.js +28 -12
  15. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.d.ts +2 -0
  16. package/dist/components/ui/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +45 -44
  17. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.d.ts +4 -6
  18. package/dist/components/ui/ag-grid-react/cell-renderers/split-cell-renderer.js +23 -37
  19. package/dist/components/ui/ag-grid-react/cell-renderers/types.d.ts +33 -17
  20. package/dist/components/ui/ag-grid-react/editable-utils.d.ts +27 -0
  21. package/dist/components/ui/ag-grid-react/editable-utils.js +62 -0
  22. package/dist/components/ui/ag-grid-react/headers/advanced-filter/advanced-filter-dialog.js +99 -98
  23. package/dist/components/ui/ag-grid-react/headers/advanced-filter/column-filter-section.js +110 -143
  24. package/dist/components/ui/ag-grid-react/headers/column-menu/column-settings-menu.js +72 -69
  25. package/dist/components/ui/ag-grid-react/headers/components/header-info.js +36 -35
  26. package/dist/components/ui/ag-grid-react/headers/components/info-modal.js +14 -12
  27. package/dist/components/ui/ag-grid-react/headers/custom-header.js +111 -110
  28. package/dist/components/ui/ag-grid-react/headers/header-search-input.js +204 -203
  29. package/dist/components/ui/alert.js +62 -58
  30. package/dist/components/ui/breadcrumb.js +81 -74
  31. package/dist/components/ui/calendar.js +354 -354
  32. package/dist/components/ui/chart/chart.js +63 -62
  33. package/dist/components/ui/chips.js +42 -38
  34. package/dist/components/ui/command-palette/command-palette-context.d.ts +52 -0
  35. package/dist/components/ui/command-palette/command-palette-context.js +110 -0
  36. package/dist/components/ui/command-palette/command-palette.d.ts +67 -0
  37. package/dist/components/ui/command-palette/command-palette.js +402 -0
  38. package/dist/components/ui/command-palette/index.d.ts +23 -0
  39. package/dist/components/ui/command-palette/index.js +44 -0
  40. package/dist/components/ui/command-palette/kbd.d.ts +28 -0
  41. package/dist/components/ui/command-palette/kbd.js +52 -0
  42. package/dist/components/ui/command-palette/shortcut-registry.d.ts +68 -0
  43. package/dist/components/ui/command-palette/shortcut-registry.js +183 -0
  44. package/dist/components/ui/command-palette/shortcut-scope-provider.d.ts +55 -0
  45. package/dist/components/ui/command-palette/shortcut-scope-provider.js +55 -0
  46. package/dist/components/ui/command-palette/shortcut-settings.d.ts +27 -0
  47. package/dist/components/ui/command-palette/shortcut-settings.js +266 -0
  48. package/dist/components/ui/command-palette/use-browser-shortcuts.d.ts +32 -0
  49. package/dist/components/ui/command-palette/use-browser-shortcuts.js +48 -0
  50. package/dist/components/ui/command-palette/use-global-shortcut.d.ts +3 -0
  51. package/dist/components/ui/command-palette/use-global-shortcut.js +7 -0
  52. package/dist/components/ui/command-palette/use-shortcut.d.ts +47 -0
  53. package/dist/components/ui/command-palette/use-shortcut.js +49 -0
  54. package/dist/components/ui/command-palette/utils.d.ts +119 -0
  55. package/dist/components/ui/command-palette/utils.js +248 -0
  56. package/dist/components/ui/data-table/data-table-column-list.js +87 -86
  57. package/dist/components/ui/data-table/data-table-format-options.js +45 -44
  58. package/dist/components/ui/data-table/data-table-view-options.js +39 -38
  59. package/dist/components/ui/date-picker/date-picker.js +89 -87
  60. package/dist/components/ui/date-picker/date-range-picker.js +140 -138
  61. package/dist/components/ui/date-picker/month-picker.js +82 -81
  62. package/dist/components/ui/date-picker/month-range-picker.js +108 -105
  63. package/dist/components/ui/date-picker/multi-date-picker.js +68 -66
  64. package/dist/components/ui/date-picker/multi-month-picker.js +59 -58
  65. package/dist/components/ui/date-picker/multi-week-picker.js +80 -78
  66. package/dist/components/ui/date-picker/week-picker.js +117 -115
  67. package/dist/components/ui/date-picker/week-range-picker.js +166 -164
  68. package/dist/components/ui/dialog.js +78 -73
  69. package/dist/components/ui/drawer.js +71 -66
  70. package/dist/components/ui/file-upload.js +131 -127
  71. package/dist/components/ui/filter-panel/filter-panel.js +98 -94
  72. package/dist/components/ui/filter-strip/filter-strip.js +95 -91
  73. package/dist/components/ui/filter-strip/filter-summary.js +91 -90
  74. package/dist/components/ui/header.js +57 -53
  75. package/dist/components/ui/horizontal-scroller/horizontal-scroller.js +78 -76
  76. package/dist/components/ui/loader.js +17 -16
  77. package/dist/components/ui/nested-list/components/NestedListHeader.d.ts +1 -0
  78. package/dist/components/ui/nested-list/components/NestedListHeader.js +51 -48
  79. package/dist/components/ui/nested-list/components/SortableItem.js +60 -59
  80. package/dist/components/ui/nested-list/nested-list.js +184 -182
  81. package/dist/components/ui/notification-panel/notification-panel.js +60 -53
  82. package/dist/components/ui/popover.js +45 -40
  83. package/dist/components/ui/prompt.js +90 -86
  84. package/dist/components/ui/select/select.js +206 -209
  85. package/dist/components/ui/sheet.d.ts +1 -0
  86. package/dist/components/ui/sheet.js +50 -48
  87. package/dist/components/ui/sidebar.js +273 -267
  88. package/dist/components/ui/stepper.js +75 -63
  89. package/dist/components/ui/tag.js +48 -44
  90. package/dist/components/ui/toast.js +46 -41
  91. package/dist/i18n/ImpactNovaI18nContext.d.ts +21 -0
  92. package/dist/i18n/ImpactNovaI18nContext.js +76 -0
  93. package/dist/i18n/defaultMessages.d.ts +231 -0
  94. package/dist/i18n/defaultMessages.js +206 -0
  95. package/dist/i18n/getDateFnsLocale.d.ts +11 -0
  96. package/dist/i18n/getDateFnsLocale.js +21 -0
  97. package/dist/i18n/index.d.ts +5 -0
  98. package/dist/i18n/locales/de.d.ts +2 -0
  99. package/dist/i18n/locales/de.js +206 -0
  100. package/dist/i18n/locales/es.d.ts +2 -0
  101. package/dist/i18n/locales/es.js +206 -0
  102. package/dist/i18n/locales/hi.d.ts +2 -0
  103. package/dist/i18n/locales/hi.js +206 -0
  104. package/dist/i18n/locales/index.d.ts +4 -0
  105. package/dist/i18n/locales/kn.d.ts +2 -0
  106. package/dist/i18n/locales/kn.js +206 -0
  107. package/dist/icons/assets/boxAdd.svg.js +5 -0
  108. package/dist/icons/assets/boxed.svg.js +5 -0
  109. package/dist/icons/assets/trolley.svg.js +5 -0
  110. package/dist/icons/assets/unlocked.svg.js +5 -0
  111. package/dist/icons/index.d.ts +4 -0
  112. package/dist/icons/index.js +179 -171
  113. package/dist/impact-nova.css +1 -1
  114. package/dist/index.d.ts +4 -0
  115. package/dist/index.js +232 -172
  116. package/package.json +36 -4
  117. package/dist/components/ui/ag-grid-react/cell-renderers/types.js +0 -74
@@ -1,123 +1,127 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import u from "react";
3
- import { Sheet as b, SheetContent as v, SheetDescription as g, SheetTitle as w, SheetClose as y } from "../sheet.js";
2
+ import b from "react";
3
+ import { Sheet as v, SheetContent as g, SheetDescription as w, SheetTitle as y, SheetClose as N } from "../sheet.js";
4
4
  import { cn as n } from "../../../lib/utils.js";
5
- import { MultiColorFilter as N, Cross as C, Info as p } from "../../../icons/index.js";
6
- import { Button as F } from "../button.js";
7
- import { Tooltip as c, TooltipTrigger as o, TooltipContent as d } from "../tooltip.js";
8
- const j = ({ title: a, children: l, className: i }) => /* @__PURE__ */ t("div", { "data-component": "filter-panel-header", className: n("flex shrink-0 flex-row items-center justify-between border-b px-4 py-3 bg-white", i), children: [
9
- /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
10
- /* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(N, { className: "h-5 w-5" }) }),
11
- /* @__PURE__ */ e(w, { className: "text-lg font-bold text-[#1f2b4d]", children: a })
12
- ] }),
13
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
14
- l,
15
- /* @__PURE__ */ e(y, { asChild: !0, children: /* @__PURE__ */ e(F, { variant: "secondary", size: "icon", "aria-label": "Close", "data-component": "filter-panel-close", children: /* @__PURE__ */ e(C, { className: "h-3 w-3" }) }) })
16
- ] })
17
- ] }), E = ({
18
- open: a,
19
- onOpenChange: l,
5
+ import { MultiColorFilter as C, Cross as F, Info as m } from "../../../icons/index.js";
6
+ import { Button as P } from "../button.js";
7
+ import { Tooltip as d, TooltipTrigger as h, TooltipContent as f } from "../tooltip.js";
8
+ import { useImpactNovaI18n as u } from "../../../i18n/ImpactNovaI18nContext.js";
9
+ const j = ({ title: l, children: a, className: i }) => {
10
+ const { t: c } = u();
11
+ return /* @__PURE__ */ t("div", { "data-component": "filter-panel-header", className: n("flex shrink-0 flex-row items-center justify-between border-b px-4 py-3 bg-white", i), children: [
12
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-3", children: [
13
+ /* @__PURE__ */ e("div", { className: "flex h-6 w-6 items-center justify-center", children: /* @__PURE__ */ e(C, { className: "h-5 w-5" }) }),
14
+ /* @__PURE__ */ e(y, { className: "text-lg font-bold text-[#1f2b4d]", children: l })
15
+ ] }),
16
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
17
+ a,
18
+ /* @__PURE__ */ e(N, { asChild: !0, children: /* @__PURE__ */ e(P, { variant: "secondary", size: "icon", "aria-label": c("aria.close"), "data-component": "filter-panel-close", children: /* @__PURE__ */ e(F, { className: "h-3 w-3" }) }) })
19
+ ] })
20
+ ] });
21
+ }, H = ({
22
+ open: l,
23
+ onOpenChange: a,
20
24
  title: i = "Filter panel",
21
- children: h,
22
- header: r,
23
- sidebar: s,
24
- className: x,
25
- preventClose: m = !1
26
- }) => /* @__PURE__ */ e(b, { open: a, onOpenChange: l, children: /* @__PURE__ */ t(
27
- v,
25
+ children: c,
26
+ header: s,
27
+ sidebar: r,
28
+ className: o,
29
+ preventClose: x = !1
30
+ }) => /* @__PURE__ */ e(v, { open: l, onOpenChange: a, children: /* @__PURE__ */ t(
31
+ g,
28
32
  {
29
33
  side: "right",
30
34
  className: n(
31
35
  "w-full !max-w-[840px] p-0 sm:!max-w-[840px] gap-0 border-l shadow-xl transition-all duration-300 ease-in-out bg-white",
32
- x
36
+ o
33
37
  ),
34
- onInteractOutside: (f) => {
35
- m && f.preventDefault();
38
+ onInteractOutside: (p) => {
39
+ x && p.preventDefault();
36
40
  },
37
- onEscapeKeyDown: (f) => {
38
- m && f.preventDefault();
41
+ onEscapeKeyDown: (p) => {
42
+ x && p.preventDefault();
39
43
  },
40
44
  children: [
41
- /* @__PURE__ */ e(g, { className: "sr-only", children: "Select filters to apply to the current view." }),
45
+ /* @__PURE__ */ e(w, { className: "sr-only", children: "Select filters to apply to the current view." }),
42
46
  /* @__PURE__ */ t("div", { className: "flex h-full flex-col bg-white", children: [
43
- r || /* @__PURE__ */ e(j, { title: i }),
47
+ s || /* @__PURE__ */ e(j, { title: i }),
44
48
  /* @__PURE__ */ t("div", { className: "flex flex-1 overflow-hidden", children: [
45
- s,
46
- /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children: h })
49
+ r,
50
+ /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-hidden", children: c })
47
51
  ] })
48
52
  ] })
49
53
  ]
50
54
  }
51
55
  ) }), M = ({
52
- items: a,
53
- activeTab: l,
56
+ items: l,
57
+ activeTab: a,
54
58
  onTabChange: i,
55
- className: h
56
- }) => /* @__PURE__ */ e("div", { "data-component": "filter-panel-sidebar", className: n("flex w-[200px] shrink-0 flex-col border-r bg-sidebar-light", h), children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: a.map((r) => {
57
- const s = l === r.id;
58
- return /* @__PURE__ */ t(u.Fragment, { children: [
59
- r.separator && /* @__PURE__ */ e("div", { className: "my-2 h-px bg-gray-200" }),
60
- /* @__PURE__ */ t(
61
- "button",
62
- {
63
- onClick: () => i(r.id),
64
- "data-component": "filter-panel-sidebar-item",
65
- "data-active": s ? "true" : "false",
66
- "data-tab": r.id,
67
- className: n(
68
- "group flex items-center justify-between px-3 py-[6px] mx-2 rounded-lg text-left text-sm font-medium transition-colors",
69
- s ? "bg-active-blue text-primary" : "text-text-secondary hover:bg-active-blue"
70
- ),
71
- children: [
72
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
73
- /* @__PURE__ */ e("span", { className: n(
74
- "shrink-0",
75
- s ? "text-primary" : "text-text-secondary"
76
- ), children: r.icon }),
77
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1 min-w-0", children: [
78
- /* @__PURE__ */ t(c, { children: [
79
- /* @__PURE__ */ e(o, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate font-['Manrope']", children: r.label }) }),
80
- /* @__PURE__ */ e(d, { variant: "tertiary", side: "right", children: r.label })
81
- ] }),
82
- r.isRequired && /* @__PURE__ */ e("span", { className: "shrink-0 text-error", children: "*" })
83
- ] })
84
- ] }),
85
- /* @__PURE__ */ t("div", { className: "flex items-center gap-1 shrink-0 ml-1", children: [
86
- r.count !== void 0 && r.count > 0 && /* @__PURE__ */ t(c, { children: [
87
- /* @__PURE__ */ e(o, { asChild: !0, children: /* @__PURE__ */ e("span", { className: n(
88
- "flex h-5 items-center justify-center rounded-full px-2 text-[11px]",
89
- s ? "bg-white text-[#4259ee] border border-gray-100" : "bg-white border border-gray-100"
90
- ), children: r.count }) }),
91
- /* @__PURE__ */ t(d, { variant: "tertiary", side: "top", children: [
92
- r.count,
93
- " filters applied"
59
+ className: c
60
+ }) => {
61
+ const { t: s } = u();
62
+ return /* @__PURE__ */ e("div", { "data-component": "filter-panel-sidebar", className: n("flex w-[200px] shrink-0 flex-col border-r bg-sidebar-light", c), children: /* @__PURE__ */ e("div", { className: "flex flex-1 flex-col py-2 gap-1 overflow-y-auto", children: l.map((r) => {
63
+ const o = a === r.id;
64
+ return /* @__PURE__ */ t(b.Fragment, { children: [
65
+ r.separator && /* @__PURE__ */ e("div", { className: "my-2 h-px bg-gray-200" }),
66
+ /* @__PURE__ */ t(
67
+ "button",
68
+ {
69
+ onClick: () => i(r.id),
70
+ "data-component": "filter-panel-sidebar-item",
71
+ "data-active": o ? "true" : "false",
72
+ "data-tab": r.id,
73
+ className: n(
74
+ "group flex items-center justify-between px-3 py-[6px] mx-2 rounded-lg text-left text-sm font-medium transition-colors",
75
+ o ? "bg-active-blue text-primary" : "text-text-secondary hover:bg-active-blue"
76
+ ),
77
+ children: [
78
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: [
79
+ /* @__PURE__ */ e("span", { className: n(
80
+ "shrink-0",
81
+ o ? "text-primary" : "text-text-secondary"
82
+ ), children: r.icon }),
83
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1 min-w-0", children: [
84
+ /* @__PURE__ */ t(d, { children: [
85
+ /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "truncate font-['Manrope']", children: r.label }) }),
86
+ /* @__PURE__ */ e(f, { variant: "tertiary", side: "right", children: r.label })
87
+ ] }),
88
+ r.isRequired && /* @__PURE__ */ e("span", { className: "shrink-0 text-error", children: "*" })
94
89
  ] })
95
90
  ] }),
96
- r.hasError && /* @__PURE__ */ t(c, { children: [
97
- /* @__PURE__ */ e(o, { asChild: !0, children: /* @__PURE__ */ e(p, { className: "h-4 w-4 text-error" }) }),
98
- /* @__PURE__ */ e(d, { variant: "tertiary", children: "This tab contains errors" })
99
- ] }),
100
- r.hasWarning && /* @__PURE__ */ t(c, { children: [
101
- /* @__PURE__ */ e(o, { asChild: !0, children: /* @__PURE__ */ e(p, { className: "h-4 w-4 text-warning" }) }),
102
- /* @__PURE__ */ e(d, { variant: "tertiary", children: "This tab has warnings" })
103
- ] }),
104
- r.hasInfo && /* @__PURE__ */ t(c, { children: [
105
- /* @__PURE__ */ e(o, { asChild: !0, children: /* @__PURE__ */ e(p, { className: "h-4 w-4 text-icon-gray" }) }),
106
- /* @__PURE__ */ e(d, { variant: "tertiary", children: "Additional information available" })
91
+ /* @__PURE__ */ t("div", { className: "flex items-center gap-1 shrink-0 ml-1", children: [
92
+ r.count !== void 0 && r.count > 0 && /* @__PURE__ */ t(d, { children: [
93
+ /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e("span", { className: n(
94
+ "flex h-5 items-center justify-center rounded-full px-2 text-[11px]",
95
+ o ? "bg-white text-[#4259ee] border border-gray-100" : "bg-white border border-gray-100"
96
+ ), children: r.count }) }),
97
+ /* @__PURE__ */ e(f, { variant: "tertiary", side: "top", children: s("filterPanel.filtersAppliedCount", { count: r.count }) })
98
+ ] }),
99
+ r.hasError && /* @__PURE__ */ t(d, { children: [
100
+ /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(m, { className: "h-4 w-4 text-error" }) }),
101
+ /* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabContainsErrors") })
102
+ ] }),
103
+ r.hasWarning && /* @__PURE__ */ t(d, { children: [
104
+ /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(m, { className: "h-4 w-4 text-warning" }) }),
105
+ /* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.tabHasWarnings") })
106
+ ] }),
107
+ r.hasInfo && /* @__PURE__ */ t(d, { children: [
108
+ /* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(m, { className: "h-4 w-4 text-icon-gray" }) }),
109
+ /* @__PURE__ */ e(f, { variant: "tertiary", children: s("filterPanel.additionalInfoAvailable") })
110
+ ] })
107
111
  ] })
108
- ] })
109
- ]
110
- }
111
- )
112
- ] }, r.id);
113
- }) }) }), R = ({ children: a, className: l }) => /* @__PURE__ */ e("div", { "data-component": "filter-panel-body", className: n("flex flex-1 flex-col overflow-auto bg-white p-4", l), children: a }), _ = ({ children: a, className: l, leftAction: i }) => /* @__PURE__ */ t("div", { "data-component": "filter-panel-footer", className: n("flex items-center justify-between border-t bg-white px-4 py-3 shrink-0", l), children: [
112
+ ]
113
+ }
114
+ )
115
+ ] }, r.id);
116
+ }) }) });
117
+ }, R = ({ children: l, className: a }) => /* @__PURE__ */ e("div", { "data-component": "filter-panel-body", className: n("flex flex-1 flex-col overflow-auto bg-white p-4", a), children: l }), W = ({ children: l, className: a, leftAction: i }) => /* @__PURE__ */ t("div", { "data-component": "filter-panel-footer", className: n("flex items-center justify-between border-t bg-white px-4 py-3 shrink-0", a), children: [
114
118
  /* @__PURE__ */ e("div", { children: i && i }),
115
- /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: a })
119
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: l })
116
120
  ] });
117
121
  export {
118
- E as FilterPanel,
122
+ H as FilterPanel,
119
123
  R as FilterPanelBody,
120
- _ as FilterPanelFooter,
124
+ W as FilterPanelFooter,
121
125
  j as FilterPanelHeader,
122
126
  M as FilterPanelSidebar
123
127
  };
@@ -1,99 +1,103 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
2
  import { ListFilter as k } from "lucide-react";
3
3
  import { cn as a } from "../../../lib/utils.js";
4
- import { Button as v } from "../button.js";
5
- import { Skeleton as i } from "../skeleton.js";
6
- import { FilterSummary as u } from "./filter-summary.js";
7
- import { FilterTagList as b } from "./filter-tag-list.js";
8
- const C = ({
9
- filters: r,
10
- onFilterRemove: l,
11
- onAllFiltersClick: m,
12
- savedFilters: n,
4
+ import { Button as u } from "../button.js";
5
+ import { Skeleton as t } from "../skeleton.js";
6
+ import { FilterSummary as b } from "./filter-summary.js";
7
+ import { FilterTagList as F } from "./filter-tag-list.js";
8
+ import { useImpactNovaI18n as S } from "../../../i18n/ImpactNovaI18nContext.js";
9
+ const T = ({
10
+ filters: l,
11
+ onFilterRemove: m,
12
+ onAllFiltersClick: n,
13
+ savedFilters: p,
13
14
  recentFilters: c,
14
- onApplySavedFilter: p,
15
- onSavedFilterSearch: o,
15
+ onApplySavedFilter: o,
16
+ onSavedFilterSearch: f,
16
17
  onSavedFiltersScroll: h,
17
- onViewAll: f,
18
- selectedFilter: d,
19
- onSelectedFilterChange: w,
20
- onDropdownOpenChange: x,
21
- isLoadingFilterPreferencesList: N,
22
- isLoading: g,
23
- className: s
24
- }) => g ? /* @__PURE__ */ e(
25
- "div",
26
- {
27
- "data-component": "filter-strip",
28
- "data-loading": "true",
29
- className: a(
30
- "flex w-full h-12 items-center gap-3 bg-white px-6 py-2",
31
- s
32
- ),
33
- children: /* @__PURE__ */ t("div", { className: "flex items-center gap-2 flex-1 min-w-0", "data-component": "filter-strip-loading", children: [
34
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[#60697d] font-['Manrope'] shrink-0", children: "Filters Applied" }),
35
- /* @__PURE__ */ e(i, { className: "h-6 w-20 shrink-0" }),
36
- /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
37
- /* @__PURE__ */ t("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
38
- /* @__PURE__ */ e(i, { className: "h-6 w-32" }),
39
- /* @__PURE__ */ e(i, { className: "h-6 w-28" }),
40
- /* @__PURE__ */ e(i, { className: "h-6 w-24" }),
41
- /* @__PURE__ */ e(i, { className: "h-6 w-36" }),
42
- /* @__PURE__ */ e(i, { className: "h-6 w-20" }),
43
- /* @__PURE__ */ e(i, { className: "h-6 w-30" })
44
- ] }),
45
- /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
46
- /* @__PURE__ */ e(i, { className: "h-8 w-24 shrink-0" })
47
- ] })
48
- }
49
- ) : /* @__PURE__ */ t(
50
- "div",
51
- {
52
- "data-component": "filter-strip",
53
- className: a(
54
- "flex w-full h-12 items-center gap-3 bg-white px-6 py-2",
55
- s
56
- ),
57
- children: [
58
- /* @__PURE__ */ e(
59
- u,
60
- {
61
- selectedFilter: d,
62
- onSelectedFilterChange: w,
63
- savedFilters: n,
64
- recentFilters: c,
65
- onApplySavedFilter: p,
66
- onSavedFilterSearch: o,
67
- onSavedFiltersScroll: h,
68
- onDropdownOpenChange: x,
69
- isLoadingFilterPreferencesList: N
70
- }
18
+ onViewAll: d,
19
+ selectedFilter: w,
20
+ onSelectedFilterChange: x,
21
+ onDropdownOpenChange: N,
22
+ isLoadingFilterPreferencesList: g,
23
+ isLoading: v,
24
+ className: r
25
+ }) => {
26
+ const { t: s } = S();
27
+ return v ? /* @__PURE__ */ e(
28
+ "div",
29
+ {
30
+ "data-component": "filter-strip",
31
+ "data-loading": "true",
32
+ className: a(
33
+ "flex w-full h-12 items-center gap-3 bg-white px-6 py-2",
34
+ r
71
35
  ),
72
- /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] mx-1 shrink-0" }),
73
- /* @__PURE__ */ e(
74
- b,
75
- {
76
- filters: r,
77
- onFilterRemove: l,
78
- onViewAll: f
79
- }
36
+ children: /* @__PURE__ */ i("div", { className: "flex items-center gap-2 flex-1 min-w-0", "data-component": "filter-strip-loading", children: [
37
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-[#60697d] font-['Manrope'] shrink-0", children: s("filterStrip.filtersApplied") }),
38
+ /* @__PURE__ */ e(t, { className: "h-6 w-20 shrink-0" }),
39
+ /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
40
+ /* @__PURE__ */ i("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
41
+ /* @__PURE__ */ e(t, { className: "h-6 w-32" }),
42
+ /* @__PURE__ */ e(t, { className: "h-6 w-28" }),
43
+ /* @__PURE__ */ e(t, { className: "h-6 w-24" }),
44
+ /* @__PURE__ */ e(t, { className: "h-6 w-36" }),
45
+ /* @__PURE__ */ e(t, { className: "h-6 w-20" }),
46
+ /* @__PURE__ */ e(t, { className: "h-6 w-30" })
47
+ ] }),
48
+ /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] shrink-0" }),
49
+ /* @__PURE__ */ e(t, { className: "h-8 w-24 shrink-0" })
50
+ ] })
51
+ }
52
+ ) : /* @__PURE__ */ i(
53
+ "div",
54
+ {
55
+ "data-component": "filter-strip",
56
+ className: a(
57
+ "flex w-full h-12 items-center gap-3 bg-white px-6 py-2",
58
+ r
80
59
  ),
81
- /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] mx-1 shrink-0" }),
82
- /* @__PURE__ */ t(
83
- v,
84
- {
85
- variant: "tertiary",
86
- onClick: m,
87
- "data-component": "filter-strip-all-filters",
88
- children: [
89
- /* @__PURE__ */ e(k, { className: "h-4 w-4" }),
90
- "All Filters"
91
- ]
92
- }
93
- )
94
- ]
95
- }
96
- );
60
+ children: [
61
+ /* @__PURE__ */ e(
62
+ b,
63
+ {
64
+ selectedFilter: w,
65
+ onSelectedFilterChange: x,
66
+ savedFilters: p,
67
+ recentFilters: c,
68
+ onApplySavedFilter: o,
69
+ onSavedFilterSearch: f,
70
+ onSavedFiltersScroll: h,
71
+ onDropdownOpenChange: N,
72
+ isLoadingFilterPreferencesList: g
73
+ }
74
+ ),
75
+ /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] mx-1 shrink-0" }),
76
+ /* @__PURE__ */ e(
77
+ F,
78
+ {
79
+ filters: l,
80
+ onFilterRemove: m,
81
+ onViewAll: d
82
+ }
83
+ ),
84
+ /* @__PURE__ */ e("div", { className: "h-4 w-[1px] bg-[#e6e8f0] mx-1 shrink-0" }),
85
+ /* @__PURE__ */ i(
86
+ u,
87
+ {
88
+ variant: "tertiary",
89
+ onClick: n,
90
+ "data-component": "filter-strip-all-filters",
91
+ children: [
92
+ /* @__PURE__ */ e(k, { className: "h-4 w-4" }),
93
+ s("filterStrip.allFilters")
94
+ ]
95
+ }
96
+ )
97
+ ]
98
+ }
99
+ );
100
+ };
97
101
  export {
98
- C as FilterStrip
102
+ T as FilterStrip
99
103
  };