@pure-ds/core 0.4.16 → 0.4.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.
@@ -1149,6 +1149,8 @@ export class Generator {
1149
1149
  mesh,
1150
1150
  ].join("");
1151
1151
 
1152
+ // Dark mode selector only - .surface-inverse is handled separately in utilities
1153
+ // to avoid inheriting the full dark palette (which would override --color-surface-inverse)
1152
1154
  return `html[data-theme="dark"] {\n${body}}\n`;
1153
1155
  }
1154
1156
 
@@ -1589,12 +1591,13 @@ html[data-theme="dark"] .liquid-glass {
1589
1591
 
1590
1592
  :where(blockquote) {
1591
1593
  margin: 0 0 var(--spacing-4) 0;
1592
- padding: var(--spacing-4) var(--spacing-6);
1594
+ padding: var(--spacing-6) var(--spacing-8);
1593
1595
  border-left: 4px solid var(--color-primary-500);
1594
- background-color: var(--color-surface-subtle);
1595
- border-radius: var(--radius-md);
1596
- font-style: italic;
1597
- color: var(--color-text-secondary);
1596
+ background-color: var(--color-surface-elevated);
1597
+ border-radius: var(--radius-none);
1598
+ font-size: var(--font-size-lg);
1599
+ line-height: var(--line-height-relaxed);
1600
+ color: var(--color-text-primary);
1598
1601
 
1599
1602
  :where(p):last-child {
1600
1603
  margin-bottom: 0;
@@ -1602,14 +1605,10 @@ html[data-theme="dark"] .liquid-glass {
1602
1605
 
1603
1606
  :where(cite) {
1604
1607
  display: block;
1605
- margin-top: var(--spacing-2);
1606
- font-size: var(--font-size-sm);
1608
+ margin-top: var(--spacing-4);
1609
+ font-size: var(--font-size-base);
1607
1610
  font-style: normal;
1608
- color: var(--color-text-tertiary);
1609
-
1610
- &::before {
1611
- content: "— ";
1612
- }
1611
+ color: var(--color-primary-500);
1613
1612
  }
1614
1613
  }
1615
1614
 
@@ -3045,11 +3044,20 @@ dialog[open]::backdrop {
3045
3044
  }
3046
3045
  }
3047
3046
 
3047
+ /* Dialog - constrain max height to 90vh, support custom maxHeight via CSS variable */
3048
+ dialog {
3049
+ max-height: var(--dialog-max-height, 90vh);
3050
+ display: flex;
3051
+ flex-direction: column;
3052
+ overflow: hidden; /* Prevent dialog itself from scrolling - let .dialog-body handle it */
3053
+ }
3054
+
3048
3055
  /* Form structure - use flexbox instead of contents */
3049
3056
  dialog form {
3050
3057
  display: flex;
3051
3058
  flex-direction: column;
3052
- height: 100%;
3059
+ flex: 1;
3060
+ min-height: 0; /* Allow flex child to shrink */
3053
3061
  margin: 0;
3054
3062
  }
3055
3063
 
@@ -3108,7 +3116,8 @@ dialog {
3108
3116
  article,
3109
3117
  form > article,
3110
3118
  .dialog-body {
3111
- flex: 1;
3119
+ flex: 1 1 auto;
3120
+ min-height: 0; /* Critical: allow flex child to shrink and scroll */
3112
3121
  padding: var(--spacing-3) var(--spacing-6);
3113
3122
  overflow-y: auto;
3114
3123
  overflow-x: hidden;
@@ -3134,9 +3143,17 @@ dialog.dialog-lg { max-width: min(800px, calc(100vw - var(--spacing-8))); }
3134
3143
  dialog.dialog-xl { max-width: min(1200px, calc(100vw - var(--spacing-8))); }
3135
3144
  dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc(100vh - var(--spacing-8)); }
3136
3145
 
3137
- /* Mobile responsiveness */
3146
+ /* Mobile responsiveness - maximize on mobile */
3138
3147
  @media (max-width: ${breakpoints.sm - 1}px) {
3139
- dialog { max-width: 100vw; max-height: 100vh; border-radius: 0; top: 50%; transform: translateY(-50%); margin: 0; }
3148
+ dialog {
3149
+ max-width: 100vw;
3150
+ max-height: 100vh;
3151
+ --dialog-max-height: 100vh; /* Override custom maxHeight on mobile */
3152
+ border-radius: 0;
3153
+ top: 50%;
3154
+ transform: translateY(-50%);
3155
+ margin: 0;
3156
+ }
3140
3157
  dialog header, dialog form > header, dialog article, dialog form > article, dialog footer, dialog form > footer { padding: var(--spacing-4); }
3141
3158
  }
3142
3159
 
@@ -4447,40 +4464,27 @@ ${this.#generateBorderGradientUtilities()}
4447
4464
  }
4448
4465
 
4449
4466
 
4450
- /* Inverse surface (dark) using PDS tokens; text/icons inherit currentColor */
4467
+ /*
4468
+ * SURFACE-INVERSE: Local Theme Context Flip
4469
+ *
4470
+ * We can't simply add .surface-inverse to the dark mode selector because that would
4471
+ * also apply the dark color PALETTE (grays, surfaces, etc.), which would override
4472
+ * --color-surface-inverse itself. Instead, we duplicate only the SEMANTIC tokens.
4473
+ *
4474
+ * Light theme .surface-inverse → dark semantic tokens
4475
+ * Dark theme .surface-inverse → light semantic tokens (flip back)
4476
+ */
4477
+
4478
+ /* Surface-inverse visual properties (shared, uses smart surface tokens) */
4451
4479
  .surface-inverse {
4452
4480
  background-color: var(--color-surface-inverse);
4453
- /* Ensure foregrounds inside use the correct smart-surface tokens */
4454
4481
  color: var(--surface-inverse-text);
4455
- --color-text-primary: var(--surface-inverse-text);
4456
- --color-text-secondary: var(--surface-inverse-text-secondary);
4457
- --color-text-muted: var(--surface-inverse-text-muted);
4458
- /* Ensure code/pre and other muted surfaces have contrast on inverse */
4459
- --color-surface-muted: rgba(255, 255, 255, 0.08);
4460
- /* Optional: adjust borders/shadows if utilities/components read these */
4461
- --color-border: var(--surface-inverse-border);
4462
4482
 
4463
4483
  pds-icon {
4464
4484
  color: var(--surface-inverse-icon);
4465
4485
  }
4466
4486
 
4467
- /* Default and secondary buttons on inverse - semi-transparent glass effect */
4468
- & button:not(.btn-primary):not(.btn-outline):not(.btn-danger):not(.btn-success):not(.btn-warning),
4469
- & .btn-secondary {
4470
- background-color: rgba(255, 255, 255, 0.12);
4471
- color: var(--surface-inverse-text);
4472
- border-color: rgba(255, 255, 255, 0.25);
4473
-
4474
- &:hover {
4475
- background-color: rgba(255, 255, 255, 0.2);
4476
- }
4477
-
4478
- &:active {
4479
- background-color: rgba(255, 255, 255, 0.28);
4480
- }
4481
- }
4482
-
4483
- /* Ensure btn-primary stays vibrant on inverse */
4487
+ /* btn-primary stays vibrant in any context */
4484
4488
  & .btn-primary {
4485
4489
  background-color: var(--color-primary-500);
4486
4490
  border-color: var(--color-primary-500);
@@ -4493,6 +4497,70 @@ ${this.#generateBorderGradientUtilities()}
4493
4497
  }
4494
4498
  }
4495
4499
 
4500
+ /* Light-mode inverse: apply dark semantic tokens */
4501
+ html:not([data-theme="dark"]) .surface-inverse {
4502
+ --color-text-primary: var(--color-gray-100);
4503
+ --color-text-secondary: var(--color-gray-300);
4504
+ --color-text-muted: var(--color-gray-400);
4505
+ --color-border: var(--color-gray-700);
4506
+ --color-input-bg: var(--color-gray-800);
4507
+ --color-input-disabled-bg: var(--color-gray-900);
4508
+ --color-input-disabled-text: var(--color-gray-600);
4509
+ --color-code-bg: var(--color-gray-800);
4510
+ --color-surface-muted: rgba(255, 255, 255, 0.08);
4511
+
4512
+ & button:not(.btn-primary):not(.btn-outline):not(.btn-danger):not(.btn-success):not(.btn-warning),
4513
+ & .btn-secondary {
4514
+ background-color: rgba(255, 255, 255, 0.12);
4515
+ color: var(--surface-inverse-text);
4516
+ border-color: rgba(255, 255, 255, 0.25);
4517
+
4518
+ &:hover { background-color: rgba(255, 255, 255, 0.2); }
4519
+ &:active { background-color: rgba(255, 255, 255, 0.28); }
4520
+ }
4521
+
4522
+ & select {
4523
+ background-color: rgba(255, 255, 255, 0.1);
4524
+ color: var(--surface-inverse-text);
4525
+ }
4526
+
4527
+ & a:not([class*="btn"]) {
4528
+ color: var(--color-primary-300, #7dd3fc);
4529
+ }
4530
+ }
4531
+
4532
+ /* Dark-mode inverse: flip back to light semantic tokens */
4533
+ html[data-theme="dark"] .surface-inverse {
4534
+ --color-text-primary: var(--color-gray-900);
4535
+ --color-text-secondary: var(--color-gray-600);
4536
+ --color-text-muted: var(--color-gray-600);
4537
+ --color-border: var(--color-gray-300);
4538
+ --color-input-bg: var(--color-surface-base);
4539
+ --color-input-disabled-bg: var(--color-gray-50);
4540
+ --color-input-disabled-text: var(--color-gray-500);
4541
+ --color-code-bg: var(--color-gray-100);
4542
+ --color-surface-muted: var(--color-gray-100);
4543
+
4544
+ & button:not(.btn-primary):not(.btn-outline):not(.btn-danger):not(.btn-success):not(.btn-warning),
4545
+ & .btn-secondary {
4546
+ background-color: rgba(0, 0, 0, 0.06);
4547
+ color: var(--surface-inverse-text);
4548
+ border-color: rgba(0, 0, 0, 0.15);
4549
+
4550
+ &:hover { background-color: rgba(0, 0, 0, 0.1); }
4551
+ &:active { background-color: rgba(0, 0, 0, 0.15); }
4552
+ }
4553
+
4554
+ & select {
4555
+ background-color: #ffffff;
4556
+ color: var(--surface-inverse-text);
4557
+ }
4558
+
4559
+ & a:not([class*="btn"]) {
4560
+ color: var(--color-primary-600, #0284c7);
4561
+ }
4562
+ }
4563
+
4496
4564
  /* Shadow utilities */
4497
4565
  .shadow-sm {
4498
4566
  box-shadow: var(--shadow-sm);
@@ -380,7 +380,7 @@ export const ontology = {
380
380
  utilities: {
381
381
  text: {
382
382
  alignment: [".text-left", ".text-center", ".text-right"],
383
- color: [".text-muted", ".text-primary", ".text-success", ".text-warning", ".text-danger", ".text-info"],
383
+ color: [".text-muted"],
384
384
  overflow: [".truncate"]
385
385
  },
386
386
  backdrop: {