@rogieking/figui3 4.8.2 → 4.9.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/components.css CHANGED
@@ -3301,10 +3301,10 @@ fig-input-fill {
3301
3301
  }
3302
3302
  }
3303
3303
  fig-input-gradient {
3304
- --height: 1.5rem;
3305
- --chit-height: var(--height);
3304
+ --fig-input-gradient-height: 1.5rem;
3305
+ --fig-input-gradient-padding: var(--spacer-1);
3306
3306
  position: relative;
3307
- height: var(--height);
3307
+ height: var(--fig-input-gradient-height);
3308
3308
  width: 100%;
3309
3309
  min-width: 0;
3310
3310
 
@@ -3332,23 +3332,29 @@ fig-input-gradient {
3332
3332
  }
3333
3333
  & > fig-chit,
3334
3334
  & > fig-fill-picker > fig-chit {
3335
- --padding: 0;
3336
3335
  --width: 100%;
3337
- --height: var(--chit-height);
3338
- flex: 1 1 auto;
3339
- width: 100% !important;
3340
- min-width: 0 !important;
3341
- min-height: var(--chit-height) !important;
3336
+ width: var(--width);
3337
+ --border-radius: var(--radius-large);
3342
3338
  }
3343
3339
  &[size="large"] {
3344
- --height: 3rem;
3340
+ --fig-input-gradient-height: 2rem;
3341
+ height: var(--fig-input-gradient-height) !important;
3342
+ & > fig-chit,
3343
+ & > fig-fill-picker > fig-chit {
3344
+ --padding:0px;
3345
+ --height: var(--fig-input-gradient-height);
3346
+ --border-radius: var(--radius-medium);
3347
+ }
3348
+ .fig-input-gradient-track {
3349
+ inset: 0;
3350
+ }
3345
3351
  }
3346
3352
 
3347
3353
  .fig-input-gradient-track {
3348
3354
  position: absolute;
3349
3355
  display: flex;
3350
3356
  align-items: center;
3351
- inset: 0;
3357
+ inset: 0 var(--spacer-2-5);
3352
3358
  pointer-events: auto;
3353
3359
  z-index: 1;
3354
3360
 
@@ -3364,12 +3370,21 @@ fig-input-gradient {
3364
3370
  }
3365
3371
 
3366
3372
  fig-input-palette {
3367
- display: inline-flex !important;
3368
- flex-direction: column;
3373
+ --fig-input-palette-padding: var(--spacer-1);
3374
+ --fig-input-palette-height: 1.5rem;
3375
+ display: inline-grid !important;
3376
+ grid-template-columns: 1fr 24px;
3377
+ grid-template-areas:
3378
+ "inline button"
3379
+ "expanded expanded";
3369
3380
  gap: var(--spacer-2);
3370
3381
  min-width: 0;
3371
3382
  border-radius: var(--radius-medium);
3372
3383
 
3384
+ > .palette-colors-inline {
3385
+ grid-area: inline;
3386
+ }
3387
+
3373
3388
  .palette-colors {
3374
3389
  display: flex;
3375
3390
  flex-wrap: nowrap;
@@ -3385,26 +3400,29 @@ fig-input-palette {
3385
3400
  grid-area: button;
3386
3401
  }
3387
3402
  .palette-colors-inline {
3388
- display: inline-grid !important;
3389
- grid-template-columns: 1fr 24px;
3390
- grid-template-areas: "inputs button";
3403
+ display: flex !important;
3391
3404
  border-radius: var(--radius-medium);
3392
3405
  width: 100%;
3393
3406
  gap: var(--spacer-2);
3394
3407
  place-items: center;
3408
+ height: var(--fig-input-palette-height);
3409
+ border-radius: var(--radius-medium);
3410
+ background-color: var(--figma-color-bg-secondary);
3411
+ padding: 0 var(--fig-input-palette-padding);
3395
3412
 
3396
3413
  .palette-colors {
3397
3414
  display: flex;
3398
- --palette-colors-height: 1.5rem;
3415
+ border-radius: var(--radius-small);
3416
+ --palette-colors-height: calc(var(--fig-input-palette-height) - var(--fig-input-palette-padding)*2);
3399
3417
  height: var(--palette-colors-height);
3400
3418
  fig-input-color {
3401
3419
  width: 100%;
3402
3420
  }
3403
3421
 
3404
3422
  fig-chit {
3405
- --padding: 0px;
3406
3423
  --border-radius: 0px;
3407
3424
  --width: 100%;
3425
+ --padding: 0px;
3408
3426
  --height: var(--palette-colors-height);
3409
3427
  --size: var(--palette-colors-height);
3410
3428
  flex: 1;
@@ -3425,14 +3443,12 @@ fig-input-palette {
3425
3443
  display: grid;
3426
3444
  }
3427
3445
  }
3428
- &[add="false"] {
3429
- .palette-colors-expanded,
3430
- .palette-colors-inline {
3431
- grid-template-areas: "inputs inputs";
3432
- }
3446
+ &[add="false"] > .palette-colors-inline {
3447
+ grid-column: 1 / -1;
3433
3448
  }
3434
3449
  .palette-colors-expanded {
3435
3450
  display: none;
3451
+ grid-area: expanded;
3436
3452
  grid-template-columns: [input] 1fr [button] 1.5rem;
3437
3453
  overflow: visible;
3438
3454
  border-radius: 0;
@@ -4352,12 +4368,9 @@ fig-preview {
4352
4368
  }
4353
4369
 
4354
4370
  .fig-fill-picker-gradient-preview {
4355
- display: block;
4356
- .fig-fill-picker-gradient-bar-input {
4357
- --width: 100%;
4358
- --height: 100%;
4359
- aspect-ratio: 1/1;
4360
- }
4371
+ aspect-ratio: auto;
4372
+ padding: var(--spacer-2-5) 0 0 0;
4373
+
4361
4374
  }
4362
4375
 
4363
4376
  .fig-fill-picker-gradient-stops {