@donotdev/components 0.0.19 → 0.0.20

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.
@@ -3410,80 +3410,120 @@ em {
3410
3410
 
3411
3411
  /* packages/components/src/atomic/Combobox/Combobox.css */
3412
3412
 
3413
- .dndev-combobox-trigger {
3414
- display: flex;
3415
- justify-content: space-between;
3416
- align-items: center;
3417
- width: 100%;
3418
- text-align: start;
3419
- }
3413
+ /* ──────────────────────────────────────────────────
3414
+ Trailing icon group — flex row inside the input area
3415
+ ────────────────────────────────────────────────── */
3420
3416
 
3421
- .dndev-combobox-trigger button {
3417
+ .dndev-combobox-trailing {
3418
+ position: absolute;
3419
+ inset-inline-end: var(--gap-sm);
3420
+ top: 0;
3421
+ height: 100%;
3422
3422
  display: flex;
3423
- justify-content: space-between;
3424
3423
  align-items: center;
3425
- width: 100%;
3424
+ gap: var(--gap-tight, 4px);
3425
+ z-index: 1;
3426
+ pointer-events: none; /* pass clicks through to input by default */
3426
3427
  }
3427
3428
 
3428
- .dndev-combobox-placeholder {
3429
- opacity: var(--opacity-muted);
3430
- }
3429
+ /* Input padding: reserve space for trailing content.
3430
+ --combobox-pad-end is set as an inline CSS variable on .dndev-combobox-wrapper. */
3431
3431
 
3432
- .dndev-combobox-trigger-icons {
3433
- display: flex;
3434
- align-items: center;
3435
- gap: var(--gap-tight);
3436
- margin-inline-start: auto;
3432
+ .dndev-combobox-wrapper .dndev-input {
3433
+ padding-inline-end: var(--combobox-pad-end);
3437
3434
  }
3438
3435
 
3439
- .dndev-combobox-clear {
3436
+ /* Action buttons (create "+", clear "X") */
3437
+
3438
+ .dndev-combobox-action-btn {
3439
+ all: unset;
3440
3440
  display: flex;
3441
3441
  align-items: center;
3442
3442
  justify-content: center;
3443
+ width: var(--icon-md);
3444
+ height: var(--icon-md);
3445
+ border-radius: var(--radius-interactive, var(--radius-sm, 4px));
3443
3446
  cursor: pointer;
3444
- opacity: var(--opacity-muted);
3445
- transition: opacity var(--dur-fast) var(--ease-in-out);
3446
- -webkit-user-select: none;
3447
- -moz-user-select: none;
3448
- user-select: none;
3447
+ pointer-events: auto; /* re-enable clicks on buttons */
3448
+ color: var(--muted-foreground);
3449
+ opacity: var(--opacity-muted, 0.5);
3450
+ transition:
3451
+ opacity var(--dur-fast) var(--ease-in-out),
3452
+ background-color var(--dur-fast) var(--ease-in-out);
3449
3453
  }
3450
3454
 
3451
- .dndev-combobox-clear:hover,
3452
- .dndev-combobox-clear:focus {
3455
+ .dndev-combobox-action-btn:hover {
3456
+ opacity: 1;
3457
+ background-color: var(--accent, rgba(0, 0, 0, 0.06));
3458
+ }
3459
+
3460
+ .dndev-combobox-action-btn:focus-visible {
3453
3461
  opacity: 1;
3454
3462
  outline: none;
3463
+ box-shadow:
3464
+ 0 0 0 2px var(--ring),
3465
+ 0 0 0 4px rgb(from var(--ring) r g b / 0.2);
3455
3466
  }
3456
3467
 
3457
- .dndev-combobox-clear svg {
3458
- width: var(--icon-sm);
3459
- height: var(--icon-sm);
3468
+ .dndev-combobox-action-btn:active {
3469
+ opacity: 0.8;
3470
+ }
3471
+
3472
+ .dndev-combobox-action-btn svg {
3473
+ width: var(--size-icon-sm, 16px);
3474
+ height: var(--size-icon-sm, 16px);
3460
3475
  }
3461
3476
 
3477
+ /* Create button accent color */
3478
+
3479
+ .dndev-combobox-action-btn--create {
3480
+ color: var(--primary);
3481
+ }
3482
+
3483
+ /* Clear button */
3484
+
3485
+ .dndev-combobox-action-btn--clear {
3486
+ color: var(--muted-foreground);
3487
+ }
3488
+
3489
+ /* Chevron indicator (non-interactive, just visual) */
3490
+
3462
3491
  .dndev-combobox-chevron {
3463
3492
  width: var(--icon-md);
3464
3493
  height: var(--icon-md);
3494
+ display: flex;
3495
+ align-items: center;
3496
+ justify-content: center;
3497
+ color: var(--muted-foreground);
3465
3498
  opacity: var(--opacity-muted);
3499
+ pointer-events: none;
3500
+ }
3501
+
3502
+ .dndev-combobox-chevron svg {
3503
+ width: var(--icon-md);
3504
+ height: var(--icon-md);
3466
3505
  transition: transform var(--dur-fast) var(--ease-in-out);
3467
3506
  }
3468
3507
 
3469
- [data-state='open'] .dndev-combobox-chevron {
3508
+ .dndev-combobox-open .dndev-combobox-chevron svg {
3470
3509
  transform: rotate(180deg);
3471
3510
  }
3472
3511
 
3473
- .dndev-combobox-loading-container {
3512
+ /* Spinner replaces chevron */
3513
+
3514
+ .dndev-combobox-spinner {
3474
3515
  display: flex;
3475
3516
  align-items: center;
3476
- gap: var(--gap-sm);
3477
- }
3478
-
3479
- .dndev-combobox-loading-spinner {
3517
+ justify-content: center;
3480
3518
  width: var(--icon-md);
3481
3519
  height: var(--icon-md);
3482
- border-radius: var(--radius-full);
3483
- border: 2px solid currentColor;
3484
- border-top-color: transparent;
3520
+ pointer-events: none;
3485
3521
  }
3486
3522
 
3523
+ /* ──────────────────────────────────────────────────
3524
+ Dropdown content
3525
+ ────────────────────────────────────────────────── */
3526
+
3487
3527
  .dndev-combobox-content {
3488
3528
  width: var(--radix-popover-trigger-width);
3489
3529
  min-width: var(--radix-popover-trigger-width);
@@ -3493,15 +3533,6 @@ em {
3493
3533
  padding: 0;
3494
3534
  }
3495
3535
 
3496
- .dndev-combobox-search-container {
3497
- padding: var(--gap-sm);
3498
- border-bottom: var(--border-width) solid var(--line-2);
3499
- }
3500
-
3501
- .dndev-combobox-search-input {
3502
- width: 100%;
3503
- }
3504
-
3505
3536
  .dndev-combobox-option {
3506
3537
  all: unset;
3507
3538
  display: flex;
@@ -3572,20 +3603,6 @@ em {
3572
3603
  flex-shrink: 0;
3573
3604
  }
3574
3605
 
3575
- .dndev-combobox-create-btn:hover {
3576
- opacity: 0.8;
3577
- }
3578
-
3579
- .dndev-combobox-open .dndev-input-with-trailing-icon .dndev-input-icon svg,
3580
- .dndev-combobox-open .dndev-input-with-trailing-icon .dndev-input-icon > * {
3581
- transform: rotate(180deg);
3582
- }
3583
-
3584
- .dndev-input-with-trailing-icon .dndev-input-icon svg,
3585
- .dndev-input-with-trailing-icon .dndev-input-icon > * {
3586
- transition: transform var(--dur-fast) var(--ease-in-out);
3587
- }
3588
-
3589
3606
  /* packages/components/src/atomic/DualCard/DualCard.css */
3590
3607
 
3591
3608
  .dndev-dual-card {
@@ -1 +1 @@
1
- {"version":3,"file":"measurement.d.ts","sourceRoot":"","sources":["../../src/utils/measurement.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,GAAG,IAAI,CAqD1B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,EACjD,OAAO,GAAE,kBA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AG,IAAI,GAAG,MAAM,CAUpE;AAED;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,IAAI,EACjD,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAuBZ;AAED;;;;;;;GAOG;AACH,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,OAAO,GAAG,IAAI,EACzB,OAAO,EAAE,OAAO,GAAG,IAAI,EACvB,QAAQ,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,KAAK,IAAI,EAClE,OAAO,GAAE,kBAAuB,GAC/B,MAAM,IAAI,CAmCZ;AAaD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAmB9D"}
@@ -17,14 +17,14 @@ export function measureElement(element, options = {}) {
17
17
  const htmlElement = element;
18
18
  // getBoundingClientRect includes padding + borders by default.
19
19
  // Start from content-box by subtracting both, then add back per options.
20
- const paddingH = (parseFloat(computedStyle.paddingLeft) || 0)
21
- + (parseFloat(computedStyle.paddingRight) || 0);
22
- const paddingV = (parseFloat(computedStyle.paddingTop) || 0)
23
- + (parseFloat(computedStyle.paddingBottom) || 0);
24
- const borderH = (parseFloat(computedStyle.borderLeftWidth) || 0)
25
- + (parseFloat(computedStyle.borderRightWidth) || 0);
26
- const borderV = (parseFloat(computedStyle.borderTopWidth) || 0)
27
- + (parseFloat(computedStyle.borderBottomWidth) || 0);
20
+ const paddingH = (parseFloat(computedStyle.paddingLeft) || 0) +
21
+ (parseFloat(computedStyle.paddingRight) || 0);
22
+ const paddingV = (parseFloat(computedStyle.paddingTop) || 0) +
23
+ (parseFloat(computedStyle.paddingBottom) || 0);
24
+ const borderH = (parseFloat(computedStyle.borderLeftWidth) || 0) +
25
+ (parseFloat(computedStyle.borderRightWidth) || 0);
26
+ const borderV = (parseFloat(computedStyle.borderTopWidth) || 0) +
27
+ (parseFloat(computedStyle.borderBottomWidth) || 0);
28
28
  let width = rect.width - paddingH - borderH;
29
29
  let height = rect.height - paddingV - borderV;
30
30
  if (includePadding) {
@@ -9,7 +9,7 @@ import { type VariantProps } from 'class-variance-authority';
9
9
  * Used by: Card, DualCard, StackedCards, Dialog, Sheet, Alert
10
10
  */
11
11
  export declare const surfaceVariants: (props?: ({
12
- variant?: "muted" | "accent" | "primary" | "destructive" | "outline" | "default" | "secondary" | "success" | "warning" | "glass" | null | undefined;
12
+ variant?: "default" | "warning" | "success" | "muted" | "primary" | "secondary" | "accent" | "destructive" | "outline" | "glass" | null | undefined;
13
13
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
14
14
  export type SurfaceVariantProps = VariantProps<typeof surfaceVariants>;
15
15
  //# sourceMappingURL=variants.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/components",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Styled UI components for DoNotDev",