pendentive 0.1.1
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/LICENSE +13 -0
- package/README.md +88 -0
- package/dist/components/avatar/Avatar.d.ts +26 -0
- package/dist/components/badge/Badge.d.ts +25 -0
- package/dist/components/button/Button.d.ts +51 -0
- package/dist/components/button/ButtonGroup.d.ts +36 -0
- package/dist/components/checkbox/Checkbox.d.ts +34 -0
- package/dist/components/command/Command.d.ts +59 -0
- package/dist/components/data/List.d.ts +40 -0
- package/dist/components/data/Table.d.ts +37 -0
- package/dist/components/data/Tree.d.ts +36 -0
- package/dist/components/feedback/Alert.d.ts +29 -0
- package/dist/components/feedback/ProgressBar.d.ts +32 -0
- package/dist/components/feedback/Skeleton.d.ts +20 -0
- package/dist/components/feedback/Spinner.d.ts +20 -0
- package/dist/components/feedback/Toast.d.ts +30 -0
- package/dist/components/field/ColorField.d.ts +33 -0
- package/dist/components/field/NumberField.d.ts +42 -0
- package/dist/components/field/TextArea.d.ts +35 -0
- package/dist/components/field/TextField.d.ts +39 -0
- package/dist/components/field/shared.d.ts +9 -0
- package/dist/components/field/textInput.css.d.ts +5 -0
- package/dist/components/hovercard/HoverCard.d.ts +35 -0
- package/dist/components/input/ChipInput.d.ts +31 -0
- package/dist/components/input/DatePicker.d.ts +66 -0
- package/dist/components/input/FileDropzone.d.ts +26 -0
- package/dist/components/layout/Card.d.ts +24 -0
- package/dist/components/layout/Section.d.ts +33 -0
- package/dist/components/layout/Separator.d.ts +18 -0
- package/dist/components/misc/ModeCard.d.ts +35 -0
- package/dist/components/navigation/Accordion.d.ts +42 -0
- package/dist/components/navigation/Breadcrumb.d.ts +25 -0
- package/dist/components/navigation/Pagination.d.ts +30 -0
- package/dist/components/navigation/Tabs.d.ts +38 -0
- package/dist/components/overlay/AlertDialog.d.ts +37 -0
- package/dist/components/overlay/ContextMenu.d.ts +19 -0
- package/dist/components/overlay/Dialog.d.ts +38 -0
- package/dist/components/overlay/Drawer.d.ts +40 -0
- package/dist/components/overlay/DropdownMenu.d.ts +55 -0
- package/dist/components/overlay/Popover.d.ts +33 -0
- package/dist/components/radio/RadioGroup.d.ts +37 -0
- package/dist/components/select/Combobox.d.ts +42 -0
- package/dist/components/select/Select.d.ts +48 -0
- package/dist/components/slider/RangeSlider.d.ts +43 -0
- package/dist/components/slider/Slider.d.ts +41 -0
- package/dist/components/switch/Switch.d.ts +35 -0
- package/dist/components/toggle/Toggle.d.ts +39 -0
- package/dist/components/toggle/ToggleGroup.d.ts +47 -0
- package/dist/components/tooltip/Tooltip.d.ts +22 -0
- package/dist/core/classNames.d.ts +6 -0
- package/dist/core/content.d.ts +2 -0
- package/dist/core/controller.d.ts +34 -0
- package/dist/core/dom.d.ts +14 -0
- package/dist/core/overlay.d.ts +14 -0
- package/dist/core/styleInjector.d.ts +12 -0
- package/dist/core/theme.d.ts +18 -0
- package/dist/core/types.d.ts +10 -0
- package/dist/index.cjs +4054 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +3934 -0
- package/dist/index.js.map +1 -0
- package/dist/linteau.global.js +397 -0
- package/dist/linteau.global.js.map +7 -0
- package/dist/styles/tokens.d.ts +33 -0
- package/dist/svg/Icon.d.ts +19 -0
- package/dist/svg/create-icon.d.ts +13 -0
- package/dist/svg/icons/alertTriangle.d.ts +1 -0
- package/dist/svg/icons/bell.d.ts +1 -0
- package/dist/svg/icons/calendar.d.ts +1 -0
- package/dist/svg/icons/check.d.ts +1 -0
- package/dist/svg/icons/chevronDown.d.ts +1 -0
- package/dist/svg/icons/chevronLeft.d.ts +1 -0
- package/dist/svg/icons/chevronRight.d.ts +1 -0
- package/dist/svg/icons/chevronUp.d.ts +1 -0
- package/dist/svg/icons/circle.d.ts +1 -0
- package/dist/svg/icons/copy.d.ts +1 -0
- package/dist/svg/icons/download.d.ts +1 -0
- package/dist/svg/icons/edit.d.ts +1 -0
- package/dist/svg/icons/externalLink.d.ts +1 -0
- package/dist/svg/icons/eye.d.ts +1 -0
- package/dist/svg/icons/eyeOff.d.ts +1 -0
- package/dist/svg/icons/filter.d.ts +1 -0
- package/dist/svg/icons/heart.d.ts +1 -0
- package/dist/svg/icons/home.d.ts +1 -0
- package/dist/svg/icons/index.d.ts +54 -0
- package/dist/svg/icons/info.d.ts +1 -0
- package/dist/svg/icons/link.d.ts +1 -0
- package/dist/svg/icons/loader.d.ts +1 -0
- package/dist/svg/icons/lock.d.ts +1 -0
- package/dist/svg/icons/mail.d.ts +1 -0
- package/dist/svg/icons/menu.d.ts +1 -0
- package/dist/svg/icons/minus.d.ts +1 -0
- package/dist/svg/icons/moon.d.ts +1 -0
- package/dist/svg/icons/moreHorizontal.d.ts +1 -0
- package/dist/svg/icons/phone.d.ts +1 -0
- package/dist/svg/icons/plus.d.ts +1 -0
- package/dist/svg/icons/refreshCw.d.ts +1 -0
- package/dist/svg/icons/search.d.ts +1 -0
- package/dist/svg/icons/settings.d.ts +1 -0
- package/dist/svg/icons/star.d.ts +1 -0
- package/dist/svg/icons/sun.d.ts +1 -0
- package/dist/svg/icons/trash.d.ts +1 -0
- package/dist/svg/icons/upload.d.ts +1 -0
- package/dist/svg/icons/user.d.ts +1 -0
- package/dist/svg/icons/x.d.ts +1 -0
- package/dist/svg/index.cjs +380 -0
- package/dist/svg/index.cjs.map +1 -0
- package/dist/svg/index.d.ts +4 -0
- package/dist/svg/index.js +352 -0
- package/dist/svg/index.js.map +1 -0
- package/dist/svg/types.d.ts +26 -0
- package/package.json +81 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
"use strict";var Linteau=(()=>{var be=Object.defineProperty;var lo=Object.getOwnPropertyDescriptor;var so=Object.getOwnPropertyNames;var co=Object.prototype.hasOwnProperty;var po=(e,o)=>{for(var r in o)be(e,r,{get:o[r],enumerable:!0})},uo=(e,o,r,d)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of so(o))!co.call(e,n)&&n!==r&&be(e,n,{get:()=>o[n],enumerable:!(d=lo(o,n))||d.enumerable});return e};var mo=e=>uo(be({},"__esModule",{value:!0}),e);var vn={};po(vn,{Accordion:()=>Zo,Alert:()=>Io,AlertDialog:()=>tn,Avatar:()=>ho,Badge:()=>yo,Breadcrumb:()=>_o,Button:()=>re,ButtonGroup:()=>Co,Card:()=>Yo,Checkbox:()=>Eo,ChipInput:()=>Po,ColorField:()=>Bo,Combobox:()=>No,Command:()=>wo,ContextMenu:()=>rn,DatePicker:()=>Wo,Dialog:()=>ke,Drawer:()=>an,DropdownMenu:()=>nn,FileDropzone:()=>jo,HoverCard:()=>Ro,Icon:()=>y,List:()=>ko,ModeCard:()=>qo,NumberField:()=>zo,Pagination:()=>Qo,Popover:()=>ln,ProgressBar:()=>So,RadioGroup:()=>sn,RangeSlider:()=>pn,Section:()=>Xo,Select:()=>dn,Separator:()=>Uo,Skeleton:()=>Ao,Slider:()=>cn,Spinner:()=>Mo,Switch:()=>un,Table:()=>Lo,Tabs:()=>en,TextArea:()=>Ho,TextField:()=>Fo,Toggle:()=>Le,ToggleGroup:()=>mn,Tooltip:()=>fn,Tree:()=>To,accordionCss:()=>Yt,alertCss:()=>Mt,avatarCss:()=>Et,badgeCss:()=>wt,breadcrumbCss:()=>Xt,buttonCss:()=>kt,buttonGroupCss:()=>Lt,calendarCss:()=>Nt,cardCss:()=>Gt,checkboxCss:()=>Tt,chipInputCss:()=>Pt,comboboxCss:()=>fe,commandCss:()=>Dt,createToastManager:()=>Ht,dialogCss:()=>Zt,drawerCss:()=>_t,dropzoneCss:()=>$t,getTheme:()=>Oe,hoverCardCss:()=>Rt,icons:()=>D,isBrowser:()=>j,listCss:()=>It,menuCss:()=>ge,modeCardCss:()=>jt,onThemeChange:()=>ze,paginationCss:()=>Ut,popoverCss:()=>Jt,progressBarCss:()=>Ot,radioCss:()=>Qt,rangeSliderCss:()=>to,renderMenuEntries:()=>pe,resetTheme:()=>Be,sectionCss:()=>Kt,selectCss:()=>eo,separatorCss:()=>Wt,setTheme:()=>Ve,skeletonCss:()=>Vt,sliderCss:()=>xe,spinnerCss:()=>Bt,swatchCss:()=>Ft,switchCss:()=>oo,tableCss:()=>St,tabsCss:()=>qt,toast:()=>Vo,toastCss:()=>zt,toggleCss:()=>no,toggleGroupCss:()=>ro,tooltipCss:()=>io,treeCss:()=>At});function j(){return typeof document<"u"&&typeof window<"u"}function x(e){if(!j())throw new Error(`[linteau] "${e}" requires a DOM environment (a browser, or Node/Bun with a DOM shim such as 'happy-dom' or 'linkedom'). No 'document' was found.`)}function c(e,o){let r=document.createElement(e);return o&&(r.className=o),r}function Se(){let e=new Map;return{on(o,r){return e.has(o)||e.set(o,new Set),e.get(o).add(r),()=>e.get(o)?.delete(r)},off(o,r){e.get(o)?.delete(r)},emit(o,r){e.get(o)?.forEach(d=>d(r))},clear(){e.clear()}}}function h(e,o){return Object.assign(e,o)}var he={background:"oklch(0.09 0 0)",foreground:"oklch(0.94 0 0)",card:"oklch(0.12 0 0)",cardForeground:"oklch(0.94 0 0)",primary:"oklch(0.92 0 0)",primaryForeground:"oklch(0.1 0 0)",secondary:"oklch(0.18 0 0)",secondaryForeground:"oklch(0.9 0 0)",muted:"oklch(0.16 0 0)",mutedForeground:"oklch(0.6 0 0)",accent:"oklch(0.2 0 0)",accentForeground:"oklch(0.94 0 0)",destructive:"oklch(0.58 0.22 27)",destructiveForeground:"oklch(0.97 0 0)",success:"oklch(0.62 0.16 145)",successForeground:"oklch(0.97 0 0)",warning:"oklch(0.75 0.15 85)",warningForeground:"oklch(0.15 0 0)",border:"oklch(0.22 0 0)",input:"oklch(0.22 0 0)",ring:"oklch(0.7 0 0)",radius:"0.625rem",radiusSm:"calc(0.625rem - 4px)",radiusMd:"calc(0.625rem - 2px)",radiusLg:"0.625rem",radiusXl:"calc(0.625rem + 4px)"};function Ae(e){return`:root {
|
|
2
|
+
--linteau-background: ${e.background};
|
|
3
|
+
--linteau-foreground: ${e.foreground};
|
|
4
|
+
--linteau-card: ${e.card};
|
|
5
|
+
--linteau-card-foreground: ${e.cardForeground};
|
|
6
|
+
--linteau-primary: ${e.primary};
|
|
7
|
+
--linteau-primary-foreground: ${e.primaryForeground};
|
|
8
|
+
--linteau-secondary: ${e.secondary};
|
|
9
|
+
--linteau-secondary-foreground: ${e.secondaryForeground};
|
|
10
|
+
--linteau-muted: ${e.muted};
|
|
11
|
+
--linteau-muted-foreground: ${e.mutedForeground};
|
|
12
|
+
--linteau-accent: ${e.accent};
|
|
13
|
+
--linteau-accent-foreground: ${e.accentForeground};
|
|
14
|
+
--linteau-destructive: ${e.destructive};
|
|
15
|
+
--linteau-destructive-foreground: ${e.destructiveForeground};
|
|
16
|
+
--linteau-success: ${e.success};
|
|
17
|
+
--linteau-success-foreground: ${e.successForeground};
|
|
18
|
+
--linteau-warning: ${e.warning};
|
|
19
|
+
--linteau-warning-foreground: ${e.warningForeground};
|
|
20
|
+
--linteau-border: ${e.border};
|
|
21
|
+
--linteau-input: ${e.input};
|
|
22
|
+
--linteau-ring: ${e.ring};
|
|
23
|
+
--linteau-radius: ${e.radius};
|
|
24
|
+
--linteau-radius-sm: ${e.radiusSm};
|
|
25
|
+
--linteau-radius-md: ${e.radiusMd};
|
|
26
|
+
--linteau-radius-lg: ${e.radiusLg};
|
|
27
|
+
--linteau-radius-xl: ${e.radiusXl};
|
|
28
|
+
}`}var Me="linteau-tokens",oe={...he},ye=Se();function Ce(){if(!j())return;let e=document.getElementById(Me);e||(e=document.createElement("style"),e.id=Me,document.head.appendChild(e)),e.textContent=Ae(oe)}function Oe(){return oe}function Ve(e){oe={...oe,...e},Ce(),ye.emit("change",oe)}function Be(){oe={...he},Ce(),ye.emit("change",oe)}function ze(e){return ye.on("change",e)}Ce();var Ee="http://www.w3.org/2000/svg";function fo(e){let o=String(e.size??16);return{xmlns:Ee,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:e.color??"currentColor","stroke-width":String(e.strokeWidth??2),"stroke-linecap":"round","stroke-linejoin":"round"}}function we(e,o){let r=document.createElementNS(Ee,"svg"),d=fo(o);for(let n in d)r.setAttribute(n,d[n]);o.className&&r.setAttribute("class",o.className);for(let[n,l]of e){let s=document.createElementNS(Ee,n);for(let a in l)s.setAttribute(a,l[a]);r.appendChild(s)}return r}function He(e,o){let r=e.cloneNode(!0),d=String(o.size??16);return r.setAttribute("width",d),r.setAttribute("height",d),o.color&&r.setAttribute("stroke",o.color),o.strokeWidth!=null&&r.setAttribute("stroke-width",String(o.strokeWidth)),o.className&&r.classList.add(...o.className.split(" ").filter(Boolean)),r}function vo(e,o){let r=new DOMParser().parseFromString(e,"image/svg+xml");return He(r.documentElement,o)}function y(e,o,r={}){if(e==null)return null;let d={...o!==void 0?{size:o}:{},...r};return typeof e=="function"?e(d):typeof e=="string"?vo(e,d):e instanceof SVGElement?He(e,d):Array.isArray(e)?we(e,d):null}function C(e,o){return function(d={}){let n=we(o,d);return n.setAttribute("data-icon",e),n}}var Fe=C("alert-triangle",[["path",{d:"M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z"}],["line",{x1:"12",y1:"9",x2:"12",y2:"13"}],["line",{x1:"12",y1:"17",x2:"12.01",y2:"17"}]]);var Re=C("bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"}]]);var Pe=C("calendar",[["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}],["line",{x1:"16",y1:"2",x2:"16",y2:"6"}],["line",{x1:"8",y1:"2",x2:"8",y2:"6"}],["line",{x1:"3",y1:"10",x2:"21",y2:"10"}]]);var Ne=C("check",[["polyline",{points:"20 6 9 17 4 12"}]]);var $e=C("chevron-down",[["polyline",{points:"6 9 12 15 18 9"}]]);var Ge=C("chevron-left",[["polyline",{points:"15 18 9 12 15 6"}]]);var Ke=C("chevron-right",[["polyline",{points:"9 18 15 12 9 6"}]]);var We=C("chevron-up",[["polyline",{points:"18 15 12 9 6 15"}]]);var je=C("circle",[["circle",{cx:"12",cy:"12",r:"10"}]]);var Ye=C("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]]);var Xe=C("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",y1:"15",x2:"12",y2:"3"}]]);var Ue=C("edit",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}]]);var qe=C("external-link",[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]]);var Ze=C("eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}],["circle",{cx:"12",cy:"12",r:"3"}]]);var _e=C("eye-off",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}],["line",{x1:"2",y1:"2",x2:"22",y2:"22"}]]);var Je=C("filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"}]]);var Qe=C("heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]]);var et=C("home",[["path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}],["polyline",{points:"9 22 9 12 15 12 15 22"}]]);var tt=C("info",[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"12",y1:"16",x2:"12",y2:"12"}],["line",{x1:"12",y1:"8",x2:"12.01",y2:"8"}]]);var ot=C("link",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2"}],["line",{x1:"8",y1:"12",x2:"16",y2:"12"}]]);var nt=C("loader",[["line",{x1:"12",y1:"2",x2:"12",y2:"6"}],["line",{x1:"12",y1:"18",x2:"12",y2:"22"}],["line",{x1:"4.9",y1:"4.9",x2:"7.8",y2:"7.8"}],["line",{x1:"16.2",y1:"16.2",x2:"19.1",y2:"19.1"}],["line",{x1:"2",y1:"12",x2:"6",y2:"12"}],["line",{x1:"18",y1:"12",x2:"22",y2:"12"}],["line",{x1:"4.9",y1:"19.1",x2:"7.8",y2:"16.2"}],["line",{x1:"16.2",y1:"7.8",x2:"19.1",y2:"4.9"}]]);var rt=C("lock",[["rect",{x:"3",y:"11",width:"18",height:"11",rx:"2",ry:"2"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}]]);var it=C("mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}]]);var at=C("menu",[["line",{x1:"4",y1:"12",x2:"20",y2:"12"}],["line",{x1:"4",y1:"6",x2:"20",y2:"6"}],["line",{x1:"4",y1:"18",x2:"20",y2:"18"}]]);var lt=C("minus",[["line",{x1:"5",y1:"12",x2:"19",y2:"12"}]]);var st=C("moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]]);var dt=C("more-horizontal",[["circle",{cx:"5",cy:"12",r:"1"}],["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}]]);var ct=C("phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"}]]);var pt=C("plus",[["line",{x1:"12",y1:"5",x2:"12",y2:"19"}],["line",{x1:"5",y1:"12",x2:"19",y2:"12"}]]);var ut=C("refresh-cw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}],["path",{d:"M16 16h5v5"}]]);var mt=C("search",[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}]]);var ft=C("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]]);var vt=C("star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"}]]);var gt=C("sun",[["circle",{cx:"12",cy:"12",r:"4"}],["line",{x1:"12",y1:"2",x2:"12",y2:"4"}],["line",{x1:"12",y1:"20",x2:"12",y2:"22"}],["line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}],["line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}],["line",{x1:"2",y1:"12",x2:"4",y2:"12"}],["line",{x1:"20",y1:"12",x2:"22",y2:"12"}],["line",{x1:"6.34",y1:"17.66",x2:"4.93",y2:"19.07"}],["line",{x1:"19.07",y1:"4.93",x2:"17.66",y2:"6.34"}]]);var xt=C("trash",[["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}],["path",{d:"M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"}],["line",{x1:"10",y1:"11",x2:"10",y2:"17"}],["line",{x1:"14",y1:"11",x2:"14",y2:"17"}]]);var bt=C("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",y1:"3",x2:"12",y2:"15"}]]);var ht=C("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2"}],["circle",{cx:"12",cy:"7",r:"4"}]]);var yt=C("x",[["line",{x1:"18",y1:"6",x2:"6",y2:"18"}],["line",{x1:"6",y1:"6",x2:"18",y2:"18"}]]);var D={alertTriangle:Fe,bell:Re,calendar:Pe,check:Ne,chevronDown:$e,chevronLeft:Ge,chevronRight:Ke,chevronUp:We,circle:je,copy:Ye,download:Xe,edit:Ue,externalLink:qe,eye:Ze,eyeOff:_e,filter:Je,heart:Qe,home:et,info:tt,link:ot,loader:nt,lock:rt,mail:it,menu:at,minus:lt,moon:st,moreHorizontal:dt,phone:ct,plus:pt,refreshCw:ut,search:mt,settings:ft,star:vt,sun:gt,trash:xt,upload:bt,user:ht,x:yt};var go="linteau-";function t(e){return`${go}${e}`}function E(...e){return e.filter(Boolean).join(" ")}var Ct="linteau-styles",me=new Set,xo=`
|
|
29
|
+
.linteau-hidden { display: none !important }
|
|
30
|
+
.linteau-icon { color: var(--linteau-muted-foreground); flex-shrink: 0 }
|
|
31
|
+
`;function bo(){if(!j)return null;let e=document.getElementById(Ct);return e||(e=document.createElement("style"),e.id=Ct,document.head.appendChild(e)),e}function g(e,o){let r=bo();r&&(me.has("base")||(r.appendChild(document.createTextNode(xo)),me.add("base")),!me.has(e)&&(r.appendChild(document.createTextNode(o)),me.add(e)))}var Et=`
|
|
32
|
+
.linteau-avatar { display: inline-flex; align-items: center; justify-content: center; background: var(--linteau-secondary); color: var(--linteau-secondary-foreground); font-size: 12px; font-weight: 600; overflow: hidden; flex-shrink: 0 }
|
|
33
|
+
.linteau-avatar-circle { border-radius: 50% }
|
|
34
|
+
.linteau-avatar-square { border-radius: var(--linteau-radius-sm) }
|
|
35
|
+
.linteau-avatar img { width: 100%; height: 100%; object-fit: cover }
|
|
36
|
+
`;function ho(e={}){x("Avatar"),g("avatar",Et);let o=e.size??36,r=e.shape??"circle",d=c("div",E(t("avatar"),t(`avatar-${r}`)));d.style.width=`${o}px`,d.style.height=`${o}px`;function n(s){if(d.replaceChildren(),s){let a=document.createElement("img");a.src=s,a.alt=e.alt??"",a.addEventListener("error",()=>n(void 0),{once:!0}),d.appendChild(a)}else{let a=document.createElement("span");a.textContent=e.initials??"",d.appendChild(a)}}return n(e.src),h(d,{setSrc(s){n(s)},destroy(){d.remove()}})}var wt=`
|
|
37
|
+
.linteau-badge {
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 4px;
|
|
41
|
+
padding: 2px 8px;
|
|
42
|
+
border-radius: 999px;
|
|
43
|
+
font-size: 11px;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
line-height: 1.6;
|
|
46
|
+
border: 1px solid transparent;
|
|
47
|
+
}
|
|
48
|
+
.linteau-badge-default { background: var(--linteau-secondary); color: var(--linteau-secondary-foreground) }
|
|
49
|
+
.linteau-badge-outline { background: transparent; border-color: var(--linteau-border); color: var(--linteau-foreground) }
|
|
50
|
+
.linteau-badge-success { background: var(--linteau-success); color: var(--linteau-success-foreground) }
|
|
51
|
+
.linteau-badge-warning { background: var(--linteau-warning); color: var(--linteau-warning-foreground) }
|
|
52
|
+
.linteau-badge-destructive { background: var(--linteau-destructive); color: var(--linteau-destructive-foreground) }
|
|
53
|
+
`;function yo(e,o={}){x("Badge"),g("badge",wt);let r=o.variant??"default",d=c("span",E(t("badge"),t(`badge-${r}`))),n=document.createElement("span");return n.textContent=e,o.icon&&d.appendChild(y(o.icon,11,{className:t("icon")})),d.appendChild(n),h(d,{setLabel(s){n.textContent=s},setVariant(s){d.classList.remove(t(`badge-${r}`)),r=s,d.classList.add(t(`badge-${r}`))},destroy(){d.remove()}})}var kt=`
|
|
54
|
+
.linteau-button {
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
gap: 6px;
|
|
59
|
+
border-radius: var(--linteau-radius-sm);
|
|
60
|
+
border: 1px solid transparent;
|
|
61
|
+
font-size: 13px;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
font-family: inherit;
|
|
65
|
+
transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, opacity 120ms ease;
|
|
66
|
+
}
|
|
67
|
+
.linteau-button-default { padding: 10px 14px }
|
|
68
|
+
.linteau-button-sm { padding: 6px 10px; font-size: 12px }
|
|
69
|
+
.linteau-button-full { width: 100% }
|
|
70
|
+
.linteau-button:active { transform: scale(0.97) }
|
|
71
|
+
.linteau-button:disabled { opacity: 0.5; cursor: not-allowed; transform: none }
|
|
72
|
+
.linteau-button-default:not(.linteau-button-outline):not(.linteau-button-ghost):not(.linteau-button-destructive) {
|
|
73
|
+
background: var(--linteau-primary);
|
|
74
|
+
color: var(--linteau-primary-foreground);
|
|
75
|
+
}
|
|
76
|
+
.linteau-button-default:not(.linteau-button-outline):not(.linteau-button-ghost):not(.linteau-button-destructive):hover:not(:disabled) {
|
|
77
|
+
filter: brightness(0.92);
|
|
78
|
+
}
|
|
79
|
+
.linteau-button-outline { background: transparent; border-color: var(--linteau-border); color: var(--linteau-foreground) }
|
|
80
|
+
.linteau-button-outline:hover:not(:disabled) { background: var(--linteau-accent) }
|
|
81
|
+
.linteau-button-ghost { background: transparent; color: var(--linteau-muted-foreground) }
|
|
82
|
+
.linteau-button-ghost:hover:not(:disabled) { background: var(--linteau-accent); color: var(--linteau-foreground) }
|
|
83
|
+
.linteau-button-destructive { background: var(--linteau-destructive); color: var(--linteau-destructive-foreground) }
|
|
84
|
+
.linteau-button-destructive:hover:not(:disabled) { filter: brightness(0.92) }
|
|
85
|
+
`;function re(e,o={}){x("Button"),g("button",kt);let{variant:r="default",size:d="default"}=o,{icon:n,iconPosition:l="start",disabled:s=!1}=o,a=o.onClick,p=c("button",E(t("button"),t(`button-${r}`),t(`button-${d}`),o.fullWidth&&t("button-full")));p.type="button",p.disabled=s;let i=document.createElement("span");i.className=t("button-label"),i.textContent=e;function m(){p.replaceChildren();let u=n?y(n,14,{className:t("icon")}):null,b=[];u&&l==="start"&&b.push(u),b.push(i),u&&l==="end"&&b.push(u),p.append(...b)}m();let v=u=>{s||a?.(u)};return p.addEventListener("click",v),h(p,{setLabel(u){i.textContent=u},setVariant(u){p.classList.remove(t(`button-${r}`)),r=u,p.classList.add(t(`button-${r}`))},setSize(u){p.classList.remove(t(`button-${d}`)),d=u,p.classList.add(t(`button-${d}`))},setIcon(u,b){n=u,b&&(l=b),m()},setDisabled(u){s=u,p.disabled=u},setOnClick(u){a=u},destroy(){p.removeEventListener("click",v),p.remove()}})}var Lt=`
|
|
86
|
+
.linteau-button-group { display: inline-flex; border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-sm); overflow: hidden }
|
|
87
|
+
.linteau-button-group .linteau-button { border-radius: 0; border: none; border-right: 1px solid var(--linteau-border); background: transparent; color: var(--linteau-muted-foreground) }
|
|
88
|
+
.linteau-button-group .linteau-button:last-child { border-right: none }
|
|
89
|
+
.linteau-button-group .linteau-button:hover:not(:disabled) { background: var(--linteau-accent) }
|
|
90
|
+
.linteau-button-group .linteau-button-group-item-active { background: var(--linteau-primary); color: var(--linteau-primary-foreground) }
|
|
91
|
+
`;function Co(e){x("ButtonGroup"),g("button-group",Lt);let o=e.items,r=e.value,d=e.onChange,n=c("div",t("button-group"));n.setAttribute("role","group");function l(){n.replaceChildren();for(let a of o){let p=a.value===r,i=re(a.label,{icon:a.icon,variant:"ghost",onClick:()=>{r=a.value,l(),d?.(a.value)}});i.classList.toggle(t("button-group-item-active"),p),n.appendChild(i)}}return l(),h(n,{getValue(){return r},setValue(a){r=a,l()},setItems(a){o=a,l()},destroy(){n.remove()}})}var Tt=`
|
|
92
|
+
.linteau-checkbox-row { display: flex; align-items: center; gap: 8px }
|
|
93
|
+
.linteau-checkbox {
|
|
94
|
+
width: 18px;
|
|
95
|
+
height: 18px;
|
|
96
|
+
border-radius: var(--linteau-radius-sm);
|
|
97
|
+
border: 1px solid var(--linteau-border);
|
|
98
|
+
background: var(--linteau-secondary);
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
color: var(--linteau-primary-foreground);
|
|
104
|
+
}
|
|
105
|
+
.linteau-checkbox:disabled { opacity: 0.5; cursor: not-allowed }
|
|
106
|
+
.linteau-checkbox.linteau-checked { background: var(--linteau-primary); border-color: var(--linteau-primary) }
|
|
107
|
+
.linteau-checkbox svg { display: none }
|
|
108
|
+
.linteau-checkbox.linteau-checked svg, .linteau-checkbox.linteau-indeterminate svg { display: block }
|
|
109
|
+
`;function Eo(e){x("Checkbox"),g("checkbox",Tt);let o=e.checked??e.defaultChecked??!1,r=e.indeterminate??!1,d=e.disabled??!1,n=e.onChange,l=c("div",t("checkbox-row")),s=c("button",t("checkbox"));s.type="button",s.setAttribute("role","checkbox"),s.disabled=d;let a=y(D.check,12),p=y(D.minus,12);s.append(a,p);let i=document.createElement("span");i.textContent=e.label;function m(){s.classList.toggle(t("checked"),o),s.classList.toggle(t("indeterminate"),r&&!o),s.setAttribute("aria-checked",r?"mixed":String(o)),a.style.display=o?"block":"none",p.style.display=!o&&r?"block":"none"}m();let v=()=>{d||(o=!o,r=!1,m(),n?.(o))};return s.addEventListener("click",v),l.append(s,i),h(l,{getValue(){return o},setValue(u){o=u,r=!1,m()},setIndeterminate(u){r=u,m()},setDisabled(u){d=u,s.disabled=u},destroy(){s.removeEventListener("click",v),l.remove()}})}function q(e,o){if(!j())return()=>{};let r=Array.isArray(e)?e:[e],d=n=>{let l=n.target;r.some(s=>s.contains(l))||o()};return document.addEventListener("mousedown",d,!0),()=>document.removeEventListener("mousedown",d,!0)}function $(e){if(!j())return()=>{};let o=r=>{r.key==="Escape"&&e()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)}function ie(){if(!j())return()=>{};let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}function Y(e,o,r="bottom",d=6){if(!j())return;let n=e.getBoundingClientRect(),l=o.getBoundingClientRect(),s=0,a=0;r==="bottom"?(s=n.bottom+d,a=n.left):r==="top"?(s=n.top-l.height-d,a=n.left):r==="left"?(s=n.top,a=n.left-l.width-d):(s=n.top,a=n.right+d);let p=window.innerWidth-l.width-8,i=window.innerHeight-l.height-8;o.style.position="fixed",o.style.top=`${Math.max(8,Math.min(s,i))}px`,o.style.left=`${Math.max(8,Math.min(a,p))}px`}var Dt=`
|
|
110
|
+
.linteau-command-overlay { position: fixed; inset: 0; background: color-mix(in oklch, black 60%, transparent); display: flex; align-items: flex-start; justify-content: center; padding-top: 15vh; z-index: 1500; backdrop-filter: blur(4px) }
|
|
111
|
+
.linteau-command-panel { width: min(560px, 92vw); max-height: 60vh; display: flex; flex-direction: column; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); overflow: hidden }
|
|
112
|
+
.linteau-command-input-wrap { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--linteau-border) }
|
|
113
|
+
.linteau-command-input { flex: 1; background: transparent; border: none; outline: none; color: var(--linteau-foreground); font-size: 14px; font-family: inherit }
|
|
114
|
+
.linteau-command-list { overflow-y: auto; padding: 6px; flex: 1 }
|
|
115
|
+
.linteau-command-group-heading { padding: 6px 8px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--linteau-muted-foreground) }
|
|
116
|
+
.linteau-command-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: var(--linteau-radius-sm); font-size: 13px; color: var(--linteau-foreground); cursor: pointer }
|
|
117
|
+
.linteau-command-item-highlighted { background: var(--linteau-accent) }
|
|
118
|
+
.linteau-command-item-disabled { opacity: 0.5; cursor: not-allowed }
|
|
119
|
+
.linteau-command-empty { padding: 24px; text-align: center; font-size: 12px; color: var(--linteau-muted-foreground) }
|
|
120
|
+
`;function wo(e={}){x("Command"),g("command",Dt);let o=e.groups??[],r=e.closeOnSelect??!0,d=e.onSelect,n="",l=0,s=!1,a=null,p=null,i=c("div",E(t("command-overlay"),t("hidden"))),m=c("div",t("command-panel"));m.setAttribute("role","dialog"),m.setAttribute("aria-modal","true");let v=c("div",t("command-input-wrap")),f=y(D.search,14,{className:t("icon")});f&&v.appendChild(f);let u=c("input",t("command-input"));u.type="text",u.placeholder=e.placeholder??"Type a command or search...",v.appendChild(u);let b=c("div",t("command-list"));m.append(v,b),i.appendChild(m);function w(){let T=n.trim().toLowerCase(),A=o.flatMap(H=>H.items);return T?A.filter(H=>H.label.toLowerCase().includes(T)||H.keywords?.some(K=>K.toLowerCase().includes(T))):A}function k(){b.replaceChildren();let T=n.trim().toLowerCase();if(w().length===0){let K=c("div",t("command-empty"));K.textContent=e.emptyText??"No results found.",b.appendChild(K);return}let H=0;for(let K of o){let de=K.items.filter(V=>!T||V.label.toLowerCase().includes(T)||V.keywords?.some(Q=>Q.toLowerCase().includes(T)));if(de.length!==0){if(K.heading){let V=c("div",t("command-group-heading"));V.textContent=K.heading,b.appendChild(V)}for(let V of de){let Q=H++,ee=c("div",E(t("command-item"),Q===l&&t("command-item-highlighted"),V.disabled&&t("command-item-disabled")));V.icon&&ee.appendChild(y(V.icon,14,{className:t("icon")}));let _=document.createElement("span");_.textContent=V.label,ee.appendChild(_),ee.addEventListener("mousedown",ne=>{ne.preventDefault(),S(V)}),ee.addEventListener("mouseenter",()=>{l=Q,k()}),b.appendChild(ee)}}}}function S(T){T.disabled||(d?.(T.value),r&&P())}function I(T){let A=w();if(T.key==="ArrowDown")T.preventDefault(),l=Math.min(l+1,A.length-1),k();else if(T.key==="ArrowUp")T.preventDefault(),l=Math.max(l-1,0),k();else if(T.key==="Enter"){T.preventDefault();let H=A[l];H&&S(H)}}let G=()=>{n=u.value,l=0,k()};u.addEventListener("input",G),u.addEventListener("keydown",I);let M=T=>{T.target===i&&P()};i.addEventListener("mousedown",M);function O(){s||(s=!0,n="",l=0,u.value="",i.classList.remove(t("hidden")),k(),a=ie(),p=$(P),u.focus())}function P(){s&&(s=!1,i.classList.add(t("hidden")),a?.(),a=null,p?.(),p=null)}function te(){s?P():O()}return h(i,{open:O,close:P,toggle:te,isOpen(){return s},setGroups(T){o=T,k()},destroy(){u.removeEventListener("input",G),u.removeEventListener("keydown",I),i.removeEventListener("mousedown",M),a?.(),p?.(),i.remove()}})}var It=`
|
|
121
|
+
.linteau-list { display: flex; flex-direction: column; gap: 2px; width: 100% }
|
|
122
|
+
.linteau-list-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--linteau-radius-sm); cursor: pointer }
|
|
123
|
+
.linteau-list-item:hover { background: var(--linteau-accent) }
|
|
124
|
+
.linteau-list-item-selected { background: var(--linteau-accent) }
|
|
125
|
+
.linteau-list-item-text { display: flex; flex-direction: column }
|
|
126
|
+
.linteau-list-item-label { font-size: 13px; color: var(--linteau-foreground) }
|
|
127
|
+
.linteau-list-item-description { font-size: 11px; color: var(--linteau-muted-foreground) }
|
|
128
|
+
`;function ko(e){x("List"),g("list",It);let o=e.items,r=e.selectable??!0,d=e.value,n=e.onChange,l=[],s=c("div",t("list"));function a(){s.replaceChildren(),l.splice(0).forEach(i=>i());for(let i of o){let m=c("div",E(t("list-item"),r&&i.value===d&&t("list-item-selected")));i.icon&&m.appendChild(y(i.icon,16,{className:t("icon")}));let v=c("div",t("list-item-text")),f=c("div",t("list-item-label"));if(f.textContent=i.label,v.appendChild(f),i.description){let u=c("div",t("list-item-description"));u.textContent=i.description,v.appendChild(u)}if(m.appendChild(v),r){let u=()=>{d=i.value,a(),n?.(i.value)};m.addEventListener("click",u),l.push(()=>m.removeEventListener("click",u))}s.appendChild(m)}}return a(),h(s,{getValue(){return d},setValue(i){d=i,a()},setItems(i){o=i,a()},destroy(){l.splice(0).forEach(i=>i()),s.remove()}})}var St=`
|
|
129
|
+
.linteau-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg) }
|
|
130
|
+
.linteau-table { width: 100%; border-collapse: collapse; font-size: 12px }
|
|
131
|
+
.linteau-table th { text-align: left; padding: 10px 12px; background: var(--linteau-muted); color: var(--linteau-muted-foreground); font-weight: 600; border-bottom: 1px solid var(--linteau-border); cursor: default; white-space: nowrap }
|
|
132
|
+
.linteau-table th.linteau-table-sortable { cursor: pointer; user-select: none }
|
|
133
|
+
.linteau-table td { padding: 10px 12px; border-bottom: 1px solid var(--linteau-border); color: var(--linteau-foreground) }
|
|
134
|
+
.linteau-table tr:last-child td { border-bottom: none }
|
|
135
|
+
.linteau-table-sort-icon { display: inline-block; margin-left: 4px; vertical-align: middle }
|
|
136
|
+
`;function Lo(e){x("Table"),g("table",St);let o=e.rows,r=null,d="asc",n=[],l=c("div",t("table-wrap")),s=c("table",t("table")),a=document.createElement("thead"),p=document.createElement("tbody");function i(){a.replaceChildren(),n.splice(0).forEach(u=>u());let f=document.createElement("tr");for(let u of e.columns){let b=document.createElement("th");if(b.className=E(t("table-sortable-cell"),u.sortable&&t("table-sortable")),b.textContent=u.header,u.sortable){if(r===u.key){let k=y(d==="asc"?D.chevronUp:D.chevronDown,12,{className:t("table-sort-icon")});k&&b.appendChild(k)}let w=()=>{d=r===u.key&&d==="asc"?"desc":"asc",r=u.key,i(),e.onSortChange?.(u.key,d)};b.addEventListener("click",w),n.push(()=>b.removeEventListener("click",w))}f.appendChild(b)}a.appendChild(f)}function m(){p.replaceChildren();for(let f of o){let u=document.createElement("tr");for(let b of e.columns){let w=document.createElement("td"),k=b.render?b.render(f):String(f[b.key]??"");k instanceof HTMLElement?w.appendChild(k):w.textContent=k,u.appendChild(w)}p.appendChild(u)}}return i(),m(),s.append(a,p),l.appendChild(s),h(l,{setRows(f){o=f,m()},destroy(){n.splice(0).forEach(f=>f()),l.remove()}})}var At=`
|
|
137
|
+
.linteau-tree { display: flex; flex-direction: column; gap: 2px }
|
|
138
|
+
.linteau-tree-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: var(--linteau-radius-sm); cursor: pointer; font-size: 12px }
|
|
139
|
+
.linteau-tree-row:hover { background: var(--linteau-accent) }
|
|
140
|
+
.linteau-tree-chevron { transition: transform 150ms ease }
|
|
141
|
+
.linteau-tree-chevron.linteau-open { transform: rotate(90deg) }
|
|
142
|
+
.linteau-tree-children { margin-left: 18px; display: flex; flex-direction: column; gap: 2px }
|
|
143
|
+
.linteau-tree-children.linteau-collapsed { display: none }
|
|
144
|
+
`;function To(e){x("Tree"),g("tree",At);let o=new Set(e.defaultExpanded??[]),r=[],d=[],n=c("div",t("tree"));function l(i){for(let m of i)m.children?.length&&(d.push(m.value),l(m.children))}l(e.nodes);function s(i,m){let v=!!i.children?.length,f=o.has(i.value),u=c("div",t("tree-row"));if(v){let S=y(D.chevronRight,12,{className:E(t("tree-chevron"),f&&t("open"))});S&&u.appendChild(S)}i.icon&&u.appendChild(y(i.icon,14,{className:t("icon")}));let b=document.createElement("span");b.textContent=i.label,u.appendChild(b);let w=v?c("div",E(t("tree-children"),!f&&t("collapsed"))):null,k=()=>{v&&(o.has(i.value)?o.delete(i.value):o.add(i.value),a()),e.onSelect?.(i.value)};if(u.addEventListener("click",k),r.push(()=>u.removeEventListener("click",k)),m.appendChild(u),w){for(let S of i.children??[])s(S,w);m.appendChild(w)}}function a(){n.replaceChildren(),r.splice(0).forEach(i=>i());for(let i of e.nodes)s(i,n)}return a(),h(n,{expandAll(){d.forEach(i=>o.add(i)),a()},collapseAll(){o.clear(),a()},destroy(){r.splice(0).forEach(i=>i()),n.remove()}})}var Mt=`
|
|
145
|
+
.linteau-alert { display: flex; gap: 10px; padding: 12px; border-radius: var(--linteau-radius-lg); border: 1px solid var(--linteau-border); background: var(--linteau-muted) }
|
|
146
|
+
.linteau-alert-success { border-color: var(--linteau-success) }
|
|
147
|
+
.linteau-alert-warning { border-color: var(--linteau-warning) }
|
|
148
|
+
.linteau-alert-destructive { border-color: var(--linteau-destructive) }
|
|
149
|
+
.linteau-alert-body { flex: 1 }
|
|
150
|
+
.linteau-alert-title { font-size: 13px; font-weight: 600; margin-bottom: 2px }
|
|
151
|
+
.linteau-alert-description { font-size: 12px; color: var(--linteau-muted-foreground) }
|
|
152
|
+
.linteau-alert-close { background: transparent; border: none; color: var(--linteau-muted-foreground); cursor: pointer; display: flex; align-self: flex-start }
|
|
153
|
+
`,Do={default:D.info,success:D.check,warning:D.alertTriangle,destructive:D.alertTriangle};function Io(e,o={}){x("Alert"),g("alert",Mt);let r=o.variant??"default",d=c("div",E(t("alert"),t(`alert-${r}`))),n=y(o.icon??Do[r],18,{className:t("icon")});n&&d.appendChild(n);let l=c("div",t("alert-body"));if(o.title){let i=c("div",t("alert-title"));i.textContent=o.title,l.appendChild(i)}let s=c("div",t("alert-description"));s.textContent=e,l.appendChild(s),d.appendChild(l);let a=null;if(o.dismissible){let i=c("button",t("alert-close"));i.type="button";let m=y(D.x,14);m&&i.appendChild(m),a=()=>{o.onDismiss?.(),d.remove()},i.addEventListener("click",a),d.appendChild(i)}return h(d,{setDescription(i){s.textContent=i},destroy(){d.remove()}})}var Ot=`
|
|
154
|
+
.linteau-progress-overlay { position: fixed; inset: 0; background: color-mix(in oklch, black 55%, transparent); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px) }
|
|
155
|
+
.linteau-progress-card { width: 280px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); padding: 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) }
|
|
156
|
+
.linteau-progress-title { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--linteau-foreground) }
|
|
157
|
+
.linteau-progress-track { width: 100%; height: 8px; border-radius: 999px; background: var(--linteau-secondary); overflow: hidden; position: relative }
|
|
158
|
+
.linteau-progress-fill { height: 100%; width: 0%; background: var(--linteau-primary); border-radius: 999px; transition: width 180ms ease }
|
|
159
|
+
.linteau-progress-fill.linteau-indeterminate { width: 40% !important; animation: linteau-progress-slide 1.1s ease-in-out infinite }
|
|
160
|
+
@keyframes linteau-progress-slide { 0% { transform: translateX(-100%) } 100% { transform: translateX(250%) } }
|
|
161
|
+
.linteau-progress-percent { margin-top: 8px; font-size: 12px; color: var(--linteau-muted-foreground); text-align: right; font-variant-numeric: tabular-nums }
|
|
162
|
+
`;function So(e={}){x("ProgressBar"),g("progress-bar",Ot);let{title:o="",value:r=0,indeterminate:d=!1,visible:n=!1}=e,l=c("div",E(t("progress-overlay"),!n&&t("hidden"))),s=c("div",t("progress-card")),a=c("div",t("progress-title"));a.textContent=o;let p=c("div",t("progress-track")),i=c("div",E(t("progress-fill"),d&&t("indeterminate")));p.appendChild(i);let m=c("div",t("progress-percent"));return m.textContent=d?"Working...":`${Math.round(r)}%`,s.append(a,p,m),l.appendChild(s),i.style.width=`${Math.max(0,Math.min(100,r))}%`,h(l,{setValue(f,u){let b=Math.max(0,Math.min(100,f));i.classList.remove(t("indeterminate")),i.style.width=`${b}%`,m.textContent=u??`${Math.round(b)}%`},setIndeterminate(f){i.classList.toggle(t("indeterminate"),f),f&&(m.textContent="Working...")},setTitle(f){a.textContent=f},show(){l.classList.remove(t("hidden"))},hide(){l.classList.add(t("hidden"))},destroy(){l.remove()}})}var Vt=`
|
|
163
|
+
.linteau-skeleton { background: linear-gradient(90deg, var(--linteau-secondary) 25%, var(--linteau-accent) 37%, var(--linteau-secondary) 63%); background-size: 400% 100%; animation: linteau-skeleton-shine 1.4s ease infinite; border-radius: var(--linteau-radius-sm) }
|
|
164
|
+
@keyframes linteau-skeleton-shine { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }
|
|
165
|
+
`;function Ao(e={}){x("Skeleton"),g("skeleton",Vt);let o=c("div",t("skeleton"));return o.style.width=typeof e.width=="number"?`${e.width}px`:e.width??"100%",o.style.height=typeof e.height=="number"?`${e.height}px`:e.height??"1em",e.radius&&(o.style.borderRadius=e.radius),h(o,{destroy(){o.remove()}})}var Bt=`
|
|
166
|
+
.linteau-spinner { animation: linteau-spin 0.8s linear infinite; color: var(--linteau-muted-foreground) }
|
|
167
|
+
@keyframes linteau-spin { to { transform: rotate(360deg) } }
|
|
168
|
+
`;function Mo(e={}){x("Spinner"),g("spinner",Bt);let o=e.size??16,r=y(D.loader,o,{className:t("spinner"),color:e.color});return h(r,{setSize(n){r.setAttribute("width",String(n)),r.setAttribute("height",String(n))},destroy(){r.remove()}})}var zt=`
|
|
169
|
+
.linteau-toast-viewport { position: fixed; bottom: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 1400; width: min(340px, 92vw) }
|
|
170
|
+
.linteau-toast { display: flex; gap: 8px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-left: 3px solid var(--linteau-primary); border-radius: var(--linteau-radius-md); padding: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) }
|
|
171
|
+
.linteau-toast-success { border-left-color: var(--linteau-success) }
|
|
172
|
+
.linteau-toast-warning { border-left-color: var(--linteau-warning) }
|
|
173
|
+
.linteau-toast-destructive { border-left-color: var(--linteau-destructive) }
|
|
174
|
+
.linteau-toast-body { flex: 1 }
|
|
175
|
+
.linteau-toast-title { font-size: 12px; font-weight: 600 }
|
|
176
|
+
.linteau-toast-description { font-size: 12px; color: var(--linteau-muted-foreground); margin-top: 2px }
|
|
177
|
+
.linteau-toast-close { background: transparent; border: none; color: var(--linteau-muted-foreground); cursor: pointer; display: flex; align-self: flex-start }
|
|
178
|
+
`,Oo=0;function Ht(){x("ToastManager"),g("toast",zt);let e=null,o=new Map;function r(){return e||(e=c("div",t("toast-viewport")),document.body.appendChild(e)),e}function d(l){let s=o.get(l);s&&clearTimeout(s),o.delete(l),document.getElementById(l)?.remove()}function n(l){let s=`linteau-toast-${++Oo}`,a=l.variant??"default",p=l.duration??4e3,i=c("div",E(t("toast"),t(`toast-${a}`)));i.id=s;let m=c("div",t("toast-body"));if(l.title){let u=c("div",t("toast-title"));u.textContent=l.title,m.appendChild(u)}if(l.description){let u=c("div",t("toast-description"));u.textContent=l.description,m.appendChild(u)}let v=c("button",t("toast-close"));v.type="button";let f=y(D.x,14);return f&&v.appendChild(f),v.addEventListener("click",()=>d(s)),i.append(m,v),r().appendChild(i),p>0&&o.set(s,setTimeout(()=>d(s),p)),s}return{show:n,dismiss:d,clear(){o.forEach(l=>clearTimeout(l)),o.clear(),e?.replaceChildren()},destroy(){o.forEach(l=>clearTimeout(l)),o.clear(),e?.remove(),e=null}}}var Vo=Ht();var B=`
|
|
179
|
+
.linteau-field { display: flex; flex-direction: column; gap: 6px; width: 100% }
|
|
180
|
+
.linteau-field-row { display: flex; align-items: center; justify-content: space-between }
|
|
181
|
+
.linteau-field-label { display: flex; align-items: center; gap: 6px; color: var(--linteau-foreground) }
|
|
182
|
+
.linteau-field-value { color: var(--linteau-muted-foreground); font-variant-numeric: tabular-nums }
|
|
183
|
+
.linteau-field-header { display: flex; justify-content: space-between; align-items: center; font-size: 12px }
|
|
184
|
+
`;var Ft=`
|
|
185
|
+
.linteau-swatch { --linteau-swatch-color: #ffffff; width: 28px; height: 28px; border-radius: var(--linteau-radius-sm); background: var(--linteau-swatch-color); border: 1px solid var(--linteau-border); cursor: pointer; display: block; position: relative; overflow: hidden; transition: transform 120ms ease }
|
|
186
|
+
.linteau-swatch:hover { transform: scale(1.06) }
|
|
187
|
+
.linteau-swatch input[type='color'] { position: absolute; inset: 0; opacity: 0; cursor: pointer }
|
|
188
|
+
`;function Bo(e){x("ColorField"),g("field-base",B),g("swatch",Ft);let o=e.value??e.defaultValue??"#ffffff",r=e.onChange,d=c("div",t("field-row")),n=c("div",t("field-label"));e.icon&&n.appendChild(y(e.icon,14,{className:t("icon")}));let l=document.createElement("span");l.textContent=e.label,n.appendChild(l);let s=c("label",t("swatch"));s.style.setProperty("--linteau-swatch-color",o);let a=c("input",void 0);a.type="color",a.value=o,a.disabled=e.disabled??!1;let p=()=>{o=a.value,s.style.setProperty("--linteau-swatch-color",o),r?.(o)};return a.addEventListener("input",p),s.appendChild(a),d.append(n,s),h(d,{getValue(){return o},setValue(m){o=m,a.value=m,s.style.setProperty("--linteau-swatch-color",m)},setDisabled(m){a.disabled=m},destroy(){a.removeEventListener("input",p),d.remove()}})}var Z=`
|
|
189
|
+
.linteau-text-input, .linteau-textarea {
|
|
190
|
+
width: 100%;
|
|
191
|
+
background: var(--linteau-secondary);
|
|
192
|
+
color: var(--linteau-foreground);
|
|
193
|
+
border: 1px solid var(--linteau-border);
|
|
194
|
+
border-radius: var(--linteau-radius-sm);
|
|
195
|
+
padding: 8px 10px;
|
|
196
|
+
font-size: 12px;
|
|
197
|
+
font-family: inherit;
|
|
198
|
+
transition: border-color 120ms ease;
|
|
199
|
+
}
|
|
200
|
+
.linteau-text-input:focus, .linteau-textarea:focus {
|
|
201
|
+
outline: none;
|
|
202
|
+
border-color: var(--linteau-ring);
|
|
203
|
+
box-shadow: 0 0 0 2px color-mix(in oklch, var(--linteau-ring) 20%, transparent);
|
|
204
|
+
}
|
|
205
|
+
.linteau-text-input:disabled, .linteau-textarea:disabled { opacity: 0.5; cursor: not-allowed }
|
|
206
|
+
.linteau-textarea { resize: vertical; min-height: 72px }
|
|
207
|
+
`;function zo(e={}){x("NumberField"),g("field-base",B),g("text-input",Z);let o=e.onChange,r=c("div",t("field"));if(e.label){let a=c("div",t("field-header")),p=c("div",t("field-label"));e.icon&&p.appendChild(y(e.icon,14,{className:t("icon")}));let i=document.createElement("span");i.textContent=e.label,p.appendChild(i),a.appendChild(p),r.appendChild(a)}let d=c("input",t("text-input"));d.type="number",e.min!==void 0&&(d.min=String(e.min)),e.max!==void 0&&(d.max=String(e.max)),d.step=String(e.step??1),d.value=String(e.value??e.defaultValue??0),d.disabled=e.disabled??!1;function n(a){let p=a;return e.min!==void 0&&(p=Math.max(e.min,p)),e.max!==void 0&&(p=Math.min(e.max,p)),p}let l=()=>{let a=Number(d.value);Number.isNaN(a)||o?.(a)};return d.addEventListener("input",l),r.appendChild(d),h(r,{getValue(){return Number(d.value)},setValue(a){d.value=String(n(a))},setDisabled(a){d.disabled=a},destroy(){d.removeEventListener("input",l),r.remove()}})}function Ho(e={}){x("TextArea"),g("field-base",B),g("text-input",Z);let o=e.onChange,r=c("div",t("field"));if(e.label){let s=c("div",t("field-header")),a=c("div",t("field-label"));e.icon&&a.appendChild(y(e.icon,14,{className:t("icon")}));let p=document.createElement("span");p.textContent=e.label,a.appendChild(p),s.appendChild(a),r.appendChild(s)}let d=c("textarea",t("textarea"));d.placeholder=e.placeholder??"",d.rows=e.rows??3,d.value=e.value??e.defaultValue??"",d.disabled=e.disabled??!1;let n=()=>o?.(d.value);return d.addEventListener("input",n),r.appendChild(d),h(r,{getValue(){return d.value},setValue(s){d.value=s},setDisabled(s){d.disabled=s},destroy(){d.removeEventListener("input",n),r.remove()}})}function Fo(e={}){x("TextField"),g("field-base",B),g("text-input",Z);let o=e.onChange,r=c("div",t("field"));if(e.label){let a=c("div",t("field-header")),p=c("div",t("field-label"));e.icon&&p.appendChild(y(e.icon,14,{className:t("icon")}));let i=document.createElement("span");i.textContent=e.label,p.appendChild(i),a.appendChild(p),r.appendChild(a)}let d=c("input",t("text-input"));d.type=e.type??"text",d.placeholder=e.placeholder??"",d.value=e.value??e.defaultValue??"",d.disabled=e.disabled??!1;let n=()=>o?.(d.value),l=a=>{a.key==="Enter"&&e.onEnter?.(d.value)};return d.addEventListener("input",n),d.addEventListener("keydown",l),r.appendChild(d),h(r,{getValue(){return d.value},setValue(a){d.value=a},setDisabled(a){d.disabled=a},focus(){d.focus()},destroy(){d.removeEventListener("input",n),d.removeEventListener("keydown",l),r.remove()}})}function X(e,o){e.replaceChildren(),o instanceof HTMLElement?e.appendChild(o):e.textContent=o}var Rt=`
|
|
208
|
+
.linteau-hover-card { position: fixed; z-index: 1200; width: 280px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-md); padding: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); font-size: 12px; color: var(--linteau-foreground) }
|
|
209
|
+
`;function Ro(e){x("HoverCard"),g("hover-card",Rt);let{anchor:o,placement:r="bottom"}=e,d=e.openDelay??300,n=e.closeDelay??150,l=null,s=null,a=!1,p=c("div",E(t("hover-card"),t("hidden")));X(p,e.content);function i(){l&&clearTimeout(l),s&&clearTimeout(s),l=null,s=null}function m(){i(),!a&&(a=!0,document.body.appendChild(p),p.classList.remove(t("hidden")),Y(o,p,r))}function v(){i(),a&&(a=!1,p.classList.add(t("hidden")),p.remove())}function f(){s&&clearTimeout(s),s=null,!(a||l)&&(l=setTimeout(m,d))}function u(){l&&clearTimeout(l),l=null,!(!a||s)&&(s=setTimeout(v,n))}return o.addEventListener("mouseenter",f),o.addEventListener("mouseleave",u),o.addEventListener("focus",f),o.addEventListener("blur",u),p.addEventListener("mouseenter",()=>{s&&clearTimeout(s),s=null}),p.addEventListener("mouseleave",u),{setContent(b){X(p,b)},open:m,close:v,destroy(){i(),o.removeEventListener("mouseenter",f),o.removeEventListener("mouseleave",u),o.removeEventListener("focus",f),o.removeEventListener("blur",u),p.remove()}}}var Pt=`
|
|
210
|
+
.linteau-chip-field { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: var(--linteau-secondary); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-sm) }
|
|
211
|
+
.linteau-chip-field:focus-within { border-color: var(--linteau-ring) }
|
|
212
|
+
.linteau-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--linteau-accent); color: var(--linteau-accent-foreground); border-radius: 999px; padding: 3px 8px; font-size: 11px }
|
|
213
|
+
.linteau-chip-remove { background: transparent; border: none; color: inherit; cursor: pointer; display: flex; padding: 0 }
|
|
214
|
+
.linteau-chip-input { flex: 1; min-width: 80px; background: transparent; border: none; color: var(--linteau-foreground); font-size: 12px; font-family: inherit; outline: none }
|
|
215
|
+
`;function Po(e={}){x("ChipInput"),g("field-base",B),g("chip-input",Pt);let o=e.value??e.defaultValue??[],r=e.onChange,d=[],n=c("div",t("field"));if(e.label){let m=c("div",t("field-header")),v=c("div",t("field-label"));e.icon&&v.appendChild(y(e.icon,14,{className:t("icon")}));let f=document.createElement("span");f.textContent=e.label,v.appendChild(f),m.appendChild(v),n.appendChild(m)}let l=c("div",t("chip-field")),s=c("input",t("chip-input"));s.type="text",s.placeholder=e.placeholder??"",l.appendChild(s);function a(){Array.from(l.children).forEach(m=>{m!==s&&m.remove()}),d.splice(0).forEach(m=>m()),o.forEach((m,v)=>{let f=c("span",t("chip")),u=document.createElement("span");u.textContent=m;let b=c("button",t("chip-remove"));b.type="button";let w=y(D.x,10);w&&b.appendChild(w);let k=()=>{o=o.filter((S,I)=>I!==v),a(),r?.(o)};b.addEventListener("click",k),d.push(()=>b.removeEventListener("click",k)),f.append(u,b),l.insertBefore(f,s)})}a();let p=m=>{m.key==="Enter"&&s.value.trim()?(m.preventDefault(),o=[...o,s.value.trim()],s.value="",a(),r?.(o)):m.key==="Backspace"&&!s.value&&o.length>0&&(o=o.slice(0,-1),a(),r?.(o))};return s.addEventListener("keydown",p),n.appendChild(l),h(n,{getValue(){return o},setValue(m){o=m,a()},destroy(){s.removeEventListener("keydown",p),d.splice(0).forEach(m=>m()),n.remove()}})}var fe=`
|
|
216
|
+
.linteau-combobox { position: relative; display: flex; align-items: center }
|
|
217
|
+
.linteau-combobox-input { padding-right: 28px }
|
|
218
|
+
.linteau-combobox-chevron { position: absolute; right: 8px; pointer-events: none; color: var(--linteau-muted-foreground) }
|
|
219
|
+
.linteau-combobox-list { position: fixed; z-index: 1200; min-width: 180px; max-height: 220px; overflow-y: auto; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-md); padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) }
|
|
220
|
+
.linteau-combobox-option { padding: 6px 8px; border-radius: var(--linteau-radius-sm); font-size: 12px; cursor: pointer; color: var(--linteau-foreground) }
|
|
221
|
+
.linteau-combobox-option-highlighted, .linteau-combobox-option:hover { background: var(--linteau-accent) }
|
|
222
|
+
`;function No(e){x("Combobox"),g("field-base",B),g("text-input",Z),g("combobox",fe);let o=e.options,r=e.value??e.defaultValue??"",d=o.find(T=>T.value===r)?.label??"",n=!1,l=0,s=null,a=e.onChange,p=c("div",t("field")),i=c("div",t("field-header")),m=c("div",t("field-label"));e.icon&&m.appendChild(y(e.icon,14,{className:t("icon")}));let v=document.createElement("span");v.textContent=e.label,m.appendChild(v),i.appendChild(m);let f=c("div",t("combobox")),u=c("input",E(t("text-input"),t("combobox-input")));u.type="text",u.placeholder=e.placeholder??"",u.value=d,u.disabled=e.disabled??!1;let b=y(D.chevronDown,12,{className:t("combobox-chevron")}),w=c("div",E(t("combobox-list"),t("hidden")));function k(){let T=d.trim().toLowerCase();return T?o.filter(A=>A.label.toLowerCase().includes(T)):o}function S(){w.replaceChildren(),k().forEach((T,A)=>{let H=c("div",E(t("combobox-option"),A===l&&t("combobox-option-highlighted")));H.textContent=T.label,H.addEventListener("mousedown",K=>{K.preventDefault(),I(T)}),w.appendChild(H)})}function I(T){r=T.value,d=T.label,u.value=d,M(),a?.(r)}function G(){n||u.disabled||(n=!0,l=0,document.body.appendChild(w),w.classList.remove(t("hidden")),S(),Y(f,w,"bottom"),s=q([f,w],M))}function M(){n&&(n=!1,w.classList.add(t("hidden")),w.remove(),s?.(),s=null)}let O=()=>{d=u.value,l=0,n?S():G()},P=T=>{let A=k();if(T.key==="ArrowDown")T.preventDefault(),l=Math.min(l+1,A.length-1),S();else if(T.key==="ArrowUp")T.preventDefault(),l=Math.max(l-1,0),S();else if(T.key==="Enter"){T.preventDefault();let H=A[l];H&&I(H)}else T.key==="Escape"&&M()},te=()=>G();return u.addEventListener("input",O),u.addEventListener("keydown",P),u.addEventListener("focus",te),f.append(u,b),p.append(i,f),h(p,{getValue(){return r},setValue(T){r=T,d=o.find(A=>A.value===T)?.label??"",u.value=d},setOptions(T){o=T,n&&S()},open:G,close:M,destroy(){u.removeEventListener("input",O),u.removeEventListener("keydown",P),u.removeEventListener("focus",te),s?.(),w.remove(),p.remove()}})}var Nt=`
|
|
223
|
+
.linteau-calendar { position: fixed; z-index: 1200; width: 280px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); padding: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) }
|
|
224
|
+
.linteau-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px }
|
|
225
|
+
.linteau-calendar-nav { background: transparent; border: none; color: var(--linteau-foreground); cursor: pointer; display: flex; padding: 4px; border-radius: var(--linteau-radius-sm) }
|
|
226
|
+
.linteau-calendar-nav:hover:not(:disabled) { background: var(--linteau-accent) }
|
|
227
|
+
.linteau-calendar-nav:disabled { opacity: 0.35; cursor: not-allowed }
|
|
228
|
+
.linteau-calendar-month { font-size: 12px; font-weight: 600 }
|
|
229
|
+
.linteau-calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 2px }
|
|
230
|
+
.linteau-calendar-weekday { height: 20px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: var(--linteau-muted-foreground); text-transform: uppercase }
|
|
231
|
+
.linteau-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px }
|
|
232
|
+
.linteau-calendar-day { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 11px; border-radius: var(--linteau-radius-sm); background: transparent; border: none; color: var(--linteau-foreground); cursor: pointer; font-family: inherit }
|
|
233
|
+
.linteau-calendar-day:hover:not(:disabled) { background: var(--linteau-accent) }
|
|
234
|
+
.linteau-calendar-day:disabled { opacity: 0.35; cursor: not-allowed }
|
|
235
|
+
.linteau-calendar-day:focus-visible { outline: 2px solid var(--linteau-ring); outline-offset: 1px }
|
|
236
|
+
.linteau-calendar-day-outside { opacity: 0.35 }
|
|
237
|
+
.linteau-calendar-day-selected { background: var(--linteau-primary); color: var(--linteau-primary-foreground) }
|
|
238
|
+
.linteau-calendar-day-today:not(.linteau-calendar-day-selected) { box-shadow: inset 0 0 0 1px var(--linteau-ring) }
|
|
239
|
+
.linteau-calendar-day-in-range { background: var(--linteau-accent); border-radius: 0 }
|
|
240
|
+
.linteau-calendar-day-range-start { background: var(--linteau-primary); color: var(--linteau-primary-foreground); border-radius: var(--linteau-radius-sm) 0 0 var(--linteau-radius-sm) }
|
|
241
|
+
.linteau-calendar-day-range-end { background: var(--linteau-primary); color: var(--linteau-primary-foreground); border-radius: 0 var(--linteau-radius-sm) var(--linteau-radius-sm) 0 }
|
|
242
|
+
.linteau-calendar-footer { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--linteau-border) }
|
|
243
|
+
.linteau-calendar-footer-button { flex: 1; padding: 6px 8px; font-size: 11px; border-radius: var(--linteau-radius-sm); border: 1px solid var(--linteau-border); background: transparent; color: var(--linteau-foreground); cursor: pointer; font-family: inherit }
|
|
244
|
+
.linteau-calendar-footer-button:hover { background: var(--linteau-accent) }
|
|
245
|
+
.linteau-combobox-input-clearable { padding-right: 46px }
|
|
246
|
+
.linteau-combobox-clear { position: absolute; right: 26px; color: var(--linteau-muted-foreground); background: transparent; border: none; cursor: pointer; display: flex; padding: 2px }
|
|
247
|
+
.linteau-combobox-clear:hover { color: var(--linteau-foreground) }
|
|
248
|
+
`;function ae(e,o){return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()}function ve(e){return new Date(e.getFullYear(),e.getMonth(),1)}function le(e,o){return new Date(e.getFullYear(),e.getMonth()+o,1)}function $o(e,o){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+o)}function ce(e){return!!e&&typeof e=="object"&&"from"in e}function Go(e){let o=new Date(2021,0,3),r=[];for(let d=0;d<7;d++){let n=new Date(o.getFullYear(),o.getMonth(),o.getDate()+d+e);r.push(n.toLocaleDateString(void 0,{weekday:"short"}).slice(0,2))}return r}function Ko(e,o){let r=e.getFullYear(),d=e.getMonth(),n=new Date(r,d,1),l=new Date(r,d+1,0),s=(n.getDay()-o+7)%7,a=(o+6-l.getDay()+7)%7,p=[];for(let i=s;i>0;i--)p.push({date:new Date(r,d,1-i),inCurrentMonth:!1});for(let i=1;i<=l.getDate();i++)p.push({date:new Date(r,d,i),inCurrentMonth:!0});for(let i=1;i<=a;i++)p.push({date:new Date(r,d+1,i),inCurrentMonth:!1});return p}function Wo(e={}){x("DatePicker"),g("field-base",B),g("text-input",Z),g("combobox",fe),g("calendar",Nt);let o=e.mode??"single",r=e.weekStartsOn??0,d=e.min,n=e.max,l=e.format??(L=>L.toLocaleDateString()),s=e.onChange,a=e.showTodayButton??!0,p=e.showClearButton??!0,i=e.value??e.defaultValue,m=null,v=(ce(i)?i.from:i)??new Date,f=v,u=!1,b=null,w=null,k=new Map;function S(L){return L?ce(L)?L.to?`${l(L.from)} - ${l(L.to)}`:l(L.from):l(L):""}function I(L){return!!(d&&L<d||n&&L>n)}let G=c("div",t("field"));if(e.label){let L=c("div",t("field-header")),F=c("div",t("field-label"));e.icon&&F.appendChild(y(e.icon,14,{className:t("icon")}));let J=document.createElement("span");J.textContent=e.label,F.appendChild(J),L.appendChild(F),G.appendChild(L)}let M=c("div",t("combobox")),O=c("input",E(t("text-input"),t("combobox-input")));O.type="text",O.readOnly=!0,O.value=S(i),O.placeholder=e.placeholder??(o==="range"?"Select a date range":"Select a date"),O.disabled=e.disabled??!1;let P=c("button",t("combobox-clear"));P.type="button";let te=y(D.x,12);te&&P.appendChild(te);let se=y(D.calendar,14,{className:t("combobox-chevron")});M.append(O,P,se),G.appendChild(M);function T(){let L=!!i;P.style.display=L&&p?"flex":"none",O.classList.toggle(t("combobox-input-clearable"),L&&p)}T();let A=c("div",E(t("calendar"),t("hidden")));A.setAttribute("role","application");function H(L){k.get(new Date(L.getFullYear(),L.getMonth(),L.getDate()).getTime())?.focus()}function K(L){if(!(o!=="range"||!m))for(let[F,J]of k){let W=new Date(F),ue=L?W>=m&&W<=L||W<=m&&W>=L:!1;J.classList.toggle(t("calendar-day-in-range"),ue&&!ae(W,m))}}function de(L){if(!I(L))if(o==="range")if(!m)m=L,i={from:L},O.value=S(i),V();else{let F=m<=L?m:L,J=m<=L?L:m;i={from:F,to:J},m=null,O.value=S(i),T(),s?.(i),_()}else i=L,O.value=S(i),T(),s?.(i),_()}function V(){A.replaceChildren(),k.clear();let L=c("div",t("calendar-header")),F=c("button",t("calendar-nav"));F.type="button",F.setAttribute("aria-label","Previous month");let J=y(D.chevronLeft,14);J&&F.appendChild(J),F.disabled=!!(d&&le(v,-1)<ve(d));let W=c("button",t("calendar-nav"));W.type="button",W.setAttribute("aria-label","Next month");let ue=y(D.chevronRight,14);ue&&W.appendChild(ue),W.disabled=!!(n&&le(v,1)>ve(n));let Te=c("div",t("calendar-month"));Te.textContent=v.toLocaleDateString(void 0,{month:"long",year:"numeric"}),F.addEventListener("click",()=>{v=le(v,-1),V()}),W.addEventListener("click",()=>{v=le(v,1),V()}),L.append(F,Te,W);let De=c("div",t("calendar-weekdays"));for(let z of Go(r)){let N=c("div",t("calendar-weekday"));N.textContent=z,De.appendChild(N)}let Ie=c("div",t("calendar-grid")),ao=new Date;for(let{date:z,inCurrentMonth:N}of Ko(v,r)){let R=c("button",t("calendar-day"));R.type="button",R.textContent=String(z.getDate()),R.disabled=I(z),R.tabIndex=ae(z,f)?0:-1,N||R.classList.add(t("calendar-day-outside")),ae(z,ao)&&R.classList.add(t("calendar-day-today"));let U=i;U&&!ce(U)&&ae(z,U)&&(R.classList.add(t("calendar-day-selected")),R.setAttribute("aria-selected","true")),U&&ce(U)&&(ae(z,U.from)&&R.classList.add(t("calendar-day-range-start"),t("calendar-day-selected")),U.to&&ae(z,U.to)&&R.classList.add(t("calendar-day-range-end"),t("calendar-day-selected")),U.to&&z>U.from&&z<U.to&&R.classList.add(t("calendar-day-in-range"))),R.addEventListener("click",()=>{f=z,de(z)}),R.addEventListener("mouseenter",()=>K(z)),k.set(new Date(z.getFullYear(),z.getMonth(),z.getDate()).getTime(),R),Ie.appendChild(R)}if(A.append(L,De,Ie),a||p){let z=c("div",t("calendar-footer"));if(a){let N=c("button",t("calendar-footer-button"));N.type="button",N.textContent="Today",N.addEventListener("click",()=>{v=ve(new Date),f=new Date,V(),H(f)}),z.appendChild(N)}if(p){let N=c("button",t("calendar-footer-button"));N.type="button",N.textContent="Clear",N.addEventListener("click",()=>{i=void 0,m=null,O.value="",T(),s?.(void 0),V()}),z.appendChild(N)}A.appendChild(z)}}function Q(L){let F={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};L.key in F?(L.preventDefault(),f=$o(f,F[L.key]),(f.getMonth()!==v.getMonth()||f.getFullYear()!==v.getFullYear())&&(v=ve(f)),V(),H(f)):L.key==="PageUp"?(L.preventDefault(),v=le(v,-1),V()):L.key==="PageDown"?(L.preventDefault(),v=le(v,1),V()):(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),de(f))}function ee(){u||O.disabled||(u=!0,v=(ce(i)?i.from:i)??v,f=v,document.body.appendChild(A),A.classList.remove(t("hidden")),V(),Y(M,A,"bottom"),A.addEventListener("keydown",Q),b=q([M,A],_),w=$(_))}function _(){u&&(u=!1,m=null,A.classList.add(t("hidden")),A.removeEventListener("keydown",Q),A.remove(),b?.(),b=null,w?.(),w=null)}let ne=()=>u?_():ee();return O.addEventListener("click",ne),se.addEventListener("click",ne),P.addEventListener("click",L=>{L.stopPropagation(),i=void 0,m=null,O.value="",T(),s?.(void 0),u&&V()}),h(G,{getValue(){return i},setValue(L){i=L,O.value=S(L),T()},open:ee,close:_,isOpen(){return u},destroy(){O.removeEventListener("click",ne),se.removeEventListener("click",ne),b?.(),w?.(),A.removeEventListener("keydown",Q),A.remove(),G.remove()}})}var $t=`
|
|
249
|
+
.linteau-dropzone { border: 1px dashed var(--linteau-border); border-radius: var(--linteau-radius-lg); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; color: var(--linteau-muted-foreground); transition: border-color 120ms ease, background 120ms ease }
|
|
250
|
+
.linteau-dropzone:hover, .linteau-dropzone-active { border-color: var(--linteau-ring); background: var(--linteau-accent) }
|
|
251
|
+
.linteau-dropzone-disabled { opacity: 0.5; cursor: not-allowed }
|
|
252
|
+
.linteau-dropzone-label { font-size: 12px }
|
|
253
|
+
`;function jo(e){x("FileDropzone"),g("dropzone",$t);let o=e.disabled??!1,r=c("div",E(t("dropzone"),o&&t("dropzone-disabled"))),d=y(D.upload,22,{className:t("icon")});d&&r.appendChild(d);let n=c("div",t("dropzone-label"));n.textContent=e.label??"Drop files here or click to browse",r.appendChild(n);let l=document.createElement("input");l.type="file",l.style.display="none",l.multiple=e.multiple??!1,e.accept&&(l.accept=e.accept),l.disabled=o;function s(u){!u||u.length===0||e.onFiles(Array.from(u))}let a=()=>{o||l.click()},p=()=>s(l.files),i=u=>{u.preventDefault(),o||r.classList.add(t("dropzone-active"))},m=()=>r.classList.remove(t("dropzone-active")),v=u=>{u.preventDefault(),r.classList.remove(t("dropzone-active")),o||s(u.dataTransfer?.files??null)};return r.addEventListener("click",a),r.addEventListener("dragover",i),r.addEventListener("dragleave",m),r.addEventListener("drop",v),l.addEventListener("change",p),r.appendChild(l),h(r,{reset(){l.value=""},destroy(){r.removeEventListener("click",a),r.removeEventListener("dragover",i),r.removeEventListener("dragleave",m),r.removeEventListener("drop",v),l.removeEventListener("change",p),r.remove()}})}var Gt=`
|
|
254
|
+
.linteau-card { border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); background: var(--linteau-card); color: var(--linteau-card-foreground); overflow: hidden }
|
|
255
|
+
.linteau-card-header { padding: 14px 16px; border-bottom: 1px solid var(--linteau-border); font-weight: 600 }
|
|
256
|
+
.linteau-card-body { padding: 16px }
|
|
257
|
+
.linteau-card-footer { padding: 12px 16px; border-top: 1px solid var(--linteau-border) }
|
|
258
|
+
`;function Yo(e={}){x("Card"),g("card",Gt);let o=c("div",t("card")),r=c("div",t("card-header")),d=c("div",t("card-body")),n=c("div",t("card-footer"));function l(p,i){p.replaceChildren(),i instanceof HTMLElement?p.appendChild(i):typeof i=="string"&&(p.textContent=i)}function s(p,i){p.style.display=i==null?"none":""}return l(r,e.header??null),l(n,e.footer??null),s(r,e.header??null),s(n,e.footer??null),o.append(r,d,n),h(o,{body:d,setHeader(p){l(r,p),s(r,p)},setFooter(p){l(n,p),s(n,p)},destroy(){o.remove()}})}var Kt=`
|
|
259
|
+
.linteau-section { border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); background: var(--linteau-muted); overflow: hidden; width: 100% }
|
|
260
|
+
.linteau-section-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--linteau-border); color: var(--linteau-muted-foreground); cursor: default }
|
|
261
|
+
.linteau-section-header.linteau-section-collapsible { cursor: pointer }
|
|
262
|
+
.linteau-section-header h3 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; flex: 1 }
|
|
263
|
+
.linteau-section-actions { display: flex; align-items: center; gap: 6px }
|
|
264
|
+
.linteau-section-body { padding: 12px; display: flex; flex-direction: column; gap: 12px }
|
|
265
|
+
.linteau-section-body.linteau-collapsed { display: none }
|
|
266
|
+
.linteau-section-chevron { transition: transform 150ms ease }
|
|
267
|
+
.linteau-section-chevron.linteau-collapsed { transform: rotate(-90deg) }
|
|
268
|
+
`;function Xo(e,o={}){x("Section"),g("section",Kt);let{icon:r,collapsible:d=!1,defaultCollapsed:n=!1,actions:l=[]}=o,s=n,a=c("div",t("section")),p=c("div",E(t("section-header"),d&&t("section-collapsible"))),i=document.createElement("h3");i.textContent=e;let m=c("div",E(t("section-body"),s&&t("collapsed"))),v=r?y(r,14,{className:t("icon")}):null,f=d?y(D.chevronDown,14,{className:E(t("icon"),t("section-chevron"),s&&t("collapsed"))}):null,u=c("div",t("section-actions"));u.append(...l),v&&p.appendChild(v),p.appendChild(i),l.length&&p.appendChild(u),f&&p.appendChild(f),a.append(p,m);function b(){m.classList.toggle(t("collapsed"),s),f?.classList.toggle(t("collapsed"),s)}let w=()=>{s=!s,b()};return d&&p.addEventListener("click",w),h(a,{header:p,body:m,setTitle(S){i.textContent=S},setCollapsed(S){s=S,b()},isCollapsed(){return s},destroy(){d&&p.removeEventListener("click",w),a.remove()}})}var Wt=`
|
|
269
|
+
.linteau-separator { background: var(--linteau-border); border: none; flex-shrink: 0 }
|
|
270
|
+
.linteau-separator-horizontal { width: 100%; height: 1px }
|
|
271
|
+
.linteau-separator-vertical { width: 1px; height: 100% }
|
|
272
|
+
`;function Uo(e={}){x("Separator"),g("separator",Wt);let o=e.orientation??"horizontal",r=c("hr",E(t("separator"),t(`separator-${o}`)));return r.setAttribute("role","separator"),h(r,{setOrientation(n){r.classList.remove(t(`separator-${o}`)),o=n,r.classList.add(t(`separator-${o}`))},destroy(){r.remove()}})}var jt=`
|
|
273
|
+
.linteau-mode-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); color: var(--linteau-foreground); cursor: pointer; text-align: left; font-family: inherit; transition: border-color 120ms ease, transform 120ms ease }
|
|
274
|
+
.linteau-mode-card:hover:not(.linteau-locked) { border-color: var(--linteau-ring); transform: translateY(-2px) }
|
|
275
|
+
.linteau-mode-card.linteau-selected { border-color: var(--linteau-primary); box-shadow: 0 0 0 1px var(--linteau-primary) }
|
|
276
|
+
.linteau-mode-card.linteau-locked { opacity: 0.45; cursor: not-allowed }
|
|
277
|
+
.linteau-mode-card-icon { color: var(--linteau-foreground) }
|
|
278
|
+
.linteau-mode-card-title { font-weight: 600; font-size: 13px }
|
|
279
|
+
.linteau-mode-card-description { font-size: 11px; color: var(--linteau-muted-foreground) }
|
|
280
|
+
`;function qo(e){x("ModeCard"),g("mode-card",jt);let o=e.locked??!1,r=e.selected??!1,d=e.lockedMessage??"Coming in the next update",n=c("button",t("mode-card"));n.type="button";let l=c("div",t("mode-card-icon")),s=c("div",t("mode-card-text")),a=c("div",t("mode-card-title"));a.textContent=e.label;let p=c("div",t("mode-card-description"));s.append(a,p);function i(){l.replaceChildren();let f=y(o?D.lock:e.icon,20,{className:t("icon")});f&&l.appendChild(f),p.textContent=o?d:e.description,n.classList.toggle(t("locked"),o),n.classList.toggle(t("selected"),r),n.disabled=o}i(),n.append(l,s);let m=()=>{o||e.onSelect?.()};return n.addEventListener("click",m),h(n,{isSelected(){return r},setSelected(f){r=f,i()},setLocked(f){o=f,i()},destroy(){n.removeEventListener("click",m),n.remove()}})}var Yt=`
|
|
281
|
+
.linteau-accordion { display: flex; flex-direction: column; gap: 8px; width: 100% }
|
|
282
|
+
.linteau-accordion-item { border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); overflow: hidden }
|
|
283
|
+
.linteau-accordion-header { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px; background: var(--linteau-muted); border: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--linteau-foreground); font-family: inherit }
|
|
284
|
+
.linteau-accordion-chevron { margin-left: auto; transition: transform 150ms ease }
|
|
285
|
+
.linteau-accordion-chevron.linteau-open { transform: rotate(180deg) }
|
|
286
|
+
.linteau-accordion-content { padding: 12px }
|
|
287
|
+
.linteau-accordion-content.linteau-collapsed { display: none }
|
|
288
|
+
`;function Zo(e){x("Accordion"),g("accordion",Yt);let o=e.multiple??!1,r=new Set(e.defaultOpen??[]),d=e.onChange,n=[],l=c("div",t("accordion"));function s(i,m){m?(o||r.clear(),r.add(i)):r.delete(i),a(),d?.(Array.from(r))}function a(){l.replaceChildren(),n.splice(0).forEach(i=>i());for(let i of e.items){let m=r.has(i.value),v=c("div",t("accordion-item")),f=c("button",t("accordion-header"));f.type="button",i.icon&&f.appendChild(y(i.icon,14,{className:t("icon")}));let u=document.createElement("span");u.textContent=i.label;let b=y(D.chevronDown,14,{className:E(t("accordion-chevron"),m&&t("open"))});f.append(u,b);let w=c("div",E(t("accordion-content"),!m&&t("collapsed")));w.appendChild(i.content);let k=()=>s(i.value,!m);f.addEventListener("click",k),n.push(()=>f.removeEventListener("click",k)),v.append(f,w),l.appendChild(v)}}return a(),h(l,{getOpen(){return Array.from(r)},open(i){s(i,!0)},close(i){s(i,!1)},toggle(i){s(i,!r.has(i))},destroy(){n.splice(0).forEach(i=>i()),l.remove()}})}var Xt=`
|
|
289
|
+
.linteau-breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--linteau-muted-foreground) }
|
|
290
|
+
.linteau-breadcrumb-item { background: transparent; border: none; color: var(--linteau-muted-foreground); cursor: pointer; font: inherit; padding: 0 }
|
|
291
|
+
.linteau-breadcrumb-item:hover { color: var(--linteau-foreground) }
|
|
292
|
+
.linteau-breadcrumb-current { color: var(--linteau-foreground); font-weight: 500 }
|
|
293
|
+
`;function _o(e){x("Breadcrumb"),g("breadcrumb",Xt);let o=c("nav",t("breadcrumb"));o.setAttribute("aria-label","breadcrumb");let r=[];function d(l){o.replaceChildren(),r.splice(0).forEach(s=>s()),l.forEach((s,a)=>{if(a===l.length-1){let i=c("span",t("breadcrumb-current"));i.textContent=s.label,o.appendChild(i)}else{let i=c("button",t("breadcrumb-item"));i.type="button",i.textContent=s.label;let m=()=>s.onClick?.();i.addEventListener("click",m),r.push(()=>i.removeEventListener("click",m)),o.appendChild(i);let v=y(D.chevronRight,12,{className:t("icon")});v&&o.appendChild(v)}})}return d(e.items),h(o,{setItems(l){d(l)},destroy(){r.splice(0).forEach(l=>l()),o.remove()}})}var Ut=`
|
|
294
|
+
.linteau-pagination { display: flex; align-items: center; gap: 4px }
|
|
295
|
+
.linteau-pagination-item { min-width: 28px; height: 28px; padding: 0 6px; display: flex; align-items: center; justify-content: center; border-radius: var(--linteau-radius-sm); border: 1px solid transparent; background: transparent; color: var(--linteau-muted-foreground); font-size: 12px; cursor: pointer; font-family: inherit }
|
|
296
|
+
.linteau-pagination-item:hover:not(:disabled) { background: var(--linteau-accent) }
|
|
297
|
+
.linteau-pagination-item:disabled { opacity: 0.4; cursor: not-allowed }
|
|
298
|
+
.linteau-pagination-item-active { background: var(--linteau-primary); color: var(--linteau-primary-foreground) }
|
|
299
|
+
.linteau-pagination-ellipsis { color: var(--linteau-muted-foreground); padding: 0 4px }
|
|
300
|
+
`;function Jo(e,o,r){let d=r*2+5;if(o<=d)return Array.from({length:o},(i,m)=>m+1);let n=Math.max(e-r,1),l=Math.min(e+r,o),s=n>2,a=l<o-1,p=[1];s&&p.push("ellipsis");for(let i=Math.max(n,2);i<=Math.min(l,o-1);i++)p.push(i);return a&&p.push("ellipsis"),o>1&&p.push(o),p}function Qo(e){x("Pagination"),g("pagination",Ut);let o=e.page??e.defaultPage??1,r=e.pageCount,d=e.siblingCount??1,n=e.onChange,l=[],s=c("div",t("pagination"));s.setAttribute("role","navigation");function a(m){o=Math.max(1,Math.min(r,m)),p(),n?.(o)}function p(){s.replaceChildren(),l.splice(0).forEach(k=>k());let m=c("button",t("pagination-item"));m.type="button";let v=y(D.chevronLeft,14);v&&m.appendChild(v),m.disabled=o<=1;let f=()=>a(o-1);m.addEventListener("click",f),l.push(()=>m.removeEventListener("click",f)),s.appendChild(m);for(let k of Jo(o,r,d)){if(k==="ellipsis"){s.appendChild(c("span",t("pagination-ellipsis")));continue}let S=c("button",E(t("pagination-item"),k===o&&t("pagination-item-active")));S.type="button",S.textContent=String(k);let I=()=>a(k);S.addEventListener("click",I),l.push(()=>S.removeEventListener("click",I)),s.appendChild(S)}let u=c("button",t("pagination-item"));u.type="button";let b=y(D.chevronRight,14);b&&u.appendChild(b),u.disabled=o>=r;let w=()=>a(o+1);u.addEventListener("click",w),l.push(()=>u.removeEventListener("click",w)),s.appendChild(u)}return p(),h(s,{getPage(){return o},setPage(m){o=Math.max(1,Math.min(r,m)),p()},setPageCount(m){r=m,p()},destroy(){l.splice(0).forEach(m=>m()),s.remove()}})}var qt=`
|
|
301
|
+
.linteau-tabs { display: flex; flex-direction: column; gap: 12px; width: 100% }
|
|
302
|
+
.linteau-tabs-list { display: flex; gap: 4px; border-bottom: 1px solid var(--linteau-border) }
|
|
303
|
+
.linteau-tabs-trigger { background: transparent; border: none; border-bottom: 2px solid transparent; padding: 8px 12px; font-size: 12px; font-weight: 500; color: var(--linteau-muted-foreground); cursor: pointer; display: flex; align-items: center; gap: 6px; font-family: inherit }
|
|
304
|
+
.linteau-tabs-trigger:hover { color: var(--linteau-foreground) }
|
|
305
|
+
.linteau-tabs-trigger-active { color: var(--linteau-foreground); border-bottom-color: var(--linteau-primary) }
|
|
306
|
+
.linteau-tabs-panel { width: 100% }
|
|
307
|
+
`;function en(e){x("Tabs"),g("tabs",qt);let o=e.value??e.defaultValue??e.items[0]?.value??"",r=e.onChange,d=[],n=c("div",t("tabs")),l=c("div",t("tabs-list"));l.setAttribute("role","tablist");let s=c("div",t("tabs-panel"));function a(){let m=e.items.find(v=>v.value===o);s.replaceChildren(),m&&s.appendChild(m.content)}function p(){l.replaceChildren(),d.splice(0).forEach(m=>m());for(let m of e.items){let v=c("button",E(t("tabs-trigger"),m.value===o&&t("tabs-trigger-active")));v.type="button",v.setAttribute("role","tab"),m.icon&&v.appendChild(y(m.icon,14,{className:t("icon")}));let f=document.createElement("span");f.textContent=m.label,v.appendChild(f);let u=()=>{o=m.value,p(),a(),r?.(o)};v.addEventListener("click",u),d.push(()=>v.removeEventListener("click",u)),l.appendChild(v)}}return p(),a(),n.append(l,s),h(n,{getValue(){return o},setValue(m){o=m,p(),a()},destroy(){d.splice(0).forEach(m=>m()),n.remove()}})}var Zt=`
|
|
308
|
+
.linteau-dialog-overlay { position: fixed; inset: 0; background: color-mix(in oklch, black 60%, transparent); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(4px) }
|
|
309
|
+
.linteau-dialog-panel { width: min(480px, 92vw); max-height: 86vh; display: flex; flex-direction: column; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-lg); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); overflow: hidden }
|
|
310
|
+
.linteau-dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--linteau-border) }
|
|
311
|
+
.linteau-dialog-title { font-size: 14px; font-weight: 600 }
|
|
312
|
+
.linteau-dialog-close { background: transparent; border: none; color: var(--linteau-muted-foreground); cursor: pointer; display: flex; padding: 4px; border-radius: var(--linteau-radius-sm) }
|
|
313
|
+
.linteau-dialog-close:hover { background: var(--linteau-accent); color: var(--linteau-foreground) }
|
|
314
|
+
.linteau-dialog-body { padding: 16px; overflow-y: auto }
|
|
315
|
+
.linteau-dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--linteau-border) }
|
|
316
|
+
`;function ke(e={}){x("Dialog"),g("dialog",Zt);let o=e.closeOnBackdrop??!0,r=e.closeOnEscape??!0,d=!1,n=null,l=null,s=c("div",E(t("dialog-overlay"),t("hidden"))),a=c("div",t("dialog-panel"));a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true");let p=c("div",t("dialog-header")),i=c("div",t("dialog-title"));i.textContent=e.title??"";let m=c("button",t("dialog-close"));m.type="button";let v=y(D.x,16);v&&m.appendChild(v),p.append(i,m);let f=c("div",t("dialog-body"));e.content&&X(f,e.content);let u=c("div",t("dialog-footer"));e.actions?.length&&u.append(...e.actions),a.append(p,f),e.actions?.length&&a.appendChild(u),s.appendChild(a);function b(I){d=I,s.classList.toggle(t("hidden"),!I),I?(n=ie(),r&&(l=$(w))):(n?.(),n=null,l?.(),l=null),e.onOpenChange?.(I)}function w(){d&&b(!1)}let k=I=>{o&&I.target===s&&w()};return s.addEventListener("mousedown",k),m.addEventListener("click",w),h(s,{body:f,open(){b(!0)},close:w,isOpen(){return d},setTitle(I){i.textContent=I},setContent(I){X(f,I)},destroy(){s.removeEventListener("mousedown",k),m.removeEventListener("click",w),n?.(),l?.(),s.remove()}})}function tn(e){x("AlertDialog");let o=!1,r=re(e.cancelText??"Cancel",{variant:"outline",onClick:()=>{o=!0,e.onCancel?.(),n.close()}}),d=re(e.confirmText??"Continue",{variant:e.destructive?"destructive":"default",onClick:()=>{o=!0,e.onConfirm?.(),n.close()}}),n=ke({title:e.title,...e.description!==void 0?{content:e.description}:{},actions:[r,d],closeOnBackdrop:!1,closeOnEscape:!0,onOpenChange:l=>{!l&&!o&&e.onCancel?.(),o=!1}});return document.body.appendChild(n),{open(){n.open()},close(){n.close()},isOpen(){return n.isOpen()},destroy(){n.destroy()}}}function on(e){return"separator"in e}function pe(e,o,r,d){e.replaceChildren();for(let n of o){if(on(n)){e.appendChild(c("div",t("menu-separator")));continue}let l=c("div",E(t("menu-item"),n.disabled&&t("menu-item-disabled"),n.destructive&&t("menu-item-destructive")));n.icon&&l.appendChild(y(n.icon,14,{className:t("icon")}));let s=document.createElement("span");s.textContent=n.label,l.appendChild(s),l.addEventListener("click",()=>{n.disabled||(r(n.value),d())}),e.appendChild(l)}}var ge=`
|
|
317
|
+
.linteau-menu { position: fixed; z-index: 1200; min-width: 160px; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-md); padding: 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) }
|
|
318
|
+
.linteau-menu-item { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: var(--linteau-radius-sm); font-size: 12px; color: var(--linteau-foreground); cursor: pointer }
|
|
319
|
+
.linteau-menu-item:hover:not(.linteau-menu-item-disabled) { background: var(--linteau-accent) }
|
|
320
|
+
.linteau-menu-item-disabled { opacity: 0.5; cursor: not-allowed }
|
|
321
|
+
.linteau-menu-item-destructive { color: var(--linteau-destructive) }
|
|
322
|
+
.linteau-menu-separator { height: 1px; background: var(--linteau-border); margin: 4px 0 }
|
|
323
|
+
`;function nn(e){x("DropdownMenu"),g("menu",ge);let{anchor:o,placement:r="bottom"}=e,d=e.items,n=!1,l=null,s=null,a=c("div",E(t("menu"),t("hidden")));pe(a,d,u=>e.onSelect?.(u),i);function p(){n||(n=!0,document.body.appendChild(a),a.classList.remove(t("hidden")),Y(o,a,r),l=q([o,a],i),s=$(i))}function i(){n&&(n=!1,a.classList.add(t("hidden")),a.remove(),l?.(),l=null,s?.(),s=null)}function m(){n?i():p()}let v=()=>m();return o.addEventListener("click",v),h(a,{open:p,close:i,toggle:m,isOpen(){return n},setItems(u){d=u,pe(a,d,b=>e.onSelect?.(b),i)},destroy(){o.removeEventListener("click",v),l?.(),s?.(),a.remove()}})}function rn(e){x("ContextMenu"),g("menu",ge);let{target:o}=e,r=null,d=null,n=c("div",t("menu"));pe(n,e.items,a=>e.onSelect?.(a),l),n.style.display="none";function l(){n.style.display="none",n.remove(),r?.(),r=null,d?.(),d=null}let s=a=>{a.preventDefault(),document.body.appendChild(n),n.style.display="block",n.style.position="fixed",n.style.top=`${a.clientY}px`,n.style.left=`${a.clientX}px`,r=q(n,l),d=$(l)};return o.addEventListener("contextmenu",s),{destroy(){o.removeEventListener("contextmenu",s),r?.(),d?.(),n.remove()}}}var _t=`
|
|
324
|
+
.linteau-drawer-overlay { position: fixed; inset: 0; background: color-mix(in oklch, black 55%, transparent); z-index: 1000 }
|
|
325
|
+
.linteau-drawer-panel { position: fixed; background: var(--linteau-card); border: 1px solid var(--linteau-border); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transition: transform 200ms ease }
|
|
326
|
+
.linteau-drawer-right { top: 0; right: 0; bottom: 0; width: min(360px, 90vw); transform: translateX(0) }
|
|
327
|
+
.linteau-drawer-left { top: 0; left: 0; bottom: 0; width: min(360px, 90vw); transform: translateX(0) }
|
|
328
|
+
.linteau-drawer-top { top: 0; left: 0; right: 0; height: min(320px, 80vh); transform: translateY(0) }
|
|
329
|
+
.linteau-drawer-bottom { bottom: 0; left: 0; right: 0; height: min(320px, 80vh); transform: translateY(0) }
|
|
330
|
+
.linteau-drawer-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--linteau-border) }
|
|
331
|
+
.linteau-drawer-title { font-size: 14px; font-weight: 600 }
|
|
332
|
+
.linteau-drawer-close { background: transparent; border: none; color: var(--linteau-muted-foreground); cursor: pointer; display: flex; padding: 4px; border-radius: var(--linteau-radius-sm) }
|
|
333
|
+
.linteau-drawer-body { padding: 16px; overflow-y: auto; flex: 1 }
|
|
334
|
+
`;function an(e={}){x("Drawer"),g("drawer",_t);let o=e.side??"right",r=e.closeOnBackdrop??!0,d=e.closeOnEscape??!0,n=!1,l=null,s=null,a=c("div",E(t("drawer-overlay"),t("hidden"))),p=c("div",E(t("drawer-panel"),t(`drawer-${o}`)));p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true");let i=c("div",t("drawer-header")),m=c("div",t("drawer-title"));m.textContent=e.title??"";let v=c("button",t("drawer-close"));v.type="button";let f=y(D.x,16);f&&v.appendChild(f),i.append(m,v);let u=c("div",t("drawer-body"));e.content&&X(u,e.content),p.append(i,u),a.appendChild(p);function b(I){n=I,a.classList.toggle(t("hidden"),!I),I?(l=ie(),d&&(s=$(w))):(l?.(),l=null,s?.(),s=null),e.onOpenChange?.(I)}function w(){n&&b(!1)}let k=I=>{r&&I.target===a&&w()};return a.addEventListener("mousedown",k),v.addEventListener("click",w),h(a,{body:u,open(){b(!0)},close:w,isOpen(){return n},setTitle(I){m.textContent=I},setContent(I){X(u,I)},destroy(){a.removeEventListener("mousedown",k),v.removeEventListener("click",w),l?.(),s?.(),a.remove()}})}var Jt=`
|
|
335
|
+
.linteau-popover { position: fixed; z-index: 1200; background: var(--linteau-card); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-md); padding: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) }
|
|
336
|
+
`;function ln(e){x("Popover"),g("popover",Jt);let{anchor:o,placement:r="bottom",closeOnClickOutside:d=!0}=e,n=!1,l=null,s=null,a=c("div",E(t("popover"),t("hidden")));X(a,e.content);function p(){n||(n=!0,document.body.appendChild(a),a.classList.remove(t("hidden")),Y(o,a,r),d&&(l=q([o,a],i)),s=$(i))}function i(){n&&(n=!1,a.classList.add(t("hidden")),a.remove(),l?.(),l=null,s?.(),s=null)}function m(){n?i():p()}let v=()=>m();return o.addEventListener("click",v),h(a,{open:p,close:i,toggle:m,isOpen(){return n},setContent(u){X(a,u)},destroy(){o.removeEventListener("click",v),l?.(),s?.(),a.remove()}})}var Qt=`
|
|
337
|
+
.linteau-radio-group { display: flex; flex-direction: column; gap: 8px }
|
|
338
|
+
.linteau-radio-row { display: flex; align-items: center; gap: 8px; cursor: pointer }
|
|
339
|
+
.linteau-radio-row.linteau-disabled { opacity: 0.5; cursor: not-allowed }
|
|
340
|
+
.linteau-radio { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--linteau-border); background: var(--linteau-secondary); display: flex; align-items: center; justify-content: center; flex-shrink: 0 }
|
|
341
|
+
.linteau-radio.linteau-checked { border-color: var(--linteau-primary) }
|
|
342
|
+
.linteau-radio-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--linteau-primary); opacity: 0; transition: opacity 100ms ease }
|
|
343
|
+
.linteau-radio.linteau-checked .linteau-radio-dot { opacity: 1 }
|
|
344
|
+
`;function sn(e){x("RadioGroup"),g("radio",Qt);let o=e.value??e.defaultValue,r=e.disabled??!1,d=e.onChange,n=[],l=c("div",t("radio-group"));l.setAttribute("role","radiogroup");function s(){l.replaceChildren(),n.splice(0).forEach(p=>p());for(let p of e.items){let i=r||(p.disabled??!1),m=c("div",E(t("radio-row"),i&&t("disabled"))),v=c("div",E(t("radio"),p.value===o&&t("checked")));v.appendChild(c("div",t("radio-dot")));let f=document.createElement("span");f.textContent=p.label,m.append(v,f);let u=()=>{i||(o=p.value,s(),d?.(p.value))};m.addEventListener("click",u),n.push(()=>m.removeEventListener("click",u)),l.appendChild(m)}}return s(),h(l,{getValue(){return o},setValue(p){o=p,s()},destroy(){n.splice(0).forEach(p=>p()),l.remove()}})}var eo=`
|
|
345
|
+
.linteau-select-wrap { position: relative }
|
|
346
|
+
.linteau-select { appearance: none; background: var(--linteau-secondary); color: var(--linteau-foreground); border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-sm); padding: 6px 28px 6px 10px; font-size: 12px; font-family: inherit; cursor: pointer; transition: border-color 120ms ease }
|
|
347
|
+
.linteau-select:disabled { opacity: 0.5; cursor: not-allowed }
|
|
348
|
+
.linteau-select:focus { outline: none; border-color: var(--linteau-ring); box-shadow: 0 0 0 2px color-mix(in oklch, var(--linteau-ring) 20%, transparent) }
|
|
349
|
+
.linteau-select-chevron { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none }
|
|
350
|
+
`;function dn(e){x("Select"),g("field-base",B),g("select",eo);let o=e.options,r=e.value??e.defaultValue??o[0]?.value??"",d=e.onChange,n=c("div",t("field-row")),l=c("div",t("field-label"));e.icon&&l.appendChild(y(e.icon,14,{className:t("icon")}));let s=document.createElement("span");s.textContent=e.label,l.appendChild(s);let a=c("div",t("select-wrap")),p=c("select",t("select"));p.disabled=e.disabled??!1;function i(){if(p.replaceChildren(),e.placeholder){let u=document.createElement("option");u.value="",u.textContent=e.placeholder,u.disabled=!0,u.selected=!r,p.appendChild(u)}for(let u of o){let b=document.createElement("option");b.value=u.value,b.textContent=u.label,b.disabled=u.disabled??!1,b.selected=u.value===r,p.appendChild(b)}}i();let m=y(D.chevronDown,12,{className:t("select-chevron")});a.append(p,m);let v=()=>{r=p.value,d?.(r)};return p.addEventListener("change",v),n.append(l,a),h(n,{getValue(){return r},setValue(u){r=u,p.value=u},setOptions(u){o=u,i()},setDisabled(u){p.disabled=u},destroy(){p.removeEventListener("change",v),n.remove()}})}var xe=`
|
|
351
|
+
.linteau-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--linteau-primary) 0%, var(--linteau-primary) var(--linteau-fill, 0%), var(--linteau-secondary) var(--linteau-fill, 0%), var(--linteau-secondary) 100%); outline: none; transition: background 120ms ease }
|
|
352
|
+
.linteau-slider:disabled { opacity: 0.5 }
|
|
353
|
+
.linteau-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--linteau-primary); border: 2px solid var(--linteau-card); box-shadow: 0 0 0 1px var(--linteau-border); cursor: pointer; transition: transform 120ms ease }
|
|
354
|
+
.linteau-slider::-webkit-slider-thumb:hover { transform: scale(1.15) }
|
|
355
|
+
.linteau-slider::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--linteau-primary); border: 2px solid var(--linteau-card); cursor: pointer }
|
|
356
|
+
`;function cn(e){x("Slider"),g("field-base",B),g("slider",xe);let{min:o,max:r,step:d}=e,n=e.value??e.defaultValue??o,l=e.format??(k=>k.toString()),s=e.onChange,a=c("div",t("field")),p=c("div",t("field-header")),i=c("div",t("field-label"));e.icon&&i.appendChild(y(e.icon,14,{className:t("icon")}));let m=document.createElement("span");m.textContent=e.label,i.appendChild(m);let v=c("span",t("field-value"));v.textContent=l(n),p.append(i,v);let f=c("input",t("slider"));f.type="range",f.min=String(o),f.max=String(r),f.step=String(d),f.value=String(n),f.disabled=e.disabled??!1;function u(k){let S=(k-o)/(r-o)*100;f.style.setProperty("--linteau-fill",`${S}%`)}u(n);let b=()=>{n=Number(f.value),v.textContent=l(n),u(n),s?.(n)};return f.addEventListener("input",b),a.append(p,f),h(a,{getValue(){return n},setValue(k){n=Math.max(o,Math.min(r,k)),f.value=String(n),v.textContent=l(n),u(n)},setDisabled(k){f.disabled=k},destroy(){f.removeEventListener("input",b),a.remove()}})}var to=`
|
|
357
|
+
.linteau-range-track { position: relative; height: 20px; display: flex; align-items: center }
|
|
358
|
+
.linteau-range-track::before { content: ''; position: absolute; left: 0; right: 0; height: 6px; border-radius: 999px; background: var(--linteau-secondary) }
|
|
359
|
+
.linteau-range-track::after { content: ''; position: absolute; height: 6px; border-radius: 999px; background: var(--linteau-primary); left: var(--linteau-range-low, 0%); right: calc(100% - var(--linteau-range-high, 100%)) }
|
|
360
|
+
.linteau-range-input { position: absolute; left: 0; right: 0; width: 100%; height: 20px; background: transparent; pointer-events: none; margin: 0 }
|
|
361
|
+
.linteau-range-input::-webkit-slider-thumb { pointer-events: auto }
|
|
362
|
+
.linteau-range-input::-moz-range-thumb { pointer-events: auto }
|
|
363
|
+
`;function pn(e){x("RangeSlider"),g("field-base",B),g("slider",xe),g("range-slider",to);let{min:o,max:r,step:d}=e,[n,l]=e.value??e.defaultValue??[o,r],s=e.format??(M=>M.toString()),a=e.onChange,p=c("div",t("field")),i=c("div",t("field-header")),m=c("div",t("field-label"));e.icon&&m.appendChild(y(e.icon,14,{className:t("icon")}));let v=document.createElement("span");v.textContent=e.label,m.appendChild(v);let f=c("span",t("field-value"));i.append(m,f);let u=c("div",t("range-track")),b=c("input",E(t("slider"),t("range-input"))),w=c("input",E(t("slider"),t("range-input")));for(let M of[b,w])M.type="range",M.min=String(o),M.max=String(r),M.step=String(d),M.disabled=e.disabled??!1;function k(){f.textContent=`${s(n)} - ${s(l)}`,b.value=String(n),w.value=String(l),u.style.setProperty("--linteau-range-low",`${(n-o)/(r-o)*100}%`),u.style.setProperty("--linteau-range-high",`${(l-o)/(r-o)*100}%`)}k();let S=()=>{n=Math.min(Number(b.value),l),k(),a?.([n,l])},I=()=>{l=Math.max(Number(w.value),n),k(),a?.([n,l])};return b.addEventListener("input",S),w.addEventListener("input",I),u.append(b,w),p.append(i,u),h(p,{getValue(){return[n,l]},setValue(M){[n,l]=M,k()},setDisabled(M){b.disabled=M,w.disabled=M},destroy(){b.removeEventListener("input",S),w.removeEventListener("input",I),p.remove()}})}var oo=`
|
|
364
|
+
.linteau-switch-row { display: flex; align-items: center; justify-content: space-between }
|
|
365
|
+
.linteau-switch { width: 38px; height: 22px; border-radius: 999px; background: var(--linteau-secondary); border: 1px solid var(--linteau-border); padding: 2px; cursor: pointer; display: flex; align-items: center; transition: background 150ms ease }
|
|
366
|
+
.linteau-switch:disabled { opacity: 0.5; cursor: not-allowed }
|
|
367
|
+
.linteau-switch.linteau-checked { background: var(--linteau-primary) }
|
|
368
|
+
.linteau-switch-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--linteau-card); transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1); transform: translateX(0) }
|
|
369
|
+
.linteau-switch.linteau-checked .linteau-switch-thumb { transform: translateX(16px); background: var(--linteau-primary-foreground) }
|
|
370
|
+
`;function un(e){x("Switch"),g("field-base",B),g("switch",oo);let o=e.checked??e.defaultChecked??!1,r=e.disabled??!1,d=e.onChange,n=c("div",t("switch-row")),l=c("div",t("field-label"));e.icon&&l.appendChild(y(e.icon,14,{className:t("icon")}));let s=document.createElement("span");s.textContent=e.label,l.appendChild(s);let a=c("button",t("switch"));a.type="button",a.setAttribute("role","switch"),a.disabled=r;let p=c("span",t("switch-thumb"));a.appendChild(p);function i(){a.classList.toggle(t("checked"),o),a.setAttribute("aria-checked",String(o))}i();let m=()=>{r||(o=!o,i(),d?.(o))};return a.addEventListener("click",m),n.append(l,a),h(n,{getValue(){return o},setValue(f){o=f,i()},setLabel(f){s.textContent=f},setDisabled(f){r=f,a.disabled=f},destroy(){a.removeEventListener("click",m),n.remove()}})}var no=`
|
|
371
|
+
.linteau-toggle {
|
|
372
|
+
display: inline-flex;
|
|
373
|
+
align-items: center;
|
|
374
|
+
justify-content: center;
|
|
375
|
+
gap: 6px;
|
|
376
|
+
border-radius: var(--linteau-radius-sm);
|
|
377
|
+
border: 1px solid transparent;
|
|
378
|
+
background: transparent;
|
|
379
|
+
color: var(--linteau-muted-foreground);
|
|
380
|
+
font-size: 13px;
|
|
381
|
+
font-weight: 500;
|
|
382
|
+
cursor: pointer;
|
|
383
|
+
font-family: inherit;
|
|
384
|
+
transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
|
|
385
|
+
}
|
|
386
|
+
.linteau-toggle-default { padding: 8px 12px }
|
|
387
|
+
.linteau-toggle-sm { padding: 5px 8px; font-size: 12px }
|
|
388
|
+
.linteau-toggle:hover:not(:disabled) { background: var(--linteau-accent); color: var(--linteau-foreground) }
|
|
389
|
+
.linteau-toggle:disabled { opacity: 0.5; cursor: not-allowed }
|
|
390
|
+
.linteau-toggle-outline { border-color: var(--linteau-border) }
|
|
391
|
+
.linteau-toggle.linteau-pressed { background: var(--linteau-accent); color: var(--linteau-foreground) }
|
|
392
|
+
`;function Le(e,o={}){x("Toggle"),g("toggle",no);let r=o.variant??"default",d=o.size??"default",n=o.pressed??o.defaultPressed??!1,l=o.disabled??!1,s=o.onPressedChange,a=c("button",E(t("toggle"),t(`toggle-${d}`),r==="outline"&&t("toggle-outline")));a.type="button",a.setAttribute("aria-pressed",String(n)),a.disabled=l,o.icon&&a.appendChild(y(o.icon,14,{className:t("icon")}));let p=document.createElement("span");p.textContent=e,a.appendChild(p);function i(){a.classList.toggle(t("pressed"),n),a.setAttribute("aria-pressed",String(n))}i();let m=()=>{l||(n=!n,i(),s?.(n))};return a.addEventListener("click",m),h(a,{getPressed(){return n},setPressed(f){n=f,i()},setDisabled(f){l=f,a.disabled=f},destroy(){a.removeEventListener("click",m),a.remove()}})}var ro=`
|
|
393
|
+
.linteau-toggle-group { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--linteau-border); border-radius: var(--linteau-radius-sm) }
|
|
394
|
+
`;function mn(e){x("ToggleGroup"),g("toggle-group",ro);let o=e.type??"single",r=e.variant??"outline",d=e.size??"default",n=e.disabled??!1,l=e.onChange,s=new Set(Array.isArray(e.value??e.defaultValue)?e.value??e.defaultValue:e.value!==void 0||e.defaultValue!==void 0?[e.value??e.defaultValue]:[]),a=c("div",t("toggle-group"));a.setAttribute("role","group");let p=new Map;function i(){return o==="single"?Array.from(s)[0]??"":Array.from(s)}function m(f){o==="single"?s=s.has(f)?new Set:new Set([f]):s.has(f)?s.delete(f):s.add(f);for(let[u,b]of p)b.setPressed(s.has(u));l?.(i())}for(let f of e.items){let u=Le(f.label,{variant:r,size:d,icon:f.icon,pressed:s.has(f.value),disabled:n||(f.disabled??!1),onPressedChange:()=>m(f.value)});p.set(f.value,u),a.appendChild(u)}return h(a,{getValue(){return i()},setValue(f){s=new Set(Array.isArray(f)?f:[f]);for(let[u,b]of p)b.setPressed(s.has(u))},destroy(){for(let f of p.values())f.destroy();a.remove()}})}var io=`
|
|
395
|
+
.linteau-tooltip { position: fixed; z-index: 1300; background: var(--linteau-foreground); color: var(--linteau-background); font-size: 11px; font-weight: 500; padding: 5px 8px; border-radius: var(--linteau-radius-sm); pointer-events: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) }
|
|
396
|
+
`;function fn(e,o,r={}){x("Tooltip"),g("tooltip",io);let d=r.placement??"top",n=r.delay??200,l=o,s=null,a=c("div",t("tooltip"));a.textContent=l,a.style.display="none";function p(){s=setTimeout(()=>{document.body.appendChild(a),a.style.display="block",Y(e,a,d)},n)}function i(){s&&clearTimeout(s),a.style.display="none",a.remove()}return e.addEventListener("mouseenter",p),e.addEventListener("mouseleave",i),e.addEventListener("focus",p),e.addEventListener("blur",i),{setContent(m){l=m,a.textContent=l},destroy(){i(),e.removeEventListener("mouseenter",p),e.removeEventListener("mouseleave",i),e.removeEventListener("focus",p),e.removeEventListener("blur",i)}}}return mo(vn);})();
|
|
397
|
+
//# sourceMappingURL=linteau.global.js.map
|