@cloudgrid-io/ui 0.73.0 → 0.75.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.
Files changed (55) hide show
  1. package/README.md +4 -0
  2. package/dist/blocks/avatar-picker.d.ts +8 -1
  3. package/dist/blocks/avatar-picker.d.ts.map +1 -1
  4. package/dist/blocks/avatar-picker.js +7 -4
  5. package/dist/blocks/avatar-picker.js.map +1 -1
  6. package/dist/blocks/empty-creations.d.ts +2 -1
  7. package/dist/blocks/empty-creations.d.ts.map +1 -1
  8. package/dist/blocks/empty-creations.js +3 -2
  9. package/dist/blocks/empty-creations.js.map +1 -1
  10. package/dist/blocks/from-your-grid.d.ts +10 -2
  11. package/dist/blocks/from-your-grid.d.ts.map +1 -1
  12. package/dist/blocks/from-your-grid.js +5 -3
  13. package/dist/blocks/from-your-grid.js.map +1 -1
  14. package/dist/blocks/grid-profile.d.ts +8 -1
  15. package/dist/blocks/grid-profile.d.ts.map +1 -1
  16. package/dist/blocks/grid-profile.js +7 -4
  17. package/dist/blocks/grid-profile.js.map +1 -1
  18. package/dist/blocks/home-pinned.d.ts +7 -1
  19. package/dist/blocks/home-pinned.d.ts.map +1 -1
  20. package/dist/blocks/home-pinned.js +2 -2
  21. package/dist/blocks/home-pinned.js.map +1 -1
  22. package/dist/blocks/image-adjust-dialog.d.ts +22 -2
  23. package/dist/blocks/image-adjust-dialog.d.ts.map +1 -1
  24. package/dist/blocks/image-adjust-dialog.js +60 -1
  25. package/dist/blocks/image-adjust-dialog.js.map +1 -1
  26. package/dist/blocks/inspiration-cards.d.ts +3 -1
  27. package/dist/blocks/inspiration-cards.d.ts.map +1 -1
  28. package/dist/blocks/inspiration-cards.js +1 -1
  29. package/dist/blocks/inspiration-cards.js.map +1 -1
  30. package/dist/blocks/invite-popup.d.ts +89 -18
  31. package/dist/blocks/invite-popup.d.ts.map +1 -1
  32. package/dist/blocks/invite-popup.js +39 -8
  33. package/dist/blocks/invite-popup.js.map +1 -1
  34. package/dist/blocks/stepper.d.ts +49 -0
  35. package/dist/blocks/stepper.d.ts.map +1 -0
  36. package/dist/blocks/stepper.js +19 -0
  37. package/dist/blocks/stepper.js.map +1 -0
  38. package/dist/index.d.ts +1 -0
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +1 -0
  41. package/dist/index.js.map +1 -1
  42. package/dist/lib/touch-hover.d.ts +11 -5
  43. package/dist/lib/touch-hover.d.ts.map +1 -1
  44. package/dist/lib/touch-hover.js +23 -18
  45. package/dist/lib/touch-hover.js.map +1 -1
  46. package/dist/theme.css +39 -0
  47. package/dist/ui/button.d.ts +1 -1
  48. package/dist/ui/button.d.ts.map +1 -1
  49. package/dist/ui/button.js +36 -1
  50. package/dist/ui/button.js.map +1 -1
  51. package/dist/ui/radio-group.d.ts +3 -1
  52. package/dist/ui/radio-group.d.ts.map +1 -1
  53. package/dist/ui/radio-group.js +19 -4
  54. package/dist/ui/radio-group.js.map +1 -1
  55. package/package.json +1 -1
@@ -35,9 +35,14 @@ import * as React from "react";
35
35
  * look is the hover look, eased by the same transition and stilled by the same
36
36
  * reduced-motion rule.
37
37
  *
38
- * One listener set per document, in the capture phase (so a handler that
38
+ * One listener set per window, in the capture phase (so a handler that
39
39
  * stops propagation cannot hide a tap, and a swallowed tap reaches nothing),
40
- * shared by every scope and counted, as `trackInputModality` is. The attribute
40
+ * shared by every scope and counted, as `trackInputModality` is. On `window`,
41
+ * not `document` (ui#572): in a Next app React's root is the document, and its
42
+ * listeners there, registered first, would hear the first tap before the
43
+ * library cancels it (a capture-phase `onClickCapture`, as the Console's open
44
+ * recorder was). The window's capture phase runs before anything on the
45
+ * document. The attribute
41
46
  * is written on the element, not through React state: nothing re-renders, and
42
47
  * the pieces that ask stay server components (`<TouchHover />` renders
43
48
  * nothing).
@@ -51,7 +56,7 @@ function closest(target, selector) {
51
56
  const el = target;
52
57
  return el && typeof el.closest === "function" ? el.closest(selector) : null;
53
58
  }
54
- function attach(doc, tracker) {
59
+ function attach(target, tracker) {
55
60
  // The last press, if it was a finger's, and where it landed, until its click
56
61
  // reads it. Cleared by every click and by a cancelled press, so a later
57
62
  // keyboard or synthesized click never inherits it.
@@ -103,15 +108,15 @@ function attach(doc, tracker) {
103
108
  // bubble, so the capture phase is also the only way to hear a rail's.
104
109
  const capture = { capture: true };
105
110
  const passive = { capture: true, passive: true };
106
- doc.addEventListener("pointerdown", onPointerDown, passive);
107
- doc.addEventListener("pointercancel", onPointerCancel, passive);
108
- doc.addEventListener("click", onClick, capture);
109
- doc.addEventListener("scroll", onScroll, passive);
111
+ target.addEventListener("pointerdown", onPointerDown, passive);
112
+ target.addEventListener("pointercancel", onPointerCancel, passive);
113
+ target.addEventListener("click", onClick, capture);
114
+ target.addEventListener("scroll", onScroll, passive);
110
115
  return () => {
111
- doc.removeEventListener("pointerdown", onPointerDown, passive);
112
- doc.removeEventListener("pointercancel", onPointerCancel, passive);
113
- doc.removeEventListener("click", onClick, capture);
114
- doc.removeEventListener("scroll", onScroll, passive);
116
+ target.removeEventListener("pointerdown", onPointerDown, passive);
117
+ target.removeEventListener("pointercancel", onPointerCancel, passive);
118
+ target.removeEventListener("click", onClick, capture);
119
+ target.removeEventListener("scroll", onScroll, passive);
115
120
  clear();
116
121
  };
117
122
  }
@@ -120,16 +125,16 @@ function attach(doc, tracker) {
120
125
  * state (`data-touch-hover`), and the second open. Returns a function that
121
126
  * stops this start. `<TouchHover scope=… />` is this in an effect.
122
127
  *
123
- * Counted per document and per scope: the first start attaches the listeners,
128
+ * Counted per window (or target) and per scope: the first start attaches the listeners,
124
129
  * the last stop removes them and clears the state; a stop released twice
125
130
  * counts once.
126
131
  */
127
- export function trackTouchHover(scope, doc = document) {
128
- let tracker = trackers.get(doc);
132
+ export function trackTouchHover(scope, target = window) {
133
+ let tracker = trackers.get(target);
129
134
  if (!tracker) {
130
135
  const t = { scopes: new Map(), current: null, detach: () => { } };
131
- t.detach = attach(doc, t);
132
- trackers.set(doc, t);
136
+ t.detach = attach(target, t);
137
+ trackers.set(target, t);
133
138
  tracker = t;
134
139
  }
135
140
  tracker.scopes.set(scope, (tracker.scopes.get(scope) ?? 0) + 1);
@@ -138,7 +143,7 @@ export function trackTouchHover(scope, doc = document) {
138
143
  if (released)
139
144
  return;
140
145
  released = true;
141
- const t = trackers.get(doc);
146
+ const t = trackers.get(target);
142
147
  if (!t)
143
148
  return;
144
149
  const n = (t.scopes.get(scope) ?? 1) - 1;
@@ -149,7 +154,7 @@ export function trackTouchHover(scope, doc = document) {
149
154
  t.scopes.delete(scope);
150
155
  if (t.scopes.size > 0)
151
156
  return;
152
- trackers.delete(doc);
157
+ trackers.delete(target);
153
158
  t.detach();
154
159
  };
155
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"touch-hover.js","sourceRoot":"","sources":["../../src/lib/touch-hover.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,kBAAkB,CAAA;AAEvD,mEAAmE;AACnE,MAAM,IAAI,GAAG,eAAe,CAAA;AAQ5B,MAAM,QAAQ,GAAG,IAAI,OAAO,EAA+B,CAAA;AAE3D,8FAA8F;AAC9F,SAAS,OAAO,CAAC,MAA0B,EAAE,QAAgB;IAC3D,MAAM,EAAE,GAAG,MAAqD,CAAA;IAChE,OAAO,EAAE,IAAI,OAAO,EAAE,CAAC,OAAO,KAAK,UAAU,CAAC,CAAC,CAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAyB,CAAC,CAAC,CAAC,IAAI,CAAA;AACtG,CAAC;AAED,SAAS,MAAM,CAAC,GAAuB,EAAE,OAAgB;IACvD,6EAA6E;IAC7E,wEAAwE;IACxE,mDAAmD;IACnD,IAAI,MAAM,GAAuB,IAAI,CAAA;IAErC,MAAM,KAAK,GAAG,GAAG,EAA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KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACxC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACV,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;YACtB,OAAM;QACR,CAAC;QACD,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACtB,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC;YAAE,OAAM;QAC7B,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;QACvB,CAAC,CAAC,MAAM,EAAE,CAAA;IACZ,CAAC,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAqB;IACrD,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IACtD,OAAO,IAAI,CAAA;AACb,CAAC"}
package/dist/theme.css CHANGED
@@ -17,6 +17,11 @@
17
17
  friends. Those names do not exist in this brand system, so this file is
18
18
  authored against the real tokens rather than copied from the guide.
19
19
 
20
+ The overlays' enter and exit animations (`animate-in`, `fade-in-0`,
21
+ `zoom-in-95`, `slide-in-from-right`...) are at the end of this file: the
22
+ `tw-animate-css` stylesheet, shipped here so a consumer gets them from this
23
+ file alone (ui#518). Importing `tw-animate-css` as well still works.
24
+
20
25
  Utilities are a convenience layer, not the contract. The canon in tokens.css
21
26
  stands: components consume custom properties exclusively and must never
22
27
  hardcode a hex. Where a component needs a token with no utility (durations,
@@ -650,3 +655,37 @@
650
655
  @utility focus-none {
651
656
  outline: none;
652
657
  }
658
+
659
+ /*
660
+ ui#518: the library's overlays (Drawer, Dialog, Popover, the menus, Select,
661
+ Combobox, Tooltip) enter and exit with these utilities. They are
662
+ tw-animate-css's, shipped here, unchanged, so a consumer needs no other
663
+ import. Kept byte for byte as the package publishes them, so an update is a
664
+ copy; packages/ui/test/overlay-animations-518.test.mjs holds it to that.
665
+ */
666
+
667
+ /* tw-animate-css 1.4.0 (https://github.com/Wombosvideo/tw-animate-css), dist/tw-animate.css.
668
+
669
+ MIT License
670
+
671
+ Copyright (c) 2025 Wombosvideo
672
+
673
+ Permission is hereby granted, free of charge, to any person obtaining a copy
674
+ of this software and associated documentation files (the "Software"), to deal
675
+ in the Software without restriction, including without limitation the rights
676
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
677
+ copies of the Software, and to permit persons to whom the Software is
678
+ furnished to do so, subject to the following conditions:
679
+
680
+ The above copyright notice and this permission notice shall be included in all
681
+ copies or substantial portions of the Software.
682
+
683
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
684
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
685
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
686
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
687
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
688
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
689
+ SOFTWARE.
690
+ */
691
+ @property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@theme inline{--animation-delay-0: 0s; --animation-delay-75: 75ms; --animation-delay-100: .1s; --animation-delay-150: .15s; --animation-delay-200: .2s; --animation-delay-300: .3s; --animation-delay-500: .5s; --animation-delay-700: .7s; --animation-delay-1000: 1s; --animation-repeat-0: 0; --animation-repeat-1: 1; --animation-repeat-infinite: infinite; --animation-direction-normal: normal; --animation-direction-reverse: reverse; --animation-direction-alternate: alternate; --animation-direction-alternate-reverse: alternate-reverse; --animation-fill-mode-none: none; --animation-fill-mode-forwards: forwards; --animation-fill-mode-backwards: backwards; --animation-fill-mode-both: both; --percentage-0: 0; --percentage-5: .05; --percentage-10: .1; --percentage-15: .15; --percentage-20: .2; --percentage-25: .25; --percentage-30: .3; --percentage-35: .35; --percentage-40: .4; --percentage-45: .45; --percentage-50: .5; --percentage-55: .55; --percentage-60: .6; --percentage-65: .65; --percentage-70: .7; --percentage-75: .75; --percentage-80: .8; --percentage-85: .85; --percentage-90: .9; --percentage-95: .95; --percentage-100: 1; --percentage-translate-full: 1; --animate-in: enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-out: exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes enter { from { opacity: var(--tw-enter-opacity,1); transform: translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0)); filter: blur(var(--tw-enter-blur,0)); }}@keyframes exit { to { opacity: var(--tw-exit-opacity,1); transform: translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0)); filter: blur(var(--tw-exit-blur,0)); }}--animate-accordion-down: accordion-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-accordion-up: accordion-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-down: collapsible-down var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); --animate-collapsible-up: collapsible-up var(--tw-animation-duration,var(--tw-duration,.2s))var(--tw-ease,ease-out)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none); @keyframes accordion-down { from { height: 0; }to { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }}@keyframes accordion-up { from { height: var(--radix-accordion-content-height,var(--bits-accordion-content-height,var(--reka-accordion-content-height,var(--kb-accordion-content-height,var(--ngp-accordion-content-height,auto))))); }to { height: 0; }}@keyframes collapsible-down { from { height: 0; }to { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }}@keyframes collapsible-up { from { height: var(--radix-collapsible-content-height,var(--bits-collapsible-content-height,var(--reka-collapsible-content-height,var(--kb-collapsible-content-height,auto)))); }to { height: 0; }}--animate-caret-blink: caret-blink 1.25s ease-out infinite; @keyframes caret-blink { 0%,70%,100% { opacity: 1; }20%,50% { opacity: 0; }}}@utility animation-duration-*{--tw-animation-duration: calc(--value(number)*1ms); --tw-animation-duration: --value(--animation-duration-*,[duration],"initial",[*]); animation-duration: calc(--value(number)*1ms); animation-duration: --value(--animation-duration-*,[duration],"initial",[*]);}@utility delay-*{animation-delay: calc(--value(number)*1ms); animation-delay: --value(--animation-delay-*,[duration],"initial",[*]); --tw-animation-delay: calc(--value(number)*1ms); --tw-animation-delay: --value(--animation-delay-*,[duration],"initial",[*]);}@utility repeat-*{animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]); --tw-animation-iteration-count: --value(--animation-repeat-*,number,"initial",[*]);}@utility direction-*{animation-direction: --value(--animation-direction-*,"initial",[*]); --tw-animation-direction: --value(--animation-direction-*,"initial",[*]);}@utility fill-mode-*{animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]); --tw-animation-fill-mode: --value(--animation-fill-mode-*,"initial",[*]);}@utility running{animation-play-state: running;}@utility paused{animation-play-state: paused;}@utility play-state-*{animation-play-state: --value("initial",[*]);}@utility blur-in{--tw-enter-blur: 20px;}@utility blur-in-*{--tw-enter-blur: calc(--value(number)*1px); --tw-enter-blur: --value(--blur-*,[*]);}@utility blur-out{--tw-exit-blur: 20px;}@utility blur-out-*{--tw-exit-blur: calc(--value(number)*1px); --tw-exit-blur: --value(--blur-*,[*]);}@utility fade-in{--tw-enter-opacity: 0;}@utility fade-in-*{--tw-enter-opacity: calc(--value(number)/100); --tw-enter-opacity: --value(--percentage-*,[*]);}@utility fade-out{--tw-exit-opacity: 0;}@utility fade-out-*{--tw-exit-opacity: calc(--value(number)/100); --tw-exit-opacity: --value(--percentage-*,[*]);}@utility zoom-in{--tw-enter-scale: 0;}@utility zoom-in-*{--tw-enter-scale: calc(--value(number)*1%); --tw-enter-scale: calc(--value(ratio)); --tw-enter-scale: --value(--percentage-*,[*]);}@utility -zoom-in-*{--tw-enter-scale: calc(--value(number)*-1%); --tw-enter-scale: calc(--value(ratio)*-1); --tw-enter-scale: --value(--percentage-*,[*]);}@utility zoom-out{--tw-exit-scale: 0;}@utility zoom-out-*{--tw-exit-scale: calc(--value(number)*1%); --tw-exit-scale: calc(--value(ratio)); --tw-exit-scale: --value(--percentage-*,[*]);}@utility -zoom-out-*{--tw-exit-scale: calc(--value(number)*-1%); --tw-exit-scale: calc(--value(ratio)*-1); --tw-exit-scale: --value(--percentage-*,[*]);}@utility spin-in{--tw-enter-rotate: 30deg;}@utility spin-in-*{--tw-enter-rotate: calc(--value(number)*1deg); --tw-enter-rotate: calc(--value(ratio)*360deg); --tw-enter-rotate: --value(--rotate-*,[*]);}@utility -spin-in{--tw-enter-rotate: -30deg;}@utility -spin-in-*{--tw-enter-rotate: calc(--value(number)*-1deg); --tw-enter-rotate: calc(--value(ratio)*-360deg); --tw-enter-rotate: --value(--rotate-*,[*]);}@utility spin-out{--tw-exit-rotate: 30deg;}@utility spin-out-*{--tw-exit-rotate: calc(--value(number)*1deg); --tw-exit-rotate: calc(--value(ratio)*360deg); --tw-exit-rotate: --value(--rotate-*,[*]);}@utility -spin-out{--tw-exit-rotate: -30deg;}@utility -spin-out-*{--tw-exit-rotate: calc(--value(number)*-1deg); --tw-exit-rotate: calc(--value(ratio)*-360deg); --tw-exit-rotate: --value(--rotate-*,[*]);}@utility slide-in-from-top{--tw-enter-translate-y: -100%;}@utility slide-in-from-top-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-y: calc(--value(ratio)*-100%); --tw-enter-translate-y: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-in-from-bottom{--tw-enter-translate-y: 100%;}@utility slide-in-from-bottom-*{--tw-enter-translate-y: calc(--value(integer)*var(--spacing)); --tw-enter-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-y: calc(--value(ratio)*100%); --tw-enter-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-left{--tw-enter-translate-x: -100%;}@utility slide-in-from-left-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-in-from-right{--tw-enter-translate-x: 100%;}@utility slide-in-from-right-*{--tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-in-from-start{&:dir(ltr){ --tw-enter-translate-x: -100%; }&:dir(rtl){ --tw-enter-translate-x: 100%; }}@utility slide-in-from-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-in-from-end{&:dir(ltr){ --tw-enter-translate-x: 100%; }&:dir(rtl){ --tw-enter-translate-x: -100%; }}@utility slide-in-from-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-enter-translate-x: calc(--value(ratio)*100%); --tw-enter-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-enter-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-enter-translate-x: calc(--value(ratio)*-100%); --tw-enter-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }}@utility slide-out-to-top{--tw-exit-translate-y: -100%;}@utility slide-out-to-top-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-y: calc(--value(ratio)*-100%); --tw-exit-translate-y: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-out-to-bottom{--tw-exit-translate-y: 100%;}@utility slide-out-to-bottom-*{--tw-exit-translate-y: calc(--value(integer)*var(--spacing)); --tw-exit-translate-y: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-y: calc(--value(ratio)*100%); --tw-exit-translate-y: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-left{--tw-exit-translate-x: -100%;}@utility slide-out-to-left-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1);}@utility slide-out-to-right{--tw-exit-translate-x: 100%;}@utility slide-out-to-right-*{--tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]);}@utility slide-out-to-start{&:dir(ltr){ --tw-exit-translate-x: -100%; }&:dir(rtl){ --tw-exit-translate-x: 100%; }}@utility slide-out-to-start-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }}@utility slide-out-to-end{&:dir(ltr){ --tw-exit-translate-x: 100%; }&:dir(rtl){ --tw-exit-translate-x: -100%; }}@utility slide-out-to-end-*{&:where(:dir(ltr),[dir="ltr"],[dir="ltr"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*100%); --tw-exit-translate-x: calc(--value(ratio)*100%); --tw-exit-translate-x: --value(--translate-*,[percentage],[length]); }&:where(:dir(rtl),[dir="rtl"],[dir="rtl"]*){ --tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1); --tw-exit-translate-x: calc(--value(--percentage-*,--percentage-translate-*)*-100%); --tw-exit-translate-x: calc(--value(ratio)*-100%); --tw-exit-translate-x: calc(--value(--translate-*,[percentage],[length])*-1); }}
@@ -1,7 +1,7 @@
1
1
  import { Button as ButtonPrimitive } from "@base-ui/react/button";
2
2
  import { type VariantProps } from "class-variance-authority";
3
3
  declare const buttonCva: (props?: ({
4
- variant?: "link" | "ghost" | "default" | "secondary" | "destructive" | "outline" | "cta" | "tertiary-soft" | "quiet" | "danger" | "outline-cyan" | "outline-purple" | "primary" | null | undefined;
4
+ variant?: "link" | "ghost" | "default" | "secondary" | "destructive" | "outline" | "cta" | "tertiary-soft" | "quiet" | "danger" | "outline-cyan" | "outline-purple" | "outline-danger" | "primary" | null | undefined;
5
5
  size?: "default" | "xs" | "sm" | "lg" | "xl" | "2xl" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "icon-2xl" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  type ButtonCvaProps = Parameters<typeof buttonCva>[0];
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AA6EjE,QAAA,MAAM,SAAS;;;8EAuHd,CAAA;AAyBD,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAErD,iBAAS,cAAc,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,MAAM,CAStD;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,+BAQ7D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AA+GjE,QAAA,MAAM,SAAS;;;8EAyHd,CAAA;AAyBD,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;AAErD,iBAAS,cAAc,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,MAAM,CAStD;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,KAAK,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,+BAQ7D;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
package/dist/ui/button.js CHANGED
@@ -24,7 +24,17 @@ import { cn } from "../lib/cloudgrid-cn.js";
24
24
  */
25
25
  const STYLE_GUIDE = "rounded-xl bg-cyan font-ui font-bold leading-none text-on-accent hover:bg-cyan-press aria-expanded:bg-cyan-press";
26
26
  /** The variants that wear the Style Guide metrics (sizes below). */
27
- const STYLE_GUIDE_FAMILY = ["default", "cta", "tertiary-soft", "quiet", "danger", "outline-cyan", "outline-purple", "primary"];
27
+ const STYLE_GUIDE_FAMILY = [
28
+ "default",
29
+ "cta",
30
+ "tertiary-soft",
31
+ "quiet",
32
+ "danger",
33
+ "outline-cyan",
34
+ "outline-purple",
35
+ "outline-danger",
36
+ "primary",
37
+ ];
28
38
  /**
29
39
  * The outline twins (ui#515, Asaf 2026-11-18) of the default and of `primary`:
30
40
  * the family's metrics and type, a 1.5px stroke in the tone on the card, and
@@ -71,6 +81,29 @@ const OUTLINE_PURPLE = [
71
81
  "in-data-[cg-surface=panel]:text-(--cg-text-accent) in-data-[cg-surface=panel]:ring-(--cg-text-accent) in-data-[cg-surface=panel]:hover:text-(--cg-text-accent) in-data-[cg-surface=panel]:hover:ring-(--cg-text-accent) in-data-[cg-surface=panel]:hover:bg-(--cg-hover)",
72
82
  "in-data-[cg-surface=ink]:text-(--cg-text-accent) in-data-[cg-surface=ink]:ring-(--cg-text-accent) in-data-[cg-surface=ink]:hover:text-(--cg-text-accent) in-data-[cg-surface=ink]:hover:ring-(--cg-text-accent) in-data-[cg-surface=ink]:hover:bg-(--cg-hover)",
73
83
  ].join(" ");
84
+ /**
85
+ * The red twin of `outline-purple` (ui#644, from the Console's Delete account
86
+ * design, Asaf 2026-11-30): the family's metrics and bold label, a 1.5px inset
87
+ * stroke and the label in --cg-danger-strong on the card (5.6:1 on white), the
88
+ * danger fill on hover (5.1:1). For a destructive action that opens a further
89
+ * step rather than doing the deed, such as Profile's "Delete account", which
90
+ * opens the deletion flow; the solid `danger` stays the final confirm.
91
+ *
92
+ * --cg-danger-strong is declared on the panel and on ink as the surface's
93
+ * text, so there the stroke and label turn white (5.84:1 on the panel) with no
94
+ * class of their own. Hover is the one per-surface class: the panel's
95
+ * --cg-danger-fill (a 16% white) leaves the white label at 4.31:1, so on both
96
+ * dark grounds hover is the surface's own wash (--cg-hover), as `quiet` and the
97
+ * other outlines do (4.84:1 on the panel).
98
+ *
99
+ * It carries `cursor-pointer`, the hand every clickable shows (Asaf's rule);
100
+ * the base button does not set a cursor.
101
+ */
102
+ const OUTLINE_DANGER = [
103
+ "cursor-pointer rounded-xl border-0 bg-card font-ui font-bold leading-none text-danger-strong ring-[1.5px] ring-danger-strong ring-inset hover:bg-danger-fill hover:text-danger-strong hover:ring-danger-strong aria-expanded:bg-danger-fill",
104
+ "in-data-[cg-surface=panel]:hover:bg-(--cg-hover) in-data-[cg-surface=panel]:aria-expanded:bg-(--cg-hover)",
105
+ "in-data-[cg-surface=ink]:hover:bg-(--cg-hover) in-data-[cg-surface=ink]:aria-expanded:bg-(--cg-hover)",
106
+ ].join(" ");
74
107
  const buttonCva = cva("group/button inline-flex shrink-0 items-center justify-center rounded-xl border border-transparent bg-clip-padding text-body-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-line active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
75
108
  variants: {
76
109
  variant: {
@@ -106,6 +139,8 @@ const buttonCva = cva("group/button inline-flex shrink-0 items-center justify-ce
106
139
  and unchanged (the Console's wizard Back wears it). */
107
140
  "outline-cyan": OUTLINE_CYAN,
108
141
  "outline-purple": OUTLINE_PURPLE,
142
+ /* ui#644: the red twin of outline-purple, see OUTLINE_DANGER above. */
143
+ "outline-danger": OUTLINE_DANGER,
109
144
  /* The brand purple filled button: until #376 this was `default`. Since
110
145
  ui#515 (Asaf, 2026-11-19) it is in the Style Guide family, beside
111
146
  `outline-purple` and the default: 40 and 48 tall, the one 16
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/ui/button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,GACf,kHAAkH,CAAA;AAEpH,oEAAoE;AACpE,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,SAAS,CAAU,CAAA;AAEvI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,YAAY,GAAG;IACnB,iLAAiL;IACjL,gIAAgI;IAChI,0HAA0H;CAC3H,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACX,MAAM,cAAc,GAAG;IACrB,wMAAwM;IACxM,0QAA0Q;IAC1Q,gQAAgQ;CACjQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAEX,MAAM,SAAS,GAAG,GAAG,CACnB,kiBAAkiB,EACliB;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP;6EACiE;YACjE,OAAO,EAAE,WAAW;YACpB;;;;;;;;;8EASkE;YAClE,GAAG,EAAE,WAAW;YAChB;;;;;;;;;;;oDAWwC;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AAC;QACzD,CAAC,CAAC,IAAI,CAAA;IACV,OAAO,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAoB,CAAC,CAAA;AAClE,CAAC;AAED,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,GAAG,KAAK,EACoD;IAC5D,OAAO,CACL,KAAC,eAAe,iBACJ,QAAQ,EAClB,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,KACvD,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
@@ -3,7 +3,7 @@ import { Radio as RadioPrimitive } from "@base-ui/react/radio";
3
3
  import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
4
4
  declare function RadioGroup({ className, value, defaultValue, onValueChange, ...props }: RadioGroupPrimitive.Props): React.JSX.Element;
5
5
  declare function Radio({ className, ...props }: RadioPrimitive.Root.Props): React.JSX.Element;
6
- declare function RadioOption({ value, label, description, disabled, variant, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "children"> & {
6
+ declare function RadioOption({ value, label, description, disabled, variant, selectedTint, className, children, ...props }: Omit<React.ComponentProps<"div">, "ref" | "children"> & {
7
7
  /** What the group reports when this row is picked. */
8
8
  value: unknown;
9
9
  /** The row's accessible name. One line. */
@@ -16,6 +16,8 @@ declare function RadioOption({ value, label, description, disabled, variant, cla
16
16
  * the option as a bordered card that turns Primary when selected (#432).
17
17
  */
18
18
  variant?: "row" | "card";
19
+ /** On a card: the selected card on the brand tint, its label semibold (ui#644). */
20
+ selectedTint?: boolean;
19
21
  /**
20
22
  * The indented slot, rendered ONLY while this option is selected. The
21
23
  * visibility editor puts its space checkboxes here.
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/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B,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAiI9E,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,KAAK,qBAsB3B;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,qBAgBhE;AAED,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACR,OAAe,EACf,YAAoB,EACpB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU,CAAC,GAAG;IACzD,sDAAsD;IACtD,KAAK,EAAE,OAAO,CAAA;IACd,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,mFAAmF;IACnF,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;IACxB,mFAAmF;IACnF,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,qBAgFA;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA"}
@@ -105,6 +105,19 @@ import { cn } from "../lib/cloudgrid-cn.js";
105
105
  *
106
106
  * Use `sm:grid-cols-2` where the dialog can be narrower than two cards. The
107
107
  * default, `variant="row"`, renders exactly what it rendered before #432.
108
+ *
109
+ * ## The tinted selected card (ui#644)
110
+ *
111
+ * `selectedTint` on a card puts the selected card on the brand tint
112
+ * (`--cg-primary-tint`, the `bg-brand-tint` utility) and sets its own label in
113
+ * semibold, as the Console's Delete account flow draws its choices (Asaf,
114
+ * 2026-11-30). The border still turns Primary, and the dot is still the first
115
+ * signal. Anything in the detail slot (a member list, a checkbox) keeps its own
116
+ * weight. The tint is declared at :root only and would be a pale slab under
117
+ * white text, so on the panel and on ink the selected card takes the
118
+ * surface's wash (`--cg-hover`) instead. Opt-in: without the prop a card is
119
+ * what it was, so the visibility editor and the settings pop-ups do not move.
120
+ * A row ignores it.
108
121
  */
109
122
  /**
110
123
  * The selected value, for `RadioOption`'s slot and nothing else.
@@ -128,18 +141,20 @@ function RadioGroup({ className, value, defaultValue, onValueChange, ...props })
128
141
  function Radio({ className, ...props }) {
129
142
  return (_jsx(RadioPrimitive.Root, { "data-slot": "radio", className: cn("peer flex size-4.5 shrink-0 items-center justify-center rounded-pill border border-steel p-0 in-data-[cg-surface=panel]:border-input in-data-[cg-surface=ink]:border-input transition-colors outline-none group-has-disabled/field:opacity-50 focus-line disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-checked:border-primary data-checked:text-primary data-disabled:cursor-not-allowed data-disabled:opacity-50", className), ...props, children: _jsx(RadioPrimitive.Indicator, { "data-slot": "radio-indicator", className: "size-2.5 shrink-0 rounded-pill bg-current" }) }));
130
143
  }
131
- function RadioOption({ value, label, description, disabled, variant = "row", className, children, ...props }) {
144
+ function RadioOption({ value, label, description, disabled, variant = "row", selectedTint = false, className, children, ...props }) {
132
145
  const selected = React.useContext(RadioGroupValueContext);
133
146
  const checked = selected === value;
134
147
  const id = React.useId();
135
148
  const labelId = `${id}-label`;
136
149
  const descriptionId = `${id}-description`;
137
150
  const card = variant === "card";
138
- return (_jsxs("div", { "data-slot": "radio-option", "data-checked": checked ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-variant": card ? "card" : undefined, className: cn(card
151
+ const tint = card && selectedTint;
152
+ return (_jsxs("div", { "data-slot": "radio-option", "data-checked": checked ? "" : undefined, "data-disabled": disabled ? "" : undefined, "data-variant": card ? "card" : undefined, "data-tint": tint ? "" : undefined, className: cn(card
139
153
  ? "grid rounded-md border border-hairline bg-card transition-colors data-checked:border-primary"
140
- : "grid gap-1.5", className), ...props, children: [_jsxs("label", { "data-slot": card ? "radio-option-control" : undefined, className: cn("flex cursor-pointer items-start gap-2.5 select-none", card && "p-4", disabled && "cursor-not-allowed opacity-50"), children: [_jsx(Radio, { value: value, disabled: disabled, "aria-labelledby": labelId, "aria-describedby": description ? descriptionId : undefined,
154
+ : "grid gap-1.5", tint &&
155
+ "data-checked:bg-brand-tint in-data-[cg-surface=panel]:data-checked:bg-(--cg-hover) in-data-[cg-surface=ink]:data-checked:bg-(--cg-hover)", className), ...props, children: [_jsxs("label", { "data-slot": card ? "radio-option-control" : undefined, className: cn("flex cursor-pointer items-start gap-2.5 select-none", card && "p-4", disabled && "cursor-not-allowed opacity-50"), children: [_jsx(Radio, { value: value, disabled: disabled, "aria-labelledby": labelId, "aria-describedby": description ? descriptionId : undefined,
141
156
  // Optically centred on the label's first line rather than its box.
142
- className: "mt-0.5" }), _jsxs("span", { className: card ? "grid gap-1" : "grid gap-0.5", children: [_jsx("span", { id: labelId, "data-slot": "radio-option-label", className: card ? "text-body-sm leading-heading text-ink" : "text-body-sm text-ink", children: label }), description ? (_jsx("span", { id: descriptionId, "data-slot": "radio-option-description", className: "text-caption text-faint-strong", children: description })) : null] })] }), children && checked ? (_jsx("div", { "data-slot": "radio-option-detail",
157
+ className: "mt-0.5" }), _jsxs("span", { className: card ? "grid gap-1" : "grid gap-0.5", children: [_jsx("span", { id: labelId, "data-slot": "radio-option-label", className: cn(card ? "text-body-sm leading-heading text-ink" : "text-body-sm text-ink", tint && checked && "font-semibold"), children: label }), description ? (_jsx("span", { id: descriptionId, "data-slot": "radio-option-description", className: "text-caption text-faint-strong", children: description })) : null] })] }), children && checked ? (_jsx("div", { "data-slot": "radio-option-detail",
143
158
  // Indented to the label's edge: the control is 18px and the gap is
144
159
  // 10px, so the text column starts at 28px (44px inside a card's 16px).
145
160
  className: card ? "grid gap-2 ps-11 pe-4 pb-4" : "grid gap-2 ps-7", children: children })) : null] }));
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAE9E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqGG;AAEH;;;;;;GAMG;AACH,MAAM,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAAU,SAAS,CAAC,CAAA;AAEtE,SAAS,UAAU,CAAC,EAClB,SAAS,EACT,KAAK,EACL,YAAY,EACZ,aAAa,EACb,GAAG,KAAK,EACkB;IAC1B,8EAA8E;IAC9E,2EAA2E;IAC3E,oDAAoD;IACpD,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,YAAY,CAAC,CAAA;IAC7E,MAAM,QAAQ,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAA;IAE3D,OAAO,CACL,KAAC,sBAAsB,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YAC9C,KAAC,mBAAmB,iBACR,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EACtC,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,CAAC,I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AI,IAAI,KAAK,EACb,QAAQ,IAAI,+BAA+B,CAC5C,aAED,KAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,qBACD,OAAO,sBACN,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;wBACzD,mEAAmE;wBACnE,SAAS,EAAC,QAAQ,GAClB,EACF,gBAAM,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,aACnD,eACE,EAAE,EAAE,OAAO,eACD,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CACX,IAAI,CAAC,CAAC,CAAC,uCAAuC,CAAC,CAAC,CAAC,uBAAuB,EACxE,IAAI,IAAI,OAAO,IAAI,eAAe,CACnC,YAEA,KAAK,GACD,EACN,WAAW,CAAC,CAAC,CAAC,CACb,eACE,EAAE,EAAE,aAAa,eACP,0BAA0B,EACpC,SAAS,EAAC,gCAAgC,YAEzC,WAAW,GACP,CACR,CAAC,CAAC,CAAC,IAAI,IACH,IACD,EAEP,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,CACrB,2BACY,qBAAqB;gBAC/B,mEAAmE;gBACnE,uEAAuE;gBACvE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,iBAAiB,YAEjE,QAAQ,GACL,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudgrid-io/ui",
3
- "version": "0.73.0",
3
+ "version": "0.75.0",
4
4
  "description": "CloudGrid design system: React components, brand design tokens, Tailwind theme, self-hosted fonts.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",