@vlrc-fe/components 1.0.7 → 1.0.8
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/MultiSelect/type.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +64 -41
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +46 -80
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +22 -60
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +1147 -43
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +30 -64
- package/dist/index103.cjs +1 -1
- package/dist/index103.js +31 -147
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +93 -19
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +80 -25
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +9 -50
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +30 -156
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +350 -14
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +11 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +55 -60
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +430 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +36 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +28 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +14 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +156 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +19 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +67 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +118 -0
- package/dist/index118.cjs +1 -0
- package/dist/index118.js +36 -0
- package/dist/index119.cjs +1 -0
- package/dist/index119.js +13 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +44 -121
- package/dist/index120.cjs +1 -0
- package/dist/index120.js +31 -0
- package/dist/index121.cjs +1 -0
- package/dist/index121.js +37 -0
- package/dist/index122.cjs +1 -0
- package/dist/index122.js +123 -0
- package/dist/index123.cjs +1 -0
- package/dist/index123.js +44 -0
- package/dist/index124.cjs +1 -0
- package/dist/index124.js +43 -0
- package/dist/index125.cjs +1 -0
- package/dist/index125.js +14 -0
- package/dist/index126.cjs +1 -0
- package/dist/index126.js +64 -0
- package/dist/index127.cjs +1 -0
- package/dist/index127.js +23 -0
- package/dist/index128.cjs +1 -0
- package/dist/index128.js +34 -0
- package/dist/index129.cjs +1 -0
- package/dist/index129.js +27 -0
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +30 -12
- package/dist/index130.cjs +1 -0
- package/dist/index130.js +26 -0
- package/dist/index131.cjs +1 -0
- package/dist/index131.js +157 -0
- package/dist/index132.cjs +1 -0
- package/dist/index132.js +34 -0
- package/dist/index133.cjs +1 -0
- package/dist/index133.js +46 -0
- package/dist/index134.cjs +1 -0
- package/dist/index134.js +142 -0
- package/dist/index135.cjs +1 -0
- package/dist/index135.js +125 -0
- package/dist/index136.cjs +1 -0
- package/dist/index136.js +26 -0
- package/dist/index137.cjs +1 -0
- package/dist/index137.js +88 -0
- package/dist/index138.cjs +1 -0
- package/dist/index138.js +221 -0
- package/dist/index139.cjs +1 -0
- package/dist/index139.js +166 -0
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +8 -12
- package/dist/index140.cjs +1 -0
- package/dist/index140.js +126 -0
- package/dist/index141.cjs +1 -0
- package/dist/index141.js +15 -0
- package/dist/index142.cjs +1 -0
- package/dist/index142.js +9 -0
- package/dist/index143.cjs +1 -0
- package/dist/index143.js +17 -0
- package/dist/index144.cjs +1 -0
- package/dist/index144.js +22 -0
- package/dist/index145.cjs +1 -0
- package/dist/index145.js +18 -0
- package/dist/index146.cjs +1 -0
- package/dist/index146.js +6 -0
- package/dist/index147.cjs +1 -0
- package/dist/index147.js +7 -0
- package/dist/index148.cjs +1 -0
- package/dist/index148.js +8 -0
- package/dist/index149.cjs +1 -0
- package/dist/index149.js +7 -0
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +12 -112
- package/dist/index150.cjs +1 -0
- package/dist/index150.js +7 -0
- package/dist/index151.cjs +1 -0
- package/dist/index151.js +9 -0
- package/dist/index152.cjs +1 -0
- package/dist/index152.js +69 -0
- package/dist/index153.cjs +1 -0
- package/dist/index153.js +11 -0
- package/dist/index154.cjs +1 -0
- package/dist/index154.js +202 -0
- package/dist/index155.cjs +1 -0
- package/dist/index155.js +124 -0
- package/dist/index156.cjs +1 -0
- package/dist/index156.js +32 -0
- package/dist/index157.cjs +1 -0
- package/dist/index157.js +20 -0
- package/dist/index158.cjs +1 -0
- package/dist/index158.js +69 -0
- package/dist/index159.cjs +1 -0
- package/dist/index159.js +32 -0
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +4 -726
- package/dist/index160.cjs +1 -0
- package/dist/index160.js +11 -0
- package/dist/index161.cjs +1 -0
- package/dist/index161.js +280 -0
- package/dist/index162.cjs +1 -0
- package/dist/index162.js +157 -0
- package/dist/index163.cjs +1 -0
- package/dist/index163.js +20 -0
- package/dist/index164.cjs +1 -0
- package/dist/index164.js +10 -0
- package/dist/index165.cjs +1 -0
- package/dist/index165.js +14 -0
- package/dist/index166.cjs +1 -0
- package/dist/index166.js +8 -0
- package/dist/index167.cjs +1 -0
- package/dist/index167.js +8 -0
- package/dist/index168.cjs +1 -0
- package/dist/index168.js +11 -0
- package/dist/index169.cjs +1 -0
- package/dist/index169.js +10 -0
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +79 -339
- package/dist/index170.cjs +1 -0
- package/dist/index170.js +6 -0
- package/dist/index171.cjs +1 -0
- package/dist/index171.js +8 -0
- package/dist/index172.cjs +1 -0
- package/dist/index172.js +8 -0
- package/dist/index173.cjs +1 -0
- package/dist/index173.js +10 -0
- package/dist/index174.cjs +1 -0
- package/dist/index174.js +11 -0
- package/dist/index175.cjs +1 -0
- package/dist/index175.js +15 -0
- package/dist/index176.cjs +1 -0
- package/dist/index176.js +11 -0
- package/dist/index177.cjs +1 -0
- package/dist/index177.js +11 -0
- package/dist/index178.cjs +1 -0
- package/dist/index178.js +6 -0
- package/dist/index179.cjs +1 -0
- package/dist/index179.js +43 -0
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +19 -66
- package/dist/index180.cjs +1 -0
- package/dist/index180.js +382 -0
- package/dist/index181.cjs +1 -0
- package/dist/index181.js +40 -0
- package/dist/index182.cjs +1 -0
- package/dist/index182.js +23 -0
- package/dist/index183.cjs +1 -0
- package/dist/index183.js +59 -0
- package/dist/index184.cjs +1 -0
- package/dist/index184.js +55 -0
- package/dist/index185.cjs +1 -0
- package/dist/index185.js +54 -0
- package/dist/index186.cjs +1 -0
- package/dist/index186.js +57 -0
- package/dist/index187.cjs +1 -0
- package/dist/index187.js +57 -0
- package/dist/index188.cjs +1 -0
- package/dist/index188.js +88 -0
- package/dist/index189.cjs +1 -0
- package/dist/index189.js +66 -0
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +18 -8
- package/dist/index190.cjs +1 -0
- package/dist/index190.js +594 -0
- package/dist/index191.cjs +9 -0
- package/dist/index191.js +30 -0
- package/dist/index192.cjs +1 -0
- package/dist/index192.js +50 -0
- package/dist/index193.cjs +1 -0
- package/dist/index193.js +65 -0
- package/dist/index194.cjs +1 -0
- package/dist/index194.js +48 -0
- package/dist/index195.cjs +1 -0
- package/dist/index195.js +67 -0
- package/dist/index196.cjs +1 -0
- package/dist/index196.js +151 -0
- package/dist/index197.cjs +1 -0
- package/dist/index197.js +23 -0
- package/dist/index198.cjs +1 -0
- package/dist/index198.js +27 -0
- package/dist/index199.cjs +1 -0
- package/dist/index199.js +53 -0
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +51 -98
- package/dist/index200.cjs +1 -0
- package/dist/index200.js +161 -0
- package/dist/index201.cjs +1 -0
- package/dist/index201.js +16 -0
- package/dist/index202.cjs +1 -0
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +81 -28
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +64 -14
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +25 -22
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +1014 -33
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +22 -96
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +108 -25
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +15 -9
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +20 -66
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +81 -11
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +91 -29
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +14 -41
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +93 -12
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +22 -62
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +84 -22
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +85 -33
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +407 -25
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +170 -25
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +28 -154
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +158 -33
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +104 -45
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +337 -140
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +96 -124
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +319 -23
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +205 -81
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +33 -220
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +161 -163
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +20 -125
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +24 -14
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +167 -7
- package/dist/index5.js +26 -14
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +44 -15
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +15 -18
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +3 -17
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +5 -5
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +19 -4
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +24 -6
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +66 -4
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +14 -5
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +4 -8
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +50 -67
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +85 -46
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +6 -10
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +25 -199
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +13 -122
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +9 -30
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +3 -20
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +24 -66
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +68 -30
- package/dist/index67.cjs +38 -1
- package/dist/index67.js +3 -11
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +12 -279
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +50 -155
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +29 -85
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +115 -19
- package/dist/index71.cjs +4 -1
- package/dist/index71.js +6 -9
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +12 -12
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +539 -6
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +197 -6
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +120 -9
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +912 -8
- package/dist/index77.cjs +3 -1
- package/dist/index77.js +76 -4
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +120 -6
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +12 -6
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +35 -62
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +14 -8
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +113 -9
- package/dist/index82.cjs +1 -1
- package/dist/index82.js +725 -13
- package/dist/index83.cjs +1 -1
- package/dist/index83.js +346 -9
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +74 -9
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +148 -4
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +31 -42
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +12 -380
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +345 -37
- package/dist/index89.cjs +20 -1
- package/dist/index89.js +40 -18
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +85 -17
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +113 -56
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +272 -51
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +129 -50
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +13 -54
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +28 -55
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +525 -80
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +75 -61
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +67 -583
- package/dist/index98.cjs +1 -9
- package/dist/index98.js +32 -27
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +17 -49
- package/dist/ui/alert-dialog.d.ts +15 -0
- package/dist/ui/alert-dialog.d.ts.map +1 -0
- package/dist/ui/alert.d.ts +10 -0
- package/dist/ui/alert.d.ts.map +1 -0
- package/dist/ui/aspect-ratio.d.ts +4 -0
- package/dist/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/ui/avatar.d.ts +7 -0
- package/dist/ui/avatar.d.ts.map +1 -0
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/breadcrumb.d.ts +12 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -0
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/carousel.d.ts +20 -0
- package/dist/ui/carousel.d.ts.map +1 -0
- package/dist/ui/collapsible.d.ts +6 -0
- package/dist/ui/collapsible.d.ts.map +1 -0
- package/dist/ui/context-menu.d.ts +26 -0
- package/dist/ui/context-menu.d.ts.map +1 -0
- package/dist/ui/drawer.d.ts +14 -0
- package/dist/ui/drawer.d.ts.map +1 -0
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -0
- package/dist/ui/index.d.ts +23 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/input-otp.d.ts +12 -0
- package/dist/ui/input-otp.d.ts.map +1 -0
- package/dist/ui/menubar.d.ts +27 -0
- package/dist/ui/menubar.d.ts.map +1 -0
- package/dist/ui/navigation-menu.d.ts +15 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -0
- package/dist/ui/pagination.d.ts +14 -0
- package/dist/ui/pagination.d.ts.map +1 -0
- package/dist/ui/resizable.d.ts +9 -0
- package/dist/ui/resizable.d.ts.map +1 -0
- package/dist/ui/sheet.d.ts +14 -0
- package/dist/ui/sheet.d.ts.map +1 -0
- package/dist/ui/sidebar.d.ts +70 -0
- package/dist/ui/sidebar.d.ts.map +1 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/slider.d.ts +5 -0
- package/dist/ui/slider.d.ts.map +1 -0
- package/dist/ui/switch.d.ts +5 -0
- package/dist/ui/switch.d.ts.map +1 -0
- package/dist/ui/tabs.d.ts +8 -0
- package/dist/ui/tabs.d.ts.map +1 -0
- package/dist/ui/toggle-group.d.ts +8 -0
- package/dist/ui/toggle-group.d.ts.map +1 -0
- package/dist/ui/toggle.d.ts +10 -0
- package/dist/ui/toggle.d.ts.map +1 -0
- package/package.json +23 -5
package/dist/index120.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { composeEventHandlers as e } from "./index8.js";
|
|
3
|
+
import { Primitive as t } from "./index12.js";
|
|
4
|
+
import { useControllableState as n } from "./index29.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-toggle@1.1.18_@types+react-dom@19.2.3_@types+react@19.2.17__@types+reac_bfc68b0fc9dd6fbca9be8cf294d00420/node_modules/@radix-ui/react-toggle/dist/index.mjs
|
|
8
|
+
var a = Object.defineProperty, o = (e, t) => a(e, "name", {
|
|
9
|
+
value: t,
|
|
10
|
+
configurable: !0
|
|
11
|
+
}), s = "Toggle", c = /* @__PURE__ */ r.forwardRef(/* @__PURE__ */ o(function(r, a) {
|
|
12
|
+
let { pressed: o, defaultPressed: c, onPressedChange: l, ...u } = r, [d, f] = n({
|
|
13
|
+
prop: o,
|
|
14
|
+
onChange: l,
|
|
15
|
+
defaultProp: c ?? !1,
|
|
16
|
+
caller: s
|
|
17
|
+
});
|
|
18
|
+
return /* @__PURE__ */ i(t.button, {
|
|
19
|
+
type: "button",
|
|
20
|
+
"aria-pressed": d,
|
|
21
|
+
"data-state": d ? "on" : "off",
|
|
22
|
+
"data-disabled": r.disabled ? "" : void 0,
|
|
23
|
+
...u,
|
|
24
|
+
ref: a,
|
|
25
|
+
onClick: e(r.onClick, () => {
|
|
26
|
+
r.disabled || f(!d);
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
}, "Toggle")), l = c;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { l as Root, c as Toggle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index9.cjs"),n=require("./index13.cjs"),r=require("./index30.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=Object.defineProperty,s=(e,t)=>o(e,`name`,{value:t,configurable:!0}),c=`Toggle`,l=i.forwardRef(s(function(e,i){let{pressed:o,defaultPressed:s,onPressedChange:l,...u}=e,[d,f]=r.useControllableState({prop:o,onChange:l,defaultProp:s??!1,caller:c});return(0,a.jsx)(n.Primitive.button,{type:`button`,"aria-pressed":d,"data-state":d?`on`:`off`,"data-disabled":e.disabled?``:void 0,...u,ref:i,onClick:t.composeEventHandlers(e.onClick,()=>{e.disabled||f(!d)})})},`Toggle`)),u=l;exports.Root=u,exports.Toggle=l;
|
package/dist/index121.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "./index3.js";
|
|
3
|
+
import { Root as t } from "./index120.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
import { cva as r } from "class-variance-authority";
|
|
7
|
+
//#region src/ui/toggle.tsx
|
|
8
|
+
var i = r("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-transparent",
|
|
12
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-9 px-2 min-w-9",
|
|
16
|
+
sm: "h-8 px-1.5 min-w-8",
|
|
17
|
+
lg: "h-10 px-2.5 min-w-10"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function a({ className: r, variant: a, size: o, ...s }) {
|
|
26
|
+
return /* @__PURE__ */ n(t, {
|
|
27
|
+
"data-slot": "toggle",
|
|
28
|
+
className: e(i({
|
|
29
|
+
variant: a,
|
|
30
|
+
size: o,
|
|
31
|
+
className: r
|
|
32
|
+
})),
|
|
33
|
+
...s
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { a as Toggle, i as toggleVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index121.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=(0,require("class-variance-authority").cva)(`inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap`,{variants:{variant:{default:`bg-transparent`,outline:`border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground`},size:{default:`h-9 px-2 min-w-9`,sm:`h-8 px-1.5 min-w-8`,lg:`h-10 px-2.5 min-w-10`}},defaultVariants:{variant:`default`,size:`default`}});function o({className:e,variant:r,size:o,...s}){return(0,i.jsx)(n.Root,{"data-slot":`toggle`,className:t.cn(a({variant:r,size:o,className:e})),...s})}exports.Toggle=o,exports.toggleVariants=a;
|
package/dist/index122.js
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContextScope as e } from "./index6.js";
|
|
3
|
+
import { Primitive as t } from "./index12.js";
|
|
4
|
+
import { useControllableState as n } from "./index29.js";
|
|
5
|
+
import { Item as r, Root as i, createRovingFocusGroupScope as a } from "./index49.js";
|
|
6
|
+
import { Toggle as o } from "./index120.js";
|
|
7
|
+
import * as s from "react";
|
|
8
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
9
|
+
import { useDirection as l } from "@radix-ui/react-direction";
|
|
10
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-toggle-group@1.1.19_@types+react-dom@19.2.3_@types+react@19.2.17__@type_8d974b08799a7a6c081744aa632f25fd/node_modules/@radix-ui/react-toggle-group/dist/index.mjs
|
|
11
|
+
var u = Object.defineProperty, d = (e, t) => u(e, "name", {
|
|
12
|
+
value: t,
|
|
13
|
+
configurable: !0
|
|
14
|
+
}), f = "ToggleGroup", [p, m] = e(f, [a]), h = a(), g = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
15
|
+
let { type: n, ...r } = e;
|
|
16
|
+
if (n === "single") return /* @__PURE__ */ c(y, {
|
|
17
|
+
role: "radiogroup",
|
|
18
|
+
...r,
|
|
19
|
+
ref: t
|
|
20
|
+
});
|
|
21
|
+
if (n === "multiple") return /* @__PURE__ */ c(b, {
|
|
22
|
+
role: "toolbar",
|
|
23
|
+
...r,
|
|
24
|
+
ref: t
|
|
25
|
+
});
|
|
26
|
+
throw Error(`Missing prop \`type\` expected on \`${f}\``);
|
|
27
|
+
}, "ToggleGroup")), [_, v] = p(f), y = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
28
|
+
let { value: r, defaultValue: i, onValueChange: a = /* @__PURE__ */ d(() => {}, "onValueChange"), ...o } = e, [l, u] = n({
|
|
29
|
+
prop: r,
|
|
30
|
+
defaultProp: i ?? "",
|
|
31
|
+
onChange: a,
|
|
32
|
+
caller: f
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ c(_, {
|
|
35
|
+
scope: e.__scopeToggleGroup,
|
|
36
|
+
type: "single",
|
|
37
|
+
value: s.useMemo(() => l ? [l] : [], [l]),
|
|
38
|
+
onItemActivate: u,
|
|
39
|
+
onItemDeactivate: s.useCallback(() => u(""), [u]),
|
|
40
|
+
children: /* @__PURE__ */ c(C, {
|
|
41
|
+
...o,
|
|
42
|
+
ref: t
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
}, "ToggleGroupImplSingle")), b = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
46
|
+
let { value: r, defaultValue: i, onValueChange: a = /* @__PURE__ */ d(() => {}, "onValueChange"), ...o } = e, [l, u] = n({
|
|
47
|
+
prop: r,
|
|
48
|
+
defaultProp: i ?? [],
|
|
49
|
+
onChange: a,
|
|
50
|
+
caller: f
|
|
51
|
+
}), p = s.useCallback((e) => u((t = []) => [...t, e]), [u]), m = s.useCallback((e) => u((t = []) => t.filter((t) => t !== e)), [u]);
|
|
52
|
+
return /* @__PURE__ */ c(_, {
|
|
53
|
+
scope: e.__scopeToggleGroup,
|
|
54
|
+
type: "multiple",
|
|
55
|
+
value: l,
|
|
56
|
+
onItemActivate: p,
|
|
57
|
+
onItemDeactivate: m,
|
|
58
|
+
children: /* @__PURE__ */ c(C, {
|
|
59
|
+
...o,
|
|
60
|
+
ref: t
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}, "ToggleGroupImplMultiple")), [x, S] = p(f), C = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, n) {
|
|
64
|
+
let { __scopeToggleGroup: r, disabled: a = !1, rovingFocus: o = !0, orientation: s, dir: u, loop: d = !0, ...f } = e, p = h(r), m = l(u), g = {
|
|
65
|
+
dir: m,
|
|
66
|
+
...f
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ c(x, {
|
|
69
|
+
scope: r,
|
|
70
|
+
rovingFocus: o,
|
|
71
|
+
disabled: a,
|
|
72
|
+
children: o ? /* @__PURE__ */ c(i, {
|
|
73
|
+
asChild: !0,
|
|
74
|
+
...p,
|
|
75
|
+
orientation: s,
|
|
76
|
+
dir: m,
|
|
77
|
+
loop: d,
|
|
78
|
+
children: /* @__PURE__ */ c(t.div, {
|
|
79
|
+
...g,
|
|
80
|
+
ref: n
|
|
81
|
+
})
|
|
82
|
+
}) : /* @__PURE__ */ c(t.div, {
|
|
83
|
+
...g,
|
|
84
|
+
ref: n
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}, "ToggleGroupImpl")), w = "ToggleGroupItem", T = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
88
|
+
let n = v(w, e.__scopeToggleGroup), i = S(w, e.__scopeToggleGroup), a = h(e.__scopeToggleGroup), o = n.value.includes(e.value), l = i.disabled || e.disabled, u = {
|
|
89
|
+
...e,
|
|
90
|
+
pressed: o,
|
|
91
|
+
disabled: l
|
|
92
|
+
}, d = s.useRef(null);
|
|
93
|
+
return i.rovingFocus ? /* @__PURE__ */ c(r, {
|
|
94
|
+
asChild: !0,
|
|
95
|
+
...a,
|
|
96
|
+
focusable: !l,
|
|
97
|
+
active: o,
|
|
98
|
+
ref: d,
|
|
99
|
+
children: /* @__PURE__ */ c(E, {
|
|
100
|
+
...u,
|
|
101
|
+
ref: t
|
|
102
|
+
})
|
|
103
|
+
}) : /* @__PURE__ */ c(E, {
|
|
104
|
+
...u,
|
|
105
|
+
ref: t
|
|
106
|
+
});
|
|
107
|
+
}, "ToggleGroupItem")), E = /* @__PURE__ */ s.forwardRef(/* @__PURE__ */ d(function(e, t) {
|
|
108
|
+
let { __scopeToggleGroup: n, value: r, ...i } = e, a = v(w, n), s = {
|
|
109
|
+
role: "radio",
|
|
110
|
+
"aria-checked": e.pressed,
|
|
111
|
+
"aria-pressed": void 0
|
|
112
|
+
};
|
|
113
|
+
return /* @__PURE__ */ c(o, {
|
|
114
|
+
...a.type === "single" ? s : void 0,
|
|
115
|
+
...i,
|
|
116
|
+
ref: t,
|
|
117
|
+
onPressedChange: (e) => {
|
|
118
|
+
e ? a.onItemActivate(r) : a.onItemDeactivate(r);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}, "ToggleGroupItemImpl"));
|
|
122
|
+
//#endregion
|
|
123
|
+
export { g as ToggleGroup, T as ToggleGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index13.cjs"),r=require("./index30.cjs"),i=require("./index50.cjs"),a=require("./index121.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("react/jsx-runtime"),c=require("@radix-ui/react-direction");var l=Object.defineProperty,u=(e,t)=>l(e,`name`,{value:t,configurable:!0}),d=`ToggleGroup`,[f,p]=t.createContextScope(d,[i.createRovingFocusGroupScope]),m=i.createRovingFocusGroupScope(),h=o.forwardRef(u(function(e,t){let{type:n,...r}=e;if(n===`single`)return(0,s.jsx)(v,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,s.jsx)(y,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${d}\``)},`ToggleGroup`)),[g,_]=f(d),v=o.forwardRef(u(function(e,t){let{value:n,defaultValue:i,onValueChange:a=u(()=>{},`onValueChange`),...c}=e,[l,f]=r.useControllableState({prop:n,defaultProp:i??``,onChange:a,caller:d});return(0,s.jsx)(g,{scope:e.__scopeToggleGroup,type:`single`,value:o.useMemo(()=>l?[l]:[],[l]),onItemActivate:f,onItemDeactivate:o.useCallback(()=>f(``),[f]),children:(0,s.jsx)(S,{...c,ref:t})})},`ToggleGroupImplSingle`)),y=o.forwardRef(u(function(e,t){let{value:n,defaultValue:i,onValueChange:a=u(()=>{},`onValueChange`),...c}=e,[l,f]=r.useControllableState({prop:n,defaultProp:i??[],onChange:a,caller:d}),p=o.useCallback(e=>f((t=[])=>[...t,e]),[f]),m=o.useCallback(e=>f((t=[])=>t.filter(t=>t!==e)),[f]);return(0,s.jsx)(g,{scope:e.__scopeToggleGroup,type:`multiple`,value:l,onItemActivate:p,onItemDeactivate:m,children:(0,s.jsx)(S,{...c,ref:t})})},`ToggleGroupImplMultiple`)),[b,x]=f(d),S=o.forwardRef(u(function(e,t){let{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:o=!0,orientation:l,dir:u,loop:d=!0,...f}=e,p=m(r),h=(0,c.useDirection)(u),g={dir:h,...f};return(0,s.jsx)(b,{scope:r,rovingFocus:o,disabled:a,children:o?(0,s.jsx)(i.Root,{asChild:!0,...p,orientation:l,dir:h,loop:d,children:(0,s.jsx)(n.Primitive.div,{...g,ref:t})}):(0,s.jsx)(n.Primitive.div,{...g,ref:t})})},`ToggleGroupImpl`)),C=`ToggleGroupItem`,w=o.forwardRef(u(function(e,t){let n=_(C,e.__scopeToggleGroup),r=x(C,e.__scopeToggleGroup),a=m(e.__scopeToggleGroup),c=n.value.includes(e.value),l=r.disabled||e.disabled,u={...e,pressed:c,disabled:l},d=o.useRef(null);return r.rovingFocus?(0,s.jsx)(i.Item,{asChild:!0,...a,focusable:!l,active:c,ref:d,children:(0,s.jsx)(T,{...u,ref:t})}):(0,s.jsx)(T,{...u,ref:t})},`ToggleGroupItem`)),T=o.forwardRef(u(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,o=_(C,n),c={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0};return(0,s.jsx)(a.Toggle,{...o.type===`single`?c:void 0,...i,ref:t,onPressedChange:e=>{e?o.onItemActivate(r):o.onItemDeactivate(r)}})},`ToggleGroupItemImpl`));exports.ToggleGroup=h,exports.ToggleGroupItem=w;
|
package/dist/index123.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "./index3.js";
|
|
3
|
+
import { toggleVariants as t } from "./index121.js";
|
|
4
|
+
import { ToggleGroup as n, ToggleGroupItem as r } from "./index122.js";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
import "class-variance-authority";
|
|
8
|
+
//#region src/ui/toggle-group.tsx
|
|
9
|
+
var o = i.createContext({
|
|
10
|
+
size: "default",
|
|
11
|
+
variant: "default"
|
|
12
|
+
});
|
|
13
|
+
function s({ className: t, variant: r, size: i, children: s, ...c }) {
|
|
14
|
+
return /* @__PURE__ */ a(n, {
|
|
15
|
+
"data-slot": "toggle-group",
|
|
16
|
+
"data-variant": r,
|
|
17
|
+
"data-size": i,
|
|
18
|
+
className: e("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs", t),
|
|
19
|
+
...c,
|
|
20
|
+
children: /* @__PURE__ */ a(o.Provider, {
|
|
21
|
+
value: {
|
|
22
|
+
variant: r,
|
|
23
|
+
size: i
|
|
24
|
+
},
|
|
25
|
+
children: s
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function c({ className: n, children: s, variant: c, size: l, ...u }) {
|
|
30
|
+
let d = i.useContext(o);
|
|
31
|
+
return /* @__PURE__ */ a(r, {
|
|
32
|
+
"data-slot": "toggle-group-item",
|
|
33
|
+
"data-variant": d.variant || c,
|
|
34
|
+
"data-size": d.size || l,
|
|
35
|
+
className: e(t({
|
|
36
|
+
variant: d.variant || c,
|
|
37
|
+
size: d.size || l
|
|
38
|
+
}), "min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l", n),
|
|
39
|
+
...u,
|
|
40
|
+
children: s
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { s as ToggleGroup, c as ToggleGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index4.cjs"),n=require("./index122.cjs"),r=require("./index123.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");require("class-variance-authority");var o=i.createContext({size:`default`,variant:`default`});function s({className:e,variant:n,size:i,children:s,...c}){return(0,a.jsx)(r.ToggleGroup,{"data-slot":`toggle-group`,"data-variant":n,"data-size":i,className:t.cn(`group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs`,e),...c,children:(0,a.jsx)(o.Provider,{value:{variant:n,size:i},children:s})})}function c({className:e,children:s,variant:c,size:l,...u}){let d=i.useContext(o);return(0,a.jsx)(r.ToggleGroupItem,{"data-slot":`toggle-group-item`,"data-variant":d.variant||c,"data-size":d.size||l,className:t.cn(n.toggleVariants({variant:d.variant||c,size:d.size||l}),`min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l`,e),...u,children:s})}exports.ToggleGroup=s,exports.ToggleGroupItem=c;
|
package/dist/index124.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { cn as e } from "./index3.js";
|
|
2
|
+
import { Button as t } from "./index10.js";
|
|
3
|
+
import { Dialog as n, DialogContent as r, DialogDescription as i, DialogFooter as a, DialogHeader as o, DialogTitle as s } from "./index34.js";
|
|
4
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Modal.tsx
|
|
6
|
+
function u({ open: u = !0, title: d, description: f, children: p, footer: m, width: h = 900, confirmText: g = "Xác nhận", cancelText: _ = "Hủy", isLoading: v = !1, onCancel: y, onConfirm: b }) {
|
|
7
|
+
return /* @__PURE__ */ c(n, {
|
|
8
|
+
open: u,
|
|
9
|
+
onOpenChange: (e) => !e && y(),
|
|
10
|
+
children: /* @__PURE__ */ l(r, {
|
|
11
|
+
className: e("flex max-h-[calc(100vh-150px)] flex-col gap-0 p-0 sm:max-w-175"),
|
|
12
|
+
style: { maxWidth: h },
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ l(o, {
|
|
15
|
+
className: "px-6 py-4 border-b",
|
|
16
|
+
children: [/* @__PURE__ */ c(s, { children: d }), f ? /* @__PURE__ */ c(i, { children: f }) : null]
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ c("div", {
|
|
19
|
+
className: "flex-1 overflow-y-auto px-6 py-4",
|
|
20
|
+
children: p
|
|
21
|
+
}),
|
|
22
|
+
(m || b) && /* @__PURE__ */ c(a, {
|
|
23
|
+
className: "px-6 py-4 border-t",
|
|
24
|
+
children: m || /* @__PURE__ */ l("div", {
|
|
25
|
+
className: "flex w-full justify-end gap-2",
|
|
26
|
+
children: [/* @__PURE__ */ c(t, {
|
|
27
|
+
variant: "outline",
|
|
28
|
+
onClick: y,
|
|
29
|
+
disabled: v,
|
|
30
|
+
children: _
|
|
31
|
+
}), b ? /* @__PURE__ */ c(t, {
|
|
32
|
+
onClick: b,
|
|
33
|
+
disabled: v,
|
|
34
|
+
children: g
|
|
35
|
+
}) : null]
|
|
36
|
+
})
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { u as Modal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index4.cjs"),t=require("./index11.cjs"),n=require("./index35.cjs");let r=require("react/jsx-runtime");function i({open:i=!0,title:a,description:o,children:s,footer:c,width:l=900,confirmText:u=`Xác nhận`,cancelText:d=`Hủy`,isLoading:f=!1,onCancel:p,onConfirm:m}){return(0,r.jsx)(n.Dialog,{open:i,onOpenChange:e=>!e&&p(),children:(0,r.jsxs)(n.DialogContent,{className:e.cn(`flex max-h-[calc(100vh-150px)] flex-col gap-0 p-0 sm:max-w-175`),style:{maxWidth:l},children:[(0,r.jsxs)(n.DialogHeader,{className:`px-6 py-4 border-b`,children:[(0,r.jsx)(n.DialogTitle,{children:a}),o?(0,r.jsx)(n.DialogDescription,{children:o}):null]}),(0,r.jsx)(`div`,{className:`flex-1 overflow-y-auto px-6 py-4`,children:s}),(c||m)&&(0,r.jsx)(n.DialogFooter,{className:`px-6 py-4 border-t`,children:c||(0,r.jsxs)(`div`,{className:`flex w-full justify-end gap-2`,children:[(0,r.jsx)(t.Button,{variant:`outline`,onClick:p,disabled:f,children:d}),m?(0,r.jsx)(t.Button,{onClick:m,disabled:f,children:u}):null]})})]})})}exports.Modal=i;
|
package/dist/index125.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Suspense as e, lazy as t } from "react";
|
|
2
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/lazyLoad.tsx
|
|
4
|
+
function r(r, i = /* @__PURE__ */ n("div", { children: "Loading..." })) {
|
|
5
|
+
let a = t(r);
|
|
6
|
+
return function(t) {
|
|
7
|
+
return /* @__PURE__ */ n(e, {
|
|
8
|
+
fallback: i,
|
|
9
|
+
children: /* @__PURE__ */ n(a, { ...t })
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as lazyLoad };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("react"),t=require("react/jsx-runtime");function n(n,r=(0,t.jsx)(`div`,{children:`Loading...`})){let i=(0,e.lazy)(n);return function(n){return(0,t.jsx)(e.Suspense,{fallback:r,children:(0,t.jsx)(i,{...n})})}}exports.lazyLoad=n;
|
package/dist/index126.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Button as e } from "./index10.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i } from "./index78.js";
|
|
3
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
|
+
import { map as s } from "lodash-es";
|
|
5
|
+
//#region src/DataTable/components/DataTablePagination.tsx
|
|
6
|
+
var c = ({ table: c, tableState: l, pageSizeOptions: u, apiConfig: d }) => {
|
|
7
|
+
let f = l.pagination.pageIndex, p = l.pagination.pageSize, m = d.mode === "server" ? d.totalRows : c.getFilteredRowModel().rows.length, h = p > 0 ? Math.ceil(m / p) : 0;
|
|
8
|
+
return /* @__PURE__ */ o("div", {
|
|
9
|
+
className: "flex items-center justify-between gap-4 py-4",
|
|
10
|
+
children: [/* @__PURE__ */ o("div", {
|
|
11
|
+
className: "text-muted-foreground flex-1 text-sm",
|
|
12
|
+
children: [
|
|
13
|
+
c.getFilteredSelectedRowModel().rows.length,
|
|
14
|
+
" of ",
|
|
15
|
+
m,
|
|
16
|
+
" row(s) selected."
|
|
17
|
+
]
|
|
18
|
+
}), /* @__PURE__ */ o("div", {
|
|
19
|
+
className: "flex items-center gap-2",
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ o(t, { children: [/* @__PURE__ */ a(i, {
|
|
22
|
+
asChild: !0,
|
|
23
|
+
children: /* @__PURE__ */ o(e, {
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "sm",
|
|
26
|
+
children: ["Rows: ", p]
|
|
27
|
+
})
|
|
28
|
+
}), /* @__PURE__ */ a(n, {
|
|
29
|
+
align: "end",
|
|
30
|
+
children: s(u, (e) => /* @__PURE__ */ a(r, {
|
|
31
|
+
onClick: () => c.setPageSize(e),
|
|
32
|
+
disabled: e === p,
|
|
33
|
+
children: e
|
|
34
|
+
}, String(e)))
|
|
35
|
+
})] }),
|
|
36
|
+
/* @__PURE__ */ a(e, {
|
|
37
|
+
variant: "outline",
|
|
38
|
+
size: "sm",
|
|
39
|
+
onClick: () => c.previousPage(),
|
|
40
|
+
disabled: !c.getCanPreviousPage(),
|
|
41
|
+
children: "Previous"
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ a(e, {
|
|
44
|
+
variant: "outline",
|
|
45
|
+
size: "sm",
|
|
46
|
+
onClick: () => c.nextPage(),
|
|
47
|
+
disabled: !c.getCanNextPage(),
|
|
48
|
+
children: "Next"
|
|
49
|
+
}),
|
|
50
|
+
/* @__PURE__ */ o("div", {
|
|
51
|
+
className: "text-muted-foreground px-2 text-sm",
|
|
52
|
+
children: [
|
|
53
|
+
"Page ",
|
|
54
|
+
f + 1,
|
|
55
|
+
" / ",
|
|
56
|
+
h === 0 ? 1 : h
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { c as DataTablePagination };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index11.cjs"),t=require("./index79.cjs");let n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,tableState:a,pageSizeOptions:o,apiConfig:s})=>{let c=a.pagination.pageIndex,l=a.pagination.pageSize,u=s.mode===`server`?s.totalRows:i.getFilteredRowModel().rows.length,d=l>0?Math.ceil(u/l):0;return(0,n.jsxs)(`div`,{className:`flex items-center justify-between gap-4 py-4`,children:[(0,n.jsxs)(`div`,{className:`text-muted-foreground flex-1 text-sm`,children:[i.getFilteredSelectedRowModel().rows.length,` of `,u,` row(s) selected.`]}),(0,n.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,n.jsxs)(t.DropdownMenu,{children:[(0,n.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,n.jsxs)(e.Button,{variant:`outline`,size:`sm`,children:[`Rows: `,l]})}),(0,n.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,r.map)(o,e=>(0,n.jsx)(t.DropdownMenuItem,{onClick:()=>i.setPageSize(e),disabled:e===l,children:e},String(e)))})]}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage(),children:`Previous`}),(0,n.jsx)(e.Button,{variant:`outline`,size:`sm`,onClick:()=>i.nextPage(),disabled:!i.getCanNextPage(),children:`Next`}),(0,n.jsxs)(`div`,{className:`text-muted-foreground px-2 text-sm`,children:[`Page `,c+1,` / `,d===0?1:d]})]})]})};exports.DataTablePagination=i;
|
package/dist/index127.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Table as e, TableBody as t, TableCell as n, TableHead as r, TableHeader as i, TableRow as a } from "./index116.js";
|
|
2
|
+
import { Fragment as o } from "react";
|
|
3
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
4
|
+
import { isEmpty as l, map as u } from "lodash-es";
|
|
5
|
+
import { flexRender as d } from "@tanstack/react-table";
|
|
6
|
+
//#region src/DataTable/components/DataTableTable.tsx
|
|
7
|
+
var f = ({ table: f, columnVisibility: p, expandedState: m, expandConfig: h, empty: g, columnsCount: _ }) => {
|
|
8
|
+
let v = f.getRowModel().rows;
|
|
9
|
+
return /* @__PURE__ */ c(e, { children: [/* @__PURE__ */ s(i, { children: u(f.getHeaderGroups(), (e) => /* @__PURE__ */ s(a, { children: u(e.headers, (e) => e.isPlaceholder || p[e.column.id] === !1 || e.column.columnDef.header === void 0 ? null : /* @__PURE__ */ s(r, { children: d(e.column.columnDef.header, e.getContext()) }, e.id)) }, e.id)) }), /* @__PURE__ */ s(t, { children: l(v) ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
|
|
10
|
+
colSpan: _,
|
|
11
|
+
className: "h-24 text-center",
|
|
12
|
+
children: g.render()
|
|
13
|
+
}) }) : u(v, (e) => /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s(a, {
|
|
14
|
+
"data-state": e.getIsSelected() ? "selected" : void 0,
|
|
15
|
+
children: u(e.getVisibleCells(), (e) => /* @__PURE__ */ s(n, { children: d(e.column.columnDef.cell, e.getContext()) }, e.id))
|
|
16
|
+
}), h.enabled && e.getIsExpanded() ? /* @__PURE__ */ s(a, { children: /* @__PURE__ */ s(n, {
|
|
17
|
+
colSpan: _,
|
|
18
|
+
className: "p-0",
|
|
19
|
+
children: h.renderSubComponent(e)
|
|
20
|
+
}) }) : null] }, e.id)) })] });
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { f as DataTableTable };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index117.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es"),i=require("@tanstack/react-table");var a=({table:a,columnVisibility:o,expandedState:s,expandConfig:c,empty:l,columnsCount:u})=>{let d=a.getRowModel().rows;return(0,n.jsxs)(e.Table,{children:[(0,n.jsx)(e.TableHeader,{children:(0,r.map)(a.getHeaderGroups(),t=>(0,n.jsx)(e.TableRow,{children:(0,r.map)(t.headers,t=>t.isPlaceholder||o[t.column.id]===!1||t.column.columnDef.header===void 0?null:(0,n.jsx)(e.TableHead,{children:(0,i.flexRender)(t.column.columnDef.header,t.getContext())},t.id))},t.id))}),(0,n.jsx)(e.TableBody,{children:(0,r.isEmpty)(d)?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`h-24 text-center`,children:l.render()})}):(0,r.map)(d,a=>(0,n.jsxs)(t.Fragment,{children:[(0,n.jsx)(e.TableRow,{"data-state":a.getIsSelected()?`selected`:void 0,children:(0,r.map)(a.getVisibleCells(),t=>(0,n.jsx)(e.TableCell,{children:(0,i.flexRender)(t.column.columnDef.cell,t.getContext())},t.id))}),c.enabled&&a.getIsExpanded()?(0,n.jsx)(e.TableRow,{children:(0,n.jsx)(e.TableCell,{colSpan:u,className:`p-0`,children:c.renderSubComponent(a)})}):null]},a.id))})]})};exports.DataTableTable=a;
|
package/dist/index128.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Input as e } from "./index87.js";
|
|
2
|
+
import { useEffect as t, useRef as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { debounce as a, isEmpty as o } from "lodash-es";
|
|
5
|
+
//#region src/DataTable/components/DataTableToolbar.tsx
|
|
6
|
+
var s = ({ table: s, placeholder: c, debounceMs: l, right: u }) => {
|
|
7
|
+
let d = s.getState().globalFilter, f = typeof d == "string" ? d : "", p = n(a((e) => {
|
|
8
|
+
s.setGlobalFilter(e);
|
|
9
|
+
}, l));
|
|
10
|
+
return t(() => (p.current = a((e) => {
|
|
11
|
+
s.setGlobalFilter(e);
|
|
12
|
+
}, l), () => {
|
|
13
|
+
p.current.cancel();
|
|
14
|
+
}), [s, l]), t(() => () => {
|
|
15
|
+
p.current.cancel();
|
|
16
|
+
}, []), /* @__PURE__ */ i("div", {
|
|
17
|
+
className: "flex items-center gap-2 py-4",
|
|
18
|
+
children: [/* @__PURE__ */ r(e, {
|
|
19
|
+
placeholder: c,
|
|
20
|
+
defaultValue: f,
|
|
21
|
+
onChange: (e) => {
|
|
22
|
+
let t = e.target.value;
|
|
23
|
+
if (o(t)) {
|
|
24
|
+
p.current("");
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
p.current(t);
|
|
28
|
+
},
|
|
29
|
+
className: "max-w-sm"
|
|
30
|
+
}), u]
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { s as DataTableToolbar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index88.cjs");let t=require("react"),n=require("react/jsx-runtime"),r=require("lodash-es");var i=({table:i,placeholder:a,debounceMs:o,right:s})=>{let c=i.getState().globalFilter,l=typeof c==`string`?c:``,u=(0,t.useRef)((0,r.debounce)(e=>{i.setGlobalFilter(e)},o));return(0,t.useEffect)(()=>(u.current=(0,r.debounce)(e=>{i.setGlobalFilter(e)},o),()=>{u.current.cancel()}),[i,o]),(0,t.useEffect)(()=>()=>{u.current.cancel()},[]),(0,n.jsxs)(`div`,{className:`flex items-center gap-2 py-4`,children:[(0,n.jsx)(e.Input,{placeholder:a,defaultValue:l,onChange:e=>{let t=e.target.value;if((0,r.isEmpty)(t)){u.current(``);return}u.current(t)},className:`max-w-sm`}),s]})};exports.DataTableToolbar=i;
|
package/dist/index129.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Button as e } from "./index10.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuCheckboxItem as n, DropdownMenuContent as r, DropdownMenuTrigger as i } from "./index78.js";
|
|
3
|
+
import { ChevronDown as a } from "lucide-react";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { map as c } from "lodash-es";
|
|
6
|
+
//#region src/DataTable/components/DataTableViewOptions.tsx
|
|
7
|
+
var l = ({ table: l, columnVisibility: u }) => {
|
|
8
|
+
let d = l.getAllColumns().filter((e) => e.getCanHide());
|
|
9
|
+
return /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ o(i, {
|
|
10
|
+
asChild: !0,
|
|
11
|
+
children: /* @__PURE__ */ s(e, {
|
|
12
|
+
variant: "outline",
|
|
13
|
+
className: "ml-auto",
|
|
14
|
+
children: ["Columns ", /* @__PURE__ */ o(a, {})]
|
|
15
|
+
})
|
|
16
|
+
}), /* @__PURE__ */ o(r, {
|
|
17
|
+
align: "end",
|
|
18
|
+
children: c(d, (e) => /* @__PURE__ */ o(n, {
|
|
19
|
+
className: "capitalize",
|
|
20
|
+
checked: u[e.id] !== !1,
|
|
21
|
+
onCheckedChange: () => e.toggleVisibility(u[e.id] === !1),
|
|
22
|
+
children: e.id
|
|
23
|
+
}, e.id))
|
|
24
|
+
})] });
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { l as DataTableViewOptions };
|
package/dist/index13.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./index2.cjs")
|
|
1
|
+
const e=require("./index2.cjs");let t=require("react");t=e.__toESM(t,1);let n=require("react/jsx-runtime"),r=require("@radix-ui/react-slot"),i=require("react-dom");i=e.__toESM(i,1);var a=Object.defineProperty,o=(e,t)=>a(e,`name`,{value:t,configurable:!0}),s=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,i)=>{let a=(0,r.createSlot)(`Primitive.${i}`),o=t.forwardRef((e,t)=>{let{asChild:r,...o}=e,s=r?a:i;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,n.jsx)(s,{...o,ref:t})});return o.displayName=`Primitive.${i}`,{...e,[i]:o}},{});function c(e,t){e&&i.flushSync(()=>e.dispatchEvent(t))}o(c,`dispatchDiscreteCustomEvent`),exports.Primitive=s,exports.dispatchDiscreteCustomEvent=c;
|
package/dist/index13.js
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { Primitive as e } from "./index12.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
//#region ../../node_modules/.pnpm/@radix-ui+react-aspect-ratio@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.17__@type_10aa7c245e36f921a290d66c57b9e119/node_modules/@radix-ui/react-aspect-ratio/dist/index.mjs
|
|
5
|
+
var r = Object.defineProperty, i = /* @__PURE__ */ t.forwardRef(/* @__PURE__ */ ((e, t) => r(e, "name", {
|
|
6
|
+
value: t,
|
|
7
|
+
configurable: !0
|
|
8
|
+
}))(function(t, r) {
|
|
9
|
+
let { ratio: i = 1 / 1, style: a, ...o } = t;
|
|
10
|
+
return /* @__PURE__ */ n("div", {
|
|
11
|
+
style: {
|
|
12
|
+
position: "relative",
|
|
13
|
+
width: "100%",
|
|
14
|
+
paddingBottom: `${100 / i}%`
|
|
15
|
+
},
|
|
16
|
+
"data-radix-aspect-ratio-wrapper": "",
|
|
17
|
+
children: /* @__PURE__ */ n(e.div, {
|
|
18
|
+
...o,
|
|
19
|
+
ref: r,
|
|
20
|
+
style: {
|
|
21
|
+
...a,
|
|
22
|
+
position: "absolute",
|
|
23
|
+
top: 0,
|
|
24
|
+
right: 0,
|
|
25
|
+
bottom: 0,
|
|
26
|
+
left: 0
|
|
27
|
+
}
|
|
28
|
+
})
|
|
11
29
|
});
|
|
12
|
-
}
|
|
30
|
+
}, "AspectRatio"));
|
|
13
31
|
//#endregion
|
|
14
|
-
export {
|
|
32
|
+
export { i as Root };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./index11.cjs"),t=require("./index79.cjs");let n=require("lucide-react"),r=require("react/jsx-runtime"),i=require("lodash-es");var a=({table:a,columnVisibility:o})=>{let s=a.getAllColumns().filter(e=>e.getCanHide());return(0,r.jsxs)(t.DropdownMenu,{children:[(0,r.jsx)(t.DropdownMenuTrigger,{asChild:!0,children:(0,r.jsxs)(e.Button,{variant:`outline`,className:`ml-auto`,children:[`Columns `,(0,r.jsx)(n.ChevronDown,{})]})}),(0,r.jsx)(t.DropdownMenuContent,{align:`end`,children:(0,i.map)(s,e=>(0,r.jsx)(t.DropdownMenuCheckboxItem,{className:`capitalize`,checked:o[e.id]!==!1,onCheckedChange:()=>e.toggleVisibility(o[e.id]===!1),children:e.id},e.id))})]})};exports.DataTableViewOptions=a;
|
package/dist/index130.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { noop as t } from "lodash-es";
|
|
3
|
+
//#region src/DataTable/render/defaults.tsx
|
|
4
|
+
var n = {
|
|
5
|
+
placeholder: "Search...",
|
|
6
|
+
debounceMs: 300
|
|
7
|
+
}, r = { pageSizeOptions: [
|
|
8
|
+
10,
|
|
9
|
+
20,
|
|
10
|
+
50,
|
|
11
|
+
100
|
|
12
|
+
] }, i = { render: () => /* @__PURE__ */ e("div", {
|
|
13
|
+
className: "text-muted-foreground py-8 text-center text-sm",
|
|
14
|
+
children: "No results."
|
|
15
|
+
}) }, a = {
|
|
16
|
+
mode: "client",
|
|
17
|
+
isFetching: !1,
|
|
18
|
+
totalRows: 0,
|
|
19
|
+
onQueryChange: t
|
|
20
|
+
}, o = {
|
|
21
|
+
enabled: !1,
|
|
22
|
+
thresholdPx: 200,
|
|
23
|
+
onEndReached: t
|
|
24
|
+
}, s = () => ({ getRowActions: () => [] });
|
|
25
|
+
//#endregion
|
|
26
|
+
export { a as DEFAULT_API, i as DEFAULT_EMPTY, o as DEFAULT_INFINITE_SCROLL, r as DEFAULT_PAGINATION, n as DEFAULT_SEARCH, s as createDefaultActions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=require("react/jsx-runtime"),t=require("lodash-es");var n={placeholder:`Search...`,debounceMs:300},r={pageSizeOptions:[10,20,50,100]},i={render:()=>(0,e.jsx)(`div`,{className:`text-muted-foreground py-8 text-center text-sm`,children:`No results.`})},a={mode:`client`,isFetching:!1,totalRows:0,onQueryChange:t.noop},o={enabled:!1,thresholdPx:200,onEndReached:t.noop},s=()=>({getRowActions:()=>[]});exports.DEFAULT_API=a,exports.DEFAULT_EMPTY=i,exports.DEFAULT_INFINITE_SCROLL=o,exports.DEFAULT_PAGINATION=r,exports.DEFAULT_SEARCH=n,exports.createDefaultActions=s;
|