@harnessio/ui 0.5.17 → 0.5.18
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/components.d.ts +7 -3
- package/dist/components.js +1 -1
- package/dist/{index-DOJqgX28.js → index-BmeBtFrX.js} +27 -13
- package/dist/{index-DOJqgX28.js.map → index-BmeBtFrX.js.map} +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.config.js +123 -31
- package/dist/tailwind.config.js.map +1 -1
- package/package.json +3 -3
package/dist/tailwind.config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as $, t as I } from "./tailwind-design-system-B-Jd9lCG.js";
|
|
2
2
|
import { F as R, C as g, f as T } from "./form-shared-styles-W3czzLsz.js";
|
|
3
|
-
const
|
|
3
|
+
const W = {
|
|
4
4
|
".cn-accordion": {
|
|
5
5
|
display: "flex",
|
|
6
6
|
flexDirection: "column",
|
|
@@ -121,7 +121,7 @@ const B = {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, B = ["info", "danger", "warning", "success"], L = {
|
|
125
125
|
info: {
|
|
126
126
|
backgroundColor: "gray-secondary",
|
|
127
127
|
color: "text-cn-2",
|
|
@@ -143,9 +143,9 @@ const B = {
|
|
|
143
143
|
fadeBgColor: "success"
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
|
-
function
|
|
146
|
+
function H() {
|
|
147
147
|
const r = {};
|
|
148
|
-
return
|
|
148
|
+
return B.forEach((e) => {
|
|
149
149
|
const n = {}, { backgroundColor: o, color: a, fadeBgColor: t } = L[e];
|
|
150
150
|
n.backgroundColor = `var(--cn-set-${o}-bg)`, n["> .cn-alert-icon"] = {
|
|
151
151
|
color: `var(--cn-${a})`
|
|
@@ -154,7 +154,7 @@ function A() {
|
|
|
154
154
|
}, r[`&:where(.cn-alert-${e})`] = n;
|
|
155
155
|
}), r;
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const A = {
|
|
158
158
|
".cn-alert": {
|
|
159
159
|
gap: "var(--cn-alert-gap)",
|
|
160
160
|
paddingTop: "var(--cn-alert-py)",
|
|
@@ -243,7 +243,7 @@ const H = {
|
|
|
243
243
|
"&-link-wrapper": {
|
|
244
244
|
paddingTop: "var(--cn-spacing-1)"
|
|
245
245
|
},
|
|
246
|
-
...
|
|
246
|
+
...H()
|
|
247
247
|
}
|
|
248
248
|
}, j = ["md", "sm", "lg", "xs"];
|
|
249
249
|
function E() {
|
|
@@ -476,7 +476,7 @@ const F = {
|
|
|
476
476
|
color: "var(--cn-text-1)"
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
}, G = ["primary", "secondary", "outline", "ghost"],
|
|
479
|
+
}, G = ["primary", "secondary", "outline", "ghost"], Y = ["success", "danger", "default"], N = ["3xs", "2xs", "xs", "sm", "md"], v = "0.99", l = "150ms", s = "ease-in-out", M = {
|
|
480
480
|
success: "success",
|
|
481
481
|
danger: "danger",
|
|
482
482
|
default: "gray"
|
|
@@ -484,8 +484,8 @@ const F = {
|
|
|
484
484
|
function U() {
|
|
485
485
|
const r = {}, e = {};
|
|
486
486
|
return G.forEach((n) => {
|
|
487
|
-
|
|
488
|
-
const a = {}, t =
|
|
487
|
+
Y.forEach((o) => {
|
|
488
|
+
const a = {}, t = M[o];
|
|
489
489
|
if (n === "ghost") {
|
|
490
490
|
a.color = `var(--cn-set-${t}-outline-text)`;
|
|
491
491
|
const c = o === "default" ? "var(--cn-state-hover)" : `var(--cn-set-${t}-outline-bg-hover)`, z = o === "default" ? "var(--cn-state-hover)" : `var(--cn-set-${t}-outline-bg-selected)`;
|
|
@@ -523,7 +523,7 @@ function U() {
|
|
|
523
523
|
}
|
|
524
524
|
function K() {
|
|
525
525
|
const r = {};
|
|
526
|
-
return
|
|
526
|
+
return N.forEach((e) => {
|
|
527
527
|
r[`&:where(.cn-button-${e})`] = {
|
|
528
528
|
height: `var(--cn-btn-size-${e})`,
|
|
529
529
|
paddingBlock: `var(--cn-btn-py-${e})`,
|
|
@@ -2249,7 +2249,7 @@ const Re = {
|
|
|
2249
2249
|
boxShadow: "0 0 3px 0 color-mix(in srgb, var(--cn-gradient-ai-stop-3) 30%, transparent), 0 0 12px 2px color-mix(in srgb, var(--cn-gradient-ai-stop-3) 15%, transparent), 0 0 28px 6px color-mix(in srgb, var(--cn-gradient-ai-stop-3) 8%, transparent)"
|
|
2250
2250
|
}
|
|
2251
2251
|
}
|
|
2252
|
-
},
|
|
2252
|
+
}, We = {
|
|
2253
2253
|
":where(.cn-radio-control)": {
|
|
2254
2254
|
[`@apply ${g}`]: ""
|
|
2255
2255
|
},
|
|
@@ -2334,7 +2334,7 @@ const Re = {
|
|
|
2334
2334
|
"@apply opacity-cn-disabled": ""
|
|
2335
2335
|
}
|
|
2336
2336
|
}
|
|
2337
|
-
},
|
|
2337
|
+
}, Be = {
|
|
2338
2338
|
".cn-reasoning": {
|
|
2339
2339
|
marginBottom: "var(--cn-spacing-4)"
|
|
2340
2340
|
},
|
|
@@ -2402,7 +2402,7 @@ const Re = {
|
|
|
2402
2402
|
}
|
|
2403
2403
|
}
|
|
2404
2404
|
}
|
|
2405
|
-
},
|
|
2405
|
+
}, He = {
|
|
2406
2406
|
".cn-sandbox-layout": {
|
|
2407
2407
|
"&-content": {
|
|
2408
2408
|
paddingTop: "var(--cn-page-container-spacing-py)",
|
|
@@ -2418,7 +2418,7 @@ const Re = {
|
|
|
2418
2418
|
paddingRight: "var(--cn-page-container-spacing-px)"
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
},
|
|
2421
|
+
}, Ae = {
|
|
2422
2422
|
".cn-scroll-area": {
|
|
2423
2423
|
"@apply overflow-auto grid min-w-full": "",
|
|
2424
2424
|
"&-content": {
|
|
@@ -3029,7 +3029,7 @@ const Pe = {
|
|
|
3029
3029
|
backgroundColor: "var(--cn-comp-sidebar-separator)"
|
|
3030
3030
|
}
|
|
3031
3031
|
}
|
|
3032
|
-
}, Ge = ["sm", "md", "lg", "xs"],
|
|
3032
|
+
}, Ge = ["sm", "md", "lg", "xs"], Ye = ["2xs", "xs", "sm", "md", "lg", "xl"], Ne = ["xs", "sm", "md", "lg"], Me = ["sm"];
|
|
3033
3033
|
function Ue() {
|
|
3034
3034
|
const r = {};
|
|
3035
3035
|
return Ge.forEach((e) => {
|
|
@@ -3040,7 +3040,7 @@ function Ue() {
|
|
|
3040
3040
|
}), r;
|
|
3041
3041
|
}
|
|
3042
3042
|
function x(r) {
|
|
3043
|
-
const e = r === "icon" ?
|
|
3043
|
+
const e = r === "icon" ? Ye : Ne, n = {};
|
|
3044
3044
|
return e.forEach((o) => {
|
|
3045
3045
|
const a = {};
|
|
3046
3046
|
a.width = `var(--cn-${r}-size-${o})`, a["min-width"] = `var(--cn-${r}-size-${o})`, a.height = `var(--cn-${r}-size-${o})`, a["min-height"] = `var(--cn-${r}-size-${o})`, n[`&:where(.cn-skeleton-${r}-${o})`] = a;
|
|
@@ -3048,7 +3048,7 @@ function x(r) {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
function Ke() {
|
|
3050
3050
|
const r = {};
|
|
3051
|
-
return
|
|
3051
|
+
return Me.forEach((e) => {
|
|
3052
3052
|
r[`&.cn-skeleton-form-item-${e}`] = {
|
|
3053
3053
|
padding: `var(--cn-input-${e}-py) var(--cn-input-${e}-pr) var(--cn-input-${e}-py) var(--cn-input-${e}-pl)`,
|
|
3054
3054
|
height: `var(--cn-input-size-${e})`
|
|
@@ -3492,6 +3492,12 @@ const qe = {
|
|
|
3492
3492
|
minWidth: "220px",
|
|
3493
3493
|
maxWidth: "220px",
|
|
3494
3494
|
height: "var(--cn-size-40)",
|
|
3495
|
+
"&.cn-studio-card-xs": {
|
|
3496
|
+
// Extra small variant - reduces dimensions for compact cards
|
|
3497
|
+
width: "auto",
|
|
3498
|
+
minWidth: "var(--cn-size-41)",
|
|
3499
|
+
height: "auto"
|
|
3500
|
+
},
|
|
3495
3501
|
"&.cn-studio-card-sm": {
|
|
3496
3502
|
borderWidth: "2px !important"
|
|
3497
3503
|
},
|
|
@@ -3525,14 +3531,16 @@ const qe = {
|
|
|
3525
3531
|
// Group card variant
|
|
3526
3532
|
"&:where(.cn-studio-card-group)": {
|
|
3527
3533
|
width: "auto",
|
|
3528
|
-
minWidth:
|
|
3534
|
+
// minWidth: 'var(--cn-size-90)',
|
|
3529
3535
|
maxWidth: "none",
|
|
3530
3536
|
height: "auto",
|
|
3531
3537
|
"&.cn-studio-card-stage": {
|
|
3532
|
-
minWidth:
|
|
3538
|
+
// minWidth: 'var(--cn-size-90)'
|
|
3533
3539
|
},
|
|
3540
|
+
// When expanded - remove max-width to fit children
|
|
3534
3541
|
'&:has(> .cn-studio-card-content > [data-expanded="true"])': {
|
|
3535
|
-
"@apply bg-cn-3/50": ""
|
|
3542
|
+
"@apply bg-cn-3/50": "",
|
|
3543
|
+
maxWidth: "none"
|
|
3536
3544
|
},
|
|
3537
3545
|
"> .cn-studio-card-content": {
|
|
3538
3546
|
minHeight: "108px"
|
|
@@ -3540,10 +3548,31 @@ const qe = {
|
|
|
3540
3548
|
"> .cn-studio-card-content:not(:has(> .cn-studio-card-message))": {
|
|
3541
3549
|
"@apply justify-center items-start": ""
|
|
3542
3550
|
},
|
|
3551
|
+
// When collapsed - fixed width
|
|
3543
3552
|
'&:has(> .cn-studio-card-content > [data-expanded="false"])': {
|
|
3544
|
-
width:
|
|
3545
|
-
minWidth:
|
|
3546
|
-
maxWidth:
|
|
3553
|
+
// width: 'var(--cn-size-90)',
|
|
3554
|
+
// minWidth: 'var(--cn-size-90)',
|
|
3555
|
+
// maxWidth: 'var(--cn-size-90)'
|
|
3556
|
+
}
|
|
3557
|
+
},
|
|
3558
|
+
// Group card variant with xs size - compact layout
|
|
3559
|
+
"&:where(.cn-studio-card-group.cn-studio-card-xs)": {
|
|
3560
|
+
minWidth: "var(--cn-size-41)",
|
|
3561
|
+
"&.cn-studio-card-stage": {
|
|
3562
|
+
minWidth: "var(--cn-size-41)"
|
|
3563
|
+
},
|
|
3564
|
+
"> .cn-studio-card-content": {
|
|
3565
|
+
minHeight: "63px"
|
|
3566
|
+
},
|
|
3567
|
+
// When expanded - remove max-width to fit children
|
|
3568
|
+
'&:has(> .cn-studio-card-content > [data-expanded="true"])': {
|
|
3569
|
+
maxWidth: "none"
|
|
3570
|
+
},
|
|
3571
|
+
// When collapsed - fixed width
|
|
3572
|
+
'&:has(> .cn-studio-card-content > [data-expanded="false"])': {
|
|
3573
|
+
width: "var(--cn-size-41)",
|
|
3574
|
+
minWidth: "var(--cn-size-41)",
|
|
3575
|
+
maxWidth: "var(--cn-size-41)"
|
|
3547
3576
|
}
|
|
3548
3577
|
},
|
|
3549
3578
|
// Shimmer effect for executing status
|
|
@@ -3578,8 +3607,13 @@ const qe = {
|
|
|
3578
3607
|
"@apply flex-1": ""
|
|
3579
3608
|
}
|
|
3580
3609
|
},
|
|
3610
|
+
// Compact header padding for xs cards
|
|
3611
|
+
".cn-studio-card-xs .cn-studio-card-header": {
|
|
3612
|
+
"@apply p-cn-2xs pl-cn-xs": ""
|
|
3613
|
+
},
|
|
3581
3614
|
".cn-studio-card-code-preview": {
|
|
3582
3615
|
"@apply relative h-full overflow-hidden": "",
|
|
3616
|
+
minHeight: "var(--cn-size-13)",
|
|
3583
3617
|
"&::before": {
|
|
3584
3618
|
"@apply absolute inset-y-0 right-0 w-8": "",
|
|
3585
3619
|
content: '""',
|
|
@@ -3591,11 +3625,18 @@ const qe = {
|
|
|
3591
3625
|
content: '""',
|
|
3592
3626
|
zIndex: "2",
|
|
3593
3627
|
background: "linear-gradient(to bottom, color-mix(in lch, var(--cn-comp-pipeline-card-footer) 0%, transparent), var(--cn-comp-pipeline-card-footer))"
|
|
3628
|
+
},
|
|
3629
|
+
// Allow pre tags to wrap and prevent width expansion
|
|
3630
|
+
"& pre": {
|
|
3631
|
+
position: "absolute",
|
|
3632
|
+
whiteSpace: "pre-wrap",
|
|
3633
|
+
wordBreak: "break-word",
|
|
3634
|
+
overflowWrap: "break-word"
|
|
3594
3635
|
}
|
|
3595
3636
|
},
|
|
3596
3637
|
// Content Component
|
|
3597
3638
|
".cn-studio-card-content": {
|
|
3598
|
-
"@apply flex flex-col flex-grow gap-cn-sm px-cn-md pb-cn-
|
|
3639
|
+
"@apply flex flex-col flex-grow gap-cn-sm px-cn-md pb-cn-md pt-cn-sm": "",
|
|
3599
3640
|
paddingTop: "0 !important",
|
|
3600
3641
|
// When a group card is hovered anywhere inside this content
|
|
3601
3642
|
"&:has(.cn-studio-card-group:hover)": {
|
|
@@ -3672,6 +3713,28 @@ const qe = {
|
|
|
3672
3713
|
"& span": {
|
|
3673
3714
|
"@apply line-clamp-4": ""
|
|
3674
3715
|
},
|
|
3716
|
+
// Explicit compact size via prop
|
|
3717
|
+
'&[data-size="compact"]': {
|
|
3718
|
+
minHeight: "var(--cn-size-13)",
|
|
3719
|
+
"& span": {
|
|
3720
|
+
"@apply line-clamp-2": ""
|
|
3721
|
+
}
|
|
3722
|
+
},
|
|
3723
|
+
// Auto-detect parent Root size - xs cards get compact footer
|
|
3724
|
+
".cn-studio-card-xs > &": {
|
|
3725
|
+
minHeight: "var(--cn-size-16)",
|
|
3726
|
+
"@apply px-cn-xs py-cn-xs": "",
|
|
3727
|
+
"& span": {
|
|
3728
|
+
"@apply line-clamp-2": ""
|
|
3729
|
+
}
|
|
3730
|
+
},
|
|
3731
|
+
// Auto-detect parent Root size - sm cards get slightly reduced footer
|
|
3732
|
+
".cn-studio-card-sm > &": {
|
|
3733
|
+
minHeight: "var(--cn-size-20)",
|
|
3734
|
+
"& span": {
|
|
3735
|
+
"@apply line-clamp-3": ""
|
|
3736
|
+
}
|
|
3737
|
+
},
|
|
3675
3738
|
// Group card variant - adjust padding and line-clamp
|
|
3676
3739
|
".cn-studio-card-group > &": {
|
|
3677
3740
|
minHeight: "var(--cn-size-13)",
|
|
@@ -3708,7 +3771,7 @@ const qe = {
|
|
|
3708
3771
|
width: "226px",
|
|
3709
3772
|
height: "var(--cn-size-22)",
|
|
3710
3773
|
transition: "transform 0.1s linear",
|
|
3711
|
-
// Stack layers
|
|
3774
|
+
// Stack layers - default direction is "right"
|
|
3712
3775
|
"&-stack": {
|
|
3713
3776
|
pointerEvents: "none",
|
|
3714
3777
|
transitionProperty: "transform",
|
|
@@ -3731,7 +3794,7 @@ const qe = {
|
|
|
3731
3794
|
transform: "translateX(6px)"
|
|
3732
3795
|
}
|
|
3733
3796
|
},
|
|
3734
|
-
// Hover state - expand stacks and translate button
|
|
3797
|
+
// Hover state - expand stacks and translate button
|
|
3735
3798
|
"&:hover": {
|
|
3736
3799
|
transform: "scale(1.02) !important",
|
|
3737
3800
|
".cn-studio-card-expand-button-stack-1": {
|
|
@@ -3741,6 +3804,35 @@ const qe = {
|
|
|
3741
3804
|
transform: "translateX(8px)"
|
|
3742
3805
|
}
|
|
3743
3806
|
},
|
|
3807
|
+
// Bottom stack direction variant
|
|
3808
|
+
'&[data-stack-direction="bottom"]': {
|
|
3809
|
+
".cn-studio-card-expand-button-stack-1": {
|
|
3810
|
+
insetBlock: "0px",
|
|
3811
|
+
insetInline: "3px",
|
|
3812
|
+
transform: "translateY(3px)"
|
|
3813
|
+
},
|
|
3814
|
+
".cn-studio-card-expand-button-stack-2": {
|
|
3815
|
+
insetBlock: "0px",
|
|
3816
|
+
insetInline: "6px",
|
|
3817
|
+
transform: "translateY(6px)"
|
|
3818
|
+
},
|
|
3819
|
+
"&:hover": {
|
|
3820
|
+
".cn-studio-card-expand-button-stack-1": {
|
|
3821
|
+
transform: "translateY(4px)"
|
|
3822
|
+
},
|
|
3823
|
+
".cn-studio-card-expand-button-stack-2": {
|
|
3824
|
+
transform: "translateY(8px)"
|
|
3825
|
+
}
|
|
3826
|
+
}
|
|
3827
|
+
},
|
|
3828
|
+
// Minimal variant
|
|
3829
|
+
'&[data-variant="minimal"]': {
|
|
3830
|
+
width: "auto",
|
|
3831
|
+
height: "auto",
|
|
3832
|
+
".cn-studio-card-expand-button-top": {
|
|
3833
|
+
"@apply p-cn-2xs px-cn-sm": ""
|
|
3834
|
+
}
|
|
3835
|
+
},
|
|
3744
3836
|
// Expanded state - hide stacks
|
|
3745
3837
|
'&:where([data-expanded="true"])': {
|
|
3746
3838
|
".cn-studio-card-expand-button-stack": {
|
|
@@ -4590,8 +4682,8 @@ const lr = {
|
|
|
4590
4682
|
}
|
|
4591
4683
|
}
|
|
4592
4684
|
}, xr = [
|
|
4593
|
-
|
|
4594
|
-
|
|
4685
|
+
W,
|
|
4686
|
+
A,
|
|
4595
4687
|
F,
|
|
4596
4688
|
q,
|
|
4597
4689
|
ie,
|
|
@@ -4609,8 +4701,8 @@ const lr = {
|
|
|
4609
4701
|
nr,
|
|
4610
4702
|
ae,
|
|
4611
4703
|
Le,
|
|
4612
|
-
Ae,
|
|
4613
4704
|
He,
|
|
4705
|
+
Ae,
|
|
4614
4706
|
ke,
|
|
4615
4707
|
ur,
|
|
4616
4708
|
pr,
|
|
@@ -4629,14 +4721,14 @@ const lr = {
|
|
|
4629
4721
|
mr,
|
|
4630
4722
|
me,
|
|
4631
4723
|
ue,
|
|
4632
|
-
|
|
4724
|
+
Be,
|
|
4633
4725
|
Oe,
|
|
4634
4726
|
Je,
|
|
4635
4727
|
// Form styles
|
|
4636
4728
|
Pe,
|
|
4637
4729
|
T,
|
|
4638
4730
|
ne,
|
|
4639
|
-
|
|
4731
|
+
We,
|
|
4640
4732
|
lr,
|
|
4641
4733
|
ge,
|
|
4642
4734
|
Z,
|