@openwarelabs/ui 0.3.1 → 0.4.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.
Files changed (51) hide show
  1. package/README.md +6 -6
  2. package/dist/components/Calendar/Calendar.d.cts +58 -0
  3. package/dist/components/Calendar/Calendar.d.ts +58 -0
  4. package/dist/components/Calendar/DateRangePicker.d.cts +39 -0
  5. package/dist/components/Calendar/DateRangePicker.d.ts +39 -0
  6. package/dist/components/Calendar/RangeCalendar.d.cts +38 -0
  7. package/dist/components/Calendar/RangeCalendar.d.ts +38 -0
  8. package/dist/components/Calendar/dates.d.cts +13 -0
  9. package/dist/components/Calendar/dates.d.ts +13 -0
  10. package/dist/components/ColorPicker/ColorArea.d.cts +44 -0
  11. package/dist/components/ColorPicker/ColorArea.d.ts +44 -0
  12. package/dist/components/ColorPicker/ColorSlider.d.cts +53 -0
  13. package/dist/components/ColorPicker/ColorSlider.d.ts +53 -0
  14. package/dist/components/ColorPicker/ColorSwatchPicker.d.cts +43 -0
  15. package/dist/components/ColorPicker/ColorSwatchPicker.d.ts +43 -0
  16. package/dist/components/ColorPicker/color.d.cts +91 -0
  17. package/dist/components/ColorPicker/color.d.ts +91 -0
  18. package/dist/components/DateField/DateField.d.cts +47 -0
  19. package/dist/components/DateField/DateField.d.ts +47 -0
  20. package/dist/components/DateField/SegmentedField.d.cts +63 -0
  21. package/dist/components/DateField/SegmentedField.d.ts +63 -0
  22. package/dist/components/DateField/TimeField.d.cts +52 -0
  23. package/dist/components/DateField/TimeField.d.ts +52 -0
  24. package/dist/components/Field/Field.d.cts +17 -5
  25. package/dist/components/Field/Field.d.ts +17 -5
  26. package/dist/components/FileDropZone/FileDropZone.d.cts +1 -1
  27. package/dist/components/FileDropZone/FileDropZone.d.ts +1 -1
  28. package/dist/components/Form/Form.d.cts +63 -0
  29. package/dist/components/Form/Form.d.ts +63 -0
  30. package/dist/components/InputOTP/InputOTP.d.cts +7 -1
  31. package/dist/components/InputOTP/InputOTP.d.ts +7 -1
  32. package/dist/components/ListBox/ListBox.d.cts +65 -0
  33. package/dist/components/ListBox/ListBox.d.ts +65 -0
  34. package/dist/components/Meter/Meter.d.cts +62 -0
  35. package/dist/components/Meter/Meter.d.ts +62 -0
  36. package/dist/components/Slider/Slider.d.cts +7 -1
  37. package/dist/components/Slider/Slider.d.ts +7 -1
  38. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.cts +74 -0
  39. package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +74 -0
  40. package/dist/components/Toolbar/Toolbar.d.cts +36 -0
  41. package/dist/components/Toolbar/Toolbar.d.ts +36 -0
  42. package/dist/components.css +1007 -12
  43. package/dist/index.cjs +3999 -1262
  44. package/dist/index.cjs.map +4 -4
  45. package/dist/index.d.cts +25 -0
  46. package/dist/index.d.ts +25 -0
  47. package/dist/index.js +3955 -1192
  48. package/dist/index.js.map +4 -4
  49. package/dist/openware-ui.iife.js +6 -6
  50. package/dist/styles.css +1007 -12
  51. package/package.json +1 -1
@@ -313,9 +313,8 @@
313
313
  padding: 0;
314
314
  }
315
315
  .ow-button--icon-only.ow-button--sm {
316
- width: 28px;
317
- height: 28px;
318
- min-height: 28px;
316
+ width: 32px;
317
+ height: 32px;
319
318
  }
320
319
  .ow-button--icon-only.ow-button--md {
321
320
  width: 40px;
@@ -523,29 +522,38 @@
523
522
  flex-wrap: nowrap;
524
523
  gap: 0;
525
524
  }
526
- .ow-button-group--attached > .ow-button {
525
+ /* A button joins its neighbours whether it's a direct child or wrapped one level down, by a Tooltip or a Menu's trigger. */
526
+ .ow-button-group--attached > .ow-button,
527
+ .ow-button-group--attached > * > .ow-button {
527
528
  position: relative;
528
529
  }
529
530
  .ow-button-group--attached > .ow-button:hover,
530
531
  .ow-button-group--attached > .ow-button:focus-visible,
531
- .ow-button-group--attached > .ow-button--pressed {
532
+ .ow-button-group--attached > .ow-button--pressed,
533
+ .ow-button-group--attached > * > .ow-button:hover,
534
+ .ow-button-group--attached > * > .ow-button:focus-visible,
535
+ .ow-button-group--attached > * > .ow-button--pressed {
532
536
  z-index: 1;
533
537
  }
534
- .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:first-child) {
538
+ .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:first-child),
539
+ .ow-button-group--attached:not(.ow-button-group--vertical) > :not(:first-child) > .ow-button {
535
540
  margin-left: -1px;
536
541
  border-top-left-radius: 0;
537
542
  border-bottom-left-radius: 0;
538
543
  }
539
- .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:last-child) {
544
+ .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:last-child),
545
+ .ow-button-group--attached:not(.ow-button-group--vertical) > :not(:last-child) > .ow-button {
540
546
  border-top-right-radius: 0;
541
547
  border-bottom-right-radius: 0;
542
548
  }
543
- .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:first-child) {
549
+ .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:first-child),
550
+ .ow-button-group--attached.ow-button-group--vertical > :not(:first-child) > .ow-button {
544
551
  margin-top: -1px;
545
552
  border-top-left-radius: 0;
546
553
  border-top-right-radius: 0;
547
554
  }
548
- .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:last-child) {
555
+ .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:last-child),
556
+ .ow-button-group--attached.ow-button-group--vertical > :not(:last-child) > .ow-button {
549
557
  border-bottom-left-radius: 0;
550
558
  border-bottom-right-radius: 0;
551
559
  }
@@ -589,6 +597,139 @@
589
597
  opacity: 0.5;
590
598
  }
591
599
 
600
+ /* components/ToggleButtonGroup/ToggleButtonGroup.css */
601
+ /* ToggleButtonGroup: toggles joined like an attached ButtonGroup, sharing borders, each pressed in while it's on.
602
+ An item is the button itself, or the Tooltip around an icon-only one. */
603
+ .ow-toggle-group {
604
+ display: inline-flex;
605
+ flex-wrap: nowrap;
606
+ align-items: stretch;
607
+ vertical-align: middle;
608
+ }
609
+
610
+ .ow-toggle-group--vertical {
611
+ flex-direction: column;
612
+ }
613
+
614
+ .ow-toggle-group > * {
615
+ position: relative;
616
+ }
617
+
618
+ .ow-toggle-group > .ow-tooltip > .ow-button {
619
+ flex: 1;
620
+ }
621
+
622
+ /* Hovered and pressed buttons sit above their neighbours so their whole border shows; a focused one above all,
623
+ so nothing covers its ring. */
624
+ .ow-toggle-group > :hover,
625
+ .ow-toggle-group > .ow-button--pressed,
626
+ .ow-toggle-group > :has(> .ow-button--pressed) {
627
+ z-index: 1;
628
+ }
629
+
630
+ .ow-toggle-group > :focus-visible,
631
+ .ow-toggle-group > :has(> :focus-visible) {
632
+ z-index: 2;
633
+ }
634
+
635
+ /* Shared borders: each item overlaps the one before by a border's width, and only the ends keep their corners. */
636
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:first-child) {
637
+ margin-inline-start: -1px;
638
+ }
639
+
640
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > .ow-button:not(:first-child),
641
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:first-child) > .ow-button {
642
+ border-start-start-radius: 0;
643
+ border-end-start-radius: 0;
644
+ }
645
+
646
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > .ow-button:not(:last-child),
647
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:last-child) > .ow-button {
648
+ border-start-end-radius: 0;
649
+ border-end-end-radius: 0;
650
+ }
651
+
652
+ .ow-toggle-group--vertical > :not(:first-child) {
653
+ margin-block-start: -1px;
654
+ }
655
+
656
+ .ow-toggle-group--vertical > .ow-button:not(:first-child),
657
+ .ow-toggle-group--vertical > :not(:first-child) > .ow-button {
658
+ border-start-start-radius: 0;
659
+ border-start-end-radius: 0;
660
+ }
661
+
662
+ .ow-toggle-group--vertical > .ow-button:not(:last-child),
663
+ .ow-toggle-group--vertical > :not(:last-child) > .ow-button {
664
+ border-end-start-radius: 0;
665
+ border-end-end-radius: 0;
666
+ }
667
+
668
+ /* An icon-only option among labelled ones matches their height. */
669
+ .ow-toggle-group--sm:not(.ow-toggle-group--icon-only) .ow-button--icon-only {
670
+ width: 32px;
671
+ height: 32px;
672
+ min-height: 32px;
673
+ }
674
+
675
+ /* components/Toolbar/Toolbar.css */
676
+ /* Toolbar: a row (or column) of controls for one context, raised on its own surface or plain. */
677
+ .ow-toolbar {
678
+ display: flex;
679
+ flex-wrap: wrap;
680
+ align-items: center;
681
+ gap: var(--ow-space-xs);
682
+ min-width: 0;
683
+ }
684
+
685
+ .ow-toolbar--sm {
686
+ gap: var(--ow-space-2xs);
687
+ }
688
+
689
+ .ow-toolbar--raised {
690
+ border: 1px solid var(--ow-border);
691
+ border-radius: var(--ow-radius-container);
692
+ background: var(--ow-surface);
693
+ padding: var(--ow-space-xs);
694
+ box-shadow: var(--ow-shadow-control);
695
+ }
696
+
697
+ /* 4px inside a 12px corner keeps the buttons' 8px corners concentric with the bar's. */
698
+ .ow-toolbar--raised.ow-toolbar--sm {
699
+ padding: var(--ow-space-2xs);
700
+ }
701
+
702
+ .ow-toolbar--vertical {
703
+ display: inline-flex;
704
+ flex-direction: column;
705
+ flex-wrap: nowrap;
706
+ align-items: stretch;
707
+ }
708
+
709
+ /* The separator stops short of the bar's edges, so it divides groups without boxing them in. */
710
+ .ow-toolbar__separator {
711
+ flex-shrink: 0;
712
+ align-self: center;
713
+ width: 1px;
714
+ height: 20px;
715
+ margin: 0 var(--ow-space-2xs);
716
+ background: var(--ow-border);
717
+ }
718
+
719
+ .ow-toolbar--sm .ow-toolbar__separator {
720
+ height: 16px;
721
+ }
722
+
723
+ .ow-toolbar--vertical .ow-toolbar__separator {
724
+ width: 20px;
725
+ height: 1px;
726
+ margin: var(--ow-space-2xs) 0;
727
+ }
728
+
729
+ .ow-toolbar--vertical.ow-toolbar--sm .ow-toolbar__separator {
730
+ width: 16px;
731
+ }
732
+
592
733
  /* components/SegmentedControl/SegmentedControl.css */
593
734
  /* SegmentedControl and segmented Tabs: a well with the chosen segment raised. */
594
735
  .ow-segmented,
@@ -994,6 +1135,153 @@
994
1135
  white-space: nowrap;
995
1136
  }
996
1137
 
1138
+ /* components/DateField/DateField.css */
1139
+ /* DateField and TimeField: typed segments in a field drawn like Input. The whole field shows focus while a segment
1140
+ has it; the focused segment is tinted. */
1141
+ .ow-date-field {
1142
+ display: flex;
1143
+ width: 100%;
1144
+ /* Shrink in a narrow grid or flex column instead of pushing past it. */
1145
+ min-width: 0;
1146
+ height: 40px;
1147
+ align-items: center;
1148
+ gap: var(--ow-space-xs);
1149
+ border: 1px solid var(--ow-border-strong);
1150
+ border-radius: var(--ow-radius-form);
1151
+ background: var(--ow-surface);
1152
+ /* With the segments' own 2px, the digits start where Input's text does. */
1153
+ padding: 0 var(--ow-space-md);
1154
+ color: var(--ow-text);
1155
+ font-size: 14px;
1156
+ font-weight: var(--ow-weight-regular);
1157
+ line-height: 1.45;
1158
+ font-variant-numeric: tabular-nums;
1159
+ cursor: text;
1160
+ transition-property: border-color, background-color, box-shadow, opacity;
1161
+ transition-duration: var(--ow-duration-base);
1162
+ transition-timing-function: var(--ow-ease-standard);
1163
+ }
1164
+
1165
+ .ow-date-field--sm {
1166
+ height: 32px;
1167
+ gap: var(--ow-space-2xs);
1168
+ padding: 0 var(--ow-space-sm);
1169
+ font-size: 13px;
1170
+ }
1171
+
1172
+ .ow-date-field--with-start {
1173
+ padding-left: var(--ow-space-lg);
1174
+ }
1175
+
1176
+ .ow-date-field--sm.ow-date-field--with-start {
1177
+ padding-left: var(--ow-space-md);
1178
+ }
1179
+
1180
+ .ow-date-field:focus-within {
1181
+ border-color: var(--ow-focus-border);
1182
+ box-shadow: var(--ow-shadow-focus);
1183
+ }
1184
+
1185
+ .ow-date-field:has(.ow-date-field__segment:focus-visible) {
1186
+ outline: 2px solid var(--ow-focus-ring);
1187
+ outline-offset: 2px;
1188
+ }
1189
+
1190
+ .ow-date-field--invalid {
1191
+ border-color: var(--ow-danger-line);
1192
+ }
1193
+
1194
+ .ow-date-field--invalid:focus-within {
1195
+ border-color: var(--ow-danger-solid);
1196
+ box-shadow: var(--ow-shadow-focus-danger);
1197
+ }
1198
+
1199
+ .ow-date-field--readonly {
1200
+ cursor: default;
1201
+ }
1202
+
1203
+ .ow-date-field--disabled {
1204
+ cursor: not-allowed;
1205
+ opacity: 0.62;
1206
+ }
1207
+
1208
+ .ow-date-field__addon {
1209
+ display: inline-flex;
1210
+ flex-shrink: 0;
1211
+ align-items: center;
1212
+ color: var(--ow-text-muted);
1213
+ cursor: default;
1214
+ }
1215
+
1216
+ .ow-date-field__segments {
1217
+ display: flex;
1218
+ min-width: 0;
1219
+ align-items: center;
1220
+ white-space: pre;
1221
+ }
1222
+
1223
+ .ow-date-field__segment {
1224
+ flex-shrink: 0;
1225
+ border-radius: var(--ow-radius-sm);
1226
+ padding: 2px;
1227
+ color: var(--ow-text);
1228
+ text-align: center;
1229
+ caret-color: transparent;
1230
+ outline: 0;
1231
+ transition-property: color, background-color, box-shadow;
1232
+ transition-duration: var(--ow-duration-fast);
1233
+ transition-timing-function: var(--ow-ease-standard);
1234
+ }
1235
+
1236
+ .ow-date-field__segment::selection {
1237
+ background: transparent;
1238
+ }
1239
+
1240
+ /* Tabular digits are 1ch wide, so a segment keeps its width while a value is half typed ("1" on the way to "12").
1241
+ Placeholders keep their own width, so the letters sit evenly. */
1242
+ .ow-date-field__segment--digits-2:not(.ow-date-field__segment--placeholder) {
1243
+ min-width: calc(2ch + 4px);
1244
+ }
1245
+
1246
+ .ow-date-field__segment--digits-4:not(.ow-date-field__segment--placeholder) {
1247
+ min-width: calc(4ch + 4px);
1248
+ }
1249
+
1250
+ .ow-date-field__segment--placeholder {
1251
+ color: var(--ow-text-muted);
1252
+ }
1253
+
1254
+ /* The tint and edge of selected things, as on Pagination's current page. */
1255
+ .ow-date-field__segment:focus {
1256
+ background: var(--ow-primary-subtle);
1257
+ box-shadow: inset 0 0 0 1px var(--ow-primary-border);
1258
+ color: var(--ow-primary-text);
1259
+ }
1260
+
1261
+ .ow-date-field__segment--placeholder:focus {
1262
+ color: var(--ow-text-muted);
1263
+ }
1264
+
1265
+ .ow-date-field--disabled .ow-date-field__segment {
1266
+ cursor: not-allowed;
1267
+ }
1268
+
1269
+ .ow-date-field--readonly .ow-date-field__segment {
1270
+ cursor: default;
1271
+ }
1272
+
1273
+ .ow-date-field__literal {
1274
+ color: var(--ow-text-muted);
1275
+ user-select: none;
1276
+ }
1277
+
1278
+ @media (prefers-reduced-motion: reduce) {
1279
+ .ow-date-field,
1280
+ .ow-date-field__segment {
1281
+ transition: none;
1282
+ }
1283
+ }
1284
+
997
1285
  /* components/Textarea/Textarea.css */
998
1286
  /* Textarea: the field look from Input.css, taller and resizable. */
999
1287
  .ow-textarea {
@@ -1207,6 +1495,87 @@
1207
1495
  font-weight: var(--ow-weight-control);
1208
1496
  }
1209
1497
 
1498
+ /* components/ListBox/ListBox.css */
1499
+ /* ListBox: Select's list on the page. It wears Select.css's .ow-listbox and .ow-option (rows, checkmarks, group
1500
+ labels, sizes), so the two stay in step; this file only undoes the floating and adds the field states. */
1501
+ .ow-listbox.ow-listbox--standalone {
1502
+ position: relative;
1503
+ z-index: auto;
1504
+ min-width: 0;
1505
+ box-shadow: none;
1506
+ overscroll-behavior: auto;
1507
+ outline: 0;
1508
+ transition-property: border-color, box-shadow, opacity;
1509
+ transition-duration: var(--ow-duration-base);
1510
+ transition-timing-function: var(--ow-ease-standard);
1511
+ }
1512
+
1513
+ .ow-listbox--standalone .ow-option {
1514
+ user-select: none;
1515
+ transition: background-color var(--ow-duration-fast) var(--ow-ease-standard);
1516
+ }
1517
+
1518
+ /* In a floating list the pointer moves the highlight; here hover is its own state, apart from the keyboard's. */
1519
+ .ow-listbox--standalone:not(.ow-listbox--disabled, .ow-listbox--readonly) .ow-option:not(.ow-option--disabled):hover {
1520
+ background: var(--ow-hover);
1521
+ }
1522
+
1523
+ .ow-listbox--readonly .ow-option {
1524
+ cursor: default;
1525
+ }
1526
+
1527
+ .ow-listbox--standalone.ow-listbox--focus-visible {
1528
+ border-color: var(--ow-focus-border);
1529
+ box-shadow: var(--ow-shadow-focus);
1530
+ }
1531
+
1532
+ .ow-listbox--standalone.ow-listbox--invalid {
1533
+ border-color: var(--ow-danger-line);
1534
+ }
1535
+
1536
+ .ow-listbox--standalone.ow-listbox--invalid.ow-listbox--focus-visible {
1537
+ border-color: var(--ow-danger-solid);
1538
+ box-shadow: var(--ow-shadow-focus-danger);
1539
+ }
1540
+
1541
+ .ow-listbox--standalone.ow-listbox--disabled {
1542
+ cursor: not-allowed;
1543
+ opacity: 0.62;
1544
+ }
1545
+
1546
+ .ow-listbox--disabled .ow-option {
1547
+ cursor: not-allowed;
1548
+ }
1549
+
1550
+ /* An empty list is one option row tall. */
1551
+ .ow-listbox--standalone .ow-listbox__empty {
1552
+ padding: var(--ow-space-md);
1553
+ font-size: 14px;
1554
+ line-height: 16px;
1555
+ }
1556
+
1557
+ .ow-listbox--standalone.ow-listbox--sm .ow-listbox__empty {
1558
+ padding-block: var(--ow-space-sm);
1559
+ font-size: 12px;
1560
+ }
1561
+
1562
+ .ow-option__icon {
1563
+ display: flex;
1564
+ width: 16px;
1565
+ height: 16px;
1566
+ flex-shrink: 0;
1567
+ align-items: center;
1568
+ justify-content: center;
1569
+ color: var(--ow-text-muted);
1570
+ }
1571
+
1572
+ @media (prefers-reduced-motion: reduce) {
1573
+ .ow-listbox.ow-listbox--standalone,
1574
+ .ow-listbox--standalone .ow-option {
1575
+ transition: none;
1576
+ }
1577
+ }
1578
+
1210
1579
  /* components/Combobox/Combobox.css */
1211
1580
  /* Combobox: a grouped field (Input.css) with a chevron, over Select's listbox. */
1212
1581
  .ow-combobox {
@@ -2013,9 +2382,32 @@
2013
2382
  line-height: 1.4;
2014
2383
  }
2015
2384
 
2016
- /* components/Badge/Badge.css */
2017
- /* Badge (the app's Pill): status in a bordered pill. */
2018
- .ow-badge {
2385
+ /* A checkbox in a Field with an error (the terms, say) takes the invalid field's border until it's ticked. */
2386
+ .ow-field .ow-checkbox__input[aria-invalid="true"]:not(:checked, :disabled) {
2387
+ border-color: var(--ow-danger-line);
2388
+ }
2389
+
2390
+ /* components/Form/Form.css */
2391
+ /* Form: its rows sit ow-space-xl apart, as the README asks. */
2392
+ .ow-form {
2393
+ display: grid;
2394
+ grid-template-columns: minmax(0, 1fr);
2395
+ align-content: start;
2396
+ gap: var(--ow-space-xl);
2397
+ }
2398
+
2399
+ /* A button on a row of its own keeps its width, unless it's fullWidth. */
2400
+ .ow-form > .ow-button {
2401
+ justify-self: start;
2402
+ }
2403
+
2404
+ .ow-form > .ow-button--full {
2405
+ justify-self: stretch;
2406
+ }
2407
+
2408
+ /* components/Badge/Badge.css */
2409
+ /* Badge (the app's Pill): status in a bordered pill. */
2410
+ .ow-badge {
2019
2411
  display: inline-flex;
2020
2412
  width: fit-content;
2021
2413
  align-items: center;
@@ -2303,6 +2695,96 @@
2303
2695
  }
2304
2696
  }
2305
2697
 
2698
+ /* components/Meter/Meter.css */
2699
+ /* Meter: ProgressBar's header and track (Progress.css), for an amount within a range. Tones swap in a status colour. */
2700
+ .ow-meter {
2701
+ display: grid;
2702
+ min-width: 0;
2703
+ gap: var(--ow-space-sm);
2704
+ }
2705
+
2706
+ .ow-meter--primary {
2707
+ --ow-meter-fill: var(--ow-progress);
2708
+ }
2709
+
2710
+ /* Status fills use the status text colours, which keep 3:1 against the track in both themes. */
2711
+ .ow-meter--success {
2712
+ --ow-meter-fill: var(--ow-success-text);
2713
+ }
2714
+
2715
+ .ow-meter--warning {
2716
+ --ow-meter-fill: var(--ow-warning-text);
2717
+ }
2718
+
2719
+ .ow-meter--danger {
2720
+ --ow-meter-fill: var(--ow-danger-text);
2721
+ }
2722
+
2723
+ .ow-meter__header {
2724
+ display: flex;
2725
+ align-items: baseline;
2726
+ justify-content: space-between;
2727
+ gap: var(--ow-space-md);
2728
+ }
2729
+
2730
+ .ow-meter__label {
2731
+ min-width: 0;
2732
+ color: var(--ow-text);
2733
+ font-size: 14px;
2734
+ font-weight: var(--ow-weight-emphasis);
2735
+ }
2736
+
2737
+ .ow-meter__value {
2738
+ flex-shrink: 0;
2739
+ color: var(--ow-text-muted);
2740
+ font-size: 13px;
2741
+ font-variant-numeric: tabular-nums;
2742
+ }
2743
+
2744
+ .ow-meter__track {
2745
+ display: flex;
2746
+ height: 4px;
2747
+ overflow: hidden;
2748
+ border-radius: var(--ow-radius-pill);
2749
+ background: var(--ow-meter-track);
2750
+ }
2751
+
2752
+ .ow-meter--md .ow-meter__track {
2753
+ height: 8px;
2754
+ }
2755
+
2756
+ .ow-meter__fill {
2757
+ display: block;
2758
+ height: 100%;
2759
+ border-radius: inherit;
2760
+ background: var(--ow-meter-fill);
2761
+ transition:
2762
+ width var(--ow-duration-slow) var(--ow-ease-standard),
2763
+ background-color var(--ow-duration-base) var(--ow-ease-standard);
2764
+ }
2765
+
2766
+ /* Segments: the track splits into blocks, each with its own track and a share of the fill. */
2767
+ .ow-meter__track--segmented {
2768
+ gap: var(--ow-space-2xs);
2769
+ overflow: visible;
2770
+ border-radius: 0;
2771
+ background: none;
2772
+ }
2773
+
2774
+ .ow-meter__segment {
2775
+ min-width: 0;
2776
+ flex: 1;
2777
+ overflow: hidden;
2778
+ border-radius: var(--ow-radius-pill);
2779
+ background: var(--ow-meter-track);
2780
+ }
2781
+
2782
+ @media (prefers-reduced-motion: reduce) {
2783
+ .ow-meter__fill {
2784
+ transition: none;
2785
+ }
2786
+ }
2787
+
2306
2788
  /* components/Tooltip/Tooltip.css */
2307
2789
  /* 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). */
2308
2790
  .ow-tooltip {
@@ -2907,6 +3389,13 @@
2907
3389
  cursor: not-allowed;
2908
3390
  }
2909
3391
 
3392
+ /* Holds a missing button's place, so a month's name stays centred (RangeCalendar's months side by side). */
3393
+ .ow-calendar__nav-space {
3394
+ width: 32px;
3395
+ height: 32px;
3396
+ flex-shrink: 0;
3397
+ }
3398
+
2910
3399
  .ow-calendar__grid {
2911
3400
  border-collapse: separate;
2912
3401
  border-spacing: 2px;
@@ -3040,6 +3529,200 @@
3040
3529
  padding: var(--ow-space-md);
3041
3530
  }
3042
3531
 
3532
+ /* components/Calendar/RangeCalendar.css */
3533
+ /* RangeCalendar: Calendar's month grid, with the range's ends as solid caps and a primary-subtle band between them. */
3534
+ .ow-range-calendar {
3535
+ display: inline-flex;
3536
+ max-width: 100%;
3537
+ flex-wrap: wrap;
3538
+ align-items: flex-start;
3539
+ gap: var(--ow-space-2xl) var(--ow-space-4xl);
3540
+ color: var(--ow-text);
3541
+ font-family: var(--ow-font-sans);
3542
+ }
3543
+
3544
+ .ow-range-calendar .ow-calendar__cell {
3545
+ position: relative;
3546
+ }
3547
+
3548
+ /* The band sits behind the day buttons and reaches 1px into the 2px gaps either side, so the days join up. */
3549
+ .ow-range-calendar__cell--in-range::before {
3550
+ content: "";
3551
+ position: absolute;
3552
+ top: 0;
3553
+ right: -1px;
3554
+ bottom: 0;
3555
+ left: -1px;
3556
+ background: var(--ow-primary-subtle);
3557
+ }
3558
+
3559
+ /* It rounds off at the ends of each week, and side by side at the ends of each month. */
3560
+ .ow-range-calendar__cell--row-start::before {
3561
+ left: 0;
3562
+ border-top-left-radius: var(--ow-radius-form);
3563
+ border-bottom-left-radius: var(--ow-radius-form);
3564
+ }
3565
+
3566
+ .ow-range-calendar__cell--row-end::before {
3567
+ right: 0;
3568
+ border-top-right-radius: var(--ow-radius-form);
3569
+ border-bottom-right-radius: var(--ow-radius-form);
3570
+ }
3571
+
3572
+ /* At the caps it starts and stops halfway, so it fills in behind their inner corners. */
3573
+ .ow-range-calendar__cell--start::before {
3574
+ left: 50%;
3575
+ }
3576
+
3577
+ .ow-range-calendar__cell--end::before {
3578
+ right: 50%;
3579
+ }
3580
+
3581
+ .ow-range-calendar__day--in-range:not(.ow-calendar__day--disabled):hover {
3582
+ border-color: var(--ow-primary-border);
3583
+ background: var(--ow-primary-soft);
3584
+ }
3585
+
3586
+ /* components/Calendar/DateRangePicker.css */
3587
+ /* DateRangePicker: Select's trigger with a calendar icon and a clear button, opening a RangeCalendar and presets. */
3588
+ .ow-date-range-picker {
3589
+ position: relative;
3590
+ display: inline-flex;
3591
+ min-width: 0;
3592
+ vertical-align: middle;
3593
+ }
3594
+
3595
+ .ow-date-range-picker--md {
3596
+ min-width: 240px;
3597
+ }
3598
+
3599
+ .ow-date-range-picker--sm {
3600
+ min-width: 210px;
3601
+ }
3602
+
3603
+ .ow-date-range-picker__trigger {
3604
+ width: 100%;
3605
+ }
3606
+
3607
+ .ow-date-range-picker__icon {
3608
+ flex-shrink: 0;
3609
+ color: var(--ow-text-muted);
3610
+ }
3611
+
3612
+ /* The clear button sits over the trigger's right end (a button can't hold another), which leaves it room. */
3613
+ .ow-date-range-picker--clearable.ow-date-range-picker--md .ow-date-range-picker__trigger {
3614
+ padding-right: 38px;
3615
+ }
3616
+
3617
+ .ow-date-range-picker--clearable.ow-date-range-picker--sm .ow-date-range-picker__trigger {
3618
+ padding-right: 30px;
3619
+ }
3620
+
3621
+ .ow-date-range-picker__clear {
3622
+ position: absolute;
3623
+ top: 50%;
3624
+ right: var(--ow-space-sm);
3625
+ transform: translateY(-50%);
3626
+ }
3627
+
3628
+ .ow-date-range-picker--sm .ow-date-range-picker__clear {
3629
+ right: var(--ow-space-2xs);
3630
+ }
3631
+
3632
+ /* Hovering the clear button still shows the field's hover edge. */
3633
+ .ow-date-range-picker:hover .ow-date-range-picker__trigger:not(:disabled):not(.ow-select--open):not(.ow-select--invalid):not(:focus-visible) {
3634
+ border-color: var(--ow-border-hover);
3635
+ }
3636
+
3637
+ .ow-date-range-picker__panel {
3638
+ display: flex;
3639
+ width: auto;
3640
+ max-width: calc(100vw - 16px);
3641
+ align-items: flex-start;
3642
+ gap: var(--ow-space-lg);
3643
+ padding: var(--ow-space-md);
3644
+ }
3645
+
3646
+ .ow-date-range-picker__presets {
3647
+ display: grid;
3648
+ width: 148px;
3649
+ flex-shrink: 0;
3650
+ align-self: stretch;
3651
+ align-content: start;
3652
+ gap: var(--ow-space-2xs);
3653
+ border-right: 1px solid var(--ow-border);
3654
+ padding-right: var(--ow-space-md);
3655
+ }
3656
+
3657
+ .ow-date-range-picker__preset {
3658
+ display: flex;
3659
+ min-height: 32px;
3660
+ align-items: center;
3661
+ gap: var(--ow-space-sm);
3662
+ margin: 0;
3663
+ border: 0;
3664
+ border-radius: var(--ow-radius-lg);
3665
+ background: transparent;
3666
+ padding: var(--ow-space-xs) var(--ow-space-sm);
3667
+ color: var(--ow-text);
3668
+ font: inherit;
3669
+ font-size: 14px;
3670
+ font-weight: var(--ow-weight-control);
3671
+ line-height: 1.1;
3672
+ text-align: left;
3673
+ cursor: pointer;
3674
+ transition-property: color, background-color;
3675
+ transition-duration: var(--ow-duration-base);
3676
+ transition-timing-function: var(--ow-ease-standard);
3677
+ }
3678
+
3679
+ .ow-date-range-picker__preset:hover {
3680
+ background: var(--ow-hover);
3681
+ }
3682
+
3683
+ .ow-date-range-picker__preset:focus-visible {
3684
+ outline: 2px solid var(--ow-focus-ring);
3685
+ outline-offset: -2px;
3686
+ }
3687
+
3688
+ .ow-date-range-picker__preset--current,
3689
+ .ow-date-range-picker__preset--current:hover {
3690
+ background: var(--ow-primary-subtle);
3691
+ color: var(--ow-primary-text);
3692
+ font-weight: var(--ow-weight-emphasis);
3693
+ }
3694
+
3695
+ .ow-date-range-picker__preset-label {
3696
+ min-width: 0;
3697
+ flex: 1;
3698
+ }
3699
+
3700
+ .ow-date-range-picker__preset-check {
3701
+ flex-shrink: 0;
3702
+ }
3703
+
3704
+ /* On a phone the presets wrap in rows above the month, no wider than it. */
3705
+ @media (max-width: 479px) {
3706
+ .ow-date-range-picker__panel {
3707
+ width: min-content;
3708
+ flex-direction: column;
3709
+ align-items: stretch;
3710
+ }
3711
+
3712
+ .ow-date-range-picker__presets {
3713
+ display: flex;
3714
+ width: auto;
3715
+ flex-wrap: wrap;
3716
+ border-right: 0;
3717
+ border-bottom: 1px solid var(--ow-border);
3718
+ padding: 0 0 var(--ow-space-md);
3719
+ }
3720
+
3721
+ .ow-date-range-picker__preset {
3722
+ border: 1px solid var(--ow-border);
3723
+ }
3724
+ }
3725
+
3043
3726
  /* components/ColorPicker/ColorPicker.css */
3044
3727
  /* ColorPicker: react-colorful's saturation area and hue slider in Openware's look, with a hex field,
3045
3728
  an eyedropper and swatches. react-colorful injects its own styles after this sheet, so these
@@ -3238,6 +3921,318 @@
3238
3921
  padding: var(--ow-space-lg);
3239
3922
  }
3240
3923
 
3924
+ /* components/ColorPicker/ColorArea.css */
3925
+ /* ColorArea: one hue's square, white to the hue across and down to black, in ColorPicker's look (its corners,
3926
+ hairline and thumb), so the two can sit side by side. */
3927
+ .ow-color-area {
3928
+ --ow-color-area-direction: to right;
3929
+ position: relative;
3930
+ width: var(--ow-color-area-width, 232px);
3931
+ max-width: 100%;
3932
+ height: var(--ow-color-area-height, 152px);
3933
+ flex-shrink: 0;
3934
+ border-radius: var(--ow-radius-form);
3935
+ background: linear-gradient(to top, #000000, transparent), linear-gradient(var(--ow-color-area-direction), #ffffff, var(--ow-color-area-hue));
3936
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
3937
+ cursor: pointer;
3938
+ touch-action: none;
3939
+ user-select: none;
3940
+ -webkit-tap-highlight-color: transparent;
3941
+ }
3942
+
3943
+ .ow-color-area:dir(rtl) {
3944
+ --ow-color-area-direction: to left;
3945
+ }
3946
+
3947
+ .ow-color-area__thumb {
3948
+ position: absolute;
3949
+ top: var(--ow-color-area-y);
3950
+ inset-inline-start: var(--ow-color-area-x);
3951
+ width: 18px;
3952
+ height: 18px;
3953
+ border: 2px solid #ffffff;
3954
+ border-radius: 50%;
3955
+ background: var(--ow-color-area-color);
3956
+ box-shadow:
3957
+ 0 0 0 1px rgba(15, 23, 42, 0.18),
3958
+ 0 2px 6px rgba(15, 23, 42, 0.28);
3959
+ pointer-events: none;
3960
+ translate: -50% -50%;
3961
+ transition: scale var(--ow-duration-fast) var(--ow-ease-standard);
3962
+ }
3963
+
3964
+ .ow-color-area:dir(rtl) .ow-color-area__thumb {
3965
+ translate: 50% -50%;
3966
+ }
3967
+
3968
+ .ow-color-area--dragging .ow-color-area__thumb {
3969
+ scale: 1.15;
3970
+ }
3971
+
3972
+ /* Focused by a press, it shows no ring until a key is used (useDrag's pointerFocus). */
3973
+ .ow-color-area:not(.ow-color-area--pointer) .ow-color-area__thumb:has(:focus-visible) {
3974
+ outline: 2px solid var(--ow-focus-ring);
3975
+ outline-offset: 2px;
3976
+ }
3977
+
3978
+ .ow-color-area--disabled {
3979
+ cursor: not-allowed;
3980
+ opacity: 0.55;
3981
+ }
3982
+
3983
+ @media (prefers-reduced-motion: reduce) {
3984
+ .ow-color-area__thumb {
3985
+ transition: none;
3986
+ }
3987
+ }
3988
+
3989
+ /* components/ColorPicker/ColorSlider.css */
3990
+ /* ColorSlider: a 12px pill track painted with the channel's range, and ColorPicker's thumb, which shows the colour.
3991
+ The input is visually hidden inside the thumb, so a screen reader's focus box sits where the thumb is. */
3992
+ .ow-color-slider {
3993
+ --ow-color-slider-direction: to right;
3994
+ display: grid;
3995
+ min-width: 0;
3996
+ gap: var(--ow-space-md);
3997
+ }
3998
+
3999
+ .ow-color-slider--horizontal:dir(rtl) {
4000
+ --ow-color-slider-direction: to left;
4001
+ }
4002
+
4003
+ .ow-color-slider--vertical {
4004
+ --ow-color-slider-direction: to top;
4005
+ display: inline-flex;
4006
+ height: 152px;
4007
+ flex-direction: column;
4008
+ align-items: center;
4009
+ }
4010
+
4011
+ .ow-color-slider__header {
4012
+ display: flex;
4013
+ align-items: baseline;
4014
+ justify-content: space-between;
4015
+ gap: var(--ow-space-md);
4016
+ }
4017
+
4018
+ .ow-color-slider--vertical .ow-color-slider__header {
4019
+ flex-direction: column;
4020
+ align-items: center;
4021
+ gap: 0;
4022
+ }
4023
+
4024
+ .ow-color-slider__label {
4025
+ color: var(--ow-text);
4026
+ font-size: 14px;
4027
+ font-weight: var(--ow-weight-emphasis);
4028
+ }
4029
+
4030
+ .ow-color-slider__value {
4031
+ color: var(--ow-text-muted);
4032
+ font-size: 13px;
4033
+ font-variant-numeric: tabular-nums;
4034
+ }
4035
+
4036
+ .ow-color-slider__track {
4037
+ position: relative;
4038
+ border-radius: var(--ow-radius-pill);
4039
+ background: var(--ow-color-slider-gradient);
4040
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
4041
+ cursor: pointer;
4042
+ touch-action: none;
4043
+ user-select: none;
4044
+ -webkit-tap-highlight-color: transparent;
4045
+ }
4046
+
4047
+ /* A taller target than the 12px track, the thumb's full height. */
4048
+ .ow-color-slider__track::before {
4049
+ position: absolute;
4050
+ content: "";
4051
+ }
4052
+
4053
+ .ow-color-slider--horizontal .ow-color-slider__track {
4054
+ height: 12px;
4055
+ }
4056
+
4057
+ .ow-color-slider--horizontal .ow-color-slider__track::before {
4058
+ inset: -4px 0;
4059
+ }
4060
+
4061
+ .ow-color-slider--vertical .ow-color-slider__track {
4062
+ width: 12px;
4063
+ min-height: 0;
4064
+ flex: 1;
4065
+ }
4066
+
4067
+ .ow-color-slider--vertical .ow-color-slider__track::before {
4068
+ inset: 0 -4px;
4069
+ }
4070
+
4071
+ .ow-color-slider--alpha .ow-color-slider__track {
4072
+ background:
4073
+ var(--ow-color-slider-gradient),
4074
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 12px 12px;
4075
+ }
4076
+
4077
+ .ow-color-slider__thumb {
4078
+ position: absolute;
4079
+ width: 16px;
4080
+ height: 16px;
4081
+ border: 2px solid #ffffff;
4082
+ border-radius: 50%;
4083
+ background:
4084
+ linear-gradient(var(--ow-color-slider-thumb), var(--ow-color-slider-thumb)),
4085
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 8px 8px;
4086
+ box-shadow:
4087
+ 0 0 0 1px rgba(15, 23, 42, 0.18),
4088
+ 0 2px 6px rgba(15, 23, 42, 0.28);
4089
+ pointer-events: none;
4090
+ transition: scale var(--ow-duration-fast) var(--ow-ease-standard);
4091
+ }
4092
+
4093
+ .ow-color-slider--horizontal .ow-color-slider__thumb {
4094
+ top: 50%;
4095
+ inset-inline-start: var(--ow-color-slider-position);
4096
+ translate: -50% -50%;
4097
+ }
4098
+
4099
+ .ow-color-slider--horizontal:dir(rtl) .ow-color-slider__thumb {
4100
+ translate: 50% -50%;
4101
+ }
4102
+
4103
+ .ow-color-slider--vertical .ow-color-slider__thumb {
4104
+ bottom: var(--ow-color-slider-position);
4105
+ left: 50%;
4106
+ translate: -50% 50%;
4107
+ }
4108
+
4109
+ .ow-color-slider--dragging .ow-color-slider__thumb {
4110
+ scale: 1.15;
4111
+ }
4112
+
4113
+ /* Focused by a press, it shows no ring until a key is used (useDrag's pointerFocus). */
4114
+ .ow-color-slider:not(.ow-color-slider--pointer) .ow-color-slider__thumb:has(:focus-visible) {
4115
+ outline: 2px solid var(--ow-focus-ring);
4116
+ outline-offset: 2px;
4117
+ }
4118
+
4119
+ .ow-color-slider--disabled {
4120
+ opacity: 0.55;
4121
+ }
4122
+
4123
+ .ow-color-slider--disabled .ow-color-slider__track {
4124
+ cursor: not-allowed;
4125
+ }
4126
+
4127
+ @media (prefers-reduced-motion: reduce) {
4128
+ .ow-color-slider__thumb {
4129
+ transition: none;
4130
+ }
4131
+ }
4132
+
4133
+ /* components/ColorPicker/ColorSwatchPicker.css */
4134
+ /* ColorSwatchPicker: swatches in wrapping rows, like ColorPicker's. The chosen one gets ColorPicker's ring (a gap in
4135
+ the surface colour, then a 2px ring in the text colour) and a check in white or slate, whichever reads on it.
4136
+ The focus outline lands exactly on the ring, so a focused swatch's ring turns the focus colour. */
4137
+ .ow-color-swatch-picker {
4138
+ display: flex;
4139
+ flex-wrap: wrap;
4140
+ align-items: center;
4141
+ gap: var(--ow-space-sm);
4142
+ }
4143
+
4144
+ .ow-color-swatch-picker--sm {
4145
+ gap: var(--ow-space-xs);
4146
+ }
4147
+
4148
+ .ow-color-swatch-picker__swatch {
4149
+ display: inline-flex;
4150
+ width: 32px;
4151
+ height: 32px;
4152
+ flex-shrink: 0;
4153
+ align-items: center;
4154
+ justify-content: center;
4155
+ border-radius: var(--ow-radius-form);
4156
+ background:
4157
+ linear-gradient(var(--ow-color-swatch-picker-value), var(--ow-color-swatch-picker-value)),
4158
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 8px 8px;
4159
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
4160
+ cursor: pointer;
4161
+ outline: none;
4162
+ -webkit-tap-highlight-color: transparent;
4163
+ transition:
4164
+ transform var(--ow-duration-base) var(--ow-ease-spring),
4165
+ box-shadow var(--ow-duration-base) var(--ow-ease-standard);
4166
+ }
4167
+
4168
+ .ow-color-swatch-picker--sm .ow-color-swatch-picker__swatch {
4169
+ width: 24px;
4170
+ height: 24px;
4171
+ border-radius: var(--ow-radius-md);
4172
+ }
4173
+
4174
+ .ow-color-swatch-picker--circle .ow-color-swatch-picker__swatch {
4175
+ border-radius: 50%;
4176
+ }
4177
+
4178
+ .ow-color-swatch-picker__swatch:hover:not([aria-disabled="true"]) {
4179
+ transform: scale(1.1);
4180
+ }
4181
+
4182
+ .ow-color-swatch-picker__swatch[aria-checked="true"] {
4183
+ box-shadow:
4184
+ inset 0 0 0 1px rgba(15, 23, 42, 0.14),
4185
+ 0 0 0 2px var(--ow-surface),
4186
+ 0 0 0 4px var(--ow-text);
4187
+ }
4188
+
4189
+ .ow-color-swatch-picker__swatch:focus-visible {
4190
+ outline: 2px solid var(--ow-focus-ring);
4191
+ outline-offset: 2px;
4192
+ }
4193
+
4194
+ .ow-color-swatch-picker__check {
4195
+ opacity: 0;
4196
+ scale: 0.5;
4197
+ transition:
4198
+ opacity var(--ow-duration-fast) var(--ow-ease-standard),
4199
+ scale var(--ow-duration-base) var(--ow-ease-spring);
4200
+ }
4201
+
4202
+ .ow-color-swatch-picker__swatch[data-ink="light"] .ow-color-swatch-picker__check {
4203
+ color: #ffffff;
4204
+ }
4205
+
4206
+ .ow-color-swatch-picker__swatch[data-ink="dark"] .ow-color-swatch-picker__check {
4207
+ color: var(--ow-gray-900);
4208
+ }
4209
+
4210
+ .ow-color-swatch-picker__swatch[aria-checked="true"] .ow-color-swatch-picker__check {
4211
+ opacity: 1;
4212
+ scale: 1;
4213
+ }
4214
+
4215
+ .ow-color-swatch-picker__swatch[aria-disabled="true"] {
4216
+ cursor: not-allowed;
4217
+ opacity: 0.4;
4218
+ }
4219
+
4220
+ .ow-color-swatch-picker--disabled {
4221
+ opacity: 0.55;
4222
+ }
4223
+
4224
+ /* The group fades as a whole; its swatches don't fade again. */
4225
+ .ow-color-swatch-picker--disabled .ow-color-swatch-picker__swatch[aria-disabled="true"] {
4226
+ opacity: 1;
4227
+ }
4228
+
4229
+ @media (prefers-reduced-motion: reduce) {
4230
+ .ow-color-swatch-picker__swatch,
4231
+ .ow-color-swatch-picker__check {
4232
+ transition: none;
4233
+ }
4234
+ }
4235
+
3241
4236
  /* components/CommandPalette/CommandPalette.css */
3242
4237
  /* CommandPalette: a dialog 12vh from the top, 560px wide, with a search row and a results list. */
3243
4238
  .ow-palette {