@customafk/lunas-ui 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{alert-DIC1_ymv.cjs → alert-BqJVf4wD.cjs} +1 -1
- package/dist/{alert-DIC1_ymv.cjs.map → alert-BqJVf4wD.cjs.map} +1 -1
- package/dist/{alert-CA1RS1CG.d.cts → alert-D3OOxNtK.d.mts} +6 -6
- package/dist/{alert-VP3giy31.mjs → alert-DQHE-pdI.mjs} +1 -1
- package/dist/{alert-VP3giy31.mjs.map → alert-DQHE-pdI.mjs.map} +1 -1
- package/dist/{alert-DDL82_U3.d.mts → alert-W_Q1Gsld.d.cts} +7 -7
- package/dist/{badge-BFTGDsBm.d.cts → badge-Dm1IEgtT.d.cts} +5 -5
- package/dist/{badge-Cg0e-djv.d.mts → badge-YFen8D8o.d.mts} +5 -5
- package/dist/{button-C76drZpd.d.mts → button-BnbtzQAN.d.mts} +5 -5
- package/dist/{button-Bn54lPVz.d.cts → button-Ckjev2AT.d.cts} +3 -3
- package/dist/{calendar-CyAPpT2m.cjs → calendar-B2V4Lv0T.cjs} +1 -1
- package/dist/{calendar-CyAPpT2m.cjs.map → calendar-B2V4Lv0T.cjs.map} +1 -1
- package/dist/{calendar-JKxWM6AF.mjs → calendar-Cw1G0sVL.mjs} +1 -1
- package/dist/{calendar-JKxWM6AF.mjs.map → calendar-Cw1G0sVL.mjs.map} +1 -1
- package/dist/{checkbox-RZrRNYP2.cjs → checkbox-Di7ACavC.cjs} +1 -1
- package/dist/{checkbox-RZrRNYP2.cjs.map → checkbox-Di7ACavC.cjs.map} +1 -1
- package/dist/{checkbox-DJEdYOjA.mjs → checkbox-Dzo6oI4y.mjs} +1 -1
- package/dist/{checkbox-DJEdYOjA.mjs.map → checkbox-Dzo6oI4y.mjs.map} +1 -1
- package/dist/{cms-layout-HfnOQS16.mjs → cms-layout-Bp6rU_of.mjs} +2 -2
- package/dist/{cms-layout-HfnOQS16.mjs.map → cms-layout-Bp6rU_of.mjs.map} +1 -1
- package/dist/{cms-layout-Dc4moos1.cjs → cms-layout-r9TmK6hi.cjs} +2 -2
- package/dist/{cms-layout-Dc4moos1.cjs.map → cms-layout-r9TmK6hi.cjs.map} +1 -1
- package/dist/data-display/country.d.mts +1 -1
- package/dist/data-display/role-badge.d.mts +1 -1
- package/dist/data-display/statistic.d.cts +2 -2
- package/dist/data-display/statistic.d.mts +4 -4
- package/dist/{dialog-D6ygAOSV.d.mts → dialog-DTtlGouy.d.mts} +12 -12
- package/dist/{dialog-CNhwBcEl.d.cts → dialog-DW1Axqio.d.cts} +12 -12
- package/dist/dialogs/detail-dialog/components/sidebar.d.cts +1 -1
- package/dist/dialogs/detail-dialog/components/sidebar.d.mts +26 -26
- package/dist/features/descriptions/index.d.cts +1 -1
- package/dist/features/descriptions/index.d.mts +1 -1
- package/dist/features/search-modal/index.d.cts +2 -2
- package/dist/features/search-modal/index.d.mts +2 -2
- package/dist/features/tables/index.cjs +1 -1
- package/dist/features/tables/index.d.cts +156 -6
- package/dist/features/tables/index.d.mts +157 -7
- package/dist/features/tables/index.mjs +1 -1
- package/dist/features/tanstack-form/index.cjs +1 -1
- package/dist/features/tanstack-form/index.d.cts +1 -1
- package/dist/features/tanstack-form/index.d.mts +1 -1
- package/dist/features/tanstack-form/index.mjs +1 -1
- package/dist/{field-CppNvoxV.cjs → field-C51eJ6QN.cjs} +2 -2
- package/dist/{field-CppNvoxV.cjs.map → field-C51eJ6QN.cjs.map} +1 -1
- package/dist/{field-CXVnw75a.mjs → field-DfsTE4Ie.mjs} +2 -2
- package/dist/{field-CXVnw75a.mjs.map → field-DfsTE4Ie.mjs.map} +1 -1
- package/dist/{index-75nSAiSe.d.mts → index-BIT9bkka.d.mts} +106 -106
- package/dist/{index-aTMCQQms.d.cts → index-CO4_ENw7.d.cts} +291 -291
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -8
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +1 -1
- package/dist/{input-Cd0G5y-9.mjs → input-6f9JTc79.mjs} +1 -1
- package/dist/{input-Cd0G5y-9.mjs.map → input-6f9JTc79.mjs.map} +1 -1
- package/dist/{input-Cl5VkKQh.cjs → input-BMOYFJYM.cjs} +1 -1
- package/dist/{input-Cl5VkKQh.cjs.map → input-BMOYFJYM.cjs.map} +1 -1
- package/dist/{input-D5dtkW6g.d.mts → input-BrM6EExy.d.mts} +6 -6
- package/dist/{input-t2hpPP2K.d.cts → input-CigimPoX.d.cts} +4 -4
- package/dist/{label-OmlGaZ5h.mjs → label-3vAlNtF9.mjs} +1 -1
- package/dist/{label-OmlGaZ5h.mjs.map → label-3vAlNtF9.mjs.map} +1 -1
- package/dist/{label-DkMTQ3Ch.cjs → label-zyBJYydC.cjs} +1 -1
- package/dist/{label-DkMTQ3Ch.cjs.map → label-zyBJYydC.cjs.map} +1 -1
- package/dist/layouts/cms-layout/index.cjs +1 -1
- package/dist/layouts/cms-layout/index.mjs +1 -1
- package/dist/layouts/flex.d.cts +4 -4
- package/dist/layouts/flex.d.mts +4 -4
- package/dist/layouts/payment-layout/index.cjs +1 -1
- package/dist/layouts/payment-layout/index.mjs +1 -1
- package/dist/pages/FeatureDeveloping.d.cts +2 -2
- package/dist/pages/FeatureDeveloping.d.mts +2 -2
- package/dist/pages/FeatureFixing.d.cts +2 -2
- package/dist/pages/FeatureFixing.d.mts +2 -2
- package/dist/pages/NotAuthorized.d.cts +2 -2
- package/dist/pages/NotAuthorized.d.mts +2 -2
- package/dist/pages/NotFound.d.cts +2 -2
- package/dist/pages/NotFound.d.mts +2 -2
- package/dist/{payment-layout-Da29dHJe.cjs → payment-layout-C9pP5HdT.cjs} +1 -1
- package/dist/{payment-layout-Da29dHJe.cjs.map → payment-layout-C9pP5HdT.cjs.map} +1 -1
- package/dist/{payment-layout-wN5c7MCM.mjs → payment-layout-D-69gOPJ.mjs} +1 -1
- package/dist/{payment-layout-wN5c7MCM.mjs.map → payment-layout-D-69gOPJ.mjs.map} +1 -1
- package/dist/{popover-OJXFbqJi.mjs → popover-BFJhuzW3.mjs} +1 -1
- package/dist/{popover-OJXFbqJi.mjs.map → popover-BFJhuzW3.mjs.map} +1 -1
- package/dist/{popover-AEt-aSy3.cjs → popover-CmoqhK17.cjs} +1 -1
- package/dist/{popover-AEt-aSy3.cjs.map → popover-CmoqhK17.cjs.map} +1 -1
- package/dist/progress-0cpDwgAJ.mjs +2 -0
- package/dist/progress-0cpDwgAJ.mjs.map +1 -0
- package/dist/progress-DE1FdQ1J.cjs +2 -0
- package/dist/progress-DE1FdQ1J.cjs.map +1 -0
- package/dist/{radio-group-CAgfOr7-.mjs → radio-group-D5OurBIG.mjs} +1 -1
- package/dist/{radio-group-CAgfOr7-.mjs.map → radio-group-D5OurBIG.mjs.map} +1 -1
- package/dist/{radio-group-BWLdQw7M.cjs → radio-group-DAv2EU3F.cjs} +1 -1
- package/dist/{radio-group-BWLdQw7M.cjs.map → radio-group-DAv2EU3F.cjs.map} +1 -1
- package/dist/{resizable-DWh_mp5P.mjs → resizable-C2Zl-iLF.mjs} +1 -1
- package/dist/{resizable-DWh_mp5P.mjs.map → resizable-C2Zl-iLF.mjs.map} +1 -1
- package/dist/{resizable-D6UKwvFa.cjs → resizable-DDPMwd28.cjs} +1 -1
- package/dist/{resizable-D6UKwvFa.cjs.map → resizable-DDPMwd28.cjs.map} +1 -1
- package/dist/{select-Ze8Fq88G.mjs → select-DRCKwnTV.mjs} +1 -1
- package/dist/{select-Ze8Fq88G.mjs.map → select-DRCKwnTV.mjs.map} +1 -1
- package/dist/{select-Py_t2nX1.cjs → select-DfvSMRUq.cjs} +1 -1
- package/dist/{select-Py_t2nX1.cjs.map → select-DfvSMRUq.cjs.map} +1 -1
- package/dist/{spinner-EgMJOaQi.mjs → spinner-B3F9W53l.mjs} +1 -1
- package/dist/{spinner-EgMJOaQi.mjs.map → spinner-B3F9W53l.mjs.map} +1 -1
- package/dist/{spinner-MKXqwF9G.cjs → spinner-rA8pMY6v.cjs} +1 -1
- package/dist/{spinner-MKXqwF9G.cjs.map → spinner-rA8pMY6v.cjs.map} +1 -1
- package/dist/tables-D1JyNmcV.cjs +2 -0
- package/dist/tables-D1JyNmcV.cjs.map +1 -0
- package/dist/tables-DTazQIyy.mjs +2 -0
- package/dist/tables-DTazQIyy.mjs.map +1 -0
- package/dist/{tanstack-form-BmV2BXDz.cjs → tanstack-form-Bb9JXuEq.cjs} +2 -2
- package/dist/{tanstack-form-BmV2BXDz.cjs.map → tanstack-form-Bb9JXuEq.cjs.map} +1 -1
- package/dist/{tanstack-form-CJ43hVb_.mjs → tanstack-form-BwyHENeF.mjs} +2 -2
- package/dist/{tanstack-form-CJ43hVb_.mjs.map → tanstack-form-BwyHENeF.mjs.map} +1 -1
- package/dist/{textarea-CdGSEkZB.mjs → textarea-5RD9ToTV.mjs} +1 -1
- package/dist/{textarea-CdGSEkZB.mjs.map → textarea-5RD9ToTV.mjs.map} +1 -1
- package/dist/{textarea-BsgmN4jy.cjs → textarea-CvoBIPlJ.cjs} +1 -1
- package/dist/{textarea-BsgmN4jy.cjs.map → textarea-CvoBIPlJ.cjs.map} +1 -1
- package/dist/{types-B_32Ieia.d.mts → types-CkRjAQZ2.d.mts} +1 -1
- package/dist/typography/paragraph.d.cts +4 -4
- package/dist/typography/paragraph.d.mts +4 -4
- package/dist/typography/title.d.cts +2 -2
- package/dist/typography/title.d.mts +2 -2
- package/dist/ui/alert-dialog.d.cts +12 -12
- package/dist/ui/alert-dialog.d.mts +12 -12
- package/dist/ui/alert.cjs +1 -1
- package/dist/ui/alert.d.cts +1 -1
- package/dist/ui/alert.d.mts +1 -1
- package/dist/ui/alert.mjs +1 -1
- package/dist/ui/aspect-ratio.d.cts +2 -2
- package/dist/ui/aspect-ratio.d.mts +2 -2
- package/dist/ui/avatar.d.cts +4 -4
- package/dist/ui/avatar.d.mts +4 -4
- package/dist/ui/badge.d.cts +1 -1
- package/dist/ui/badge.d.mts +1 -1
- package/dist/ui/breadcrumb.d.cts +8 -8
- package/dist/ui/breadcrumb.d.mts +8 -8
- package/dist/ui/button-group.d.cts +6 -6
- package/dist/ui/button-group.d.mts +6 -6
- package/dist/ui/button.d.cts +1 -1
- package/dist/ui/button.d.mts +1 -1
- package/dist/ui/calendar.cjs +1 -1
- package/dist/ui/calendar.d.cts +4 -4
- package/dist/ui/calendar.d.mts +4 -4
- package/dist/ui/calendar.mjs +1 -1
- package/dist/ui/card.d.cts +8 -8
- package/dist/ui/card.d.mts +8 -8
- package/dist/ui/carousel.d.cts +7 -7
- package/dist/ui/carousel.d.mts +7 -7
- package/dist/ui/checkbox.cjs +1 -1
- package/dist/ui/checkbox.d.cts +2 -2
- package/dist/ui/checkbox.d.mts +2 -2
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.d.cts +4 -4
- package/dist/ui/collapsible.d.mts +4 -4
- package/dist/ui/command.d.cts +11 -11
- package/dist/ui/command.d.mts +11 -11
- package/dist/ui/context-menu.d.cts +16 -16
- package/dist/ui/context-menu.d.mts +16 -16
- package/dist/ui/dialog.d.cts +1 -1
- package/dist/ui/dialog.d.mts +1 -1
- package/dist/ui/drawer.d.cts +11 -11
- package/dist/ui/drawer.d.mts +11 -11
- package/dist/ui/dropdown-menu.d.cts +16 -16
- package/dist/ui/dropdown-menu.d.mts +16 -16
- package/dist/ui/empty.d.cts +7 -7
- package/dist/ui/empty.d.mts +9 -9
- package/dist/ui/field.cjs +1 -1
- package/dist/ui/field.d.cts +24 -24
- package/dist/ui/field.d.mts +24 -24
- package/dist/ui/field.mjs +1 -1
- package/dist/ui/file-uploader.cjs +2 -2
- package/dist/ui/file-uploader.cjs.map +1 -1
- package/dist/ui/file-uploader.d.cts +2 -2
- package/dist/ui/file-uploader.d.mts +2 -2
- package/dist/ui/file-uploader.mjs +1 -1
- package/dist/ui/file-uploader.mjs.map +1 -1
- package/dist/ui/form.cjs +1 -1
- package/dist/ui/form.d.cts +11 -11
- package/dist/ui/form.d.mts +11 -11
- package/dist/ui/form.mjs +1 -1
- package/dist/ui/hover-card.d.cts +4 -4
- package/dist/ui/hover-card.d.mts +4 -4
- package/dist/ui/input-otp.d.cts +5 -5
- package/dist/ui/input-otp.d.mts +5 -5
- package/dist/ui/input.cjs +1 -1
- package/dist/ui/input.d.cts +1 -1
- package/dist/ui/input.d.mts +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/inputs/search-input.cjs +1 -1
- package/dist/ui/inputs/search-input.d.cts +3 -3
- package/dist/ui/inputs/search-input.d.mts +3 -3
- package/dist/ui/inputs/search-input.mjs +1 -1
- package/dist/ui/item.d.cts +14 -14
- package/dist/ui/item.d.mts +11 -11
- package/dist/ui/label.cjs +1 -1
- package/dist/ui/label.d.cts +2 -2
- package/dist/ui/label.d.mts +2 -2
- package/dist/ui/label.mjs +1 -1
- package/dist/ui/menubar.d.cts +17 -17
- package/dist/ui/multi-select.d.cts +2 -2
- package/dist/ui/multi-select.d.mts +3 -3
- package/dist/ui/navigation-menu.d.cts +11 -11
- package/dist/ui/navigation-menu.d.mts +9 -9
- package/dist/ui/pagination.d.cts +9 -9
- package/dist/ui/pagination.d.mts +9 -9
- package/dist/ui/popover.cjs +1 -1
- package/dist/ui/popover.d.cts +6 -6
- package/dist/ui/popover.d.mts +6 -6
- package/dist/ui/popover.mjs +1 -1
- package/dist/ui/progress.cjs +1 -2
- package/dist/ui/progress.d.cts +2 -2
- package/dist/ui/progress.d.mts +2 -2
- package/dist/ui/progress.mjs +1 -2
- package/dist/ui/radio-group.cjs +1 -1
- package/dist/ui/radio-group.d.cts +3 -3
- package/dist/ui/radio-group.d.mts +3 -3
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.cjs +1 -1
- package/dist/ui/resizable.d.cts +9 -9
- package/dist/ui/resizable.d.mts +9 -9
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/scroll-area.d.cts +6 -6
- package/dist/ui/scroll-area.d.mts +6 -6
- package/dist/ui/select.cjs +1 -1
- package/dist/ui/select.d.cts +9 -9
- package/dist/ui/select.d.mts +9 -9
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.d.cts +2 -2
- package/dist/ui/separator.d.mts +2 -2
- package/dist/ui/sheet.d.cts +9 -9
- package/dist/ui/sheet.d.mts +9 -9
- package/dist/ui/sidebar.cjs +1 -1
- package/dist/ui/sidebar.d.cts +28 -28
- package/dist/ui/sidebar.d.mts +26 -26
- package/dist/ui/sidebar.mjs +1 -1
- package/dist/ui/skeleton.d.cts +2 -2
- package/dist/ui/skeleton.d.mts +2 -2
- package/dist/ui/slider.d.cts +2 -2
- package/dist/ui/slider.d.mts +2 -2
- package/dist/ui/sonner.d.cts +2 -2
- package/dist/ui/sonner.d.mts +2 -2
- package/dist/ui/spinner.cjs +1 -1
- package/dist/ui/spinner.d.cts +2 -2
- package/dist/ui/spinner.d.mts +2 -2
- package/dist/ui/spinner.mjs +1 -1
- package/dist/ui/switch.d.cts +2 -2
- package/dist/ui/switch.d.mts +2 -2
- package/dist/ui/table.d.cts +18 -18
- package/dist/ui/table.d.mts +9 -9
- package/dist/ui/tabs.d.cts +5 -5
- package/dist/ui/tabs.d.mts +5 -5
- package/dist/ui/textarea.cjs +1 -1
- package/dist/ui/textarea.d.cts +2 -2
- package/dist/ui/textarea.d.mts +2 -2
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/toggle-group.d.cts +3 -3
- package/dist/ui/toggle-group.d.mts +3 -3
- package/dist/ui/toggle.d.cts +4 -4
- package/dist/ui/toggle.d.mts +2 -2
- package/dist/ui/tooltip.d.cts +5 -5
- package/dist/ui/tooltip.d.mts +5 -5
- package/package.json +1 -1
- package/dist/tables-Cc3Wik4i.cjs +0 -2
- package/dist/tables-Cc3Wik4i.cjs.map +0 -1
- package/dist/tables-DrJKQPsT.mjs +0 -2
- package/dist/tables-DrJKQPsT.mjs.map +0 -1
- package/dist/ui/progress.cjs.map +0 -1
- package/dist/ui/progress.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as AnyEntity } from "../../types-
|
|
2
|
-
import { t as Input } from "../../input-
|
|
1
|
+
import { t as AnyEntity } from "../../types-CkRjAQZ2.mjs";
|
|
2
|
+
import { t as Input } from "../../input-BrM6EExy.mjs";
|
|
3
3
|
import * as react286 from "react";
|
|
4
4
|
import * as react_jsx_runtime346 from "react/jsx-runtime";
|
|
5
5
|
import { AccessorKeyColumnDef, CellContext, Column, ColumnPinningPosition, ColumnPinningState, Header, HeaderGroup, Row, RowSelectionState, Table } from "@tanstack/react-table";
|
|
@@ -46,9 +46,48 @@ declare const UITableBooleanDisplay: React.FC<{
|
|
|
46
46
|
value: boolean | null | undefined;
|
|
47
47
|
}>;
|
|
48
48
|
//#endregion
|
|
49
|
+
//#region packages/components/features/tables/components/atoms/currency-display.d.ts
|
|
50
|
+
/** Props for the {@link UITableCurrencyDisplay} component. */
|
|
51
|
+
type Props$7 = {
|
|
52
|
+
/** The numeric value to format as currency; falsy / `NaN` renders an empty state. */
|
|
53
|
+
value: number | string | null | undefined;
|
|
54
|
+
/** ISO 4217 currency code (default: `'USD'`). */
|
|
55
|
+
currency?: string;
|
|
56
|
+
/**
|
|
57
|
+
* BCP 47 locale used for number formatting (default: `'en-US'`).
|
|
58
|
+
* Controls digit grouping and decimal separators.
|
|
59
|
+
*/
|
|
60
|
+
locale?: string;
|
|
61
|
+
/** How to display the currency symbol — `'symbol'` (default), `'code'`, or `'name'`. */
|
|
62
|
+
display?: 'symbol' | 'code' | 'name';
|
|
63
|
+
/** Font-size variant (default: `'md'`). */
|
|
64
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
65
|
+
/** When `true`, applies a green tint for positive and red tint for negative values. */
|
|
66
|
+
colorize?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Formats a numeric value as a locale-aware currency string in a table cell.
|
|
70
|
+
* Always shows exactly two decimal places and uses the browser's `Intl` API for
|
|
71
|
+
* symbol placement. Renders {@link UITableEmpty} when the value is absent or
|
|
72
|
+
* invalid.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* import { UITableCurrencyDisplay } from '@customafk/lunas-ui/features/tables';
|
|
76
|
+
*
|
|
77
|
+
* <UITableCurrencyDisplay value={1234.5} currency="USD" colorize />
|
|
78
|
+
*/
|
|
79
|
+
declare const UITableCurrencyDisplay: react286.MemoExoticComponent<({
|
|
80
|
+
value,
|
|
81
|
+
currency,
|
|
82
|
+
locale,
|
|
83
|
+
display,
|
|
84
|
+
size,
|
|
85
|
+
colorize
|
|
86
|
+
}: Props$7) => react_jsx_runtime346.JSX.Element>;
|
|
87
|
+
//#endregion
|
|
49
88
|
//#region packages/components/features/tables/components/atoms/date-display.d.ts
|
|
50
89
|
/** Props for the {@link UITableDateDisplay} component. */
|
|
51
|
-
type Props$
|
|
90
|
+
type Props$6 = {
|
|
52
91
|
/** The date value to format and display; `null`/`undefined` renders an empty state. */
|
|
53
92
|
date: Date | string | number | null | undefined;
|
|
54
93
|
};
|
|
@@ -62,7 +101,7 @@ type Props$2 = {
|
|
|
62
101
|
*
|
|
63
102
|
* <UITableDateDisplay date={new Date('2024-06-15T10:30:00Z')} />
|
|
64
103
|
*/
|
|
65
|
-
declare const UITableDateDisplay: React.FC<Props$
|
|
104
|
+
declare const UITableDateDisplay: React.FC<Props$6>;
|
|
66
105
|
//#endregion
|
|
67
106
|
//#region packages/components/features/tables/components/atoms/description-display.d.ts
|
|
68
107
|
/**
|
|
@@ -80,6 +119,51 @@ declare const UITableDescriptionDisplay: React.FC<{
|
|
|
80
119
|
content: string | null | undefined | number;
|
|
81
120
|
}>;
|
|
82
121
|
//#endregion
|
|
122
|
+
//#region packages/components/features/tables/components/atoms/email-display.d.ts
|
|
123
|
+
/** Props for the {@link UITableEmailDisplay} component. */
|
|
124
|
+
type Props$5 = {
|
|
125
|
+
/** The email address to display; `null`/`undefined`/empty renders an empty state. */
|
|
126
|
+
email: string | null | undefined;
|
|
127
|
+
/** When `true`, a `mailto:` anchor wraps the address (default: `true`). */
|
|
128
|
+
linkable?: boolean;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Displays an email address in a table cell with a copy-to-clipboard button.
|
|
132
|
+
* Shows a brief checkmark confirmation after copying. Optionally wraps the
|
|
133
|
+
* address in a `mailto:` link. Renders {@link UITableEmpty} when `email` is
|
|
134
|
+
* absent.
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* import { UITableEmailDisplay } from '@customafk/lunas-ui/features/tables';
|
|
138
|
+
*
|
|
139
|
+
* <UITableEmailDisplay email="jane@example.com" />
|
|
140
|
+
*/
|
|
141
|
+
declare const UITableEmailDisplay: React.FC<Props$5>;
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region packages/components/features/tables/components/atoms/list-display.d.ts
|
|
144
|
+
/** Props for the {@link UITableListDisplay} component. */
|
|
145
|
+
type Props$4 = {
|
|
146
|
+
/** Array of strings or numbers to render as inline pills. */
|
|
147
|
+
items: (string | number)[] | null | undefined;
|
|
148
|
+
/**
|
|
149
|
+
* Maximum number of pills shown before a `+N more` overflow badge appears
|
|
150
|
+
* (default: `3`).
|
|
151
|
+
*/
|
|
152
|
+
maxVisible?: number;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Renders an array of values as compact inline pills in a table cell. When the
|
|
156
|
+
* list exceeds `maxVisible`, a `+N more` badge is shown; hovering it reveals all
|
|
157
|
+
* remaining items in a tooltip. Renders {@link UITableEmpty} for empty or absent
|
|
158
|
+
* arrays.
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* import { UITableListDisplay } from '@customafk/lunas-ui/features/tables';
|
|
162
|
+
*
|
|
163
|
+
* <UITableListDisplay items={['React', 'TypeScript', 'TailwindCSS', 'Vite']} maxVisible={3} />
|
|
164
|
+
*/
|
|
165
|
+
declare const UITableListDisplay: React.FC<Props$4>;
|
|
166
|
+
//#endregion
|
|
83
167
|
//#region packages/components/features/tables/components/atoms/more-button.d.ts
|
|
84
168
|
/**
|
|
85
169
|
* A vertical-ellipsis icon button that opens a dropdown menu populated from the
|
|
@@ -161,6 +245,41 @@ declare const UITablePhoneNumberDisplay: React.FC<React.PropsWithChildren<{
|
|
|
161
245
|
value: string;
|
|
162
246
|
}>>;
|
|
163
247
|
//#endregion
|
|
248
|
+
//#region packages/components/features/tables/components/atoms/progress-display.d.ts
|
|
249
|
+
/** Props for the {@link UITableProgressDisplay} component. */
|
|
250
|
+
type Props$3 = {
|
|
251
|
+
/** Percentage value between 0 and 100; `null`/`undefined` renders an empty state. */
|
|
252
|
+
value: number | null | undefined;
|
|
253
|
+
/** When `true`, shows the numeric percentage next to the bar (default: `true`). */
|
|
254
|
+
showLabel?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Color thresholds applied to the progress indicator.
|
|
257
|
+
* - `≥ successThreshold` → green
|
|
258
|
+
* - `≥ warningThreshold` → yellow
|
|
259
|
+
* - otherwise → red
|
|
260
|
+
*
|
|
261
|
+
* Defaults: `successThreshold = 70`, `warningThreshold = 40`.
|
|
262
|
+
*/
|
|
263
|
+
successThreshold?: number;
|
|
264
|
+
warningThreshold?: number;
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* Renders a horizontal progress bar with an optional percentage label for a
|
|
268
|
+
* table cell. The bar color shifts from red → yellow → green based on
|
|
269
|
+
* configurable thresholds. Renders {@link UITableEmpty} when `value` is absent.
|
|
270
|
+
*
|
|
271
|
+
* @example
|
|
272
|
+
* import { UITableProgressDisplay } from '@customafk/lunas-ui/features/tables';
|
|
273
|
+
*
|
|
274
|
+
* <UITableProgressDisplay value={75} />
|
|
275
|
+
*/
|
|
276
|
+
declare const UITableProgressDisplay: react286.MemoExoticComponent<({
|
|
277
|
+
value,
|
|
278
|
+
showLabel,
|
|
279
|
+
successThreshold,
|
|
280
|
+
warningThreshold
|
|
281
|
+
}: Props$3) => react_jsx_runtime346.JSX.Element>;
|
|
282
|
+
//#endregion
|
|
164
283
|
//#region packages/components/features/tables/components/atoms/remove-button.d.ts
|
|
165
284
|
/**
|
|
166
285
|
* A ghost danger icon button with a trash icon that triggers an async removal
|
|
@@ -183,7 +302,7 @@ declare const UITableRemoveButton: React.FC<{
|
|
|
183
302
|
//#endregion
|
|
184
303
|
//#region packages/components/features/tables/components/atoms/statistic.d.ts
|
|
185
304
|
/** Props for the {@link UITableStatisticDisplay} component. */
|
|
186
|
-
type Props$
|
|
305
|
+
type Props$2 = {
|
|
187
306
|
/** Character used to separate the integer and fractional parts (default: `'.'`). */
|
|
188
307
|
decimalSeparator?: string;
|
|
189
308
|
/** Character used to separate thousands groups (default: `','`). */
|
|
@@ -223,7 +342,38 @@ declare const UITableStatisticDisplay: react286.MemoExoticComponent<({
|
|
|
223
342
|
showTrailingZeros,
|
|
224
343
|
size,
|
|
225
344
|
value
|
|
226
|
-
}: Props$
|
|
345
|
+
}: Props$2) => react_jsx_runtime346.JSX.Element>;
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region packages/components/features/tables/components/atoms/status-display.d.ts
|
|
348
|
+
type BadgeColor = 'primary' | 'secondary' | 'muted' | 'accent' | 'info' | 'success' | 'warning' | 'danger';
|
|
349
|
+
/** Props for the {@link UITableStatusDisplay} component. */
|
|
350
|
+
type Props$1 = {
|
|
351
|
+
/** The status string to display; `null`/`undefined` renders an empty state. */
|
|
352
|
+
value: string | null | undefined;
|
|
353
|
+
/**
|
|
354
|
+
* Maps each status string to a badge color. Any key not present in the map
|
|
355
|
+
* falls back to `defaultColor`.
|
|
356
|
+
*/
|
|
357
|
+
colorMap?: Record<string, BadgeColor>;
|
|
358
|
+
/** Color used when `value` is not found in `colorMap` (default: `'muted'`). */
|
|
359
|
+
defaultColor?: BadgeColor;
|
|
360
|
+
/** Badge variant forwarded to the underlying {@link Badge} (default: `'soft'`). */
|
|
361
|
+
variant?: 'solid' | 'soft' | 'outline';
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Renders a color-coded status badge for a table cell. The mapping from status
|
|
365
|
+
* string to badge color is fully configurable via `colorMap`; unknown statuses
|
|
366
|
+
* fall back to `defaultColor`.
|
|
367
|
+
*
|
|
368
|
+
* @example
|
|
369
|
+
* import { UITableStatusDisplay } from '@customafk/lunas-ui/features/tables';
|
|
370
|
+
*
|
|
371
|
+
* <UITableStatusDisplay
|
|
372
|
+
* value="active"
|
|
373
|
+
* colorMap={{ active: 'success', inactive: 'danger', pending: 'warning' }}
|
|
374
|
+
* />
|
|
375
|
+
*/
|
|
376
|
+
declare const UITableStatusDisplay: React.FC<Props$1>;
|
|
227
377
|
//#endregion
|
|
228
378
|
//#region packages/components/features/tables/components/atoms/user.d.ts
|
|
229
379
|
/** Props for the {@link UITableUserDataDisplay} component. */
|
|
@@ -1010,5 +1160,5 @@ declare const UITableTooltipActions: React.FC<{
|
|
|
1010
1160
|
*/
|
|
1011
1161
|
declare const UITableTooltip: React.FC<React.PropsWithChildren>;
|
|
1012
1162
|
//#endregion
|
|
1013
|
-
export { RowData, TTableBodyContext, TTableContext, TTableHeadRowContext, TTableInnerTableContext, TTableInnerWrapperContext, TTableRowContext, TTableVirtualizerContext, TUITableBody, TUITableCell, TUITableCellActions, TUITableCellSelect, TUITableColumn, TUITableEmptyDisplay, TUITableFooter, TUITableHead, TUITableHeadCell, TUITableHeadCellOption, TUITableHeadCellSelect, TUITableHeadRow, TUITableInnerTable, TUITableInnerWrapper, TUITableLoadMore, TUITableRow, TUITableWrapper, TableProviderProps, UITableBadgeDisplay, UITableBody, UITableBooleanDisplay, UITableCell, UITableCellActions, UITableCellSelect, UITableContainer, UITableDateDisplay, UITableDescriptionDisplay, UITableEmptyDisplay, UITableFilter, UITableFooter, UITableHead, UITableHeadCell, UITableHeadCellOption, UITableHeadCellSelect, UITableHeadRow, UITableInnerTable, UITableInnerWrapper, UITableLoadMore, UITableMoreButton, UITableNameDisplay, UITablePermalink, UITablePhoneNumberDisplay, UITableProvider, UITableRemoveButton, UITableRow, UITableStatisticDisplay, UITableTooltip, UITableTooltipActions, UITableTooltipFilter, UITableUserDataDisplay, UITableWrapper };
|
|
1163
|
+
export { RowData, TTableBodyContext, TTableContext, TTableHeadRowContext, TTableInnerTableContext, TTableInnerWrapperContext, TTableRowContext, TTableVirtualizerContext, TUITableBody, TUITableCell, TUITableCellActions, TUITableCellSelect, TUITableColumn, TUITableEmptyDisplay, TUITableFooter, TUITableHead, TUITableHeadCell, TUITableHeadCellOption, TUITableHeadCellSelect, TUITableHeadRow, TUITableInnerTable, TUITableInnerWrapper, TUITableLoadMore, TUITableRow, TUITableWrapper, TableProviderProps, UITableBadgeDisplay, UITableBody, UITableBooleanDisplay, UITableCell, UITableCellActions, UITableCellSelect, UITableContainer, UITableCurrencyDisplay, UITableDateDisplay, UITableDescriptionDisplay, UITableEmailDisplay, UITableEmptyDisplay, UITableFilter, UITableFooter, UITableHead, UITableHeadCell, UITableHeadCellOption, UITableHeadCellSelect, UITableHeadRow, UITableInnerTable, UITableInnerWrapper, UITableListDisplay, UITableLoadMore, UITableMoreButton, UITableNameDisplay, UITablePermalink, UITablePhoneNumberDisplay, UITableProgressDisplay, UITableProvider, UITableRemoveButton, UITableRow, UITableStatisticDisplay, UITableStatusDisplay, UITableTooltip, UITableTooltipActions, UITableTooltipFilter, UITableUserDataDisplay, UITableWrapper };
|
|
1014
1164
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../button.variants-DeCyas1F.mjs";import"../../button-C6ybzxxj.mjs";import"../../paragraph-Ch5TvEqL.mjs";import"../../flex-BLMTj7Ev.mjs";import"../../date-CVz9xdCg.mjs";import"../../badge-B8bw2UEY.mjs";import"../../tooltip-Bj0iOG4s.mjs";import"../../avatar-DbxqvCjT.mjs";import"../../separator-BMsbHAVt.mjs";import{A as e,C as t,D as n,E as r,
|
|
1
|
+
import"../../button.variants-DeCyas1F.mjs";import"../../button-C6ybzxxj.mjs";import"../../paragraph-Ch5TvEqL.mjs";import"../../flex-BLMTj7Ev.mjs";import"../../date-CVz9xdCg.mjs";import"../../badge-B8bw2UEY.mjs";import"../../tooltip-Bj0iOG4s.mjs";import"../../avatar-DbxqvCjT.mjs";import"../../separator-BMsbHAVt.mjs";import{A as e,C as t,D as n,E as r,F as i,I as a,L as o,M as s,N as c,O as l,P as u,R as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,f as y,g as b,h as x,i as S,j as C,k as w,l as T,m as E,n as D,o as O,p as k,r as A,s as j,t as M,u as N,v as P,w as F,x as I,y as L}from"../../tables-DTazQIyy.mjs";import"../../dropdown-menu-DWSfXhHo.mjs";import"../../progress-0cpDwgAJ.mjs";import"../../checkbox-Dzo6oI4y.mjs";import"../../spinner-B3F9W53l.mjs";import"../../resizable-C2Zl-iLF.mjs";import"../../input-6f9JTc79.mjs";export{d as UITableBadgeDisplay,j as UITableBody,o as UITableBooleanDisplay,_ as UITableCell,T as UITableCellActions,N as UITableCellSelect,O as UITableContainer,a as UITableCurrencyDisplay,i as UITableDateDisplay,u as UITableDescriptionDisplay,c as UITableEmailDisplay,v as UITableEmptyDisplay,h as UITableFilter,y as UITableFooter,k as UITableHead,E as UITableHeadCell,x as UITableHeadCellOption,b as UITableHeadCellSelect,m as UITableHeadRow,P as UITableInnerTable,L as UITableInnerWrapper,s as UITableListDisplay,g as UITableLoadMore,C as UITableMoreButton,e as UITableNameDisplay,w as UITablePermalink,l as UITablePhoneNumberDisplay,n as UITableProgressDisplay,S as UITableProvider,r as UITableRemoveButton,I as UITableRow,p as UITableStatisticDisplay,F as UITableStatusDisplay,M as UITableTooltip,D as UITableTooltipActions,A as UITableTooltipFilter,t as UITableUserDataDisplay,f as UITableWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
require(`../../button.variants-tnhb123u.cjs`),require(`../../button-CwDT3m4m.cjs`),require(`../../heading-AKz5ewy-.cjs`),require(`../../paragraph-DN85Huc4.cjs`),require(`../../tooltip-itUmYz9k.cjs`),require(`../../separator-BwZb12bh.cjs`),require(`../../close-DXk_H3Gt.cjs`),require(`../../dialog-o_68LQXd.cjs`),require(`../../command-SHd-d_o0.cjs`),require(`../../checkbox-
|
|
1
|
+
require(`../../button.variants-tnhb123u.cjs`),require(`../../button-CwDT3m4m.cjs`),require(`../../heading-AKz5ewy-.cjs`),require(`../../paragraph-DN85Huc4.cjs`),require(`../../tooltip-itUmYz9k.cjs`),require(`../../separator-BwZb12bh.cjs`),require(`../../close-DXk_H3Gt.cjs`),require(`../../dialog-o_68LQXd.cjs`),require(`../../command-SHd-d_o0.cjs`),require(`../../checkbox-Di7ACavC.cjs`),require(`../../input-BMOYFJYM.cjs`);const e=require(`../../tanstack-form-Bb9JXuEq.cjs`);require(`../../popover-CmoqhK17.cjs`),require(`../../calendar-B2V4Lv0T.cjs`),require(`../../radio-group-DAv2EU3F.cjs`),require(`../../select-DfvSMRUq.cjs`),require(`../../textarea-CvoBIPlJ.cjs`),exports.Field=e.o,exports.FieldContent=e.s,exports.FieldContentMain=e.c,exports.FieldError=e.l,exports.FieldGroup=e.u,exports.FieldLabel=e.d,exports.FieldSeparator=e.f,exports.useTanStackFieldContext=e.t,exports.useTanStackForm=e.n,exports.useTanStackFormContext=e.r,exports.withTanStackFieldGroup=e.i,exports.withTanStackForm=e.a;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as withTanStackForm, c as FieldContentMain, d as FieldLabel, f as FieldSeparator, i as withTanStackFieldGroup, l as FieldError, n as useTanStackForm, o as Field, r as useTanStackFormContext, s as FieldContent, t as useTanStackFieldContext, u as FieldGroup } from "../../index-
|
|
1
|
+
import { a as withTanStackForm, c as FieldContentMain, d as FieldLabel, f as FieldSeparator, i as withTanStackFieldGroup, l as FieldError, n as useTanStackForm, o as Field, r as useTanStackFormContext, s as FieldContent, t as useTanStackFieldContext, u as FieldGroup } from "../../index-CO4_ENw7.cjs";
|
|
2
2
|
export { Field, FieldContent, FieldContentMain, FieldError, FieldGroup, FieldLabel, FieldSeparator, useTanStackFieldContext, useTanStackForm, useTanStackFormContext, withTanStackFieldGroup, withTanStackForm };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as withTanStackForm, c as FieldContentMain, d as FieldLabel, f as FieldSeparator, i as withTanStackFieldGroup, l as FieldError, n as useTanStackForm, o as Field, r as useTanStackFormContext, s as FieldContent, t as useTanStackFieldContext, u as FieldGroup } from "../../index-
|
|
1
|
+
import { a as withTanStackForm, c as FieldContentMain, d as FieldLabel, f as FieldSeparator, i as withTanStackFieldGroup, l as FieldError, n as useTanStackForm, o as Field, r as useTanStackFormContext, s as FieldContent, t as useTanStackFieldContext, u as FieldGroup } from "../../index-BIT9bkka.mjs";
|
|
2
2
|
export { Field, FieldContent, FieldContentMain, FieldError, FieldGroup, FieldLabel, FieldSeparator, useTanStackFieldContext, useTanStackForm, useTanStackFormContext, withTanStackFieldGroup, withTanStackForm };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../button.variants-DeCyas1F.mjs";import"../../button-C6ybzxxj.mjs";import"../../heading-DN67djxs.mjs";import"../../paragraph-Ch5TvEqL.mjs";import"../../tooltip-Bj0iOG4s.mjs";import"../../separator-BMsbHAVt.mjs";import"../../close-BU0kWRVo.mjs";import"../../dialog-BchwY6-N.mjs";import"../../command-bpcnKEbR.mjs";import"../../checkbox-
|
|
1
|
+
import"../../button.variants-DeCyas1F.mjs";import"../../button-C6ybzxxj.mjs";import"../../heading-DN67djxs.mjs";import"../../paragraph-Ch5TvEqL.mjs";import"../../tooltip-Bj0iOG4s.mjs";import"../../separator-BMsbHAVt.mjs";import"../../close-BU0kWRVo.mjs";import"../../dialog-BchwY6-N.mjs";import"../../command-bpcnKEbR.mjs";import"../../checkbox-Dzo6oI4y.mjs";import"../../input-6f9JTc79.mjs";import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"../../tanstack-form-BwyHENeF.mjs";import"../../popover-BFJhuzW3.mjs";import"../../calendar-Cw1G0sVL.mjs";import"../../radio-group-D5OurBIG.mjs";import"../../select-DRCKwnTV.mjs";import"../../textarea-5RD9ToTV.mjs";export{s as Field,l as FieldContent,t as FieldContentMain,a as FieldError,d as FieldGroup,n as FieldLabel,r as FieldSeparator,u as useTanStackFieldContext,o as useTanStackForm,c as useTanStackFormContext,i as withTanStackFieldGroup,e as withTanStackForm};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./separator-BwZb12bh.cjs`),n=require(`./label-
|
|
2
|
-
//# sourceMappingURL=field-
|
|
1
|
+
const e=require(`./chunk-Bmb41Sf3.cjs`),t=require(`./separator-BwZb12bh.cjs`),n=require(`./label-zyBJYydC.cjs`);let r=require(`lucide-react`),i=require(`react`),a=require(`react/jsx-runtime`),o=require(`@customafk/react-toolkit/utils`),s=require(`class-variance-authority`);const c=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,o.cn)(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));c.displayName=`FieldSet`;const l=(0,i.memo)(({className:e,variant:t=`legend`,...n})=>(0,a.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,o.cn)(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...n}));l.displayName=`FieldLegend`;const u=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-group`,className:(0,o.cn)(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));u.displayName=`FieldGroup`;const d=(0,s.cva)(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),f=(0,i.memo)(({className:e,orientation:t=`vertical`,...n})=>(0,a.jsx)(`div`,{"data-slot":`field`,"data-orientation":t,className:(0,o.cn)(d({orientation:t}),e),...n}));f.displayName=`Field`;const p=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-content`,className:(0,o.cn)(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));p.displayName=`FieldContent`;const m=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(n.t,{"data-slot":`field-label`,className:(0,o.cn)(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...t}));m.displayName=`FieldLabel`;const h=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(`div`,{"data-slot":`field-label`,className:(0,o.cn)(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));h.displayName=`FieldTitle`;const g=(0,i.memo)(({className:e,...t})=>(0,a.jsx)(`p`,{"data-slot":`field-description`,className:(0,o.cn)(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));g.displayName=`FieldDescription`;const _=(0,i.memo)(({children:e,className:n,...r})=>(0,a.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,o.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...r,children:[(0,a.jsx)(t.t,{className:`absolute inset-0 top-1/2`}),e&&(0,a.jsx)(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:e})]}));_.displayName=`FieldSeparator`;const v=(0,i.memo)(({className:e,children:t,errors:n,...s})=>{let c=(0,i.useMemo)(()=>t||(n?n?.length===1&&n[0]?.message?(0,a.jsxs)(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[(0,a.jsx)(r.BanIcon,{size:14}),(0,a.jsx)(`p`,{children:n[0].message})]}):(0,a.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:n.map(e=>typeof e==`string`?(0,a.jsx)(`li`,{children:e},e):e?.message?(0,a.jsx)(`li`,{children:e.message},e.message):null)}):null),[t,n]);return c?(0,a.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,o.cn)(`w-full font-normal text-danger text-xs`,e),...s,children:c}):null});v.displayName=`FieldError`,Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return h}});
|
|
2
|
+
//# sourceMappingURL=field-C51eJ6QN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-
|
|
1
|
+
{"version":3,"file":"field-C51eJ6QN.cjs","names":["Label","Separator","BanIcon"],"sources":["../packages/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { BanIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from '@/components/ui/label';\nimport { Separator } from '@/components/ui/separator';\n\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6', 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\nconst fieldVariants = cva('group/field flex w-full gap-3 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug',\n 'group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n '*:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5',\n 'has-data-[state=checked]:border-primary',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\nconst FieldSeparator = memo(\n ({\n children,\n className,\n ...props\n }: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n }) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n }\n);\nFieldSeparator.displayName = 'FieldSeparator';\n\nconst FieldError = memo(\n ({\n className,\n children,\n errors,\n ...props\n }: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n }) => {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <BanIcon size={14} />\n <p>{errors[0].message}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.message}>{error.message}</li>;\n })}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-normal text-danger text-xs', className)} {...props}>\n {content}\n </div>\n );\n }\n);\nFieldError.displayName = 'FieldError';\n\nexport { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSe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C,EAAAA,QAAAA,CAAQ,KAAM,GAAA,CAAM,EACrB,EAAA,EAAA,KAAC,IAAA,CAAA,SAAG,EAAO,GAAG,QAAA,CAAY,CAAA,EACtB,EAKR,EAAA,EAAA,KAAC,KAAA,CAAG,UAAU,8CACX,EAAO,IAAI,GACN,OAAO,GAAU,UAAiB,EAAA,EAAA,KAAC,KAAA,CAAA,SAAgB,EAAA,CAAR,EAAmB,CAC7D,GAAO,SACL,EAAA,EAAA,KAAC,KAAA,CAAA,SAAwB,EAAM,QAAA,CAAtB,EAAM,QAA6B,CADvB,KAE5B,EACC,CAnBE,MAqBR,CAAC,EAAU,EAAO,CAAC,CAMtB,OAJK,GAKH,EAAA,EAAA,KAAC,MAAA,CAAI,KAAK,QAAQ,YAAU,cAAc,WAAA,EAAA,EAAA,IAAc,yCAA0C,EAAU,CAAE,GAAI,WAC/G,GACG,CANC,MASZ,CACD,EAAW,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./separator-BMsbHAVt.mjs";import{t}from"./label-
|
|
2
|
-
//# sourceMappingURL=field-
|
|
1
|
+
import{t as e}from"./separator-BMsbHAVt.mjs";import{t}from"./label-3vAlNtF9.mjs";import{BanIcon as n}from"lucide-react";import{memo as r,useMemo as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{cn as s}from"@customafk/react-toolkit/utils";import{cva as c}from"class-variance-authority";const l=r(({className:e,...t})=>a(`fieldset`,{"data-slot":`field-set`,className:s(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t}));l.displayName=`FieldSet`;const u=r(({className:e,variant:t=`legend`,...n})=>a(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:s(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,e),...n}));u.displayName=`FieldLegend`;const d=r(({className:e,...t})=>a(`div`,{"data-slot":`field-group`,className:s(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t}));d.displayName=`FieldGroup`;const f=c(`group/field flex w-full gap-3 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:[`flex-col *:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`*:data-[slot=field-label]:flex-auto`,`has-[>[data-slot=field-content]]:items-start`,`has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col *:w-full [&>.sr-only]:w-auto`,`@md/field-group:flex-row`,`@md/field-group:items-center`,`@md/field-group:*:w-auto`,`@md/field-group:*:data-[slot=field-label]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start`,`@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}}),p=r(({className:e,orientation:t=`vertical`,...n})=>a(`div`,{"data-slot":`field`,"data-orientation":t,className:s(f({orientation:t}),e),...n}));p.displayName=`Field`;const m=r(({className:e,...t})=>a(`div`,{"data-slot":`field-content`,className:s(`group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug`,e),...t}));m.displayName=`FieldContent`;const h=r(({className:e,...n})=>a(t,{"data-slot":`field-label`,className:s(`group/field-label peer/field-label flex w-fit gap-2 leading-snug`,`group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full`,`has-[>[data-slot=field]]:flex-col`,`has-[>[data-slot=field]]:rounded-md`,`has-[>[data-slot=field]]:border`,`*:data-[slot=field]:p-4`,`has-data-[state=checked]:bg-primary/5`,`has-data-[state=checked]:border-primary`,e),...n}));h.displayName=`FieldLabel`;const g=r(({className:e,...t})=>a(`div`,{"data-slot":`field-label`,className:s(`flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50`,e),...t}));g.displayName=`FieldTitle`;const _=r(({className:e,...t})=>a(`p`,{"data-slot":`field-description`,className:s(`text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t}));_.displayName=`FieldDescription`;const v=r(({children:t,className:n,...r})=>o(`div`,{"data-slot":`field-separator`,"data-content":!!t,className:s(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,n),...r,children:[a(e,{className:`absolute inset-0 top-1/2`}),t&&a(`span`,{className:`relative mx-auto block w-fit bg-background px-2 text-text-positive-weak`,"data-slot":`field-separator-content`,children:t})]}));v.displayName=`FieldSeparator`;const y=r(({className:e,children:t,errors:r,...c})=>{let l=i(()=>t||(r?r?.length===1&&r[0]?.message?o(`div`,{className:`flex flex-row items-center justify-start gap-x-0.5`,children:[a(n,{size:14}),a(`p`,{children:r[0].message})]}):a(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(e=>typeof e==`string`?a(`li`,{children:e},e):e?.message?a(`li`,{children:e.message},e.message):null)}):null),[t,r]);return l?a(`div`,{role:`alert`,"data-slot":`field-error`,className:s(`w-full font-normal text-danger text-xs`,e),...c,children:l}):null});y.displayName=`FieldError`;export{d as a,v as c,y as i,l,m as n,h as o,_ as r,u as s,p as t,g as u};
|
|
2
|
+
//# sourceMappingURL=field-DfsTE4Ie.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-
|
|
1
|
+
{"version":3,"file":"field-DfsTE4Ie.mjs","names":[],"sources":["../packages/components/ui/field.tsx"],"sourcesContent":["'use client';\n\nimport { memo, useMemo } from 'react';\n\nimport { BanIcon } from 'lucide-react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { Label } from '@/components/ui/label';\nimport { Separator } from '@/components/ui/separator';\n\nconst FieldSet = memo(({ className, ...props }: React.ComponentProps<'fieldset'>) => {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn('flex flex-col gap-6', 'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3', className)}\n {...props}\n />\n );\n});\nFieldSet.displayName = 'FieldSet';\n\nconst FieldLegend = memo(({ className, variant = 'legend', ...props }: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) => {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}\n {...props}\n />\n );\n});\nFieldLegend.displayName = 'FieldLegend';\n\nconst FieldGroup = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n 'group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldGroup.displayName = 'FieldGroup';\n\nconst fieldVariants = cva('group/field flex w-full gap-3 data-[invalid=true]:text-destructive', {\n variants: {\n orientation: {\n vertical: ['flex-col *:w-full [&>.sr-only]:w-auto'],\n horizontal: [\n 'flex-row items-center',\n '*:data-[slot=field-label]:flex-auto',\n 'has-[>[data-slot=field-content]]:items-start',\n 'has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n responsive: [\n 'flex-col *:w-full [&>.sr-only]:w-auto',\n '@md/field-group:flex-row',\n '@md/field-group:items-center',\n '@md/field-group:*:w-auto',\n '@md/field-group:*:data-[slot=field-label]:flex-auto',\n '@md/field-group:has-[>[data-slot=field-content]]:items-start',\n '@md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',\n ],\n },\n },\n defaultVariants: {\n orientation: 'vertical',\n },\n});\n\nconst Field = memo(({ className, orientation = 'vertical', ...props }: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) => {\n return <div data-slot=\"field\" data-orientation={orientation} className={cn(fieldVariants({ orientation }), className)} {...props} />;\n});\nField.displayName = 'Field';\n\nconst FieldContent = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return <div data-slot=\"field-content\" className={cn('group/field-content flex basis-2/5 flex-col gap-1.5 leading-snug', className)} {...props} />;\n});\nFieldContent.displayName = 'FieldContent';\n\nconst FieldLabel = memo(({ className, ...props }: React.ComponentProps<typeof Label>) => {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n 'group/field-label peer/field-label flex w-fit gap-2 leading-snug',\n 'group-data-[disabled=true]/field:opacity-50',\n 'has-[>[data-slot=field]]:w-full',\n 'has-[>[data-slot=field]]:flex-col',\n 'has-[>[data-slot=field]]:rounded-md',\n 'has-[>[data-slot=field]]:border',\n '*:data-[slot=field]:p-4',\n 'has-data-[state=checked]:bg-primary/5',\n 'has-data-[state=checked]:border-primary',\n className\n )}\n {...props}\n />\n );\n});\nFieldLabel.displayName = 'FieldLabel';\n\nconst FieldTitle = memo(({ className, ...props }: React.ComponentProps<'div'>) => {\n return (\n <div\n data-slot=\"field-label\"\n className={cn('flex w-fit items-center gap-2 font-medium text-sm leading-snug group-data-[disabled=true]/field:opacity-50', className)}\n {...props}\n />\n );\n});\nFieldTitle.displayName = 'FieldTitle';\n\nconst FieldDescription = memo(({ className, ...props }: React.ComponentProps<'p'>) => {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n 'text-text-positive-weak text-sm leading-normal font-normal group-has-data-[orientation=horizontal]/field:text-balance',\n 'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',\n '[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',\n className\n )}\n {...props}\n />\n );\n});\nFieldDescription.displayName = 'FieldDescription';\n\nconst FieldSeparator = memo(\n ({\n children,\n className,\n ...props\n }: React.ComponentProps<'div'> & {\n children?: React.ReactNode;\n }) => {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span className=\"relative mx-auto block w-fit bg-background px-2 text-text-positive-weak\" data-slot=\"field-separator-content\">\n {children}\n </span>\n )}\n </div>\n );\n }\n);\nFieldSeparator.displayName = 'FieldSeparator';\n\nconst FieldError = memo(\n ({\n className,\n children,\n errors,\n ...props\n }: React.ComponentProps<'div'> & {\n errors?: Array<{ message?: string } | undefined>;\n }) => {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors) {\n return null;\n }\n\n if (errors?.length === 1 && errors[0]?.message) {\n return (\n <div className=\"flex flex-row items-center justify-start gap-x-0.5\">\n <BanIcon size={14} />\n <p>{errors[0].message}</p>\n </div>\n );\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {errors.map(error => {\n if (typeof error === 'string') return <li key={error}>{error}</li>;\n if (!error?.message) return null;\n return <li key={error.message}>{error.message}</li>;\n })}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div role=\"alert\" data-slot=\"field-error\" className={cn('w-full font-normal text-danger text-xs', className)} {...props}>\n {content}\n </div>\n );\n }\n);\nFieldError.displayName = 'FieldError';\n\nexport { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle };\n"],"mappings":"uTAYA,MAAM,EAAW,GAAM,CAAE,YAAW,GAAG,KAEnC,EAAC,WAAA,CACC,YAAU,YACV,UAAW,EAAG,sBAAuB,+EAAgF,EAAU,CAC/H,GAAI,GACJ,CAEJ,CACF,EAAS,YAAc,WAEvB,MAAM,EAAc,GAAM,CAAE,YAAW,UAAU,SAAU,GAAG,KAE1D,EAAC,SAAA,CACC,YAAU,eACV,eAAc,EACd,UAAW,EAAG,mBAAoB,kCAAmC,+BAAgC,EAAU,CAC/G,GAAI,GACJ,CAEJ,CACF,EAAY,YAAc,cAE1B,MAAM,EAAa,GAAM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