@caratlogic/design-system 0.1.25 → 0.1.27
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/components/molecules/CompanyCard/CompanyCard.d.ts +9 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.d.ts.map +1 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.parts.d.ts +4 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.parts.d.ts.map +1 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.types.d.ts +32 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.types.d.ts.map +1 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.utils.d.ts +4 -0
- package/dist/components/molecules/CompanyCard/CompanyCard.utils.d.ts.map +1 -0
- package/dist/components/molecules/CompanyCard/index.d.ts +3 -0
- package/dist/components/molecules/CompanyCard/index.d.ts.map +1 -0
- package/dist/components/molecules/DateInput/DateInput.d.ts +1 -1
- package/dist/components/molecules/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/molecules/DateInput/DateInput.types.d.ts +7 -0
- package/dist/components/molecules/DateInput/DateInput.types.d.ts.map +1 -1
- package/dist/components/molecules/FilterSelect/FilterMultiSelect.d.ts +8 -0
- package/dist/components/molecules/FilterSelect/FilterMultiSelect.d.ts.map +1 -1
- package/dist/components/molecules/InvoiceComboBox/InvoiceComboBox.d.ts.map +1 -1
- package/dist/components/molecules/InvoiceComboBox/InvoiceComboBox.utils.d.ts +4 -0
- package/dist/components/molecules/InvoiceComboBox/InvoiceComboBox.utils.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/SegmentedControl.d.ts +7 -5
- package/dist/components/molecules/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/SegmentedControl.types.d.ts +11 -4
- package/dist/components/molecules/SegmentedControl/SegmentedControl.types.d.ts.map +1 -1
- package/dist/components/molecules/SegmentedControl/SegmentedControl.utils.d.ts +9 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControl.utils.d.ts.map +1 -0
- package/dist/components/molecules/SegmentedControl/index.d.ts +1 -1
- package/dist/components/molecules/SegmentedControl/index.d.ts.map +1 -1
- package/dist/index.cjs.js +141 -59
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +141 -60
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export * from './components/molecules/ApiComboBox';
|
|
|
32
32
|
export * from './components/molecules/BusinessContactFilters';
|
|
33
33
|
export * from './components/molecules/CertificateRowList';
|
|
34
34
|
export * from './components/molecules/CollapsibleCard';
|
|
35
|
+
export * from './components/molecules/CompanyCard';
|
|
35
36
|
export * from './components/molecules/ConfirmDialog';
|
|
36
37
|
export * from './components/molecules/CountryStateSelect';
|
|
37
38
|
export * from './components/molecules/CurrencyDisplayTabs';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,OAAO,EACL,2BAA2B,EAC3B,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAG/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,i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zD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,0CAA0C,CAAC;AACzD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AAGxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAGhD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AAGxD,cAAc,8BAA8B,CAAC;AAG7C,cAAc,6BAA6B,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -2668,12 +2668,12 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
2668
2668
|
*/
|
|
2669
2669
|
|
|
2670
2670
|
|
|
2671
|
-
const __iconNode$
|
|
2671
|
+
const __iconNode$1p = [
|
|
2672
2672
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
2673
2673
|
["path", { d: "M17 18H3", key: "1amg6g" }],
|
|
2674
2674
|
["path", { d: "M21 6H3", key: "1jwq7v" }]
|
|
2675
2675
|
];
|
|
2676
|
-
const AlignLeft = createLucideIcon("align-left", __iconNode$
|
|
2676
|
+
const AlignLeft = createLucideIcon("align-left", __iconNode$1p);
|
|
2677
2677
|
|
|
2678
2678
|
/**
|
|
2679
2679
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2683,12 +2683,12 @@ const AlignLeft = createLucideIcon("align-left", __iconNode$1o);
|
|
|
2683
2683
|
*/
|
|
2684
2684
|
|
|
2685
2685
|
|
|
2686
|
-
const __iconNode$
|
|
2686
|
+
const __iconNode$1o = [
|
|
2687
2687
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
2688
2688
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
2689
2689
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
2690
2690
|
];
|
|
2691
|
-
const Archive = createLucideIcon("archive", __iconNode$
|
|
2691
|
+
const Archive = createLucideIcon("archive", __iconNode$1o);
|
|
2692
2692
|
|
|
2693
2693
|
/**
|
|
2694
2694
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2698,11 +2698,11 @@ const Archive = createLucideIcon("archive", __iconNode$1n);
|
|
|
2698
2698
|
*/
|
|
2699
2699
|
|
|
2700
2700
|
|
|
2701
|
-
const __iconNode$
|
|
2701
|
+
const __iconNode$1n = [
|
|
2702
2702
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
2703
2703
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
2704
2704
|
];
|
|
2705
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
2705
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1n);
|
|
2706
2706
|
|
|
2707
2707
|
/**
|
|
2708
2708
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2712,11 +2712,11 @@ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$1m);
|
|
|
2712
2712
|
*/
|
|
2713
2713
|
|
|
2714
2714
|
|
|
2715
|
-
const __iconNode$
|
|
2715
|
+
const __iconNode$1m = [
|
|
2716
2716
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
2717
2717
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
2718
2718
|
];
|
|
2719
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
2719
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$1m);
|
|
2720
2720
|
|
|
2721
2721
|
/**
|
|
2722
2722
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2726,11 +2726,11 @@ const ArrowRight = createLucideIcon("arrow-right", __iconNode$1l);
|
|
|
2726
2726
|
*/
|
|
2727
2727
|
|
|
2728
2728
|
|
|
2729
|
-
const __iconNode$
|
|
2729
|
+
const __iconNode$1l = [
|
|
2730
2730
|
["path", { d: "M4.929 4.929 19.07 19.071", key: "196cmz" }],
|
|
2731
2731
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
2732
2732
|
];
|
|
2733
|
-
const Ban = createLucideIcon("ban", __iconNode$
|
|
2733
|
+
const Ban = createLucideIcon("ban", __iconNode$1l);
|
|
2734
2734
|
|
|
2735
2735
|
/**
|
|
2736
2736
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2740,7 +2740,7 @@ const Ban = createLucideIcon("ban", __iconNode$1k);
|
|
|
2740
2740
|
*/
|
|
2741
2741
|
|
|
2742
2742
|
|
|
2743
|
-
const __iconNode$
|
|
2743
|
+
const __iconNode$1k = [
|
|
2744
2744
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
2745
2745
|
[
|
|
2746
2746
|
"path",
|
|
@@ -2751,7 +2751,7 @@ const __iconNode$1j = [
|
|
|
2751
2751
|
],
|
|
2752
2752
|
["circle", { cx: "18", cy: "8", r: "3", key: "1g0gzu" }]
|
|
2753
2753
|
];
|
|
2754
|
-
const BellDot = createLucideIcon("bell-dot", __iconNode$
|
|
2754
|
+
const BellDot = createLucideIcon("bell-dot", __iconNode$1k);
|
|
2755
2755
|
|
|
2756
2756
|
/**
|
|
2757
2757
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2761,7 +2761,7 @@ const BellDot = createLucideIcon("bell-dot", __iconNode$1j);
|
|
|
2761
2761
|
*/
|
|
2762
2762
|
|
|
2763
2763
|
|
|
2764
|
-
const __iconNode$
|
|
2764
|
+
const __iconNode$1j = [
|
|
2765
2765
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
2766
2766
|
["path", { d: "M22 8c0-2.3-.8-4.3-2-6", key: "5bb3ad" }],
|
|
2767
2767
|
[
|
|
@@ -2773,7 +2773,7 @@ const __iconNode$1i = [
|
|
|
2773
2773
|
],
|
|
2774
2774
|
["path", { d: "M4 2C2.8 3.7 2 5.7 2 8", key: "tap9e0" }]
|
|
2775
2775
|
];
|
|
2776
|
-
const BellRing = createLucideIcon("bell-ring", __iconNode$
|
|
2776
|
+
const BellRing = createLucideIcon("bell-ring", __iconNode$1j);
|
|
2777
2777
|
|
|
2778
2778
|
/**
|
|
2779
2779
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2783,7 +2783,7 @@ const BellRing = createLucideIcon("bell-ring", __iconNode$1i);
|
|
|
2783
2783
|
*/
|
|
2784
2784
|
|
|
2785
2785
|
|
|
2786
|
-
const __iconNode$
|
|
2786
|
+
const __iconNode$1i = [
|
|
2787
2787
|
["path", { d: "M10.268 21a2 2 0 0 0 3.464 0", key: "vwvbt9" }],
|
|
2788
2788
|
[
|
|
2789
2789
|
"path",
|
|
@@ -2793,7 +2793,7 @@ const __iconNode$1h = [
|
|
|
2793
2793
|
}
|
|
2794
2794
|
]
|
|
2795
2795
|
];
|
|
2796
|
-
const Bell = createLucideIcon("bell", __iconNode$
|
|
2796
|
+
const Bell = createLucideIcon("bell", __iconNode$1i);
|
|
2797
2797
|
|
|
2798
2798
|
/**
|
|
2799
2799
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -2803,13 +2803,32 @@ const Bell = createLucideIcon("bell", __iconNode$1h);
|
|
|
2803
2803
|
*/
|
|
2804
2804
|
|
|
2805
2805
|
|
|
2806
|
-
const __iconNode$
|
|
2806
|
+
const __iconNode$1h = [
|
|
2807
2807
|
[
|
|
2808
2808
|
"path",
|
|
2809
2809
|
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
2810
2810
|
]
|
|
2811
2811
|
];
|
|
2812
|
-
const Bold$1 = createLucideIcon("bold", __iconNode$
|
|
2812
|
+
const Bold$1 = createLucideIcon("bold", __iconNode$1h);
|
|
2813
|
+
|
|
2814
|
+
/**
|
|
2815
|
+
* @license lucide-react v0.539.0 - ISC
|
|
2816
|
+
*
|
|
2817
|
+
* This source code is licensed under the ISC license.
|
|
2818
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
2819
|
+
*/
|
|
2820
|
+
|
|
2821
|
+
|
|
2822
|
+
const __iconNode$1g = [
|
|
2823
|
+
["path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z", key: "1b4qmf" }],
|
|
2824
|
+
["path", { d: "M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2", key: "i71pzd" }],
|
|
2825
|
+
["path", { d: "M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2", key: "10jefs" }],
|
|
2826
|
+
["path", { d: "M10 6h4", key: "1itunk" }],
|
|
2827
|
+
["path", { d: "M10 10h4", key: "tcdvrf" }],
|
|
2828
|
+
["path", { d: "M10 14h4", key: "kelpxr" }],
|
|
2829
|
+
["path", { d: "M10 18h4", key: "1ulq68" }]
|
|
2830
|
+
];
|
|
2831
|
+
const Building2 = createLucideIcon("building-2", __iconNode$1g);
|
|
2813
2832
|
|
|
2814
2833
|
/**
|
|
2815
2834
|
* @license lucide-react v0.539.0 - ISC
|
|
@@ -15250,7 +15269,7 @@ const isFilterActive = (value, resetValue) => !!value && value !== resetValue;
|
|
|
15250
15269
|
* `FilterSelect` trigger look (filter icon + count badge when active).
|
|
15251
15270
|
* Selecting items keeps the popover open; the trigger shows the count.
|
|
15252
15271
|
*/
|
|
15253
|
-
const FilterMultiSelect = ({ label, value, onChange, options, triggerClassName, contentClassName, }) => {
|
|
15272
|
+
const FilterMultiSelect = ({ label, value, onChange, options, triggerClassName, contentClassName, listClassName, modal = false, }) => {
|
|
15254
15273
|
const active = value.length > 0;
|
|
15255
15274
|
const toggle = (optValue) => {
|
|
15256
15275
|
if (value.includes(optValue)) {
|
|
@@ -15260,7 +15279,7 @@ const FilterMultiSelect = ({ label, value, onChange, options, triggerClassName,
|
|
|
15260
15279
|
onChange([...value, optValue]);
|
|
15261
15280
|
}
|
|
15262
15281
|
};
|
|
15263
|
-
return (jsxs(Popover, { children: [jsx(PopoverTrigger, { className: cn(TRIGGER_BASE, 'inline-flex items-center justify-between', active && TRIGGER_ACTIVE, triggerClassName), children: jsxs("span", { className: "flex items-center gap-2", children: [jsx(Funnel, { className: cn('h-4 w-4 shrink-0', active ? 'text-primary' : 'text-muted-foreground'), "aria-hidden": "true" }), label, active && (jsx("span", { className: "ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded bg-primary/10 px-1 text-[10px] font-semibold leading-none text-primary", children: value.length }))] }) }), jsx(PopoverContent, { align: "start", className: cn('w-56 p-1', contentClassName), children: jsx("div", { className:
|
|
15282
|
+
return (jsxs(Popover, { modal: modal, children: [jsx(PopoverTrigger, { className: cn(TRIGGER_BASE, 'inline-flex items-center justify-between', active && TRIGGER_ACTIVE, triggerClassName), children: jsxs("span", { className: "flex items-center gap-2", children: [jsx(Funnel, { className: cn('h-4 w-4 shrink-0', active ? 'text-primary' : 'text-muted-foreground'), "aria-hidden": "true" }), label, active && (jsx("span", { className: "ml-1 inline-flex h-4 min-w-4 items-center justify-center rounded bg-primary/10 px-1 text-[10px] font-semibold leading-none text-primary", children: value.length }))] }) }), jsx(PopoverContent, { align: "start", className: cn('w-56 p-1', contentClassName), children: jsx("div", { className: cn('max-h-[18rem] overflow-y-auto', listClassName), children: options.map((opt) => {
|
|
15264
15283
|
const checked = value.includes(opt.value);
|
|
15265
15284
|
return (jsxs("button", { type: "button", onClick: () => toggle(opt.value), className: "flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-foreground hover:bg-muted/60", children: [jsx(Checkbox, { checked: checked, onCheckedChange: () => toggle(opt.value),
|
|
15266
15285
|
// Stop the inner checkbox click from double-toggling via the button.
|
|
@@ -15366,6 +15385,48 @@ const CollapsibleCard = ({ title, subtitle, icon, headerActions, defaultOpen = t
|
|
|
15366
15385
|
return (jsxs("section", { className: cn('overflow-hidden rounded-xl border border-border bg-card shadow-card', className), children: [jsxs("header", { className: cn('flex items-center gap-3 bg-muted/30 px-4 py-3', isOpen && 'border-b border-border', headerClassName), children: [icon && jsx(SectionIcon, { children: icon }), jsxs("div", { className: "flex min-w-0 shrink flex-col gap-0.5", children: [jsx("h3", { className: "truncate text-sm font-medium text-foreground", children: title }), subtitle && (jsx("div", { className: "truncate text-xs text-muted-foreground", children: subtitle }))] }), headerActions && (jsx("div", { className: "ml-auto flex min-w-0 flex-1 items-center justify-end gap-2", children: headerActions })), !headerActions && jsx("div", { className: "flex-1" }), !nonCollapsible && (jsx("button", { type: "button", onClick: toggle, "aria-expanded": isOpen, "aria-label": isOpen ? 'Collapse section' : 'Expand section', className: "inline-flex h-7 w-7 cursor-pointer items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30", children: jsx(ChevronDown, { className: cn('h-4 w-4 transition-transform duration-200', isOpen && 'rotate-180'), "aria-hidden": "true" }) }))] }), isOpen && jsx("div", { className: cn('p-4', bodyClassName), children: children })] }));
|
|
15367
15386
|
};
|
|
15368
15387
|
|
|
15388
|
+
const HEADER_TONE_CLASSES = {
|
|
15389
|
+
neutral: 'bg-[var(--section-header)]',
|
|
15390
|
+
gem: 'bg-primary/5 dark:bg-[#173626]',
|
|
15391
|
+
diamond: 'bg-blue-50 dark:bg-[#0284C7]/20',
|
|
15392
|
+
};
|
|
15393
|
+
const ICON_TONE_CLASSES$1 = {
|
|
15394
|
+
neutral: 'bg-primary/10 text-primary',
|
|
15395
|
+
gem: 'bg-primary/10 text-primary',
|
|
15396
|
+
diamond: 'bg-blue-100 text-blue-500',
|
|
15397
|
+
};
|
|
15398
|
+
/**
|
|
15399
|
+
* Section panel used across the redesigned create/edit forms: a rounded card
|
|
15400
|
+
* with a tinted header band (icon square + title + description) above a
|
|
15401
|
+
* divider, then the form body. The icon-square + title + description header
|
|
15402
|
+
* is the recurring pattern in the new designs.
|
|
15403
|
+
* divider, then the form body.
|
|
15404
|
+
*/
|
|
15405
|
+
const FormSectionCard = ({ icon, title, description, headerAction, children, className, bodyClassName, tone = 'neutral', headerClassName, }) => {
|
|
15406
|
+
return (jsxs("section", { className: cn('overflow-hidden rounded-xl border border-border bg-card shadow-card', className), children: [jsxs("header", { className: cn('flex items-center justify-between gap-4 border-b border-border px-5 py-4', HEADER_TONE_CLASSES[tone], headerClassName), children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: cn('inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-md', ICON_TONE_CLASSES$1[tone]), children: icon }), jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-base font-medium text-foreground", children: title }), description && (jsx("p", { className: "text-[13px] font-normal text-label", children: description }))] })] }), headerAction] }), jsx("div", { className: cn('p-5', bodyClassName), children: children })] }));
|
|
15407
|
+
};
|
|
15408
|
+
|
|
15409
|
+
function CompanyCardField({ label, children, emptyLabel, className, }) {
|
|
15410
|
+
return (jsxs("div", { className: cn('flex min-w-0 flex-col gap-1', className), children: [jsx("p", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: label }), children ? (jsx("div", { className: "truncate text-sm font-medium leading-5 text-foreground", children: children })) : (jsx("p", { className: "text-sm font-medium italic leading-5 text-muted-foreground", children: emptyLabel }))] }));
|
|
15411
|
+
}
|
|
15412
|
+
|
|
15413
|
+
/** `—` is the placeholder the apps' display helpers return for a missing value. */
|
|
15414
|
+
function hasValue(value) {
|
|
15415
|
+
const trimmed = value?.trim();
|
|
15416
|
+
return !!trimmed && trimmed !== '—';
|
|
15417
|
+
}
|
|
15418
|
+
function getInitial(name) {
|
|
15419
|
+
return (name.trim()[0] ?? '?').toUpperCase();
|
|
15420
|
+
}
|
|
15421
|
+
|
|
15422
|
+
/**
|
|
15423
|
+
* A business contact at a glance: avatar + name, email / phone / tax number,
|
|
15424
|
+
* then the address. Data-only — the app formats each value before passing it.
|
|
15425
|
+
*/
|
|
15426
|
+
function CompanyCard({ name, subtitle, email, phone, taxNumber, address, viewHref, viewLabel = 'View company', title = 'Company', icon = jsx(Building2, { className: "size-5", "aria-hidden": true }), emptyLabel = 'Not provided', className, }) {
|
|
15427
|
+
return (jsxs(FormSectionCard, { icon: icon, title: title, className: className, headerClassName: "px-4 py-3", bodyClassName: "flex flex-col gap-4 p-4", headerAction: viewHref ? (jsx(TextHyperlink, { href: viewHref, showIcon: false, className: "shrink-0 text-sm font-medium", children: viewLabel })) : undefined, children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { "aria-hidden": true, className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-primary text-sm font-semibold text-primary-foreground", children: getInitial(name) }), jsxs("div", { className: "min-w-0", children: [jsx("p", { className: "break-words text-base font-semibold leading-6 text-foreground", children: name }), hasValue(subtitle) ? (jsx("p", { className: "break-words text-xs leading-4 text-muted-foreground", children: subtitle })) : null] })] }), jsxs("div", { className: cn('grid grid-cols-1 gap-4', taxNumber ? 'sm:grid-cols-3' : 'sm:grid-cols-2'), children: [jsx(CompanyCardField, { label: "Email", emptyLabel: emptyLabel, children: hasValue(email) ? (jsx("a", { href: `mailto:${email}`, className: "text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: email })) : null }), jsx(CompanyCardField, { label: "Phone", emptyLabel: emptyLabel, children: hasValue(phone) ? phone : null }), taxNumber ? (jsx(CompanyCardField, { label: taxNumber.label, emptyLabel: emptyLabel, children: hasValue(taxNumber.value) ? taxNumber.value : null })) : null] }), jsx(CompanyCardField, { label: "Address", emptyLabel: emptyLabel, className: "border-t border-border pt-4", children: hasValue(address) ? jsx("span", { className: "whitespace-normal break-words", children: address }) : null })] }));
|
|
15428
|
+
}
|
|
15429
|
+
|
|
15369
15430
|
function commonjsRequire(path) {
|
|
15370
15431
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
15371
15432
|
}
|
|
@@ -37058,7 +37119,7 @@ styleInject(css_248z$1);
|
|
|
37058
37119
|
* Date field that can be typed or picked. The text box takes a masked
|
|
37059
37120
|
* `DD/MM/YYYY` entry; the trailing button opens the same calendar as before.
|
|
37060
37121
|
*/
|
|
37061
|
-
function DateInput({ value, onChange, onBlur, name, id, className, min, max, disabled, placeholder = DATE_FORMAT, ariaLabel, }) {
|
|
37122
|
+
function DateInput({ value, onChange, onBlur, name, id, className, min, max, disabled, placeholder = DATE_FORMAT, ariaLabel, align = 'start', }) {
|
|
37062
37123
|
const { open, text, invalid, bounds, inputRef, handleOpenChange, handleTextChange, handleKeyDown, handleTextBlur, toggleOpen, selectDate, clearDate, selectToday, } = useDateInput({ value, onChange, onBlur, min, max, disabled });
|
|
37063
37124
|
// NOTE: We drive `open` ourselves from the button's onClick instead of using
|
|
37064
37125
|
// Radix's <PopoverTrigger> toggle. When this Popover is nested inside the
|
|
@@ -37068,7 +37129,7 @@ function DateInput({ value, onChange, onBlur, name, id, className, min, max, dis
|
|
|
37068
37129
|
// source of truth — no double-fire, and it works across browsers. `modal`
|
|
37069
37130
|
// lets the open popover own pointer events above the dialog so the calendar
|
|
37070
37131
|
// (portalled to <body>) stays clickable.
|
|
37071
|
-
return (jsxs(Popover, { open: open, onOpenChange: handleOpenChange, modal: true, children: [jsx(PopoverAnchor, { asChild: true, children: jsxs("div", { "data-slot": "input", "data-empty": !value || undefined, "data-invalid": invalid || undefined, className: cn('border-input-border flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-transparent px-3 py-1 shadow-[0_1px_2px_0_#0000000d] transition-[color,box-shadow] outline-none', 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]', 'data-[invalid]:border-destructive data-[invalid]:ring-destructive/20 data-[invalid]:ring-[3px]', disabled && 'cursor-not-allowed bg-muted/50 text-label', className), children: [jsx("input", { ref: inputRef, type: "text", inputMode: "numeric", autoComplete: "off", spellCheck: false, id: id, name: name, value: text, placeholder: placeholder, disabled: disabled, maxLength: DATE_FORMAT.length, "aria-label": ariaLabel, "aria-invalid": invalid || undefined, title: DATE_FORMAT_HINT, onChange: handleTextChange, onKeyDown: handleKeyDown, onBlur: handleTextBlur, className: "placeholder:text-placeholder selection:bg-primary selection:text-primary-foreground h-full min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-sm disabled:cursor-not-allowed disabled:text-label md:text-sm" }), jsx("button", { type: "button", disabled: disabled, "aria-label": CALENDAR_BUTTON_LABEL, "aria-haspopup": "dialog", "aria-expanded": open, onClick: toggleOpen, className: "-mr-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-ring/50 focus-visible:ring-[2px] disabled:cursor-not-allowed", children: jsx(CalendarDays, { className: "h-4 w-4 stroke-[1.75]" }) })] }) }), jsx(PopoverContent, { align:
|
|
37132
|
+
return (jsxs(Popover, { open: open, onOpenChange: handleOpenChange, modal: true, children: [jsx(PopoverAnchor, { asChild: true, children: jsxs("div", { "data-slot": "input", "data-empty": !value || undefined, "data-invalid": invalid || undefined, className: cn('border-input-border flex h-9 w-full min-w-0 items-center gap-2 rounded-md border bg-transparent px-3 py-1 shadow-[0_1px_2px_0_#0000000d] transition-[color,box-shadow] outline-none', 'focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]', 'data-[invalid]:border-destructive data-[invalid]:ring-destructive/20 data-[invalid]:ring-[3px]', disabled && 'cursor-not-allowed bg-muted/50 text-label', className), children: [jsx("input", { ref: inputRef, type: "text", inputMode: "numeric", autoComplete: "off", spellCheck: false, id: id, name: name, value: text, placeholder: placeholder, disabled: disabled, maxLength: DATE_FORMAT.length, "aria-label": ariaLabel, "aria-invalid": invalid || undefined, title: DATE_FORMAT_HINT, onChange: handleTextChange, onKeyDown: handleKeyDown, onBlur: handleTextBlur, className: "placeholder:text-placeholder selection:bg-primary selection:text-primary-foreground h-full min-w-0 flex-1 bg-transparent text-base text-foreground outline-none placeholder:text-sm disabled:cursor-not-allowed disabled:text-label md:text-sm" }), jsx("button", { type: "button", disabled: disabled, "aria-label": CALENDAR_BUTTON_LABEL, "aria-haspopup": "dialog", "aria-expanded": open, onClick: toggleOpen, className: "-mr-1 inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-sm text-muted-foreground outline-none hover:text-foreground focus-visible:ring-ring/50 focus-visible:ring-[2px] disabled:cursor-not-allowed", children: jsx(CalendarDays, { className: "h-4 w-4 stroke-[1.75]" }) })] }) }), jsx(PopoverContent, { align: align, className: "date-range-picker-popover w-auto p-4", children: jsx(DatePicker, { inline: true, selected: value ?? null, minDate: toBoundDate(bounds.minDate), maxDate: toBoundDate(bounds.maxDate), onChange: selectDate, calendarClassName: "date-range-picker-calendar", formatWeekDay: (weekday) => weekday.slice(0, 2), renderCustomHeader: ({ monthDate, changeYear, changeMonth, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled, }) => (jsx(DatePickerHeader, { monthDate: monthDate, changeYear: changeYear, changeMonth: changeMonth, decreaseMonth: decreaseMonth, increaseMonth: increaseMonth, prevMonthButtonDisabled: prevMonthButtonDisabled, nextMonthButtonDisabled: nextMonthButtonDisabled, minYear: bounds.minYear, maxYear: bounds.maxYear })), children: jsxs("div", { className: "date-range-picker-footer", children: [jsx("button", { type: "button", onClick: clearDate, className: "date-range-picker-action", children: "Clear" }), jsx("button", { type: "button", onClick: selectToday, className: "date-range-picker-action", children: "Today" })] }) }) })] }));
|
|
37072
37133
|
}
|
|
37073
37134
|
|
|
37074
37135
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
@@ -37603,27 +37664,6 @@ const InAppNotificationCard = ({ notification, onSelect, defaultIcon, className,
|
|
|
37603
37664
|
return (jsxs("button", { type: "button", onClick: () => onSelect(notification), className: getInAppNotificationCardClasses(isRead, className), children: [jsx("span", { className: getInAppNotificationIconClasses(isRead), children: icon ?? defaultIcon ?? (jsx(BellDot, { className: "size-4", "aria-hidden": "true" })) }), jsxs("span", { className: "min-w-0 flex-1", children: [jsxs("span", { className: "flex items-baseline gap-2", children: [!isRead && (jsx("span", { role: "img", "aria-label": inAppNotificationCardA11y.unreadLabel, className: "size-1.5 shrink-0 rounded-full bg-primary" })), jsx("span", { className: cn('min-w-0 flex-1 truncate text-sm text-foreground', isRead ? 'font-medium' : 'font-semibold'), children: title }), jsx("time", { className: "shrink-0 text-[0.6875rem] text-muted-foreground tabular-nums", children: formatRelativeTime(createdAt) })] }), jsx("span", { className: "mt-1 line-clamp-1 text-xs text-secondary-foreground", children: message }), subject && (jsx("span", { className: "mt-0.5 block truncate text-[0.6875rem] font-medium text-muted-foreground", children: subject }))] })] }));
|
|
37604
37665
|
};
|
|
37605
37666
|
|
|
37606
|
-
const HEADER_TONE_CLASSES = {
|
|
37607
|
-
neutral: 'bg-[var(--section-header)]',
|
|
37608
|
-
gem: 'bg-primary/5 dark:bg-[#173626]',
|
|
37609
|
-
diamond: 'bg-blue-50 dark:bg-[#0284C7]/20',
|
|
37610
|
-
};
|
|
37611
|
-
const ICON_TONE_CLASSES$1 = {
|
|
37612
|
-
neutral: 'bg-primary/10 text-primary',
|
|
37613
|
-
gem: 'bg-primary/10 text-primary',
|
|
37614
|
-
diamond: 'bg-blue-100 text-blue-500',
|
|
37615
|
-
};
|
|
37616
|
-
/**
|
|
37617
|
-
* Section panel used across the redesigned create/edit forms: a rounded card
|
|
37618
|
-
* with a tinted header band (icon square + title + description) above a
|
|
37619
|
-
* divider, then the form body. The icon-square + title + description header
|
|
37620
|
-
* is the recurring pattern in the new designs.
|
|
37621
|
-
* divider, then the form body.
|
|
37622
|
-
*/
|
|
37623
|
-
const FormSectionCard = ({ icon, title, description, headerAction, children, className, bodyClassName, tone = 'neutral', headerClassName, }) => {
|
|
37624
|
-
return (jsxs("section", { className: cn('overflow-hidden rounded-xl border border-border bg-card shadow-card', className), children: [jsxs("header", { className: cn('flex items-center justify-between gap-4 border-b border-border px-5 py-4', HEADER_TONE_CLASSES[tone], headerClassName), children: [jsxs("div", { className: "flex items-center gap-3", children: [jsx("span", { className: cn('inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-md', ICON_TONE_CLASSES$1[tone]), children: icon }), jsxs("div", { className: "space-y-0.5", children: [jsx("p", { className: "text-base font-medium text-foreground", children: title }), description && (jsx("p", { className: "text-[13px] font-normal text-label", children: description }))] })] }), headerAction] }), jsx("div", { className: cn('p-5', bodyClassName), children: children })] }));
|
|
37625
|
-
};
|
|
37626
|
-
|
|
37627
37667
|
const TONE_STYLES = {
|
|
37628
37668
|
info: {
|
|
37629
37669
|
container: 'border-border bg-section-header',
|
|
@@ -37973,6 +38013,21 @@ function formatCurrency(amount, currency) {
|
|
|
37973
38013
|
currency: currency || 'USD',
|
|
37974
38014
|
}).format(amount);
|
|
37975
38015
|
}
|
|
38016
|
+
/** The currency the invoice was issued in; `baseCurrency` is only its ledger currency. */
|
|
38017
|
+
function getInvoiceCurrency(invoice) {
|
|
38018
|
+
const target = invoice.target?.currency?.trim().toUpperCase();
|
|
38019
|
+
return target && invoice.target?.rate ? target : invoice.baseCurrency || 'USD';
|
|
38020
|
+
}
|
|
38021
|
+
function getInvoiceCompany(invoice) {
|
|
38022
|
+
return invoice.customer?.companyName || invoice.customer?.contactName || 'N/A';
|
|
38023
|
+
}
|
|
38024
|
+
function getInvoiceLocation(invoice) {
|
|
38025
|
+
const address = invoice.customer?.address ?? invoice.address;
|
|
38026
|
+
return [address?.city, address?.state, address?.country]
|
|
38027
|
+
.map((part) => part?.trim())
|
|
38028
|
+
.filter(Boolean)
|
|
38029
|
+
.join(', ');
|
|
38030
|
+
}
|
|
37976
38031
|
|
|
37977
38032
|
function useInvoiceComboBox(fetchInvoices, statusFilter) {
|
|
37978
38033
|
const fetchPage = useCallback(async ({ page, limit, search }) => {
|
|
@@ -38037,7 +38092,8 @@ function InvoiceComboBox({ selectedItem, onSelect, fetchInvoices, searchPlacehol
|
|
|
38037
38092
|
const invoice = item.data;
|
|
38038
38093
|
const invoiceDate = new Date(invoice.invoiceDate).toLocaleDateString();
|
|
38039
38094
|
const dueDate = new Date(invoice.paymentDueDate).toLocaleDateString();
|
|
38040
|
-
|
|
38095
|
+
const location = getInvoiceLocation(invoice);
|
|
38096
|
+
return (jsxs("div", { className: "flex-1 min-w-0", children: [jsxs("div", { className: "flex items-center justify-between gap-2 mb-1", children: [jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [jsx("span", { className: "font-semibold text-sm text-foreground", children: invoice.invoiceNumber }), jsx(StatusBadge, { status: invoice.status })] }), jsx("span", { className: "shrink-0 text-xs font-semibold text-foreground", children: getInvoiceCurrency(invoice) })] }), jsxs("div", { className: "flex items-center justify-between gap-2 mb-1 text-xs text-muted-foreground", children: [jsx("span", { className: "min-w-0 truncate", children: getInvoiceCompany(invoice) }), location ? jsx("span", { className: "shrink-0", children: location }) : null] }), jsxs("div", { className: "flex flex-wrap gap-2 mt-1", children: [jsxs("span", { className: "text-xs text-muted-foreground", children: ["Date: ", invoiceDate] }), jsx("span", { className: "text-xs text-muted-foreground", children: "\u2022" }), jsxs("span", { className: "text-xs text-muted-foreground", children: ["Due: ", dueDate] })] }), jsxs("div", { className: "flex flex-wrap gap-2 mt-1", children: [jsxs("span", { className: "text-xs font-medium text-foreground", children: ["Total:", ' ', formatCurrency(invoice.totalAmount, invoice.baseCurrency)] }), invoice.outstandingAmount > 0 && (jsxs(Fragment$2, { children: [jsx("span", { className: "text-xs text-muted-foreground", children: "\u2022" }), jsxs("span", { className: "text-xs text-destructive", children: ["Outstanding:", ' ', formatCurrency(invoice.outstandingAmount, invoice.baseCurrency)] })] }))] })] }));
|
|
38041
38097
|
}, fetchPage: fetchPage, resolveById: resolveById, preSelectedId: preSelectedId ?? null, searchPlaceholder: searchPlaceholder, emptyMessage: "No invoices found.", disabled: disabled, className: className, align: align, debounceMs: 300 }));
|
|
38042
38098
|
}
|
|
38043
38099
|
|
|
@@ -38214,27 +38270,52 @@ const NumberedStepCard = ({ step, title, description, className, }) => {
|
|
|
38214
38270
|
return (jsxs("div", { className: cn('flex flex-col gap-3 rounded-xl border border-border bg-card p-4', className), children: [jsx("span", { className: "inline-flex h-6 w-6 items-center justify-center rounded-full bg-primary text-xs font-medium text-primary-foreground", children: step }), jsxs("div", { className: "space-y-1", children: [jsx("p", { className: "text-sm font-medium text-foreground", children: title }), jsx("p", { className: "text-xs leading-snug text-label", children: description })] })] }));
|
|
38215
38271
|
};
|
|
38216
38272
|
|
|
38273
|
+
/** Options with a description get the taller layout with an icon badge (default variant only). */
|
|
38274
|
+
function hasDetails(variant, hasDescription) {
|
|
38275
|
+
return variant === 'default' && hasDescription;
|
|
38276
|
+
}
|
|
38277
|
+
function getListClassName(variant, detailed) {
|
|
38278
|
+
return cn('inline-flex w-full items-center gap-1 bg-muted p-1', detailed ? 'rounded-xl' : variant === 'bordered' ? 'rounded-lg' : 'rounded-md');
|
|
38279
|
+
}
|
|
38280
|
+
function getSegmentClassName(variant, isActive, isDisabled, detailed = false) {
|
|
38281
|
+
return cn('inline-flex cursor-pointer items-center justify-center gap-2 border px-3 text-sm font-medium transition-colors disabled:cursor-not-allowed', 'outline-none focus-visible:ring-2 focus-visible:ring-primary/30', detailed ? 'min-h-11 rounded-lg py-2 font-semibold' : 'h-7 rounded-md',
|
|
38282
|
+
// Bordered tabs size to their content (Figma "Advance Tabs"); the others stretch to equal width.
|
|
38283
|
+
variant === 'bordered' ? 'shrink-0' : 'flex-1',
|
|
38284
|
+
// Every segment carries a border so the active one's primary border doesn't shift the layout.
|
|
38285
|
+
isActive
|
|
38286
|
+
? cn('border-primary bg-card shadow-xs', detailed ? 'text-primary dark:text-foreground' : 'text-primary')
|
|
38287
|
+
: cn('border-transparent', variant === 'bordered' ? 'text-foreground' : 'text-muted-foreground', 'hover:text-foreground'), isDisabled && 'cursor-not-allowed opacity-50');
|
|
38288
|
+
}
|
|
38289
|
+
function getIconClassName(detailed, isActive) {
|
|
38290
|
+
if (!detailed) {
|
|
38291
|
+
return 'inline-flex shrink-0 items-center [&_svg]:h-4 [&_svg]:w-4';
|
|
38292
|
+
}
|
|
38293
|
+
return cn('inline-flex size-7 shrink-0 items-center justify-center rounded-full text-sm font-semibold [&_svg]:size-4', isActive ? 'bg-primary/10 text-primary' : 'bg-foreground/5 text-muted-foreground');
|
|
38294
|
+
}
|
|
38295
|
+
function getContentClassName(layout) {
|
|
38296
|
+
return layout === 'inline'
|
|
38297
|
+
? 'flex min-w-0 items-baseline gap-2'
|
|
38298
|
+
: 'flex min-w-0 flex-col items-center gap-0.5';
|
|
38299
|
+
}
|
|
38300
|
+
function getDescriptionClassName(isActive) {
|
|
38301
|
+
return cn('truncate text-xs font-normal', isActive ? 'text-primary' : 'text-muted-foreground');
|
|
38302
|
+
}
|
|
38303
|
+
|
|
38217
38304
|
/**
|
|
38218
|
-
* Pill-shaped segmented control
|
|
38219
|
-
*
|
|
38220
|
-
*
|
|
38305
|
+
* Pill-shaped segmented control. The active segment lifts forward with a card
|
|
38306
|
+
* bg, primary border and subtle shadow; inactive segments blend into the muted
|
|
38307
|
+
* container background. Giving options a `description` makes the default
|
|
38308
|
+
* segments taller, with the icon in a badge.
|
|
38221
38309
|
*
|
|
38222
38310
|
* Single source of truth for "two-or-more mutually exclusive views" toggles
|
|
38223
38311
|
* (e.g. Owned / Memo on the ownership form).
|
|
38224
38312
|
*/
|
|
38225
|
-
function SegmentedControl({ value, onChange, options, ariaLabel, className, disabled, variant = 'default', }) {
|
|
38226
|
-
const
|
|
38227
|
-
return (jsx("div", { role: "tablist", "aria-label": ariaLabel, className: cn(
|
|
38313
|
+
function SegmentedControl({ value, onChange, options, ariaLabel, className, disabled, variant = 'default', optionLayout = 'stacked', }) {
|
|
38314
|
+
const detailed = options.some((opt) => hasDetails(variant, opt.description != null));
|
|
38315
|
+
return (jsx("div", { role: "tablist", "aria-label": ariaLabel, className: cn(getListClassName(variant, detailed), className), children: options.map((opt) => {
|
|
38228
38316
|
const isActive = value === opt.value;
|
|
38229
|
-
const isDisabled = disabled || opt.disabled;
|
|
38230
|
-
return (jsxs("button", { type: "button", role: "tab", "aria-selected": isActive, disabled: isDisabled, onClick: () => !isDisabled && onChange(opt.value), className:
|
|
38231
|
-
// Bordered tabs size to their content (Figma "Advance Tabs"); the
|
|
38232
|
-
// default variant stretches every segment to equal width.
|
|
38233
|
-
isBordered ? 'shrink-0' : 'flex-1', isActive
|
|
38234
|
-
? cn('bg-card text-primary shadow-xs', isBordered && 'border border-primary')
|
|
38235
|
-
: isBordered
|
|
38236
|
-
? 'text-foreground hover:text-foreground'
|
|
38237
|
-
: 'text-muted-foreground hover:text-foreground', isDisabled && 'cursor-not-allowed opacity-50'), children: [opt.icon && (jsx("span", { "aria-hidden": "true", className: "inline-flex shrink-0 items-center [&_svg]:h-4 [&_svg]:w-4", children: opt.icon })), jsx("span", { className: "whitespace-nowrap", children: opt.label })] }, opt.value));
|
|
38317
|
+
const isDisabled = !!(disabled || opt.disabled);
|
|
38318
|
+
return (jsxs("button", { type: "button", role: "tab", "aria-selected": isActive, disabled: isDisabled, onClick: () => !isDisabled && onChange(opt.value), className: getSegmentClassName(variant, isActive, isDisabled, detailed), children: [opt.icon && (jsx("span", { "aria-hidden": "true", className: getIconClassName(detailed, isActive), children: opt.icon })), detailed && opt.description != null ? (jsxs("span", { className: getContentClassName(optionLayout), children: [jsx("span", { className: "whitespace-nowrap", children: opt.label }), jsx("span", { className: getDescriptionClassName(isActive), children: opt.description })] })) : (jsx("span", { className: "whitespace-nowrap", children: opt.label }))] }, opt.value));
|
|
38238
38319
|
}) }));
|
|
38239
38320
|
}
|
|
38240
38321
|
|
|
@@ -77655,5 +77736,5 @@ var RichTextAreaImpl = /*#__PURE__*/Object.freeze({
|
|
|
77655
77736
|
RichTextarea: RichTextarea
|
|
77656
77737
|
});
|
|
77657
77738
|
|
|
77658
|
-
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_META, ActionBadge, ActionButtonWithTooltip, ActivityFeed, AdvancedSearchDrawer, Alert, ApiComboBox, AppSidebar, AuditEntryCard, AuditHistoryPanel, AuditTimeline, AuditTimelineShimmer, Badge, BadgeType, BusinessContactStatusFilter, Button, CUSTOMER_AUDIT_CONFIG, CertificateRowList, ChangePill, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, ConfirmDialog, ContactTypeFilter, CopyButton, CountrySelect, CreateFormPageHeader, CreateFormPageShell, CurrencyDisplayTabs, CurrencyInput, CurrencyToggle, CustomCombobox, CustomFieldInput, CustomFieldValue, CustomTable, CustomizeColumnsDrawer, DIAMOND_AUDIT_CONFIG, DashboardShell, DataEditableTable, DataTable, DateInput, DetailChip, DetailPageLayout, DetailPageSkeleton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyValue, EntityHeader, Field, FieldSkeleton, FileUploader, FilterMultiSelect, FilterSelect, FormSectionCard, FormSectionCardSkeleton, GEM_AUDIT_CONFIG, HistoryEntryCard, HistoryTimeline, HistoryTimelineShimmer, INVOICE_AUDIT_CONFIG, IconButton, IdHyperlinkText, InAppNotificationCard, InAppNotificationsPanel, InfoBanner, InventoryComboBox, InventoryItemCard, InventoryItemRow, InvoiceComboBox, KYCStatusFilter, KeyValueGrid, LAYOUT_AUDIT_CONFIG, LabeledToggle, MEMO_IN_AUDIT_CONFIG, MEMO_OUT_AUDIT_CONFIG, MediaGallery, MemoInComboBox, MetricCard, MetricRow, MetricTile, Modal, MoreInfoPanel, MoreInfoTrigger, NOT_CAPTURED, Navbar, NavbarActions, NavbarAvatar, NavbarIconButton, NavbarSearch, NavbarTitle, NumberInput, NumberedStepCard, OtpInput, OwnershipFilter, OwnershipSplitCard, PROFORMA_AUDIT_CONFIG, PageHeader, PageTabs, Pagination, PaginationSelect, PartnerShareCard, PriceInput, Protected, PurchaseOrderComboBox, QUOTATION_AUDIT_CONFIG, RadioCardGroup, ReadMoreText, RefreshButton, RichTextarea$1 as RichTextarea, SEARCHABLE_SELECT_PAGE_SIZE, SafeImage, SearchBox, SearchInput, SearchableSelect, SectionCard, SectionIcon, SegmentedControl, ShareDialog, ShareMenu, ShimmerTable, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SlideOut, SlideOutClose, SlideOutContent, SlideOutDescription, SlideOutHeader, SlideOutOverlay, SlideOutPortal, SlideOutTitle, SlideOutTrigger, Slider, SpecList, Spinner, SquareSkeleton, StateSelect, StatusBadge$1 as StatusBadge, StatusFilter, Stepper, StockTypeFilter, TablePagination, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, TextHyperlink, TimePicker, ToggleSwitch, TruncateTooltip, WarehouseComboBox, WarehouseFilter, ZoomSplitViewer, asList, asText, badgeVariants, buildBulkShareMessage, buildBulkShareTitle, buildInventoryPublicUrl, buildInventoryRowProps, buildInventoryShareTitle, buildWhatsappUrl, buttonVariants, cn, countries, countryByCode, createVideoMediaItem, dropdownMenuItemDestructiveClass, fieldTypeIcon, findRegion, flagEmoji, formatAddressLocation, formatFileSize, generateActionDescription, generateTitle, getBadgeTypeForStatus, getChangePills, getCountryName, getInitials, getStatesOfCountry, iconButtonVariants, inAppNotificationCardA11y, inAppNotificationsPanelA11y, isBlank, isIndiaCountry, isKnownRegion, isPathActive, isValidAlpha2CountryCode, isValueEmpty, notify, releaseStaleOverlayBodyLock, renderBadge, resolveCountryCode, toAddressFormValues, useAuditShowMore, useBadge, useButton, useDropdownMenu, useInAppNotificationsPanel, useNavbar, useSidebar, videoThumbnailSrc, watchOverlayBodyLock };
|
|
77739
|
+
export { ACTIVITY_CATEGORIES, ACTIVITY_CATEGORY_META, ActionBadge, ActionButtonWithTooltip, ActivityFeed, AdvancedSearchDrawer, Alert, ApiComboBox, AppSidebar, AuditEntryCard, AuditHistoryPanel, AuditTimeline, AuditTimelineShimmer, Badge, BadgeType, BusinessContactStatusFilter, Button, CUSTOMER_AUDIT_CONFIG, CertificateRowList, ChangePill, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, CompanyCard, ConfirmDialog, ContactTypeFilter, CopyButton, CountrySelect, CreateFormPageHeader, CreateFormPageShell, CurrencyDisplayTabs, CurrencyInput, CurrencyToggle, CustomCombobox, CustomFieldInput, CustomFieldValue, CustomTable, CustomizeColumnsDrawer, DIAMOND_AUDIT_CONFIG, DashboardShell, DataEditableTable, DataTable, DateInput, DetailChip, DetailPageLayout, DetailPageSkeleton, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyValue, EntityHeader, Field, FieldSkeleton, FileUploader, FilterMultiSelect, FilterSelect, FormSectionCard, FormSectionCardSkeleton, GEM_AUDIT_CONFIG, HistoryEntryCard, HistoryTimeline, HistoryTimelineShimmer, INVOICE_AUDIT_CONFIG, IconButton, IdHyperlinkText, InAppNotificationCard, InAppNotificationsPanel, InfoBanner, InventoryComboBox, InventoryItemCard, InventoryItemRow, InvoiceComboBox, KYCStatusFilter, KeyValueGrid, LAYOUT_AUDIT_CONFIG, LabeledToggle, MEMO_IN_AUDIT_CONFIG, MEMO_OUT_AUDIT_CONFIG, MediaGallery, MemoInComboBox, MetricCard, MetricRow, MetricTile, Modal, MoreInfoPanel, MoreInfoTrigger, NOT_CAPTURED, Navbar, NavbarActions, NavbarAvatar, NavbarIconButton, NavbarSearch, NavbarTitle, NumberInput, NumberedStepCard, OtpInput, OwnershipFilter, OwnershipSplitCard, PROFORMA_AUDIT_CONFIG, PageHeader, PageTabs, Pagination, PaginationSelect, PartnerShareCard, PriceInput, Protected, PurchaseOrderComboBox, QUOTATION_AUDIT_CONFIG, RadioCardGroup, ReadMoreText, RefreshButton, RichTextarea$1 as RichTextarea, SEARCHABLE_SELECT_PAGE_SIZE, SafeImage, SearchBox, SearchInput, SearchableSelect, SectionCard, SectionIcon, SegmentedControl, ShareDialog, ShareMenu, ShimmerTable, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SlideOut, SlideOutClose, SlideOutContent, SlideOutDescription, SlideOutHeader, SlideOutOverlay, SlideOutPortal, SlideOutTitle, SlideOutTrigger, Slider, SpecList, Spinner, SquareSkeleton, StateSelect, StatusBadge$1 as StatusBadge, StatusFilter, Stepper, StockTypeFilter, TablePagination, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TagsInput, TextHyperlink, TimePicker, ToggleSwitch, TruncateTooltip, WarehouseComboBox, WarehouseFilter, ZoomSplitViewer, asList, asText, badgeVariants, buildBulkShareMessage, buildBulkShareTitle, buildInventoryPublicUrl, buildInventoryRowProps, buildInventoryShareTitle, buildWhatsappUrl, buttonVariants, cn, countries, countryByCode, createVideoMediaItem, dropdownMenuItemDestructiveClass, fieldTypeIcon, findRegion, flagEmoji, formatAddressLocation, formatFileSize, generateActionDescription, generateTitle, getBadgeTypeForStatus, getChangePills, getCountryName, getInitials, getStatesOfCountry, iconButtonVariants, inAppNotificationCardA11y, inAppNotificationsPanelA11y, isBlank, isIndiaCountry, isKnownRegion, isPathActive, isValidAlpha2CountryCode, isValueEmpty, notify, releaseStaleOverlayBodyLock, renderBadge, resolveCountryCode, toAddressFormValues, useAuditShowMore, useBadge, useButton, useDropdownMenu, useInAppNotificationsPanel, useNavbar, useSidebar, videoThumbnailSrc, watchOverlayBodyLock };
|
|
77659
77740
|
//# sourceMappingURL=index.esm.js.map
|