@ceebee/ui 1.3.1 → 1.3.3

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.
Files changed (2) hide show
  1. package/dist/client.js +17 -6
  2. package/package.json +1 -1
package/dist/client.js CHANGED
@@ -82,9 +82,10 @@ function readCeebeeThemeToken(root) {
82
82
  colorTextTertiary: color("--cb-fg-subtle"),
83
83
  /* Ant derives its placeholder colour from its own algorithm rather than from any token this
84
84
  bridge already sends, and lands on a 25%-alpha grey that fails WCAG AA text contrast in both
85
- modes. Placeholder text is text, so it takes the subtle foreground like every other quiet
86
- label. */
87
- colorTextPlaceholder: color("--cb-fg-subtle"),
85
+ modes. Placeholder text is text, and the subtle foreground only clears AA against the plain
86
+ surface, so placeholders take the muted foreground that clears it against every surface a
87
+ control can sit on. */
88
+ colorTextPlaceholder: color("--cb-fg-muted"),
88
89
  colorTextLightSolid: color("--cb-fg-on-brand"),
89
90
  colorBgBase: color("--cb-bg"),
90
91
  colorBgContainer: color("--cb-surface"),
@@ -628,6 +629,16 @@ var STICKER_VARIANTS = {
628
629
  still: { opacity: 1, x: 0, y: 0, rotate: 0, scale: 1 },
629
630
  stillExit: { opacity: 0, x: 0, y: 0, rotate: 0, scale: 1 }
630
631
  };
632
+ function stableChoice(id, salt, options) {
633
+ let hash = 2166136261;
634
+ for (const character of `${salt}:${id}`) {
635
+ hash ^= character.charCodeAt(0);
636
+ hash = Math.imul(hash, 16777619);
637
+ }
638
+ return (hash >>> 0) % options;
639
+ }
640
+ var TILTS = ["left", "right", "none"];
641
+ var EXITS = ["left", "right"];
631
642
  function StickerGroupRoot({
632
643
  items,
633
644
  onDismiss,
@@ -638,9 +649,9 @@ function StickerGroupRoot({
638
649
  }) {
639
650
  const motionSettings = useMotionSettings();
640
651
  const shouldMove = motionEnabled && motionSettings.enabled;
641
- return /* @__PURE__ */ jsx("ul", { className: cn("cb-sticker-group", className), "aria-label": label, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: items.map((item, index) => {
642
- const tilt = index % 3 === 0 ? "left" : index % 3 === 1 ? "right" : "none";
643
- const exit = index % 2 === 0 ? "left" : "right";
652
+ return /* @__PURE__ */ jsx("ul", { className: cn("cb-sticker-group", className), "aria-label": label, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: items.map((item) => {
653
+ const tilt = TILTS[stableChoice(item.id, "tilt", TILTS.length)];
654
+ const exit = EXITS[stableChoice(item.id, "exit", EXITS.length)];
644
655
  const itemLabel = item.ariaLabel ?? (typeof item.label === "string" ? item.label : "item");
645
656
  const dismissLabel = getDismissLabel?.(item) ?? `Remove ${itemLabel}`;
646
657
  return /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceebee/ui",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "description": "Ceebee's design system: tokens, themed primitives, motion, and onboarding.",
5
5
  "license": "MIT",
6
6
  "repository": {