@nice2dev/events 1.0.28 → 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,71 @@
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
+
55
+ ## 1.0.29
56
+
57
+ ### Patch Changes
58
+
59
+ - Library-wide consistency pass + showcase overhaul.
60
+ - **Universal app shell:** every genuine multi-panel editor/studio/designer/builder/workspace standardized onto `NiceAppShell` (slots + `flush`), incl. `NiceTeamsWorkspace` and `NiceAPIDesigner`. No public API changes — internal layout only.
61
+ - **Icons:** foreign icons (emoji, raw unicode glyphs, inline `<svg>`, FontAwesome) replaced with `@nice2dev/icons` / `NiceIcon` built-ins across the packages; ~110 built-in icon paths added to `NiceIcon`.
62
+ - **Control sizing:** every basic control now honours the full `xs · sm · md · lg · xl` size scale with working CSS — fixed `NiceCard`, `NiceAlert`, `NiceSkeleton`, `NiceDivider`, `NiceSearchInput`, `NiceCallout`, `NiceStatistic`, `NiceSegmentedControl`, `NiceCheckbox`, `NiceParagraph`, and a `NiceSpinner` CSS-shadow regression (`md` baseline unchanged). `NiceNumericInput` gained a `size` prop.
63
+ - **NiceKioskShell:** the `style` prop now overrides the default full-screen `position: fixed` (so it can be embedded contained).
64
+ - **Input devices + spatial navigation:** `NiceGamepad` / `NiceMicrophone` / `NiceDeviceManager` / `NiceDeviceTile` and `NavShell` spatial-navigation support.
65
+ - **Audio:** AudioVerse → `@nice2dev/ui-audio` parity (15 controls; optional `recharts` visualizers).
66
+ - **Display atoms + forms:** standardized atoms (`NiceBadge`/`NiceTag`/`NiceAvatarGroup`/`NiceProgress`/…), removed the deprecated `NiceStatusBadge` (migrated to `NiceBadge` variants), entity validation builder, selectable `NiceCard`.
67
+ - **Editors inside satellites** (`ui-ai`/`ui-api`/`ui-bi`/`ui-math`/`ui-video`/`ui-audio`/`events`) now declare `@nice2dev/ui` (and where used `@nice2dev/icons` / `@nice2dev/ui-core`) as peer dependencies.
68
+
3
69
  ## [0.2.0] — 2026-03-25
4
70
 
5
71
  ### Added (FAZA 7.6)
@@ -30,6 +96,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
30
96
  ## [0.1.0] — 2025-06-01
31
97
 
32
98
  ### Added
99
+
33
100
  - Shared event model types (Event, Participant, Round, Attraction, etc.)
34
101
  - EventService interface for API abstraction
35
102
  - `NiceEventChat` — real-time event chat with reactions and message types
package/README.md CHANGED
@@ -18,18 +18,16 @@ npm install @nice2dev/events
18
18
 
19
19
  ## Components
20
20
 
21
- | Component | Category | Description |
22
- |---|---|---|
23
- | `NiceEventChat` | Party | Real-time event chat with reactions and message types |
24
- | `NiceEventParticipants` | Party | Participant list with roles, status, and QR codes |
25
- | `NiceEventMedia` | Content | Media gallery with upload, photos, and collages |
26
- | `NiceEventPlanning` | Planning | Event planning with dates, location, surveys, billing |
27
- | `NiceRoundList` | Rounds | Round system list with status and scoring |
28
- | `NiceRoundCard` | Rounds | Individual round card with actions, timer, scoreboard |
29
- | `NiceSongPicker` | Music | Song selection for music events |
30
- | `NiceKaraokePicker` | Music | Karaoke song picker with queue management |
31
- | `NiceAttractionPicker` | Attractions | Attraction selection grid with categories |
32
- | `NiceAttractionVoting` | Attractions | Anonymous voting on attractions |
21
+ | Component | Category | Description |
22
+ | ---------------------- | ----------- | ----------------------------------------------------- |
23
+ | `NiceEventMedia` | Content | Media gallery with upload, photos, and collages |
24
+ | `NiceEventPlanning` | Planning | Event planning with dates, location, surveys, billing |
25
+ | `NiceRoundList` | Rounds | Round system list with status and scoring |
26
+ | `NiceRoundCard` | Rounds | Individual round card with actions, timer, scoreboard |
27
+ | `NiceSongPicker` | Music | Song selection for music events |
28
+ | `NiceKaraokePicker` | Music | Karaoke song picker with queue management |
29
+ | `NiceAttractionPicker` | Attractions | Attraction selection grid with categories |
30
+ | `NiceAttractionVoting` | Attractions | Anonymous voting on attractions |
33
31
 
34
32
  ## Types & Interfaces
35
33
 
@@ -43,14 +41,13 @@ npm install @nice2dev/events
43
41
  ## Usage
44
42
 
45
43
  ```tsx
46
- import { NiceEventChat, NiceEventPlanning, NiceRoundList } from '@nice2dev/events';
44
+ import { NiceEventPlanning, NiceRoundList } from '@nice2dev/events';
47
45
 
48
46
  function EventPage({ event }) {
49
47
  return (
50
48
  <>
51
49
  <NiceEventPlanning event={event} />
52
50
  <NiceRoundList rounds={event.rounds} />
53
- <NiceEventChat eventId={event.id} />
54
51
  </>
55
52
  );
56
53
  }
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),le=i.forwardRef(function(k,C){const{messages:s,currentUserId:f,onSend:m,onReact:x,reactions:j=["👍","❤️","😂","🎉","🔥"],readOnly:v=!1,placeholder:S="Type a message…",autoScroll:_=!0,className:g,style:b}=k,[l,h]=i.useState(""),N=i.useRef(null);i.useEffect(()=>{_&&N.current&&N.current.scrollIntoView({behavior:"smooth"})},[s.length,_]);const y=i.useCallback(()=>{!l.trim()||!m||(m(l.trim(),"text"),h(""))},[l,m]),p=a=>{a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),y())};return e.jsxs("div",{ref:C,className:`nice-event-chat ${g??""}`,style:b,children:[e.jsxs("div",{className:"nice-event-chat__messages",children:[s.length===0&&e.jsx("p",{className:"nice-event-chat__empty",children:"No messages yet. Start the conversation!"}),s.map(a=>{const t=a.senderId===f;return a.type==="system"||a.type==="announcement"?e.jsxs("div",{className:`nice-event-chat__system nice-event-chat__${a.type}`,children:[e.jsx("span",{children:a.content}),e.jsx("time",{children:a.timestamp})]},a.id):e.jsxs("div",{className:`nice-event-chat__bubble ${t?"nice-event-chat__bubble--own":""}`,children:[!t&&e.jsxs("div",{className:"nice-event-chat__sender",children:[a.senderAvatarUrl&&e.jsx("img",{src:a.senderAvatarUrl,alt:"",className:"nice-event-chat__avatar"}),e.jsx("strong",{children:a.senderName})]}),a.type==="image"?e.jsx("img",{src:a.content,alt:"Shared image",className:"nice-event-chat__image"}):e.jsx("p",{className:"nice-event-chat__text",children:a.content}),e.jsxs("div",{className:"nice-event-chat__meta",children:[e.jsx("time",{children:a.timestamp}),a.reactions&&Object.keys(a.reactions).length>0&&e.jsx("span",{className:"nice-event-chat__reactions",children:Object.entries(a.reactions).map(([n,u])=>e.jsxs("button",{className:"nice-event-chat__reaction",onClick:()=>x==null?void 0:x(a.id,n),children:[n," ",u]},n))})]}),x&&!v&&e.jsx("div",{className:"nice-event-chat__react-bar",children:j.map(n=>e.jsx("button",{onClick:()=>x(a.id,n),title:n,children:n},n))})]},a.id)}),e.jsx("div",{ref:N})]}),!v&&e.jsxs("div",{className:"nice-event-chat__input-bar",children:[e.jsx("textarea",{value:l,onChange:a=>h(a.target.value),onKeyDown:p,placeholder:S,rows:1}),e.jsx("button",{onClick:y,disabled:!l.trim(),children:"Send"})]})]})}),G={invited:"#3b82f6",confirmed:"#22c55e",declined:"#ef4444","checked-in":"#8b5cf6","no-show":"#9ca3af"},H={host:"👑 Host","co-host":"🎯 Co-Host",moderator:"🛡️ Moderator",participant:"👤 Participant",spectator:"👁️ Spectator",vip:"⭐ VIP"},oe=i.forwardRef(function(k,C){const{participants:s,currentParticipantId:f,onInvite:m,onRemove:x,onRoleChange:j,onCheckIn:v,onParticipantClick:S,showQR:_=!1,editable:g=!1,maxParticipants:b,className:l,style:h}=k,[N,y]=i.useState(""),[p,a]=i.useState(""),t=i.useMemo(()=>{let u=s;if(p&&(u=u.filter(c=>c.status===p)),N.trim()){const c=N.toLowerCase();u=u.filter(o=>o.name.toLowerCase().includes(c))}return u},[s,p,N]),d=i.useMemo(()=>{const u=new Map,c=["host","co-host","moderator","vip","participant","spectator"];for(const o of c)u.set(o,[]);for(const o of t)u.has(o.role)||u.set(o.role,[]),u.get(o.role).push(o);return Array.from(u.entries()).filter(([,o])=>o.length>0)},[t]),n=i.useMemo(()=>{const u={};for(const c of s)u[c.status]=(u[c.status]??0)+1;return u},[s]);return e.jsxs("div",{ref:C,className:`nice-event-participants ${l??""}`,style:h,children:[e.jsxs("div",{className:"nice-event-participants__header",children:[e.jsxs("h3",{children:["Participants (",s.length,b?` / ${b}`:"",")"]}),g&&m&&e.jsx("button",{onClick:m,disabled:b?s.length>=b:!1,children:"+ Invite"})]}),e.jsx("div",{className:"nice-event-participants__summary",children:Object.entries(n).map(([u,c])=>e.jsxs("span",{className:"nice-event-participants__stat",children:[e.jsx("span",{className:"nice-event-participants__dot",style:{backgroundColor:G[u]}}),u,": ",c]},u))}),e.jsxs("div",{className:"nice-event-participants__toolbar",children:[e.jsx("input",{type:"text",value:N,onChange:u=>y(u.target.value),placeholder:"Search…"}),e.jsxs("select",{value:p,onChange:u=>a(u.target.value),children:[e.jsx("option",{value:"",children:"All"}),e.jsx("option",{value:"invited",children:"Invited"}),e.jsx("option",{value:"confirmed",children:"Confirmed"}),e.jsx("option",{value:"declined",children:"Declined"}),e.jsx("option",{value:"checked-in",children:"Checked In"}),e.jsx("option",{value:"no-show",children:"No Show"})]})]}),d.map(([u,c])=>e.jsxs("div",{className:"nice-event-participants__group",children:[e.jsxs("h4",{className:"nice-event-participants__role-label",children:[H[u]," (",c.length,")"]}),c.map(o=>e.jsxs("div",{className:`nice-event-participants__item ${o.id===f?"nice-event-participants__item--self":""}`,onClick:()=>S==null?void 0:S(o),children:[o.avatarUrl?e.jsx("img",{src:o.avatarUrl,alt:"",className:"nice-event-participants__avatar"}):e.jsx("span",{className:"nice-event-participants__avatar-placeholder",children:o.name.charAt(0)}),e.jsxs("div",{className:"nice-event-participants__info",children:[e.jsx("span",{className:"nice-event-participants__name",children:o.name}),e.jsx("span",{className:"nice-event-participants__status",style:{color:G[o.status]},children:o.status}),o.score!=null&&e.jsxs("span",{className:"nice-event-participants__score",children:["Score: ",o.score]})]}),_&&o.qrCode&&e.jsx("span",{className:"nice-event-participants__qr",title:"QR Code",children:"📱"}),g&&e.jsxs("div",{className:"nice-event-participants__actions",children:[j&&e.jsx("select",{value:o.role,onChange:w=>j(o.id,w.target.value),onClick:w=>w.stopPropagation(),children:Object.entries(H).map(([w,R])=>e.jsx("option",{value:w,children:R},w))}),v&&o.status==="confirmed"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),v(o.id)},children:"Check In"}),x&&o.role!=="host"&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(o.id)},children:"Remove"})]})]},o.id))]},u))]})}),de=i.forwardRef(function(k,C){const{items:s,onUpload:f,onDelete:m,onLike:x,onItemClick:j,layout:v="grid",uploadEnabled:S=!0,typeFilter:_="all",className:g,style:b}=k,[l,h]=i.useState(""),N=i.useMemo(()=>_==="all"?s:s.filter(p=>p.type===_),[s,_]),y=p=>{var t;const a=(t=p.target.files)==null?void 0:t[0];!a||!f||(f(a,l.trim()||void 0),h(""),p.target.value="")};return e.jsxs("div",{ref:C,className:`nice-event-media nice-event-media--${v} ${g??""}`,style:b,children:[e.jsx("div",{className:"nice-event-media__header",children:e.jsxs("h3",{children:["Media (",N.length,")"]})}),S&&f&&e.jsxs("div",{className:"nice-event-media__upload",children:[e.jsx("input",{type:"file",accept:"image/*,video/*",onChange:y}),e.jsx("input",{type:"text",value:l,onChange:p=>h(p.target.value),placeholder:"Add a caption…",className:"nice-event-media__caption-input"})]}),N.length===0?e.jsx("p",{className:"nice-event-media__empty",children:"No media yet."}):e.jsx("div",{className:`nice-event-media__gallery nice-event-media__gallery--${v}`,children:N.map(p=>e.jsxs("div",{className:"nice-event-media__item",onClick:()=>j==null?void 0:j(p),role:j?"button":void 0,children:[p.type==="photo"?e.jsx("img",{src:p.thumbnailUrl??p.url,alt:p.caption??"",className:"nice-event-media__thumb"}):e.jsx("div",{className:"nice-event-media__video-thumb",children:e.jsx("span",{children:"▶"})}),e.jsxs("div",{className:"nice-event-media__overlay",children:[p.caption&&e.jsx("span",{className:"nice-event-media__item-caption",children:p.caption}),e.jsx("span",{className:"nice-event-media__uploader",children:p.uploadedByName}),e.jsxs("div",{className:"nice-event-media__item-actions",children:[x&&e.jsxs("button",{onClick:a=>{a.stopPropagation(),x(p.id)},children:["❤️ ",p.likes??0]}),m&&e.jsx("button",{onClick:a=>{a.stopPropagation(),m(p.id)},children:"🗑️"})]})]})]},p.id))})]})}),ue=i.forwardRef(function(k,C){var q,F,Q,W,K;const{event:s,surveys:f=[],billing:m=[],onUpdateEvent:x,onUpdateLocation:j,onAddSurvey:v,onSurveyRespond:S,onAddBilling:_,editable:g=!1,className:b,style:l}=k,[h,N]=i.useState("details"),[y,p]=i.useState(s.title),[a,t]=i.useState(s.description??""),[d,n]=i.useState(s.startDate??""),[u,c]=i.useState(s.endDate??""),[o,w]=i.useState(((q=s.location)==null?void 0:q.name)??""),[R,J]=i.useState(((F=s.location)==null?void 0:F.address)??""),[O,X]=i.useState(((Q=s.location)==null?void 0:Q.virtualUrl)??""),[I,Z]=i.useState(((W=s.location)==null?void 0:W.isVirtual)??!1),[L,V]=i.useState(""),[M,ee]=i.useState("single"),[$,z]=i.useState(""),[E,D]=i.useState(""),[B,U]=i.useState(""),[T,te]=i.useState("PLN"),ne=i.useCallback(()=>{x==null||x({title:y,description:a||void 0,startDate:d||void 0,endDate:u||void 0})},[y,a,d,u,x]),se=i.useCallback(()=>{j==null||j({name:o,address:R||void 0,virtualUrl:O||void 0,isVirtual:I})},[o,R,O,I,j]),ie=i.useCallback(()=>{if(!L.trim()||!v)return;const r=$.split(",").map(P=>P.trim()).filter(Boolean);v(L.trim(),M,r.length>0?r:void 0),V(""),z("")},[L,M,$,v]),ae=i.useCallback(()=>{!E.trim()||!_||(_({label:E.trim(),amount:parseFloat(B)||0,currency:T}),D(""),U(""))},[E,B,T,_]),ce=m.reduce((r,P)=>r+P.amount,0);return e.jsxs("div",{ref:C,className:`nice-event-planning ${b??""}`,style:l,children:[e.jsx("div",{className:"nice-event-planning__tabs",children:["details","location","surveys","billing"].map(r=>e.jsx("button",{className:`nice-event-planning__tab ${h===r?"nice-event-planning__tab--active":""}`,onClick:()=>N(r),children:r.charAt(0).toUpperCase()+r.slice(1)},r))}),h==="details"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:["Title",e.jsx("input",{type:"text",value:y,onChange:r=>p(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["Description",e.jsx("textarea",{value:a,onChange:r=>t(r.target.value),readOnly:!g,rows:3})]}),e.jsxs("label",{children:["Start",e.jsx("input",{type:"datetime-local",value:d,onChange:r=>n(r.target.value),readOnly:!g})]}),e.jsxs("label",{children:["End",e.jsx("input",{type:"datetime-local",value:u,onChange:r=>c(r.target.value),readOnly:!g})]}),e.jsxs("div",{className:"nice-event-planning__status",children:["Status: ",e.jsx("strong",{children:s.status})]}),g&&e.jsx("button",{onClick:ne,children:"Save Details"})]}),h==="location"&&e.jsxs("div",{className:"nice-event-planning__section",children:[e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:I,onChange:r=>Z(r.target.checked),disabled:!g})," ","Virtual event"]}),e.jsxs("label",{children:["Venue Name",e.jsx("input",{type:"text",value:o,onChange:r=>w(r.target.value),readOnly:!g})]}),!I&&e.jsxs("label",{children:["Address",e.jsx("input",{type:"text",value:R,onChange:r=>J(r.target.value),readOnly:!g})]}),I&&e.jsxs("label",{children:["Virtual URL",e.jsx("input",{type:"url",value:O,onChange:r=>X(r.target.value),readOnly:!g})]}),g&&e.jsx("button",{onClick:se,children:"Save Location"})]}),h==="surveys"&&e.jsxs("div",{className:"nice-event-planning__section",children:[f.length===0?e.jsx("p",{children:"No surveys yet."}):f.map(r=>e.jsxs("div",{className:"nice-event-planning__survey",children:[e.jsx("strong",{children:r.question}),e.jsxs("span",{className:"nice-event-planning__survey-type",children:["(",r.type,")"]}),r.options&&e.jsx("div",{className:"nice-event-planning__survey-options",children:r.options.map((P,re)=>e.jsx("button",{onClick:()=>S==null?void 0:S(r.id,P),children:P},re))}),r.responses&&e.jsxs("span",{children:[r.responses.length," responses"]})]},r.id)),g&&v&&e.jsxs("div",{className:"nice-event-planning__add-survey",children:[e.jsx("h4",{children:"Add Survey"}),e.jsx("input",{type:"text",value:L,onChange:r=>V(r.target.value),placeholder:"Question"}),e.jsxs("select",{value:M,onChange:r=>ee(r.target.value),children:[e.jsx("option",{value:"single",children:"Single choice"}),e.jsx("option",{value:"multiple",children:"Multiple choice"}),e.jsx("option",{value:"text",children:"Free text"}),e.jsx("option",{value:"rating",children:"Rating"})]}),e.jsx("input",{type:"text",value:$,onChange:r=>z(r.target.value),placeholder:"Options (comma-separated)"}),e.jsx("button",{onClick:ie,disabled:!L.trim(),children:"Add"})]})]}),h==="billing"&&e.jsxs("div",{className:"nice-event-planning__section",children:[m.length===0?e.jsx("p",{children:"No billing items yet."}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"nice-event-planning__billing-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Item"}),e.jsx("th",{children:"Amount"}),e.jsx("th",{children:"Paid by"}),e.jsx("th",{children:"Status"})]})}),e.jsx("tbody",{children:m.map(r=>e.jsxs("tr",{children:[e.jsx("td",{children:r.label}),e.jsxs("td",{children:[r.amount.toFixed(2)," ",r.currency]}),e.jsx("td",{children:r.paidByName??"—"}),e.jsx("td",{children:r.isPaid?"✅ Paid":"⏳ Pending"})]},r.id))})]}),e.jsxs("div",{className:"nice-event-planning__billing-total",children:["Total:"," ",e.jsxs("strong",{children:[ce.toFixed(2)," ",((K=m[0])==null?void 0:K.currency)??""]})]})]}),g&&_&&e.jsxs("div",{className:"nice-event-planning__add-billing",children:[e.jsx("input",{type:"text",value:E,onChange:r=>D(r.target.value),placeholder:"Item"}),e.jsx("input",{type:"number",value:B,onChange:r=>U(r.target.value),placeholder:"Amount",min:0,step:.01}),e.jsxs("select",{value:T,onChange:r=>te(r.target.value),children:[e.jsx("option",{value:"PLN",children:"PLN"}),e.jsx("option",{value:"EUR",children:"EUR"}),e.jsx("option",{value:"USD",children:"USD"}),e.jsx("option",{value:"GBP",children:"GBP"})]}),e.jsx("button",{onClick:ae,disabled:!E.trim(),children:"Add"})]})]})]})}),he={upcoming:"⏳",active:"▶️",voting:"🗳️",scored:"📊",completed:"✅",skipped:"⏭️"},pe={upcoming:"#9ca3af",active:"#22c55e",voting:"#eab308",scored:"#3b82f6",completed:"#6b7280",skipped:"#d1d5db"},me=i.forwardRef(function(k,C){const{rounds:s,activeRoundId:f,onSelect:m,onStart:x,onEnd:j,onCreate:v,editable:S=!1,className:_,style:g}=k,b=[...s].sort((l,h)=>l.order-h.order);return e.jsxs("div",{ref:C,className:`nice-round-list ${_??""}`,style:g,children:[e.jsxs("div",{className:"nice-round-list__header",children:[e.jsxs("h3",{children:["Rounds (",s.length,")"]}),S&&v&&e.jsx("button",{onClick:v,children:"+ Add Round"})]}),b.length===0?e.jsx("p",{className:"nice-round-list__empty",children:"No rounds yet."}):e.jsx("div",{className:"nice-round-list__items",children:b.map(l=>{const h=l.id===f;return e.jsxs("div",{className:`nice-round-list__item ${h?"nice-round-list__item--active":""}`,onClick:()=>m==null?void 0:m(l),role:m?"button":void 0,tabIndex:m?0:void 0,children:[e.jsxs("span",{className:"nice-round-list__order",children:["#",l.order]}),e.jsx("span",{className:"nice-round-list__icon",children:he[l.status]}),e.jsxs("div",{className:"nice-round-list__info",children:[e.jsx("strong",{className:"nice-round-list__name",children:l.name}),l.description&&e.jsx("small",{children:l.description}),l.type&&e.jsx("span",{className:"nice-round-list__type",children:l.type})]}),e.jsx("span",{className:"nice-round-list__status",style:{color:pe[l.status]},children:l.status}),l.durationMinutes&&e.jsxs("span",{className:"nice-round-list__duration",children:[l.durationMinutes,"m"]}),l.winnerIds&&l.winnerIds.length>0&&e.jsxs("span",{className:"nice-round-list__winners",children:["🏆 ",l.winnerIds.length]}),S&&e.jsxs("div",{className:"nice-round-list__actions",onClick:N=>N.stopPropagation(),children:[l.status==="upcoming"&&x&&e.jsx("button",{onClick:()=>x(l.id),children:"Start"}),(l.status==="active"||l.status==="voting")&&j&&e.jsx("button",{onClick:()=>j(l.id),children:"End"})]})]},l.id)})})]})}),xe=i.forwardRef(function(k,C){const{round:s,timerRunning:f=!1,remainingSeconds:m,onSubmitScore:x,onStart:j,onEnd:v,onSkip:S,editable:_=!1,footerActions:g,className:b,style:l}=k,[h,N]=i.useState({}),y=i.useCallback(t=>{const d=parseFloat(h[t]??"");isNaN(d)||!x||(x(t,d),N(n=>({...n,[t]:""})))},[h,x]),p=t=>{const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`},a=s.scores?[...s.scores].sort((t,d)=>d.score-t.score):[];return e.jsxs("div",{ref:C,className:`nice-round-card nice-round-card--${s.status} ${b??""}`,style:l,children:[e.jsxs("div",{className:"nice-round-card__header",children:[e.jsxs("span",{className:"nice-round-card__order",children:["Round #",s.order]}),e.jsx("h3",{className:"nice-round-card__name",children:s.name}),e.jsx("span",{className:"nice-round-card__status",children:s.status})]}),s.description&&e.jsx("p",{className:"nice-round-card__description",children:s.description}),(f||m!=null)&&e.jsxs("div",{className:`nice-round-card__timer ${f?"nice-round-card__timer--running":""}`,children:["⏱️ ",m!=null?p(m):"—"]}),a.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:a.map((t,d)=>e.jsxs("tr",{className:d<3?`nice-round-card__top-${d+1}`:"",children:[e.jsxs("td",{children:[t.rank??d+1,d===0?" 🥇":d===1?" 🥈":d===2?" 🥉":""]}),e.jsx("td",{children:t.participantName}),e.jsx("td",{children:t.score})]},t.participantId))})]})]}),x&&(s.status==="active"||s.status==="voting")&&a.length>0&&e.jsxs("div",{className:"nice-round-card__score-input",children:[e.jsx("h4",{children:"Submit Scores"}),a.map(t=>e.jsxs("div",{className:"nice-round-card__score-row",children:[e.jsx("span",{children:t.participantName}),e.jsx("input",{type:"number",value:h[t.participantId]??"",onChange:d=>N(n=>({...n,[t.participantId]:d.target.value})),min:0,step:1,placeholder:"Score"}),e.jsx("button",{onClick:()=>y(t.participantId),children:"Submit"})]},t.participantId))]}),e.jsxs("div",{className:"nice-round-card__footer",children:[_&&e.jsxs("div",{className:"nice-round-card__actions",children:[s.status==="upcoming"&&j&&e.jsx("button",{onClick:j,children:"▶ Start Round"}),(s.status==="active"||s.status==="voting")&&v&&e.jsx("button",{onClick:v,children:"⏹ End Round"}),s.status==="upcoming"&&S&&e.jsx("button",{onClick:S,children:"⏭ Skip"})]}),g]}),s.winnerIds&&s.winnerIds.length>0&&e.jsxs("div",{className:"nice-round-card__winners",children:["🏆 Winners: ",s.winnerIds.length]})]})}),ve=i.forwardRef(function(k,C){const{songs:s,onAdd:f,onRemove:m,onVote:x,onSearch:j,showQueue:v=!0,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),h=i.useMemo(()=>{if(!b.trim())return s;const t=b.toLowerCase();return s.filter(d=>d.title.toLowerCase().includes(t)||d.artist.toLowerCase().includes(t))},[s,b]),N=i.useMemo(()=>s.filter(t=>t.isQueued),[s]),y=s.find(t=>t.isPlaying),p=t=>{l(t),j==null||j(t)},a=t=>{if(!t)return"";const d=Math.floor(t/60),n=t%60;return`${d}:${n.toString().padStart(2,"0")}`};return e.jsxs("div",{ref:C,className:`nice-song-picker ${_??""}`,style:g,children:[y&&e.jsxs("div",{className:"nice-song-picker__now-playing",children:[e.jsx("span",{className:"nice-song-picker__np-label",children:"🎵 Now Playing"}),y.albumArt&&e.jsx("img",{src:y.albumArt,alt:"",className:"nice-song-picker__album-art"}),e.jsx("strong",{children:y.title}),e.jsx("span",{children:y.artist})]}),e.jsx("input",{type:"text",value:b,onChange:t=>p(t.target.value),placeholder:"Search songs…",className:"nice-song-picker__search"}),e.jsx("div",{className:"nice-song-picker__list",children:h.length===0?e.jsx("p",{className:"nice-song-picker__empty",children:"No songs found."}):h.map(t=>e.jsxs("div",{className:`nice-song-picker__item ${t.isPlaying?"nice-song-picker__item--playing":""}`,children:[t.albumArt&&e.jsx("img",{src:t.albumArt,alt:"",className:"nice-song-picker__thumb"}),e.jsxs("div",{className:"nice-song-picker__info",children:[e.jsx("strong",{children:t.title}),e.jsx("span",{children:t.artist}),t.duration&&e.jsx("span",{className:"nice-song-picker__duration",children:a(t.duration)}),t.addedByName&&e.jsxs("small",{children:["Added by ",t.addedByName]})]}),!S&&e.jsxs("div",{className:"nice-song-picker__actions",children:[x&&e.jsxs("button",{onClick:()=>x(t.id),children:["👍 ",t.votes??0]}),f&&!t.isQueued&&e.jsx("button",{onClick:()=>f(t.id),children:"+ Queue"}),m&&t.isQueued&&e.jsx("button",{onClick:()=>m(t.id),children:"Remove"})]})]},t.id))}),v&&N.length>0&&e.jsxs("div",{className:"nice-song-picker__queue",children:[e.jsxs("h4",{children:["Queue (",N.length,")"]}),N.map((t,d)=>e.jsxs("div",{className:"nice-song-picker__queue-item",children:[e.jsxs("span",{className:"nice-song-picker__queue-pos",children:[d+1,"."]}),e.jsxs("span",{children:[t.title," — ",t.artist]})]},t.id))]})]})}),je=i.forwardRef(function(k,C){const{songs:s,queue:f=[],onEnqueue:m,onDequeue:x,onNext:j,nowPlayingId:v,readOnly:S=!1,className:_,style:g}=k,[b,l]=i.useState(""),[h,N]=i.useState(""),y=s.find(n=>n.id===v),p=i.useMemo(()=>{let n=s;if(b.trim()){const u=b.toLowerCase();n=n.filter(c=>c.title.toLowerCase().includes(u)||c.artist.toLowerCase().includes(u))}return h&&(n=n.filter(u=>u.difficulty===h)),n},[s,b,h]),a=i.useMemo(()=>new Set(f.map(n=>n.id)),[f]),t=["easy","medium","hard","expert"],d=n=>{switch(n){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 ${_??""}`,style:g,children:[y&&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:y.title})," — ",y.artist,y.performerName&&e.jsxs("span",{children:[" (by ",y.performerName,")"]})]}),!S&&j&&e.jsx("button",{onClick:j,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:b,onChange:n=>l(n.target.value),placeholder:"Search songs or artists…",style:{flex:1}}),e.jsxs("select",{value:h,onChange:n=>N(n.target.value),children:[e.jsx("option",{value:"",children:"All Difficulties"}),t.map(n=>e.jsx("option",{value:n,children:n},n))]})]}),e.jsx("div",{className:"nice-karaoke-picker__catalog",children:p.length===0?e.jsx("p",{children:"No songs match your search."}):p.map(n=>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:n.title})," — ",n.artist,n.difficulty&&e.jsxs("span",{style:{marginLeft:8,fontSize:12,color:d(n.difficulty),fontWeight:600},children:["[",n.difficulty,"]"]}),n.hasLyrics&&e.jsx("span",{style:{marginLeft:6,fontSize:12},title:"Lyrics available",children:"📝"}),n.language&&e.jsxs("span",{style:{marginLeft:6,fontSize:12,color:"#666"},children:["(",n.language,")"]})]}),!S&&e.jsx("div",{children:a.has(n.id)?e.jsx("button",{onClick:()=>x==null?void 0:x(n.id),style:{color:"#f44336"},children:"Remove"}):e.jsx("button",{onClick:()=>m==null?void 0:m(n.id),children:"🎤 Sing"})})]},n.id))}),f.length>0&&e.jsxs("div",{className:"nice-karaoke-picker__queue",style:{marginTop:16},children:[e.jsxs("h4",{children:["🎶 Queue (",f.length,")"]}),f.map((n,u)=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",padding:"4px 0"},children:[e.jsxs("span",{children:[e.jsxs("strong",{children:[u+1,"."]})," ",n.title," — ",n.artist,n.performerName&&e.jsxs("em",{children:[" (",n.performerName,")"]})]}),!S&&x&&e.jsx("button",{onClick:()=>x(n.id),style:{fontSize:12},children:"✕"})]},n.id))]})]})}),Y={game:"🎮",music:"🎵",dance:"💃",quiz:"❓",karaoke:"🎤",photo:"📸",custom:"✨"},ge={game:"Games",music:"Music",dance:"Dance",quiz:"Quiz",karaoke:"Karaoke",photo:"Photo",custom:"Custom"},fe=i.forwardRef(function(k,C){const{attractions:s,onSelect:f,onDeselect:m,onVote:x,selectedIds:j=[],maxSelections:v,showVotes:S=!0,readOnly:_=!1,layout:g="grid",className:b,style:l}=k,[h,N]=i.useState(""),[y,p]=i.useState(""),a=i.useMemo(()=>new Set(j),[j]),t=i.useMemo(()=>{const c=new Set(s.map(o=>o.category));return Array.from(c)},[s]),d=i.useMemo(()=>{let c=s;if(h&&(c=c.filter(o=>o.category===h)),y.trim()){const o=y.toLowerCase();c=c.filter(w=>{var R;return w.name.toLowerCase().includes(o)||((R=w.description)==null?void 0:R.toLowerCase().includes(o))})}return c},[s,h,y]),n=!v||a.size<v,u=c=>{_||(a.has(c)?m==null||m(c):n&&(f==null||f(c)))};return e.jsxs("div",{ref:C,className:`nice-attraction-picker ${b??""}`,style:l,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:"#666",fontSize:14},children:[a.size,"/",v," selected"]})]}),e.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,flexWrap:"wrap"},children:[e.jsx("input",{type:"text",value:y,onChange:c=>p(c.target.value),placeholder:"Search attractions…",style:{flex:1,minWidth:150}}),e.jsx("button",{onClick:()=>N(""),style:{fontWeight:h?400:700},children:"All"}),t.map(c=>e.jsxs("button",{onClick:()=>N(c===h?"":c),style:{fontWeight:c===h?700:400},children:[Y[c]," ",ge[c]]},c))]}),e.jsx("div",{style:{display:g==="grid"?"grid":"flex",gridTemplateColumns:g==="grid"?"repeat(auto-fill, minmax(200px, 1fr))":void 0,gap:12,flexDirection:g==="list"?"column":void 0},children:d.length===0?e.jsx("p",{children:"No attractions found."}):d.map(c=>{const o=a.has(c.id);return e.jsxs("div",{className:"nice-attraction-picker__card",style:{border:o?"2px solid #1976d2":"1px solid #ddd",borderRadius:8,padding:12,cursor:_?"default":"pointer",background:o?"#e3f2fd":"#fff",transition:"all 0.2s"},onClick:()=>u(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",{children:Y[c.category]}),e.jsx("strong",{children:c.name})]}),c.description&&e.jsx("p",{style:{fontSize:13,color:"#666",margin:"6px 0"},children:c.description}),e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:8},children:[S&&e.jsxs("span",{style:{fontSize:13},children:["👍 ",c.votes??0]}),!_&&x&&e.jsx("button",{onClick:w=>{w.stopPropagation(),x(c.id)},style:{fontSize:12},children:"Vote"})]})]},c.id)})})]})}),_e={game:"🎮",music:"🎵",dance:"💃",quiz:"❓",karaoke:"🎤",photo:"📸",custom:"✨"},ye=i.forwardRef(function(k,C){const{attractions:s,onVote:f,onUnvote:m,votedIds:x=[],maxVotes:j,closed:v=!1,sortBy:S="votes",showResults:_=!0,className:g,style:b}=k,l=i.useMemo(()=>new Set(x),[x]),h=j?j-l.size:void 0,N=i.useMemo(()=>{const t=[...s];switch(S){case"votes":t.sort((d,n)=>(n.votes??0)-(d.votes??0));break;case"name":t.sort((d,n)=>d.name.localeCompare(n.name));break;case"category":t.sort((d,n)=>d.category.localeCompare(n.category));break}return t},[s,S]),y=i.useMemo(()=>Math.max(...s.map(t=>t.votes??0),1),[s]),p=t=>{v||(l.has(t)?m==null||m(t):(!h||h>0)&&(f==null||f(t)))},a=t=>{switch(t){case 0:return"🥇";case 1:return"🥈";case 2:return"🥉";default:return`${t+1}.`}};return e.jsxs("div",{ref:C,className:`nice-attraction-voting ${g??""}`,style:b,children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[e.jsx("h3",{style:{margin:0},children:v?"🗳️ Voting Results":"🗳️ Vote for Attractions"}),!v&&h!==void 0&&e.jsxs("span",{style:{fontSize:14,color:h>0?"#1976d2":"#f44336"},children:[h," vote",h!==1?"s":""," remaining"]})]}),v&&e.jsx("p",{style:{color:"#666",marginBottom:12},children:"Voting is closed. Final results:"}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:N.map((t,d)=>{const n=l.has(t.id),u=t.votes??0,c=_?`${Math.round(u/y*100)}%`:"0%";return e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,border:n?"2px solid #1976d2":"1px solid #e0e0e0",background:n?"#e3f2fd":"#fff",cursor:v?"default":"pointer",transition:"all 0.2s"},onClick:()=>p(t.id),children:[_&&e.jsx("span",{style:{fontSize:18,minWidth:32,textAlign:"center"},children:a(d)}),e.jsx("span",{style:{fontSize:20},children:_e[t.category]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("div",{style:{fontWeight:600},children:t.name}),t.description&&e.jsx("div",{style:{fontSize:13,color:"#666",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.description}),_&&e.jsx("div",{style:{marginTop:4,height:6,borderRadius:3,background:"#e0e0e0",overflow:"hidden"},children:e.jsx("div",{style:{height:"100%",width:c,background:"#1976d2",borderRadius:3,transition:"width 0.3s"}})})]}),_&&e.jsx("span",{style:{fontWeight:600,fontSize:16,minWidth:40,textAlign:"right"},children:u}),!v&&e.jsx("button",{onClick:o=>{o.stopPropagation(),p(t.id)},style:{padding:"4px 12px",borderRadius:4,border:"none",background:n?"#f44336":"#1976d2",color:"#fff",cursor:"pointer",fontSize:13},children:n?"Unvote":"Vote"})]},t.id)})}),_&&e.jsxs("div",{style:{marginTop:12,textAlign:"right",fontSize:13,color:"#666"},children:["Total votes: ",s.reduce((t,d)=>t+(d.votes??0),0)]})]})});exports.NiceAttractionPicker=fe;exports.NiceAttractionVoting=ye;exports.NiceEventChat=le;exports.NiceEventMedia=de;exports.NiceEventParticipants=oe;exports.NiceEventPlanning=ue;exports.NiceKaraokePicker=je;exports.NiceRoundCard=xe;exports.NiceRoundList=me;exports.NiceSongPicker=ve;
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
@@ -166,6 +166,12 @@ export declare interface EventParticipant {
166
166
  score?: number;
167
167
  }
168
168
 
169
+ /** Display density / scope of {@link NiceEventPlanning}. */
170
+ declare type EventPlanningDisplayMode = 'micro' | 'compact' | 'normal' | 'full';
171
+
172
+ /** Available planner tabs. */
173
+ declare type EventPlanningTab = 'details' | 'location' | 'participants' | 'surveys' | 'budget' | 'settings';
174
+
169
175
  /** Event round. */
170
176
  export declare interface EventRound {
171
177
  id: string;
@@ -324,34 +330,10 @@ export declare interface NiceAttractionVotingProps {
324
330
  }
325
331
 
326
332
  /**
327
- * {@link NiceEventChat} — Real-time event chat with reactions and message types.
328
- */
329
- export declare const NiceEventChat: default_2.ForwardRefExoticComponent<NiceEventChatProps & default_2.RefAttributes<HTMLDivElement>>;
330
-
331
- /** Props for {@link NiceEventChat}. */
332
- export declare interface NiceEventChatProps {
333
- /** Messages to display. */
334
- messages: ChatMessage[];
335
- /** Current user ID. */
336
- currentUserId: string;
337
- /** Called when sending a message. */
338
- onSend?: (content: string, type?: ChatMessageType) => void;
339
- /** Called when reacting to a message. */
340
- onReact?: (messageId: string, reaction: string) => void;
341
- /** Available reaction emojis. */
342
- reactions?: string[];
343
- /** Whether the chat is read-only. */
344
- readOnly?: boolean;
345
- /** Placeholder text. */
346
- placeholder?: string;
347
- /** Whether to auto-scroll to bottom on new messages. */
348
- autoScroll?: boolean;
349
- className?: string;
350
- style?: default_2.CSSProperties;
351
- }
352
-
353
- /**
354
- * {@link NiceEventMedia} — Media gallery with upload, photos, and collages.
333
+ * {@link NiceEventMedia} — responsive media gallery (photos / videos) built from
334
+ * Nice* controls: NiceUpload for adding media and NiceCardGroup for the layout.
335
+ * Each card keeps its thumbnail, caption and actions together on one line and
336
+ * wraps responsively; broken images fall back to a themed placeholder.
355
337
  */
356
338
  export declare const NiceEventMedia: default_2.ForwardRefExoticComponent<NiceEventMediaProps & default_2.RefAttributes<HTMLDivElement>>;
357
339
 
@@ -367,7 +349,7 @@ export declare interface NiceEventMediaProps {
367
349
  onLike?: (mediaId: string) => void;
368
350
  /** Called when clicking on a media item. */
369
351
  onItemClick?: (item: EventMediaItem) => void;
370
- /** Display mode. */
352
+ /** Display mode — `grid`/`masonry` lay out as a responsive card grid; `list` stacks horizontal cards. */
371
353
  layout?: 'grid' | 'masonry' | 'list';
372
354
  /** Whether upload is allowed. */
373
355
  uploadEnabled?: boolean;
@@ -378,38 +360,10 @@ export declare interface NiceEventMediaProps {
378
360
  }
379
361
 
380
362
  /**
381
- * {@link NiceEventParticipants} — Participant list with roles, status, and QR codes.
382
- */
383
- export declare const NiceEventParticipants: default_2.ForwardRefExoticComponent<NiceEventParticipantsProps & default_2.RefAttributes<HTMLDivElement>>;
384
-
385
- /** Props for {@link NiceEventParticipants}. */
386
- export declare interface NiceEventParticipantsProps {
387
- /** Participants. */
388
- participants: EventParticipant[];
389
- /** Current user's participant ID (for self-highlight). */
390
- currentParticipantId?: string;
391
- /** Called when inviting a participant. */
392
- onInvite?: () => void;
393
- /** Called when removing a participant. */
394
- onRemove?: (participantId: string) => void;
395
- /** Called when changing a participant's role. */
396
- onRoleChange?: (participantId: string, role: ParticipantRole) => void;
397
- /** Called when checking in a participant. */
398
- onCheckIn?: (participantId: string) => void;
399
- /** Called when clicking on a participant. */
400
- onParticipantClick?: (participant: EventParticipant) => void;
401
- /** Whether to show QR codes for check-in. */
402
- showQR?: boolean;
403
- /** Whether to allow management actions. */
404
- editable?: boolean;
405
- /** Max participants. */
406
- maxParticipants?: number;
407
- className?: string;
408
- style?: default_2.CSSProperties;
409
- }
410
-
411
- /**
412
- * {@link NiceEventPlanning} — Event planning with dates, location, surveys, and billing.
363
+ * {@link NiceEventPlanning} — Composed-from-Nice* event planner: a toolbar with
364
+ * status + Save/Publish/Share/Export, tabbed sections (details, location,
365
+ * participants, surveys, budget, settings) and four display modes
366
+ * (`micro` → `full`). Suitable for embedding in a NiceViewRenderer.
413
367
  */
414
368
  export declare const NiceEventPlanning: default_2.ForwardRefExoticComponent<NiceEventPlanningProps & default_2.RefAttributes<HTMLDivElement>>;
415
369
 
@@ -417,10 +371,37 @@ export declare const NiceEventPlanning: default_2.ForwardRefExoticComponent<Nice
417
371
  export declare interface NiceEventPlanningProps {
418
372
  /** Event data. */
419
373
  event: EventModel;
374
+ /** Participants (enables the Participants tab + summary avatars). */
375
+ participants?: EventParticipant[];
420
376
  /** Surveys. */
421
377
  surveys?: EventSurvey[];
422
- /** Billing items. */
378
+ /** Billing items (Budget tab). */
423
379
  billing?: BillingItem[];
380
+ /**
381
+ * Display density / scope. `micro` renders only a summary card (no tabs);
382
+ * `compact` shows the core tabs; `normal` (default) and `full` show everything.
383
+ */
384
+ displayMode?: EventPlanningDisplayMode;
385
+ /** Explicit tab set / order — overrides the displayMode defaults. */
386
+ tabs?: EventPlanningTab[];
387
+ /** Controlled active tab. */
388
+ activeTab?: EventPlanningTab;
389
+ /** Active-tab change handler. */
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';
395
+ /** Whether editing is allowed. */
396
+ editable?: boolean;
397
+ /** Toolbar — Save handler (button shown when provided). */
398
+ onSave?: (data: Partial<EventModel>) => void;
399
+ /** Toolbar — Publish handler. */
400
+ onPublish?: () => void;
401
+ /** Toolbar — Share handler. */
402
+ onShare?: () => void;
403
+ /** Toolbar — Export handler. */
404
+ onExport?: () => void;
424
405
  /** Called when updating event details. */
425
406
  onUpdateEvent?: (data: Partial<EventModel>) => void;
426
407
  /** Called when updating location. */
@@ -431,8 +412,6 @@ export declare interface NiceEventPlanningProps {
431
412
  onSurveyRespond?: (surveyId: string, answer: string | string[] | number) => void;
432
413
  /** Called when adding a billing item. */
433
414
  onAddBilling?: (item: Partial<BillingItem>) => void;
434
- /** Whether editing is allowed. */
435
- editable?: boolean;
436
415
  className?: string;
437
416
  style?: default_2.CSSProperties;
438
417
  }