Desks Wicker
v1.0A desk and room booking app for a hybrid office, in warm oat neutrals with one terracotta accent, where desks fill with color as people check in.
Адреса сторінки: /
Вбудовано
Що ви отримуєте- Світла й темнаВикористовує кольори вашої теми
- Комп’ютер, планшет і телефонЕкрани, для яких його створено
- Пакети…
- Розмір коду…
- Економить батарею30 fps, у спокої не навантажує
- Пауза, коли прихованоПоза екраном або в іншій вкладці
- Зменшення рухуСпокійно для тих, хто цього просить
Перевіряється після кожної зміни
Безпеку перевірено 3 груд.- Перевірка типівСтрогий TypeScript
- Лінтер і форматESLint · Prettier
- Тести й збіркаСкриншоти у світлій і темній темах
- Аудит безпекиБез високих чи критичних загроз
- Вік пакетівКожна версія публічна 7+ днів
- Процесор у спокоїМенше половини ядра у спокої, ≤ 30 fps
Код
desks-wickerReact
- desks-wicker.tsxThe page: the sections in order.
- content.tsEvery word and number: brand, nav links, each section's copy and lists.
- theme.tsThe colors as CSS variables, and the shared class strings.
- README.mdHow to install it, and where to change the text, colors and form.
- pagesOne file per page: the sections it shows, in order.
- bookings.tsxMy bookings (#/bookings): my desk days and room bookings by day, in tabs (Upcoming, Past, Cancelled). Check in to today's desk, cancel one, or tick several and cancel them together from the bar that floats up; the list glides as rows leave.
- floor.tsxFloor plan (#/floor): one floor's desks for the day shown, to book a desk in two clicks. A desk opens its side sheet (?desk=2C-03); a room opens the room. The rail beside it keys the plan and fills each neighborhood's bar as people arrive.
- floors.tsxFloors (#/floors): each floor with its desks, rooms and today's fill, and its five neighborhoods (a team's zone or flex). Add a floor (?new=floor, five flex zones of desks), rename or delete one, and give a neighborhood a name and a team.
- people.tsxPeople (#/people): who is in on the day shown (newest arrival first, new check-ins slide in), everyone with search and a team filter, and each team's office days, set by ticking a weekday.
- reports.tsxReports (#/reports): how the office is used. Desk occupancy by weekday over the last two weeks (today's weekday in the accent), the no-show rate over twelve weeks, each team's days in and no-shows, and how full each room was.
- rooms.tsxRooms (#/rooms): every meeting room with what is on in it now, its seats, kit and how full its day is, filtered by floor or free now (the rows glide). A room opens its side sheet (#/rooms/r9): its schedule by hour, booking, editing. New room opens from the top bar (?new=room).
- settings.tsxThe settings page (#/settings): the office's booking rules (check-in time and release, how far ahead, opening hours), and Appearance (theme and language).
- sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the sidebar and top bar.
- today.tsxToday (#/): the day at a glance. The KPI strip, the mini floor plan filling as people check in, team presence, the rooms right now and the live feed; every block opens its page.
- sectionsOne file per page section.
- account-menu.tsxThe account menu under the avatar in the top bar: who is signed in, Settings and Sign out; the arrow keys move through it, Escape, Tab or a click outside closes it.
- appearance.tsxSettings → Appearance: the theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
- book-desk.tsxThe Book a desk dialog (?book=desk from the top bar or ⌘K): pick a day, a floor and one of its free desks (your team's neighborhood first); booking it opens the floor plan, where the desk pops your initials.
- bottom-tabs.tsxThe phone's tab bar: the four pages used most, and More for the rest (the sidebar in a sheet). It sticks to the bottom of the screen under the page.
- desk-drawer.tsxA desk's side sheet: where it is and what kind, who has it on the day shown, the one thing you can do with it (book it, check in, cancel) and its week ahead.
- equipment.tsxA room's equipment as small icons with their names for screen readers (and a tooltip on wide screens).
- floor-plan.tsxThe floor plan: a floor's five neighborhoods with their desks, the lounge and the room column, drawn to scale; on a phone the neighborhoods stack in one column and the rooms sit two to a row under them. A taken desk fills with soft color and pops its person's initials; a check-in deepens it and sends one ring out. On the Floor page each desk and room is a button; the mini plan on Today is one link.
- kpi-strip.tsxThe KPI strip: four numbers in one bordered box, each with its line under it and a sparkline or a progress bar; a changed number rolls to its new value and a sparkline grows a point.
- office.tsxToday's office in two lists: the live feed (who checked in or booked, newest first; a new row slides in at the top) and team presence (each team's people in against its size, its team day marked).
- room-drawer.tsxA room's side sheet in two tabs: Schedule (the day's bookings by hour with a moving now line, yours cancellable, and a form to book a free time) and Details (edit or delete the room).
- room-form.tsxThe room form, for a new room (a dialog) and for editing one (its side sheet): name, floor, seats and equipment, checked here with the errors under each field.
- sidebar.tsxThe sidebar: the workspace, search with the ⌘K shortcut, the pages in two groups with their counts and a pill that glides to the current one, Settings, and the live strap with its pause.
- sign-in-form.tsxThe sign-in form: email and password with their errors under them, show or hide the password, keep me signed in, and the demo account to fill in; a wrong pair says so above the fields.
- top-bar.tsxThe top bar: the menu button on narrow screens, where you are, the day picker on the pages that show a day, the live dot, the page's one main action, the theme switch and the account menu. It frosts only once the page scrolls under it.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- burst.tsThe burst card style: cards spread out from the middle of the page, the nearest first.
- rowsWhat several sections share.
- mask.tsThe mask row motion: each part of a row on screen (its children) slides up from behind its own mask.
- core.tsxThe page's build-in: on first load and on every page switch the cards arrive in the app's card style and their contents build: bars grow, lines draw, rings fill, the list rows on screen ripple in in the app's row motion, numbers count. The two picks are wired in ./index.ts.
- index.tsThe app's two build-in picks, wired here and nowhere else: its card style (cards/) and its row motion (rows/). npm run new-app copies only the two it is given (--cards, --rows).
- act.tsRuns a save through the fake API, then redraws every page's data and confirms it in a toast; a failed save says why in the toast instead.
- appearance.tsHow the app looks right now: dark or light, Glass or Solid, from Settings → Appearance, the page around it and the Style setting.
- avatar.tsxA person's initials in a round badge, tinted with the primary.
- backdrop.tsxThe app is Solid, so its own two soft lights stay hidden (--desks-wicker-glass is 0); with followBackground it paints your background behind the panels instead.
- bar-chart.tsxA bar chart: bars grow in, and the picked bar (in the primary), its guide line and tooltip glide to the bar you point at or pick with the arrow keys; a new range morphs the bars instead of drawing them again.
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a page or an action, then Enter.
- day.tsThe day the app shows (the top bar's day picker): today at first, then any workday from two weeks back to two weeks ahead. Every page reads it, so it stays the same while you move between them.
- dialog.tsxA centered modal dialog (a form, a confirm): rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
- drawer.tsxA drawer from the right: a full-height native <dialog> for one thing's details (a client, an order). It springs in, slides out, closes on Esc, the close button or a click beside it, and keeps showing its thing while it slides away.
- field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
- flip.tsFLIP for lists: rows (data-flip="<id>") that move when the list is filtered or re-sorted glide from their old place to the new one, measured again when the list resizes.
- format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."). Add a helper here when a page needs money, times or a list.
- icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round ends.
- language.tsThe app's language: the words every page reads (useWords), how dates and numbers are written (parts/format.ts) and the reading direction. Picked in Settings → Appearance (or System: the page's own language) and kept in this browser; English is built in, any other language loads only when it shows (locales/list.ts).
- line-chart.tsxA line chart with a soft area under it, in the primary: the line draws itself in, the latest point marked, and new values roll the line to its new shape.
- live-clock.tsxOne shared clock for everything live: it ticks only while something on screen listens, the tab is visible and live isn't paused, and the bare button that pauses it. What a tick does (move the demo's time, bring in an event, reload) is the app's, passed to liveClock.
- moments.tsThe animations the sidebar, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
- motion.tsMotion helpers: the reduced-motion check, live, and run-once-in-view.
- page.tsxWhat every page starts with: its title and one line under it, the skeleton it shows while its data loads, and the error it shows when a load fails.
- router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
- scroll-to-view.tsScrolls an element into view moving only its own scroll container, never the page around it.
- select-box.tsxA native select dressed to match the app: no browser arrow, a drawn chevron instead.
- session.tsWhether someone is signed in: a first visit is signed in as the demo account; Sign out holds until the next sign-in, and a sign-in without Keep me signed in lasts only this tab.
- sheet.tsxThe phone sheet: a modal panel that springs in from the left with the sidebar; Escape, a tap outside or its close button slides it away.
- states.tsxThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
- store.tsThe app-wide state several parts share: the theme mode and style (kept in the browser) and the toasts.
- ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
- toasts.tsxThe toasts: short notes that confirm what just happened, at the bottom end.
- use-api.tsLoads data through the fake API with loading, error and retry, remembering each answer so a page you come back to shows at once.
- use-dialog.tsOpens and closes a native <dialog> as a modal; on close it plays its way out first (data-closing), so dialogs, sheets and the palette never vanish in one frame.
- dataThe pretend data and the fake API: swap it for your backend.
- account.tsThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
- api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
- db.tsThe pretend database: the office as it is now, and every change the pages save (desk and room bookings, check-ins, rooms, floors, neighborhoods, team days, rules). api.ts reads and writes it; swap both for your backend.
- live.tsThe office's day, live: every few seconds someone checks in (their desk fills on the plan, the counts roll, the feed gets a row) or books a desk. One shared clock, running only while a live page is on screen and the tab is visible; the sidebar's Live button pauses it.
- now.tsThe demo's "now": today's real date at 9:40, a busy hour, moving on with real time, so the office is never empty when someone opens the app. Swap it for the real clock when you wire your backend.
- seed-bookings.tsThe pretend bookings: two weeks back, today and two weeks ahead, each day's desks filled the way a hybrid office fills (busy midweek, quiet on Fridays), each team near its own neighborhood, and the rooms' meetings.
- seed-office.tsThe pretend office: Northwind Labs, 300 people in eight teams on two floors of 140 desks and 12 rooms, and the plan's geometry (where each zone, desk and room sits on the drawn floor).
- types.tsThe shapes of the office's data: teams and people, floors with their neighborhoods, desks and rooms, desk and room bookings, the booking rules and the live feed. Dates are "YYYY-MM-DD"; times are minutes after midnight (9:40 is 580).
- views.tsWhat each page shows, worked out from the pretend database: the day's counts, a floor's plan, who is in, the rooms right now, my bookings and the reports. api.ts answers with these; a backend would return the same shapes.
- localesEvery word the app shows, one JSON file a language; list.ts names them.
- en.jsonOne language's words, with the keys of en.json.
- es.jsonOne language's words, with the keys of en.json.
- list.tsThe languages the app offers, in the picker's order: one JSON file each, en.json the source. To remove one, delete its file and its line; to add one, copy es.json, translate it and add a line. English is built in; the rest load only when picked. TypeScript checks each file has en.json's keys, scripts/check/check-locales.mjs the rest (no extra keys, plural forms, {slots}).
desks-wicker.tsx
The page: the sections in order.
Завантаження…
- Підходить для
- Hybrid offices that book desks and rooms by the day: workplace teams, office managers and the people coming in.
- Як це працює
- Pick a day, book a desk on the floor plan, check in; desks fill with soft color as check-ins arrive across the day.
- Як користуватися
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.