@alkimi.org/ui-kit 0.8.2 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.github.md +7 -107
- package/dist/chunk-24H4O2Z5.js +3 -0
- package/dist/chunk-24H4O2Z5.js.map +1 -0
- package/dist/{chunk-QDJM5EVM.js → chunk-2S3AGBKQ.js} +2 -2
- package/dist/{chunk-QDJM5EVM.js.map → chunk-2S3AGBKQ.js.map} +1 -1
- package/dist/chunk-7YRREWHH.js +3 -0
- package/dist/chunk-7YRREWHH.js.map +1 -0
- package/dist/chunk-A7NIT2PJ.mjs +3 -0
- package/dist/chunk-A7NIT2PJ.mjs.map +1 -0
- package/dist/{chunk-HFRZVGGE.mjs → chunk-DF7KUCXZ.mjs} +2 -2
- package/dist/chunk-FR56YJGL.mjs +3 -0
- package/dist/chunk-FR56YJGL.mjs.map +1 -0
- package/dist/{chunk-4UUNHBJB.js → chunk-HKLR7AH3.js} +2 -2
- package/dist/{chunk-4UUNHBJB.js.map → chunk-HKLR7AH3.js.map} +1 -1
- package/dist/{chunk-FFX2EHXT.js → chunk-KNWZO7KC.js} +2 -2
- package/dist/{chunk-FFX2EHXT.js.map → chunk-KNWZO7KC.js.map} +1 -1
- package/dist/chunk-LFPVTYLX.mjs +3 -0
- package/dist/chunk-LFPVTYLX.mjs.map +1 -0
- package/dist/{chunk-HPJEH5QX.mjs → chunk-MPAY33XW.mjs} +2 -2
- package/dist/{chunk-HPJEH5QX.mjs.map → chunk-MPAY33XW.mjs.map} +1 -1
- package/dist/{chunk-QZGKYSA2.js → chunk-RQWC2U5C.js} +2 -2
- package/dist/{chunk-QZGKYSA2.js.map → chunk-RQWC2U5C.js.map} +1 -1
- package/dist/{chunk-GUVRCV3T.mjs → chunk-TLWWS45Z.mjs} +2 -2
- package/dist/chunk-WPUW2XFI.js +3 -0
- package/dist/chunk-WPUW2XFI.js.map +1 -0
- package/dist/chunk-XEEI5XFO.mjs +3 -0
- package/dist/chunk-XEEI5XFO.mjs.map +1 -0
- package/dist/components/accordion.d.mts +17 -0
- package/dist/components/accordion.d.ts +17 -0
- package/dist/components/accordion.js +3 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/accordion.mjs +3 -0
- package/dist/components/accordion.mjs.map +1 -0
- package/dist/components/button.d.mts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.mjs +1 -1
- package/dist/components/command.d.mts +2 -2
- package/dist/components/command.d.ts +2 -2
- package/dist/components/command.js +1 -1
- package/dist/components/command.mjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.mjs +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/table.mjs +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tabs.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
- package/dist/chunk-2Q4N3AS5.js +0 -3
- package/dist/chunk-2Q4N3AS5.js.map +0 -1
- package/dist/chunk-7HINFXVM.js +0 -3
- package/dist/chunk-7HINFXVM.js.map +0 -1
- package/dist/chunk-CMWQZYPL.mjs +0 -3
- package/dist/chunk-CMWQZYPL.mjs.map +0 -1
- package/dist/chunk-GB5MQZ4S.mjs +0 -3
- package/dist/chunk-GB5MQZ4S.mjs.map +0 -1
- package/dist/chunk-OCA36S6W.mjs +0 -3
- package/dist/chunk-OCA36S6W.mjs.map +0 -1
- /package/dist/{chunk-HFRZVGGE.mjs.map → chunk-DF7KUCXZ.mjs.map} +0 -0
- /package/dist/{chunk-GUVRCV3T.mjs.map → chunk-TLWWS45Z.mjs.map} +0 -0
package/README.github.md
CHANGED
|
@@ -452,6 +452,7 @@ import {
|
|
|
452
452
|
SidebarGroupLabel,
|
|
453
453
|
SidebarGroupContent,
|
|
454
454
|
} from "@alkimi.org/ui-kit"
|
|
455
|
+
|
|
455
456
|
;<SidebarGroup>
|
|
456
457
|
<SidebarGroupLabel>Navigation</SidebarGroupLabel>
|
|
457
458
|
<SidebarGroupContent>
|
|
@@ -505,7 +506,7 @@ Access sidebar state and controls from any component within `SidebarProvider`:
|
|
|
505
506
|
import { useSidebar } from "@alkimi.org/ui-kit"
|
|
506
507
|
|
|
507
508
|
function MyComponent() {
|
|
508
|
-
const { state, open, toggleSidebar } = useSidebar()
|
|
509
|
+
const { state, open, toggleSidebar, isMobile } = useSidebar()
|
|
509
510
|
|
|
510
511
|
return (
|
|
511
512
|
<div>
|
|
@@ -518,13 +519,12 @@ function MyComponent() {
|
|
|
518
519
|
**Returns:**
|
|
519
520
|
|
|
520
521
|
- `state: "expanded" | "collapsed"` - Current sidebar state
|
|
521
|
-
- `
|
|
522
|
-
- `setOpen: (open: boolean) => void` - Set
|
|
523
|
-
- `openMobile: boolean` - Whether
|
|
522
|
+
- `open: boolean` - Whether sidebar is open (desktop)
|
|
523
|
+
- `setOpen: (open: boolean) => void` - Set sidebar state
|
|
524
|
+
- `openMobile: boolean` - Whether sidebar is open (mobile)
|
|
524
525
|
- `setOpenMobile: (open: boolean) => void` - Set mobile sidebar state
|
|
525
|
-
- `
|
|
526
|
-
- `
|
|
527
|
-
- `setIsFullyOpen: (open: boolean) => void` - Set fully open state
|
|
526
|
+
- `isMobile: boolean` - Whether viewing on mobile
|
|
527
|
+
- `toggleSidebar: () => void` - Toggle sidebar visibility
|
|
528
528
|
|
|
529
529
|
#### Keyboard Shortcuts
|
|
530
530
|
|
|
@@ -584,106 +584,6 @@ import { cn } from "@alkimi.org/ui-kit/utils"
|
|
|
584
584
|
|
|
585
585
|
**Note**: Both import methods require installing the full `@alkimi.org/ui-kit` package. The individual imports help optimize your production bundle size (only used components are included), but don't reduce installation size.
|
|
586
586
|
|
|
587
|
-
## Migration Guide
|
|
588
|
-
|
|
589
|
-
### Migrating from useScreenSize Hook
|
|
590
|
-
|
|
591
|
-
**Breaking Change:** The `useScreenSize` hook has been removed in favor of pure CSS/Tailwind-based responsive design.
|
|
592
|
-
|
|
593
|
-
#### Before (Old API)
|
|
594
|
-
|
|
595
|
-
```tsx
|
|
596
|
-
import { useScreenSize } from "@alkimi.org/ui-kit"
|
|
597
|
-
|
|
598
|
-
function MyComponent() {
|
|
599
|
-
const { isMobile, isLg } = useScreenSize()
|
|
600
|
-
|
|
601
|
-
return <div>{isMobile ? <MobileView /> : <DesktopView />}</div>
|
|
602
|
-
}
|
|
603
|
-
```
|
|
604
|
-
|
|
605
|
-
#### After (Recommended - Use Tailwind Classes)
|
|
606
|
-
|
|
607
|
-
```tsx
|
|
608
|
-
function MyComponent() {
|
|
609
|
-
return (
|
|
610
|
-
<div>
|
|
611
|
-
<MobileView className="md:hidden" />
|
|
612
|
-
<DesktopView className="hidden md:block" />
|
|
613
|
-
</div>
|
|
614
|
-
)
|
|
615
|
-
}
|
|
616
|
-
```
|
|
617
|
-
|
|
618
|
-
#### Alternative (If JavaScript Detection Required)
|
|
619
|
-
|
|
620
|
-
If you need JavaScript-based screen detection for your use case, implement your own hook using native `matchMedia`:
|
|
621
|
-
|
|
622
|
-
```tsx
|
|
623
|
-
import { useEffect, useState } from "react"
|
|
624
|
-
|
|
625
|
-
function useMediaQuery(query: string) {
|
|
626
|
-
const [matches, setMatches] = useState(false)
|
|
627
|
-
|
|
628
|
-
useEffect(() => {
|
|
629
|
-
const media = window.matchMedia(query)
|
|
630
|
-
setMatches(media.matches)
|
|
631
|
-
|
|
632
|
-
const listener = () => setMatches(media.matches)
|
|
633
|
-
media.addEventListener("change", listener)
|
|
634
|
-
return () => media.removeEventListener("change", listener)
|
|
635
|
-
}, [query])
|
|
636
|
-
|
|
637
|
-
return matches
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
function MyComponent() {
|
|
641
|
-
const isMobile = useMediaQuery("(max-width: 575px)")
|
|
642
|
-
// Use as needed
|
|
643
|
-
}
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
#### Custom Breakpoints
|
|
647
|
-
|
|
648
|
-
The library uses these Tailwind breakpoints:
|
|
649
|
-
|
|
650
|
-
- `sm: 448px`
|
|
651
|
-
- `md: 576px`
|
|
652
|
-
- `lg: 986px`
|
|
653
|
-
- `xl: 1280px`
|
|
654
|
-
- `2xl: 1400px`
|
|
655
|
-
|
|
656
|
-
Use Tailwind's responsive prefixes in your components:
|
|
657
|
-
|
|
658
|
-
```tsx
|
|
659
|
-
<div className="text-sm md:text-base lg:text-lg">Responsive text size</div>
|
|
660
|
-
```
|
|
661
|
-
|
|
662
|
-
### Migrating useSidebar Hook
|
|
663
|
-
|
|
664
|
-
**Breaking Change:** The `useSidebar()` hook no longer returns `isMobile`.
|
|
665
|
-
|
|
666
|
-
#### Before
|
|
667
|
-
|
|
668
|
-
```tsx
|
|
669
|
-
const { isMobile, toggleSidebar } = useSidebar()
|
|
670
|
-
```
|
|
671
|
-
|
|
672
|
-
#### After
|
|
673
|
-
|
|
674
|
-
```tsx
|
|
675
|
-
// For desktop sidebar toggle
|
|
676
|
-
const { toggleSidebar } = useSidebar()
|
|
677
|
-
|
|
678
|
-
// For mobile sidebar toggle
|
|
679
|
-
const { toggleMobileSidebar } = useSidebar()
|
|
680
|
-
|
|
681
|
-
// The library handles mobile/desktop rendering with CSS
|
|
682
|
-
// No need to check isMobile in most cases
|
|
683
|
-
```
|
|
684
|
-
|
|
685
|
-
The sidebar component now automatically renders both mobile and desktop variants using CSS to control visibility, so you typically don't need to check for mobile state in your code.
|
|
686
|
-
|
|
687
587
|
## License
|
|
688
588
|
|
|
689
589
|
MIT
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
+
var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var r = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var f=r.createContext({}),b="[&_tr:not([data-has-action-column])>th:first-child]:sticky [&_tr:not([data-has-action-column])>th:first-child]:left-0 [&_tr:not([data-has-action-column])>th:first-child]:z-10 [&_tr:not([data-has-action-column])>th:first-child]:bg-background [&_tr:not([data-has-action-column])>th:first-child]:after:absolute [&_tr:not([data-has-action-column])>th:first-child]:after:right-0 [&_tr:not([data-has-action-column])>th:first-child]:after:top-0 [&_tr:not([data-has-action-column])>th:first-child]:after:h-full [&_tr:not([data-has-action-column])>th:first-child]:after:w-px [&_tr:not([data-has-action-column])>th:first-child]:after:bg-border [&_tr:not([data-has-action-column])>td:first-child]:sticky [&_tr:not([data-has-action-column])>td:first-child]:left-0 [&_tr:not([data-has-action-column])>td:first-child]:z-10 [&_tr:not([data-has-action-column])>td:first-child]:bg-background [&_tr:not([data-has-action-column])>td:first-child]:after:absolute [&_tr:not([data-has-action-column])>td:first-child]:after:right-0 [&_tr:not([data-has-action-column])>td:first-child]:after:top-0 [&_tr:not([data-has-action-column])>td:first-child]:after:h-full [&_tr:not([data-has-action-column])>td:first-child]:after:w-px [&_tr:not([data-has-action-column])>td:first-child]:after:bg-border [&_tbody_tr:not([data-has-action-column]):hover>td:first-child]:bg-muted",m="[&_tr[data-has-action-column]>*:first-child]:sticky [&_tr[data-has-action-column]>*:first-child]:left-0 [&_tr[data-has-action-column]>*:first-child]:z-10 [&_tr[data-has-action-column]>*:first-child]:bg-background [&_tr[data-has-action-column]>*:first-child]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:sticky [&_tr[data-has-action-column]>*:nth-child(2)]:left-12 [&_tr[data-has-action-column]>*:nth-child(2)]:z-10 [&_tr[data-has-action-column]>*:nth-child(2)]:bg-background [&_tr[data-has-action-column]>*:nth-child(2)]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:after:absolute [&_tr[data-has-action-column]>*:nth-child(2)]:after:right-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:top-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:h-full [&_tr[data-has-action-column]>*:nth-child(2)]:after:w-px [&_tr[data-has-action-column]>*:nth-child(2)]:after:bg-border [&_tbody_tr[data-has-action-column]:hover>td:first-child]:bg-muted [&_tbody_tr[data-has-action-column]:hover>td:nth-child(2)]:bg-muted";function C({className:a,stickyFirstColumn:t,...o}){return _jsxruntime.jsx.call(void 0, f.Provider,{value:{stickyFirstColumn:t},children:_jsxruntime.jsx.call(void 0, "div",{"data-slot":"table-container",className:_chunkFUYXCJOQjs.a.call(void 0, "relative bg-background w-full overflow-x-auto border border-border rounded-3xl",t&&b,t&&m),children:_jsxruntime.jsx.call(void 0, "table",{"data-slot":"table",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full caption-bottom text-sm",a),...o})})})}function y({className:a,...t}){return _jsxruntime.jsx.call(void 0, "thead",{"data-slot":"table-header",className:_chunkFUYXCJOQjs.a.call(void 0, "[&_tr]:border-b text-secondary-text",a),...t})}function k({className:a,...t}){return _jsxruntime.jsx.call(void 0, "tbody",{"data-slot":"table-body",className:_chunkFUYXCJOQjs.a.call(void 0, "[&_tr:last-child]:border-0",a),...t})}function v({className:a,...t}){return _jsxruntime.jsx.call(void 0, "tfoot",{"data-slot":"table-footer",className:_chunkFUYXCJOQjs.a.call(void 0, "bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",a),...t})}function R({className:a,isClickable:t,actionIcon:o,children:c,...i}){let s=o==="eye"?_jsxruntime.jsx.call(void 0, _lucidereact.Eye,{className:"h-4 w-4"}):o==="more"?_jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical,{className:"h-4 w-4"}):null;return _jsxruntime.jsxs.call(void 0, "tr",{"data-slot":"table-row","data-has-action-column":o!==void 0?"":void 0,className:_chunkFUYXCJOQjs.a.call(void 0, "border-b border-border/50 transition-colors",t&&"cursor-pointer hover:bg-muted/50",a),...i,children:[o!==void 0&&_jsxruntime.jsx.call(void 0, p,{className:"w-12",children:s}),c]})}function T({className:a,isSticky:t,...o}){return _jsxruntime.jsx.call(void 0, "th",{"data-slot":"table-head",className:_chunkFUYXCJOQjs.a.call(void 0, "text-secondary-text h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",t&&"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border",a),...o})}function p({className:a,isSticky:t,...o}){return _jsxruntime.jsx.call(void 0, "td",{"data-slot":"table-cell",className:_chunkFUYXCJOQjs.a.call(void 0, "p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",t&&"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border",a),...o})}function P({className:a,onClick:t,children:o,asChild:c=!1,...i}){let s=l=>{l.stopPropagation(),_optionalChain([t, 'optionalCall', _2 => _2(l)])};return c&&r.isValidElement(o)?r.cloneElement(o,{onClick:l=>{l.stopPropagation();let d=o.props.onClick;_optionalChain([d, 'optionalCall', _3 => _3(l)])},className:_chunkFUYXCJOQjs.a.call(void 0, "inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:bg-muted/50 hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent",o.props.className,a)}):_jsxruntime.jsx.call(void 0, "button",{type:"button","data-slot":"table-cell-action",className:_chunkFUYXCJOQjs.a.call(void 0, "inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent",a),onClick:s,...i,children:o})}function w({className:a,...t}){return _jsxruntime.jsx.call(void 0, "caption",{"data-slot":"table-caption",className:_chunkFUYXCJOQjs.a.call(void 0, "text-muted-foreground mt-4 text-sm",a),...t})}exports.a = C; exports.b = y; exports.c = k; exports.d = v; exports.e = R; exports.f = T; exports.g = p; exports.h = P; exports.i = w;
|
|
3
|
+
//# sourceMappingURL=chunk-24H4O2Z5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-24H4O2Z5.js","../src/components/table.tsx"],"names":["TableContext","stickyFirstColumnStyles","stickyActionColumnStyles","Table","className","stickyFirstColumn","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","isClickable","actionIcon","children","iconComponent","Eye","MoreVertical","jsxs","TableCell","TableHead","isSticky","TableCellAction","onClick","asChild","handleClick","e","childOnClick","TableCaption"],"mappings":"AAAA,22BAAY;AACZ,sDAAuC,uECChB,2CACW,+CAiC1B,IAzBFA,CAAAA,CAAqB,CAAA,CAAA,aAAA,CAAiC,CAAC,CAAC,CAAA,CAOxDC,CAAAA,CACJ,8zCAAA,CAGIC,CAAAA,CACJ,2hCAAA,CAEF,SAASC,CAAAA,CAAM,CAAE,SAAA,CAAAC,CAAAA,CAAW,iBAAA,CAAAC,CAAAA,CAAmB,GAAGC,CAAM,CAAA,CAAe,CACrE,OACEC,6BAAAA,CAACP,CAAa,QAAA,CAAb,CAAsB,KAAA,CAAO,CAAE,iBAAA,CAAAK,CAAkB,CAAA,CAChD,QAAA,CAAAE,6BAAAA,KAAC,CAAA,CACC,WAAA,CAAU,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yB,CACvB,IAAMoB,CAAAA,CAAeC,CAAAA,EAA2C,CAC9DA,CAAAA,CAAE,eAAA,CAAgB,CAAA,iBAClBH,CAAAA,0BAAAA,CAAUG,CAAC,GACb,CAAA,CAEA,OAAIF,CAAAA,EAAiB,CAAA,CAAA,cAAA,CAAeV,CAAQ,CAAA,CAC7B,CAAA,CAAA,YAAA,CACXA,CAAAA,CAIA,CACE,OAAA,CAAUY,CAAAA,EAAwB,CAChCA,CAAAA,CAAE,eAAA,CAAgB,CAAA,CAClB,IAAMC,CAAAA,CACJb,CAAAA,CAGA,KAAA,CAAM,OAAA,iBACRa,CAAAA,0BAAAA,CAAeD,CAAC,GAClB,CAAA,CACA,SAAA,CAAWnB,gCAAAA,8NACT,CACCO,CAAAA,CAAwD,KAAA,CACtD,SAAA,CACHX,CACF,CACF,CACF,CAAA,CAIAG,6BAAAA,QAAC,CAAA,CACC,IAAA,CAAK,QAAA,CACL,WAAA,CAAU,mBAAA,CACV,SAAA,CAAWC,gCAAAA,4MACT,CACAJ,CACF,CAAA,CACA,OAAA,CAASsB,CAAAA,CACR,GAAGpB,CAAAA,CAEH,QAAA,CAAAS,CAAAA,CACH,CAEJ,CAEA,SAASc,CAAAA,CAAa,CACpB,SAAA,CAAAzB,CAAAA,CACA,GAAGE,CACL,CAAA,CAAoC,CAClC,OACEC,6BAAAA,SAAC,CAAA,CACC,WAAA,CAAU,eAAA,CACV,SAAA,CAAWC,gCAAAA,oCAAG,CAAsCJ,CAAS,CAAA,CAC5D,GAAGE,CAAAA,CACN,CAEJ,CAAA,sIAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-24H4O2Z5.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Eye, MoreVertical } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface TableContextValue {\n stickyFirstColumn?: boolean\n}\n\nconst TableContext = React.createContext<TableContextValue>({})\n\nexport interface TableProps extends React.ComponentProps<\"table\"> {\n stickyFirstColumn?: boolean\n}\n\n// Sticky first column (rows without action icon)\nconst stickyFirstColumnStyles =\n \"[&_tr:not([data-has-action-column])>th:first-child]:sticky [&_tr:not([data-has-action-column])>th:first-child]:left-0 [&_tr:not([data-has-action-column])>th:first-child]:z-10 [&_tr:not([data-has-action-column])>th:first-child]:bg-background [&_tr:not([data-has-action-column])>th:first-child]:after:absolute [&_tr:not([data-has-action-column])>th:first-child]:after:right-0 [&_tr:not([data-has-action-column])>th:first-child]:after:top-0 [&_tr:not([data-has-action-column])>th:first-child]:after:h-full [&_tr:not([data-has-action-column])>th:first-child]:after:w-px [&_tr:not([data-has-action-column])>th:first-child]:after:bg-border [&_tr:not([data-has-action-column])>td:first-child]:sticky [&_tr:not([data-has-action-column])>td:first-child]:left-0 [&_tr:not([data-has-action-column])>td:first-child]:z-10 [&_tr:not([data-has-action-column])>td:first-child]:bg-background [&_tr:not([data-has-action-column])>td:first-child]:after:absolute [&_tr:not([data-has-action-column])>td:first-child]:after:right-0 [&_tr:not([data-has-action-column])>td:first-child]:after:top-0 [&_tr:not([data-has-action-column])>td:first-child]:after:h-full [&_tr:not([data-has-action-column])>td:first-child]:after:w-px [&_tr:not([data-has-action-column])>td:first-child]:after:bg-border [&_tbody_tr:not([data-has-action-column]):hover>td:first-child]:bg-muted\"\n\n// Sticky first two columns (rows with action icon): icon at left-0, data column at left-12\nconst stickyActionColumnStyles =\n \"[&_tr[data-has-action-column]>*:first-child]:sticky [&_tr[data-has-action-column]>*:first-child]:left-0 [&_tr[data-has-action-column]>*:first-child]:z-10 [&_tr[data-has-action-column]>*:first-child]:bg-background [&_tr[data-has-action-column]>*:first-child]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:sticky [&_tr[data-has-action-column]>*:nth-child(2)]:left-12 [&_tr[data-has-action-column]>*:nth-child(2)]:z-10 [&_tr[data-has-action-column]>*:nth-child(2)]:bg-background [&_tr[data-has-action-column]>*:nth-child(2)]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:after:absolute [&_tr[data-has-action-column]>*:nth-child(2)]:after:right-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:top-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:h-full [&_tr[data-has-action-column]>*:nth-child(2)]:after:w-px [&_tr[data-has-action-column]>*:nth-child(2)]:after:bg-border [&_tbody_tr[data-has-action-column]:hover>td:first-child]:bg-muted [&_tbody_tr[data-has-action-column]:hover>td:nth-child(2)]:bg-muted\"\n\nfunction Table({ className, stickyFirstColumn, ...props }: TableProps) {\n return (\n <TableContext.Provider value={{ stickyFirstColumn }}>\n <div\n data-slot=\"table-container\"\n className={cn(\n \"relative bg-background w-full overflow-x-auto border border-border rounded-3xl\",\n stickyFirstColumn && stickyFirstColumnStyles,\n stickyFirstColumn && stickyActionColumnStyles\n )}\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n </TableContext.Provider>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b text-secondary-text\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableRowProps extends React.ComponentProps<\"tr\"> {\n isClickable?: boolean\n actionIcon?: \"eye\" | \"more\" | null\n}\n\nfunction TableRow({\n className,\n isClickable,\n actionIcon,\n children,\n ...props\n}: TableRowProps) {\n const iconComponent =\n actionIcon === \"eye\" ? (\n <Eye className=\"h-4 w-4\" />\n ) : actionIcon === \"more\" ? (\n <MoreVertical className=\"h-4 w-4\" />\n ) : null\n\n return (\n <tr\n data-slot=\"table-row\"\n data-has-action-column={actionIcon !== undefined ? \"\" : undefined}\n className={cn(\n \"border-b border-border/50 transition-colors\",\n isClickable && \"cursor-pointer hover:bg-muted/50\",\n className\n )}\n {...props}\n >\n {actionIcon !== undefined && (\n <TableCell className=\"w-12\">{iconComponent}</TableCell>\n )}\n {children}\n </tr>\n )\n}\n\nexport interface TableHeadProps extends React.ComponentProps<\"th\"> {\n isSticky?: boolean\n}\n\nfunction TableHead({ className, isSticky, ...props }: TableHeadProps) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"text-secondary-text h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n isSticky &&\n \"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableCellProps extends React.ComponentProps<\"td\"> {\n isSticky?: boolean\n}\n\nfunction TableCell({ className, isSticky, ...props }: TableCellProps) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n isSticky &&\n \"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableCellActionProps extends React.ComponentProps<\"button\"> {\n asChild?: boolean\n}\n\nfunction TableCellAction({\n className,\n onClick,\n children,\n asChild = false,\n ...props\n}: TableCellActionProps) {\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation()\n onClick?.(e)\n }\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(\n children as React.ReactElement<{\n onClick?: (e: React.MouseEvent) => void\n className?: string\n }>,\n {\n onClick: (e: React.MouseEvent) => {\n e.stopPropagation()\n const childOnClick = (\n children as React.ReactElement<{\n onClick?: (e: React.MouseEvent) => void\n }>\n ).props.onClick\n childOnClick?.(e)\n },\n className: cn(\n \"inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:bg-muted/50 hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent\",\n (children as React.ReactElement<{ className?: string }>).props\n .className,\n className\n ),\n }\n )\n }\n\n return (\n <button\n type=\"button\"\n data-slot=\"table-cell-action\"\n className={cn(\n \"inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent\",\n className\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCellAction,\n TableCaption,\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
-
var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _reacttabs = require('@radix-ui/react-tabs'); var e = _interopRequireWildcard(_reacttabs);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var C=e.Root,y= exports.b =_react.forwardRef.call(void 0, ({className:r,...
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _reacttabs = require('@radix-ui/react-tabs'); var e = _interopRequireWildcard(_reacttabs);var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var C=e.Root,y= exports.b =_react.forwardRef.call(void 0, ({className:r,...s},t)=>{let[c,b]=_react.useState.call(void 0, {left:0,width:0}),n=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{let i=()=>{if(!n.current)return;let f=n.current.querySelector('[data-state="active"]');if(f){let v=n.current.getBoundingClientRect(),m=f.getBoundingClientRect();b({left:m.left-v.left,width:m.width})}};i();let u=new MutationObserver(i);return n.current&&u.observe(n.current,{attributes:!0,attributeFilter:["data-state"],subtree:!0}),window.addEventListener("resize",i),()=>{u.disconnect(),window.removeEventListener("resize",i)}},[]);let d=_react.useCallback.call(void 0, i=>{n.current=i,typeof t=="function"?t(i):t&&(t.current=i)},[t]);return _jsxruntime.jsxs.call(void 0, e.List,{ref:d,className:_chunkFUYXCJOQjs.a.call(void 0, "relative inline-flex items-center justify-center rounded-4xl bg-muted p-1 text-muted-foreground",r),...s,children:[_jsxruntime.jsx.call(void 0, "span",{className:"absolute h-[calc(100%-0.5rem)] rounded-4xl bg-background shadow-sm transition-all duration-200 ease-out",style:{left:`${c.left}px`,width:`${c.width}px`}}),s.children]})});y.displayName=e.List.displayName;var P=_react.forwardRef.call(void 0, ({className:r,...s},t)=>_jsxruntime.jsx.call(void 0, e.Trigger,{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-4xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=active]:text-foreground z-10",r),...s}));P.displayName=e.Trigger.displayName;var w=_react.forwardRef.call(void 0, ({className:r,...s},t)=>_jsxruntime.jsx.call(void 0, e.Content,{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",r),...s}));w.displayName=e.Content.displayName;exports.a = C; exports.b = y; exports.c = P; exports.d = w;
|
|
3
|
+
//# sourceMappingURL=chunk-2S3AGBKQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-2S3AGBKQ.js","../src/components/tabs.tsx"],"names":["Tabs","TabsList","forwardRef","className","props","ref","indicatorStyle","setIndicatorStyle","useState","listRef","useRef","useEffect","updateIndicator","activeTab","listRect","tabRect","observer","combinedRef","useCallback","node","jsxs","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,8FCDR,8BAGsC,+CAsEjE,IApEEA,CAAAA,CAAqB,CAAA,CAAA,IAAA,CAErBC,CAAAA,aAAWC,+BAAAA,CAGd,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAAQ,CAClC,GAAM,CAACC,CAAAA,CAAgBC,CAAiB,CAAA,CAAIC,6BAAAA,CAC1C,IAAA,CAAM,CAAA,CACN,KAAA,CAAO,CACT,CAAC,CAAA,CACKC,CAAAA,CAAUC,2BAAAA,IAA2B,CAAA,CAE3CC,8BAAAA,CAAU,CAAA,EAAM,CACd,IAAMC,CAAAA,CAAkB,CAAA,CAAA,EAAM,CAC5B,EAAA,CAAI,CAACH,CAAAA,CAAQ,OAAA,CAAS,MAAA,CAEtB,IAAMI,CAAAA,CAAYJ,CAAAA,CAAQ,OAAA,CAAQ,aAAA,CAChC,uBACF,CAAA,CAEA,EAAA,CAAII,CAAAA,CAAW,CACb,IAAMC,CAAAA,CAAWL,CAAAA,CAAQ,OAAA,CAAQ,qBAAA,CAAsB,CAAA,CACjDM,CAAAA,CAAUF,CAAAA,CAAU,qBAAA,CAAsB,CAAA,CAEhDN,CAAAA,CAAkB,CAChB,IAAA,CAAMQ,CAAAA,CAAQ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\"\n\nimport { cn } from \"@/lib/utils\"\nimport { forwardRef, useCallback, useEffect, useRef, useState } from \"react\"\n\nconst Tabs = TabsPrimitive.Root\n\nconst TabsList = forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const [indicatorStyle, setIndicatorStyle] = useState({\n left: 0,\n width: 0,\n })\n const listRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const updateIndicator = () => {\n if (!listRef.current) return\n\n const activeTab = listRef.current.querySelector(\n '[data-state=\"active\"]'\n ) as HTMLElement\n\n if (activeTab) {\n const listRect = listRef.current.getBoundingClientRect()\n const tabRect = activeTab.getBoundingClientRect()\n\n setIndicatorStyle({\n left: tabRect.left - listRect.left,\n width: tabRect.width,\n })\n }\n }\n\n updateIndicator()\n\n // Use MutationObserver to detect when data-state changes\n const observer = new MutationObserver(updateIndicator)\n\n if (listRef.current) {\n observer.observe(listRef.current, {\n attributes: true,\n attributeFilter: [\"data-state\"],\n subtree: true,\n })\n }\n\n // Also update on window resize\n window.addEventListener(\"resize\", updateIndicator)\n\n return () => {\n observer.disconnect()\n window.removeEventListener(\"resize\", updateIndicator)\n }\n }, [])\n\n // Combine refs\n const combinedRef = useCallback(\n (node: HTMLDivElement | null) => {\n ;(listRef as React.MutableRefObject<HTMLDivElement | null>).current = node\n\n if (typeof ref === \"function\") {\n ref(node)\n } else if (ref) {\n ;(ref as React.MutableRefObject<HTMLDivElement | null>).current = node\n }\n },\n [ref]\n )\n\n return (\n <TabsPrimitive.List\n ref={combinedRef}\n className={cn(\n \"relative inline-flex items-center justify-center rounded-4xl bg-muted p-1 text-muted-foreground\",\n className\n )}\n {...props}\n >\n {/* Animated indicator */}\n <span\n className=\"absolute h-[calc(100%-0.5rem)] rounded-4xl bg-background shadow-sm transition-all duration-200 ease-out\"\n style={{\n left: `${indicatorStyle.left}px`,\n width: `${indicatorStyle.width}px`,\n }}\n />\n {props.children}\n </TabsPrimitive.List>\n )\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n \"cursor-pointer relative inline-flex items-center justify-center whitespace-nowrap rounded-4xl px-3 py-1 text-sm font-medium ring-offset-background transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=active]:text-foreground z-10\",\n className\n )}\n {...props}\n />\n))\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(\n \"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\",\n className\n )}\n {...props}\n />\n))\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
+
var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var n = _interopRequireWildcard(_react);var _reactaccordion = require('@radix-ui/react-accordion'); var e = _interopRequireWildcard(_reactaccordion);var _lucidereact = require('lucide-react');var _classvarianceauthority = require('class-variance-authority');var _jsxruntime = require('react/jsx-runtime');var f=_classvarianceauthority.cva.call(void 0, "rounded-3xl",{variants:{variant:{default:"border border-border bg-background",ghost:""}},defaultVariants:{variant:"default"}}),l= exports.a =n.forwardRef(({className:i,...r},t)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:t,className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-4",i),...r}));l.displayName="Accordion";var R=n.forwardRef(({className:i,variant:r,...t},a)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, f({variant:r}),i),...t}));R.displayName="AccordionItem";var v=n.forwardRef(({className:i,children:r,aside:t,...a},d)=>_jsxruntime.jsx.call(void 0, e.Header,{className:"flex",children:_jsxruntime.jsxs.call(void 0, e.Trigger,{ref:d,className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-1 cursor-pointer items-center gap-4 px-4.5 py-3.5 text-sm transition-all text-left [&[data-state=open]>svg]:rotate-90 data-disabled:cursor-not-allowed",i),...a,children:[_jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight,{className:"h-4 w-4 shrink-0 transition-transform duration-200 in-data-disabled:opacity-40"}),_jsxruntime.jsx.call(void 0, "span",{className:"in-data-disabled:opacity-40",children:r}),t&&_jsxruntime.jsx.call(void 0, "span",{className:"ml-auto",children:t})]})}));v.displayName=e.Trigger.displayName;var A=n.forwardRef(({className:i,children:r,description:t,...a},d)=>_jsxruntime.jsxs.call(void 0, e.Content,{ref:d,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...a,children:[t&&_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"pl-12.5 pr-4.5 pb-3 text-sm text-secondary-text",children:t}),_jsxruntime.jsx.call(void 0, "div",{className:"border-t border-border"})]}),_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "px-4.5 pb-4 pt-3",i),children:r})]}));A.displayName=e.Content.displayName;exports.a = l; exports.b = R; exports.c = v; exports.d = A;
|
|
3
|
+
//# sourceMappingURL=chunk-7YRREWHH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-7YRREWHH.js","../src/components/accordion.tsx"],"names":["accordionItemVariants","cva","Accordion","className","props","ref","jsx","cn","AccordionItem","variant","AccordionTrigger","children","aside","jsxs","ChevronRight","AccordionContent","description","Fragment"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,6GACa,2CACP,kEAEU,+CAoBrC,IAhBIA,CAAAA,CAAwBC,yCAAAA,aAAI,CAAe,CAC/C,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,oCAAA,CACT,KAAA,CAAO,EACT,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SACX,CACF,CAAC,CAAA,CAEKC,CAAAA,aAAkB,CAAA,CAAA,UAAA,CAGtB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,CAAoB,CAAA,IAAA,CAAnB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,qBAAG,CAAuBJ,CAAS,CAAA,CAC7C,GAAGC,CAAAA,CACN,CACD,CAAA,CACDF,CAAAA,CAAU,WAAA,CAAc,WAAA,CAExB,IAAMM,CAAAA,CAAsB,CAAA,CAAA,UAAA,CAI1B,CAAC,CAAE,SAAA,CAAAL,CAAAA,CAAW,OAAA,CAAAM,CAAAA,CAAS,GAAGL,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnCC,6BAAAA,CAAoB,CAAA,IAAA,CAAnB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,CAAGP,CAAsB,CAAE,OAAA,CAAAS,CAAQ,CAAC,CAAA,CAAGN,CAAS,CAAA,CAC1D,GAAGC,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AX,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,iDAAA,CACZ,QAAA,CAAAU,CAAAA,CACH,CAAA,CACAV,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,wBAAA,CAAyB,CAAA,CAAA,CAC1C,CAAA,CAGFA,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAWC,gCAAAA,kBAAG,CAAoBJ,CAAS,CAAA,CAAI,QAAA,CAAAQ,CAAAA,CAAS,CAAA,CAAA,CAC/D,CACD,CAAA,CACDI,CAAAA,CAAiB,WAAA,CAAiC,CAAA,CAAA,OAAA,CAAQ,WAAA,CAAA,2DAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-7YRREWHH.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\"\nimport { ChevronRight } from \"lucide-react\"\n\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst accordionItemVariants = cva(\"rounded-3xl\", {\n variants: {\n variant: {\n default: \"border border-border bg-background\",\n ghost: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n})\n\nconst Accordion = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Root\n ref={ref}\n className={cn(\"flex flex-col gap-4\", className)}\n {...props}\n />\n))\nAccordion.displayName = \"Accordion\"\n\nconst AccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item> &\n VariantProps<typeof accordionItemVariants>\n>(({ className, variant, ...props }, ref) => (\n <AccordionPrimitive.Item\n ref={ref}\n className={cn(accordionItemVariants({ variant }), className)}\n {...props}\n />\n))\nAccordionItem.displayName = \"AccordionItem\"\n\nconst AccordionTrigger = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger> & {\n aside?: React.ReactNode\n }\n>(({ className, children, aside, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex flex-1 cursor-pointer items-center gap-4 px-4.5 py-3.5 text-sm transition-all text-left [&[data-state=open]>svg]:rotate-90 data-disabled:cursor-not-allowed\",\n className\n )}\n {...props}\n >\n <ChevronRight className=\"h-4 w-4 shrink-0 transition-transform duration-200 in-data-disabled:opacity-40\" />\n <span className=\"in-data-disabled:opacity-40\">{children}</span>\n {aside && <span className=\"ml-auto\">{aside}</span>}\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n))\nAccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName\n\nconst AccordionContent = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content> & {\n description?: React.ReactNode\n }\n>(({ className, children, description, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down\"\n {...props}\n >\n {description && (\n <>\n <div className=\"pl-12.5 pr-4.5 pb-3 text-sm text-secondary-text\">\n {description}\n </div>\n <div className=\"border-t border-border\" />\n </>\n )}\n\n <div className={cn(\"px-4.5 pb-4 pt-3\", className)}>{children}</div>\n </AccordionPrimitive.Content>\n))\nAccordionContent.displayName = AccordionPrimitive.Content.displayName\n\nexport { Accordion, AccordionItem, AccordionTrigger, AccordionContent }\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as n}from"./chunk-S5TKCF6T.mjs";import*as r from"react";import{Eye as h,MoreVertical as u}from"lucide-react";import{jsx as e,jsxs as _}from"react/jsx-runtime";var f=r.createContext({}),b="[&_tr:not([data-has-action-column])>th:first-child]:sticky [&_tr:not([data-has-action-column])>th:first-child]:left-0 [&_tr:not([data-has-action-column])>th:first-child]:z-10 [&_tr:not([data-has-action-column])>th:first-child]:bg-background [&_tr:not([data-has-action-column])>th:first-child]:after:absolute [&_tr:not([data-has-action-column])>th:first-child]:after:right-0 [&_tr:not([data-has-action-column])>th:first-child]:after:top-0 [&_tr:not([data-has-action-column])>th:first-child]:after:h-full [&_tr:not([data-has-action-column])>th:first-child]:after:w-px [&_tr:not([data-has-action-column])>th:first-child]:after:bg-border [&_tr:not([data-has-action-column])>td:first-child]:sticky [&_tr:not([data-has-action-column])>td:first-child]:left-0 [&_tr:not([data-has-action-column])>td:first-child]:z-10 [&_tr:not([data-has-action-column])>td:first-child]:bg-background [&_tr:not([data-has-action-column])>td:first-child]:after:absolute [&_tr:not([data-has-action-column])>td:first-child]:after:right-0 [&_tr:not([data-has-action-column])>td:first-child]:after:top-0 [&_tr:not([data-has-action-column])>td:first-child]:after:h-full [&_tr:not([data-has-action-column])>td:first-child]:after:w-px [&_tr:not([data-has-action-column])>td:first-child]:after:bg-border [&_tbody_tr:not([data-has-action-column]):hover>td:first-child]:bg-muted",m="[&_tr[data-has-action-column]>*:first-child]:sticky [&_tr[data-has-action-column]>*:first-child]:left-0 [&_tr[data-has-action-column]>*:first-child]:z-10 [&_tr[data-has-action-column]>*:first-child]:bg-background [&_tr[data-has-action-column]>*:first-child]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:sticky [&_tr[data-has-action-column]>*:nth-child(2)]:left-12 [&_tr[data-has-action-column]>*:nth-child(2)]:z-10 [&_tr[data-has-action-column]>*:nth-child(2)]:bg-background [&_tr[data-has-action-column]>*:nth-child(2)]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:after:absolute [&_tr[data-has-action-column]>*:nth-child(2)]:after:right-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:top-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:h-full [&_tr[data-has-action-column]>*:nth-child(2)]:after:w-px [&_tr[data-has-action-column]>*:nth-child(2)]:after:bg-border [&_tbody_tr[data-has-action-column]:hover>td:first-child]:bg-muted [&_tbody_tr[data-has-action-column]:hover>td:nth-child(2)]:bg-muted";function C({className:a,stickyFirstColumn:t,...o}){return e(f.Provider,{value:{stickyFirstColumn:t},children:e("div",{"data-slot":"table-container",className:n("relative bg-background w-full overflow-x-auto border border-border rounded-3xl",t&&b,t&&m),children:e("table",{"data-slot":"table",className:n("w-full caption-bottom text-sm",a),...o})})})}function y({className:a,...t}){return e("thead",{"data-slot":"table-header",className:n("[&_tr]:border-b text-secondary-text",a),...t})}function k({className:a,...t}){return e("tbody",{"data-slot":"table-body",className:n("[&_tr:last-child]:border-0",a),...t})}function v({className:a,...t}){return e("tfoot",{"data-slot":"table-footer",className:n("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",a),...t})}function R({className:a,isClickable:t,actionIcon:o,children:c,...i}){let s=o==="eye"?e(h,{className:"h-4 w-4"}):o==="more"?e(u,{className:"h-4 w-4"}):null;return _("tr",{"data-slot":"table-row","data-has-action-column":o!==void 0?"":void 0,className:n("border-b border-border/50 transition-colors",t&&"cursor-pointer hover:bg-muted/50",a),...i,children:[o!==void 0&&e(p,{className:"w-12",children:s}),c]})}function T({className:a,isSticky:t,...o}){return e("th",{"data-slot":"table-head",className:n("text-secondary-text h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0",t&&"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border",a),...o})}function p({className:a,isSticky:t,...o}){return e("td",{"data-slot":"table-cell",className:n("p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0",t&&"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border",a),...o})}function P({className:a,onClick:t,children:o,asChild:c=!1,...i}){let s=l=>{l.stopPropagation(),t?.(l)};return c&&r.isValidElement(o)?r.cloneElement(o,{onClick:l=>{l.stopPropagation();let d=o.props.onClick;d?.(l)},className:n("inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:bg-muted/50 hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent",o.props.className,a)}):e("button",{type:"button","data-slot":"table-cell-action",className:n("inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent",a),onClick:s,...i,children:o})}function w({className:a,...t}){return e("caption",{"data-slot":"table-caption",className:n("text-muted-foreground mt-4 text-sm",a),...t})}export{C as a,y as b,k as c,v as d,R as e,T as f,p as g,P as h,w as i};
|
|
3
|
+
//# sourceMappingURL=chunk-A7NIT2PJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/table.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Eye, MoreVertical } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface TableContextValue {\n stickyFirstColumn?: boolean\n}\n\nconst TableContext = React.createContext<TableContextValue>({})\n\nexport interface TableProps extends React.ComponentProps<\"table\"> {\n stickyFirstColumn?: boolean\n}\n\n// Sticky first column (rows without action icon)\nconst stickyFirstColumnStyles =\n \"[&_tr:not([data-has-action-column])>th:first-child]:sticky [&_tr:not([data-has-action-column])>th:first-child]:left-0 [&_tr:not([data-has-action-column])>th:first-child]:z-10 [&_tr:not([data-has-action-column])>th:first-child]:bg-background [&_tr:not([data-has-action-column])>th:first-child]:after:absolute [&_tr:not([data-has-action-column])>th:first-child]:after:right-0 [&_tr:not([data-has-action-column])>th:first-child]:after:top-0 [&_tr:not([data-has-action-column])>th:first-child]:after:h-full [&_tr:not([data-has-action-column])>th:first-child]:after:w-px [&_tr:not([data-has-action-column])>th:first-child]:after:bg-border [&_tr:not([data-has-action-column])>td:first-child]:sticky [&_tr:not([data-has-action-column])>td:first-child]:left-0 [&_tr:not([data-has-action-column])>td:first-child]:z-10 [&_tr:not([data-has-action-column])>td:first-child]:bg-background [&_tr:not([data-has-action-column])>td:first-child]:after:absolute [&_tr:not([data-has-action-column])>td:first-child]:after:right-0 [&_tr:not([data-has-action-column])>td:first-child]:after:top-0 [&_tr:not([data-has-action-column])>td:first-child]:after:h-full [&_tr:not([data-has-action-column])>td:first-child]:after:w-px [&_tr:not([data-has-action-column])>td:first-child]:after:bg-border [&_tbody_tr:not([data-has-action-column]):hover>td:first-child]:bg-muted\"\n\n// Sticky first two columns (rows with action icon): icon at left-0, data column at left-12\nconst stickyActionColumnStyles =\n \"[&_tr[data-has-action-column]>*:first-child]:sticky [&_tr[data-has-action-column]>*:first-child]:left-0 [&_tr[data-has-action-column]>*:first-child]:z-10 [&_tr[data-has-action-column]>*:first-child]:bg-background [&_tr[data-has-action-column]>*:first-child]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:sticky [&_tr[data-has-action-column]>*:nth-child(2)]:left-12 [&_tr[data-has-action-column]>*:nth-child(2)]:z-10 [&_tr[data-has-action-column]>*:nth-child(2)]:bg-background [&_tr[data-has-action-column]>*:nth-child(2)]:transition-colors [&_tr[data-has-action-column]>*:nth-child(2)]:after:absolute [&_tr[data-has-action-column]>*:nth-child(2)]:after:right-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:top-0 [&_tr[data-has-action-column]>*:nth-child(2)]:after:h-full [&_tr[data-has-action-column]>*:nth-child(2)]:after:w-px [&_tr[data-has-action-column]>*:nth-child(2)]:after:bg-border [&_tbody_tr[data-has-action-column]:hover>td:first-child]:bg-muted [&_tbody_tr[data-has-action-column]:hover>td:nth-child(2)]:bg-muted\"\n\nfunction Table({ className, stickyFirstColumn, ...props }: TableProps) {\n return (\n <TableContext.Provider value={{ stickyFirstColumn }}>\n <div\n data-slot=\"table-container\"\n className={cn(\n \"relative bg-background w-full overflow-x-auto border border-border rounded-3xl\",\n stickyFirstColumn && stickyFirstColumnStyles,\n stickyFirstColumn && stickyActionColumnStyles\n )}\n >\n <table\n data-slot=\"table\"\n className={cn(\"w-full caption-bottom text-sm\", className)}\n {...props}\n />\n </div>\n </TableContext.Provider>\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<\"thead\">) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn(\"[&_tr]:border-b text-secondary-text\", className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<\"tbody\">) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\"[&_tr:last-child]:border-0\", className)}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<\"tfoot\">) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn(\n \"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableRowProps extends React.ComponentProps<\"tr\"> {\n isClickable?: boolean\n actionIcon?: \"eye\" | \"more\" | null\n}\n\nfunction TableRow({\n className,\n isClickable,\n actionIcon,\n children,\n ...props\n}: TableRowProps) {\n const iconComponent =\n actionIcon === \"eye\" ? (\n <Eye className=\"h-4 w-4\" />\n ) : actionIcon === \"more\" ? (\n <MoreVertical className=\"h-4 w-4\" />\n ) : null\n\n return (\n <tr\n data-slot=\"table-row\"\n data-has-action-column={actionIcon !== undefined ? \"\" : undefined}\n className={cn(\n \"border-b border-border/50 transition-colors\",\n isClickable && \"cursor-pointer hover:bg-muted/50\",\n className\n )}\n {...props}\n >\n {actionIcon !== undefined && (\n <TableCell className=\"w-12\">{iconComponent}</TableCell>\n )}\n {children}\n </tr>\n )\n}\n\nexport interface TableHeadProps extends React.ComponentProps<\"th\"> {\n isSticky?: boolean\n}\n\nfunction TableHead({ className, isSticky, ...props }: TableHeadProps) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n \"text-secondary-text h-10 px-4 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n isSticky &&\n \"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableCellProps extends React.ComponentProps<\"td\"> {\n isSticky?: boolean\n}\n\nfunction TableCell({ className, isSticky, ...props }: TableCellProps) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n \"p-4 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0\",\n isSticky &&\n \"sticky left-0 z-10 bg-background after:absolute after:right-0 after:top-0 after:h-full after:w-px after:bg-border\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport interface TableCellActionProps extends React.ComponentProps<\"button\"> {\n asChild?: boolean\n}\n\nfunction TableCellAction({\n className,\n onClick,\n children,\n asChild = false,\n ...props\n}: TableCellActionProps) {\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.stopPropagation()\n onClick?.(e)\n }\n\n if (asChild && React.isValidElement(children)) {\n return React.cloneElement(\n children as React.ReactElement<{\n onClick?: (e: React.MouseEvent) => void\n className?: string\n }>,\n {\n onClick: (e: React.MouseEvent) => {\n e.stopPropagation()\n const childOnClick = (\n children as React.ReactElement<{\n onClick?: (e: React.MouseEvent) => void\n }>\n ).props.onClick\n childOnClick?.(e)\n },\n className: cn(\n \"inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:bg-muted/50 hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent\",\n (children as React.ReactElement<{ className?: string }>).props\n .className,\n className\n ),\n }\n )\n }\n\n return (\n <button\n type=\"button\"\n data-slot=\"table-cell-action\"\n className={cn(\n \"inline-flex items-center justify-center rounded-full p-1 text-secondary-text transition-colors hover:text-primary-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary-accent\",\n className\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n </button>\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<\"caption\">) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn(\"text-muted-foreground mt-4 text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCellAction,\n TableCaption,\n}\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,OAAS,OAAAC,EAAK,gBAAAC,MAAoB,eAiC1B,cAAAC,EA+DJ,QAAAC,MA/DI,oBAzBR,IAAMC,EAAqB,gBAAiC,CAAC,CAAC,EAOxDC,EACJ,+zCAGIC,EACJ,4hCAEF,SAASC,EAAM,CAAE,UAAAC,EAAW,kBAAAC,EAAmB,GAAGC,CAAM,EAAe,CACrE,OACER,EAACE,EAAa,SAAb,CAAsB,MAAO,CAAE,kBAAAK,CAAkB,EAChD,SAAAP,EAAC,OACC,YAAU,kBACV,UAAWS,EACT,iFACAF,GAAqBJ,EACrBI,GAAqBH,CACvB,EAEA,SAAAJ,EAAC,SACC,YAAU,QACV,UAAWS,EAAG,gCAAiCH,CAAS,EACvD,GAAGE,EACN,EACF,EACF,CAEJ,CAEA,SAASE,EAAY,CAAE,UAAAJ,EAAW,GAAGE,CAAM,EAAkC,CAC3E,OACER,EAAC,SACC,YAAU,eACV,UAAWS,EAAG,sCAAuCH,CAAS,EAC7D,GAAGE,EACN,CAEJ,CAEA,SAASG,EAAU,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAkC,CACzE,OACER,EAAC,SACC,YAAU,aACV,UAAWS,EAAG,6BAA8BH,CAAS,EACpD,GAAGE,EACN,CAEJ,CAEA,SAASI,EAAY,CAAE,UAAAN,EAAW,GAAGE,CAAM,EAAkC,CAC3E,OACER,EAAC,SACC,YAAU,eACV,UAAWS,EACT,0DACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAOA,SAASK,EAAS,CAChB,UAAAP,EACA,YAAAQ,EACA,WAAAC,EACA,SAAAC,EACA,GAAGR,CACL,EAAkB,CAChB,IAAMS,EACJF,IAAe,MACbf,EAACkB,EAAA,CA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CH,CAAS,EAC5D,GAAGE,EACN,CAEJ","names":["React","Eye","MoreVertical","jsx","jsxs","TableContext","stickyFirstColumnStyles","stickyActionColumnStyles","Table","className","stickyFirstColumn","props","cn","TableHeader","TableBody","TableFooter","TableRow","isClickable","actionIcon","children","iconComponent","Eye","MoreVertical","TableCell","TableHead","isSticky","TableCellAction","onClick","asChild","handleClick","e","childOnClick","TableCaption"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as b,b as C,c as h}from"./chunk-FZ3NXOFK.mjs";import{a as x,c as y,d as N,e as w,f as P,h as O}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as b,b as C,c as h}from"./chunk-FZ3NXOFK.mjs";import{a as x,c as y,d as N,e as w,f as P,h as O}from"./chunk-TLWWS45Z.mjs";import{b as f}from"./chunk-W65OWFZY.mjs";import{a as c}from"./chunk-S5TKCF6T.mjs";import*as S from"react";import{Check as X,ChevronDown as $,X as j}from"lucide-react";import{jsx as o,jsxs as a}from"react/jsx-runtime";function J({options:l,value:i,onValueChange:k,placeholder:d="Select option...",searchPlaceholder:R="Search...",emptyMessage:D="No option found.",disabled:E=!1,className:I,error:T=!1,multiple:r=!1,values:n=[],onValuesChange:p}){let[g,u]=S.useState(!1),v=l.find(e=>e.value===i),s=l.filter(e=>n.includes(e.value)),B=e=>{if(r){let t=n.includes(e)?n.filter(m=>m!==e):[...n,e];p?.(t)}else k?.(e===i?"":e),u(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let m=n.filter(M=>M!==e);p?.(m)},L=()=>r?s.length===0?d:s.length===1?s[0].label:`${s.length} selected`:v?v.label:d;return a(b,{open:g,onOpenChange:u,children:[o(C,{asChild:!0,children:a(f,{variant:"outline",role:"combobox","aria-expanded":g,disabled:E,className:c("w-full justify-between",T&&"border-destructive-foreground focus-visible:ring-destructive-foreground",I),children:[o("span",{className:"truncate",children:L()}),o($,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(h,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:a(x,{children:[o(y,{placeholder:R}),a(N,{children:[o(w,{children:D}),a(P,{children:[r&&s.length>0&&o("div",{className:"px-2 py-1.5",children:o("div",{className:"flex flex-wrap gap-1",children:s.map(e=>a("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate",children:e.label}),o(j,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=r?n.includes(e.value):i===e.value;return a(O,{value:e.value,onSelect:B,children:[o(X,{className:c("mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}export{J as a};
|
|
3
|
+
//# sourceMappingURL=chunk-DF7KUCXZ.mjs.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as u}from"./chunk-4LR7SOCY.mjs";import{b as D}from"./chunk-W65OWFZY.mjs";import{a as l}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import*as e from"@radix-ui/react-dialog";import{Drawer as g}from"vaul";import{X as v}from"lucide-react";import{jsx as t,jsxs as d}from"react/jsx-runtime";var y=i.createContext({}),b=({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),f=o!==void 0,m=f?o:p,r=f?n:R=>{c(R)};return t(e.Root,{open:m,onOpenChange:r,...s,children:t(y.Provider,{value:{open:m,onOpenChange:r},children:a})})};b.displayName="Dialog";var M=e.Trigger,P=e.Portal,L=e.Close,C=i.forwardRef(({className:a,...o},n)=>t(e.Overlay,{ref:n,className:l("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));C.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let f=u("md"),m=i.useContext(y);return f?d(P,{children:[t(C,{}),d(e.Content,{ref:c,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&t(e.Close,{asChild:!0,children:d(D,{variant:"secondary",size:"icon",className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[t(v,{className:"h-4 w-4"}),t("span",{className:"sr-only",children:"Close"})]})})]})]}):t(P,{children:t(g.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:d(g.Portal,{children:[t(g.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(g.Content,{ref:c,className:l("fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[t("div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),n&&d(D,{variant:"secondary",size:"icon",onClick:()=>m.onOpenChange?.(!1),className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none",children:[t(v,{className:"h-4 w-4"}),t("span",{className:"sr-only",children:"Close"})]}),t("div",{children:o})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>t("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>t("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>t(e.Title,{ref:n,className:l("text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>t(e.Description,{ref:n,className:l("text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;export{b as a,M as b,P as c,L as d,C as e,x as f,N as g,w as h,h as i,T as j};
|
|
3
|
+
//# sourceMappingURL=chunk-FR56YJGL.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n <div>{children}</div>\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close asChild>\n <Button\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";2HAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,UAAUC,MAAuB,OAC1C,OAAS,KAAAC,MAAS,eAgCZ,cAAAC,EAiFY,QAAAC,MAjFZ,oBArBN,IAAMC,EAA6B,gBAAyC,CAAC,CAAC,EAExEC,EAAS,CAAC,CACd,SAAAC,EACA,KAAMC,EACN,aAAcC,EACd,GAAGC,CACL,IAAyD,CAEvD,GAAM,CAACC,EAAcC,CAAe,EAAU,WAAS,EAAK,EAEtDC,EAAeL,IAAmB,OAClCM,EAAOD,EAAeL,EAAiBG,EACvCI,EAAeF,EACjBJ,EACCO,GAAqB,CACpBJ,EAAgBI,CAAO,CACzB,EAEJ,OACEb,EAAiB,OAAhB,CAAqB,KAAMW,EAAM,aAAcC,EAAe,GAAGL,EAChE,SAAAP,EAACE,EAAqB,SAArB,CAA8B,MAAO,CAAE,KAAAS,EAAM,aAAAC,CAAa,EACxD,SAAAR,EACH,EACF,CAEJ,EACAD,EAAO,YAAc,SAErB,IAA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Ae,CAErB,EACA,gBAAkBA,GAAM,CACjBJ,GACHI,EAAE,eAAe,CAErB,EACC,GAAGpB,EAEJ,UAAAP,EAAC,OAAI,UAAU,mDAAmD,EACjEsB,GACCrB,EAAC2B,EAAA,CACC,QAAQ,YACR,KAAK,OACL,QAAS,IAAMF,EAAQ,eAAe,EAAK,EAC3C,UAAU,8FAEV,UAAA1B,EAAC6B,EAAA,CAAE,UAAU,UAAU,EACvB7B,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,EAEFA,EAAC,OAAK,SAAAI,EAAS,GACjB,GACF,EACF,EACF,CA0CN,CACF,EACAiB,EAAc,YAA8B,UAAQ,YAEpD,IAAMU,EAAe,CAAC,CACpB,UAAAb,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,qDACAF,CACF,EACC,GAAGX,EACN,EAEFwB,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CACpB,UAAAd,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,gEACAF,CACF,EACC,GAAGX,EACN,EAEFyB,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,QAAhB,CACC,IAAKmB,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGX,EACN,CACD,EACD0B,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAhB,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,cAAhB,CACC,IAAKmB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGX,EACN,CACD,EACD2B,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","DrawerPrimitive","X","jsx","jsxs","DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
-
var
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunkWPUW2XFIjs = require('./chunk-WPUW2XFI.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _cmdk = require('cmdk');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var p=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));p.displayName=_cmdk.Command.displayName;var P=({children:e,...t})=>_jsxruntime.jsx.call(void 0, _chunkWPUW2XFIjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkWPUW2XFIjs.f,{className:"overflow-hidden p-0 shadow-lg",children:_jsxruntime.jsx.call(void 0, p,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),c= exports.c =d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=_cmdk.Command.Input.displayName;var f=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f.displayName=_cmdk.Command.List.displayName;var l=d.forwardRef((e,t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=_cmdk.Command.Empty.displayName;var u=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));u.displayName=_cmdk.Command.Group.displayName;var g=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "-mx-1 h-px bg-border",e),...t}));g.displayName=_cmdk.Command.Separator.displayName;var y=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate",e),...t}));y.displayName=_cmdk.Command.Item.displayName;var R=({className:e,...t})=>_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto text-xs tracking-widest text-muted-foreground",e),...t});R.displayName="CommandShortcut";exports.a = p; exports.b = P; exports.c = c; exports.d = f; exports.e = l; exports.f = u; exports.g = g; exports.h = y; exports.i = R;
|
|
3
|
+
//# sourceMappingURL=chunk-HKLR7AH3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKLR7AH3.js","../src/components/command.tsx"],"names":["Command","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAA8C,sDAAwC,uECD/D,4BAEqB,2CACrB,+CASrB,IAJIA,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAGpB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,aAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,gCAAAA,2FACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CACDF,CAAAA,CAAQ,WAAA,CAAcK,aAAAA,CAAiB,WAAA,CAIvC,IAAME,CAAAA,CAAgB,CAAC,CAAE,QAAA,CAAAC,CAAAA,CAAU,GAAGN,CAAM,CAAA,CAAA,EAExCE,6BAAAA,kBAACK,CAAA,CAAQ,GAAGP,CAAAA,CACV,QAAA,CAAAE,6BAAAA,kBAACM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GC,CACL,CAAA,CAAA,EAEIE,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWE,gCAAAA,uDACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAgB,WAAA,CAAc,iBAAA,CAAA,sIAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKLR7AH3.js","sourcesContent":[null,"import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/components/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
var _chunkRRAIGAHUjs = require('./chunk-RRAIGAHU.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkK4GMCVHOjs = require('./chunk-K4GMCVHO.js');var _chunk7T4BNCXLjs = require('./chunk-7T4BNCXL.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var e = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var le="sidebar_state",ce=3600*24*7,pe="16.75rem",Z="23rem",ue="calc(3rem + 0.75rem)",be="b",ee=e.createContext(null);function T(){let a=e.useContext(ee);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var fe=e.forwardRef(({defaultOpen:a=!0,open:t,onOpenChange:r,className:i,style:s,children:c,...g},u)=>{let[h,l]=e.useState(!1),[p,f]=e.useState(a),[w,y]=e.useState(!1),[P,x]=e.useState(a),S=_nullishCoalesce(t, () => (P)),R=e.useCallback(d=>{let b=typeof d=="function"?d(S):d;r?r(b):x(b),document.cookie=`${le}=${b}; path=/; max-age=${ce}`},[r,S]),v=e.useCallback(()=>{R(d=>!d)},[R]),D=e.useCallback(()=>{l(d=>!d)},[l]);e.useEffect(()=>{let d=b=>{b.key===be&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),v())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[v]);let _=S?"expanded":"collapsed",[B,k]=e.useState(0),A=e.useRef(null),L=e.useRef([]),O=e.Children.toArray(c),C=O.filter(d=>e.isValidElement(d)&&_optionalChain([d, 'access', _2 => _2.type, 'optionalAccess', _3 => _3.displayName])==="SidebarBanner"),re=O.filter(d=>!e.isValidElement(d)||_optionalChain([d, 'access', _4 => _4.type, 'optionalAccess', _5 => _5.displayName])!=="SidebarBanner");C.length>0&&(L.current=C);let N=C.length>0,M=!N&&L.current.length>0,F=N||M,ne=e.useMemo(()=>({state:_,isOpen:p,setOpen:R,openMobile:h,setOpenMobile:l,toggleSidebar:v,toggleMobileSidebar:D,setIsFullyOpen:f,isAnimating:w,setIsAnimating:y,isBannerClosing:M}),[_,p,R,h,l,v,D,f,w,y,M]);return e.useEffect(()=>{let d=A.current;if(!d){k(0);return}let b=()=>{k(d.offsetHeight)};b();let G=new ResizeObserver(b);return G.observe(d),()=>G.disconnect()},[C.length]),_jsxruntime.jsx.call(void 0, ee.Provider,{value:ne,children:_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":pe,"--sidebar-width-icon":ue,"--sidebar-top":N?`${B}px`:"0px",...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",F&&"flex-col",i),ref:u,...g,children:F?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative overflow-hidden transition-[height] duration-200 ease-linear",style:{height:M?"0px":B>0?`${B}px`:"auto"},children:_jsxruntime.jsx.call(void 0, "div",{ref:A,className:"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full","data-state":N?"open":"closed",onTransitionEnd:()=>{M&&(L.current=[])},children:N?C:L.current})}),_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-1",children:re})]}):c})})})});fe.displayName="SidebarProvider";var me=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"banner",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full",a),...t}));me.displayName="SidebarBanner";var ge=e.forwardRef(({side:a="left",variant:t="sidebar",collapsible:r="offcanvas",className:i,children:s,...c},g)=>{let{state:u,openMobile:h,setOpenMobile:l,setIsFullyOpen:p,setIsAnimating:f,isBannerClosing:w}=T(),y=e.useRef(null),P=e.useRef(!0);return e.useEffect(()=>{let x=y.current;if(!x)return;if(P.current){P.current=!1,p(u==="expanded"),f(!1);return}f(!0);let S=setTimeout(()=>{p(u==="expanded"),f(!1)},300),R=v=>{v.target===x&&(v.propertyName==="left"||v.propertyName==="right"||v.propertyName==="width")&&(clearTimeout(S),p(u==="expanded"),f(!1))};return x.addEventListener("transitionend",R),()=>{x.removeEventListener("transitionend",R),clearTimeout(S)}},[u,p,f]),r==="none"?_jsxruntime.jsx.call(void 0, "aside",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:g,...c,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:h,onOpenChange:l,children:_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.f,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:Z,maxWidth:Z},side:a,children:[_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.g,{className:"sr-only",children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.i,{children:"Sidebar"}),_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.j,{children:"Displays the mobile sidebar."})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:g,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "w-(--sidebar-width) transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),_jsxruntime.jsx.call(void 0, "div",{ref:y,"data-banner-closing":w,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w&&"transition-[left,right,width,top,height]","top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...c,children:_jsxruntime.jsx.call(void 0, "div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border flex-1 min-h-0",children:s})})})]})]})});ge.displayName="Sidebar";var ae=e.forwardRef(({className:a,onClick:t,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:c,openMobile:g}=T(),[u,h]=e.useState(!1);return e.useEffect(()=>{let l=window.matchMedia("(max-width: 767px)"),p=f=>{h(f.matches)};return p(l),l.addEventListener("change",p),()=>l.removeEventListener("change",p)},[]),u?_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "bg-transparent hover:bg-transparent",a),onClick:l=>{_optionalChain([t, 'optionalCall', _6 => _6(l)]),c()},...r,children:[g?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunk7T4BNCXLjs.a.call(void 0, {variant:"secondary",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16})}):_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunk7T4BNCXLjs.a.call(void 0, {variant:"outline",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.Menu,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]}):_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "h-7 w-7",a),onClick:l=>{_optionalChain([t, 'optionalCall', _7 => _7(l)]),s()},...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})});ae.displayName="SidebarTrigger";var ve=e.forwardRef(({className:a,...t},r)=>{let{toggleSidebar:i}=T();return _jsxruntime.jsx.call(void 0, "button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})});ve.displayName="SidebarRail";var he=e.memo(e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "main",{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...t})));he.displayName="SidebarInset";var Re=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, _chunkK4GMCVHOjs.a,{ref:r,"data-sidebar":"input",className:_chunkFUYXCJOQjs.a.call(void 0, "h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...t}));Re.displayName="SidebarInput";var xe=e.forwardRef(({className:a,showTrigger:t=!1,children:r,...i},s)=>{let{state:c}=T();return _jsxruntime.jsxs.call(void 0, "div",{ref:s,"data-sidebar":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full gap-2 p-2 items-center",c==="collapsed"?"justify-center items-center":"justify-between items-start",a),...i,children:[c!=="collapsed"&&_jsxruntime.jsx.call(void 0, "div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{className:"whitespace-nowrap",children:r})}),t&&_jsxruntime.jsx.call(void 0, ae,{})]})});xe.displayName="SidebarHeader";var Se=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",a),...t}));Se.displayName="SidebarFooter";var we=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:r,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",a),...t}));we.displayName="SidebarSeparator";var ye=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"content",className:_chunkFUYXCJOQjs.a.call(void 0, "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",a),...t}));ye.displayName="SidebarContent";var Ce=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",a),...t}));Ce.displayName="SidebarGroup";var Ne=e.forwardRef(({className:a,asChild:t=!1,...r},i)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"div",{ref:i,"data-sidebar":"group-label",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...r}));Ne.displayName="SidebarGroupLabel";var Me=e.forwardRef(({className:a,asChild:t=!1,...r},i)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"button",{ref:i,"data-sidebar":"group-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...r}));Me.displayName="SidebarGroupAction";var Ee=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",a),...t}));Ee.displayName="SidebarGroupContent";var Te=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",a),...t}));Te.displayName="SidebarMenu";var Pe=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "li",{ref:r,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",a),...t}));Pe.displayName="SidebarMenuItem";var Le=_classvarianceauthority.cva.call(void 0, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Be= exports.s =e.forwardRef(({asChild:a=!1,isActive:t=!1,variant:r="default",size:i="default",tooltip:s,className:c,...g},u)=>{let h=a?_reactslot.Slot:"button",{state:l}=T(),p=_jsxruntime.jsx.call(void 0, h,{ref:u,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:_chunkFUYXCJOQjs.a.call(void 0, Le({variant:r,size:i}),c),...g});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkRRAIGAHUjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.c,{asChild:!0,children:p}),_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.d,{side:"right",align:"center",hidden:l!=="collapsed",...s})]})):p});Be.displayName="SidebarMenuButton";var He=e.forwardRef(({className:a,asChild:t=!1,showOnHover:r=!1,...i},s)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-base-accent-foreground md:opacity-0",a),...i}));He.displayName="SidebarMenuAction";var Ie=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"menu-badge",className:_chunkFUYXCJOQjs.a.call(void 0, "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...t}));Ie.displayName="SidebarMenuBadge";var ze=e.forwardRef(({className:a,showIcon:t=!1,...r},i)=>{let s=e.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return _jsxruntime.jsxs.call(void 0, "div",{ref:i,"data-sidebar":"menu-skeleton",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 items-center gap-2 rounded-md px-2",a),...r,children:[t&&_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});ze.displayName="SidebarMenuSkeleton";var De=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu-sub",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...t}));De.displayName="SidebarMenuSub";var _e=e.forwardRef(({...a},t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...a}));_e.displayName="SidebarMenuSubItem";var ke=e.forwardRef(({asChild:a=!1,size:t="md",isActive:r,className:i,...s},c)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"a",{ref:c,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));ke.displayName="SidebarMenuSubButton";exports.a = T; exports.b = fe; exports.c = me; exports.d = ge; exports.e = ae; exports.f = ve; exports.g = he; exports.h = Re; exports.i = xe; exports.j = Se; exports.k = we; exports.l = ye; exports.m = Ce; exports.n = Ne; exports.o = Me; exports.p = Ee; exports.q = Te; exports.r = Pe; exports.s = Be; exports.t = He; exports.u = Ie; exports.v = ze; exports.w = De; exports.x = _e; exports.y = ke;
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunkRRAIGAHUjs = require('./chunk-RRAIGAHU.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkK4GMCVHOjs = require('./chunk-K4GMCVHO.js');var _chunk7T4BNCXLjs = require('./chunk-7T4BNCXL.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var e = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var le="sidebar_state",ce=3600*24*7,pe="16.75rem",Z="23rem",ue="calc(3rem + 0.75rem)",be="b",ee=e.createContext(null);function T(){let a=e.useContext(ee);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var fe=e.forwardRef(({defaultOpen:a=!0,open:t,onOpenChange:r,className:i,style:s,children:c,...g},u)=>{let[h,l]=e.useState(!1),[p,f]=e.useState(a),[w,y]=e.useState(!1),[P,x]=e.useState(a),S=_nullishCoalesce(t, () => (P)),R=e.useCallback(d=>{let b=typeof d=="function"?d(S):d;r?r(b):x(b),document.cookie=`${le}=${b}; path=/; max-age=${ce}`},[r,S]),v=e.useCallback(()=>{R(d=>!d)},[R]),D=e.useCallback(()=>{l(d=>!d)},[l]);e.useEffect(()=>{let d=b=>{b.key===be&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),v())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[v]);let _=S?"expanded":"collapsed",[B,k]=e.useState(0),A=e.useRef(null),L=e.useRef([]),O=e.Children.toArray(c),C=O.filter(d=>e.isValidElement(d)&&_optionalChain([d, 'access', _2 => _2.type, 'optionalAccess', _3 => _3.displayName])==="SidebarBanner"),re=O.filter(d=>!e.isValidElement(d)||_optionalChain([d, 'access', _4 => _4.type, 'optionalAccess', _5 => _5.displayName])!=="SidebarBanner");C.length>0&&(L.current=C);let N=C.length>0,M=!N&&L.current.length>0,F=N||M,ne=e.useMemo(()=>({state:_,isOpen:p,setOpen:R,openMobile:h,setOpenMobile:l,toggleSidebar:v,toggleMobileSidebar:D,setIsFullyOpen:f,isAnimating:w,setIsAnimating:y,isBannerClosing:M}),[_,p,R,h,l,v,D,f,w,y,M]);return e.useEffect(()=>{let d=A.current;if(!d){k(0);return}let b=()=>{k(d.offsetHeight)};b();let G=new ResizeObserver(b);return G.observe(d),()=>G.disconnect()},[C.length]),_jsxruntime.jsx.call(void 0, ee.Provider,{value:ne,children:_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":pe,"--sidebar-width-icon":ue,"--sidebar-top":N?`${B}px`:"0px",...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",F&&"flex-col",i),ref:u,...g,children:F?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative overflow-hidden transition-[height] duration-200 ease-linear",style:{height:M?"0px":B>0?`${B}px`:"auto"},children:_jsxruntime.jsx.call(void 0, "div",{ref:A,className:"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full","data-state":N?"open":"closed",onTransitionEnd:()=>{M&&(L.current=[])},children:N?C:L.current})}),_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-1",children:re})]}):c})})})});fe.displayName="SidebarProvider";var me=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"banner",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full",a),...t}));me.displayName="SidebarBanner";var ge=e.forwardRef(({side:a="left",variant:t="sidebar",collapsible:r="offcanvas",className:i,children:s,...c},g)=>{let{state:u,openMobile:h,setOpenMobile:l,setIsFullyOpen:p,setIsAnimating:f,isBannerClosing:w}=T(),y=e.useRef(null),P=e.useRef(!0);return e.useEffect(()=>{let x=y.current;if(!x)return;if(P.current){P.current=!1,p(u==="expanded"),f(!1);return}f(!0);let S=setTimeout(()=>{p(u==="expanded"),f(!1)},300),R=v=>{v.target===x&&(v.propertyName==="left"||v.propertyName==="right"||v.propertyName==="width")&&(clearTimeout(S),p(u==="expanded"),f(!1))};return x.addEventListener("transitionend",R),()=>{x.removeEventListener("transitionend",R),clearTimeout(S)}},[u,p,f]),r==="none"?_jsxruntime.jsx.call(void 0, "aside",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:g,...c,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:h,onOpenChange:l,children:_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.f,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:Z,maxWidth:Z},side:a,children:[_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.g,{className:"sr-only",children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.i,{children:"Sidebar"}),_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.j,{children:"Displays the mobile sidebar."})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:g,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":u==="collapsed"?r:"","data-variant":t,"data-side":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "w-(--sidebar-width) transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),_jsxruntime.jsx.call(void 0, "div",{ref:y,"data-banner-closing":w,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w&&"transition-[left,right,width,top,height]","top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...c,children:_jsxruntime.jsx.call(void 0, "div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border flex-1 min-h-0",children:s})})})]})]})});ge.displayName="Sidebar";var ae=e.forwardRef(({className:a,onClick:t,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:c,openMobile:g}=T(),[u,h]=e.useState(!1);return e.useEffect(()=>{let l=window.matchMedia("(max-width: 767px)"),p=f=>{h(f.matches)};return p(l),l.addEventListener("change",p),()=>l.removeEventListener("change",p)},[]),u?_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "bg-transparent hover:bg-transparent",a),onClick:l=>{_optionalChain([t, 'optionalCall', _6 => _6(l)]),c()},...r,children:[g?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunk7T4BNCXLjs.a.call(void 0, {variant:"secondary",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16})}):_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunk7T4BNCXLjs.a.call(void 0, {variant:"outline",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.Menu,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]}):_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "h-7 w-7",a),onClick:l=>{_optionalChain([t, 'optionalCall', _7 => _7(l)]),s()},...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})});ae.displayName="SidebarTrigger";var ve=e.forwardRef(({className:a,...t},r)=>{let{toggleSidebar:i}=T();return _jsxruntime.jsx.call(void 0, "button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...t})});ve.displayName="SidebarRail";var he=e.memo(e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "main",{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex min-w-0 w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",a),...t})));he.displayName="SidebarInset";var Re=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, _chunkK4GMCVHOjs.a,{ref:r,"data-sidebar":"input",className:_chunkFUYXCJOQjs.a.call(void 0, "h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",a),...t}));Re.displayName="SidebarInput";var xe=e.forwardRef(({className:a,showTrigger:t=!1,children:r,...i},s)=>{let{state:c}=T();return _jsxruntime.jsxs.call(void 0, "div",{ref:s,"data-sidebar":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full gap-2 p-2 items-center",c==="collapsed"?"justify-center items-center":"justify-between items-start",a),...i,children:[c!=="collapsed"&&_jsxruntime.jsx.call(void 0, "div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{className:"whitespace-nowrap",children:r})}),t&&_jsxruntime.jsx.call(void 0, ae,{})]})});xe.displayName="SidebarHeader";var Se=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",a),...t}));Se.displayName="SidebarFooter";var we=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:r,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",a),...t}));we.displayName="SidebarSeparator";var ye=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"content",className:_chunkFUYXCJOQjs.a.call(void 0, "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",a),...t}));ye.displayName="SidebarContent";var Ce=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",a),...t}));Ce.displayName="SidebarGroup";var Ne=e.forwardRef(({className:a,asChild:t=!1,...r},i)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"div",{ref:i,"data-sidebar":"group-label",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...r}));Ne.displayName="SidebarGroupLabel";var Me=e.forwardRef(({className:a,asChild:t=!1,...r},i)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"button",{ref:i,"data-sidebar":"group-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",a),...r}));Me.displayName="SidebarGroupAction";var Ee=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",a),...t}));Ee.displayName="SidebarGroupContent";var Te=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",a),...t}));Te.displayName="SidebarMenu";var Pe=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "li",{ref:r,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",a),...t}));Pe.displayName="SidebarMenuItem";var Le=_classvarianceauthority.cva.call(void 0, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Be= exports.s =e.forwardRef(({asChild:a=!1,isActive:t=!1,variant:r="default",size:i="default",tooltip:s,className:c,...g},u)=>{let h=a?_reactslot.Slot:"button",{state:l}=T(),p=_jsxruntime.jsx.call(void 0, h,{ref:u,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:_chunkFUYXCJOQjs.a.call(void 0, Le({variant:r,size:i}),c),...g});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkRRAIGAHUjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.c,{asChild:!0,children:p}),_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.d,{side:"right",align:"center",hidden:l!=="collapsed",...s})]})):p});Be.displayName="SidebarMenuButton";var He=e.forwardRef(({className:a,asChild:t=!1,showOnHover:r=!1,...i},s)=>_jsxruntime.jsx.call(void 0, t?_reactslot.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-base-accent-foreground md:opacity-0",a),...i}));He.displayName="SidebarMenuAction";var Ie=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"menu-badge",className:_chunkFUYXCJOQjs.a.call(void 0, "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...t}));Ie.displayName="SidebarMenuBadge";var ze=e.forwardRef(({className:a,showIcon:t=!1,...r},i)=>{let s=e.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return _jsxruntime.jsxs.call(void 0, "div",{ref:i,"data-sidebar":"menu-skeleton",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 items-center gap-2 rounded-md px-2",a),...r,children:[t&&_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});ze.displayName="SidebarMenuSkeleton";var De=e.forwardRef(({className:a,...t},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu-sub",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...t}));De.displayName="SidebarMenuSub";var _e=e.forwardRef(({...a},t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...a}));_e.displayName="SidebarMenuSubItem";var ke=e.forwardRef(({asChild:a=!1,size:t="md",isActive:r,className:i,...s},c)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"a",{ref:c,"data-sidebar":"menu-sub-button","data-size":t,"data-active":r,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));ke.displayName="SidebarMenuSubButton";exports.a = T; exports.b = fe; exports.c = me; exports.d = ge; exports.e = ae; exports.f = ve; exports.g = he; exports.h = Re; exports.i = xe; exports.j = Se; exports.k = we; exports.l = ye; exports.m = Ce; exports.n = Ne; exports.o = Me; exports.p = Ee; exports.q = Te; exports.r = Pe; exports.s = Be; exports.t = He; exports.u = Ie; exports.v = ze; exports.w = De; exports.x = _e; exports.y = ke;
|
|
3
|
+
//# sourceMappingURL=chunk-KNWZO7KC.js.map
|