qaema-ui 0.0.26 → 0.0.28
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/_virtual/index.js +5 -5
- package/dist/_virtual/index2.js +4 -4
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +4 -4
- package/dist/assets/icons/RiyalIcon.d.ts +1 -1
- package/dist/components/AccordionCard.d.ts +1 -1
- package/dist/components/ActionInput.d.ts +2 -2
- package/dist/components/AddOnCardInput.d.ts +2 -2
- package/dist/components/Alert.d.ts +1 -1
- package/dist/components/AmountItem.d.ts +2 -2
- package/dist/components/Badge.d.ts +3 -3
- package/dist/components/Button.d.ts +3 -2
- package/dist/components/Card.d.ts +1 -1
- package/dist/components/CardsList.d.ts +2 -2
- package/dist/components/Chart.d.ts +1 -1
- package/dist/components/ChartLegend/ChartLegend.d.ts +2 -2
- package/dist/components/ChartLegend/ChartLegend.js +8 -7
- package/dist/components/ChartLegend/PieChartLegend.d.ts +1 -1
- package/dist/components/ChartLegend/styles.d.ts +5 -5
- package/dist/components/CollapsableCard.d.ts +1 -1
- package/dist/components/ConfigList.d.ts +1 -1
- package/dist/components/ConfirmationPopup.d.ts +1 -1
- package/dist/components/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker.js +1 -1
- package/dist/components/Divider.d.ts +2 -2
- package/dist/components/Draggable.d.ts +1 -1
- package/dist/components/DropDown.d.ts +1 -1
- package/dist/components/DropDownWithTable/DropDownWithTable.d.ts +1 -1
- package/dist/components/DropDownWithTable/DropDownWithTable.js +69 -64
- package/dist/components/DropDownWithTable/DropDownWithTable.types.d.ts +2 -1
- package/dist/components/DropDownWithTable/Table/Table.d.ts +1 -1
- package/dist/components/DropDownWithTable/Table/Table.js +66 -66
- package/dist/components/DropDownWithTable/Table/Table.styles.d.ts +27 -27
- package/dist/components/DropDownWithTable/Table/components/CellComponents.d.ts +6 -6
- package/dist/components/DropDownWithTable/Table/components/CellComponents.js +82 -82
- package/dist/components/DropDownWithTable/Table/components/TableHead.d.ts +1 -1
- package/dist/components/FileDownloadCard.d.ts +1 -1
- package/dist/components/Filter.d.ts +14 -14
- package/dist/components/FilterActiveBar.d.ts +1 -1
- package/dist/components/Header.d.ts +3 -2
- package/dist/components/HelpCard.d.ts +2 -2
- package/dist/components/Hint.d.ts +2 -2
- package/dist/components/HorizontalChart.d.ts +2 -2
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/InfoCard.d.ts +1 -1
- package/dist/components/InfoItem.d.ts +1 -1
- package/dist/components/InputField.d.ts +2 -2
- package/dist/components/Layout.d.ts +4 -3
- package/dist/components/Legend.d.ts +1 -1
- package/dist/components/Link.d.ts +1 -1
- package/dist/components/ListToolbar.d.ts +5 -5
- package/dist/components/MethodCard.d.ts +1 -1
- package/dist/components/Modal.d.ts +2 -2
- package/dist/components/ModalWithRequestCard.d.ts +2 -2
- package/dist/components/NavItem.d.ts +2 -2
- package/dist/components/NavigationPanel.d.ts +2 -2
- package/dist/components/NextActionBox.d.ts +1 -1
- package/dist/components/NextActionBox.js +104 -0
- package/dist/components/NumberInput.d.ts +1 -1
- package/dist/components/OTP.d.ts +1 -1
- package/dist/components/OptionCardGroup.d.ts +2 -2
- package/dist/components/OptionCardGroup.js +16 -15
- package/dist/components/Pagination.d.ts +1 -1
- package/dist/components/PasswordInputField.d.ts +2 -2
- package/dist/components/PaymentLinkDetails.d.ts +1 -1
- package/dist/components/PaymentTooltip.d.ts +2 -2
- package/dist/components/PhoneInputField.d.ts +2 -2
- package/dist/components/QuickActionItem.d.ts +2 -2
- package/dist/components/QuickStartCard.d.ts +4 -4
- package/dist/components/RadioInput.d.ts +1 -1
- package/dist/components/ReconciliationGroups.d.ts +1 -1
- package/dist/components/RequestCard.d.ts +7 -7
- package/dist/components/RequestSummaryCard.d.ts +6 -6
- package/dist/components/SectionHeader.d.ts +1 -1
- package/dist/components/SideMenuLinks.d.ts +1 -1
- package/dist/components/Sidemenu.d.ts +2 -2
- package/dist/components/Spinner.d.ts +1 -1
- package/dist/components/StatCard.d.ts +1 -1
- package/dist/components/StatIndicator.d.ts +1 -1
- package/dist/components/StatusFeedback.d.ts +2 -2
- package/dist/components/StepperProcess.d.ts +391 -571
- package/dist/components/SummaryCard.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.styles.d.ts +27 -27
- package/dist/components/Table/components/CellComponents.d.ts +6 -6
- package/dist/components/Table/components/TableHead.d.ts +1 -1
- package/dist/components/Tabs.d.ts +1 -1
- package/dist/components/TextArea.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +2 -2
- package/dist/components/ToastNotification.d.ts +2 -2
- package/dist/components/Toggle.d.ts +2 -2
- package/dist/components/ToggleForm.d.ts +2 -2
- package/dist/components/Typography.d.ts +3 -3
- package/dist/components/index.d.ts +1 -1
- package/dist/hooks/useFormikInput.d.ts +11 -11
- package/dist/hooks/useTypographyVariant.d.ts +1 -1
- package/dist/i18n/i18n.d.ts +3 -3
- package/dist/index.js +173 -171
- package/dist/node_modules/@react-spring/core/dist/react-spring_core.modern.js +1 -1
- package/dist/node_modules/@restart/ui/esm/ImperativeTransition.js +1 -0
- package/dist/node_modules/d3-format/src/defaultLocale.js +4 -3
- package/dist/node_modules/d3-format/src/formatDecimal.js +4 -4
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js +5 -5
- package/dist/node_modules/d3-format/src/locale.js +37 -37
- package/dist/node_modules/d3-shape/src/symbol/circle.js +3 -3
- package/dist/node_modules/d3-time-format/src/defaultLocale.js +6 -5
- package/dist/node_modules/d3-time-format/src/locale.js +14 -14
- package/dist/node_modules/date-fns/addDays.js +3 -2
- package/dist/node_modules/date-fns/addMonths.js +9 -8
- package/dist/node_modules/date-fns/constructFrom.js +2 -1
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +3 -2
- package/dist/node_modules/date-fns/endOfMonth.js +4 -3
- package/dist/node_modules/date-fns/endOfWeek.js +5 -4
- package/dist/node_modules/date-fns/format.js +1 -0
- package/dist/node_modules/date-fns/getDayOfYear.js +4 -3
- package/dist/node_modules/date-fns/getDaysInMonth.js +6 -5
- package/dist/node_modules/date-fns/getDefaultOptions.js +3 -2
- package/dist/node_modules/date-fns/getISODay.js +6 -5
- package/dist/node_modules/date-fns/getISOWeek.js +5 -4
- package/dist/node_modules/date-fns/getISOWeekYear.js +1 -0
- package/dist/node_modules/date-fns/getWeek.js +6 -5
- package/dist/node_modules/date-fns/getWeekYear.js +1 -0
- package/dist/node_modules/date-fns/getYear.js +3 -2
- package/dist/node_modules/date-fns/isAfter.js +3 -2
- package/dist/node_modules/date-fns/isBefore.js +4 -3
- package/dist/node_modules/date-fns/isDate.js +1 -0
- package/dist/node_modules/date-fns/isSameDay.js +9 -8
- package/dist/node_modules/date-fns/isSameMonth.js +6 -5
- package/dist/node_modules/date-fns/isValid.js +5 -4
- package/dist/node_modules/date-fns/locale/ar-SA.js +7 -6
- package/dist/node_modules/date-fns/locale/en-US.js +9 -8
- package/dist/node_modules/date-fns/parse.js +11 -10
- package/dist/node_modules/date-fns/setDay.js +7 -6
- package/dist/node_modules/date-fns/setISODay.js +4 -3
- package/dist/node_modules/date-fns/setISOWeek.js +5 -4
- package/dist/node_modules/date-fns/setMonth.js +6 -5
- package/dist/node_modules/date-fns/setWeek.js +4 -3
- package/dist/node_modules/date-fns/setYear.js +5 -4
- package/dist/node_modules/date-fns/startOfDay.js +5 -4
- package/dist/node_modules/date-fns/startOfISOWeek.js +3 -2
- package/dist/node_modules/date-fns/startOfISOWeekYear.js +6 -5
- package/dist/node_modules/date-fns/startOfMonth.js +1 -0
- package/dist/node_modules/date-fns/startOfWeek.js +8 -7
- package/dist/node_modules/date-fns/startOfWeekYear.js +5 -4
- package/dist/node_modules/date-fns/startOfYear.js +1 -0
- package/dist/node_modules/date-fns/subMonths.js +4 -3
- package/dist/node_modules/date-fns/toDate.js +4 -3
- package/dist/node_modules/date-fns/transpose.js +3 -2
- package/dist/node_modules/fast-equals/dist/esm/index.js +298 -0
- package/dist/node_modules/react-bootstrap/esm/Alert.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertHeading.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/AlertLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Button.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/CloseButton.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Col.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Collapse.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Dropdown.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownDivider.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownItemText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownMenu.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/DropdownToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Fade.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Feedback.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FloatingLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Form.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/FormCheck.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckInput.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormCheckLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormControl.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormFloating.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormLabel.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormRange.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormSelect.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/FormText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Image.js +2 -2
- package/dist/node_modules/react-bootstrap/esm/Nav.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavItem.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavLink.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Navbar.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarBrand.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarText.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/NavbarToggle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Offcanvas.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasTitle.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/OffcanvasToggling.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/Toast.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastBody.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/ToastHeader.js +1 -1
- package/dist/node_modules/react-bootstrap/esm/divWithClassName.js +1 -1
- package/dist/node_modules/react-helmet-async/lib/index.esm.js +2 -2
- package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +2 -2
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +2 -2
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +7 -7
- package/dist/node_modules/victory-vendor/es/d3-scale.js +40 -40
- package/dist/styles/Currency.styles.d.ts +1 -1
- package/dist/styles/Dropdown.styles.d.ts +30 -29
- package/dist/styles/Dropdown.styles.js +18 -11
- package/dist/styles/Input.styles.d.ts +1 -1
- package/dist/styles/Scrollbar.styles.d.ts +1 -1
- package/dist/styles/StatusFeedback.styles.d.ts +7 -7
- package/dist/theme/theme.d.ts +1 -1
- package/package.json +2 -3
- package/dist/i18n/locales/ar.json.d.ts +0 -55
- package/dist/i18n/locales/en.json.d.ts +0 -55
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -324
- package/dist/node_modules/react-bootstrap/esm/Spinner.js +0 -26
- package/dist/theme/styled-components.d.ts +0 -5
package/dist/_virtual/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var a =
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as t } from "../node_modules/react-helmet-async/node_modules/react-fast-compare/index.js";
|
|
3
|
+
var a = t();
|
|
4
|
+
const m = /* @__PURE__ */ r(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
package/dist/_virtual/index2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/shallowequal/index.js";
|
|
3
|
+
var a = o();
|
|
4
|
+
const t = /* @__PURE__ */ r(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var a =
|
|
4
|
-
const
|
|
1
|
+
import { getDefaultExportFromCjs as s } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as r } from "../node_modules/classnames/index.js";
|
|
3
|
+
var a = r();
|
|
4
|
+
const t = /* @__PURE__ */ s(a);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
t as default
|
|
7
7
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as o } from "../node_modules/
|
|
3
|
-
var
|
|
4
|
-
const
|
|
2
|
+
import { __require as o } from "../node_modules/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AmountCellData, CellType } from './Table/Table.types';
|
|
2
|
-
import { TypographyProps } from './Typography';
|
|
1
|
+
import type { AmountCellData, CellType } from './Table/Table.types';
|
|
2
|
+
import { type TypographyProps } from './Typography';
|
|
3
3
|
type AmountItemProps = {
|
|
4
4
|
data: AmountCellData;
|
|
5
5
|
type?: CellType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BadgeVariant } from '
|
|
3
|
-
import { FontWeight } from '
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type BadgeVariant } from '@hooks/useBadgeVariant';
|
|
3
|
+
import type { FontWeight } from '@theme/theme';
|
|
4
4
|
export type BadgeProps = {
|
|
5
5
|
bgColor?: string;
|
|
6
6
|
color?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { type ButtonVariant } from '@hooks/useButtonVariant';
|
|
3
4
|
type ButtonSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
4
5
|
type ButtonType = 'button' | 'submit' | 'reset';
|
|
5
6
|
export type ButtonProps = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ButtonVariant } from 'react-bootstrap/esm/types';
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonVariant } from 'react-bootstrap/esm/types';
|
|
3
3
|
type cardListItem = {
|
|
4
4
|
primaryButtonTitle: string;
|
|
5
5
|
primaryButtonOnClick?: (item: cardListItem) => void;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { j as e } from "../../_virtual/jsx-runtime.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { useTheme as
|
|
3
|
+
import { useTheme as c } from "styled-components";
|
|
4
4
|
import h from "../../assets/svg/Riyal.svg.js";
|
|
5
5
|
import g from "../Image.js";
|
|
6
6
|
import i from "../Typography.js";
|
|
7
7
|
import { StyledLegendContainer as p, LegendRow as x, LegendName as j, LegendValue as u } from "./styles.js";
|
|
8
|
-
const C = ({ yColor:
|
|
9
|
-
const
|
|
8
|
+
const C = ({ yColor: s, yyColor: m, legendItems: n }) => {
|
|
9
|
+
const o = c();
|
|
10
10
|
if (n && n.length)
|
|
11
11
|
return /* @__PURE__ */ e.jsx(p, { children: n.map((r, t) => {
|
|
12
|
-
const l = r.showRiyal ?? !0, a = r.value,
|
|
12
|
+
const l = r.showRiyal ?? !0, a = r.value, d = r.color ?? (t === 1 ? m ?? s : s);
|
|
13
13
|
return /* @__PURE__ */ e.jsxs(x, { children: [
|
|
14
14
|
/* @__PURE__ */ e.jsxs(j, { children: [
|
|
15
|
-
/* @__PURE__ */ e.jsx("span", { className: "legend-dot", style: { background:
|
|
15
|
+
/* @__PURE__ */ e.jsx("span", { className: "legend-dot", style: { background: d } }),
|
|
16
16
|
/* @__PURE__ */ e.jsx(i, { variant: "mdText", weight: "semiBold", children: r.name })
|
|
17
17
|
] }),
|
|
18
18
|
/* @__PURE__ */ e.jsx(u, { children: a && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
19
|
-
l && /* @__PURE__ */ e.jsx(g, { src: h, style: { verticalAlign: "middle" }, width:
|
|
19
|
+
l && /* @__PURE__ */ e.jsx(g, { src: h, style: { verticalAlign: "middle" }, width: o.spacing.sm, height: o.spacing.sm }),
|
|
20
20
|
/* @__PURE__ */ e.jsx(i, { variant: "mdText", children: a })
|
|
21
21
|
] }) })
|
|
22
22
|
] }, `${r.name}-${t}`);
|
|
23
23
|
}) });
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
|
-
C as ChartLegend
|
|
26
|
+
C as ChartLegend,
|
|
27
|
+
C as default
|
|
27
28
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare const StyledLegendContainer: import(
|
|
2
|
-
export declare const PieLegendContainer: import(
|
|
3
|
-
export declare const LegendRow: import(
|
|
4
|
-
export declare const LegendName: import(
|
|
5
|
-
export declare const LegendValue: import(
|
|
1
|
+
export declare const StyledLegendContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const PieLegendContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const LegendRow: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
|
+
export declare const LegendName: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
5
|
+
export declare const LegendValue: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -4,7 +4,7 @@ import { useTranslation as te } from "react-i18next";
|
|
|
4
4
|
import { FaRegCalendarAlt as oe, FaAngleDown as ne, FaAngleLeft as se } from "../node_modules/react-icons/fa/index.js";
|
|
5
5
|
import i, { useTheme as ie } from "styled-components";
|
|
6
6
|
import ae from "./Hint.js";
|
|
7
|
-
import {
|
|
7
|
+
import { formatDate as b } from "../node_modules/date-fns/format.js";
|
|
8
8
|
import { parse as le } from "../node_modules/date-fns/parse.js";
|
|
9
9
|
import { isBefore as L } from "../node_modules/date-fns/isBefore.js";
|
|
10
10
|
import { isAfter as z } from "../node_modules/date-fns/isAfter.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type DividerProps = {
|
|
2
2
|
marginVertical?: string;
|
|
3
3
|
};
|
|
4
|
-
declare const Divider: import(
|
|
5
|
-
ref?: ((instance: HTMLDivElement | null) => void | import(
|
|
4
|
+
declare const Divider: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
6
|
}>, DividerProps>, DividerProps>> & string;
|
|
7
7
|
export default Divider;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DropDownWithTableProps } from './DropDownWithTable.types';
|
|
1
|
+
import type { DropDownWithTableProps } from './DropDownWithTable.types';
|
|
2
2
|
declare const DropDownWithTable: <T extends Record<string, unknown>>(props: DropDownWithTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default DropDownWithTable;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as t } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import { useRef as g, useState as v, useCallback as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { FaTimes as k, FaAngleDown as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import { HelperTextWrapper as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import Ce from "
|
|
13
|
-
import
|
|
14
|
-
const
|
|
2
|
+
import { useRef as g, useState as v, useCallback as re, useEffect as D } from "react";
|
|
3
|
+
import { createPortal as oe } from "react-dom";
|
|
4
|
+
import { FaTimes as k, FaAngleDown as le } from "../../node_modules/react-icons/fa/index.js";
|
|
5
|
+
import { useTheme as ie } from "styled-components";
|
|
6
|
+
import { HelperTextWrapper as se } from "../PhoneInputField.js";
|
|
7
|
+
import ae from "../SearchBar.js";
|
|
8
|
+
import ce from "../Spinner.js";
|
|
9
|
+
import de from "../Typography.js";
|
|
10
|
+
import ue from "../../hooks/useZIndex.js";
|
|
11
|
+
import { useQaemaCoreTranslation as fe } from "../../i18n/i18n.js";
|
|
12
|
+
import { StyledDropDownContainer as me, StyledlabelContainer as he, StyledDropDown as pe, StyledDropDownToggle as xe, StyledDropDownTitle as Se, IconsContainer as je, StyledDropDownMenu as we, SearchContainer as ye, StyledOptionsContainer as ge, SpinnerRow as ve, SelectedTagsContainer as Ce, SelectedTag as be } from "../../styles/Dropdown.styles.js";
|
|
13
|
+
import De from "./Table/Table.js";
|
|
14
|
+
const Me = (d) => {
|
|
15
15
|
const {
|
|
16
16
|
label: T,
|
|
17
|
-
options:
|
|
18
|
-
placeholder:
|
|
17
|
+
options: R,
|
|
18
|
+
placeholder: P = "Select Something",
|
|
19
19
|
optional: W = !1,
|
|
20
20
|
error: s = "",
|
|
21
21
|
disabled: S = !1,
|
|
@@ -26,21 +26,22 @@ const He = (d) => {
|
|
|
26
26
|
icon: F,
|
|
27
27
|
allowSearch: H,
|
|
28
28
|
searchHandler: M,
|
|
29
|
-
searchPlaceholder:
|
|
29
|
+
searchPlaceholder: N,
|
|
30
30
|
onToggle: i,
|
|
31
31
|
multiSelect: f = !1,
|
|
32
|
-
isLoading:
|
|
32
|
+
isLoading: B = !1,
|
|
33
33
|
currentSelectedOptions: h = [],
|
|
34
|
-
isInteractive:
|
|
34
|
+
isInteractive: E = !1,
|
|
35
35
|
//Table related props
|
|
36
36
|
columns: A,
|
|
37
37
|
isTableHeadVisible: V = !1,
|
|
38
38
|
getDisplayValue: y,
|
|
39
|
-
isRowDisabled: Q
|
|
40
|
-
|
|
39
|
+
isRowDisabled: Q,
|
|
40
|
+
rowClassName: X
|
|
41
|
+
} = d, p = ie(), { t: I } = fe(), C = g(null), a = g(null), Y = g(null), Z = g(d.currentSelectedOptions !== void 0), [u, b] = v(!1), [q, G] = v(0), [L, J] = v({ top: 0, left: 0 }), [l, x] = v(h), O = F ?? /* @__PURE__ */ t.jsx(t.Fragment, {}), K = ue("dropdown"), m = re(() => {
|
|
41
42
|
if (a != null && a.current) {
|
|
42
43
|
const e = a.current.getBoundingClientRect();
|
|
43
|
-
|
|
44
|
+
G(a.current.offsetWidth / 16), J({
|
|
44
45
|
top: e.bottom + window.scrollY,
|
|
45
46
|
left: e.left + window.scrollX
|
|
46
47
|
});
|
|
@@ -49,24 +50,24 @@ const He = (d) => {
|
|
|
49
50
|
D(() => (u && (m(), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0)), () => {
|
|
50
51
|
window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
51
52
|
}), [u, m]), D(() => {
|
|
52
|
-
if (!
|
|
53
|
+
if (!Z.current) return;
|
|
53
54
|
(h.length !== l.length || h.some((n, o) => {
|
|
54
55
|
var c;
|
|
55
56
|
return n[r] !== ((c = l[o]) == null ? void 0 : c[r]);
|
|
56
57
|
})) && x(h);
|
|
57
58
|
}, [h]);
|
|
58
|
-
const
|
|
59
|
+
const U = (e, n, o, c = "default") => o ? p.colors.grey.n400 : e ? p.colors.state.error.n450 : n ? p.colors.primary.dark.n600 : c === "light-primary" ? p.colors.primary.purple.n450 : p.colors.grey.n300, $ = (e) => l.some((n) => typeof n == "object" && typeof e == "object" ? n[r] === e[r] : n.value === e.value), _ = (e) => {
|
|
59
60
|
if (f) {
|
|
60
|
-
const n =
|
|
61
|
+
const n = $(e);
|
|
61
62
|
let o;
|
|
62
63
|
n ? o = l.filter((c) => typeof c == "object" && typeof e == "object" ? c[r] !== e[r] : c.value !== e.value) : o = [...l, e], x(o), w(o);
|
|
63
64
|
} else
|
|
64
65
|
x([e]), w(e), b(!1), i == null || i(!1);
|
|
65
|
-
},
|
|
66
|
+
}, ee = (e) => {
|
|
66
67
|
const n = l.filter((o) => typeof o == "object" && typeof e == "object" ? o[r] !== e[r] : o.value !== e.value);
|
|
67
68
|
x(n), w(n);
|
|
68
|
-
},
|
|
69
|
-
if (e.length === 0) return
|
|
69
|
+
}, te = (e) => {
|
|
70
|
+
if (e.length === 0) return P;
|
|
70
71
|
if (!f) {
|
|
71
72
|
const n = e[0];
|
|
72
73
|
if (y)
|
|
@@ -76,7 +77,7 @@ const He = (d) => {
|
|
|
76
77
|
if (r)
|
|
77
78
|
return String(n == null ? void 0 : n[r]);
|
|
78
79
|
}
|
|
79
|
-
return `${e.length} ${
|
|
80
|
+
return `${e.length} ${I("SELECTED")}`;
|
|
80
81
|
};
|
|
81
82
|
D(() => {
|
|
82
83
|
const e = (n) => {
|
|
@@ -86,14 +87,14 @@ const He = (d) => {
|
|
|
86
87
|
document.removeEventListener("mousedown", e);
|
|
87
88
|
};
|
|
88
89
|
}, [u, i]);
|
|
89
|
-
const
|
|
90
|
-
return /* @__PURE__ */ t.jsxs(
|
|
91
|
-
T && /* @__PURE__ */ t.jsxs(
|
|
90
|
+
const ne = () => E || (s == null ? void 0 : s.length) === 0 ? null : /* @__PURE__ */ t.jsx(se, { error: s, children: s });
|
|
91
|
+
return /* @__PURE__ */ t.jsxs(me, { children: [
|
|
92
|
+
T && /* @__PURE__ */ t.jsxs(he, { children: [
|
|
92
93
|
/* @__PURE__ */ t.jsx("label", { children: T }),
|
|
93
|
-
W && /* @__PURE__ */ t.jsx("span", { children:
|
|
94
|
+
W && /* @__PURE__ */ t.jsx("span", { children: I("OPTIONAL") })
|
|
94
95
|
] }),
|
|
95
96
|
/* @__PURE__ */ t.jsxs(
|
|
96
|
-
|
|
97
|
+
pe,
|
|
97
98
|
{
|
|
98
99
|
show: u,
|
|
99
100
|
onToggle: () => {
|
|
@@ -102,20 +103,20 @@ const He = (d) => {
|
|
|
102
103
|
placement: "bottom-start",
|
|
103
104
|
autoClose: f ? "outside" : !0,
|
|
104
105
|
children: [
|
|
105
|
-
/* @__PURE__ */ t.jsx(
|
|
106
|
+
/* @__PURE__ */ t.jsx(xe, { disabled: S, ref: a, $valid: !s, $variant: d.variant || "default", children: /* @__PURE__ */ t.jsx(Se, { $valid: !s, $isInteractive: E, children: /* @__PURE__ */ t.jsxs("div", { className: "title-container", children: [
|
|
106
107
|
/* @__PURE__ */ t.jsxs("div", { className: "heading-container", children: [
|
|
107
|
-
z && typeof
|
|
108
|
+
z && typeof O == "function" && /* @__PURE__ */ t.jsx(O, {}),
|
|
108
109
|
/* @__PURE__ */ t.jsx(
|
|
109
|
-
|
|
110
|
+
de,
|
|
110
111
|
{
|
|
111
112
|
component: "span",
|
|
112
113
|
variant: "mdText",
|
|
113
|
-
color:
|
|
114
|
-
children:
|
|
114
|
+
color: U(s, l.length > 0, S, d.variant || "default"),
|
|
115
|
+
children: te(l)
|
|
115
116
|
}
|
|
116
117
|
)
|
|
117
118
|
] }),
|
|
118
|
-
/* @__PURE__ */ t.jsxs(
|
|
119
|
+
/* @__PURE__ */ t.jsxs(je, { children: [
|
|
119
120
|
!f && l.length > 0 && !S && /* @__PURE__ */ t.jsx(
|
|
120
121
|
k,
|
|
121
122
|
{
|
|
@@ -125,43 +126,47 @@ const He = (d) => {
|
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
),
|
|
128
|
-
!S && /* @__PURE__ */ t.jsx(
|
|
129
|
+
!S && /* @__PURE__ */ t.jsx(le, {})
|
|
129
130
|
] })
|
|
130
131
|
] }) }) }),
|
|
131
|
-
u &&
|
|
132
|
+
u && oe(
|
|
132
133
|
/* @__PURE__ */ t.jsxs(
|
|
133
|
-
|
|
134
|
+
we,
|
|
134
135
|
{
|
|
135
136
|
ref: C,
|
|
136
|
-
$menuWidth:
|
|
137
|
-
$zIndex:
|
|
137
|
+
$menuWidth: q,
|
|
138
|
+
$zIndex: K,
|
|
138
139
|
style: {
|
|
139
140
|
position: "fixed",
|
|
140
141
|
top: `${L.top}px`,
|
|
141
142
|
left: `${L.left}px`
|
|
142
143
|
},
|
|
143
144
|
children: [
|
|
144
|
-
H && /* @__PURE__ */ t.jsx(
|
|
145
|
-
/* @__PURE__ */ t.
|
|
146
|
-
|
|
145
|
+
H && /* @__PURE__ */ t.jsx(ye, { children: /* @__PURE__ */ t.jsx(ae, { placeholder: N, onSearch: M }) }),
|
|
146
|
+
/* @__PURE__ */ t.jsxs(
|
|
147
|
+
ge,
|
|
147
148
|
{
|
|
148
|
-
ref:
|
|
149
|
+
ref: Y,
|
|
149
150
|
onScroll: (e) => {
|
|
150
151
|
var n;
|
|
151
152
|
(n = d.onScroll) == null || n.call(d, e);
|
|
152
153
|
},
|
|
153
|
-
children:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ t.jsx(
|
|
156
|
+
De,
|
|
157
|
+
{
|
|
158
|
+
keyField: r,
|
|
159
|
+
data: R,
|
|
160
|
+
columns: A,
|
|
161
|
+
onRowClick: (e) => _(e),
|
|
162
|
+
isRowSelected: (e) => $(e),
|
|
163
|
+
isTableHeadVisible: V,
|
|
164
|
+
isRowDisabled: Q,
|
|
165
|
+
rowClassName: X
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
B && /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(ce, {}) })
|
|
169
|
+
]
|
|
165
170
|
}
|
|
166
171
|
)
|
|
167
172
|
]
|
|
@@ -172,13 +177,13 @@ const He = (d) => {
|
|
|
172
177
|
]
|
|
173
178
|
}
|
|
174
179
|
),
|
|
175
|
-
f && l.length > 0 && /* @__PURE__ */ t.jsx(
|
|
180
|
+
f && l.length > 0 && /* @__PURE__ */ t.jsx(Ce, { children: l.map((e) => /* @__PURE__ */ t.jsxs(be, { children: [
|
|
176
181
|
y ? y(e) : String(j ? e[j] : e[r]),
|
|
177
|
-
/* @__PURE__ */ t.jsx(k, { onClick: () =>
|
|
182
|
+
/* @__PURE__ */ t.jsx(k, { onClick: () => ee(e) })
|
|
178
183
|
] }, String(e[r]))) }),
|
|
179
|
-
|
|
184
|
+
ne()
|
|
180
185
|
] });
|
|
181
186
|
};
|
|
182
187
|
export {
|
|
183
|
-
|
|
188
|
+
Me as default
|
|
184
189
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TableColumn } from './Table/Table.types';
|
|
1
|
+
import type { TableColumn } from './Table/Table.types';
|
|
2
2
|
export interface DropDownWithTableProps<T extends Record<string, unknown>> {
|
|
3
3
|
label?: string;
|
|
4
4
|
options: T[];
|
|
@@ -25,4 +25,5 @@ export interface DropDownWithTableProps<T extends Record<string, unknown>> {
|
|
|
25
25
|
isTableHeadVisible?: boolean;
|
|
26
26
|
getDisplayValue?: (option: T) => string;
|
|
27
27
|
isRowDisabled?: (row: T) => boolean;
|
|
28
|
+
rowClassName?: (row: T, index: number) => string;
|
|
28
29
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TableProps } from './Table.types';
|
|
1
|
+
import type { TableProps } from './Table.types';
|
|
2
2
|
declare function Table<T extends Record<string, unknown>>({ columns, data, keyField, selectable, onRowSelect, rowActions, stickyHeader, loading, emptyStateMessage, pagination, onRowClick, rowClassName, isRowDisabled, breakpoint, alignHeader, isTableHeadVisible, isRowSelected: externalIsRowSelected, }: Readonly<TableProps<T>>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default Table;
|