@harnessio/ui 0.5.39 → 0.5.40

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.
@@ -100,7 +100,9 @@ const W = {
100
100
  "&-container": {
101
101
  marginTop: "-4px",
102
102
  paddingTop: "4px",
103
- overflow: "hidden",
103
+ // 'clip' instead of 'hidden' — clips during height animation but doesn't
104
+ // create a scroll container, allowing position:sticky inside accordions
105
+ overflow: "clip",
104
106
  "&-card": {
105
107
  "&-sm": {
106
108
  paddingInline: "var(--cn-card-sm-px)"
@@ -113,15 +115,22 @@ const W = {
113
115
  }
114
116
  },
115
117
  '&:where([data-state="open"])': {
116
- "@apply animate-accordion-down": ""
118
+ // Delays overflow:visible until after height animation completes,
119
+ // so content is clipped during expand but can bleed (e.g. sticky headers) when open
120
+ animation: "accordion-down 0.2s ease-out, accordion-overflow 0s 0.2s forwards"
117
121
  },
118
122
  '&:where([data-state="closed"])': {
119
123
  "@apply animate-accordion-up": ""
120
124
  }
121
125
  }
122
126
  }
127
+ },
128
+ "@keyframes accordion-overflow": {
129
+ to: {
130
+ overflow: "visible"
131
+ }
123
132
  }
124
- }, B = ["info", "danger", "warning", "success"], H = {
133
+ }, B = ["info", "danger", "warning", "success"], L = {
125
134
  info: {
126
135
  backgroundColor: "gray-secondary",
127
136
  color: "text-cn-2",
@@ -143,10 +152,10 @@ const W = {
143
152
  fadeBgColor: "success"
144
153
  }
145
154
  };
146
- function L() {
155
+ function H() {
147
156
  const r = {};
148
157
  return B.forEach((e) => {
149
- const n = {}, { backgroundColor: o, color: a, fadeBgColor: t } = H[e];
158
+ const n = {}, { backgroundColor: o, color: a, fadeBgColor: t } = L[e];
150
159
  n.backgroundColor = `var(--cn-set-${o}-bg)`, n["> .cn-alert-icon"] = {
151
160
  color: `var(--cn-${a})`
152
161
  }, n[" .cn-alert-fade-overlay"] = {
@@ -243,7 +252,7 @@ const A = {
243
252
  "&-link-wrapper": {
244
253
  paddingTop: "var(--cn-spacing-1)"
245
254
  },
246
- ...L()
255
+ ...H()
247
256
  }
248
257
  }, D = ["md", "sm", "lg", "xs"];
249
258
  function E() {
@@ -2611,7 +2620,7 @@ const Te = {
2611
2620
  "@apply opacity-cn-disabled": ""
2612
2621
  }
2613
2622
  }
2614
- }, He = {
2623
+ }, Le = {
2615
2624
  ".cn-reasoning": {
2616
2625
  marginBottom: "var(--cn-spacing-4)"
2617
2626
  },
@@ -2664,7 +2673,7 @@ const Te = {
2664
2673
  opacity: "0"
2665
2674
  }
2666
2675
  }
2667
- }, Le = {
2676
+ }, He = {
2668
2677
  ".cn-repo": {
2669
2678
  "&-header": {
2670
2679
  paddingTop: "var(--cn-page-container-spacing-py)",
@@ -3776,6 +3785,23 @@ const Je = {
3776
3785
  "&-content": {
3777
3786
  "@apply relative": ""
3778
3787
  }
3788
+ },
3789
+ // Contained mode: for sticky lists nested inside non-drawer containers (e.g. form inputs).
3790
+ // Set --cn-sticky-container-padding on an ancestor to control how far the header bleeds.
3791
+ ".cn-sticky-list-section-contained": {
3792
+ "--cn-sticky-container": "var(--cn-sticky-container-padding, 0px)"
3793
+ },
3794
+ ".cn-sticky-list-section-contained .cn-sticky-list-section-header": {
3795
+ top: "0",
3796
+ backgroundColor: "transparent",
3797
+ marginLeft: "calc(-1 * var(--cn-sticky-container))",
3798
+ marginRight: "calc(-1 * var(--cn-sticky-container))",
3799
+ paddingLeft: "var(--cn-sticky-container)",
3800
+ paddingRight: "var(--cn-sticky-container)",
3801
+ paddingTop: "0"
3802
+ },
3803
+ ".cn-sticky-list-section-contained .cn-sticky-list-section-header-stuck": {
3804
+ backgroundColor: "var(--cn-sticky-header-bg, var(--cn-bg-1))"
3779
3805
  }
3780
3806
  }, $ = ".cn-studio-card-header, .cn-studio-card-message, .cn-studio-card-footer, .cn-studio-card-content > .cn-studio-card-expand-button, .cn-studio-card-content > .cn-studio-card-button, .cn-studio-card-tag, .cn-studio-card-status", f = {
3781
3807
  [$]: {
@@ -5106,7 +5132,7 @@ const pr = {
5106
5132
  Q,
5107
5133
  or,
5108
5134
  ae,
5109
- Le,
5135
+ He,
5110
5136
  Ae,
5111
5137
  De,
5112
5138
  Ce,
@@ -5128,7 +5154,7 @@ const pr = {
5128
5154
  yr,
5129
5155
  xe,
5130
5156
  me,
5131
- He,
5157
+ Le,
5132
5158
  _e,
5133
5159
  Qe,
5134
5160
  // Form styles