@openwarelabs/ui 0.1.1 → 0.2.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/dist/styles.css CHANGED
@@ -82,6 +82,7 @@
82
82
  --ow-key-ground: var(--ow-gray-50);
83
83
  --ow-track: var(--ow-gray-100);
84
84
  --ow-thumb: #ffffff;
85
+ --ow-knob: #ffffff;
85
86
  --ow-meter-track: var(--ow-gray-200);
86
87
  --ow-progress: var(--ow-brand-600);
87
88
  --ow-code-block: #15171c;
@@ -158,6 +159,7 @@
158
159
  --ow-key-ground: #22262e;
159
160
  --ow-track: #14161b;
160
161
  --ow-thumb: #2f3541;
162
+ --ow-knob: #e4e7ec;
161
163
  --ow-meter-track: #2c313a;
162
164
  --ow-progress: var(--ow-brand-400);
163
165
  --ow-code-block-border: #2c313a;
@@ -230,6 +232,7 @@
230
232
  --ow-key-ground: #22262e;
231
233
  --ow-track: #14161b;
232
234
  --ow-thumb: #2f3541;
235
+ --ow-knob: #e4e7ec;
233
236
  --ow-meter-track: #2c313a;
234
237
  --ow-progress: var(--ow-brand-400);
235
238
  --ow-code-block-border: #2c313a;
@@ -467,6 +470,7 @@
467
470
  back into it. useFloating sets data-side and --ow-floating-origin; usePresence sets data-state. */
468
471
  .ow-floating {
469
472
  --ow-floating-shift: -4px;
473
+ --ow-floating-shift-x: 0px;
470
474
  transform-origin: var(--ow-floating-origin, top center);
471
475
  }
472
476
 
@@ -474,6 +478,16 @@
474
478
  --ow-floating-shift: 4px;
475
479
  }
476
480
 
481
+ .ow-floating[data-side="left"] {
482
+ --ow-floating-shift: 0px;
483
+ --ow-floating-shift-x: 4px;
484
+ }
485
+
486
+ .ow-floating[data-side="right"] {
487
+ --ow-floating-shift: 0px;
488
+ --ow-floating-shift-x: -4px;
489
+ }
490
+
477
491
  .ow-floating[data-state="open"] {
478
492
  animation: ow-floating-in var(--ow-duration-base) var(--ow-ease-emphasized);
479
493
  }
@@ -486,14 +500,14 @@
486
500
  @keyframes ow-floating-in {
487
501
  from {
488
502
  opacity: 0;
489
- transform: translateY(var(--ow-floating-shift)) scale(0.96);
503
+ transform: translate(var(--ow-floating-shift-x), var(--ow-floating-shift)) scale(0.96);
490
504
  }
491
505
  }
492
506
 
493
507
  @keyframes ow-floating-out {
494
508
  to {
495
509
  opacity: 0;
496
- transform: translateY(var(--ow-floating-shift)) scale(0.97);
510
+ transform: translate(var(--ow-floating-shift-x), var(--ow-floating-shift)) scale(0.97);
497
511
  }
498
512
  }
499
513
 
@@ -922,6 +936,8 @@
922
936
  border-radius: var(--ow-radius-container);
923
937
  background: var(--ow-track);
924
938
  padding: var(--ow-space-2xs);
939
+ /* A hairline edge, so the well shows on the canvas as well as on a surface. */
940
+ box-shadow: inset 0 0 0 1px var(--ow-border);
925
941
  }
926
942
 
927
943
  .ow-segmented--full {
@@ -1225,6 +1241,8 @@
1225
1241
  .ow-input-group {
1226
1242
  display: flex;
1227
1243
  width: 100%;
1244
+ /* Shrink in a narrow grid or flex column instead of pushing past it. */
1245
+ min-width: 0;
1228
1246
  height: 40px;
1229
1247
  align-items: center;
1230
1248
  gap: var(--ow-space-sm);
@@ -1271,6 +1289,8 @@
1271
1289
  }
1272
1290
 
1273
1291
  .ow-input-group__input {
1292
+ /* A percentage width lets the field's minimum size come from its start and end content alone. */
1293
+ width: 100%;
1274
1294
  min-width: 0;
1275
1295
  height: 100%;
1276
1296
  flex: 1;
@@ -1877,7 +1897,7 @@
1877
1897
  width: 16px;
1878
1898
  height: 16px;
1879
1899
  border-radius: var(--ow-radius-pill);
1880
- background: #ffffff;
1900
+ background: var(--ow-knob);
1881
1901
  box-shadow: var(--ow-shadow-control);
1882
1902
  transform: translateX(2px);
1883
1903
  transition:
@@ -1899,7 +1919,7 @@
1899
1919
  }
1900
1920
 
1901
1921
  /* components/Slider/Slider.css */
1902
- /* Slider: native range inputs over a drawn track. The thumb is the switch's knob: white, round, with a soft shadow. */
1922
+ /* Slider: native range inputs over a drawn track. The thumb is the switch's knob (ow-knob): round, with a soft shadow. */
1903
1923
  .ow-slider {
1904
1924
  display: grid;
1905
1925
  gap: var(--ow-space-sm);
@@ -1990,7 +2010,7 @@
1990
2010
  appearance: none;
1991
2011
  border: 1px solid var(--ow-border-strong);
1992
2012
  border-radius: 50%;
1993
- background: #ffffff;
2013
+ background: var(--ow-knob);
1994
2014
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
1995
2015
  pointer-events: auto;
1996
2016
  cursor: grab;
@@ -2003,7 +2023,7 @@
2003
2023
  height: 18px;
2004
2024
  border: 1px solid var(--ow-border-strong);
2005
2025
  border-radius: 50%;
2006
- background: #ffffff;
2026
+ background: var(--ow-knob);
2007
2027
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
2008
2028
  pointer-events: auto;
2009
2029
  cursor: grab;
@@ -2613,7 +2633,7 @@
2613
2633
  }
2614
2634
 
2615
2635
  /* components/Tooltip/Tooltip.css */
2616
- /* Tooltip: a small dark label in the top layer, above the child (or below when there's no room). */
2636
+ /* Tooltip: a small dark label in the top layer, on the side of the child it prefers (or the other side when there's no room). */
2617
2637
  .ow-tooltip {
2618
2638
  display: inline-flex;
2619
2639
  }
@@ -4417,6 +4437,19 @@
4417
4437
  font-size: 13px;
4418
4438
  }
4419
4439
 
4440
+ .ow-avatar--xl {
4441
+ width: 48px;
4442
+ height: 48px;
4443
+ font-size: 17px;
4444
+ }
4445
+
4446
+ /* Any size in pixels, through --ow-avatar-size: the initials stay in proportion. */
4447
+ .ow-avatar--custom {
4448
+ width: var(--ow-avatar-size);
4449
+ height: var(--ow-avatar-size);
4450
+ font-size: calc(var(--ow-avatar-size) * 0.36);
4451
+ }
4452
+
4420
4453
  .ow-avatar__image {
4421
4454
  width: 100%;
4422
4455
  height: 100%;
@@ -4453,6 +4486,18 @@
4453
4486
  gap: var(--ow-space-md);
4454
4487
  }
4455
4488
 
4489
+ .ow-user--xl {
4490
+ gap: var(--ow-space-lg);
4491
+ }
4492
+
4493
+ .ow-user--xl .ow-user__name {
4494
+ font-size: 15px;
4495
+ }
4496
+
4497
+ .ow-user--xl .ow-user__description {
4498
+ font-size: 13px;
4499
+ }
4500
+
4456
4501
  .ow-user__text {
4457
4502
  display: grid;
4458
4503
  min-width: 0;
package/dist/tailwind.css CHANGED
@@ -83,6 +83,7 @@
83
83
  --color-key-ground: var(--ow-key-ground);
84
84
  --color-track: var(--ow-track);
85
85
  --color-thumb: var(--ow-thumb);
86
+ --color-knob: var(--ow-knob);
86
87
  --color-meter-track: var(--ow-meter-track);
87
88
  --color-progress: var(--ow-progress);
88
89
  --color-code-block: var(--ow-code-block);
package/dist/tokens.css CHANGED
@@ -82,6 +82,7 @@
82
82
  --ow-key-ground: var(--ow-gray-50);
83
83
  --ow-track: var(--ow-gray-100);
84
84
  --ow-thumb: #ffffff;
85
+ --ow-knob: #ffffff;
85
86
  --ow-meter-track: var(--ow-gray-200);
86
87
  --ow-progress: var(--ow-brand-600);
87
88
  --ow-code-block: #15171c;
@@ -158,6 +159,7 @@
158
159
  --ow-key-ground: #22262e;
159
160
  --ow-track: #14161b;
160
161
  --ow-thumb: #2f3541;
162
+ --ow-knob: #e4e7ec;
161
163
  --ow-meter-track: #2c313a;
162
164
  --ow-progress: var(--ow-brand-400);
163
165
  --ow-code-block-border: #2c313a;
@@ -230,6 +232,7 @@
230
232
  --ow-key-ground: #22262e;
231
233
  --ow-track: #14161b;
232
234
  --ow-thumb: #2f3541;
235
+ --ow-knob: #e4e7ec;
233
236
  --ow-meter-track: #2c313a;
234
237
  --ow-progress: var(--ow-brand-400);
235
238
  --ow-code-block-border: #2c313a;
package/dist/tokens.json CHANGED
@@ -556,7 +556,7 @@
556
556
  "light": "{ow-gray-100}",
557
557
  "dark": "#14161b"
558
558
  },
559
- "usage": "The well behind segmented controls and segmented tabs."
559
+ "usage": "The well behind segmented controls and segmented tabs, edged with ow-border so it shows on the canvas too."
560
560
  },
561
561
  {
562
562
  "name": "ow-thumb",
@@ -566,6 +566,14 @@
566
566
  },
567
567
  "usage": "The selected segment in a segmented control or segmented tabs; ow-text on it."
568
568
  },
569
+ {
570
+ "name": "ow-knob",
571
+ "value": {
572
+ "light": "#ffffff",
573
+ "dark": "#e4e7ec"
574
+ },
575
+ "usage": "Switch knobs and slider thumbs: white in light, a softer white in dark so it doesn't glare. Its shadow separates it from the ground."
576
+ },
569
577
  {
570
578
  "name": "ow-meter-track",
571
579
  "value": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openwarelabs/ui",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Openware UI: React components and design tokens — midnight and brass, tactile buttons and Inter, in light and dark.",
5
5
  "license": "MIT",
6
6
  "author": "Alexander Silver",