Skip to content

v9.17.0 — Underline tabs + structured business hours

Choose a tag to compare

@CaspianTools CaspianTools released this 17 Jun 03:47

The shared Tabs component's active tab was a filled dark pill; it now uses an underline style (active = accent-colored text + a 2px accent underline, inactive = muted gray), resolving the accent in both admin (--a-accent) and storefront (--accent) contexts. Separately, the free-text Business hours setting is replaced by a structured weekly schedule — a master enable, a timezone, and per-day open/closed toggles with From/To times — edited in the admin Settings → Contact section and rendered on the storefront /contact page beside the form when enabled.

The legacy SiteSettings.businessHours string is retained for backward compatibility; the storefront shows the structured schedule only when businessHoursSchedule.enabled.

No consumer action required

Additive. businessHoursSchedule is optional and persists through the existing settings/site doc — no new Firestore collection, rules, or indexes, and existing free-text businessHours values are untouched. The tab restyle is purely visual and inherits your theme's accent token.

Added

  • Weekday, BusinessDayHours, BusinessHoursSchedule types; SiteSettings.businessHoursSchedule?.
  • src/utils/business-hours.tsWEEKDAYS, DEFAULT_BUSINESS_HOURS, pure 12-hour formatHourLabel.
  • src/components/contact/business-hours.tsxBusinessHoursCard, the storefront hours panel.
  • i18n keys businessHours.title / .closed / .timezoneNote / .day.mon…sun.

Changed

  • src/ui/tabs.tsx — underline active style; applies to every tab usage.
  • src/admin/admin-site-settings-page.tsx — Business-hours textarea becomes a structured editor.
  • src/components/contact/contact-page.tsx — responsive 2-column layout when hours are enabled.
  • src/styles/globals.css.caspian-contact-layout stacks ≤720px.

Install: `npm install github:CaspianTools/script-caspian-store#v9.17.0`