@handijitcom/ui 3.6.0 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -36
- package/build/chat.cjs +3 -3
- package/build/chat.cjs.map +1 -1
- package/build/chat.css +1 -1
- package/build/chat.js +168 -160
- package/build/chat.js.map +1 -1
- package/build/components/Alert/index.cjs +1 -1
- package/build/components/Alert/index.cjs.map +1 -1
- package/build/components/Alert/index.d.cts +7 -0
- package/build/components/Alert/index.d.ts +7 -0
- package/build/components/Alert/index.js +32 -19
- package/build/components/Alert/index.js.map +1 -1
- package/build/components/Alert/style.css +1 -1
- package/build/components/AppShell/style.css +1 -1
- package/build/components/AppliedFilters/style.css +1 -1
- package/build/components/Chip/style.css +1 -1
- package/build/components/CommandPalette/style.css +1 -1
- package/build/components/Directory/style.css +1 -1
- package/build/components/EmptyState/style.css +1 -1
- package/build/components/FacetSection/index.cjs +1 -1
- package/build/components/FacetSection/index.cjs.map +1 -1
- package/build/components/FacetSection/index.js +145 -138
- package/build/components/FacetSection/index.js.map +1 -1
- package/build/components/FacetSection/style.css +1 -1
- package/build/components/FacetSidebar/index.cjs +1 -1
- package/build/components/FacetSidebar/index.cjs.map +1 -1
- package/build/components/FacetSidebar/index.js +22 -29
- package/build/components/FacetSidebar/index.js.map +1 -1
- package/build/components/Heading/index.cjs +2 -0
- package/build/components/Heading/index.cjs.map +1 -0
- package/build/components/Heading/index.d.cts +34 -0
- package/build/components/Heading/index.d.ts +34 -0
- package/build/components/Heading/index.js +44 -0
- package/build/components/Heading/index.js.map +1 -0
- package/build/components/Heading/style.css +1 -0
- package/build/components/MegaMenu/index.cjs +1 -1
- package/build/components/MegaMenu/index.cjs.map +1 -1
- package/build/components/MegaMenu/index.d.cts +5 -1
- package/build/components/MegaMenu/index.d.ts +5 -1
- package/build/components/MegaMenu/index.js +131 -111
- package/build/components/MegaMenu/index.js.map +1 -1
- package/build/components/MegaMenu/style.css +1 -1
- package/build/components/Modal/style.css +1 -1
- package/build/components/NotificationCenter/style.css +1 -1
- package/build/components/PageHeader/style.css +1 -1
- package/build/components/Price/index.cjs +1 -1
- package/build/components/Price/index.cjs.map +1 -1
- package/build/components/Price/index.d.cts +5 -1
- package/build/components/Price/index.d.ts +5 -1
- package/build/components/Price/index.js +31 -32
- package/build/components/Price/index.js.map +1 -1
- package/build/components/Price/style.css +1 -1
- package/build/components/Radio/style.css +1 -1
- package/build/components/SectionHeader/style.css +1 -1
- package/build/components/Stat/index.cjs +1 -1
- package/build/components/Stat/index.cjs.map +1 -1
- package/build/components/Stat/index.d.cts +7 -3
- package/build/components/Stat/index.d.ts +7 -3
- package/build/components/Stat/index.js +61 -66
- package/build/components/Stat/index.js.map +1 -1
- package/build/components/StatCard/StatDelta.cjs +2 -0
- package/build/components/StatCard/StatDelta.cjs.map +1 -0
- package/build/components/StatCard/StatDelta.d.cts +17 -0
- package/build/components/StatCard/StatDelta.d.ts +17 -0
- package/build/components/StatCard/StatDelta.js +45 -0
- package/build/components/StatCard/StatDelta.js.map +1 -0
- package/build/components/StatCard/index.cjs +2 -0
- package/build/components/StatCard/index.cjs.map +1 -0
- package/build/components/StatCard/index.d.cts +36 -0
- package/build/components/StatCard/index.d.ts +36 -0
- package/build/components/StatCard/index.js +60 -0
- package/build/components/StatCard/index.js.map +1 -0
- package/build/components/StatCard/style.css +1 -0
- package/build/components/Table/style.css +1 -1
- package/build/components/Tabs/index.cjs +1 -1
- package/build/components/Tabs/index.cjs.map +1 -1
- package/build/components/Tabs/index.d.cts +26 -1
- package/build/components/Tabs/index.d.ts +26 -1
- package/build/components/Tabs/index.js +140 -112
- package/build/components/Tabs/index.js.map +1 -1
- package/build/components/Tabs/style.css +1 -1
- package/build/components/Text/index.cjs +2 -0
- package/build/components/Text/index.cjs.map +1 -0
- package/build/components/Text/index.d.cts +49 -0
- package/build/components/Text/index.d.ts +49 -0
- package/build/components/Text/index.js +47 -0
- package/build/components/Text/index.js.map +1 -0
- package/build/components/Text/style.css +1 -0
- package/build/design/index.cjs +12 -2
- package/build/design/index.cjs.map +1 -1
- package/build/design/index.d.cts +1 -5
- package/build/design/index.d.mts +1 -5
- package/build/design/index.mjs +12 -2
- package/build/design/index.mjs.map +1 -1
- package/build/design/index.umd.cjs +1 -1
- package/build/design/index.umd.cjs.map +1 -1
- package/build/design/tokens.css +29 -4
- package/build/design/tokens.json +42 -2
- package/build/design/tokens.scss +55 -0
- package/build/helpers/text.helper.cjs +1 -1
- package/build/helpers/text.helper.cjs.map +1 -1
- package/build/helpers/text.helper.d.cts +5 -0
- package/build/helpers/text.helper.d.ts +5 -0
- package/build/helpers/text.helper.js +3 -2
- package/build/helpers/text.helper.js.map +1 -1
- package/build/index.cjs +1 -1
- package/build/index.d.cts +5 -2
- package/build/index.d.ts +5 -2
- package/build/index.js +169 -163
- package/build/index.js.map +1 -1
- package/build/scss/_mixins.scss +101 -13
- package/build/scss/_variables.scss +5 -1
- package/build/styles.css +24 -18
- package/build/types/chat/DescriptionList/index.d.cts +6 -0
- package/build/types/chat/DescriptionList/index.d.ts +6 -0
- package/build/types/stat.type.d.cts +2 -0
- package/build/types/stat.type.d.ts +2 -0
- package/package.json +31 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),r=require("react-bootstrap-icons"),o=require("../../helpers/class-name.helper.cjs"),a={default:{"alert":"ui-alert-gHI-9","alert__icon":"ui-alert__icon-DhiCT","alert__body":"ui-alert__body-52-z2","alert__text":"ui-alert__text-Slmxh","alert__title":"ui-alert__title-I8BAh","alert__content":"ui-alert__content-lhBEo","alert__action":"ui-alert__action-1mTje","alert--info":"ui-alert--info-lsAVw","alert--success":"ui-alert--success-RMJR6","alert--warning":"ui-alert--warning-Rkgln","alert--danger":"ui-alert--danger-9ei0Y","alert--inline":"ui-alert--inline-QAaJc"}},x={info:e.jsx(r.InfoCircleFill,{"aria-hidden":!0}),success:e.jsx(r.CheckCircleFill,{"aria-hidden":!0}),warning:e.jsx(r.ExclamationTriangleFill,{"aria-hidden":!0}),danger:e.jsx(r.XCircleFill,{"aria-hidden":!0})},_=({children:t,tone:l="info",title:i,action:s,variant:d="box",className:n,testId:c})=>e.jsxs("div",{className:o.cx(a.default.alert,a.default[`alert--${l}`],d==="inline"&&a.default["alert--inline"],n),role:l==="danger"||l==="warning"?"alert":void 0,"data-testid":c,children:[e.jsx("span",{className:a.default.alert__icon,children:x[l]}),e.jsxs("div",{className:a.default.alert__body,children:[e.jsxs("div",{className:a.default.alert__text,children:[i&&e.jsx("strong",{className:a.default.alert__title,children:i}),e.jsx("div",{className:a.default.alert__content,children:t})]}),s&&e.jsx("div",{className:a.default.alert__action,children:s})]})]}),f=u.memo(_);exports.default=f;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/Alert/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport {\n CheckCircleFill,\n ExclamationTriangleFill,\n InfoCircleFill,\n XCircleFill,\n} from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\ntype Props = {\n children: ReactNode;\n tone?: AlertTone;\n title?: string;\n /** Sağda gösterilen eylem (bağlantı veya düğme). */\n action?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** Her tona kendi ikonu; renk tek başına anlam taşımaz (WCAG 1.4.1). */\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: <InfoCircleFill aria-hidden />,\n success: <CheckCircleFill aria-hidden />,\n warning: <ExclamationTriangleFill aria-hidden />,\n danger: <XCircleFill aria-hidden />,\n};\n\n/** Bilgi / uyarı kutusu. */\nconst Alert: FC<Props> = ({
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/Alert/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport {\n CheckCircleFill,\n ExclamationTriangleFill,\n InfoCircleFill,\n XCircleFill,\n} from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * `box` (default) a tinted, framed box on the page or in a column. `inline` (3.7) the tint without\n * its frame and with tighter padding: a note INSIDE a card or a panel, where a framed box drew a\n * border inside a border.\n */\nexport type AlertVariant = 'box' | 'inline';\n\ntype Props = {\n children: ReactNode;\n tone?: AlertTone;\n title?: string;\n /** Sağda gösterilen eylem (bağlantı veya düğme). */\n action?: ReactNode;\n variant?: AlertVariant;\n className?: string;\n testId?: string;\n};\n\n/** Her tona kendi ikonu; renk tek başına anlam taşımaz (WCAG 1.4.1). */\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: <InfoCircleFill aria-hidden />,\n success: <CheckCircleFill aria-hidden />,\n warning: <ExclamationTriangleFill aria-hidden />,\n danger: <XCircleFill aria-hidden />,\n};\n\n/** Bilgi / uyarı kutusu. */\nconst Alert: FC<Props> = ({\n children,\n tone = 'info',\n title,\n action,\n variant = 'box',\n className,\n testId,\n}) => (\n <div\n className={cx(\n styles.alert,\n styles[`alert--${tone}`],\n variant === 'inline' && styles['alert--inline'],\n className,\n )}\n role={tone === 'danger' || tone === 'warning' ? 'alert' : undefined}\n data-testid={testId}\n >\n <span className={styles.alert__icon}>{ICONS[tone]}</span>\n\n {/*\n * 2.2: the action sits INSIDE the body, beside the text while there is room for both and under\n * it, aligned with the text, when there is not. As a third flex item it kept its width and\n * squeezed the text into a narrow column in a narrow container (a paywall card, a sidebar).\n */}\n <div className={styles.alert__body}>\n <div className={styles.alert__text}>\n {title && <strong className={styles.alert__title}>{title}</strong>}\n <div className={styles.alert__content}>{children}</div>\n </div>\n\n {action && <div className={styles.alert__action}>{action}</div>}\n </div>\n </div>\n);\n\nexport default /*#__PURE__*/ memo(Alert) as typeof Alert;\n"],"names":["ICONS","jsx","InfoCircleFill","CheckCircleFill","ExclamationTriangleFill","XCircleFill","Alert","children","tone","title","action","variant","className","testId","jsxs","cx","styles","index"],"mappings":"6RAkCMA,EAAsC,CAC1C,KAAMC,EAAAA,IAACC,EAAAA,eAAA,CAAe,cAAW,EAAA,CAAC,EAClC,QAASD,EAAAA,IAACE,EAAAA,gBAAA,CAAgB,cAAW,EAAA,CAAC,EACtC,QAASF,EAAAA,IAACG,EAAAA,wBAAA,CAAwB,cAAW,EAAA,CAAC,EAC9C,OAAQH,EAAAA,IAACI,EAAAA,YAAA,CAAY,cAAW,EAAA,CAAC,CACnC,EAGMC,EAAmB,CAAC,CACxB,SAAAC,EACA,KAAAC,EAAO,OACP,MAAAC,EACA,OAAAC,EACA,QAAAC,EAAU,MACV,UAAAC,EACA,OAAAC,CACF,IACEC,EAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,GACTC,EAAAA,QAAO,MACPA,EAAAA,QAAO,UAAUR,CAAI,EAAE,EACvBG,IAAY,UAAYK,EAAAA,QAAO,eAAe,EAC9CJ,CAAA,EAEF,KAAMJ,IAAS,UAAYA,IAAS,UAAY,QAAU,OAC1D,cAAaK,EAEb,SAAA,CAAAZ,MAAC,QAAK,UAAWe,EAAAA,QAAO,YAAc,SAAAhB,EAAMQ,CAAI,EAAE,EAOlDM,EAAAA,KAAC,MAAA,CAAI,UAAWE,EAAAA,QAAO,YACrB,SAAA,CAAAF,EAAAA,KAAC,MAAA,CAAI,UAAWE,EAAAA,QAAO,YACpB,SAAA,CAAAP,GAASR,EAAAA,IAAC,SAAA,CAAO,UAAWe,EAAAA,QAAO,aAAe,SAAAP,EAAM,EACzDR,EAAAA,IAAC,MAAA,CAAI,UAAWe,EAAAA,QAAO,eAAiB,SAAAT,CAAA,CAAS,CAAA,EACnD,EAECG,GAAUT,EAAAA,IAAC,MAAA,CAAI,UAAWe,EAAAA,QAAO,cAAgB,SAAAN,CAAA,CAAO,CAAA,CAAA,CAC3D,CAAA,CAAA,CACF,EAGFO,SAAkCX,CAAK"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
3
|
+
/**
|
|
4
|
+
* `box` (default) a tinted, framed box on the page or in a column. `inline` (3.7) the tint without
|
|
5
|
+
* its frame and with tighter padding: a note INSIDE a card or a panel, where a framed box drew a
|
|
6
|
+
* border inside a border.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertVariant = 'box' | 'inline';
|
|
3
9
|
type Props = {
|
|
4
10
|
children: ReactNode;
|
|
5
11
|
tone?: AlertTone;
|
|
6
12
|
title?: string;
|
|
7
13
|
/** Sağda gösterilen eylem (bağlantı veya düğme). */
|
|
8
14
|
action?: ReactNode;
|
|
15
|
+
variant?: AlertVariant;
|
|
9
16
|
className?: string;
|
|
10
17
|
testId?: string;
|
|
11
18
|
};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
export type AlertTone = 'info' | 'success' | 'warning' | 'danger';
|
|
3
|
+
/**
|
|
4
|
+
* `box` (default) a tinted, framed box on the page or in a column. `inline` (3.7) the tint without
|
|
5
|
+
* its frame and with tighter padding: a note INSIDE a card or a panel, where a framed box drew a
|
|
6
|
+
* border inside a border.
|
|
7
|
+
*/
|
|
8
|
+
export type AlertVariant = 'box' | 'inline';
|
|
3
9
|
type Props = {
|
|
4
10
|
children: ReactNode;
|
|
5
11
|
tone?: AlertTone;
|
|
6
12
|
title?: string;
|
|
7
13
|
/** Sağda gösterilen eylem (bağlantı veya düğme). */
|
|
8
14
|
action?: ReactNode;
|
|
15
|
+
variant?: AlertVariant;
|
|
9
16
|
className?: string;
|
|
10
17
|
testId?: string;
|
|
11
18
|
};
|
|
@@ -1,32 +1,45 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { XCircleFill as
|
|
4
|
-
import { cx as
|
|
5
|
-
const e = {"alert":"ui-alert-gHI-9","alert__icon":"ui-alert__icon-DhiCT","alert__body":"ui-alert__body-52-z2","alert__text":"ui-alert__text-Slmxh","alert__title":"ui-alert__title-I8BAh","alert__content":"ui-alert__content-lhBEo","alert__action":"ui-alert__action-1mTje","alert--info":"ui-alert--info-lsAVw","alert--success":"ui-alert--success-RMJR6","alert--warning":"ui-alert--warning-Rkgln","alert--danger":"ui-alert--danger-9ei0Y"};
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as o } from "react";
|
|
3
|
+
import { XCircleFill as m, ExclamationTriangleFill as _, CheckCircleFill as h, InfoCircleFill as f } from "react-bootstrap-icons";
|
|
4
|
+
import { cx as x } from "../../helpers/class-name.helper.js";
|
|
5
|
+
const e = {"alert":"ui-alert-gHI-9","alert__icon":"ui-alert__icon-DhiCT","alert__body":"ui-alert__body-52-z2","alert__text":"ui-alert__text-Slmxh","alert__title":"ui-alert__title-I8BAh","alert__content":"ui-alert__content-lhBEo","alert__action":"ui-alert__action-1mTje","alert--info":"ui-alert--info-lsAVw","alert--success":"ui-alert--success-RMJR6","alert--warning":"ui-alert--warning-Rkgln","alert--danger":"ui-alert--danger-9ei0Y","alert--inline":"ui-alert--inline-QAaJc"};
|
|
6
6
|
const N = {
|
|
7
|
-
info: /* @__PURE__ */ r(
|
|
8
|
-
success: /* @__PURE__ */ r(
|
|
9
|
-
warning: /* @__PURE__ */ r(
|
|
10
|
-
danger: /* @__PURE__ */ r(
|
|
11
|
-
}, p = ({
|
|
7
|
+
info: /* @__PURE__ */ r(f, { "aria-hidden": !0 }),
|
|
8
|
+
success: /* @__PURE__ */ r(h, { "aria-hidden": !0 }),
|
|
9
|
+
warning: /* @__PURE__ */ r(_, { "aria-hidden": !0 }),
|
|
10
|
+
danger: /* @__PURE__ */ r(m, { "aria-hidden": !0 })
|
|
11
|
+
}, p = ({
|
|
12
|
+
children: n,
|
|
13
|
+
tone: i = "info",
|
|
14
|
+
title: l,
|
|
15
|
+
action: t,
|
|
16
|
+
variant: s = "box",
|
|
17
|
+
className: d,
|
|
18
|
+
testId: c
|
|
19
|
+
}) => /* @__PURE__ */ a(
|
|
12
20
|
"div",
|
|
13
21
|
{
|
|
14
|
-
className:
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
className: x(
|
|
23
|
+
e.alert,
|
|
24
|
+
e[`alert--${i}`],
|
|
25
|
+
s === "inline" && e["alert--inline"],
|
|
26
|
+
d
|
|
27
|
+
),
|
|
28
|
+
role: i === "danger" || i === "warning" ? "alert" : void 0,
|
|
29
|
+
"data-testid": c,
|
|
17
30
|
children: [
|
|
18
|
-
/* @__PURE__ */ r("span", { className: e.alert__icon, children: N[
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ r("span", { className: e.alert__icon, children: N[i] }),
|
|
32
|
+
/* @__PURE__ */ a("div", { className: e.alert__body, children: [
|
|
33
|
+
/* @__PURE__ */ a("div", { className: e.alert__text, children: [
|
|
21
34
|
l && /* @__PURE__ */ r("strong", { className: e.alert__title, children: l }),
|
|
22
|
-
/* @__PURE__ */ r("div", { className: e.alert__content, children:
|
|
35
|
+
/* @__PURE__ */ r("div", { className: e.alert__content, children: n })
|
|
23
36
|
] }),
|
|
24
37
|
t && /* @__PURE__ */ r("div", { className: e.alert__action, children: t })
|
|
25
38
|
] })
|
|
26
39
|
]
|
|
27
40
|
}
|
|
28
|
-
),
|
|
41
|
+
), b = /* @__PURE__ */ o(p);
|
|
29
42
|
export {
|
|
30
|
-
|
|
43
|
+
b as default
|
|
31
44
|
};
|
|
32
45
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Alert/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport {\n CheckCircleFill,\n ExclamationTriangleFill,\n InfoCircleFill,\n XCircleFill,\n} from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\ntype Props = {\n children: ReactNode;\n tone?: AlertTone;\n title?: string;\n /** Sağda gösterilen eylem (bağlantı veya düğme). */\n action?: ReactNode;\n className?: string;\n testId?: string;\n};\n\n/** Her tona kendi ikonu; renk tek başına anlam taşımaz (WCAG 1.4.1). */\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: <InfoCircleFill aria-hidden />,\n success: <CheckCircleFill aria-hidden />,\n warning: <ExclamationTriangleFill aria-hidden />,\n danger: <XCircleFill aria-hidden />,\n};\n\n/** Bilgi / uyarı kutusu. */\nconst Alert: FC<Props> = ({
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Alert/index.tsx"],"sourcesContent":["import { type FC, memo, type ReactNode } from 'react';\n\nimport {\n CheckCircleFill,\n ExclamationTriangleFill,\n InfoCircleFill,\n XCircleFill,\n} from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\n\nimport styles from './index.module.scss';\n\nexport type AlertTone = 'info' | 'success' | 'warning' | 'danger';\n\n/**\n * `box` (default) a tinted, framed box on the page or in a column. `inline` (3.7) the tint without\n * its frame and with tighter padding: a note INSIDE a card or a panel, where a framed box drew a\n * border inside a border.\n */\nexport type AlertVariant = 'box' | 'inline';\n\ntype Props = {\n children: ReactNode;\n tone?: AlertTone;\n title?: string;\n /** Sağda gösterilen eylem (bağlantı veya düğme). */\n action?: ReactNode;\n variant?: AlertVariant;\n className?: string;\n testId?: string;\n};\n\n/** Her tona kendi ikonu; renk tek başına anlam taşımaz (WCAG 1.4.1). */\nconst ICONS: Record<AlertTone, ReactNode> = {\n info: <InfoCircleFill aria-hidden />,\n success: <CheckCircleFill aria-hidden />,\n warning: <ExclamationTriangleFill aria-hidden />,\n danger: <XCircleFill aria-hidden />,\n};\n\n/** Bilgi / uyarı kutusu. */\nconst Alert: FC<Props> = ({\n children,\n tone = 'info',\n title,\n action,\n variant = 'box',\n className,\n testId,\n}) => (\n <div\n className={cx(\n styles.alert,\n styles[`alert--${tone}`],\n variant === 'inline' && styles['alert--inline'],\n className,\n )}\n role={tone === 'danger' || tone === 'warning' ? 'alert' : undefined}\n data-testid={testId}\n >\n <span className={styles.alert__icon}>{ICONS[tone]}</span>\n\n {/*\n * 2.2: the action sits INSIDE the body, beside the text while there is room for both and under\n * it, aligned with the text, when there is not. As a third flex item it kept its width and\n * squeezed the text into a narrow column in a narrow container (a paywall card, a sidebar).\n */}\n <div className={styles.alert__body}>\n <div className={styles.alert__text}>\n {title && <strong className={styles.alert__title}>{title}</strong>}\n <div className={styles.alert__content}>{children}</div>\n </div>\n\n {action && <div className={styles.alert__action}>{action}</div>}\n </div>\n </div>\n);\n\nexport default /*#__PURE__*/ memo(Alert) as typeof Alert;\n"],"names":["ICONS","jsx","InfoCircleFill","CheckCircleFill","ExclamationTriangleFill","XCircleFill","Alert","children","tone","title","action","variant","className","testId","jsxs","cx","styles","index"],"mappings":";;;;;AAkCA,MAAMA,IAAsC;AAAA,EAC1C,MAAM,gBAAAC,EAACC,GAAA,EAAe,eAAW,GAAA,CAAC;AAAA,EAClC,SAAS,gBAAAD,EAACE,GAAA,EAAgB,eAAW,GAAA,CAAC;AAAA,EACtC,SAAS,gBAAAF,EAACG,GAAA,EAAwB,eAAW,GAAA,CAAC;AAAA,EAC9C,QAAQ,gBAAAH,EAACI,GAAA,EAAY,eAAW,GAAA,CAAC;AACnC,GAGMC,IAAmB,CAAC;AAAA,EACxB,UAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,QAAAC;AACF,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACTC,EAAO;AAAA,MACPA,EAAO,UAAUR,CAAI,EAAE;AAAA,MACvBG,MAAY,YAAYK,EAAO,eAAe;AAAA,MAC9CJ;AAAA,IAAA;AAAA,IAEF,MAAMJ,MAAS,YAAYA,MAAS,YAAY,UAAU;AAAA,IAC1D,eAAaK;AAAA,IAEb,UAAA;AAAA,MAAA,gBAAAZ,EAAC,UAAK,WAAWe,EAAO,aAAc,UAAAhB,EAAMQ,CAAI,GAAE;AAAA,MAOlD,gBAAAM,EAAC,OAAA,EAAI,WAAWE,EAAO,aACrB,UAAA;AAAA,QAAA,gBAAAF,EAAC,OAAA,EAAI,WAAWE,EAAO,aACpB,UAAA;AAAA,UAAAP,KAAS,gBAAAR,EAAC,UAAA,EAAO,WAAWe,EAAO,cAAe,UAAAP,GAAM;AAAA,UACzD,gBAAAR,EAAC,OAAA,EAAI,WAAWe,EAAO,gBAAiB,UAAAT,EAAA,CAAS;AAAA,QAAA,GACnD;AAAA,QAECG,KAAU,gBAAAT,EAAC,OAAA,EAAI,WAAWe,EAAO,eAAgB,UAAAN,EAAA,CAAO;AAAA,MAAA,EAAA,CAC3D;AAAA,IAAA;AAAA,EAAA;AACF,GAGFO,sBAAkCX,CAAK;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-alert-gHI-9{display:flex;align-items:flex-start;gap:var(--hd-space-3);padding:var(--hd-space-4);border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-alert__icon-DhiCT{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border-radius:var(--hd-radius-xs);font-size:20px}.ui-alert__body-52-z2{display:flex;flex:1;flex-wrap:wrap;align-items:flex-start;gap:var(--hd-space-2) var(--hd-space-3);min-width:0}.ui-alert__text-Slmxh{display:flex;flex-direction:column;gap:var(--hd-space-1);flex:1 1 16rem;min-width:0;padding-top:3px}.ui-alert__title-I8BAh{font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);color:inherit}.ui-alert__content-lhBEo{line-height:var(--hd-type-body-line-height);color:inherit;max-width:68ch}.ui-alert__content-lhBEo a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:var(--hd-font-weight-semibold)}.ui-alert__content-lhBEo strong{font-weight:var(--hd-font-weight-semibold)}.ui-alert__action-1mTje{flex:0 0 auto;max-width:100%}.ui-alert--info-lsAVw,.ui-alert--success-RMJR6{background-color:var(--hd-info-bg);border:1px solid var(--hd-info-line);color:var(--hd-info-fg)}.ui-alert--warning-Rkgln{background-color:var(--hd-bg-raised);border:1px solid var(--hd-border-strong);color:var(--hd-text)}.ui-alert--danger-9ei0Y{background-color:var(--hd-danger-bg);border:1px solid var(--hd-danger-line);color:var(--hd-danger-fg)}}
|
|
1
|
+
@layer ui{.ui-alert-gHI-9{display:flex;align-items:flex-start;gap:var(--hd-space-3);padding:var(--hd-space-4);border-radius:var(--hd-radius-sm);font-size:var(--hd-type-small-size)}.ui-alert__icon-DhiCT{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex-shrink:0;border-radius:var(--hd-radius-xs);font-size:20px}.ui-alert__body-52-z2{display:flex;flex:1;flex-wrap:wrap;align-items:flex-start;gap:var(--hd-space-2) var(--hd-space-3);min-width:0}.ui-alert__text-Slmxh{display:flex;flex-direction:column;gap:var(--hd-space-1);flex:1 1 16rem;min-width:0;padding-top:3px}.ui-alert__title-I8BAh{font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);color:inherit}.ui-alert__content-lhBEo{line-height:var(--hd-type-body-line-height);color:inherit;max-width:68ch}.ui-alert__content-lhBEo a{color:inherit;text-decoration:underline;text-underline-offset:2px;font-weight:var(--hd-font-weight-semibold)}.ui-alert__content-lhBEo strong{font-weight:var(--hd-font-weight-semibold)}.ui-alert__action-1mTje{flex:0 0 auto;max-width:100%}.ui-alert--info-lsAVw,.ui-alert--success-RMJR6{background-color:var(--hd-info-bg);border:1px solid var(--hd-info-line);color:var(--hd-info-fg)}.ui-alert--warning-Rkgln{background-color:var(--hd-bg-raised);border:1px solid var(--hd-border-strong);color:var(--hd-text)}.ui-alert--danger-9ei0Y{background-color:var(--hd-danger-bg);border:1px solid var(--hd-danger-line);color:var(--hd-danger-fg)}.ui-alert--inline-QAaJc{gap:var(--hd-space-2);padding:var(--hd-space-3);border-color:transparent}.ui-alert--inline-QAaJc .ui-alert__icon-DhiCT{width:20px;height:20px;font-size:16px}.ui-alert--inline-QAaJc .ui-alert__text-Slmxh{padding-top:0}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{:root:has(.ui-shell-DdJz9){--app-sidebar-width: 232px}:root:has(.ui-shell--collapsed-mBfej){--app-sidebar-width: 56px}@media (max-width: 1024px){:root:has(.ui-shell-DdJz9){--app-sidebar-width: 0px}}.ui-srOnly--wftu{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell-DdJz9{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100dvh;background-color:var(--hd-bg-page);color:var(--hd-text);transition:grid-template-columns var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell-DdJz9{transition:none}}@media (max-width: 1024px){.ui-shell-DdJz9{grid-template-columns:minmax(0,1fr)}}.ui-shell--collapsed-mBfej{grid-template-columns:56px minmax(0,1fr)}@media (max-width: 1024px){.ui-shell--collapsed-mBfej{grid-template-columns:minmax(0,1fr)}}.ui-shell__skip-hqzkw{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell__skip-hqzkw:focus-visible{position:fixed;inset-block-start:var(--hd-space-2);inset-inline-start:var(--hd-space-2);z-index:var(--hd-z-tooltip);width:auto;height:auto;margin:0;padding:var(--hd-space-2) var(--hd-space-3);overflow:visible;clip-path:none;white-space:nowrap;border-radius:var(--hd-radius-sm);background-color:var(--hd-bg-raised);box-shadow:var(--hd-shadow-2);color:var(--hd-primary-text);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);text-decoration:none;outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-shell__sidebar-59ryl{min-width:0;border-inline-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 1024px){.ui-shell__sidebar-59ryl{display:none}}.ui-shell__sidebar-inner-iIXhF{position:sticky;inset-block-start:0;display:flex;flex-direction:column;height:100dvh}.ui-shell__brand-Mph-k{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;min-height:52px;padding-inline:var(--hd-space-4);overflow:hidden;border-block-end:1px solid var(--hd-border);font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__brand-Mph-k :where(a),.ui-shell__brand-Mph-k :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__brand-Mph-k :where(svg){flex-shrink:0}.ui-shell__navigation-quAVK{position:relative;flex:1;min-height:0;overflow-y:auto;padding:var(--hd-space-3) var(--hd-space-2);scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar{width:8px;height:8px}.ui-shell__navigation-quAVK::-webkit-scrollbar-track{background:transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-shell__footer-gGr9S{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;justify-content:flex-end;padding:var(--hd-space-2);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__footer-gGr9S{flex-direction:column;justify-content:center}.ui-shell--collapsed-mBfej .ui-shell__brand-Mph-k{justify-content:center;padding-inline:var(--hd-space-2)}[dir=rtl] .ui-shell__toggle--vukn{transform:scaleX(-1)}.ui-shell__toggle--vukn{transition:rotate var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell__toggle--vukn{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__toggle--vukn{rotate:180deg}.ui-shell__frame-4Cwe2{display:flex;flex-direction:column;min-width:0}.ui-shell__topbar-HH2s0{display:flex;align-items:center;gap:var(--hd-space-3);position:sticky;inset-block-start:0;z-index:var(--hd-z-sticky);min-height:52px;padding-inline:var(--hd-space-4);border-block-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 640px){.ui-shell__topbar-HH2s0{gap:var(--hd-space-2);padding-inline:var(--hd-space-3)}}.ui-shell__menu-button-8CeT4{display:none}@media (max-width: 1024px){.ui-shell__menu-button-8CeT4{display:inline-flex}}.ui-shell__title--Z5jA{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;min-width:0}.ui-shell__search-4Tij9{flex:1 1 auto;min-width:0;max-width:480px}.ui-shell__actions-RU34x{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;margin-inline-start:auto}.ui-shell__content-nbbhQ{flex:1;min-width:0;padding:var(--hd-space-6)}.ui-shell__content-nbbhQ:focus{outline:none}@media (max-width: 1024px){.ui-shell__content-nbbhQ{padding:var(--hd-space-4)}}.ui-shell__drawer-brand-3MgNr{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__drawer-brand-3MgNr :where(a),.ui-shell__drawer-brand-3MgNr :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__drawer-brand-3MgNr :where(svg){flex-shrink:0}.ui-shell__drawer-brand-3MgNr{margin-block-end:var(--hd-space-3)}.ui-nav-3I7Ws{display:flex;flex-direction:column;gap:var(--hd-space-4)}.ui-nav__section-label-0CMnM{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);letter-spacing:.045em;text-transform:uppercase;color:var(--hd-text-2);margin:0;padding:0 var(--hd-space-3) var(--hd-space-1);color:var(--hd-text-3)}.ui-nav__list-Wotlu,.ui-nav__sublist-8ut6O{display:flex;flex-direction:column;gap:var(--hd-space-0);margin:0;padding:0;list-style:none}.ui-nav__sublist-8ut6O{margin-inline-start:calc(var(--hd-space-3) + 18px / 2);padding-inline-start:var(--hd-space-2);border-inline-start:1px solid var(--hd-border)}.ui-nav__sublist-8ut6O[hidden]{display:none}.ui-nav__item-RvDle{display:flex;align-items:center;gap:var(--hd-space-2);background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__item-RvDle:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-nav__item-RvDle{transition:none}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-nav__item-RvDle:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-nav__item-RvDle{position:relative;width:100%;min-height:36px;padding:0 var(--hd-space-3);border:0;border-radius:var(--hd-radius-sm);color:var(--hd-text-2);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);line-height:var(--hd-type-h4-line-height);text-align:start;text-decoration:none;cursor:pointer}.ui-nav__item-RvDle:hover{color:var(--hd-text)}@media (hover: none) and (pointer: coarse){.ui-nav__item-RvDle{min-height:44px}}.ui-nav__item--active-Lg028{background-color:var(--hd-primary-soft);color:var(--hd-primary-text);font-weight:var(--hd-font-weight-semibold)}.ui-nav__item--active-Lg028:hover:not(:disabled){background-color:var(--hd-primary-soft-hover);color:var(--hd-primary-text)}.ui-nav__item--disabled-CcOTO{color:var(--hd-text-3)}@media (forced-colors: active){.ui-nav__item--disabled-CcOTO{color:GrayText}}.ui-nav__item--disabled-CcOTO{cursor:default}.ui-nav__item--disabled-CcOTO:hover{background-color:transparent;color:var(--hd-text-3)}.ui-nav__icon-NVN6X{display:inline-flex;flex-shrink:0;font-size:18px}.ui-nav__label-nlEMg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.ui-nav__badge-aR8RE{flex-shrink:0;min-width:18px;height:18px;padding-inline:var(--hd-space-1);border-radius:var(--hd-radius-pill);background-color:var(--hd-primary);color:var(--hd-on-primary);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);line-height:18px;text-align:center;font-variant-numeric:tabular-nums;box-sizing:border-box}@media (forced-colors: active){.ui-nav__badge-aR8RE{border:1px solid CanvasText}}.ui-nav__chevron-ZrqW9{flex-shrink:0;font-size:14px;transition:rotate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__chevron--open-56sZo{rotate:180deg}@media (prefers-reduced-motion: reduce){.ui-nav__chevron-ZrqW9{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-label-0CMnM,.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__label-nlEMg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-hkG3J+.ui-nav__section-hkG3J{padding-block-start:var(--hd-space-3);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__item-RvDle{justify-content:center;padding:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__chevron-ZrqW9{display:none}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__badge-aR8RE{position:absolute;inset-block-start:2px;inset-inline-end:2px;min-width:14px;height:14px;padding-inline:3px;font-size:10px;line-height:14px}@media print{.ui-shell-DdJz9,.ui-shell--collapsed-mBfej{display:block;min-height:0;background:none}.ui-shell__skip-hqzkw,.ui-shell__sidebar-59ryl,.ui-shell__topbar-HH2s0{display:none}.ui-shell__content-nbbhQ{padding:0}}}
|
|
1
|
+
@layer ui{:root:has(.ui-shell-DdJz9){--app-sidebar-width: 232px}:root:has(.ui-shell--collapsed-mBfej){--app-sidebar-width: 56px}@media (max-width: 1024px){:root:has(.ui-shell-DdJz9){--app-sidebar-width: 0px}}.ui-srOnly--wftu{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell-DdJz9{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100dvh;background-color:var(--hd-bg-page);color:var(--hd-text);transition:grid-template-columns var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell-DdJz9{transition:none}}@media (max-width: 1024px){.ui-shell-DdJz9{grid-template-columns:minmax(0,1fr)}}.ui-shell--collapsed-mBfej{grid-template-columns:56px minmax(0,1fr)}@media (max-width: 1024px){.ui-shell--collapsed-mBfej{grid-template-columns:minmax(0,1fr)}}.ui-shell__skip-hqzkw{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell__skip-hqzkw:focus-visible{position:fixed;inset-block-start:var(--hd-space-2);inset-inline-start:var(--hd-space-2);z-index:var(--hd-z-tooltip);width:auto;height:auto;margin:0;padding:var(--hd-space-2) var(--hd-space-3);overflow:visible;clip-path:none;white-space:nowrap;border-radius:var(--hd-radius-sm);background-color:var(--hd-bg-raised);box-shadow:var(--hd-shadow-2);color:var(--hd-primary-text);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);text-decoration:none;outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-shell__sidebar-59ryl{min-width:0;border-inline-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 1024px){.ui-shell__sidebar-59ryl{display:none}}.ui-shell__sidebar-inner-iIXhF{position:sticky;inset-block-start:0;display:flex;flex-direction:column;height:100dvh}.ui-shell__brand-Mph-k{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;min-height:52px;padding-inline:var(--hd-space-4);overflow:hidden;border-block-end:1px solid var(--hd-border);font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__brand-Mph-k :where(a),.ui-shell__brand-Mph-k :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__brand-Mph-k :where(svg){flex-shrink:0}.ui-shell__navigation-quAVK{position:relative;flex:1;min-height:0;overflow-y:auto;padding:var(--hd-space-3) var(--hd-space-2);scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar{width:8px;height:8px}.ui-shell__navigation-quAVK::-webkit-scrollbar-track{background:transparent}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-shell__navigation-quAVK::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-shell__footer-gGr9S{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;justify-content:flex-end;padding:var(--hd-space-2);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__footer-gGr9S{flex-direction:column;justify-content:center}.ui-shell--collapsed-mBfej .ui-shell__brand-Mph-k{justify-content:center;padding-inline:var(--hd-space-2)}[dir=rtl] .ui-shell__toggle--vukn{transform:scaleX(-1)}.ui-shell__toggle--vukn{transition:rotate var(--hd-duration-base) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-shell__toggle--vukn{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__toggle--vukn{rotate:180deg}.ui-shell__frame-4Cwe2{display:flex;flex-direction:column;min-width:0}.ui-shell__topbar-HH2s0{display:flex;align-items:center;gap:var(--hd-space-3);position:sticky;inset-block-start:0;z-index:var(--hd-z-sticky);min-height:52px;padding-inline:var(--hd-space-4);border-block-end:1px solid var(--hd-border);background-color:var(--hd-bg-surface)}@media (max-width: 640px){.ui-shell__topbar-HH2s0{gap:var(--hd-space-2);padding-inline:var(--hd-space-3)}}.ui-shell__menu-button-8CeT4{display:none}@media (max-width: 1024px){.ui-shell__menu-button-8CeT4{display:inline-flex}}.ui-shell__title--Z5jA{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;min-width:0}.ui-shell__search-4Tij9{flex:1 1 auto;min-width:0;max-width:480px}.ui-shell__actions-RU34x{display:flex;align-items:center;gap:var(--hd-space-2);flex-shrink:0;margin-inline-start:auto}.ui-shell__content-nbbhQ{flex:1;min-width:0;padding:var(--hd-space-6)}.ui-shell__content-nbbhQ:focus{outline:none}@media (max-width: 1024px){.ui-shell__content-nbbhQ{padding:var(--hd-space-4)}}.ui-shell__drawer-brand-3MgNr{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-shell__drawer-brand-3MgNr :where(a),.ui-shell__drawer-brand-3MgNr :where(a)>:where(span){display:inline-flex;align-items:center;gap:var(--hd-space-2);min-width:0}.ui-shell__drawer-brand-3MgNr :where(svg){flex-shrink:0}.ui-shell__drawer-brand-3MgNr{margin-block-end:var(--hd-space-3)}.ui-nav-3I7Ws{display:flex;flex-direction:column;gap:var(--hd-space-4)}.ui-nav__section-label-0CMnM{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:var(--ui-overline-tracking, normal);text-transform:var(--ui-overline-transform, none);color:var(--hd-text-2);margin:0;padding:0 var(--hd-space-3) var(--hd-space-1);color:var(--hd-text-3)}.ui-nav__list-Wotlu,.ui-nav__sublist-8ut6O{display:flex;flex-direction:column;gap:var(--hd-space-0);margin:0;padding:0;list-style:none}.ui-nav__sublist-8ut6O{margin-inline-start:calc(var(--hd-space-3) + 18px / 2);padding-inline-start:var(--hd-space-2);border-inline-start:1px solid var(--hd-border)}.ui-nav__sublist-8ut6O[hidden]{display:none}.ui-nav__item-RvDle{display:flex;align-items:center;gap:var(--hd-space-2);background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__item-RvDle:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-nav__item-RvDle{transition:none}.ui-nav__item-RvDle:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-nav__item-RvDle:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-nav__item-RvDle{position:relative;width:100%;min-height:36px;padding:0 var(--hd-space-3);border:0;border-radius:var(--hd-radius-sm);color:var(--hd-text-2);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-medium);line-height:var(--hd-type-h4-line-height);text-align:start;text-decoration:none;cursor:pointer}.ui-nav__item-RvDle:hover{color:var(--hd-text)}@media (hover: none) and (pointer: coarse){.ui-nav__item-RvDle{min-height:44px}}.ui-nav__item-RvDle:after{content:"";position:absolute;background-color:transparent;border-radius:0;pointer-events:none;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard);inset-block:var(--hd-space-1);inset-inline-start:0;width:2px}.ui-nav__item--active-Lg028:after{background-color:var(--hd-primary)}@media (forced-colors: active){.ui-nav__item--active-Lg028:after{background-color:Highlight}}.ui-nav__item--active-Lg028{background-color:var(--hd-primary-soft);color:var(--hd-primary-text);font-weight:var(--hd-font-weight-semibold)}.ui-nav__item--active-Lg028:hover:not(:disabled){background-color:var(--hd-primary-soft-hover);color:var(--hd-primary-text)}.ui-nav__item--disabled-CcOTO{color:var(--hd-text-3)}@media (forced-colors: active){.ui-nav__item--disabled-CcOTO{color:GrayText}}.ui-nav__item--disabled-CcOTO{cursor:default}.ui-nav__item--disabled-CcOTO:hover{background-color:transparent;color:var(--hd-text-3)}.ui-nav__icon-NVN6X{display:inline-flex;flex-shrink:0;font-size:18px}.ui-nav__label-nlEMg{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.ui-nav__badge-aR8RE{flex-shrink:0;min-width:18px;height:18px;padding-inline:var(--hd-space-1);border-radius:var(--hd-radius-pill);background-color:var(--hd-primary);color:var(--hd-on-primary);font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);line-height:18px;text-align:center;font-variant-numeric:tabular-nums;box-sizing:border-box}@media (forced-colors: active){.ui-nav__badge-aR8RE{border:1px solid CanvasText}}.ui-nav__chevron-ZrqW9{flex-shrink:0;font-size:14px;transition:rotate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-nav__chevron--open-56sZo{rotate:180deg}@media (prefers-reduced-motion: reduce){.ui-nav__chevron-ZrqW9{transition:none}}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-label-0CMnM,.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__label-nlEMg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__section-hkG3J+.ui-nav__section-hkG3J{padding-block-start:var(--hd-space-3);border-block-start:1px solid var(--hd-border)}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__item-RvDle{justify-content:center;padding:0}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__chevron-ZrqW9{display:none}.ui-shell--collapsed-mBfej .ui-shell__sidebar-59ryl .ui-nav__badge-aR8RE{position:absolute;inset-block-start:2px;inset-inline-end:2px;min-width:14px;height:14px;padding-inline:3px;font-size:10px;line-height:14px}@media print{.ui-shell-DdJz9,.ui-shell--collapsed-mBfej{display:block;min-height:0;background:none}.ui-shell__skip-hqzkw,.ui-shell__sidebar-59ryl,.ui-shell__topbar-HH2s0{display:none}.ui-shell__content-nbbhQ{padding:0}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-applied-PjuWH{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-2);padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-raised)}@media (max-width: 640px){.ui-applied-PjuWH{flex-direction:column;align-items:stretch;padding:var(--hd-space-3)}}.ui-applied__lead-A6FkV{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-
|
|
1
|
+
@layer ui{.ui-applied-PjuWH{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-2);padding:var(--hd-space-3) var(--hd-space-4);border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-raised)}@media (max-width: 640px){.ui-applied-PjuWH{flex-direction:column;align-items:stretch;padding:var(--hd-space-3)}}.ui-applied__lead-A6FkV{font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:var(--ui-overline-tracking, normal);text-transform:var(--ui-overline-transform, none);color:var(--hd-text-2);flex-shrink:0;margin-inline-end:var(--hd-space-1)}.ui-applied__lead-A6FkV:focus{outline:none}.ui-applied__list-4APk5{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-2);flex:1;min-width:0;margin:0;padding:0;list-style:none}.ui-applied__chip-DmkZy{max-width:100%}.ui-applied__group-xPW72{margin-inline-end:var(--hd-space-1);color:var(--hd-text-2)}.ui-applied__value-1MDBf{font-weight:var(--hd-font-weight-semibold);color:var(--hd-text)}.ui-applied__extra-gCUen{font-size:var(--hd-type-caption-size);color:var(--hd-text-2);font-variant-numeric:tabular-nums}.ui-applied__clear-xaCI4{flex-shrink:0;margin-inline-start:auto}@media (max-width: 640px){.ui-applied__clear-xaCI4{align-self:flex-start;margin-inline-start:0}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";@layer ui{.ui-chip--NLgU{position:relative}.ui-chip--NLgU:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-chip--NLgU{display:inline-flex;align-items:center;justify-content:center;gap:var(--hd-space-2);background-color:var(--ui-chip-bg, var(--hd-bg-surface));border:1px solid var(--ui-chip-line, var(--hd-border));border-radius:var(--ui-chip-radius, var(--hd-radius-sm));color:var(--ui-chip-fg, var(--hd-text-2));font-family:var(--hd-font-body);font-weight:var(--ui-chip-weight, var(--hd-font-weight-medium));line-height:1;white-space:nowrap;cursor:pointer;text-decoration:none;transition:border-color var(--hd-duration-fast) var(--hd-ease-standard),color var(--hd-duration-fast) var(--hd-ease-standard),background-color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-chip--NLgU:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-chip--NLgU:hover:not(:disabled){border-color:var(--hd-border-strong);color:var(--hd-text)}.ui-chip--NLgU:disabled{background-color:var(--hd-bg-raised);border-color:var(--hd-border);cursor:not-allowed;color:var(--hd-text-3)}@media (forced-colors: active){.ui-chip--NLgU:disabled{color:GrayText;border-color:GrayText}}.ui-chip--NLgU:disabled .ui-chip__icon-IjjSb,.ui-chip--NLgU:disabled .ui-chip__count-MBGO3{color:var(--hd-text-3)}@media (forced-colors: active){.ui-chip--NLgU:disabled .ui-chip__icon-IjjSb,.ui-chip--NLgU:disabled .ui-chip__count-MBGO3{color:GrayText}}@media (prefers-reduced-motion: reduce){.ui-chip--NLgU{transition:none}}.ui-chip__icon-IjjSb{display:inline-flex;align-items:center;flex-shrink:0;font-size:.92em;color:var(--hd-text-2);transition:color var(--hd-duration-fast) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-chip__icon-IjjSb{transition:none}}.ui-chip__label-cT4hw{overflow:hidden;text-overflow:ellipsis}.ui-chip__count-MBGO3{font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);color:var(--hd-text-3);font-variant-numeric:tabular-nums;flex-shrink:0}.ui-chip--sm-60H-S{font-size:var(--hd-type-caption-size);padding:var(--hd-space-2) var(--hd-space-3);min-height:32px}.ui-chip--md--yAlm{font-size:var(--hd-type-small-size);padding:var(--hd-space-2) var(--hd-space-4);min-height:40px}.ui-chip--iconOnly-5LT1h{gap:0}.ui-chip--iconOnly-5LT1h.ui-chip--sm-60H-S{width:32px;padding:0}.ui-chip--iconOnly-5LT1h.ui-chip--md--yAlm{width:40px;padding:0}.ui-chip--iconOnly-5LT1h .ui-chip__icon-IjjSb{font-size:1em}.ui-chip--selected-FdpCr{border-color:var(--ui-chip-selected-line, var(--hd-primary));color:var(--ui-chip-selected-fg, var(--hd-primary-text));background-color:var(--ui-chip-selected-bg, var(--hd-primary-soft));font-weight:var(--ui-chip-selected-weight, var(--hd-font-weight-semibold))}.ui-chip--selected-FdpCr .ui-chip__icon-IjjSb,.ui-chip--selected-FdpCr .ui-chip__count-MBGO3{color:var(--ui-chip-selected-fg, var(--hd-primary-text))}.ui-chip--selected-FdpCr:hover:not(:disabled){border-color:var(--ui-chip-selected-line, var(--hd-primary-hover));color:var(--ui-chip-selected-fg, var(--hd-primary-text));background-color:var(--ui-chip-selected-bg, var(--hd-primary-soft-hover))}.ui-chip--selected-FdpCr:disabled{border-color:var(--hd-text-3)}}
|
|
1
|
+
@charset "UTF-8";@layer ui{.ui-chip--NLgU{position:relative}.ui-chip--NLgU:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:max(100%,44px);height:max(100%,44px)}.ui-chip--NLgU{display:inline-flex;align-items:center;justify-content:center;gap:var(--hd-space-2);background-color:var(--ui-chip-bg, var(--hd-bg-surface));border:1px solid var(--ui-chip-line, var(--hd-border));border-radius:var(--ui-chip-radius, var(--hd-radius-sm));color:var(--ui-chip-fg, var(--hd-text-2));font-family:var(--hd-font-body);font-weight:var(--ui-chip-weight, var(--hd-font-weight-medium));line-height:1;white-space:nowrap;cursor:pointer;text-decoration:none;transition:border-color var(--hd-duration-fast) var(--hd-ease-standard),color var(--hd-duration-fast) var(--hd-ease-standard),background-color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-chip--NLgU:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}.ui-chip--NLgU:hover:not(:disabled){border-color:var(--hd-border-strong);color:var(--hd-text)}.ui-chip--NLgU:disabled{background-color:var(--hd-bg-raised);border-color:var(--hd-border);cursor:not-allowed;color:var(--hd-text-3)}@media (forced-colors: active){.ui-chip--NLgU:disabled{color:GrayText;border-color:GrayText}}.ui-chip--NLgU:disabled .ui-chip__icon-IjjSb,.ui-chip--NLgU:disabled .ui-chip__count-MBGO3{color:var(--hd-text-3)}@media (forced-colors: active){.ui-chip--NLgU:disabled .ui-chip__icon-IjjSb,.ui-chip--NLgU:disabled .ui-chip__count-MBGO3{color:GrayText}}@media (prefers-reduced-motion: reduce){.ui-chip--NLgU{transition:none}}.ui-chip__icon-IjjSb{display:inline-flex;align-items:center;flex-shrink:0;font-size:.92em;color:var(--hd-text-2);transition:color var(--hd-duration-fast) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-chip__icon-IjjSb{transition:none}}.ui-chip__label-cT4hw{overflow:hidden;text-overflow:ellipsis;padding-block:.25em;margin-block:-.25em}.ui-chip__count-MBGO3{font-size:var(--hd-type-caption-size);font-weight:var(--hd-font-weight-semibold);color:var(--hd-text-3);font-variant-numeric:tabular-nums;flex-shrink:0}.ui-chip--sm-60H-S{font-size:var(--hd-type-caption-size);padding:var(--hd-space-2) var(--hd-space-3);min-height:32px}.ui-chip--md--yAlm{font-size:var(--hd-type-small-size);padding:var(--hd-space-2) var(--hd-space-4);min-height:40px}.ui-chip--iconOnly-5LT1h{gap:0}.ui-chip--iconOnly-5LT1h.ui-chip--sm-60H-S{width:32px;padding:0}.ui-chip--iconOnly-5LT1h.ui-chip--md--yAlm{width:40px;padding:0}.ui-chip--iconOnly-5LT1h .ui-chip__icon-IjjSb{font-size:1em}.ui-chip--selected-FdpCr{border-color:var(--ui-chip-selected-line, var(--hd-primary));color:var(--ui-chip-selected-fg, var(--hd-primary-text));background-color:var(--ui-chip-selected-bg, var(--hd-primary-soft));font-weight:var(--ui-chip-selected-weight, var(--hd-font-weight-semibold))}.ui-chip--selected-FdpCr .ui-chip__icon-IjjSb,.ui-chip--selected-FdpCr .ui-chip__count-MBGO3{color:var(--ui-chip-selected-fg, var(--hd-primary-text))}.ui-chip--selected-FdpCr:hover:not(:disabled){border-color:var(--ui-chip-selected-line, var(--hd-primary-hover));color:var(--ui-chip-selected-fg, var(--hd-primary-text));background-color:var(--ui-chip-selected-bg, var(--hd-primary-soft-hover))}.ui-chip--selected-FdpCr:disabled{border-color:var(--hd-text-3)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-palette-ag-P9{display:none;flex-direction:column;width:min(92vw,560px);max-height:min(70dvh,480px);margin:12vh auto auto;padding:0;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-overlay);color:var(--hd-text);box-shadow:var(--hd-shadow-3);overflow:hidden}.ui-palette-ag-P9:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-palette-ag-P9{opacity:0;translate:0 6px;transition:opacity var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard),overlay var(--hd-duration-fast) allow-discrete,display var(--hd-duration-fast) allow-discrete}.ui-palette-ag-P9[open]{opacity:1;translate:0 0}@starting-style{.ui-palette-ag-P9[open]{opacity:0;translate:0 6px}}@media (prefers-reduced-motion: reduce){.ui-palette-ag-P9{transition:none}}.ui-palette-ag-P9::backdrop{opacity:0;transition:opacity var(--hd-duration-fast) var(--hd-ease-standard),overlay var(--hd-duration-fast) allow-discrete,display var(--hd-duration-fast) allow-discrete}.ui-palette-ag-P9[open]::backdrop{opacity:1}@starting-style{.ui-palette-ag-P9[open]::backdrop{opacity:0}}@media (prefers-reduced-motion: reduce){.ui-palette-ag-P9::backdrop{transition:none}}.ui-palette-ag-P9[open]{display:flex}.ui-palette-ag-P9::backdrop{background-color:var(--hd-scrim);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}@media (max-width: 640px){.ui-palette-ag-P9{width:94vw;margin-top:var(--hd-space-5);max-height:80dvh}}.ui-palette__search-G3aYv{display:flex;align-items:center;gap:var(--hd-space-2);padding:var(--hd-space-3) var(--hd-space-4);border-bottom:1px solid var(--hd-border);flex-shrink:0}.ui-palette__searchIcon-2UYj-{color:var(--hd-text-2);font-size:18px;flex-shrink:0}.ui-palette__input-vvLvt{flex:1;min-width:0;border:none;background:none;font-family:var(--hd-font-body);font-size:max(16px,var(--hd-type-body-size));color:var(--hd-text)}.ui-palette__input-vvLvt::placeholder{color:var(--hd-text-3)}.ui-palette__input-vvLvt:focus{outline:none}.ui-palette__list--KWiH{flex:1;min-height:0;position:relative;overflow-y:auto;margin:0;padding:var(--hd-space-1);list-style:none;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-palette__list--KWiH::-webkit-scrollbar{width:8px;height:8px}.ui-palette__list--KWiH::-webkit-scrollbar-track{background:transparent}.ui-palette__list--KWiH::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-palette__list--KWiH::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-palette__group-KPj5Q{display:block;padding:var(--hd-space-2) var(--hd-space-2) var(--hd-space-1);font-size:var(--hd-type-
|
|
1
|
+
@layer ui{.ui-palette-ag-P9{display:none;flex-direction:column;width:min(92vw,560px);max-height:min(70dvh,480px);margin:12vh auto auto;padding:0;border:1px solid var(--hd-border);border-radius:var(--hd-radius-md);background-color:var(--hd-bg-overlay);color:var(--hd-text);box-shadow:var(--hd-shadow-3);overflow:hidden}.ui-palette-ag-P9:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}.ui-palette-ag-P9{opacity:0;translate:0 6px;transition:opacity var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard),overlay var(--hd-duration-fast) allow-discrete,display var(--hd-duration-fast) allow-discrete}.ui-palette-ag-P9[open]{opacity:1;translate:0 0}@starting-style{.ui-palette-ag-P9[open]{opacity:0;translate:0 6px}}@media (prefers-reduced-motion: reduce){.ui-palette-ag-P9{transition:none}}.ui-palette-ag-P9::backdrop{opacity:0;transition:opacity var(--hd-duration-fast) var(--hd-ease-standard),overlay var(--hd-duration-fast) allow-discrete,display var(--hd-duration-fast) allow-discrete}.ui-palette-ag-P9[open]::backdrop{opacity:1}@starting-style{.ui-palette-ag-P9[open]::backdrop{opacity:0}}@media (prefers-reduced-motion: reduce){.ui-palette-ag-P9::backdrop{transition:none}}.ui-palette-ag-P9[open]{display:flex}.ui-palette-ag-P9::backdrop{background-color:var(--hd-scrim);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}@media (max-width: 640px){.ui-palette-ag-P9{width:94vw;margin-top:var(--hd-space-5);max-height:80dvh}}.ui-palette__search-G3aYv{display:flex;align-items:center;gap:var(--hd-space-2);padding:var(--hd-space-3) var(--hd-space-4);border-bottom:1px solid var(--hd-border);flex-shrink:0}.ui-palette__searchIcon-2UYj-{color:var(--hd-text-2);font-size:18px;flex-shrink:0}.ui-palette__input-vvLvt{flex:1;min-width:0;border:none;background:none;font-family:var(--hd-font-body);font-size:max(16px,var(--hd-type-body-size));color:var(--hd-text)}.ui-palette__input-vvLvt::placeholder{color:var(--hd-text-3)}.ui-palette__input-vvLvt:focus{outline:none}.ui-palette__list--KWiH{flex:1;min-height:0;position:relative;overflow-y:auto;margin:0;padding:var(--hd-space-1);list-style:none;scrollbar-width:thin;scrollbar-color:var(--hd-border-strong) transparent}.ui-palette__list--KWiH::-webkit-scrollbar{width:8px;height:8px}.ui-palette__list--KWiH::-webkit-scrollbar-track{background:transparent}.ui-palette__list--KWiH::-webkit-scrollbar-thumb{background-color:var(--hd-border-strong);border-radius:var(--hd-radius-pill);border:2px solid transparent;background-clip:content-box}.ui-palette__list--KWiH::-webkit-scrollbar-thumb:hover{background-color:var(--hd-text-3)}.ui-palette__group-KPj5Q{display:block;padding:var(--hd-space-2) var(--hd-space-2) var(--hd-space-1);font-family:var(--ui-overline-font, var(--hd-font-body));font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:var(--ui-overline-tracking, normal);text-transform:var(--ui-overline-transform, none);color:var(--hd-text-2);font-size:var(--hd-type-caption-size)}.ui-palette__item-UZzkp{display:flex;align-items:center;gap:var(--hd-space-3);padding:var(--hd-space-2) var(--hd-space-3);border-radius:var(--hd-radius-xs);cursor:pointer;min-height:40px}.ui-palette__item--active-XHcka{background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-palette__icon-Fg0Lt{display:inline-flex;flex-shrink:0;font-size:18px;color:var(--hd-text-2)}.ui-palette__text-flfN9{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}.ui-palette__label-8-UHe{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--hd-type-small-size);color:var(--hd-text)}.ui-palette__description-eRlk9{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-2)}.ui-palette__shortcut-DwYKX{flex-shrink:0}.ui-palette__empty-vg-I3{padding:var(--hd-space-5) var(--hd-space-3);text-align:center;font-size:var(--hd-type-small-size);color:var(--hd-text-2)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-directory-badEd{display:flex;flex-direction:column;gap:var(--hd-space-6)}.ui-group-i6An9{scroll-margin-top:0}.ui-group__header-rc19c{display:flex;align-items:center;gap:var(--hd-space-3);justify-content:space-between;padding-bottom:var(--hd-space-2);margin-bottom:var(--hd-space-3);border-bottom:1px solid var(--hd-border);position:sticky;top:var(--ui-header-height, 0px);z-index:var(--hd-z-raised);background-color:var(--hd-bg-page)}.ui-group__label-vQTcs{font-family:var(--hd-font-display);font-size:var(--hd-type-
|
|
1
|
+
@layer ui{.ui-directory-badEd{display:flex;flex-direction:column;gap:var(--hd-space-6)}.ui-group-i6An9{scroll-margin-top:0}.ui-group__header-rc19c{display:flex;align-items:center;gap:var(--hd-space-3);justify-content:space-between;padding-bottom:var(--hd-space-2);margin-bottom:var(--hd-space-3);border-bottom:1px solid var(--hd-border);position:sticky;top:var(--ui-header-height, 0px);z-index:var(--hd-z-raised);background-color:var(--hd-bg-page)}.ui-group__label-vQTcs{font-family:var(--hd-font-display);font-size:var(--hd-type-title-4-size);font-weight:var(--hd-type-title-4-weight);font-stretch:var(--hd-type-title-4-stretch);line-height:var(--hd-type-title-4-line-height);letter-spacing:var(--hd-type-title-4-letter-spacing);color:var(--hd-text);margin:0;min-width:0}.ui-group__link-es5V7{color:inherit;text-decoration:none;transition:color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-group__link-es5V7:hover{color:var(--hd-primary-text);text-decoration:underline;text-underline-offset:3px}@media (prefers-reduced-motion: reduce){.ui-group__link-es5V7{transition:none}}.ui-group__meta-LtC-u{font-size:var(--hd-type-caption-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text-2);font-variant-numeric:tabular-nums;flex-shrink:0;white-space:nowrap}.ui-group__list-YxBCG{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:var(--hd-space-1);list-style:none;margin:0;padding:0}.ui-row-3LH7X{display:flex;align-items:center;gap:var(--hd-space-3);min-height:44px;padding:calc(var(--hd-space-2) + 1px) calc(var(--hd-space-3) + 1px);border-radius:var(--hd-radius-sm);text-decoration:none;color:inherit;background-color:transparent;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),translate var(--hd-duration-fast) var(--hd-ease-standard)}.ui-row-3LH7X:hover:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 8%,transparent)}.ui-row-3LH7X:active:not(:disabled):not([aria-disabled=true]){background-color:color-mix(in srgb,var(--hd-text) 14%,transparent);translate:0 1px}@media (prefers-reduced-motion: reduce){.ui-row-3LH7X{transition:none}.ui-row-3LH7X:active:not(:disabled):not([aria-disabled=true]){translate:none}}.ui-row-3LH7X:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, -2px)}@media (prefers-reduced-motion: reduce){.ui-row-3LH7X{transition:none}}.ui-row__media-AxZEh{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border-radius:var(--hd-radius-xs);background-color:var(--hd-bg-raised);color:var(--hd-text-2);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);overflow:hidden}.ui-row__media-AxZEh img{object-fit:contain;width:100%;height:100%}.ui-row__name-75Wbq{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1;font-size:var(--hd-type-small-size);color:var(--hd-text);transition:color var(--hd-duration-fast) var(--hd-ease-standard)}@media (prefers-reduced-motion: reduce){.ui-row__name-75Wbq{transition:none}}.ui-row__marker-RYHb-{display:inline-flex;align-items:center;flex-shrink:0;font-size:var(--hd-type-caption-size);color:var(--hd-text-2);font-variant-numeric:tabular-nums}.ui-jump-vpGwB{display:flex;gap:var(--hd-space-1);position:relative;overflow-x:auto;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;padding-block:var(--hd-space-1) var(--hd-space-3);scrollbar-width:none;-ms-overflow-style:none}.ui-jump-vpGwB::-webkit-scrollbar{display:none}.ui-jump-vpGwB>*{scroll-snap-align:start;flex-shrink:0}.ui-jump-vpGwB{position:sticky;top:var(--ui-header-height, 0px);z-index:var(--hd-z-sticky);background-color:var(--hd-bg-page);border-bottom:1px solid var(--hd-border)}.ui-jump__link-rRnT6{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding-inline:var(--hd-space-2);border-radius:var(--hd-radius-xs);font-family:var(--hd-font-body);font-size:var(--hd-type-small-size);font-weight:var(--hd-font-weight-semibold);color:var(--hd-text-2);text-decoration:none;transition:background-color var(--hd-duration-fast) var(--hd-ease-standard),color var(--hd-duration-fast) var(--hd-ease-standard)}.ui-jump__link-rRnT6:hover{background-color:var(--hd-bg-raised);color:var(--hd-primary-text)}.ui-jump__link-rRnT6:focus-visible{outline:var(--ui-ring-width, 2px) solid var(--ui-ring-color, var(--hd-focus));outline-offset:var(--ui-ring-offset, 2px)}@media (prefers-reduced-motion: reduce){.ui-jump__link-rRnT6{transition:none}}.ui-jump-vpGwB~.ui-directory-badEd .ui-group-i6An9{scroll-margin-top:49px}.ui-jump-vpGwB~.ui-directory-badEd .ui-group__header-rc19c{top:calc(var(--ui-header-height, 0px) + 49px)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer ui{.ui-empty-47qZR{display:flex;flex-direction:column;gap:var(--hd-space-3);align-items:center;text-align:center;padding:var(--hd-space-12) var(--hd-space-5)}@media (max-width: 640px){.ui-empty-47qZR{padding:var(--hd-space-10) var(--hd-space-4)}}.ui-empty__icon-okfEc{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-raised);border:1px solid var(--hd-border);color:var(--hd-text-2);font-size:var(--hd-type-h2-size);margin-bottom:var(--hd-space-1)}.ui-empty__title-Z7Dzd{font-family:var(--hd-font-display);font-size:var(--hd-type-
|
|
1
|
+
@layer ui{.ui-empty-47qZR{display:flex;flex-direction:column;gap:var(--hd-space-3);align-items:center;text-align:center;padding:var(--hd-space-12) var(--hd-space-5)}@media (max-width: 640px){.ui-empty-47qZR{padding:var(--hd-space-10) var(--hd-space-4)}}.ui-empty__icon-okfEc{display:flex;align-items:center;justify-content:center;width:64px;height:64px;border-radius:var(--hd-radius-pill);background-color:var(--hd-bg-raised);border:1px solid var(--hd-border);color:var(--hd-text-2);font-size:var(--hd-type-h2-size);margin-bottom:var(--hd-space-1)}.ui-empty__title-Z7Dzd{font-family:var(--hd-font-display);font-size:var(--hd-type-title-4-size);font-weight:var(--hd-type-title-4-weight);font-stretch:var(--hd-type-title-4-stretch);line-height:var(--hd-type-title-4-line-height);letter-spacing:var(--hd-type-title-4-letter-spacing);color:var(--hd-text);margin:0;text-wrap:balance}.ui-empty__description-6BoCk{font-size:var(--hd-type-small-size);line-height:var(--hd-type-body-line-height);color:var(--hd-text-2);margin:0;max-width:48ch;text-wrap:pretty}.ui-empty__actions-ARk-k{display:flex;flex-wrap:wrap;align-items:center;gap:var(--hd-space-2);justify-content:center;margin-top:var(--hd-space-2)}@media (max-width: 640px){.ui-empty__actions-ARk-k{width:100%;max-width:320px;flex-direction:column}.ui-empty__actions-ARk-k>*{width:100%}}.ui-empty--sm-QXaXx{padding:var(--hd-space-6) var(--hd-space-4)}.ui-empty--sm-QXaXx .ui-empty__icon-okfEc{width:48px;height:48px;font-size:24px}.ui-empty--sm-QXaXx .ui-empty__title-Z7Dzd{font-family:var(--hd-font-body);font-size:var(--hd-type-body-size);font-weight:var(--hd-font-weight-semibold);line-height:var(--hd-type-h4-line-height);letter-spacing:normal;color:var(--hd-text)}.ui-empty--error-4BBgp .ui-empty__icon-okfEc{color:var(--hd-danger-fg);background-color:var(--hd-danger-bg)}.ui-empty--error-4BBgp .ui-empty__title-Z7Dzd{color:var(--hd-danger-fg)}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("react"),ne=require("react-bootstrap-icons"),V=require("../../helpers/class-name.helper.cjs"),ce=require("../../helpers/facet.helper.cjs"),le=require("../../helpers/component.helper.cjs"),i=require("../../helpers/label.helper.cjs"),ie=require("../../helpers/text.helper.cjs"),ue=require("../../theme/context.cjs"),E=require("../Button/index.cjs"),re=require("../Checkbox/index.cjs"),de=require("../Disclosure/index.cjs"),X=require("../Field/index.cjs"),oe=require("../Input/index.cjs"),me=require("../Link/index.cjs"),p=require("../MoneyInput/index.cjs"),xe=require("../Radio/index.cjs"),O=require("../../enums/ui-variant.enum.cjs"),w=require("../../enums/ui-size.enum.cjs"),s={default:{"facet":"ui-facet-xZdJq","facet--clearable":"ui-facet--clearable-XxXO6","facet__badge":"ui-facet__badge-ucqG8","facet__body":"ui-facet__body-BDkd5","facet__more":"ui-facet__more-KNTTK","facet__clear":"ui-facet__clear-u7jSe","facet__empty":"ui-facet__empty-J3b8a","list":"ui-list-rvHMk","option":"ui-option-5Rvb-","option__control":"ui-option__control-1ufGr","option__row":"ui-option__row-d-bHC","option__label":"ui-option__label-vQmG-","option__count":"ui-option__count-STK-j","option--link":"ui-option--link-p4N1J","option--current":"ui-option--current-EnWCM","range":"ui-range-ruqV-","range__fields":"ui-range__fields-BeRrd","srOnly":"ui-srOnly-86AuY"}},he=6,fe=10,_e=({title:j,mode:u="checkbox",options:v=[],selected:m=[],onChange:x,range:r,onRangeChange:S,minorDigits:z=2,currency:A,visibleCount:I=he,searchThreshold:W=fe,onClear:T,isDefaultOpen:Y=!0,children:H,selectedCount:$,labels:a,className:J,testId:K})=>{var U,G;const{labels:l}=ue.useUi(),n=l==null?void 0:l.facets,Q=o.useId(),[R,Z]=o.useState(""),[N,b]=o.useState(!1),[F,q]=o.useState(r??{min:null,max:null}),L=(r==null?void 0:r.min)??null,M=(r==null?void 0:r.max)??null;o.useEffect(()=>q({min:L,max:M}),[L,M]);const f=$??(u==="range"?+(L!==null)+ +(M!==null):H?0:m.length),d=R.trim(),_=o.useMemo(()=>d?v.filter(t=>ie.matchesSearch(t.label,d)):v,[v,d]),y=d||N?_:ce.foldedOptions(_,m,I),C=_.length-y.length,P=!d&&_.length>I,ee=t=>x==null?void 0:x(m.includes(t)?m.filter(c=>c!==t):[...m,t]),te=t=>{t.preventDefault(),S==null||S(F)},g=t=>{const c=m.includes(t.value),h=t.isDisabled||t.count===0&&!c,D=e.jsxs("span",{className:s.default.option__row,children:[e.jsx("span",{className:s.default.option__label,children:t.label}),t.count!==void 0&&e.jsx("span",{className:s.default.option__count,children:t.count})]});return u==="link"?e.jsx("li",{children:e.jsx(me.default,{...t.linkProps,href:t.href??"#",className:V.cx(s.default.option,s.default["option--link"],c&&s.default["option--current"]),"aria-current":c?"page":void 0,children:D})},t.value):u==="radio"?e.jsx("div",{className:s.default.option,children:e.jsx(xe.default,{name:Q,label:D,checked:c,disabled:h,className:s.default.option__control,onChange:()=>x==null?void 0:x([t.value])})},t.value):e.jsx("div",{className:s.default.option,children:e.jsx(re.default,{className:s.default.option__control,label:D,checked:c,disabled:h,onChange:()=>ee(t.value)})},t.value)},ae=u==="link"?e.jsx("ul",{className:s.default.list,children:y.map(g)}):e.jsx("div",{className:s.default.list,role:u==="radio"?"radiogroup":"group","aria-label":j,children:y.map(g)}),se=e.jsxs("form",{className:s.default.range,onSubmit:te,children:[e.jsxs("div",{className:s.default.range__fields,children:[e.jsx(X.default,{label:i.resolveLabel("FacetSection.labels.min",a==null?void 0:a.min,(U=l==null?void 0:l.range)==null?void 0:U.min),children:t=>e.jsx(p.default,{...t,size:"sm",minorDigits:z,currency:A,value:F.min,onChange:c=>q(h=>({...h,min:c}))})}),e.jsx(X.default,{label:i.resolveLabel("FacetSection.labels.max",a==null?void 0:a.max,(G=l==null?void 0:l.range)==null?void 0:G.max),children:t=>e.jsx(p.default,{...t,size:"sm",minorDigits:z,currency:A,value:F.max,onChange:c=>q(h=>({...h,max:c}))})})]}),e.jsx(E.default,{type:"submit",variant:O.default.SECONDARY,size:w.default.SMALL,isFullWidth:!0,children:i.resolveLabel("FacetSection.labels.applyRange",a==null?void 0:a.applyRange,n==null?void 0:n.applyRange)})]}),k=v.length>W&&u!=="range"?i.resolveFormatter("FacetSection.labels.search",(a==null?void 0:a.search)??(n==null?void 0:n.search),j):null,B=!!T&&f>0;return e.jsxs("div",{className:V.cx(s.default.facet,B&&s.default["facet--clearable"],J),"data-testid":K,children:[e.jsx(de.default,{variant:"plain",className:s.default.facet__disclosure,isDefaultOpen:Y||f>0,summary:j,meta:f>0?e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,className:s.default.facet__badge,children:f}),e.jsx("span",{className:s.default.srOnly,children:i.resolveFormatter("FacetSection.labels.selected",(a==null?void 0:a.selected)??(n==null?void 0:n.selected),f)})]}):void 0,children:e.jsx("div",{className:s.default.facet__body,children:H??e.jsxs(e.Fragment,{children:[k!==null&&e.jsx(oe.default,{type:"search",size:"sm",value:R,placeholder:k,"aria-label":k,prefix:e.jsx(ne.Search,{"aria-hidden":!0}),onChange:t=>Z(t.target.value)}),u==="range"?se:ae,d&&_.length===0&&e.jsx("p",{role:"status",className:s.default.facet__empty,children:i.resolveFormatter("FacetSection.labels.noMatch",(a==null?void 0:a.noMatch)??(n==null?void 0:n.noMatch),d)}),P&&u!=="range"&&e.jsx(E.default,{variant:O.default.GHOST,size:w.default.XSMALL,className:s.default.facet__more,"aria-expanded":N,onClick:()=>b(t=>!t),children:N?i.resolveLabel("FacetSection.labels.showLess",a==null?void 0:a.showLess,n==null?void 0:n.showLess):i.resolveFormatter("FacetSection.labels.showMore",(a==null?void 0:a.showMore)??(n==null?void 0:n.showMore),C)})]})})}),B&&e.jsx(E.default,{variant:O.default.GHOST,size:w.default.XSMALL,className:s.default.facet__clear,onClick:T,children:i.resolveLabel("FacetSection.labels.clear",a==null?void 0:a.clear,n==null?void 0:n.clear)})]})},ve=o.memo(le.named(_e,"FacetSection"));exports.default=ve;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../src/components/FacetSection/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FormEvent, memo, type ReactNode, useEffect, useId, useMemo, useState } from 'react';\n\nimport { Search } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { foldedOptions } from '../../helpers/facet.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport { matchesSearch } from '../../helpers/text.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport type { Formatter } from '../../types/theme.type';\nimport Button from '../Button';\nimport Checkbox from '../Checkbox';\nimport Disclosure from '../Disclosure';\nimport Field from '../Field';\nimport Input from '../Input';\nimport UiLink from '../Link';\nimport MoneyInput from '../MoneyInput';\nimport Radio from '../Radio';\nimport UIVariant from '../../enums/ui-variant.enum';\nimport UISize from '../../enums/ui-size.enum';\n\nimport styles from './index.module.scss';\n\n/** One value of a facet: a brand, a category, a quality level. */\nexport type FacetOption = {\n value: string;\n label: string;\n /** Matching results; an option with `0` and not selected is disabled (it leads to no result). */\n count?: number;\n /** The option's page, in `link` mode (a category tree navigates instead of filtering). */\n href?: string;\n linkProps?: UiLinkExtraProps;\n isDisabled?: boolean;\n};\n\n/**\n * `checkbox` many values · `radio` one value · `link` a navigation list (the current one is\n * `aria-current=\"page\"`) · `range` a min/max amount.\n */\nexport type FacetMode = 'checkbox' | 'radio' | 'link' | 'range';\n\n/** An amount range in the currency's minor unit (`MoneyInput`'s scaled integer); `null` = open. */\nexport type FacetRange = { min: number | null; max: number | null };\n\nexport type FacetLabels = {\n clear: string;\n applyRange: string;\n showMore: Formatter<[count: number]>;\n showLess: string;\n search: Formatter<[title: string]>;\n noMatch: Formatter<[term: string]>;\n selected: Formatter<[count: number]>;\n /** The range fields; `labels.range.min` / `labels.range.max` of the provider by default. */\n min: string;\n max: string;\n};\n\ntype Props = {\n title: string;\n mode?: FacetMode;\n options?: FacetOption[];\n /** The selected values (`checkbox`, `radio`, `link`). */\n selected?: string[];\n /** The next selection; `radio` gives one value. Not called in `link` mode: the link navigates. */\n onChange?: (selected: string[]) => void;\n /** `range` mode: the applied range. */\n range?: FacetRange;\n /** `range` mode: called by the apply button (or Enter), not on every keystroke. */\n onRangeChange?: (range: FacetRange) => void;\n /** `range` mode: the currency's minor digits (`MoneyInput.minorDigits`), 2 by default. */\n minorDigits?: number;\n /** `range` mode: the currency after the amounts (\"TL\"). */\n currency?: ReactNode;\n /** Options shown before \"show more\"; selected options always stay visible. Default 6. */\n visibleCount?: number;\n /** Above this many options the list gets a search field. Default 10. */\n searchThreshold?: number;\n /** Shows the section's clear button while something is selected. */\n onClear?: () => void;\n /** Open at first (default). A section with a selection always opens: an applied filter is seen. */\n isDefaultOpen?: boolean;\n /** Your own content instead of the options (a vehicle picker, switches). */\n children?: ReactNode;\n /** The badge count of custom `children`; derived from `selected` / `range` otherwise. */\n selectedCount?: number;\n labels?: Partial<FacetLabels>;\n className?: string;\n testId?: string;\n};\n\nconst DEFAULT_VISIBLE = 6;\nconst DEFAULT_SEARCH_THRESHOLD = 10;\n\n/**\n * One collapsible filter group of a `FacetSidebar` (3.4): a checkbox, radio or link list with\n * counts, \"show more\", a search field for a long list, a min/max range, and a clear button.\n */\nconst FacetSection = ({\n title,\n mode = 'checkbox',\n options = [],\n selected = [],\n onChange,\n range,\n onRangeChange,\n minorDigits = 2,\n currency,\n visibleCount = DEFAULT_VISIBLE,\n searchThreshold = DEFAULT_SEARCH_THRESHOLD,\n onClear,\n isDefaultOpen = true,\n children,\n selectedCount,\n labels: labelProps,\n className,\n testId,\n}: Props) => {\n const { labels: config } = useUi();\n const facets = config?.facets;\n const name = useId();\n const [term, setTerm] = useState('');\n const [isExpanded, setIsExpanded] = useState(false);\n const [draft, setDraft] = useState<FacetRange>(range ?? { min: null, max: null });\n\n /* The applied range can change from outside (back button, \"clear all\"): the fields follow it. */\n const rangeMin = range?.min ?? null;\n const rangeMax = range?.max ?? null;\n useEffect(() => setDraft({ min: rangeMin, max: rangeMax }), [rangeMin, rangeMax]);\n\n const count =\n selectedCount ??\n (mode === 'range'\n ? Number(rangeMin !== null) + Number(rangeMax !== null)\n : children\n ? 0\n : selected.length);\n\n const query = term.trim();\n const matched = useMemo(\n () => (query ? options.filter(option => matchesSearch(option.label, query)) : options),\n [options, query],\n );\n const visible = query || isExpanded ? matched : foldedOptions(matched, selected, visibleCount);\n const hiddenCount = matched.length - visible.length;\n const canFold = !query && matched.length > visibleCount;\n\n const toggle = (value: string) =>\n onChange?.(\n selected.includes(value) ? selected.filter(item => item !== value) : [...selected, value],\n );\n\n const applyRange = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n onRangeChange?.(draft);\n };\n\n const renderOption = (option: FacetOption) => {\n const isSelected = selected.includes(option.value);\n const isDisabled = option.isDisabled || (option.count === 0 && !isSelected);\n const row = (\n <span className={styles.option__row}>\n <span className={styles.option__label}>{option.label}</span>\n {option.count !== undefined && <span className={styles.option__count}>{option.count}</span>}\n </span>\n );\n\n if (mode === 'link')\n return (\n <li key={option.value}>\n <UiLink\n {...option.linkProps}\n href={option.href ?? '#'}\n className={cx(\n styles.option,\n styles['option--link'],\n isSelected && styles['option--current'],\n )}\n aria-current={isSelected ? 'page' : undefined}\n >\n {row}\n </UiLink>\n </li>\n );\n\n if (mode === 'radio')\n return (\n <div key={option.value} className={styles.option}>\n <Radio\n name={name}\n label={option.label}\n count={option.count}\n checked={isSelected}\n disabled={isDisabled}\n onChange={() => onChange?.([option.value])}\n />\n </div>\n );\n\n return (\n <div key={option.value} className={styles.option}>\n <Checkbox\n label={row}\n checked={isSelected}\n disabled={isDisabled}\n onChange={() => toggle(option.value)}\n />\n </div>\n );\n };\n\n const list =\n mode === 'link' ? (\n <ul className={styles.list}>{visible.map(renderOption)}</ul>\n ) : (\n <div\n className={styles.list}\n role={mode === 'radio' ? 'radiogroup' : 'group'}\n aria-label={title}\n >\n {visible.map(renderOption)}\n </div>\n );\n\n const rangeForm = (\n <form className={styles.range} onSubmit={applyRange}>\n <div className={styles.range__fields}>\n <Field label={resolveLabel('FacetSection.labels.min', labelProps?.min, config?.range?.min)}>\n {props => (\n <MoneyInput\n {...props}\n size=\"sm\"\n minorDigits={minorDigits}\n currency={currency}\n value={draft.min}\n onChange={min => setDraft(current => ({ ...current, min }))}\n />\n )}\n </Field>\n <Field label={resolveLabel('FacetSection.labels.max', labelProps?.max, config?.range?.max)}>\n {props => (\n <MoneyInput\n {...props}\n size=\"sm\"\n minorDigits={minorDigits}\n currency={currency}\n value={draft.max}\n onChange={max => setDraft(current => ({ ...current, max }))}\n />\n )}\n </Field>\n </div>\n <Button type=\"submit\" variant={UIVariant.SECONDARY} size={UISize.SMALL} isFullWidth>\n {resolveLabel('FacetSection.labels.applyRange', labelProps?.applyRange, facets?.applyRange)}\n </Button>\n </form>\n );\n\n const searchLabel =\n options.length > searchThreshold && mode !== 'range'\n ? resolveFormatter('FacetSection.labels.search', labelProps?.search ?? facets?.search, title)\n : null;\n\n return (\n <Disclosure\n variant=\"plain\"\n className={cx(styles.facet, className)}\n isDefaultOpen={isDefaultOpen || count > 0}\n testId={testId}\n summary={title}\n meta={\n count > 0 ? (\n <>\n <span aria-hidden className={styles.facet__badge}>\n {count}\n </span>\n <span className={styles.srOnly}>\n {resolveFormatter(\n 'FacetSection.labels.selected',\n labelProps?.selected ?? facets?.selected,\n count,\n )}\n </span>\n </>\n ) : undefined\n }\n >\n <div className={styles.facet__body}>\n {onClear && count > 0 && (\n <Button\n variant={UIVariant.GHOST}\n size={UISize.XSMALL}\n className={styles.facet__clear}\n onClick={onClear}\n >\n {resolveLabel('FacetSection.labels.clear', labelProps?.clear, facets?.clear)}\n </Button>\n )}\n\n {children ?? (\n <>\n {searchLabel !== null && (\n <Input\n type=\"search\"\n size=\"sm\"\n value={term}\n placeholder={searchLabel}\n aria-label={searchLabel}\n prefix={<Search aria-hidden />}\n onChange={event => setTerm(event.target.value)}\n />\n )}\n\n {mode === 'range' ? rangeForm : list}\n\n {query && matched.length === 0 && (\n <p role=\"status\" className={styles.facet__empty}>\n {resolveFormatter(\n 'FacetSection.labels.noMatch',\n labelProps?.noMatch ?? facets?.noMatch,\n query,\n )}\n </p>\n )}\n\n {canFold && mode !== 'range' && (\n <Button\n variant={UIVariant.GHOST}\n size={UISize.XSMALL}\n className={styles.facet__more}\n aria-expanded={isExpanded}\n onClick={() => setIsExpanded(expanded => !expanded)}\n >\n {isExpanded\n ? resolveLabel(\n 'FacetSection.labels.showLess',\n labelProps?.showLess,\n facets?.showLess,\n )\n : resolveFormatter(\n 'FacetSection.labels.showMore',\n labelProps?.showMore ?? facets?.showMore,\n hiddenCount,\n )}\n </Button>\n )}\n </>\n )}\n </div>\n </Disclosure>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(FacetSection, 'FacetSection'),\n) as typeof FacetSection;\n"],"names":["DEFAULT_VISIBLE","DEFAULT_SEARCH_THRESHOLD","FacetSection","title","mode","options","selected","onChange","range","onRangeChange","minorDigits","currency","visibleCount","searchThreshold","onClear","isDefaultOpen","children","selectedCount","labelProps","className","testId","config","useUi","facets","name","useId","term","setTerm","useState","isExpanded","setIsExpanded","draft","setDraft","rangeMin","rangeMax","useEffect","count","query","matched","useMemo","option","matchesSearch","visible","foldedOptions","hiddenCount","canFold","toggle","value","item","applyRange","event","renderOption","isSelected","isDisabled","row","jsxs","styles","jsx","UiLink","cx","Radio","Checkbox","list","rangeForm","Field","resolveLabel","_a","props","MoneyInput","current","min","_b","max","Button","UIVariant","UISize","searchLabel","resolveFormatter","Disclosure","Fragment","Input","Search","expanded","index","memo","named"],"mappings":"g3BA6FMA,GAAkB,EAClBC,GAA2B,GAM3BC,GAAe,CAAC,CACpB,MAAAC,EACA,KAAAC,EAAO,WACP,QAAAC,EAAU,CAAA,EACV,SAAAC,EAAW,CAAA,EACX,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,EACd,SAAAC,EACA,aAAAC,EAAeZ,GACf,gBAAAa,EAAkBZ,GAClB,QAAAa,EACA,cAAAC,EAAgB,GAChB,SAAAC,EACA,cAAAC,EACA,OAAQC,EACR,UAAAC,EACA,OAAAC,CACF,IAAa,SACX,KAAM,CAAE,OAAQC,CAAA,EAAWC,SAAA,EACrBC,EAASF,GAAA,YAAAA,EAAQ,OACjBG,EAAOC,EAAAA,MAAA,EACP,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAE,EAC7B,CAACC,EAAYC,CAAa,EA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C,QAASC,EAAAA,QAAU,MACnB,KAAMC,EAAAA,QAAO,OACb,UAAWnB,EAAAA,QAAO,YAClB,gBAAe3B,EACf,QAAS,IAAMC,EAAcoD,GAAY,CAACA,CAAQ,EAEjD,SAAArD,EACGoC,EAAAA,aACE,+BACA/C,GAAA,YAAAA,EAAY,SACZK,GAAA,YAAAA,EAAQ,QAAA,EAEVsD,EAAAA,iBACE,gCACA3D,GAAA,YAAAA,EAAY,YAAYK,GAAA,YAAAA,EAAQ,UAChCqB,CAAA,CACF,CAAA,CACN,CAAA,CAEJ,CAAA,CAAA,CAEJ,CAAA,CAAA,CAGN,EAEAuC,GAA6BC,EAAAA,KACbC,GAAAA,MAAMnF,GAAc,cAAc,CAClD"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../src/components/FacetSection/index.tsx"],"sourcesContent":["'use client';\n\nimport { type FormEvent, memo, type ReactNode, useEffect, useId, useMemo, useState } from 'react';\n\nimport { Search } from 'react-bootstrap-icons';\n\nimport { cx } from '../../helpers/class-name.helper';\nimport { foldedOptions } from '../../helpers/facet.helper';\nimport { named } from '../../helpers/component.helper';\nimport { resolveFormatter, resolveLabel } from '../../helpers/label.helper';\nimport { matchesSearch } from '../../helpers/text.helper';\nimport { useUi } from '../../theme/context';\nimport type { UiLinkExtraProps } from '../../types/link.type';\nimport type { Formatter } from '../../types/theme.type';\nimport Button from '../Button';\nimport Checkbox from '../Checkbox';\nimport Disclosure from '../Disclosure';\nimport Field from '../Field';\nimport Input from '../Input';\nimport UiLink from '../Link';\nimport MoneyInput from '../MoneyInput';\nimport Radio from '../Radio';\nimport UIVariant from '../../enums/ui-variant.enum';\nimport UISize from '../../enums/ui-size.enum';\n\nimport styles from './index.module.scss';\n\n/** One value of a facet: a brand, a category, a quality level. */\nexport type FacetOption = {\n value: string;\n label: string;\n /** Matching results; an option with `0` and not selected is disabled (it leads to no result). */\n count?: number;\n /** The option's page, in `link` mode (a category tree navigates instead of filtering). */\n href?: string;\n linkProps?: UiLinkExtraProps;\n isDisabled?: boolean;\n};\n\n/**\n * `checkbox` many values · `radio` one value · `link` a navigation list (the current one is\n * `aria-current=\"page\"`) · `range` a min/max amount.\n */\nexport type FacetMode = 'checkbox' | 'radio' | 'link' | 'range';\n\n/** An amount range in the currency's minor unit (`MoneyInput`'s scaled integer); `null` = open. */\nexport type FacetRange = { min: number | null; max: number | null };\n\nexport type FacetLabels = {\n clear: string;\n applyRange: string;\n showMore: Formatter<[count: number]>;\n showLess: string;\n search: Formatter<[title: string]>;\n noMatch: Formatter<[term: string]>;\n selected: Formatter<[count: number]>;\n /** The range fields; `labels.range.min` / `labels.range.max` of the provider by default. */\n min: string;\n max: string;\n};\n\ntype Props = {\n title: string;\n mode?: FacetMode;\n options?: FacetOption[];\n /** The selected values (`checkbox`, `radio`, `link`). */\n selected?: string[];\n /** The next selection; `radio` gives one value. Not called in `link` mode: the link navigates. */\n onChange?: (selected: string[]) => void;\n /** `range` mode: the applied range. */\n range?: FacetRange;\n /** `range` mode: called by the apply button (or Enter), not on every keystroke. */\n onRangeChange?: (range: FacetRange) => void;\n /** `range` mode: the currency's minor digits (`MoneyInput.minorDigits`), 2 by default. */\n minorDigits?: number;\n /** `range` mode: the currency after the amounts (\"TL\"). */\n currency?: ReactNode;\n /** Options shown before \"show more\"; selected options always stay visible. Default 6. */\n visibleCount?: number;\n /** Above this many options the list gets a search field. Default 10. */\n searchThreshold?: number;\n /** Shows the section's clear button while something is selected. */\n onClear?: () => void;\n /** Open at first (default). A section with a selection always opens: an applied filter is seen. */\n isDefaultOpen?: boolean;\n /** Your own content instead of the options (a vehicle picker, switches). */\n children?: ReactNode;\n /** The badge count of custom `children`; derived from `selected` / `range` otherwise. */\n selectedCount?: number;\n labels?: Partial<FacetLabels>;\n className?: string;\n testId?: string;\n};\n\nconst DEFAULT_VISIBLE = 6;\nconst DEFAULT_SEARCH_THRESHOLD = 10;\n\n/**\n * One collapsible filter group of a `FacetSidebar` (3.4): a checkbox, radio or link list with\n * counts, \"show more\", a search field for a long list, a min/max range, and a clear button.\n */\nconst FacetSection = ({\n title,\n mode = 'checkbox',\n options = [],\n selected = [],\n onChange,\n range,\n onRangeChange,\n minorDigits = 2,\n currency,\n visibleCount = DEFAULT_VISIBLE,\n searchThreshold = DEFAULT_SEARCH_THRESHOLD,\n onClear,\n isDefaultOpen = true,\n children,\n selectedCount,\n labels: labelProps,\n className,\n testId,\n}: Props) => {\n const { labels: config } = useUi();\n const facets = config?.facets;\n const name = useId();\n const [term, setTerm] = useState('');\n const [isExpanded, setIsExpanded] = useState(false);\n const [draft, setDraft] = useState<FacetRange>(range ?? { min: null, max: null });\n\n /* The applied range can change from outside (back button, \"clear all\"): the fields follow it. */\n const rangeMin = range?.min ?? null;\n const rangeMax = range?.max ?? null;\n useEffect(() => setDraft({ min: rangeMin, max: rangeMax }), [rangeMin, rangeMax]);\n\n const count =\n selectedCount ??\n (mode === 'range'\n ? Number(rangeMin !== null) + Number(rangeMax !== null)\n : children\n ? 0\n : selected.length);\n\n const query = term.trim();\n const matched = useMemo(\n () => (query ? options.filter(option => matchesSearch(option.label, query)) : options),\n [options, query],\n );\n const visible = query || isExpanded ? matched : foldedOptions(matched, selected, visibleCount);\n const hiddenCount = matched.length - visible.length;\n const canFold = !query && matched.length > visibleCount;\n\n const toggle = (value: string) =>\n onChange?.(\n selected.includes(value) ? selected.filter(item => item !== value) : [...selected, value],\n );\n\n const applyRange = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n onRangeChange?.(draft);\n };\n\n const renderOption = (option: FacetOption) => {\n const isSelected = selected.includes(option.value);\n const isDisabled = option.isDisabled || (option.count === 0 && !isSelected);\n const row = (\n <span className={styles.option__row}>\n <span className={styles.option__label}>{option.label}</span>\n {option.count !== undefined && <span className={styles.option__count}>{option.count}</span>}\n </span>\n );\n\n if (mode === 'link')\n return (\n <li key={option.value}>\n <UiLink\n {...option.linkProps}\n href={option.href ?? '#'}\n className={cx(\n styles.option,\n styles['option--link'],\n isSelected && styles['option--current'],\n )}\n aria-current={isSelected ? 'page' : undefined}\n >\n {row}\n </UiLink>\n </li>\n );\n\n /*\n * 3.7: a radio row is the checkbox row — the same label-and-count line, the same flat hover.\n * `Radio`'s own `count` (12px, `text-3`, offset) and its own hover fill (inset 8px inside the\n * option's) drew a second band above and below the hovered row.\n */\n if (mode === 'radio')\n return (\n <div key={option.value} className={styles.option}>\n <Radio\n name={name}\n label={row}\n checked={isSelected}\n disabled={isDisabled}\n className={styles.option__control}\n onChange={() => onChange?.([option.value])}\n />\n </div>\n );\n\n return (\n <div key={option.value} className={styles.option}>\n <Checkbox\n className={styles.option__control}\n label={row}\n checked={isSelected}\n disabled={isDisabled}\n onChange={() => toggle(option.value)}\n />\n </div>\n );\n };\n\n const list =\n mode === 'link' ? (\n <ul className={styles.list}>{visible.map(renderOption)}</ul>\n ) : (\n <div\n className={styles.list}\n role={mode === 'radio' ? 'radiogroup' : 'group'}\n aria-label={title}\n >\n {visible.map(renderOption)}\n </div>\n );\n\n const rangeForm = (\n <form className={styles.range} onSubmit={applyRange}>\n <div className={styles.range__fields}>\n <Field label={resolveLabel('FacetSection.labels.min', labelProps?.min, config?.range?.min)}>\n {props => (\n <MoneyInput\n {...props}\n size=\"sm\"\n minorDigits={minorDigits}\n currency={currency}\n value={draft.min}\n onChange={min => setDraft(current => ({ ...current, min }))}\n />\n )}\n </Field>\n <Field label={resolveLabel('FacetSection.labels.max', labelProps?.max, config?.range?.max)}>\n {props => (\n <MoneyInput\n {...props}\n size=\"sm\"\n minorDigits={minorDigits}\n currency={currency}\n value={draft.max}\n onChange={max => setDraft(current => ({ ...current, max }))}\n />\n )}\n </Field>\n </div>\n <Button type=\"submit\" variant={UIVariant.SECONDARY} size={UISize.SMALL} isFullWidth>\n {resolveLabel('FacetSection.labels.applyRange', labelProps?.applyRange, facets?.applyRange)}\n </Button>\n </form>\n );\n\n const searchLabel =\n options.length > searchThreshold && mode !== 'range'\n ? resolveFormatter('FacetSection.labels.search', labelProps?.search ?? facets?.search, title)\n : null;\n\n const canClear = Boolean(onClear) && count > 0;\n\n /*\n * 3.7: \"Temizle\" sits in the header row, at its end (until 3.6 it took a line of its own under\n * the header). It is a sibling of the disclosure, not inside its `<summary>`: a button inside the\n * toggle would be a control inside a control.\n */\n return (\n <div\n className={cx(styles.facet, canClear && styles['facet--clearable'], className)}\n data-testid={testId}\n >\n <Disclosure\n variant=\"plain\"\n className={styles.facet__disclosure}\n isDefaultOpen={isDefaultOpen || count > 0}\n summary={title}\n meta={\n count > 0 ? (\n <>\n <span aria-hidden className={styles.facet__badge}>\n {count}\n </span>\n <span className={styles.srOnly}>\n {resolveFormatter(\n 'FacetSection.labels.selected',\n labelProps?.selected ?? facets?.selected,\n count,\n )}\n </span>\n </>\n ) : undefined\n }\n >\n <div className={styles.facet__body}>\n {children ?? (\n <>\n {searchLabel !== null && (\n <Input\n type=\"search\"\n size=\"sm\"\n value={term}\n placeholder={searchLabel}\n aria-label={searchLabel}\n prefix={<Search aria-hidden />}\n onChange={event => setTerm(event.target.value)}\n />\n )}\n\n {mode === 'range' ? rangeForm : list}\n\n {query && matched.length === 0 && (\n <p role=\"status\" className={styles.facet__empty}>\n {resolveFormatter(\n 'FacetSection.labels.noMatch',\n labelProps?.noMatch ?? facets?.noMatch,\n query,\n )}\n </p>\n )}\n\n {canFold && mode !== 'range' && (\n <Button\n variant={UIVariant.GHOST}\n size={UISize.XSMALL}\n className={styles.facet__more}\n aria-expanded={isExpanded}\n onClick={() => setIsExpanded(expanded => !expanded)}\n >\n {isExpanded\n ? resolveLabel(\n 'FacetSection.labels.showLess',\n labelProps?.showLess,\n facets?.showLess,\n )\n : resolveFormatter(\n 'FacetSection.labels.showMore',\n labelProps?.showMore ?? facets?.showMore,\n hiddenCount,\n )}\n </Button>\n )}\n </>\n )}\n </div>\n </Disclosure>\n {canClear && (\n <Button\n variant={UIVariant.GHOST}\n size={UISize.XSMALL}\n className={styles.facet__clear}\n onClick={onClear}\n >\n {resolveLabel('FacetSection.labels.clear', labelProps?.clear, facets?.clear)}\n </Button>\n )}\n </div>\n );\n};\n\nexport default /*#__PURE__*/ memo(\n /*#__PURE__*/ named(FacetSection, 'FacetSection'),\n) as typeof FacetSection;\n"],"names":["DEFAULT_VISIBLE","DEFAULT_SEARCH_THRESHOLD","FacetSection","title","mode","options","selected","onChange","range","onRangeChange","minorDigits","currency","visibleCount","searchThreshold","onClear","isDefaultOpen","children","selectedCount","labelProps","className","testId","config","useUi","facets","name","useId","term","setTerm","useState","isExpanded","setIsExpanded","draft","setDraft","rangeMin","rangeMax","useEffect","count","query","matched","useMemo","option","matchesSearch","visible","foldedOptions","hiddenCount","canFold","toggle","value","item","applyRange","event","renderOption","isSelected","isDisabled","row","jsxs","styles","jsx","UiLink","cx","Radio","Checkbox","list","rangeForm","Field","resolveLabel","_a","props","MoneyInput","current","min","_b","max","Button","UIVariant","UISize","searchLabel","resolveFormatter","canClear","Disclosure","Fragment","Input","Search","expanded","index","memo","named"],"mappings":"g3BA6FMA,GAAkB,EAClBC,GAA2B,GAM3BC,GAAe,CAAC,CACpB,MAAAC,EACA,KAAAC,EAAO,WACP,QAAAC,EAAU,CAAA,EACV,SAAAC,EAAW,CAAA,EACX,SAAAC,EACA,MAAAC,EACA,cAAAC,EACA,YAAAC,EAAc,EACd,SAAAC,EACA,aAAAC,EAAeZ,GACf,gBAAAa,EAAkBZ,GAClB,QAAAa,EACA,cAAAC,EAAgB,GAChB,SAAAC,EACA,cAAAC,EACA,OAAQC,EACR,UAAAC,EACA,OAAAC,CACF,IAAa,SACX,KAAM,CAAE,OAAQC,CAAA,EAAWC,SAAA,EACrBC,EAASF,GAAA,YAAAA,EAAQ,OACjBG,EAAOC,EAAAA,MAAA,EACP,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAE,EAC7B,CAACC,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAK,EAC5C,CAACG,EAAOC,CAAQ,EAAIJ,WAAqBpB,GAAS,CAAE,IAAK,KAAM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