@nice2dev/events 1.0.29 → 1.0.30

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/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # @nice2dev/events — Changelog
2
2
 
3
+ ## 1.0.30
4
+
5
+ ### Patch Changes
6
+
7
+ - 3e794cc: Round-15 showcase-feedback fixes across ~23 controls (several re-opens of round 14).
8
+
9
+ **Real bugs**
10
+ - **NicePixelEditor** — the work-area canvas mounted at 0px (`.canvasContainer flex:1`
11
+ is inert inside the block `.nice-app-shell__content`); `height:100%` gives it size so
12
+ tools + drawing work.
13
+ - **NiceKanbanBoard** — a collapsed column no longer rotates its title
14
+ (`writing-mode:vertical-rl` removed, title hidden); it just collapses to a 44px strip.
15
+ - **NiceUserMenu** — the body-portalled dropdown now carries the theme (`scopeThemeClass`)
16
+ instead of always rendering light.
17
+ - **NiceMenu** — `size` now scales the leading icon (svg `em`, like NiceButton); `loading`
18
+ implemented (dim + spinner + inert).
19
+ - **NiceLookup** — `readOnly` hides the chevron; loading / errorPlacement=right /
20
+ labelPlacement=left no longer squeeze the value — the field is `fit-content` with a
21
+ min-width on the value area so those extend it instead of subdividing a fixed 220px.
22
+ - **NiceTreeSelect** — clicking a branch drills in (expand/collapse) instead of committing
23
+ the parent + closing; the expand chevron lost its stray UA button border.
24
+ - **NiceTreeGrid** — STATE toggles no longer change the control width; the dead `compact`
25
+ (missing base `nice-table` class) works; new `size` density.
26
+ - **NiceDateTimePicker** — the popup's time `<select>`s are replaced by vertical typable
27
+ spinners (▲/input/▼, wrap + minuteStep + arrows); the popup portals into the theme host
28
+ (`portalTarget`) so **every** named theme renders (not just light/dark); the showcase
29
+ translator now chains to the library dictionary so the footer (and every library key)
30
+ translates.
31
+
32
+ **New / additive props**
33
+ - **NiceAutocomplete** — `showAll` (default true): focusing opens the dropdown with all
34
+ options sorted alphabetically.
35
+ - **NiceCard / NiceCardGroup / NiceSpreadsheet / NiceActionSheet / NiceBottomSheet** — gain
36
+ `disabled`/`readOnly`/`loading`/`error` STATE and a dimensional `size`. NiceCard's demo is
37
+ a single card with every prop on the bar; NiceCardGroup's radio mode is opt-in (default
38
+ plain cards).
39
+ - **NiceDataGrid** — top-level `disabled`/`readOnly`/`error`; the demo puts `size` on the
40
+ Size bar + adds the State bar (the Filter button was already icon-only).
41
+ - **NiceTabs** — `iconOnly` (labels → tooltip) and `centered` (`true`|`false`|`'auto'`).
42
+ **NiceEventPlanning** exposes `tabsIconOnly` (default true) + `tabsCentered`.
43
+ - **NiceKaraokeUploader** — rebuilt on **NiceUpload** (accept `.txt`, `maxFileSize`,
44
+ `validateFile` rejects non-.txt / empty); the UltraStar parse is unchanged.
45
+
46
+ **Demo / config**
47
+ - NiceForm (seeded fields + right-aligned Age stepper), NiceTopNav (seeded theme picker),
48
+ NiceTable (Role column sortable), NiceDateRangeBox (errorPlacement moved to the ⚙ panel),
49
+ NiceUpload (empty-label dropzone is a deterministic square). **NiceDropDownBox** kept — its
50
+ demo now explains it vs NiceSelect / NiceLookup.
51
+
52
+ (NiceCardView removal + NiceColorPalette redesign + NiceKaraokeSongBrowser navigation are in
53
+ `fb-round15-big3.md`.)
54
+
3
55
  ## 1.0.29
4
56
 
5
57
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),y=require("@nice2dev/icons"),o=require("@nice2dev/ui"),i=require("react"),A=require("@nice2dev/ui-core"),Pe=({item:w})=>{const[_,C]=i.useState(!1),t=w.thumbnailUrl??w.url;return w.type==="video"?e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx(y.NtdPlay,{size:26})}):_||!t?e.jsx("div",{className:"nice-event-media__broken",title:"Image unavailable",children:e.jsx(y.NtdImage,{size:24})}):e.jsx("img",{src:t,alt:w.caption??"",className:"nice-event-media__thumb",loading:"lazy",onError:()=>C(!0)})},Ee=i.forwardRef(function(_,C){const{items:t,onUpload:p,onDelete:h,onLike:m,onItemClick:v,layout:j="grid",uploadEnabled:b=!0,typeFilter:N="all",className:x,style:f}=_,[r,d]=i.useState(""),k=i.useMemo(()=>N==="all"?t:t.filter(u=>u.type===N),[t,N]),g=u=>{const n=u[0];!n||!p||(p(n,r.trim()||void 0),d(""))},S=j==="list";return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${j} ${x??""}`,style:f,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",k.length,")"]})}),b&&p&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx(o.NiceUpload,{accept:"image/*,video/*",multiple:!1,imagePreview:!1,onFilesSelected:g}),e.jsx(o.NiceTextInput,{value:r,onChange:d,placeholder:"Add a caption…"})]}),k.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx(o.NiceCardGroup,{columns:S?1:void 0,minColumnWidth:200,gap:12,align:"stretch",children:k.map(u=>e.jsxs("div",{className:`nice-event-media__card${S?" nice-event-media__card--row":""}`,onClick:()=>v==null?void 0:v(u),role:v?"button":void 0,tabIndex:v?0:void 0,children:[e.jsx(Pe,{item:u}),e.jsxs("div",{className:"nice-event-media__body",children:[u.caption&&e.jsx("span",{className:"nice-event-media__caption",children:u.caption}),u.uploadedByName&&e.jsx("span",{className:"nice-event-media__uploader",children:u.uploadedByName}),e.jsxs("div",{className:"nice-event-media__actions",children:[m&&e.jsxs("button",{type:"button",className:"nice-event-media__action",onClick:n=>{n.stopPropagation(),m(u.id)},"aria-label":"Like",children:[e.jsx(y.NtdHeart,{size:15})," ",u.likes??0]}),h&&e.jsx("button",{type:"button",className:"nice-event-media__action nice-event-media__action--danger",onClick:n=>{n.stopPropagation(),h(u.id)},"aria-label":"Delete",children:e.jsx(y.NtdTrash,{size:15})})]})]})]},u.id))})]})});function Q(w){const _=w.toLowerCase();return["active","live","published","completed","confirmed"].includes(_)?"success":["cancelled","canceled","rejected","failed"].includes(_)?"error":["scheduled","pending","planning"].includes(_)?"info":["draft","archived"].includes(_)?"secondary":"warning"}const $e={micro:[],compact:["details","location","budget"],normal:["details","location","participants","surveys","budget"],full:["details","location","participants","surveys","budget","settings"]},Oe=i.forwardRef(function(_,C){var X,Z,ee,ne,te,se;const{event:t,participants:p=[],surveys:h=[],billing:m=[],displayMode:v="normal",tabs:j,activeTab:b,onTabChange:N,editable:x=!1,onSave:f,onPublish:r,onShare:d,onExport:k,onUpdateEvent:g,onUpdateLocation:S,onAddSurvey:u,onSurveyRespond:n,onAddBilling:l,className:s,style:I}=_,[c,z]=i.useState(t.title),[T,M]=i.useState(t.description??""),[E,ae]=i.useState(t.startDate??""),[$,ce]=i.useState(t.endDate??""),[O,re]=i.useState(((X=t.location)==null?void 0:X.name)??""),[V,le]=i.useState(((Z=t.location)==null?void 0:Z.address)??""),[D,oe]=i.useState(((ee=t.location)==null?void 0:ee.virtualUrl)??""),[P,de]=i.useState(((ne=t.location)==null?void 0:ne.isVirtual)??!1),[B,G]=i.useState(""),[q,ue]=i.useState("single"),[U,H]=i.useState(""),[L,K]=i.useState(""),[W,Y]=i.useState(""),[F,me]=i.useState("PLN"),J=j??$e[v],[pe,he]=i.useState(J[0]??"details"),xe=b??pe,ve=i.useCallback(a=>{const R=a;b===void 0&&he(R),N==null||N(R)},[b,N]),ge=i.useCallback(()=>{g==null||g({title:c,description:T||void 0,startDate:E||void 0,endDate:$||void 0})},[c,T,E,$,g]),je=i.useCallback(()=>{S==null||S({name:O,address:V||void 0,virtualUrl:D||void 0,isVirtual:P})},[O,V,D,P,S]),Ne=i.useCallback(()=>{if(!B.trim()||!u)return;const a=U.split(",").map(R=>R.trim()).filter(Boolean);u(B.trim(),q,a.length>0?a:void 0),G(""),H("")},[B,q,U,u]),fe=i.useCallback(()=>{!L.trim()||!l||(l({label:L.trim(),amount:parseFloat(W)||0,currency:F}),K(""),Y(""))},[L,W,F,l]),ye=i.useMemo(()=>m.map(a=>({label:a.label,amount:a.amount})),[m]),_e=i.useMemo(()=>m.reduce((a,R)=>a+R.amount,0),[m]),be=((te=m[0])==null?void 0:te.currency)??"PLN",ke=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"Title",value:c,onChange:z,readOnly:!x}),e.jsx(o.NiceTextArea,{label:"Description",value:T,onChange:M,readOnly:!x,rows:3}),e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"Start"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:E,onChange:a=>ae(a.target.value),readOnly:!x})]}),e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"End"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:$,onChange:a=>ce(a.target.value),readOnly:!x})]})]}),x&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:ge,children:"Save details"})]}),Se=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Virtual event",checked:P,onChange:de,disabled:!x}),e.jsx(o.NiceTextInput,{label:"Venue name",value:O,onChange:re,readOnly:!x}),P?e.jsx(o.NiceTextInput,{label:"Virtual URL",value:D,onChange:oe,readOnly:!x}):e.jsx(o.NiceTextInput,{label:"Address",value:V,onChange:le,readOnly:!x}),x&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:je,children:"Save location"})]}),Ce=e.jsx("div",{className:"nice-event-planning__participants",children:p.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No participants yet."}):e.jsxs(e.Fragment,{children:[e.jsx(o.NiceAvatarGroup,{max:8,children:p.map(a=>e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl},a.id))}),e.jsx("ul",{className:"nice-event-planning__participant-list",children:p.map(a=>e.jsxs("li",{className:"nice-event-planning__participant",children:[e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl,size:"sm"}),e.jsx("span",{className:"nice-event-planning__participant-name",children:a.name}),e.jsx(o.NiceBadge,{size:"xs",subtle:!0,variant:Q(a.status),children:a.status})]},a.id))})]})}),we=e.jsxs("div",{className:"nice-event-planning__form",children:[h.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No surveys yet."}):h.map(a=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:a.question})," ",e.jsx(o.NiceBadge,{size:"xs",outline:!0,variant:"info",children:a.type}),a.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:a.options.map((R,Me)=>e.jsx(o.NiceButton,{size:"sm",variant:"outline",onClick:()=>n==null?void 0:n(a.id,R),children:R},Me))}),a.responses&&e.jsxs("span",{className:"nice-event-planning__muted",children:[a.responses.length," responses"]})]},a.id)),x&&u&&e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"New survey question",value:B,onChange:G,placeholder:"Question"}),e.jsx(o.NiceSelect,{label:"Type",value:q,onChange:a=>ue(a),options:[{value:"single",label:"Single choice"},{value:"multiple",label:"Multiple choice"},{value:"text",label:"Free text"},{value:"rating",label:"Rating"}]}),e.jsx(o.NiceTextInput,{label:"Options (comma-separated)",value:U,onChange:H,placeholder:"Yes, No, Maybe"}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:Ne,disabled:!B.trim(),children:"Add survey"})]})]}),Ie=e.jsxs("div",{className:"nice-event-planning__form",children:[m.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No billing items yet."}):e.jsx(o.NiceAmountBreakdown,{lines:[...ye,{label:"Total",amount:_e,isSummary:!0}],currency:be}),x&&l&&e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsx(o.NiceTextInput,{label:"Item",value:L,onChange:K,placeholder:"Catering"}),e.jsx(o.NiceTextInput,{label:"Amount",value:W,onChange:Y,placeholder:"0.00"}),e.jsx(o.NiceSelect,{label:"Currency",value:F,onChange:a=>me(a),options:["PLN","EUR","USD","GBP"]}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:fe,disabled:!L.trim(),children:"Add"})]})]}),ze=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Public event",checked:t.isPublic??!1,disabled:!x}),e.jsx(o.NiceTextInput,{label:"Max participants",value:t.maxParticipants!=null?String(t.maxParticipants):"",onChange:()=>{},readOnly:!x}),e.jsxs("div",{className:"nice-event-planning__muted",children:["Host: ",t.hostName," · Created ",new Date(t.createdAt).toLocaleDateString()]})]}),Ae={details:ke,location:Se,participants:Ce,surveys:we,budget:Ie,settings:ze},Te={details:"file",location:"home",participants:"users",surveys:"clipboard",budget:"file",settings:"settings"},Re={participants:p.length||void 0,surveys:h.length||void 0,budget:m.length||void 0},Be=J.map(a=>({id:a,label:a.charAt(0).toUpperCase()+a.slice(1),icon:e.jsx(A.NiceIcon,{name:Te[a],size:"sm"}),badge:Re[a],content:Ae[a]})),Le=e.jsxs("div",{className:"nice-event-planning__toolbar",children:[e.jsxs("div",{className:"nice-event-planning__toolbar-title",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsx(o.NiceBadge,{size:"sm",variant:Q(t.status),children:t.status})]}),e.jsx("span",{className:"nice-event-planning__toolbar-spacer"}),e.jsxs("div",{className:"nice-event-planning__toolbar-actions",children:[f&&e.jsx(o.NiceButton,{size:"sm",variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:()=>f({title:c,description:T}),children:"Save"}),r&&e.jsx(o.NiceButton,{size:"sm",variant:"success",leftIcon:e.jsx(A.NiceIcon,{name:"upload",size:"sm"}),onClick:r,children:"Publish"}),d&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"link",size:"sm"}),onClick:d,children:"Share"}),k&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"download",size:"sm"}),onClick:k,children:"Export"})]})]});return v==="micro"?e.jsx("div",{ref:C,className:`nice-event-planning nice-event-planning--micro ${s??""}`,style:I,children:e.jsxs("div",{className:"nice-event-planning__micro",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsxs("div",{className:"nice-event-planning__micro-body",children:[e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsxs("span",{className:"nice-event-planning__muted",children:[t.startDate?new Date(t.startDate).toLocaleString():"No date",(se=t.location)!=null&&se.name?` · ${t.location.name}`:""]})]}),e.jsx(o.NiceBadge,{size:"sm",variant:Q(t.status),children:t.status}),p.length>0&&e.jsx(o.NiceAvatarGroup,{max:4,size:"sm",children:p.map(a=>e.jsx(o.NiceAvatar,{name:a.name,src:a.avatarUrl,size:"sm"},a.id))})]})}):e.jsxs("div",{ref:C,className:`nice-event-planning nice-event-planning--${v} ${s??""}`,style:I,children:[Le,e.jsx(o.NiceTabs,{tabs:Be,activeTab:xe,onChange:ve})]})}),Ve={upcoming:"⏳",active:"▶️",voting:"🗳️",scored:"📊",completed:"✅",skipped:"⏭️"},De={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},qe=i.forwardRef(function(_,C){const{rounds:t,activeRoundId:p,onSelect:h,onStart:m,onEnd:v,onCreate:j,editable:b=!1,className:N,style:x}=_,f=[...t].sort((r,d)=>r.order-d.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${N??""}`,style:x,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",t.length,")"]}),b&&j&&e.jsx("button",{onClick:j,children:"+ Add Round"})]}),f.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:f.map(r=>{const d=r.id===p;return e.jsxs("div",{className:`nice-round-list__item ${d?"nice-round-list__item--active":""}`,onClick:()=>h==null?void 0:h(r),role:h?"button":void 0,tabIndex:h?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",r.order]}),e.jsx("span",{className:"nice-round-list__icon",children:Ve[r.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:r.name}),r.description&&e.jsx("small",{children:r.description}),r.type&&e.jsx("span",{className:"nice-round-list__type",children:r.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:De[r.status]},children:r.status}),r.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[r.durationMinutes,"m"]}),r.winnerIds&&r.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["🏆 ",r.winnerIds.length]}),b&&e.jsxs("div",{className:"nice-round-list__actions",onClick:k=>k.stopPropagation(),children:[r.status==="upcoming"&&m&&e.jsx("button",{onClick:()=>m(r.id),children:"Start"}),(r.status==="active"||r.status==="voting")&&v&&e.jsx("button",{onClick:()=>v(r.id),children:"End"})]})]},r.id)})})]})}),Ue=i.forwardRef(function(_,C){const{round:t,timerRunning:p=!1,remainingSeconds:h,onSubmitScore:m,onStart:v,onEnd:j,onSkip:b,editable:N=!1,footerActions:x,className:f,style:r}=_,[d,k]=i.useState({}),g=i.useCallback(n=>{const l=parseFloat(d[n]??"");isNaN(l)||!m||(m(n,l),k(s=>({...s,[n]:""})))},[d,m]),S=n=>{const l=Math.floor(n/60),s=n%60;return`${l}:${s.toString().padStart(2,"0")}`},u=t.scores?[...t.scores].sort((n,l)=>l.score-n.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${t.status} ${f??""}`,style:r,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",t.order]}),e.jsx("h3",{className:"nice-round-card__name",children:t.name}),e.jsx("span",{className:"nice-round-card__status",children:t.status})]}),t.description&&e.jsx("p",{className:"nice-round-card__description",children:t.description}),(p||h!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${p?"nice-round-card__timer--running":""}`,children:["⏱️ ",h!=null?S(h):"—"]}),u.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:u.map((n,l)=>e.jsxs("tr",{className:l<3?`nice-round-card__top-${l+1}`:"",children:[e.jsxs("td",{children:[n.rank??l+1,l===0?" 🥇":l===1?" 🥈":l===2?" 🥉":""]}),e.jsx("td",{children:n.participantName}),e.jsx("td",{children:n.score})]},n.participantId))})]})]}),m&&(t.status==="active"||t.status==="voting")&&u.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),u.map(n=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:n.participantName}),e.jsx("input",{type:"number",value:d[n.participantId]??"",onChange:l=>k(s=>({...s,[n.participantId]:l.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>g(n.participantId),children:"Submit"})]},n.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[N&&e.jsxs("div",{className:"nice-round-card__actions",children:[t.status==="upcoming"&&v&&e.jsx("button",{onClick:v,children:"▶ Start Round"}),(t.status==="active"||t.status==="voting")&&j&&e.jsx("button",{onClick:j,children:"⏹ End Round"}),t.status==="upcoming"&&b&&e.jsx("button",{onClick:b,children:"⏭ Skip"})]}),x]}),t.winnerIds&&t.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["🏆 Winners: ",t.winnerIds.length]})]})}),We=i.forwardRef(function(_,C){const{songs:t,onAdd:p,onRemove:h,onVote:m,onSearch:v,showQueue:j=!0,readOnly:b=!1,className:N,style:x}=_,[f,r]=i.useState(""),d=i.useMemo(()=>{if(!f.trim())return t;const n=f.toLowerCase();return t.filter(l=>l.title.toLowerCase().includes(n)||l.artist.toLowerCase().includes(n))},[t,f]),k=i.useMemo(()=>t.filter(n=>n.isQueued),[t]),g=t.find(n=>n.isPlaying),S=n=>{r(n),v==null||v(n)},u=n=>{if(!n)return"";const l=Math.floor(n/60),s=n%60;return`${l}:${s.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${N??""}`,style:x,children:[g&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"🎵 Now Playing"}),g.albumArt&&e.jsx("img",{src:g.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:g.title}),e.jsx("span",{children:g.artist})]}),e.jsx("input",{type:"text",value:f,onChange:n=>S(n.target.value),placeholder:"Search songs…",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:d.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):d.map(n=>e.jsxs("div",{className:`nice-song-picker__item ${n.isPlaying?"nice-song-picker__item--playing":""}`,children:[n.albumArt&&e.jsx("img",{src:n.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:n.title}),e.jsx("span",{children:n.artist}),n.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:u(n.duration)}),n.addedByName&&e.jsxs("small",{children:["Added by ",n.addedByName]})]}),!b&&e.jsxs("div",{className:"nice-song-picker__actions",children:[m&&e.jsxs("button",{onClick:()=>m(n.id),children:["👍 ",n.votes??0]}),p&&!n.isQueued&&e.jsx("button",{onClick:()=>p(n.id),children:"+ Queue"}),h&&n.isQueued&&e.jsx("button",{onClick:()=>h(n.id),children:"Remove"})]})]},n.id))}),j&&k.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",k.length,")"]}),k.map((n,l)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[l+1,"."]}),e.jsxs("span",{children:[n.title," — ",n.artist]})]},n.id))]})]})}),Fe=i.forwardRef(function(_,C){const{songs:t,queue:p=[],onEnqueue:h,onDequeue:m,onNext:v,nowPlayingId:j,readOnly:b=!1,className:N,style:x}=_,[f,r]=i.useState(""),[d,k]=i.useState(""),g=t.find(s=>s.id===j),S=i.useMemo(()=>{let s=t;if(f.trim()){const I=f.toLowerCase();s=s.filter(c=>c.title.toLowerCase().includes(I)||c.artist.toLowerCase().includes(I))}return d&&(s=s.filter(I=>I.difficulty===d)),s},[t,f,d]),u=i.useMemo(()=>new Set(p.map(s=>s.id)),[p]),n=["easy","medium","hard","expert"],l=s=>{switch(s){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:C,className:`nice-karaoke-picker ${N??""}`,style:x,children:[g&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"🎤 Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:g.title})," — ",g.artist,g.performerName&&e.jsxs("span",{children:[" (by ",g.performerName,")"]})]}),!b&&v&&e.jsx("button",{onClick:v,style:{marginTop:8},children:"Skip / Next ⏭"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:f,onChange:s=>r(s.target.value),placeholder:"Search songs or artists…",style:{flex:1}}),e.jsxs("select",{value:d,onChange:s=>k(s.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),n.map(s=>e.jsx("option",{value:s,children:s},s))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:S.length===0?e.jsx("p",{children:"No songs match your search."}):S.map(s=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:s.title})," — ",s.artist,s.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:l(s.difficulty),fontWeight:600},children:["[",s.difficulty,"]"]}),s.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"📝"}),s.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",s.language,")"]})]}),!b&&e.jsx("div",{children:u.has(s.id)?e.jsx("button",{onClick:()=>m==null?void 0:m(s.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>h==null?void 0:h(s.id),children:"🎤 Sing"})})]},s.id))}),p.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["🎶 Queue (",p.length,")"]}),p.map((s,I)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[I+1,"."]})," ",s.title," — ",s.artist,s.performerName&&e.jsxs("em",{children:[" (",s.performerName,")"]})]}),!b&&m&&e.jsx("button",{onClick:()=>m(s.id),style:{fontSize:12},children:"✕"})]},s.id))]})]})}),ie={game:y.NtdGamepad,music:y.NtdMusic,dance:y.NtdMusic,quiz:y.NtdHelp,karaoke:y.NtdMicrophone,photo:y.NtdCamera,custom:y.NtdSparkle},Qe={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},Ge=i.forwardRef(function(_,C){const{attractions:t,onSelect:p,onDeselect:h,onVote:m,selectedIds:v=[],maxSelections:j,showVotes:b=!0,readOnly:N=!1,layout:x="grid",className:f,style:r}=_,[d,k]=i.useState(""),[g,S]=i.useState(""),u=i.useMemo(()=>new Set(v),[v]),n=i.useMemo(()=>{const c=new Set(t.map(z=>z.category));return Array.from(c)},[t]),l=i.useMemo(()=>{let c=t;if(d&&(c=c.filter(z=>z.category===d)),g.trim()){const z=g.toLowerCase();c=c.filter(T=>{var M;return T.name.toLowerCase().includes(z)||((M=T.description)==null?void 0:M.toLowerCase().includes(z))})}return c},[t,d,g]),s=!j||u.size<j,I=c=>{N||(u.has(c)?h==null||h(c):s&&(p==null||p(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${f??""}`,style:{color:"var(--text-primary)",...r},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),j&&e.jsxs("span",{style:{color:"var(--text-secondary, #64748b)",fontSize:14},children:[u.size,"/",j," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:g,onChange:c=>S(c.target.value),placeholder:"Search attractions…",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>k(""),style:{fontWeight:d?400:700},children:"All"}),n.map(c=>e.jsxs("button",{onClick:()=>k(c===d?"":c),style:{fontWeight:c===d?700:400,display:"inline-flex",alignItems:"center",gap:4},children:[i.createElement(ie[c],{size:14})," ",Qe[c]]},c))]}),e.jsx("div",{style:{display:x==="grid"?"grid":"flex",gridTemplateColumns:x==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:x==="list"?"column":void 0},children:l.length===0?e.jsx("p",{children:"No attractions found."}):l.map(c=>{const z=u.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:z?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",borderRadius:8,padding:12,cursor:N?"default":"pointer",background:z?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",transition:"all 0.2s"},onClick:()=>I(c.id),children:[c.imageUrl&&e.jsx("img",{src:c.imageUrl,alt:c.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{style:{display:"inline-flex"},children:i.createElement(ie[c.category],{size:16})}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[b&&e.jsxs("span",{style:{fontSize:13,display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(y.NtdThumbsUp,{size:14})," ",c.votes??0]}),!N&&m&&e.jsx("button",{onClick:T=>{T.stopPropagation(),m(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),He={game:y.NtdGamepad,music:y.NtdMusic,dance:y.NtdMusic,quiz:y.NtdHelp,karaoke:y.NtdMicrophone,photo:y.NtdCamera,custom:y.NtdSparkle},Ke=i.forwardRef(function(_,C){const{attractions:t,onVote:p,onUnvote:h,votedIds:m=[],maxVotes:v,closed:j=!1,sortBy:b="votes",showResults:N=!0,className:x,style:f}=_,r=i.useMemo(()=>new Set(m),[m]),d=v?v-r.size:void 0,k=i.useMemo(()=>{const n=[...t];switch(b){case"votes":n.sort((l,s)=>(s.votes??0)-(l.votes??0));break;case"name":n.sort((l,s)=>l.name.localeCompare(s.name));break;case"category":n.sort((l,s)=>l.category.localeCompare(s.category));break}return n},[t,b]),g=i.useMemo(()=>Math.max(...t.map(n=>n.votes??0),1),[t]),S=n=>{j||(r.has(n)?h==null||h(n):(!d||d>0)&&(p==null||p(n)))},u=n=>{switch(n){case 0:return e.jsx(y.NtdTrophy,{size:18,primaryColor:"#f59e0b",title:"1st place"});case 1:return e.jsx(y.NtdMedal,{size:18,primaryColor:"#94a3b8",title:"2nd place"});case 2:return e.jsx(y.NtdMedal,{size:18,primaryColor:"#b45309",title:"3rd place"});default:return`${n+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${x??""}`,style:{color:"var(--text-primary)",...f},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsxs("h3",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[e.jsx(y.NtdClipboardCheck,{size:20}),j?"Voting Results":"Vote for Attractions"]}),!j&&d!==void 0&&e.jsxs("span",{style:{fontSize:14,color:d>0?"var(--color-primary, #6366f1)":"var(--color-error, #ef4444)"},children:[d," vote",d!==1?"s":""," remaining"]})]}),j&&e.jsx("p",{style:{color:"var(--text-secondary, #64748b)",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:k.map((n,l)=>{const s=r.has(n.id),I=n.votes??0,c=N?`${Math.round(I/g*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:s?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",background:s?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",cursor:j?"default":"pointer",transition:"all 0.2s"},onClick:()=>S(n.id),children:[N&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:u(l)}),e.jsx("span",{style:{display:"inline-flex",fontSize:20},children:i.createElement(He[n.category],{size:20})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:n.name}),n.description&&e.jsx("div",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.description}),N&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"var(--bg-tertiary, #e2e8f0)",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"var(--color-primary, #6366f1)",borderRadius:3,transition:"width 0.3s"}})})]}),N&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:I}),!j&&e.jsx("button",{onClick:z=>{z.stopPropagation(),S(n.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:s?"var(--color-error, #ef4444)":"var(--color-primary, #6366f1)",color:"#fff",cursor:"pointer",fontSize:13},children:s?"Unvote":"Vote"})]},n.id)})}),N&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"var(--text-secondary, #64748b)"},children:["Total votes: ",t.reduce((n,l)=>n+(l.votes??0),0)]})]})});exports.NiceAttractionPicker=Ge;exports.NiceAttractionVoting=Ke;exports.NiceEventMedia=Ee;exports.NiceEventPlanning=Oe;exports.NiceKaraokePicker=Fe;exports.NiceRoundCard=Ue;exports.NiceRoundList=qe;exports.NiceSongPicker=We;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("@nice2dev/icons"),o=require("@nice2dev/ui"),a=require("react"),A=require("@nice2dev/ui-core"),Oe=({item:I})=>{const[f,k]=a.useState(!1),t=I.thumbnailUrl??I.url;return I.type==="video"?e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx(N.NtdPlay,{size:26})}):f||!t?e.jsx("div",{className:"nice-event-media__broken",title:"Image unavailable",children:e.jsx(N.NtdImage,{size:24})}):e.jsx("img",{src:t,alt:I.caption??"",className:"nice-event-media__thumb",loading:"lazy",onError:()=>k(!0)})},$e=a.forwardRef(function(f,k){const{items:t,onUpload:p,onDelete:h,onLike:m,onItemClick:x,layout:v="grid",uploadEnabled:y=!0,typeFilter:g="all",className:S,style:_}=f,[i,d]=a.useState(""),b=a.useMemo(()=>g==="all"?t:t.filter(u=>u.type===g),[t,g]),j=u=>{const n=u[0];!n||!p||(p(n,i.trim()||void 0),d(""))},C=v==="list";return e.jsxs("div",{ref:k,className:`nice-event-media nice-event-media--${v} ${S??""}`,style:_,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",b.length,")"]})}),y&&p&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx(o.NiceUpload,{accept:"image/*,video/*",multiple:!1,imagePreview:!1,onFilesSelected:j}),e.jsx(o.NiceTextInput,{value:i,onChange:d,placeholder:"Add a caption…"})]}),b.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx(o.NiceCardGroup,{columns:C?1:void 0,minColumnWidth:200,gap:12,align:"stretch",children:b.map(u=>e.jsxs("div",{className:`nice-event-media__card${C?" nice-event-media__card--row":""}`,onClick:()=>x==null?void 0:x(u),role:x?"button":void 0,tabIndex:x?0:void 0,children:[e.jsx(Oe,{item:u}),e.jsxs("div",{className:"nice-event-media__body",children:[u.caption&&e.jsx("span",{className:"nice-event-media__caption",children:u.caption}),u.uploadedByName&&e.jsx("span",{className:"nice-event-media__uploader",children:u.uploadedByName}),e.jsxs("div",{className:"nice-event-media__actions",children:[m&&e.jsxs("button",{type:"button",className:"nice-event-media__action",onClick:n=>{n.stopPropagation(),m(u.id)},"aria-label":"Like",children:[e.jsx(N.NtdHeart,{size:15})," ",u.likes??0]}),h&&e.jsx("button",{type:"button",className:"nice-event-media__action nice-event-media__action--danger",onClick:n=>{n.stopPropagation(),h(u.id)},"aria-label":"Delete",children:e.jsx(N.NtdTrash,{size:15})})]})]})]},u.id))})]})});function G(I){const f=I.toLowerCase();return["active","live","published","completed","confirmed"].includes(f)?"success":["cancelled","canceled","rejected","failed"].includes(f)?"error":["scheduled","pending","planning"].includes(f)?"info":["draft","archived"].includes(f)?"secondary":"warning"}const Ve={micro:[],compact:["details","location","budget"],normal:["details","location","participants","surveys","budget"],full:["details","location","participants","surveys","budget","settings"]},De=a.forwardRef(function(f,k){var Z,ee,ne,te,se,ie;const{event:t,participants:p=[],surveys:h=[],billing:m=[],displayMode:x="normal",tabs:v,activeTab:y,onTabChange:g,tabsIconOnly:S=!0,tabsCentered:_="auto",editable:i=!1,onSave:d,onPublish:b,onShare:j,onExport:C,onUpdateEvent:u,onUpdateLocation:n,onAddSurvey:r,onSurveyRespond:s,onAddBilling:w,className:l,style:z}=f,[T,M]=a.useState(t.title),[P,ce]=a.useState(t.description??""),[O,re]=a.useState(t.startDate??""),[$,le]=a.useState(t.endDate??""),[V,oe]=a.useState(((Z=t.location)==null?void 0:Z.name)??""),[D,de]=a.useState(((ee=t.location)==null?void 0:ee.address)??""),[q,ue]=a.useState(((ne=t.location)==null?void 0:ne.virtualUrl)??""),[E,me]=a.useState(((te=t.location)==null?void 0:te.isVirtual)??!1),[B,H]=a.useState(""),[U,pe]=a.useState("single"),[W,K]=a.useState(""),[L,Y]=a.useState(""),[F,J]=a.useState(""),[Q,he]=a.useState("PLN"),X=v??Ve[x],[xe,ve]=a.useState(X[0]??"details"),ge=y??xe,je=a.useCallback(c=>{const R=c;y===void 0&&ve(R),g==null||g(R)},[y,g]),Ne=a.useCallback(()=>{u==null||u({title:T,description:P||void 0,startDate:O||void 0,endDate:$||void 0})},[T,P,O,$,u]),fe=a.useCallback(()=>{n==null||n({name:V,address:D||void 0,virtualUrl:q||void 0,isVirtual:E})},[V,D,q,E,n]),ye=a.useCallback(()=>{if(!B.trim()||!r)return;const c=W.split(",").map(R=>R.trim()).filter(Boolean);r(B.trim(),U,c.length>0?c:void 0),H(""),K("")},[B,U,W,r]),_e=a.useCallback(()=>{!L.trim()||!w||(w({label:L.trim(),amount:parseFloat(F)||0,currency:Q}),Y(""),J(""))},[L,F,Q,w]),be=a.useMemo(()=>m.map(c=>({label:c.label,amount:c.amount})),[m]),ke=a.useMemo(()=>m.reduce((c,R)=>c+R.amount,0),[m]),Se=((se=m[0])==null?void 0:se.currency)??"PLN",Ce=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"Title",value:T,onChange:M,readOnly:!i}),e.jsx(o.NiceTextArea,{label:"Description",value:P,onChange:ce,readOnly:!i,rows:3}),e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"Start"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:O,onChange:c=>re(c.target.value),readOnly:!i})]}),e.jsxs("label",{className:"nice-field",children:[e.jsx("span",{className:"nice-field__label",children:"End"}),e.jsx("input",{className:"nice-input",type:"datetime-local",value:$,onChange:c=>le(c.target.value),readOnly:!i})]})]}),i&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:Ne,children:"Save details"})]}),we=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Virtual event",checked:E,onChange:me,disabled:!i}),e.jsx(o.NiceTextInput,{label:"Venue name",value:V,onChange:oe,readOnly:!i}),E?e.jsx(o.NiceTextInput,{label:"Virtual URL",value:q,onChange:ue,readOnly:!i}):e.jsx(o.NiceTextInput,{label:"Address",value:D,onChange:de,readOnly:!i}),i&&e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:fe,children:"Save location"})]}),Ie=e.jsx("div",{className:"nice-event-planning__participants",children:p.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No participants yet."}):e.jsxs(e.Fragment,{children:[e.jsx(o.NiceAvatarGroup,{max:8,children:p.map(c=>e.jsx(o.NiceAvatar,{name:c.name,src:c.avatarUrl},c.id))}),e.jsx("ul",{className:"nice-event-planning__participant-list",children:p.map(c=>e.jsxs("li",{className:"nice-event-planning__participant",children:[e.jsx(o.NiceAvatar,{name:c.name,src:c.avatarUrl,size:"sm"}),e.jsx("span",{className:"nice-event-planning__participant-name",children:c.name}),e.jsx(o.NiceBadge,{size:"xs",subtle:!0,variant:G(c.status),children:c.status})]},c.id))})]})}),ze=e.jsxs("div",{className:"nice-event-planning__form",children:[h.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No surveys yet."}):h.map(c=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:c.question})," ",e.jsx(o.NiceBadge,{size:"xs",outline:!0,variant:"info",children:c.type}),c.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:c.options.map((R,Ee)=>e.jsx(o.NiceButton,{size:"sm",variant:"outline",onClick:()=>s==null?void 0:s(c.id,R),children:R},Ee))}),c.responses&&e.jsxs("span",{className:"nice-event-planning__muted",children:[c.responses.length," responses"]})]},c.id)),i&&r&&e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceTextInput,{label:"New survey question",value:B,onChange:H,placeholder:"Question"}),e.jsx(o.NiceSelect,{label:"Type",value:U,onChange:c=>pe(c),options:[{value:"single",label:"Single choice"},{value:"multiple",label:"Multiple choice"},{value:"text",label:"Free text"},{value:"rating",label:"Rating"}]}),e.jsx(o.NiceTextInput,{label:"Options (comma-separated)",value:W,onChange:K,placeholder:"Yes, No, Maybe"}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:ye,disabled:!B.trim(),children:"Add survey"})]})]}),Ae=e.jsxs("div",{className:"nice-event-planning__form",children:[m.length===0?e.jsx("p",{className:"nice-event-planning__empty",children:"No billing items yet."}):e.jsx(o.NiceAmountBreakdown,{lines:[...be,{label:"Total",amount:ke,isSummary:!0}],currency:Se}),i&&w&&e.jsxs("div",{className:"nice-event-planning__row",children:[e.jsx(o.NiceTextInput,{label:"Item",value:L,onChange:Y,placeholder:"Catering"}),e.jsx(o.NiceTextInput,{label:"Amount",value:F,onChange:J,placeholder:"0.00"}),e.jsx(o.NiceSelect,{label:"Currency",value:Q,onChange:c=>he(c),options:["PLN","EUR","USD","GBP"]}),e.jsx(o.NiceButton,{variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"plus",size:"sm"}),onClick:_e,disabled:!L.trim(),children:"Add"})]})]}),Te=e.jsxs("div",{className:"nice-event-planning__form",children:[e.jsx(o.NiceToggle,{label:"Public event",checked:t.isPublic??!1,disabled:!i}),e.jsx(o.NiceTextInput,{label:"Max participants",value:t.maxParticipants!=null?String(t.maxParticipants):"",onChange:()=>{},readOnly:!i}),e.jsxs("div",{className:"nice-event-planning__muted",children:["Host: ",t.hostName," · Created ",new Date(t.createdAt).toLocaleDateString()]})]}),Re={details:Ce,location:we,participants:Ie,surveys:ze,budget:Ae,settings:Te},Be={details:"file",location:"home",participants:"users",surveys:"clipboard",budget:"file",settings:"settings"},Le={participants:p.length||void 0,surveys:h.length||void 0,budget:m.length||void 0},Me=X.map(c=>({id:c,label:c.charAt(0).toUpperCase()+c.slice(1),icon:e.jsx(A.NiceIcon,{name:Be[c],size:"sm"}),badge:Le[c],content:Re[c]})),Pe=e.jsxs("div",{className:"nice-event-planning__toolbar",children:[e.jsxs("div",{className:"nice-event-planning__toolbar-title",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsx(o.NiceBadge,{size:"sm",variant:G(t.status),children:t.status})]}),e.jsx("span",{className:"nice-event-planning__toolbar-spacer"}),e.jsxs("div",{className:"nice-event-planning__toolbar-actions",children:[d&&e.jsx(o.NiceButton,{size:"sm",variant:"primary",leftIcon:e.jsx(A.NiceIcon,{name:"check",size:"sm"}),onClick:()=>d({title:T,description:P}),children:"Save"}),b&&e.jsx(o.NiceButton,{size:"sm",variant:"success",leftIcon:e.jsx(A.NiceIcon,{name:"upload",size:"sm"}),onClick:b,children:"Publish"}),j&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"link",size:"sm"}),onClick:j,children:"Share"}),C&&e.jsx(o.NiceButton,{size:"sm",variant:"ghost",leftIcon:e.jsx(A.NiceIcon,{name:"download",size:"sm"}),onClick:C,children:"Export"})]})]});return x==="micro"?e.jsx("div",{ref:k,className:`nice-event-planning nice-event-planning--micro ${l??""}`,style:z,children:e.jsxs("div",{className:"nice-event-planning__micro",children:[e.jsx(A.NiceIcon,{name:"calendar",size:"md"}),e.jsxs("div",{className:"nice-event-planning__micro-body",children:[e.jsx("span",{className:"nice-event-planning__title",children:t.title}),e.jsxs("span",{className:"nice-event-planning__muted",children:[t.startDate?new Date(t.startDate).toLocaleString():"No date",(ie=t.location)!=null&&ie.name?` · ${t.location.name}`:""]})]}),e.jsx(o.NiceBadge,{size:"sm",variant:G(t.status),children:t.status}),p.length>0&&e.jsx(o.NiceAvatarGroup,{max:4,size:"sm",children:p.map(c=>e.jsx(o.NiceAvatar,{name:c.name,src:c.avatarUrl,size:"sm"},c.id))})]})}):e.jsxs("div",{ref:k,className:`nice-event-planning nice-event-planning--${x} ${l??""}`,style:z,children:[Pe,e.jsx(o.NiceTabs,{tabs:Me,activeTab:ge,onChange:je,iconOnly:S,centered:_})]})}),qe={upcoming:"⏳",active:"▶️",voting:"🗳️",scored:"📊",completed:"✅",skipped:"⏭️"},Ue={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},We=a.forwardRef(function(f,k){const{rounds:t,activeRoundId:p,onSelect:h,onStart:m,onEnd:x,onCreate:v,editable:y=!1,className:g,style:S}=f,_=[...t].sort((i,d)=>i.order-d.order);return e.jsxs("div",{ref:k,className:`nice-round-list ${g??""}`,style:S,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",t.length,")"]}),y&&v&&e.jsx("button",{onClick:v,children:"+ Add Round"})]}),_.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:_.map(i=>{const d=i.id===p;return e.jsxs("div",{className:`nice-round-list__item ${d?"nice-round-list__item--active":""}`,onClick:()=>h==null?void 0:h(i),role:h?"button":void 0,tabIndex:h?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",i.order]}),e.jsx("span",{className:"nice-round-list__icon",children:qe[i.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:i.name}),i.description&&e.jsx("small",{children:i.description}),i.type&&e.jsx("span",{className:"nice-round-list__type",children:i.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:Ue[i.status]},children:i.status}),i.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[i.durationMinutes,"m"]}),i.winnerIds&&i.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["🏆 ",i.winnerIds.length]}),y&&e.jsxs("div",{className:"nice-round-list__actions",onClick:b=>b.stopPropagation(),children:[i.status==="upcoming"&&m&&e.jsx("button",{onClick:()=>m(i.id),children:"Start"}),(i.status==="active"||i.status==="voting")&&x&&e.jsx("button",{onClick:()=>x(i.id),children:"End"})]})]},i.id)})})]})}),Fe=a.forwardRef(function(f,k){const{round:t,timerRunning:p=!1,remainingSeconds:h,onSubmitScore:m,onStart:x,onEnd:v,onSkip:y,editable:g=!1,footerActions:S,className:_,style:i}=f,[d,b]=a.useState({}),j=a.useCallback(n=>{const r=parseFloat(d[n]??"");isNaN(r)||!m||(m(n,r),b(s=>({...s,[n]:""})))},[d,m]),C=n=>{const r=Math.floor(n/60),s=n%60;return`${r}:${s.toString().padStart(2,"0")}`},u=t.scores?[...t.scores].sort((n,r)=>r.score-n.score):[];return e.jsxs("div",{ref:k,className:`nice-round-card nice-round-card--${t.status} ${_??""}`,style:i,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",t.order]}),e.jsx("h3",{className:"nice-round-card__name",children:t.name}),e.jsx("span",{className:"nice-round-card__status",children:t.status})]}),t.description&&e.jsx("p",{className:"nice-round-card__description",children:t.description}),(p||h!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${p?"nice-round-card__timer--running":""}`,children:["⏱️ ",h!=null?C(h):"—"]}),u.length>0&&e.jsxs("div",{className:"nice-round-card__scoreboard",children:[e.jsx("h4",{children:"Scoreboard"}),e.jsxs("table",{className:"nice-round-card__scores-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Participant"}),e.jsx("th",{children:"Score"})]})}),e.jsx("tbody",{children:u.map((n,r)=>e.jsxs("tr",{className:r<3?`nice-round-card__top-${r+1}`:"",children:[e.jsxs("td",{children:[n.rank??r+1,r===0?" 🥇":r===1?" 🥈":r===2?" 🥉":""]}),e.jsx("td",{children:n.participantName}),e.jsx("td",{children:n.score})]},n.participantId))})]})]}),m&&(t.status==="active"||t.status==="voting")&&u.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),u.map(n=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:n.participantName}),e.jsx("input",{type:"number",value:d[n.participantId]??"",onChange:r=>b(s=>({...s,[n.participantId]:r.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>j(n.participantId),children:"Submit"})]},n.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[g&&e.jsxs("div",{className:"nice-round-card__actions",children:[t.status==="upcoming"&&x&&e.jsx("button",{onClick:x,children:"▶ Start Round"}),(t.status==="active"||t.status==="voting")&&v&&e.jsx("button",{onClick:v,children:"⏹ End Round"}),t.status==="upcoming"&&y&&e.jsx("button",{onClick:y,children:"⏭ Skip"})]}),S]}),t.winnerIds&&t.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["🏆 Winners: ",t.winnerIds.length]})]})}),Qe=a.forwardRef(function(f,k){const{songs:t,onAdd:p,onRemove:h,onVote:m,onSearch:x,showQueue:v=!0,readOnly:y=!1,className:g,style:S}=f,[_,i]=a.useState(""),d=a.useMemo(()=>{if(!_.trim())return t;const n=_.toLowerCase();return t.filter(r=>r.title.toLowerCase().includes(n)||r.artist.toLowerCase().includes(n))},[t,_]),b=a.useMemo(()=>t.filter(n=>n.isQueued),[t]),j=t.find(n=>n.isPlaying),C=n=>{i(n),x==null||x(n)},u=n=>{if(!n)return"";const r=Math.floor(n/60),s=n%60;return`${r}:${s.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:k,className:`nice-song-picker ${g??""}`,style:S,children:[j&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"🎵 Now Playing"}),j.albumArt&&e.jsx("img",{src:j.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:j.title}),e.jsx("span",{children:j.artist})]}),e.jsx("input",{type:"text",value:_,onChange:n=>C(n.target.value),placeholder:"Search songs…",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:d.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):d.map(n=>e.jsxs("div",{className:`nice-song-picker__item ${n.isPlaying?"nice-song-picker__item--playing":""}`,children:[n.albumArt&&e.jsx("img",{src:n.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:n.title}),e.jsx("span",{children:n.artist}),n.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:u(n.duration)}),n.addedByName&&e.jsxs("small",{children:["Added by ",n.addedByName]})]}),!y&&e.jsxs("div",{className:"nice-song-picker__actions",children:[m&&e.jsxs("button",{onClick:()=>m(n.id),children:["👍 ",n.votes??0]}),p&&!n.isQueued&&e.jsx("button",{onClick:()=>p(n.id),children:"+ Queue"}),h&&n.isQueued&&e.jsx("button",{onClick:()=>h(n.id),children:"Remove"})]})]},n.id))}),v&&b.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",b.length,")"]}),b.map((n,r)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[r+1,"."]}),e.jsxs("span",{children:[n.title," — ",n.artist]})]},n.id))]})]})}),Ge=a.forwardRef(function(f,k){const{songs:t,queue:p=[],onEnqueue:h,onDequeue:m,onNext:x,nowPlayingId:v,readOnly:y=!1,className:g,style:S}=f,[_,i]=a.useState(""),[d,b]=a.useState(""),j=t.find(s=>s.id===v),C=a.useMemo(()=>{let s=t;if(_.trim()){const w=_.toLowerCase();s=s.filter(l=>l.title.toLowerCase().includes(w)||l.artist.toLowerCase().includes(w))}return d&&(s=s.filter(w=>w.difficulty===d)),s},[t,_,d]),u=a.useMemo(()=>new Set(p.map(s=>s.id)),[p]),n=["easy","medium","hard","expert"],r=s=>{switch(s){case"easy":return"#4caf50";case"medium":return"#ff9800";case"hard":return"#f44336";case"expert":return"#9c27b0";default:return"#999"}};return e.jsxs("div",{ref:k,className:`nice-karaoke-picker ${g??""}`,style:S,children:[j&&e.jsxs("div",{className:"nice-karaoke-picker__now-singing",style:{borderLeft:"4px solid #e91e63",padding:"12px",marginBottom:12,background:"#fce4ec"},children:[e.jsx("span",{style:{fontWeight:600},children:"🎤 Now Singing"}),e.jsxs("div",{children:[e.jsx("strong",{children:j.title})," — ",j.artist,j.performerName&&e.jsxs("span",{children:[" (by ",j.performerName,")"]})]}),!y&&x&&e.jsx("button",{onClick:x,style:{marginTop:8},children:"Skip / Next ⏭"})]}),e.jsxs("div",{className:"nice-karaoke-picker__filters",style:{display:"flex",gap:8,marginBottom:12},children:[e.jsx("input",{type:"text",value:_,onChange:s=>i(s.target.value),placeholder:"Search songs or artists…",style:{flex:1}}),e.jsxs("select",{value:d,onChange:s=>b(s.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),n.map(s=>e.jsx("option",{value:s,children:s},s))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:C.length===0?e.jsx("p",{children:"No songs match your search."}):C.map(s=>e.jsxs("div",{className:"nice-karaoke-picker__song",style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 0",borderBottom:"1px solid #eee"},children:[e.jsxs("div",{children:[e.jsx("strong",{children:s.title})," — ",s.artist,s.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:r(s.difficulty),fontWeight:600},children:["[",s.difficulty,"]"]}),s.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"📝"}),s.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",s.language,")"]})]}),!y&&e.jsx("div",{children:u.has(s.id)?e.jsx("button",{onClick:()=>m==null?void 0:m(s.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>h==null?void 0:h(s.id),children:"🎤 Sing"})})]},s.id))}),p.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["🎶 Queue (",p.length,")"]}),p.map((s,w)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[w+1,"."]})," ",s.title," — ",s.artist,s.performerName&&e.jsxs("em",{children:[" (",s.performerName,")"]})]}),!y&&m&&e.jsx("button",{onClick:()=>m(s.id),style:{fontSize:12},children:"✕"})]},s.id))]})]})}),ae={game:N.NtdGamepad,music:N.NtdMusic,dance:N.NtdMusic,quiz:N.NtdHelp,karaoke:N.NtdMicrophone,photo:N.NtdCamera,custom:N.NtdSparkle},He={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},Ke=a.forwardRef(function(f,k){const{attractions:t,onSelect:p,onDeselect:h,onVote:m,selectedIds:x=[],maxSelections:v,showVotes:y=!0,readOnly:g=!1,layout:S="grid",className:_,style:i}=f,[d,b]=a.useState(""),[j,C]=a.useState(""),u=a.useMemo(()=>new Set(x),[x]),n=a.useMemo(()=>{const l=new Set(t.map(z=>z.category));return Array.from(l)},[t]),r=a.useMemo(()=>{let l=t;if(d&&(l=l.filter(z=>z.category===d)),j.trim()){const z=j.toLowerCase();l=l.filter(T=>{var M;return T.name.toLowerCase().includes(z)||((M=T.description)==null?void 0:M.toLowerCase().includes(z))})}return l},[t,d,j]),s=!v||u.size<v,w=l=>{g||(u.has(l)?h==null||h(l):s&&(p==null||p(l)))};return e.jsxs("div",{ref:k,className:`nice-attraction-picker ${_??""}`,style:{color:"var(--text-primary)",...i},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[e.jsx("h3",{style:{margin:0},children:"Attractions"}),v&&e.jsxs("span",{style:{color:"var(--text-secondary, #64748b)",fontSize:14},children:[u.size,"/",v," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:j,onChange:l=>C(l.target.value),placeholder:"Search attractions…",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>b(""),style:{fontWeight:d?400:700},children:"All"}),n.map(l=>e.jsxs("button",{onClick:()=>b(l===d?"":l),style:{fontWeight:l===d?700:400,display:"inline-flex",alignItems:"center",gap:4},children:[a.createElement(ae[l],{size:14})," ",He[l]]},l))]}),e.jsx("div",{style:{display:S==="grid"?"grid":"flex",gridTemplateColumns:S==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:S==="list"?"column":void 0},children:r.length===0?e.jsx("p",{children:"No attractions found."}):r.map(l=>{const z=u.has(l.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:z?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",borderRadius:8,padding:12,cursor:g?"default":"pointer",background:z?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",transition:"all 0.2s"},onClick:()=>w(l.id),children:[l.imageUrl&&e.jsx("img",{src:l.imageUrl,alt:l.name,style:{width:"100%",borderRadius:6,marginBottom:8,objectFit:"cover",maxHeight:120}}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[e.jsx("span",{style:{display:"inline-flex"},children:a.createElement(ae[l.category],{size:16})}),e.jsx("strong",{children:l.name})]}),l.description&&e.jsx("p",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",margin:"6px 0"},children:l.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[y&&e.jsxs("span",{style:{fontSize:13,display:"inline-flex",alignItems:"center",gap:4},children:[e.jsx(N.NtdThumbsUp,{size:14})," ",l.votes??0]}),!g&&m&&e.jsx("button",{onClick:T=>{T.stopPropagation(),m(l.id)},style:{fontSize:12},children:"Vote"})]})]},l.id)})})]})}),Ye={game:N.NtdGamepad,music:N.NtdMusic,dance:N.NtdMusic,quiz:N.NtdHelp,karaoke:N.NtdMicrophone,photo:N.NtdCamera,custom:N.NtdSparkle},Je=a.forwardRef(function(f,k){const{attractions:t,onVote:p,onUnvote:h,votedIds:m=[],maxVotes:x,closed:v=!1,sortBy:y="votes",showResults:g=!0,className:S,style:_}=f,i=a.useMemo(()=>new Set(m),[m]),d=x?x-i.size:void 0,b=a.useMemo(()=>{const n=[...t];switch(y){case"votes":n.sort((r,s)=>(s.votes??0)-(r.votes??0));break;case"name":n.sort((r,s)=>r.name.localeCompare(s.name));break;case"category":n.sort((r,s)=>r.category.localeCompare(s.category));break}return n},[t,y]),j=a.useMemo(()=>Math.max(...t.map(n=>n.votes??0),1),[t]),C=n=>{v||(i.has(n)?h==null||h(n):(!d||d>0)&&(p==null||p(n)))},u=n=>{switch(n){case 0:return e.jsx(N.NtdTrophy,{size:18,primaryColor:"#f59e0b",title:"1st place"});case 1:return e.jsx(N.NtdMedal,{size:18,primaryColor:"#94a3b8",title:"2nd place"});case 2:return e.jsx(N.NtdMedal,{size:18,primaryColor:"#b45309",title:"3rd place"});default:return`${n+1}.`}};return e.jsxs("div",{ref:k,className:`nice-attraction-voting ${S??""}`,style:{color:"var(--text-primary)",..._},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsxs("h3",{style:{margin:0,display:"inline-flex",alignItems:"center",gap:8},children:[e.jsx(N.NtdClipboardCheck,{size:20}),v?"Voting Results":"Vote for Attractions"]}),!v&&d!==void 0&&e.jsxs("span",{style:{fontSize:14,color:d>0?"var(--color-primary, #6366f1)":"var(--color-error, #ef4444)"},children:[d," vote",d!==1?"s":""," remaining"]})]}),v&&e.jsx("p",{style:{color:"var(--text-secondary, #64748b)",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:b.map((n,r)=>{const s=i.has(n.id),w=n.votes??0,l=g?`${Math.round(w/j*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:s?"2px solid var(--color-primary, #6366f1)":"1px solid var(--border-color, #cbd5e1)",background:s?"color-mix(in srgb, var(--color-primary) 12%, transparent)":"var(--bg-elevated, var(--bg-primary))",cursor:v?"default":"pointer",transition:"all 0.2s"},onClick:()=>C(n.id),children:[g&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:u(r)}),e.jsx("span",{style:{display:"inline-flex",fontSize:20},children:a.createElement(Ye[n.category],{size:20})}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:n.name}),n.description&&e.jsx("div",{style:{fontSize:13,color:"var(--text-secondary, #64748b)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.description}),g&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"var(--bg-tertiary, #e2e8f0)",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:l,background:"var(--color-primary, #6366f1)",borderRadius:3,transition:"width 0.3s"}})})]}),g&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:w}),!v&&e.jsx("button",{onClick:z=>{z.stopPropagation(),C(n.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:s?"var(--color-error, #ef4444)":"var(--color-primary, #6366f1)",color:"#fff",cursor:"pointer",fontSize:13},children:s?"Unvote":"Vote"})]},n.id)})}),g&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"var(--text-secondary, #64748b)"},children:["Total votes: ",t.reduce((n,r)=>n+(r.votes??0),0)]})]})});exports.NiceAttractionPicker=Ke;exports.NiceAttractionVoting=Je;exports.NiceEventMedia=$e;exports.NiceEventPlanning=De;exports.NiceKaraokePicker=Ge;exports.NiceRoundCard=Fe;exports.NiceRoundList=We;exports.NiceSongPicker=Qe;
package/dist/index.d.ts CHANGED
@@ -388,6 +388,10 @@ export declare interface NiceEventPlanningProps {
388
388
  activeTab?: EventPlanningTab;
389
389
  /** Active-tab change handler. */
390
390
  onTabChange?: (tab: EventPlanningTab) => void;
391
+ /** Show only the tab icons (labels in the tooltip). Default `true`. */
392
+ tabsIconOnly?: boolean;
393
+ /** Center the tab strip. `'auto'` (default) centers only when icon-only. */
394
+ tabsCentered?: boolean | 'auto';
391
395
  /** Whether editing is allowed. */
392
396
  editable?: boolean;
393
397
  /** Toolbar — Save handler (button shown when provided). */