@deepnoid/ui 1.0.21 → 1.0.23
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/{chunk-N4KPGD2N.mjs → chunk-25LWG2XP.mjs} +20 -20
- package/dist/{chunk-ZOTHPHXA.mjs → chunk-2C4HKBHM.mjs} +4 -4
- package/dist/{chunk-H7D5EBLL.mjs → chunk-32GYEUAB.mjs} +14 -8
- package/dist/{chunk-3K4OTUIB.mjs → chunk-3Z2WSTCH.mjs} +13 -13
- package/dist/{chunk-JGF5TY7M.mjs → chunk-4ALAPTAW.mjs} +10 -10
- package/dist/{chunk-O5VW7CHY.mjs → chunk-4FUD3BZV.mjs} +13 -14
- package/dist/{chunk-WTBRXQFT.mjs → chunk-5TBL2VZ5.mjs} +30 -30
- package/dist/{chunk-LHWHM4LQ.mjs → chunk-6J6AXUUE.mjs} +2 -2
- package/dist/{chunk-WQG4OYM6.mjs → chunk-7K3EB4DC.mjs} +67 -63
- package/dist/{chunk-WS4SOWDZ.mjs → chunk-AHKNFPHN.mjs} +27 -25
- package/dist/{chunk-IOJMTN6X.mjs → chunk-APZCX3PY.mjs} +7 -7
- package/dist/{chunk-KAB3AB67.mjs → chunk-AZ5QZAO6.mjs} +59 -53
- package/dist/{chunk-D7DDV4UN.mjs → chunk-B2LJEDXL.mjs} +22 -14
- package/dist/{chunk-6PN3DGOE.mjs → chunk-BEFT2F7D.mjs} +3 -3
- package/dist/{chunk-BJWYF2WY.mjs → chunk-C6S73EGR.mjs} +15 -17
- package/dist/{chunk-A6UUVHC6.mjs → chunk-C7OETP3D.mjs} +4 -4
- package/dist/{chunk-5RJYESLP.mjs → chunk-EVXLGMV6.mjs} +3 -3
- package/dist/{chunk-3IBJXQTJ.mjs → chunk-GWOMD7ZU.mjs} +1 -1
- package/dist/{chunk-62M6VPFS.mjs → chunk-HDCCDPYL.mjs} +65 -55
- package/dist/{chunk-7OP3JEMA.mjs → chunk-HLO5N6WD.mjs} +1 -1
- package/dist/{chunk-CBIV6KFQ.mjs → chunk-IF6XCBGN.mjs} +6 -6
- package/dist/{chunk-Y3A7PN4Q.mjs → chunk-IPP2GKZN.mjs} +16 -16
- package/dist/{chunk-SXSVNBRO.mjs → chunk-J2URLA5S.mjs} +22 -16
- package/dist/{chunk-ZCJPPLYH.mjs → chunk-JUPZBZ5Q.mjs} +7 -7
- package/dist/{chunk-USZSQXHS.mjs → chunk-KFM54LT4.mjs} +1 -1
- package/dist/{chunk-2J4MNIMS.mjs → chunk-KGRQ3ZYI.mjs} +10 -4
- package/dist/{chunk-27Y6K5NK.mjs → chunk-KJFYLLMP.mjs} +3 -3
- package/dist/{chunk-G6SZN3EK.mjs → chunk-LHEENTLV.mjs} +2 -2
- package/dist/{chunk-MAGZDGUW.mjs → chunk-LIYGCVZ3.mjs} +11 -11
- package/dist/{chunk-O2KC4CDE.mjs → chunk-MLMG22I4.mjs} +33 -31
- package/dist/{chunk-KIINY2GS.mjs → chunk-MS65QLWR.mjs} +6 -6
- package/dist/{chunk-XTMOAGLY.mjs → chunk-MVCUYH2W.mjs} +8 -8
- package/dist/{chunk-LCEFG5IY.mjs → chunk-NATO6PUP.mjs} +7 -7
- package/dist/{chunk-7CTICAGW.mjs → chunk-NMPATSTB.mjs} +2 -2
- package/dist/{chunk-R32BQ3NV.mjs → chunk-NUXN36KF.mjs} +22 -22
- package/dist/{chunk-CXVDES22.mjs → chunk-NYQKX23D.mjs} +12 -8
- package/dist/{chunk-MC7SI5Q7.mjs → chunk-OI5NXYUY.mjs} +8 -6
- package/dist/chunk-PPTFOHMW.mjs +169 -0
- package/dist/chunk-Q3SNUBIS.mjs +114 -0
- package/dist/{chunk-AO6LNH3D.mjs → chunk-QDAHI6GC.mjs} +4 -4
- package/dist/{chunk-AOU4QX7H.mjs → chunk-QOOYAQJ5.mjs} +773 -773
- package/dist/{chunk-D3DKXTTY.mjs → chunk-R6N6IQPN.mjs} +3 -3
- package/dist/{chunk-37BZALDV.mjs → chunk-RZD3NZIL.mjs} +10 -10
- package/dist/{chunk-SR76DO4M.mjs → chunk-SJLO65GQ.mjs} +12 -12
- package/dist/{chunk-PIUOU6LS.mjs → chunk-TEF3UA4E.mjs} +13 -13
- package/dist/{chunk-SLKXMIWY.mjs → chunk-TPWND4RF.mjs} +7 -8
- package/dist/{chunk-E3G5QXSH.mjs → chunk-UWT2WB6H.mjs} +2 -4
- package/dist/{chunk-MT7AFUKT.mjs → chunk-VJ7BQ3PK.mjs} +6 -5
- package/dist/{chunk-VZPVEICG.mjs → chunk-W6CQRLD2.mjs} +37 -29
- package/dist/{chunk-KE26ONWZ.mjs → chunk-YM5JOOTO.mjs} +3 -3
- package/dist/{chunk-FNFQCMB4.mjs → chunk-YNPIAFQ7.mjs} +31 -27
- package/dist/{chunk-QUWWLVCI.mjs → chunk-YUNTNMZ4.mjs} +6 -6
- package/dist/{chunk-XS32UZI3.mjs → chunk-YYWOSKGH.mjs} +3 -3
- package/dist/components/accordion/accordion.js +7 -8
- package/dist/components/accordion/accordion.mjs +2 -2
- package/dist/components/accordion/accordionItem.js +8 -11
- package/dist/components/accordion/accordionItem.mjs +2 -2
- package/dist/components/accordion/index.js +13 -15
- package/dist/components/accordion/index.mjs +3 -3
- package/dist/components/avatar/avatar.js +775 -775
- package/dist/components/avatar/avatar.mjs +2 -2
- package/dist/components/avatar/index.js +775 -775
- package/dist/components/avatar/index.mjs +2 -2
- package/dist/components/backdrop/backdrop.d.mts +4 -4
- package/dist/components/backdrop/backdrop.d.ts +4 -4
- package/dist/components/backdrop/backdrop.js +5 -5
- package/dist/components/backdrop/backdrop.mjs +2 -2
- package/dist/components/backdrop/index.js +5 -5
- package/dist/components/backdrop/index.mjs +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.mts +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +812 -814
- package/dist/components/breadcrumb/breadcrumb.mjs +13 -12
- package/dist/components/breadcrumb/index.js +812 -814
- package/dist/components/breadcrumb/index.mjs +13 -12
- package/dist/components/button/button-group.js +4 -4
- package/dist/components/button/button-group.mjs +2 -2
- package/dist/components/button/button.js +2976 -2979
- package/dist/components/button/button.mjs +6 -6
- package/dist/components/button/icon-button.js +2968 -2970
- package/dist/components/button/icon-button.mjs +6 -6
- package/dist/components/button/image-button.d.mts +194 -0
- package/dist/components/button/image-button.d.ts +194 -0
- package/dist/components/button/image-button.js +5572 -0
- package/dist/components/button/image-button.mjs +16 -0
- package/dist/components/button/index.d.mts +1 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/button/index.js +3059 -2969
- package/dist/components/button/index.mjs +15 -11
- package/dist/components/button/text-button.js +62 -64
- package/dist/components/button/text-button.mjs +3 -3
- package/dist/components/charts/areaChart.d.mts +4 -4
- package/dist/components/charts/areaChart.d.ts +4 -4
- package/dist/components/charts/areaChart.js +39 -41
- package/dist/components/charts/areaChart.mjs +4 -4
- package/dist/components/charts/barChart.d.mts +8 -8
- package/dist/components/charts/barChart.d.ts +8 -8
- package/dist/components/charts/barChart.js +66 -58
- package/dist/components/charts/barChart.mjs +2 -2
- package/dist/components/charts/circularProgress.d.mts +2 -2
- package/dist/components/charts/circularProgress.d.ts +2 -2
- package/dist/components/charts/circularProgress.js +14 -16
- package/dist/components/charts/circularProgress.mjs +2 -2
- package/dist/components/charts/index.js +158 -148
- package/dist/components/charts/index.mjs +10 -10
- package/dist/components/charts/radarChart.d.mts +6 -6
- package/dist/components/charts/radarChart.d.ts +6 -6
- package/dist/components/charts/radarChart.js +17 -19
- package/dist/components/charts/radarChart.mjs +2 -2
- package/dist/components/charts/simpleBarChart.d.mts +6 -6
- package/dist/components/charts/simpleBarChart.d.ts +6 -6
- package/dist/components/charts/simpleBarChart.js +31 -33
- package/dist/components/charts/simpleBarChart.mjs +2 -2
- package/dist/components/checkbox/checkbox.js +13 -15
- package/dist/components/checkbox/checkbox.mjs +3 -3
- package/dist/components/checkbox/index.js +13 -15
- package/dist/components/checkbox/index.mjs +3 -3
- package/dist/components/chip/chip.js +782 -784
- package/dist/components/chip/chip.mjs +5 -5
- package/dist/components/chip/index.js +782 -784
- package/dist/components/chip/index.mjs +5 -5
- package/dist/components/drawer/drawer.js +15 -13
- package/dist/components/drawer/drawer.mjs +3 -3
- package/dist/components/drawer/index.js +15 -13
- package/dist/components/drawer/index.mjs +3 -3
- package/dist/components/fileUpload/fileUpload.d.mts +4 -4
- package/dist/components/fileUpload/fileUpload.d.ts +4 -4
- package/dist/components/fileUpload/fileUpload.js +880 -885
- package/dist/components/fileUpload/fileUpload.mjs +15 -14
- package/dist/components/fileUpload/index.js +880 -885
- package/dist/components/fileUpload/index.mjs +15 -14
- package/dist/components/icon/Icon.d.mts +179 -704
- package/dist/components/icon/Icon.d.ts +179 -704
- package/dist/components/icon/Icon.js +776 -776
- package/dist/components/icon/Icon.mjs +2 -2
- package/dist/components/icon/index.d.mts +1 -1
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +776 -776
- package/dist/components/icon/index.mjs +3 -3
- package/dist/components/icon/template.d.mts +3 -3
- package/dist/components/icon/template.d.ts +3 -3
- package/dist/components/icon/template.js +773 -773
- package/dist/components/icon/template.mjs +1 -1
- package/dist/components/input/index.js +793 -797
- package/dist/components/input/index.mjs +6 -6
- package/dist/components/input/input.js +793 -797
- package/dist/components/input/input.mjs +6 -6
- package/dist/components/list/index.js +786 -788
- package/dist/components/list/index.mjs +9 -9
- package/dist/components/list/list.js +3 -5
- package/dist/components/list/list.mjs +2 -2
- package/dist/components/list/listItem.js +785 -787
- package/dist/components/list/listItem.mjs +6 -6
- package/dist/components/modal/GlobalModalProvider.js +884 -887
- package/dist/components/modal/GlobalModalProvider.mjs +15 -14
- package/dist/components/modal/index.js +884 -887
- package/dist/components/modal/index.mjs +16 -15
- package/dist/components/modal/modal.js +875 -878
- package/dist/components/modal/modal.mjs +14 -13
- package/dist/components/modal/useGlobalModal.mjs +16 -15
- package/dist/components/pagination/index.js +850 -852
- package/dist/components/pagination/index.mjs +7 -7
- package/dist/components/pagination/pagination.js +850 -852
- package/dist/components/pagination/pagination.mjs +7 -7
- package/dist/components/picker/datePicker.d.mts +2 -2
- package/dist/components/picker/datePicker.d.ts +2 -2
- package/dist/components/picker/datePicker.js +1004 -1005
- package/dist/components/picker/datePicker.mjs +16 -15
- package/dist/components/picker/day.js +3 -5
- package/dist/components/picker/day.mjs +2 -2
- package/dist/components/picker/index.js +1026 -1011
- package/dist/components/picker/index.mjs +19 -18
- package/dist/components/picker/timePicker/Panel.d.mts +2 -2
- package/dist/components/picker/timePicker/Panel.d.ts +2 -2
- package/dist/components/picker/timePicker/Panel.js +116 -106
- package/dist/components/picker/timePicker/Panel.mjs +15 -14
- package/dist/components/picker/timePicker/WheelColumn.d.mts +2 -2
- package/dist/components/picker/timePicker/WheelColumn.d.ts +2 -2
- package/dist/components/picker/timePicker/WheelColumn.js +10 -4
- package/dist/components/picker/timePicker/WheelColumn.mjs +1 -1
- package/dist/components/picker/timePicker/index.js +1573 -1561
- package/dist/components/picker/timePicker/index.mjs +17 -16
- package/dist/components/picker/utils.js +1 -1
- package/dist/components/picker/utils.mjs +1 -1
- package/dist/components/progress/index.js +4 -6
- package/dist/components/progress/index.mjs +2 -2
- package/dist/components/progress/progress.d.mts +1 -1
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/progress/progress.js +4 -6
- package/dist/components/progress/progress.mjs +2 -2
- package/dist/components/radio/index.js +7 -9
- package/dist/components/radio/index.mjs +3 -3
- package/dist/components/radio/radio.js +7 -9
- package/dist/components/radio/radio.mjs +3 -3
- package/dist/components/ripple/index.js +3 -3
- package/dist/components/ripple/index.mjs +1 -1
- package/dist/components/ripple/ripple.d.mts +1 -1
- package/dist/components/ripple/ripple.d.ts +1 -1
- package/dist/components/ripple/ripple.js +3 -3
- package/dist/components/ripple/ripple.mjs +1 -1
- package/dist/components/ripple/useRipple.d.mts +2 -2
- package/dist/components/ripple/useRipple.d.ts +2 -2
- package/dist/components/scroll/index.js +5 -5
- package/dist/components/scroll/index.mjs +2 -2
- package/dist/components/scroll/scrollArea.d.mts +6 -6
- package/dist/components/scroll/scrollArea.d.ts +6 -6
- package/dist/components/scroll/scrollArea.js +5 -5
- package/dist/components/scroll/scrollArea.mjs +2 -2
- package/dist/components/select/index.js +884 -878
- package/dist/components/select/index.mjs +13 -12
- package/dist/components/select/select.d.mts +2 -2
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/select.js +884 -878
- package/dist/components/select/select.mjs +13 -12
- package/dist/components/skeleton/index.js +5 -5
- package/dist/components/skeleton/index.mjs +2 -2
- package/dist/components/skeleton/skeleton.d.mts +4 -4
- package/dist/components/skeleton/skeleton.d.ts +4 -4
- package/dist/components/skeleton/skeleton.js +5 -5
- package/dist/components/skeleton/skeleton.mjs +2 -2
- package/dist/components/slider/index.js +8 -10
- package/dist/components/slider/index.mjs +2 -2
- package/dist/components/slider/slider.js +8 -10
- package/dist/components/slider/slider.mjs +2 -2
- package/dist/components/starRating/index.js +798 -792
- package/dist/components/starRating/index.mjs +5 -5
- package/dist/components/starRating/starRating.js +798 -792
- package/dist/components/starRating/starRating.mjs +5 -5
- package/dist/components/switch/index.js +7 -9
- package/dist/components/switch/index.mjs +2 -2
- package/dist/components/switch/switch.js +7 -9
- package/dist/components/switch/switch.mjs +2 -2
- package/dist/components/table/definition-table.d.mts +11 -4
- package/dist/components/table/definition-table.d.ts +11 -4
- package/dist/components/table/definition-table.js +89 -60
- package/dist/components/table/definition-table.mjs +2 -2
- package/dist/components/table/form-table.d.mts +2 -2
- package/dist/components/table/form-table.d.ts +2 -2
- package/dist/components/table/form-table.js +10 -8
- package/dist/components/table/form-table.mjs +10 -8
- package/dist/components/table/index.js +2059 -2028
- package/dist/components/table/index.mjs +14 -14
- package/dist/components/table/table-body.d.mts +1 -1
- package/dist/components/table/table-body.d.ts +1 -1
- package/dist/components/table/table-body.js +1559 -1557
- package/dist/components/table/table-body.mjs +11 -11
- package/dist/components/table/table-head.d.mts +3 -3
- package/dist/components/table/table-head.d.ts +3 -3
- package/dist/components/table/table-head.js +1583 -1581
- package/dist/components/table/table-head.mjs +11 -11
- package/dist/components/table/table.d.mts +6 -6
- package/dist/components/table/table.d.ts +6 -6
- package/dist/components/table/table.js +1910 -1908
- package/dist/components/table/table.mjs +11 -11
- package/dist/components/tabs/index.js +2 -4
- package/dist/components/tabs/index.mjs +2 -2
- package/dist/components/tabs/tabs.d.mts +2 -2
- package/dist/components/tabs/tabs.d.ts +2 -2
- package/dist/components/tabs/tabs.js +2 -4
- package/dist/components/tabs/tabs.mjs +2 -2
- package/dist/components/textarea/index.js +14 -16
- package/dist/components/textarea/index.mjs +3 -3
- package/dist/components/textarea/textarea.js +14 -16
- package/dist/components/textarea/textarea.mjs +3 -3
- package/dist/components/timePicker/calendar.js +791 -791
- package/dist/components/timePicker/calendar.mjs +19 -17
- package/dist/components/timePicker/useDateTimePicker.d.mts +2 -2
- package/dist/components/timePicker/useDateTimePicker.d.ts +2 -2
- package/dist/components/timePicker/useDateTimePicker.js +3 -1
- package/dist/components/timePicker/useDateTimePicker.mjs +4 -2
- package/dist/components/toast/index.d.mts +1 -1
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +801 -797
- package/dist/components/toast/index.mjs +8 -8
- package/dist/components/toast/toast-utils.js +4 -4
- package/dist/components/toast/toast-utils.mjs +1 -1
- package/dist/components/toast/toast.d.mts +1 -1
- package/dist/components/toast/toast.d.ts +1 -1
- package/dist/components/toast/toast.js +785 -787
- package/dist/components/toast/toast.mjs +6 -6
- package/dist/components/toast/use-toast.d.mts +3 -3
- package/dist/components/toast/use-toast.d.ts +3 -3
- package/dist/components/toast/use-toast.js +801 -797
- package/dist/components/toast/use-toast.mjs +8 -8
- package/dist/components/tooltip/index.d.mts +1 -1
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +9 -9
- package/dist/components/tooltip/index.mjs +2 -2
- package/dist/components/tooltip/tooltip-utils.d.mts +1 -1
- package/dist/components/tooltip/tooltip-utils.d.ts +1 -1
- package/dist/components/tooltip/tooltip.d.mts +1 -1
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +9 -9
- package/dist/components/tooltip/tooltip.mjs +2 -2
- package/dist/components/tooltip/useTooltip.d.mts +1 -1
- package/dist/components/tooltip/useTooltip.d.ts +1 -1
- package/dist/components/tree/index.js +799 -799
- package/dist/components/tree/index.mjs +5 -5
- package/dist/components/tree/tree.d.mts +8 -8
- package/dist/components/tree/tree.d.ts +8 -8
- package/dist/components/tree/tree.js +799 -799
- package/dist/components/tree/tree.mjs +5 -5
- package/dist/hooks/useIsMounted.d.mts +2 -2
- package/dist/hooks/useIsMounted.d.ts +2 -2
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2606 -2421
- package/dist/index.mjs +95 -91
- package/dist/{tooltip-utils-DO3LQaVM.d.ts → tooltip-utils-dEqsJ9t8.d.mts} +2 -2
- package/dist/{tooltip-utils-DO3LQaVM.d.mts → tooltip-utils-dEqsJ9t8.d.ts} +2 -2
- package/dist/utils/clsx.js +3 -3
- package/dist/utils/clsx.mjs +1 -1
- package/dist/utils/props.js +2 -4
- package/dist/utils/props.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HXBZB7CW.mjs +0 -140
- package/dist/{chunk-LXHUO6VM.mjs → chunk-EAFNOTY3.mjs} +3 -3
- /package/dist/{chunk-MY5U63QO.mjs → chunk-M5PMA3CT.mjs} +0 -0
- /package/dist/{chunk-ZYIIXWVY.mjs → chunk-WG2WVMAR.mjs} +0 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
starRatingStyle,
|
|
4
4
|
starRating_default
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
8
|
-
import "../../chunk-
|
|
9
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-B2LJEDXL.mjs";
|
|
6
|
+
import "../../chunk-M5PMA3CT.mjs";
|
|
7
|
+
import "../../chunk-C7OETP3D.mjs";
|
|
8
|
+
import "../../chunk-QOOYAQJ5.mjs";
|
|
9
|
+
import "../../chunk-UWT2WB6H.mjs";
|
|
10
10
|
import "../../chunk-UP6RPQDX.mjs";
|
|
11
11
|
export {
|
|
12
12
|
starRating_default as default,
|
|
@@ -37,16 +37,14 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
|
37
37
|
const picked = variantKeys.reduce((acc, key) => {
|
|
38
38
|
if (key in props) {
|
|
39
39
|
return { ...acc, [key]: props[key] };
|
|
40
|
-
} else {
|
|
41
|
-
return acc;
|
|
42
40
|
}
|
|
41
|
+
return acc;
|
|
43
42
|
}, {});
|
|
44
43
|
if (removeVariantProps) {
|
|
45
44
|
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
46
45
|
return [omitted, picked];
|
|
47
|
-
} else {
|
|
48
|
-
return [props, picked];
|
|
49
46
|
}
|
|
47
|
+
return [props, picked];
|
|
50
48
|
};
|
|
51
49
|
|
|
52
50
|
// src/components/switch/switch.tsx
|
|
@@ -63,13 +61,13 @@ var Switch = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
63
61
|
"input",
|
|
64
62
|
{
|
|
65
63
|
...inputProps,
|
|
64
|
+
checked,
|
|
65
|
+
className: "hidden",
|
|
66
|
+
disabled,
|
|
66
67
|
id,
|
|
68
|
+
onChange,
|
|
67
69
|
ref,
|
|
68
|
-
type: "checkbox"
|
|
69
|
-
disabled,
|
|
70
|
-
className: "hidden",
|
|
71
|
-
checked,
|
|
72
|
-
onChange
|
|
70
|
+
type: "checkbox"
|
|
73
71
|
}
|
|
74
72
|
),
|
|
75
73
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) })
|
|
@@ -35,16 +35,14 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
|
|
|
35
35
|
const picked = variantKeys.reduce((acc, key) => {
|
|
36
36
|
if (key in props) {
|
|
37
37
|
return { ...acc, [key]: props[key] };
|
|
38
|
-
} else {
|
|
39
|
-
return acc;
|
|
40
38
|
}
|
|
39
|
+
return acc;
|
|
41
40
|
}, {});
|
|
42
41
|
if (removeVariantProps) {
|
|
43
42
|
const omitted = Object.keys(props).filter((key) => !variantKeys.includes(key)).reduce((acc, key) => ({ ...acc, [key]: props[key] }), {});
|
|
44
43
|
return [omitted, picked];
|
|
45
|
-
} else {
|
|
46
|
-
return [props, picked];
|
|
47
44
|
}
|
|
45
|
+
return [props, picked];
|
|
48
46
|
};
|
|
49
47
|
|
|
50
48
|
// src/components/switch/switch.tsx
|
|
@@ -61,13 +59,13 @@ var Switch = (0, import_react.forwardRef)((originalProps, ref) => {
|
|
|
61
59
|
"input",
|
|
62
60
|
{
|
|
63
61
|
...inputProps,
|
|
62
|
+
checked,
|
|
63
|
+
className: "hidden",
|
|
64
|
+
disabled,
|
|
64
65
|
id,
|
|
66
|
+
onChange,
|
|
65
67
|
ref,
|
|
66
|
-
type: "checkbox"
|
|
67
|
-
disabled,
|
|
68
|
-
className: "hidden",
|
|
69
|
-
checked,
|
|
70
|
-
onChange
|
|
68
|
+
type: "checkbox"
|
|
71
69
|
}
|
|
72
70
|
),
|
|
73
71
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: slots.thumb({ class: classNames == null ? void 0 : classNames.thumb }) }) })
|
|
@@ -4,20 +4,21 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.mjs';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface DefinitionTableRowCell {
|
|
8
8
|
key?: string;
|
|
9
9
|
content: ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
colSpan?: number;
|
|
12
12
|
rowSpan?: number;
|
|
13
13
|
width?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
}
|
|
15
|
+
interface DefinitionTableRow {
|
|
16
16
|
cells: DefinitionTableRowCell[];
|
|
17
17
|
className?: string;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
interface DefinitionTableProps {
|
|
20
20
|
rows: DefinitionTableRow[];
|
|
21
|
+
header?: ReactNode;
|
|
21
22
|
footer?: ReactNode;
|
|
22
23
|
highlightColumnKey?: string;
|
|
23
24
|
classNames?: SlotsToClasses<DefinitionTableSlots>;
|
|
@@ -28,6 +29,7 @@ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
|
|
|
28
29
|
[key: string]: {
|
|
29
30
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
30
31
|
base?: tailwind_merge.ClassNameValue;
|
|
32
|
+
header?: tailwind_merge.ClassNameValue;
|
|
31
33
|
table?: tailwind_merge.ClassNameValue;
|
|
32
34
|
};
|
|
33
35
|
};
|
|
@@ -35,25 +37,30 @@ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
|
|
|
35
37
|
[x: string]: {
|
|
36
38
|
[x: string]: tailwind_merge.ClassNameValue | {
|
|
37
39
|
base?: tailwind_merge.ClassNameValue;
|
|
40
|
+
header?: tailwind_merge.ClassNameValue;
|
|
38
41
|
table?: tailwind_merge.ClassNameValue;
|
|
39
42
|
};
|
|
40
43
|
};
|
|
41
44
|
} | {}, {
|
|
42
45
|
base: string[];
|
|
43
46
|
table: string[];
|
|
47
|
+
header: string[];
|
|
44
48
|
}, undefined, {
|
|
45
49
|
[key: string]: {
|
|
46
50
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
47
51
|
base?: tailwind_merge.ClassNameValue;
|
|
52
|
+
header?: tailwind_merge.ClassNameValue;
|
|
48
53
|
table?: tailwind_merge.ClassNameValue;
|
|
49
54
|
};
|
|
50
55
|
};
|
|
51
56
|
} | {}, {
|
|
52
57
|
base: string[];
|
|
53
58
|
table: string[];
|
|
59
|
+
header: string[];
|
|
54
60
|
}, tailwind_variants.TVReturnType<unknown, {
|
|
55
61
|
base: string[];
|
|
56
62
|
table: string[];
|
|
63
|
+
header: string[];
|
|
57
64
|
}, undefined, unknown, unknown, undefined>>;
|
|
58
65
|
type DefinitionTableSlots = keyof ReturnType<typeof DefinitionTableStyle>;
|
|
59
66
|
|
|
@@ -4,20 +4,21 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.js';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface DefinitionTableRowCell {
|
|
8
8
|
key?: string;
|
|
9
9
|
content: ReactNode;
|
|
10
10
|
className?: string;
|
|
11
11
|
colSpan?: number;
|
|
12
12
|
rowSpan?: number;
|
|
13
13
|
width?: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
14
|
+
}
|
|
15
|
+
interface DefinitionTableRow {
|
|
16
16
|
cells: DefinitionTableRowCell[];
|
|
17
17
|
className?: string;
|
|
18
|
-
}
|
|
18
|
+
}
|
|
19
19
|
interface DefinitionTableProps {
|
|
20
20
|
rows: DefinitionTableRow[];
|
|
21
|
+
header?: ReactNode;
|
|
21
22
|
footer?: ReactNode;
|
|
22
23
|
highlightColumnKey?: string;
|
|
23
24
|
classNames?: SlotsToClasses<DefinitionTableSlots>;
|
|
@@ -28,6 +29,7 @@ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
|
|
|
28
29
|
[key: string]: {
|
|
29
30
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
30
31
|
base?: tailwind_merge.ClassNameValue;
|
|
32
|
+
header?: tailwind_merge.ClassNameValue;
|
|
31
33
|
table?: tailwind_merge.ClassNameValue;
|
|
32
34
|
};
|
|
33
35
|
};
|
|
@@ -35,25 +37,30 @@ declare const DefinitionTableStyle: tailwind_variants.TVReturnType<{
|
|
|
35
37
|
[x: string]: {
|
|
36
38
|
[x: string]: tailwind_merge.ClassNameValue | {
|
|
37
39
|
base?: tailwind_merge.ClassNameValue;
|
|
40
|
+
header?: tailwind_merge.ClassNameValue;
|
|
38
41
|
table?: tailwind_merge.ClassNameValue;
|
|
39
42
|
};
|
|
40
43
|
};
|
|
41
44
|
} | {}, {
|
|
42
45
|
base: string[];
|
|
43
46
|
table: string[];
|
|
47
|
+
header: string[];
|
|
44
48
|
}, undefined, {
|
|
45
49
|
[key: string]: {
|
|
46
50
|
[key: string]: tailwind_merge.ClassNameValue | {
|
|
47
51
|
base?: tailwind_merge.ClassNameValue;
|
|
52
|
+
header?: tailwind_merge.ClassNameValue;
|
|
48
53
|
table?: tailwind_merge.ClassNameValue;
|
|
49
54
|
};
|
|
50
55
|
};
|
|
51
56
|
} | {}, {
|
|
52
57
|
base: string[];
|
|
53
58
|
table: string[];
|
|
59
|
+
header: string[];
|
|
54
60
|
}, tailwind_variants.TVReturnType<unknown, {
|
|
55
61
|
base: string[];
|
|
56
62
|
table: string[];
|
|
63
|
+
header: string[];
|
|
57
64
|
}, undefined, unknown, unknown, undefined>>;
|
|
58
65
|
type DefinitionTableSlots = keyof ReturnType<typeof DefinitionTableStyle>;
|
|
59
66
|
|
|
@@ -69,7 +69,7 @@ var tv = (0, import_tailwind_variants.createTV)({
|
|
|
69
69
|
|
|
70
70
|
// src/utils/clsx.ts
|
|
71
71
|
function clsx(...args) {
|
|
72
|
-
|
|
72
|
+
let i = 0, tmp, x, str = "";
|
|
73
73
|
while (i < args.length) {
|
|
74
74
|
if (tmp = args[i++]) {
|
|
75
75
|
if (x = toVal(tmp)) {
|
|
@@ -81,12 +81,12 @@ function clsx(...args) {
|
|
|
81
81
|
return str;
|
|
82
82
|
}
|
|
83
83
|
function toVal(mix) {
|
|
84
|
-
|
|
84
|
+
let k, y, str = "";
|
|
85
85
|
if (typeof mix === "string" || typeof mix === "number") {
|
|
86
86
|
str += mix;
|
|
87
87
|
} else if (typeof mix === "object") {
|
|
88
88
|
if (Array.isArray(mix)) {
|
|
89
|
-
|
|
89
|
+
const len = mix.length;
|
|
90
90
|
for (k = 0; k < len; k++) {
|
|
91
91
|
if (mix[k]) {
|
|
92
92
|
if (y = toVal(mix[k])) {
|
|
@@ -111,16 +111,20 @@ function toVal(mix) {
|
|
|
111
111
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
112
112
|
var DEFAULT_CELL_CLASSES = "px-[10px] py-[8px] text-md border-r border-neutral-light h-[50px]";
|
|
113
113
|
var FIRST_CELL_WIDTH_CLASS = "w-[120px] font-bold text-md text-body-foreground";
|
|
114
|
-
var
|
|
114
|
+
var getMaxColCount = (rows) => {
|
|
115
115
|
let maxCols = 0;
|
|
116
|
-
const colWidths = [];
|
|
117
116
|
rows.forEach((row) => {
|
|
118
|
-
let
|
|
117
|
+
let count = 0;
|
|
119
118
|
row.cells.forEach((cell) => {
|
|
120
|
-
|
|
119
|
+
count += cell.colSpan || 1;
|
|
121
120
|
});
|
|
122
|
-
maxCols = Math.max(maxCols,
|
|
121
|
+
maxCols = Math.max(maxCols, count);
|
|
123
122
|
});
|
|
123
|
+
return maxCols;
|
|
124
|
+
};
|
|
125
|
+
var renderColGroup = (rows) => {
|
|
126
|
+
const maxCols = getMaxColCount(rows);
|
|
127
|
+
const colWidths = [];
|
|
124
128
|
colWidths[0] = "120px";
|
|
125
129
|
rows.forEach((row) => {
|
|
126
130
|
let colIndex = 0;
|
|
@@ -150,79 +154,90 @@ var getHighlightColumnIndex = (rows, key) => {
|
|
|
150
154
|
}
|
|
151
155
|
return null;
|
|
152
156
|
};
|
|
153
|
-
|
|
157
|
+
function DefinitionTableRow({
|
|
154
158
|
cells,
|
|
155
159
|
className,
|
|
156
160
|
rowIndex = 0,
|
|
157
161
|
rowCount = 0,
|
|
158
162
|
highlightColumnIndex
|
|
159
|
-
})
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
163
|
+
}) {
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: clsx("border-neutral-light border-b", className), children: cells.map((cell, colIndex) => {
|
|
165
|
+
const isFirstCell = colIndex === 0;
|
|
166
|
+
const isHighlighted = colIndex === highlightColumnIndex;
|
|
167
|
+
const isFirstRow = rowIndex === 0;
|
|
168
|
+
const isLastRow = rowIndex === rowCount - 1;
|
|
169
|
+
const borderHighlightClass = isHighlighted ? clsx(
|
|
170
|
+
"border-l-[2px] border-r-[2px] border-primary-main bg-neutral-soft",
|
|
171
|
+
isFirstRow && "border-t-[2px]",
|
|
172
|
+
isLastRow && "border-b-[2px]"
|
|
173
|
+
) : "";
|
|
174
|
+
const combinedClassName = clsx(
|
|
175
|
+
DEFAULT_CELL_CLASSES,
|
|
176
|
+
isFirstCell && FIRST_CELL_WIDTH_CLASS,
|
|
177
|
+
cell.className,
|
|
178
|
+
borderHighlightClass
|
|
179
|
+
);
|
|
180
|
+
let cellStyle;
|
|
181
|
+
if (isFirstCell) {
|
|
182
|
+
cellStyle = {
|
|
183
|
+
width: "120px",
|
|
184
|
+
minWidth: "120px",
|
|
185
|
+
maxWidth: "120px"
|
|
186
|
+
};
|
|
187
|
+
} else if (cell.width && cell.width !== "auto") {
|
|
188
|
+
cellStyle = {
|
|
189
|
+
width: cell.width,
|
|
190
|
+
minWidth: cell.width,
|
|
191
|
+
maxWidth: cell.width
|
|
192
|
+
};
|
|
193
|
+
} else {
|
|
194
|
+
cellStyle = { width: "100%" };
|
|
195
|
+
}
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
197
|
+
"td",
|
|
198
|
+
{
|
|
199
|
+
className: combinedClassName,
|
|
200
|
+
colSpan: cell.colSpan,
|
|
201
|
+
rowSpan: cell.rowSpan,
|
|
202
|
+
style: { ...cellStyle, height: "50px" },
|
|
203
|
+
children: cell.content
|
|
204
|
+
},
|
|
205
|
+
colIndex
|
|
206
|
+
);
|
|
207
|
+
}) });
|
|
208
|
+
}
|
|
203
209
|
var DefinitionTable = (0, import_react.forwardRef)(
|
|
204
|
-
({ rows = [], footer, highlightColumnKey, classNames }, ref) => {
|
|
210
|
+
({ rows = [], header, footer, highlightColumnKey, classNames }, ref) => {
|
|
205
211
|
const slots = (0, import_react.useMemo)(() => DefinitionTableStyle(), []);
|
|
206
212
|
const highlightColumnIndex = (0, import_react.useMemo)(
|
|
207
213
|
() => getHighlightColumnIndex(rows, highlightColumnKey),
|
|
208
214
|
[rows, highlightColumnKey]
|
|
209
215
|
);
|
|
210
|
-
|
|
216
|
+
const maxColCount = (0, import_react.useMemo)(() => getMaxColCount(rows), [rows]);
|
|
217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: clsx(slots.base(), classNames == null ? void 0 : classNames.base), ref, children: [
|
|
211
218
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("table", { className: clsx(slots.table(), classNames == null ? void 0 : classNames.table), children: [
|
|
212
219
|
renderColGroup(rows),
|
|
220
|
+
header != null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
221
|
+
"th",
|
|
222
|
+
{
|
|
223
|
+
className: clsx(slots.header(), classNames == null ? void 0 : classNames.header),
|
|
224
|
+
colSpan: maxColCount,
|
|
225
|
+
children: header
|
|
226
|
+
}
|
|
227
|
+
) }) }),
|
|
213
228
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
214
229
|
DefinitionTableRow,
|
|
215
230
|
{
|
|
216
231
|
...row,
|
|
217
|
-
|
|
218
|
-
rowCount: rows.length,
|
|
232
|
+
className: row.className,
|
|
219
233
|
highlightColumnIndex,
|
|
220
|
-
|
|
234
|
+
rowCount: rows.length,
|
|
235
|
+
rowIndex: i
|
|
221
236
|
},
|
|
222
237
|
i
|
|
223
238
|
)) })
|
|
224
239
|
] }),
|
|
225
|
-
footer
|
|
240
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: footer }) : null
|
|
226
241
|
] });
|
|
227
242
|
}
|
|
228
243
|
);
|
|
@@ -231,6 +246,20 @@ var definition_table_default = DefinitionTable;
|
|
|
231
246
|
var DefinitionTableStyle = tv({
|
|
232
247
|
slots: {
|
|
233
248
|
base: ["flex", "flex-col", "gap-[30px]"],
|
|
234
|
-
table: ["w-full", "table-auto", "border", "border-neutral-light"]
|
|
249
|
+
table: ["w-full", "table-auto", "border", "border-neutral-light"],
|
|
250
|
+
header: [
|
|
251
|
+
"text-body-foreground",
|
|
252
|
+
"font-bold",
|
|
253
|
+
"text-center",
|
|
254
|
+
"align-middle",
|
|
255
|
+
"whitespace-nowrap",
|
|
256
|
+
"bg-neutral-soft",
|
|
257
|
+
"px-[10px]",
|
|
258
|
+
"py-[8px]",
|
|
259
|
+
"text-md",
|
|
260
|
+
"border-b",
|
|
261
|
+
"border-neutral-light",
|
|
262
|
+
"h-[50px]"
|
|
263
|
+
]
|
|
235
264
|
}
|
|
236
265
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
definition_table_default
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-PPTFOHMW.mjs";
|
|
5
|
+
import "../../chunk-KJFYLLMP.mjs";
|
|
6
6
|
import "../../chunk-UP6RPQDX.mjs";
|
|
7
7
|
export {
|
|
8
8
|
definition_table_default as default
|
|
@@ -4,10 +4,10 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode, FormEvent } from 'react';
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.mjs';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface TableRow {
|
|
8
8
|
columns: ReactNode[];
|
|
9
9
|
columnClasses?: string[];
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
interface FormTableProps {
|
|
12
12
|
rows: TableRow[];
|
|
13
13
|
onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
|
|
@@ -4,10 +4,10 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode, FormEvent } from 'react';
|
|
5
5
|
import { SlotsToClasses } from '../../utils/types.js';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
interface TableRow {
|
|
8
8
|
columns: ReactNode[];
|
|
9
9
|
columnClasses?: string[];
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
11
|
interface FormTableProps {
|
|
12
12
|
rows: TableRow[];
|
|
13
13
|
onSubmit?: (e: FormEvent<HTMLFormElement>) => void;
|
|
@@ -73,29 +73,31 @@ var DEFAULT_COLUMN_CLASSES = [
|
|
|
73
73
|
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
74
74
|
"px-[10px] py-[9.5px]"
|
|
75
75
|
];
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
function FormTableRow({ columns, columnClasses = [] }) {
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
78
|
+
var _a;
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
80
|
+
}) });
|
|
81
|
+
}
|
|
80
82
|
var FormTable = (0, import_react.forwardRef)(
|
|
81
83
|
({ rows, onSubmit, footer, classNames }, ref) => {
|
|
82
84
|
const slots = (0, import_react.useMemo)(() => formTableStyle(), []);
|
|
83
85
|
const content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
84
86
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormTableRow, { ...row }, i)) }) }),
|
|
85
|
-
footer
|
|
87
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: footer }) : null
|
|
86
88
|
] });
|
|
87
89
|
if (onSubmit) {
|
|
88
90
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
91
|
"form",
|
|
90
92
|
{
|
|
91
|
-
ref,
|
|
92
|
-
onSubmit,
|
|
93
93
|
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
94
|
+
onSubmit,
|
|
95
|
+
ref,
|
|
94
96
|
children: content
|
|
95
97
|
}
|
|
96
98
|
);
|
|
97
99
|
}
|
|
98
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
|
100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ref, children: content });
|
|
99
101
|
}
|
|
100
102
|
);
|
|
101
103
|
FormTable.displayName = "FormTable";
|
|
@@ -10,29 +10,31 @@ var DEFAULT_COLUMN_CLASSES = [
|
|
|
10
10
|
"w-[120px] px-[10px] py-[9.5px] font-bold text-md text-body-foreground border-r border-neutral-light",
|
|
11
11
|
"px-[10px] py-[9.5px]"
|
|
12
12
|
];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
function FormTableRow({ columns, columnClasses = [] }) {
|
|
14
|
+
return /* @__PURE__ */ jsx("tr", { className: "border-neutral-light min-h-[50px] border-b", children: columns.map((col, index) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return /* @__PURE__ */ jsx("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
|
|
17
|
+
}) });
|
|
18
|
+
}
|
|
17
19
|
var FormTable = forwardRef(
|
|
18
20
|
({ rows, onSubmit, footer, classNames }, ref) => {
|
|
19
21
|
const slots = useMemo(() => formTableStyle(), []);
|
|
20
22
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
21
23
|
/* @__PURE__ */ jsx("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ jsx("tbody", { children: rows.map((row, i) => /* @__PURE__ */ jsx(FormTableRow, { ...row }, i)) }) }),
|
|
22
|
-
footer
|
|
24
|
+
footer ? /* @__PURE__ */ jsx("div", { children: footer }) : null
|
|
23
25
|
] });
|
|
24
26
|
if (onSubmit) {
|
|
25
27
|
return /* @__PURE__ */ jsx(
|
|
26
28
|
"form",
|
|
27
29
|
{
|
|
28
|
-
ref,
|
|
29
|
-
onSubmit,
|
|
30
30
|
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
|
|
31
|
+
onSubmit,
|
|
32
|
+
ref,
|
|
31
33
|
children: content
|
|
32
34
|
}
|
|
33
35
|
);
|
|
34
36
|
}
|
|
35
|
-
return /* @__PURE__ */ jsx("div", {
|
|
37
|
+
return /* @__PURE__ */ jsx("div", { className: slots.base({ class: classNames == null ? void 0 : classNames.base }), ref, children: content });
|
|
36
38
|
}
|
|
37
39
|
);
|
|
38
40
|
FormTable.displayName = "FormTable";
|