@ceebee/ui 1.0.2 → 1.2.0

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/dist/client.d.ts CHANGED
@@ -178,6 +178,7 @@ interface ChecklistProps {
178
178
  declare function Checklist({ title, tasks, completeSlot, className }: ChecklistProps): react.JSX.Element;
179
179
 
180
180
  type Tone = 'neutral' | 'brand' | 'info' | 'success' | 'warning' | 'danger';
181
+ type DecorHue = 'violet' | 'blue' | 'teal' | 'green' | 'amber' | 'rose';
181
182
 
182
183
  type ToastPosition = 'bottom-end' | 'bottom-center' | 'bottom-start' | 'top-end' | 'top-center' | 'top-start';
183
184
  interface ToastProviderProps {
@@ -275,4 +276,57 @@ interface StaggerProps {
275
276
  /** Wraps each child in a Reveal with an increasing delay — the list arrives, it does not pop. */
276
277
  declare function Stagger({ children, step, from, onView, className }: StaggerProps): react.JSX.Element;
277
278
 
278
- export { Checklist, type ChecklistProps, type ChecklistTask, type Command, CommandPalette, type CommandPaletteProps, DEFAULT_LABELS, type DurationToken, type Labels, LabelsProvider, type LabelsProviderProps, type MotionHelpers, MotionProvider, type MotionProviderProps, type MotionSettings, type NavItem, type NavSection, type PaletteCommand, type RankedCommand, Reveal, type RevealProps, Sidebar, type SidebarProps, type SpringPreset, Stagger, type StaggerProps, ThemeBridge, type ThemeBridgeProps, type ThemeChoice, ThemeProvider, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, TopBar, type TopBarProps, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
279
+ interface StickerGroupSkeletonProps {
280
+ count?: number;
281
+ label?: string;
282
+ }
283
+ declare function StickerGroupSkeleton({ count, label }: StickerGroupSkeletonProps): react.JSX.Element;
284
+
285
+ interface StickerItem {
286
+ id: string;
287
+ label: ReactNode;
288
+ /** Decorative only; use app copy to communicate meaning. */
289
+ hue?: DecorHue;
290
+ /** Accessible item name when `label` is not plain text. */
291
+ ariaLabel?: string;
292
+ }
293
+ interface StickerGroupProps {
294
+ items: StickerItem[];
295
+ onDismiss: (id: string) => void;
296
+ /** Names the collection when the surrounding heading does not. */
297
+ label?: string;
298
+ /** Localises the button name. */
299
+ getDismissLabel?: (item: StickerItem) => string;
300
+ motion?: boolean;
301
+ className?: string;
302
+ }
303
+ /**
304
+ * A controlled list of removable values. Each sticker is one native button: Tab reaches it and
305
+ * Enter or Space dismisses it. The collection owns only exit choreography, never product state.
306
+ */
307
+ declare function StickerGroupRoot({ items, onDismiss, label, getDismissLabel, motion: motionEnabled, className, }: StickerGroupProps): react.JSX.Element;
308
+ declare const StickerGroup: typeof StickerGroupRoot & {
309
+ Skeleton: typeof StickerGroupSkeleton;
310
+ };
311
+
312
+ interface PanZoomCanvasSkeletonProps {
313
+ label?: string;
314
+ }
315
+ declare function PanZoomCanvasSkeleton({ label }: PanZoomCanvasSkeletonProps): react.JSX.Element;
316
+
317
+ interface PanZoomCanvasProps {
318
+ label: string;
319
+ children: ReactNode;
320
+ hint?: string;
321
+ zoomInLabel?: string;
322
+ zoomOutLabel?: string;
323
+ resetLabel?: string;
324
+ zoomStatusLabel?: string;
325
+ motion?: boolean;
326
+ }
327
+ declare function PanZoomCanvasRoot({ label, children, hint, zoomInLabel, zoomOutLabel, resetLabel, zoomStatusLabel, motion: motionEnabled, }: PanZoomCanvasProps): react.JSX.Element;
328
+ declare const PanZoomCanvas: typeof PanZoomCanvasRoot & {
329
+ Skeleton: typeof PanZoomCanvasSkeleton;
330
+ };
331
+
332
+ export { Checklist, type ChecklistProps, type ChecklistTask, type Command, CommandPalette, type CommandPaletteProps, DEFAULT_LABELS, type DurationToken, type Labels, LabelsProvider, type LabelsProviderProps, type MotionHelpers, MotionProvider, type MotionProviderProps, type MotionSettings, type NavItem, type NavSection, type PaletteCommand, PanZoomCanvas, type PanZoomCanvasProps, type PanZoomCanvasSkeletonProps, type RankedCommand, Reveal, type RevealProps, Sidebar, type SidebarProps, type SpringPreset, Stagger, type StaggerProps, StickerGroup, type StickerGroupProps, type StickerGroupSkeletonProps, type StickerItem, ThemeBridge, type ThemeBridgeProps, type ThemeChoice, ThemeProvider, type ToastOptions, type ToastPosition, ToastProvider, type ToastProviderProps, TopBar, type TopBarProps, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
package/dist/client.js CHANGED
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import { theme, ConfigProvider, Progress } from 'antd';
2
+ import { Button, theme, ConfigProvider, Progress } from 'antd';
3
3
  export * from 'antd';
4
- import { createContext, useState, useCallback, useEffect, useMemo, useContext, Children } from 'react';
4
+ import { createContext, useState, useRef, useContext, useMemo, useCallback, useEffect, Children } from 'react';
5
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  export { default as enUSLocale } from 'antd/locale/en_US.js';
7
7
  export { default as enUSDatePickerLocale } from 'antd/lib/date-picker/locale/en_US.js';
8
8
  export { default as idIDLocale } from 'antd/locale/id_ID.js';
9
9
  export { default as zhCNLocale } from 'antd/locale/zh_CN.js';
10
10
  import { Dialog } from '@base-ui/react/dialog';
11
- import { Search, Check, ChevronRight, X, PanelLeftOpen, PanelLeftClose, Info, XCircle, AlertTriangle, CheckCircle2 } from 'lucide-react';
11
+ import { X, Minus, Plus, RotateCcw, Search, Check, ChevronRight, PanelLeftOpen, PanelLeftClose, Info, XCircle, AlertTriangle, CheckCircle2 } from 'lucide-react';
12
12
  import { Toast } from '@base-ui/react/toast';
13
13
  import { Popover } from '@base-ui/react/popover';
14
- import { motion } from 'motion/react';
14
+ import { AnimatePresence, motion } from 'motion/react';
15
15
 
16
16
  var SKIN_LINK_ID = "cb-skin";
17
17
  function ThemeBridge({ children, mode, theme: theme$1 }) {
@@ -572,14 +572,14 @@ var OFFSETS = {
572
572
  function Reveal({
573
573
  children,
574
574
  from = "below",
575
- distance = 12,
575
+ distance: distance2 = 12,
576
576
  delay = 0,
577
577
  spring = "soft",
578
578
  onView = false,
579
579
  className
580
580
  }) {
581
581
  const { enabled, spring: transition } = useMotionSettings();
582
- const offset = enabled ? OFFSETS[from](distance) : {};
582
+ const offset = enabled ? OFFSETS[from](distance2) : {};
583
583
  const hidden = { opacity: 0, ...offset };
584
584
  const shown = { opacity: 1, x: 0, y: 0 };
585
585
  return /* @__PURE__ */ jsx(
@@ -596,5 +596,224 @@ function Reveal({
596
596
  function Stagger({ children, step = 0.06, from = "below", onView = false, className }) {
597
597
  return /* @__PURE__ */ jsx("div", { className, children: Children.map(children, (child, index) => /* @__PURE__ */ jsx(Reveal, { from, delay: index * step, onView, children: child })) });
598
598
  }
599
+ function StickerGroupSkeleton({ count = 3, label = "Loading items" }) {
600
+ return /* @__PURE__ */ jsx("div", { className: "cb-sticker-group cb-sticker-group--skeleton", role: "status", "aria-label": label, children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx("span", { className: "cb-sticker-group__skeleton-item", "aria-hidden": "true" }, index)) });
601
+ }
602
+ var STICKER_VARIANTS = {
603
+ hidden: {
604
+ opacity: 0,
605
+ y: "var(--cb-sticker-enter-y)",
606
+ rotate: "var(--cb-tilt-none)",
607
+ scale: "var(--cb-sticker-enter-scale)"
608
+ },
609
+ visible: {
610
+ opacity: 1,
611
+ x: 0,
612
+ y: 0,
613
+ rotate: "var(--cb-sticker-tilt)",
614
+ scale: 1
615
+ },
616
+ exit: {
617
+ opacity: 0,
618
+ x: "var(--cb-sticker-resolved-exit-x)",
619
+ y: "var(--cb-sticker-enter-y)",
620
+ rotate: "var(--cb-sticker-resolved-exit-rotate)",
621
+ scale: "var(--cb-sticker-exit-scale)"
622
+ },
623
+ still: { opacity: 1, x: 0, y: 0, rotate: 0, scale: 1 },
624
+ stillExit: { opacity: 0, x: 0, y: 0, rotate: 0, scale: 1 }
625
+ };
626
+ function StickerGroupRoot({
627
+ items,
628
+ onDismiss,
629
+ label,
630
+ getDismissLabel,
631
+ motion: motionEnabled = true,
632
+ className
633
+ }) {
634
+ const motionSettings = useMotionSettings();
635
+ const shouldMove = motionEnabled && motionSettings.enabled;
636
+ return /* @__PURE__ */ jsx("ul", { className: cn("cb-sticker-group", className), "aria-label": label, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: items.map((item, index) => {
637
+ const tilt = index % 3 === 0 ? "left" : index % 3 === 1 ? "right" : "none";
638
+ const exit = index % 2 === 0 ? "left" : "right";
639
+ const itemLabel = item.ariaLabel ?? (typeof item.label === "string" ? item.label : "item");
640
+ const dismissLabel = getDismissLabel?.(item) ?? `Remove ${itemLabel}`;
641
+ return /* @__PURE__ */ jsx(
642
+ motion.li,
643
+ {
644
+ className: "cb-sticker-group__item",
645
+ "data-exit": exit,
646
+ "data-hue": item.hue,
647
+ "data-tilt": tilt,
648
+ initial: shouldMove ? "hidden" : false,
649
+ animate: shouldMove ? "visible" : "still",
650
+ exit: shouldMove ? "exit" : "stillExit",
651
+ layout: shouldMove ? "position" : false,
652
+ transition: shouldMove ? motionSettings.spring("bouncy") : { duration: 0 },
653
+ variants: STICKER_VARIANTS,
654
+ children: /* @__PURE__ */ jsxs(
655
+ "button",
656
+ {
657
+ type: "button",
658
+ className: "cb-sticker-group__button",
659
+ "aria-label": dismissLabel,
660
+ onClick: () => onDismiss(item.id),
661
+ children: [
662
+ /* @__PURE__ */ jsx("span", { className: "cb-sticker-group__label", children: item.label }),
663
+ /* @__PURE__ */ jsx(X, { className: "cb-sticker-group__icon", "aria-hidden": "true" })
664
+ ]
665
+ }
666
+ )
667
+ },
668
+ item.id
669
+ );
670
+ }) }) });
671
+ }
672
+ var StickerGroup = Object.assign(StickerGroupRoot, { Skeleton: StickerGroupSkeleton });
673
+ function PanZoomCanvasSkeleton({ label = "Loading canvas" }) {
674
+ return /* @__PURE__ */ jsxs("div", { className: "cb-pan-zoom-canvas cb-pan-zoom-canvas--skeleton", role: "status", "aria-label": label, children: [
675
+ /* @__PURE__ */ jsx("span", { className: "cb-pan-zoom-canvas__skeleton-controls", "aria-hidden": "true" }),
676
+ /* @__PURE__ */ jsx("span", { className: "cb-pan-zoom-canvas__skeleton-node cb-pan-zoom-canvas__skeleton-node--start", "aria-hidden": "true" }),
677
+ /* @__PURE__ */ jsx("span", { className: "cb-pan-zoom-canvas__skeleton-line", "aria-hidden": "true" }),
678
+ /* @__PURE__ */ jsx("span", { className: "cb-pan-zoom-canvas__skeleton-node cb-pan-zoom-canvas__skeleton-node--end", "aria-hidden": "true" })
679
+ ] });
680
+ }
681
+ var MIN_SCALE = 0.5;
682
+ var MAX_SCALE = 2;
683
+ var SCALE_STEP = 0.25;
684
+ function clampScale(value) {
685
+ return Math.min(MAX_SCALE, Math.max(MIN_SCALE, value));
686
+ }
687
+ function distance([first, second]) {
688
+ return Math.hypot(second.x - first.x, second.y - first.y);
689
+ }
690
+ function PanZoomCanvasRoot({
691
+ label,
692
+ children,
693
+ hint,
694
+ zoomInLabel = "Zoom in",
695
+ zoomOutLabel = "Zoom out",
696
+ resetLabel = "Reset canvas",
697
+ zoomStatusLabel = "Canvas zoom",
698
+ motion: motionEnabled = true
699
+ }) {
700
+ const motionSettings = useMotionSettings();
701
+ const [pan, setPan] = useState({ x: 0, y: 0 });
702
+ const [scale, setScale] = useState(1);
703
+ const pointers = useRef(/* @__PURE__ */ new Map());
704
+ const dragOrigin = useRef(null);
705
+ const pinchOrigin = useRef(null);
706
+ const stepRef = useRef(null);
707
+ const shouldAnimate = motionEnabled && motionSettings.enabled;
708
+ function reset() {
709
+ setPan({ x: 0, y: 0 });
710
+ setScale(1);
711
+ }
712
+ function zoom(delta) {
713
+ setScale((current) => clampScale(current + delta));
714
+ }
715
+ function onKeyDown(event) {
716
+ const movement = {
717
+ ArrowLeft: { x: -1, y: 0 },
718
+ ArrowRight: { x: 1, y: 0 },
719
+ ArrowUp: { x: 0, y: -1 },
720
+ ArrowDown: { x: 0, y: 1 }
721
+ };
722
+ if (movement[event.key]) {
723
+ event.preventDefault();
724
+ setPan((current) => ({ x: current.x + movement[event.key].x, y: current.y + movement[event.key].y }));
725
+ return;
726
+ }
727
+ if (event.key === "+" || event.key === "=") {
728
+ event.preventDefault();
729
+ zoom(SCALE_STEP);
730
+ }
731
+ if (event.key === "-") {
732
+ event.preventDefault();
733
+ zoom(-SCALE_STEP);
734
+ }
735
+ if (event.key === "0" || event.key === "Home") {
736
+ event.preventDefault();
737
+ reset();
738
+ }
739
+ }
740
+ function onPointerDown(event) {
741
+ if (event.target.closest("a, button, input, select, textarea")) return;
742
+ event.currentTarget.setPointerCapture?.(event.pointerId);
743
+ pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
744
+ const points = [...pointers.current.values()];
745
+ if (points.length === 1) dragOrigin.current = { point: points[0], pan };
746
+ if (points.length === 2) pinchOrigin.current = { distance: distance(points), scale };
747
+ }
748
+ function onPointerMove(event) {
749
+ if (!pointers.current.has(event.pointerId)) return;
750
+ pointers.current.set(event.pointerId, { x: event.clientX, y: event.clientY });
751
+ const points = [...pointers.current.values()];
752
+ if (points.length === 2 && pinchOrigin.current) {
753
+ const nextDistance = distance(points);
754
+ setScale(clampScale(pinchOrigin.current.scale * (nextDistance / pinchOrigin.current.distance)));
755
+ return;
756
+ }
757
+ if (points.length === 1 && dragOrigin.current) {
758
+ const step = stepRef.current?.getBoundingClientRect().width || 1;
759
+ setPan({
760
+ x: dragOrigin.current.pan.x + (points[0].x - dragOrigin.current.point.x) / step,
761
+ y: dragOrigin.current.pan.y + (points[0].y - dragOrigin.current.point.y) / step
762
+ });
763
+ }
764
+ }
765
+ function releasePointer(event) {
766
+ pointers.current.delete(event.pointerId);
767
+ pinchOrigin.current = null;
768
+ const remaining = [...pointers.current.values()];
769
+ dragOrigin.current = remaining.length === 1 ? { point: remaining[0], pan } : null;
770
+ }
771
+ function onWheel(event) {
772
+ if (!event.ctrlKey && !event.metaKey) return;
773
+ event.preventDefault();
774
+ zoom(event.deltaY < 0 ? SCALE_STEP : -SCALE_STEP);
775
+ }
776
+ const transformStyle = {
777
+ "--cb-pan-zoom-x": pan.x,
778
+ "--cb-pan-zoom-y": pan.y,
779
+ "--cb-pan-zoom-scale": scale
780
+ };
781
+ return /* @__PURE__ */ jsxs("section", { className: "cb-pan-zoom-canvas", "data-motion": String(shouldAnimate), children: [
782
+ /* @__PURE__ */ jsxs("div", { className: "cb-pan-zoom-canvas__toolbar", children: [
783
+ hint ? /* @__PURE__ */ jsx("p", { className: "cb-pan-zoom-canvas__hint", children: hint }) : /* @__PURE__ */ jsx("span", {}),
784
+ /* @__PURE__ */ jsxs("div", { className: "cb-pan-zoom-canvas__controls", children: [
785
+ /* @__PURE__ */ jsx(Button, { type: "text", size: "small", icon: /* @__PURE__ */ jsx(Minus, { "aria-hidden": "true" }), "aria-label": zoomOutLabel, onClick: () => zoom(-SCALE_STEP), disabled: scale <= MIN_SCALE }),
786
+ /* @__PURE__ */ jsxs("output", { className: "cb-pan-zoom-canvas__zoom", "aria-label": zoomStatusLabel, children: [
787
+ Math.round(scale * 100),
788
+ "%"
789
+ ] }),
790
+ /* @__PURE__ */ jsx(Button, { type: "text", size: "small", icon: /* @__PURE__ */ jsx(Plus, { "aria-hidden": "true" }), "aria-label": zoomInLabel, onClick: () => zoom(SCALE_STEP), disabled: scale >= MAX_SCALE }),
791
+ /* @__PURE__ */ jsx(Button, { type: "text", size: "small", icon: /* @__PURE__ */ jsx(RotateCcw, { "aria-hidden": "true" }), "aria-label": resetLabel, onClick: reset })
792
+ ] })
793
+ ] }),
794
+ /* @__PURE__ */ jsxs(
795
+ "div",
796
+ {
797
+ className: "cb-pan-zoom-canvas__viewport",
798
+ role: "region",
799
+ "aria-label": label,
800
+ tabIndex: 0,
801
+ "data-pan-x": pan.x,
802
+ "data-pan-y": pan.y,
803
+ onKeyDown,
804
+ onPointerDown,
805
+ onPointerMove,
806
+ onPointerUp: releasePointer,
807
+ onPointerCancel: releasePointer,
808
+ onWheel,
809
+ children: [
810
+ /* @__PURE__ */ jsx("span", { ref: stepRef, className: "cb-pan-zoom-canvas__step", "aria-hidden": "true" }),
811
+ /* @__PURE__ */ jsx("div", { className: "cb-pan-zoom-canvas__content", style: transformStyle, children })
812
+ ]
813
+ }
814
+ )
815
+ ] });
816
+ }
817
+ var PanZoomCanvas = Object.assign(PanZoomCanvasRoot, { Skeleton: PanZoomCanvasSkeleton });
599
818
 
600
- export { Checklist, CommandPalette, DEFAULT_LABELS, LabelsProvider, MotionProvider, Reveal, Sidebar, Stagger, ThemeBridge, ThemeProvider, ToastProvider, TopBar, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
819
+ export { Checklist, CommandPalette, DEFAULT_LABELS, LabelsProvider, MotionProvider, PanZoomCanvas, Reveal, Sidebar, Stagger, StickerGroup, ThemeBridge, ThemeProvider, ToastProvider, TopBar, filterCommands, groupCommands, rankCommand, useLabels, useMotionSettings, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -8,12 +8,15 @@ type Tone = 'neutral' | 'brand' | 'info' | 'success' | 'warning' | 'danger';
8
8
  type Size = 'sm' | 'md' | 'lg';
9
9
  type DecorHue = 'violet' | 'blue' | 'teal' | 'green' | 'amber' | 'rose';
10
10
 
11
- type SurfaceVariant = 'plain' | 'tinted' | 'glass' | 'gradient';
11
+ type SurfaceVariant = 'plain' | 'tinted' | 'glass' | 'gradient' | 'paper';
12
12
  type GlassStyle = 'regular' | 'clear';
13
+ type PaperTilt = 'left' | 'none' | 'right';
13
14
  interface SurfaceProps {
14
15
  variant?: SurfaceVariant;
15
16
  /** Glass density. `clear` is reserved for bold controls over visually rich content. */
16
17
  glassStyle?: GlassStyle;
18
+ /** Decorative paper rotation. Only applies to the `paper` variant. */
19
+ paperTilt?: PaperTilt;
17
20
  /** Semantic colour for `tinted`; ignored by `plain`. */
18
21
  tone?: Tone;
19
22
  /** Decorative hue for `tinted` / `gradient` — the pastel card set. Wins over `tone`. */
@@ -32,7 +35,7 @@ interface SurfaceProps {
32
35
  * variants rather than being baked into the brand, so one Skin reproduces the
33
36
  * reference board and another produces something sober without touching a component.
34
37
  */
35
- declare function Surface({ variant, glassStyle, tone, hue, elevation, radius, padding, bordered, className, children, asSection, }: SurfaceProps): react.JSX.Element;
38
+ declare function Surface({ variant, glassStyle, paperTilt, tone, hue, elevation, radius, padding, bordered, className, children, asSection, }: SurfaceProps): react.JSX.Element;
36
39
 
37
40
  type SpaceStep = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
38
41
  interface StackProps {
@@ -211,4 +214,4 @@ interface LeaderboardProps {
211
214
  declare function LeaderboardRoot({ entries, label, medals, className }: LeaderboardProps): react.JSX.Element;
212
215
  declare const Leaderboard: typeof LeaderboardRoot;
213
216
 
214
- export { BarMini, type BarMiniProps, Container, type ContainerProps, type DecorHue, Donut, type DonutArc, type DonutProps, type DonutSlice, Flex, type GlassStyle, Grid, type GridProps, Heading, type HeadingProps, Leaderboard, type LeaderboardEntry, type LeaderboardProps, PageContainer, type PageContainerProps, PageContainerSkeleton, type PageContainerSkeletonProps, type Size, Sparkline, type SparklineGeometry, type SparklineProps, type StackProps, Surface, type SurfaceProps, type SurfaceVariant, Text, type TextProps, type Tone, cn, donutArcs, sparklineGeometry };
217
+ export { BarMini, type BarMiniProps, Container, type ContainerProps, type DecorHue, Donut, type DonutArc, type DonutProps, type DonutSlice, Flex, type GlassStyle, Grid, type GridProps, Heading, type HeadingProps, Leaderboard, type LeaderboardEntry, type LeaderboardProps, PageContainer, type PageContainerProps, PageContainerSkeleton, type PageContainerSkeletonProps, type PaperTilt, type Size, Sparkline, type SparklineGeometry, type SparklineProps, type StackProps, Surface, type SurfaceProps, type SurfaceVariant, Text, type TextProps, type Tone, cn, donutArcs, sparklineGeometry };
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ function cn(...parts) {
7
7
  function Surface({
8
8
  variant = "plain",
9
9
  glassStyle = "regular",
10
+ paperTilt = "none",
10
11
  tone = "neutral",
11
12
  hue,
12
13
  elevation = "sm",
@@ -33,6 +34,7 @@ function Surface({
33
34
  "data-tone": variant === "plain" ? void 0 : tone,
34
35
  "data-hue": hue,
35
36
  "data-glass-style": variant === "glass" ? glassStyle : void 0,
37
+ "data-paper-tilt": variant === "paper" ? paperTilt : void 0,
36
38
  children
37
39
  }
38
40
  );
@@ -0,0 +1,92 @@
1
+ /* Moodboard: the warm taped-paper Skin first shaped for Ceebee List.
2
+ A Skin rewrites tokens only; paper and sticker geometry stay component-owned. */
3
+ :root {
4
+ --cb-hue-brand: 348;
5
+
6
+ --cb-bg: oklch(0.9611 0.0103 67.7);
7
+ --cb-bg-subtle: oklch(0.9702 0.03 83.6);
8
+ --cb-surface: oklch(0.9942 0.0069 88.6);
9
+ --cb-surface-raised: oklch(1 0 0);
10
+ --cb-border: oklch(0.8575 0.0147 57.6);
11
+ --cb-border-strong: oklch(0.62 0.0264 291);
12
+
13
+ --cb-fg: oklch(0.3255 0.0264 291);
14
+ --cb-fg-muted: oklch(0.47 0.0264 291);
15
+ --cb-fg-subtle: oklch(0.54 0.022 291);
16
+
17
+ --cb-decor-violet: oklch(0.8986 0.0385 295.4);
18
+ --cb-decor-blue: oklch(0.9243 0.0227 233.4);
19
+ --cb-decor-teal: oklch(0.9184 0.0267 163.2);
20
+ --cb-decor-green: oklch(0.9184 0.0267 163.2);
21
+ --cb-decor-amber: oklch(0.9247 0.0745 96.8);
22
+ --cb-decor-rose: oklch(0.8816 0.0434 348);
23
+
24
+ --cb-shadow-sm: 0 var(--cb-space-1) var(--cb-space-2) oklch(0.3255 0.0264 291 / 0.09);
25
+ --cb-shadow-md: 0 var(--cb-space-2) var(--cb-space-5) oklch(0.3255 0.0264 291 / 0.12);
26
+ --cb-shadow-lg: 0 var(--cb-space-5) var(--cb-space-7) oklch(0.3255 0.0264 291 / 0.16);
27
+
28
+ --cb-paper-bg: oklch(0.9942 0.0069 88.6);
29
+ --cb-paper-bg-warm: oklch(0.9702 0.03 83.6);
30
+ --cb-paper-fg: oklch(0.3255 0.0264 291);
31
+ --cb-paper-border: oklch(0.8575 0.0147 57.6);
32
+ --cb-paper-tape: oklch(0.9247 0.0745 96.8 / 0.74);
33
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0.3255 0.0264 291 / 0.14);
34
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0.3255 0.0264 291 / 0.16);
35
+
36
+ --cb-tint-strength: 0.18;
37
+ }
38
+
39
+ :root[data-theme="dark"] {
40
+ --cb-bg: oklch(0.2117 0.0158 279.4);
41
+ --cb-bg-subtle: oklch(0.2811 0.0183 285.2);
42
+ --cb-surface: oklch(0.2811 0.0183 285.2);
43
+ --cb-surface-raised: oklch(0.3022 0.0113 55.9);
44
+ --cb-border: oklch(0.4028 0.0177 308);
45
+ --cb-border-strong: oklch(0.58 0.022 308);
46
+
47
+ --cb-fg: oklch(0.9524 0.0093 62.6);
48
+ --cb-fg-muted: oklch(0.78 0.018 62.6);
49
+ --cb-fg-subtle: oklch(0.68 0.018 62.6);
50
+
51
+ --cb-decor-violet: oklch(0.3447 0.0451 290.9);
52
+ --cb-decor-blue: oklch(0.3645 0.0299 235.5);
53
+ --cb-decor-teal: oklch(0.3731 0.0308 170.1);
54
+ --cb-decor-green: oklch(0.3731 0.0308 170.1);
55
+ --cb-decor-amber: oklch(0.3918 0.039 91.8);
56
+ --cb-decor-rose: oklch(0.3478 0.0374 349);
57
+
58
+ --cb-paper-bg: oklch(0.2811 0.0183 285.2);
59
+ --cb-paper-bg-warm: oklch(0.3022 0.0113 55.9);
60
+ --cb-paper-fg: oklch(0.9524 0.0093 62.6);
61
+ --cb-paper-border: oklch(0.4028 0.0177 308);
62
+ --cb-paper-tape: oklch(0.4773 0.0499 96.2 / 0.82);
63
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0 0 0 / 0.46);
64
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0 0 0 / 0.42);
65
+ }
66
+
67
+ @media (prefers-color-scheme: dark) {
68
+ :root:not([data-theme="light"]) {
69
+ --cb-bg: oklch(0.2117 0.0158 279.4);
70
+ --cb-bg-subtle: oklch(0.2811 0.0183 285.2);
71
+ --cb-surface: oklch(0.2811 0.0183 285.2);
72
+ --cb-surface-raised: oklch(0.3022 0.0113 55.9);
73
+ --cb-border: oklch(0.4028 0.0177 308);
74
+ --cb-border-strong: oklch(0.58 0.022 308);
75
+ --cb-fg: oklch(0.9524 0.0093 62.6);
76
+ --cb-fg-muted: oklch(0.78 0.018 62.6);
77
+ --cb-fg-subtle: oklch(0.68 0.018 62.6);
78
+ --cb-decor-violet: oklch(0.3447 0.0451 290.9);
79
+ --cb-decor-blue: oklch(0.3645 0.0299 235.5);
80
+ --cb-decor-teal: oklch(0.3731 0.0308 170.1);
81
+ --cb-decor-green: oklch(0.3731 0.0308 170.1);
82
+ --cb-decor-amber: oklch(0.3918 0.039 91.8);
83
+ --cb-decor-rose: oklch(0.3478 0.0374 349);
84
+ --cb-paper-bg: oklch(0.2811 0.0183 285.2);
85
+ --cb-paper-bg-warm: oklch(0.3022 0.0113 55.9);
86
+ --cb-paper-fg: oklch(0.9524 0.0093 62.6);
87
+ --cb-paper-border: oklch(0.4028 0.0177 308);
88
+ --cb-paper-tape: oklch(0.4773 0.0499 96.2 / 0.82);
89
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0 0 0 / 0.46);
90
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0 0 0 / 0.42);
91
+ }
92
+ }
package/dist/styles.css CHANGED
@@ -18,6 +18,11 @@
18
18
  --cb-radius-xl: 1.75rem;
19
19
  --cb-radius-full: 999px;
20
20
 
21
+ /* Small decorative rotations shared by paper and sticker materials. */
22
+ --cb-tilt-left: -1.5deg;
23
+ --cb-tilt-none: 0deg;
24
+ --cb-tilt-right: 1.5deg;
25
+
21
26
  --cb-text-xs: 0.75rem;
22
27
  --cb-text-sm: 0.875rem;
23
28
  --cb-text-md: 1rem;
@@ -36,6 +41,13 @@
36
41
  --cb-control-height-sm: 2rem;
37
42
  --cb-control-height-md: 2.5rem;
38
43
  --cb-control-height-lg: 3rem;
44
+ --cb-canvas-block-size: 32rem;
45
+
46
+ --cb-sticker-enter-y: var(--cb-space-3);
47
+ --cb-sticker-exit-x: var(--cb-space-6);
48
+ --cb-sticker-enter-scale: 0.94;
49
+ --cb-sticker-exit-scale: 0.9;
50
+ --cb-sticker-exit-rotate: 8deg;
39
51
 
40
52
  --cb-border-width: 1px;
41
53
  --cb-focus-width: 2px;
@@ -120,6 +132,15 @@
120
132
  --cb-shadow-md: 0 4px 16px oklch(0.3 0.03 280 / 0.08);
121
133
  --cb-shadow-lg: 0 18px 48px oklch(0.3 0.03 280 / 0.12);
122
134
 
135
+ /* Paper is a material seam: Skins may retune it without changing Surface or StickerGroup. */
136
+ --cb-paper-bg: var(--cb-surface);
137
+ --cb-paper-bg-warm: oklch(0.98 0.018 80);
138
+ --cb-paper-fg: var(--cb-fg);
139
+ --cb-paper-border: var(--cb-border);
140
+ --cb-paper-tape: oklch(0.9 0.055 92 / 0.78);
141
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0.3 0.03 280 / 0.1);
142
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0.3 0.03 280 / 0.12);
143
+
123
144
  --cb-glass-bg: oklch(1 0 0 / 0.74);
124
145
  --cb-glass-bg-opaque: oklch(0.985 0.004 280);
125
146
  --cb-glass-border: oklch(1 0 0 / 0.55);
@@ -163,6 +184,14 @@
163
184
  --cb-shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
164
185
  --cb-shadow-lg: 0 22px 56px oklch(0 0 0 / 0.55);
165
186
 
187
+ --cb-paper-bg: var(--cb-surface);
188
+ --cb-paper-bg-warm: oklch(0.3 0.025 70);
189
+ --cb-paper-fg: var(--cb-fg);
190
+ --cb-paper-border: var(--cb-border);
191
+ --cb-paper-tape: oklch(0.46 0.05 92 / 0.82);
192
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0 0 0 / 0.42);
193
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0 0 0 / 0.38);
194
+
166
195
  --cb-glass-bg: oklch(0.28 0.028 280 / 0.72);
167
196
  --cb-glass-bg-opaque: oklch(0.25 0.024 280);
168
197
  --cb-glass-border: oklch(0.8 0.02 280 / 0.16);
@@ -205,6 +234,14 @@
205
234
  --cb-shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
206
235
  --cb-shadow-lg: 0 22px 56px oklch(0 0 0 / 0.55);
207
236
 
237
+ --cb-paper-bg: var(--cb-surface);
238
+ --cb-paper-bg-warm: oklch(0.3 0.025 70);
239
+ --cb-paper-fg: var(--cb-fg);
240
+ --cb-paper-border: var(--cb-border);
241
+ --cb-paper-tape: oklch(0.46 0.05 92 / 0.82);
242
+ --cb-paper-shadow: 0 var(--cb-space-2) var(--cb-space-5) oklch(0 0 0 / 0.42);
243
+ --cb-sticker-shadow: 0 var(--cb-space-1) var(--cb-space-2) oklch(0 0 0 / 0.38);
244
+
208
245
  --cb-glass-bg: oklch(0.28 0.028 280 / 0.72);
209
246
  --cb-glass-bg-opaque: oklch(0.25 0.024 280);
210
247
  --cb-glass-border: oklch(0.8 0.02 280 / 0.16);
@@ -461,11 +498,40 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
461
498
  );
462
499
  }
463
500
 
501
+ .cb-surface--paper {
502
+ background: var(--cb-paper-bg);
503
+ border-color: var(--cb-paper-border);
504
+ color: var(--cb-paper-fg);
505
+ position: relative;
506
+ transform: rotate(var(--cb-tilt-none));
507
+ box-shadow: var(--cb-paper-shadow);
508
+ }
509
+
510
+ .cb-surface--paper::before {
511
+ background: var(--cb-paper-tape);
512
+ content: "";
513
+ height: var(--cb-space-3);
514
+ left: 50%;
515
+ pointer-events: none;
516
+ position: absolute;
517
+ top: calc(var(--cb-space-2) * -1);
518
+ transform: translateX(-50%) rotate(var(--cb-tilt-left));
519
+ width: calc(var(--cb-space-7) + var(--cb-space-2));
520
+ }
521
+
522
+ .cb-surface--paper[data-paper-tilt="left"] { transform: rotate(var(--cb-tilt-left)); }
523
+ .cb-surface--paper[data-paper-tilt="right"] { transform: rotate(var(--cb-tilt-right)); }
524
+
464
525
  .cb-elevation--none { box-shadow: var(--cb-surface-material-shadow); }
465
526
  .cb-elevation--sm { box-shadow: var(--cb-surface-material-shadow), var(--cb-shadow-sm); }
466
527
  .cb-elevation--md { box-shadow: var(--cb-surface-material-shadow), var(--cb-shadow-md); }
467
528
  .cb-elevation--lg { box-shadow: var(--cb-surface-material-shadow), var(--cb-shadow-lg); }
468
529
 
530
+ .cb-surface--paper.cb-elevation--none,
531
+ .cb-surface--paper.cb-elevation--sm,
532
+ .cb-surface--paper.cb-elevation--md,
533
+ .cb-surface--paper.cb-elevation--lg { box-shadow: var(--cb-paper-shadow); }
534
+
469
535
  @supports not ((backdrop-filter: blur(var(--cb-glass-blur))) or (-webkit-backdrop-filter: blur(var(--cb-glass-blur)))) {
470
536
  .cb-surface--glass { background: var(--cb-glass-opaque-fill); }
471
537
  }
@@ -496,6 +562,16 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
496
562
  -webkit-backdrop-filter: none;
497
563
  backdrop-filter: none;
498
564
  }
565
+
566
+
567
+ .cb-surface--paper {
568
+ background: Canvas;
569
+ border-color: CanvasText;
570
+ color: CanvasText;
571
+ transform: none;
572
+ }
573
+
574
+ .cb-surface--paper::before { display: none; }
499
575
  }
500
576
 
501
577
  .cb-radius--none { border-radius: var(--cb-radius-none); }
@@ -843,6 +919,223 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
843
919
  object-fit: cover;
844
920
  }
845
921
 
922
+ /* data/pan-zoom-canvas/pan-zoom-canvas.css */
923
+ .cb-pan-zoom-canvas {
924
+ background: var(--cb-surface);
925
+ border: var(--cb-border-width) solid var(--cb-border);
926
+ border-radius: var(--cb-radius-lg);
927
+ color: var(--cb-fg);
928
+ min-inline-size: 0;
929
+ overflow: hidden;
930
+ }
931
+
932
+ .cb-pan-zoom-canvas__toolbar {
933
+ align-items: center;
934
+ background: var(--cb-bg-subtle);
935
+ border-block-end: var(--cb-border-width) solid var(--cb-border);
936
+ display: flex;
937
+ gap: var(--cb-space-3);
938
+ justify-content: space-between;
939
+ min-block-size: var(--cb-control-height-lg);
940
+ padding: var(--cb-space-2) var(--cb-space-3);
941
+ }
942
+
943
+ .cb-pan-zoom-canvas__hint {
944
+ color: var(--cb-fg-muted);
945
+ font-size: var(--cb-text-xs);
946
+ margin: 0;
947
+ }
948
+
949
+ .cb-pan-zoom-canvas__controls {
950
+ align-items: center;
951
+ display: flex;
952
+ gap: var(--cb-space-1);
953
+ }
954
+
955
+ .cb-pan-zoom-canvas__controls svg {
956
+ block-size: var(--cb-text-md);
957
+ inline-size: var(--cb-text-md);
958
+ }
959
+
960
+ .cb-pan-zoom-canvas__zoom {
961
+ color: var(--cb-fg-muted);
962
+ font-size: var(--cb-text-xs);
963
+ font-variant-numeric: tabular-nums;
964
+ min-inline-size: var(--cb-control-height-md);
965
+ text-align: center;
966
+ }
967
+
968
+ .cb-pan-zoom-canvas__viewport {
969
+ block-size: var(--cb-canvas-block-size);
970
+ cursor: grab;
971
+ overflow: hidden;
972
+ position: relative;
973
+ touch-action: none;
974
+ }
975
+
976
+ .cb-pan-zoom-canvas__viewport:active { cursor: grabbing; }
977
+
978
+ .cb-pan-zoom-canvas__viewport:focus-visible {
979
+ outline: var(--cb-focus-width) solid var(--cb-focus);
980
+ outline-offset: var(--cb-focus-offset-inset);
981
+ }
982
+
983
+ .cb-pan-zoom-canvas__step {
984
+ inline-size: var(--cb-space-5);
985
+ pointer-events: none;
986
+ position: absolute;
987
+ visibility: hidden;
988
+ }
989
+
990
+ .cb-pan-zoom-canvas__content {
991
+ min-block-size: 100%;
992
+ min-inline-size: 100%;
993
+ transform: translate(
994
+ calc(var(--cb-space-5) * var(--cb-pan-zoom-x)),
995
+ calc(var(--cb-space-5) * var(--cb-pan-zoom-y))
996
+ ) scale(var(--cb-pan-zoom-scale));
997
+ transform-origin: center;
998
+ }
999
+
1000
+ .cb-pan-zoom-canvas[data-motion="true"] .cb-pan-zoom-canvas__content {
1001
+ transition: transform var(--cb-duration-base) var(--cb-ease-standard);
1002
+ }
1003
+
1004
+ .cb-pan-zoom-canvas--skeleton {
1005
+ block-size: var(--cb-canvas-block-size);
1006
+ position: relative;
1007
+ }
1008
+
1009
+ .cb-pan-zoom-canvas__skeleton-controls,
1010
+ .cb-pan-zoom-canvas__skeleton-node,
1011
+ .cb-pan-zoom-canvas__skeleton-line {
1012
+ background: var(--cb-bg-subtle);
1013
+ display: block;
1014
+ position: absolute;
1015
+ }
1016
+
1017
+ .cb-pan-zoom-canvas__skeleton-controls {
1018
+ block-size: var(--cb-control-height-sm);
1019
+ border-radius: var(--cb-radius-sm);
1020
+ inline-size: calc(var(--cb-space-8) * 2);
1021
+ inset-block-start: var(--cb-space-3);
1022
+ inset-inline-end: var(--cb-space-3);
1023
+ }
1024
+
1025
+ .cb-pan-zoom-canvas__skeleton-node {
1026
+ block-size: var(--cb-control-height-lg);
1027
+ border-radius: var(--cb-radius-md);
1028
+ inline-size: calc(var(--cb-space-8) * 2);
1029
+ inset-block-start: 50%;
1030
+ }
1031
+
1032
+ .cb-pan-zoom-canvas__skeleton-node--start { inset-inline-start: var(--cb-space-6); }
1033
+ .cb-pan-zoom-canvas__skeleton-node--end { inset-inline-end: var(--cb-space-6); }
1034
+
1035
+ .cb-pan-zoom-canvas__skeleton-line {
1036
+ block-size: var(--cb-border-width);
1037
+ inset-block-start: calc(50% + var(--cb-space-3));
1038
+ inset-inline: calc(var(--cb-space-8) * 3);
1039
+ }
1040
+
1041
+ @media (prefers-reduced-motion: reduce) {
1042
+ .cb-pan-zoom-canvas__content { transition: none; }
1043
+ }
1044
+
1045
+ @media (forced-colors: active) {
1046
+ .cb-pan-zoom-canvas,
1047
+ .cb-pan-zoom-canvas__toolbar { border-color: CanvasText; }
1048
+ }
1049
+
1050
+ /* data/sticker-group/sticker-group.css */
1051
+ .cb-sticker-group {
1052
+ display: flex;
1053
+ flex-wrap: wrap;
1054
+ gap: var(--cb-space-2);
1055
+ list-style: none;
1056
+ margin: 0;
1057
+ padding: 0;
1058
+ }
1059
+
1060
+ .cb-sticker-group__item {
1061
+ --cb-sticker-fill: var(--cb-paper-bg-warm);
1062
+ --cb-sticker-tilt: var(--cb-tilt-none);
1063
+ --cb-sticker-resolved-exit-x: var(--cb-sticker-exit-x);
1064
+ --cb-sticker-resolved-exit-rotate: var(--cb-sticker-exit-rotate);
1065
+ }
1066
+
1067
+ .cb-sticker-group__item[data-tilt="left"] { --cb-sticker-tilt: var(--cb-tilt-left); }
1068
+ .cb-sticker-group__item[data-tilt="right"] { --cb-sticker-tilt: var(--cb-tilt-right); }
1069
+ .cb-sticker-group__item[data-exit="left"] {
1070
+ --cb-sticker-resolved-exit-x: calc(var(--cb-sticker-exit-x) * -1);
1071
+ --cb-sticker-resolved-exit-rotate: calc(var(--cb-sticker-exit-rotate) * -1);
1072
+ }
1073
+
1074
+ .cb-sticker-group__item[data-hue="violet"] { --cb-sticker-fill: var(--cb-decor-violet); }
1075
+ .cb-sticker-group__item[data-hue="blue"] { --cb-sticker-fill: var(--cb-decor-blue); }
1076
+ .cb-sticker-group__item[data-hue="teal"] { --cb-sticker-fill: var(--cb-decor-teal); }
1077
+ .cb-sticker-group__item[data-hue="green"] { --cb-sticker-fill: var(--cb-decor-green); }
1078
+ .cb-sticker-group__item[data-hue="amber"] { --cb-sticker-fill: var(--cb-decor-amber); }
1079
+ .cb-sticker-group__item[data-hue="rose"] { --cb-sticker-fill: var(--cb-decor-rose); }
1080
+
1081
+ .cb-sticker-group__button {
1082
+ align-items: center;
1083
+ appearance: none;
1084
+ background: color-mix(in oklch, var(--cb-sticker-fill) 72%, var(--cb-paper-bg));
1085
+ border: var(--cb-border-width) dashed color-mix(in oklch, var(--cb-paper-fg) 28%, transparent);
1086
+ border-radius: var(--cb-radius-sm);
1087
+ box-shadow: var(--cb-sticker-shadow);
1088
+ color: var(--cb-paper-fg);
1089
+ cursor: pointer;
1090
+ display: inline-flex;
1091
+ font: inherit;
1092
+ font-weight: var(--cb-weight-semibold);
1093
+ gap: var(--cb-space-2);
1094
+ min-height: var(--cb-control-height-md);
1095
+ padding: var(--cb-space-2) var(--cb-space-3);
1096
+ text-align: start;
1097
+ }
1098
+
1099
+ @media (hover: hover) {
1100
+ .cb-sticker-group__button:hover {
1101
+ background: color-mix(in oklch, var(--cb-sticker-fill) 84%, var(--cb-paper-bg));
1102
+ }
1103
+ }
1104
+
1105
+ .cb-sticker-group__button:focus-visible {
1106
+ outline: var(--cb-focus-width) solid var(--cb-tone-brand);
1107
+ outline-offset: var(--cb-focus-offset);
1108
+ }
1109
+
1110
+ .cb-sticker-group__icon {
1111
+ flex: none;
1112
+ height: var(--cb-text-sm);
1113
+ width: var(--cb-text-sm);
1114
+ }
1115
+
1116
+ .cb-sticker-group--skeleton { align-items: center; }
1117
+
1118
+ .cb-sticker-group__skeleton-item {
1119
+ background: var(--cb-bg-subtle);
1120
+ border-radius: var(--cb-radius-sm);
1121
+ display: block;
1122
+ height: var(--cb-control-height-md);
1123
+ width: calc(var(--cb-space-7) + var(--cb-space-5));
1124
+ }
1125
+
1126
+ @media (prefers-reduced-motion: reduce) {
1127
+ .cb-sticker-group__item { transform: none !important; }
1128
+ }
1129
+
1130
+ @media (forced-colors: active) {
1131
+ .cb-sticker-group__button {
1132
+ background: ButtonFace;
1133
+ border-color: ButtonText;
1134
+ box-shadow: none;
1135
+ color: ButtonText;
1136
+ }
1137
+ }
1138
+
846
1139
  /* nav/nav.css */
847
1140
  .cb-menu-positioner {
848
1141
  position: absolute;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceebee/ui",
3
- "version": "1.0.2",
3
+ "version": "1.2.0",
4
4
  "description": "Ceebee's design system: tokens, themed primitives, motion, and onboarding.",
5
5
  "license": "MIT",
6
6
  "repository": {