@openwarelabs/ui 0.3.0 → 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 +9 -8
  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 -1261
  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 -1191
  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
package/dist/styles.css CHANGED
@@ -744,9 +744,8 @@
744
744
  padding: 0;
745
745
  }
746
746
  .ow-button--icon-only.ow-button--sm {
747
- width: 28px;
748
- height: 28px;
749
- min-height: 28px;
747
+ width: 32px;
748
+ height: 32px;
750
749
  }
751
750
  .ow-button--icon-only.ow-button--md {
752
751
  width: 40px;
@@ -954,29 +953,38 @@
954
953
  flex-wrap: nowrap;
955
954
  gap: 0;
956
955
  }
957
- .ow-button-group--attached > .ow-button {
956
+ /* A button joins its neighbours whether it's a direct child or wrapped one level down, by a Tooltip or a Menu's trigger. */
957
+ .ow-button-group--attached > .ow-button,
958
+ .ow-button-group--attached > * > .ow-button {
958
959
  position: relative;
959
960
  }
960
961
  .ow-button-group--attached > .ow-button:hover,
961
962
  .ow-button-group--attached > .ow-button:focus-visible,
962
- .ow-button-group--attached > .ow-button--pressed {
963
+ .ow-button-group--attached > .ow-button--pressed,
964
+ .ow-button-group--attached > * > .ow-button:hover,
965
+ .ow-button-group--attached > * > .ow-button:focus-visible,
966
+ .ow-button-group--attached > * > .ow-button--pressed {
963
967
  z-index: 1;
964
968
  }
965
- .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:first-child) {
969
+ .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:first-child),
970
+ .ow-button-group--attached:not(.ow-button-group--vertical) > :not(:first-child) > .ow-button {
966
971
  margin-left: -1px;
967
972
  border-top-left-radius: 0;
968
973
  border-bottom-left-radius: 0;
969
974
  }
970
- .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:last-child) {
975
+ .ow-button-group--attached:not(.ow-button-group--vertical) > .ow-button:not(:last-child),
976
+ .ow-button-group--attached:not(.ow-button-group--vertical) > :not(:last-child) > .ow-button {
971
977
  border-top-right-radius: 0;
972
978
  border-bottom-right-radius: 0;
973
979
  }
974
- .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:first-child) {
980
+ .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:first-child),
981
+ .ow-button-group--attached.ow-button-group--vertical > :not(:first-child) > .ow-button {
975
982
  margin-top: -1px;
976
983
  border-top-left-radius: 0;
977
984
  border-top-right-radius: 0;
978
985
  }
979
- .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:last-child) {
986
+ .ow-button-group--attached.ow-button-group--vertical > .ow-button:not(:last-child),
987
+ .ow-button-group--attached.ow-button-group--vertical > :not(:last-child) > .ow-button {
980
988
  border-bottom-left-radius: 0;
981
989
  border-bottom-right-radius: 0;
982
990
  }
@@ -1020,6 +1028,139 @@
1020
1028
  opacity: 0.5;
1021
1029
  }
1022
1030
 
1031
+ /* components/ToggleButtonGroup/ToggleButtonGroup.css */
1032
+ /* ToggleButtonGroup: toggles joined like an attached ButtonGroup, sharing borders, each pressed in while it's on.
1033
+ An item is the button itself, or the Tooltip around an icon-only one. */
1034
+ .ow-toggle-group {
1035
+ display: inline-flex;
1036
+ flex-wrap: nowrap;
1037
+ align-items: stretch;
1038
+ vertical-align: middle;
1039
+ }
1040
+
1041
+ .ow-toggle-group--vertical {
1042
+ flex-direction: column;
1043
+ }
1044
+
1045
+ .ow-toggle-group > * {
1046
+ position: relative;
1047
+ }
1048
+
1049
+ .ow-toggle-group > .ow-tooltip > .ow-button {
1050
+ flex: 1;
1051
+ }
1052
+
1053
+ /* Hovered and pressed buttons sit above their neighbours so their whole border shows; a focused one above all,
1054
+ so nothing covers its ring. */
1055
+ .ow-toggle-group > :hover,
1056
+ .ow-toggle-group > .ow-button--pressed,
1057
+ .ow-toggle-group > :has(> .ow-button--pressed) {
1058
+ z-index: 1;
1059
+ }
1060
+
1061
+ .ow-toggle-group > :focus-visible,
1062
+ .ow-toggle-group > :has(> :focus-visible) {
1063
+ z-index: 2;
1064
+ }
1065
+
1066
+ /* Shared borders: each item overlaps the one before by a border's width, and only the ends keep their corners. */
1067
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:first-child) {
1068
+ margin-inline-start: -1px;
1069
+ }
1070
+
1071
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > .ow-button:not(:first-child),
1072
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:first-child) > .ow-button {
1073
+ border-start-start-radius: 0;
1074
+ border-end-start-radius: 0;
1075
+ }
1076
+
1077
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > .ow-button:not(:last-child),
1078
+ .ow-toggle-group:not(.ow-toggle-group--vertical) > :not(:last-child) > .ow-button {
1079
+ border-start-end-radius: 0;
1080
+ border-end-end-radius: 0;
1081
+ }
1082
+
1083
+ .ow-toggle-group--vertical > :not(:first-child) {
1084
+ margin-block-start: -1px;
1085
+ }
1086
+
1087
+ .ow-toggle-group--vertical > .ow-button:not(:first-child),
1088
+ .ow-toggle-group--vertical > :not(:first-child) > .ow-button {
1089
+ border-start-start-radius: 0;
1090
+ border-start-end-radius: 0;
1091
+ }
1092
+
1093
+ .ow-toggle-group--vertical > .ow-button:not(:last-child),
1094
+ .ow-toggle-group--vertical > :not(:last-child) > .ow-button {
1095
+ border-end-start-radius: 0;
1096
+ border-end-end-radius: 0;
1097
+ }
1098
+
1099
+ /* An icon-only option among labelled ones matches their height. */
1100
+ .ow-toggle-group--sm:not(.ow-toggle-group--icon-only) .ow-button--icon-only {
1101
+ width: 32px;
1102
+ height: 32px;
1103
+ min-height: 32px;
1104
+ }
1105
+
1106
+ /* components/Toolbar/Toolbar.css */
1107
+ /* Toolbar: a row (or column) of controls for one context, raised on its own surface or plain. */
1108
+ .ow-toolbar {
1109
+ display: flex;
1110
+ flex-wrap: wrap;
1111
+ align-items: center;
1112
+ gap: var(--ow-space-xs);
1113
+ min-width: 0;
1114
+ }
1115
+
1116
+ .ow-toolbar--sm {
1117
+ gap: var(--ow-space-2xs);
1118
+ }
1119
+
1120
+ .ow-toolbar--raised {
1121
+ border: 1px solid var(--ow-border);
1122
+ border-radius: var(--ow-radius-container);
1123
+ background: var(--ow-surface);
1124
+ padding: var(--ow-space-xs);
1125
+ box-shadow: var(--ow-shadow-control);
1126
+ }
1127
+
1128
+ /* 4px inside a 12px corner keeps the buttons' 8px corners concentric with the bar's. */
1129
+ .ow-toolbar--raised.ow-toolbar--sm {
1130
+ padding: var(--ow-space-2xs);
1131
+ }
1132
+
1133
+ .ow-toolbar--vertical {
1134
+ display: inline-flex;
1135
+ flex-direction: column;
1136
+ flex-wrap: nowrap;
1137
+ align-items: stretch;
1138
+ }
1139
+
1140
+ /* The separator stops short of the bar's edges, so it divides groups without boxing them in. */
1141
+ .ow-toolbar__separator {
1142
+ flex-shrink: 0;
1143
+ align-self: center;
1144
+ width: 1px;
1145
+ height: 20px;
1146
+ margin: 0 var(--ow-space-2xs);
1147
+ background: var(--ow-border);
1148
+ }
1149
+
1150
+ .ow-toolbar--sm .ow-toolbar__separator {
1151
+ height: 16px;
1152
+ }
1153
+
1154
+ .ow-toolbar--vertical .ow-toolbar__separator {
1155
+ width: 20px;
1156
+ height: 1px;
1157
+ margin: var(--ow-space-2xs) 0;
1158
+ }
1159
+
1160
+ .ow-toolbar--vertical.ow-toolbar--sm .ow-toolbar__separator {
1161
+ width: 16px;
1162
+ }
1163
+
1023
1164
  /* components/SegmentedControl/SegmentedControl.css */
1024
1165
  /* SegmentedControl and segmented Tabs: a well with the chosen segment raised. */
1025
1166
  .ow-segmented,
@@ -1425,6 +1566,153 @@
1425
1566
  white-space: nowrap;
1426
1567
  }
1427
1568
 
1569
+ /* components/DateField/DateField.css */
1570
+ /* DateField and TimeField: typed segments in a field drawn like Input. The whole field shows focus while a segment
1571
+ has it; the focused segment is tinted. */
1572
+ .ow-date-field {
1573
+ display: flex;
1574
+ width: 100%;
1575
+ /* Shrink in a narrow grid or flex column instead of pushing past it. */
1576
+ min-width: 0;
1577
+ height: 40px;
1578
+ align-items: center;
1579
+ gap: var(--ow-space-xs);
1580
+ border: 1px solid var(--ow-border-strong);
1581
+ border-radius: var(--ow-radius-form);
1582
+ background: var(--ow-surface);
1583
+ /* With the segments' own 2px, the digits start where Input's text does. */
1584
+ padding: 0 var(--ow-space-md);
1585
+ color: var(--ow-text);
1586
+ font-size: 14px;
1587
+ font-weight: var(--ow-weight-regular);
1588
+ line-height: 1.45;
1589
+ font-variant-numeric: tabular-nums;
1590
+ cursor: text;
1591
+ transition-property: border-color, background-color, box-shadow, opacity;
1592
+ transition-duration: var(--ow-duration-base);
1593
+ transition-timing-function: var(--ow-ease-standard);
1594
+ }
1595
+
1596
+ .ow-date-field--sm {
1597
+ height: 32px;
1598
+ gap: var(--ow-space-2xs);
1599
+ padding: 0 var(--ow-space-sm);
1600
+ font-size: 13px;
1601
+ }
1602
+
1603
+ .ow-date-field--with-start {
1604
+ padding-left: var(--ow-space-lg);
1605
+ }
1606
+
1607
+ .ow-date-field--sm.ow-date-field--with-start {
1608
+ padding-left: var(--ow-space-md);
1609
+ }
1610
+
1611
+ .ow-date-field:focus-within {
1612
+ border-color: var(--ow-focus-border);
1613
+ box-shadow: var(--ow-shadow-focus);
1614
+ }
1615
+
1616
+ .ow-date-field:has(.ow-date-field__segment:focus-visible) {
1617
+ outline: 2px solid var(--ow-focus-ring);
1618
+ outline-offset: 2px;
1619
+ }
1620
+
1621
+ .ow-date-field--invalid {
1622
+ border-color: var(--ow-danger-line);
1623
+ }
1624
+
1625
+ .ow-date-field--invalid:focus-within {
1626
+ border-color: var(--ow-danger-solid);
1627
+ box-shadow: var(--ow-shadow-focus-danger);
1628
+ }
1629
+
1630
+ .ow-date-field--readonly {
1631
+ cursor: default;
1632
+ }
1633
+
1634
+ .ow-date-field--disabled {
1635
+ cursor: not-allowed;
1636
+ opacity: 0.62;
1637
+ }
1638
+
1639
+ .ow-date-field__addon {
1640
+ display: inline-flex;
1641
+ flex-shrink: 0;
1642
+ align-items: center;
1643
+ color: var(--ow-text-muted);
1644
+ cursor: default;
1645
+ }
1646
+
1647
+ .ow-date-field__segments {
1648
+ display: flex;
1649
+ min-width: 0;
1650
+ align-items: center;
1651
+ white-space: pre;
1652
+ }
1653
+
1654
+ .ow-date-field__segment {
1655
+ flex-shrink: 0;
1656
+ border-radius: var(--ow-radius-sm);
1657
+ padding: 2px;
1658
+ color: var(--ow-text);
1659
+ text-align: center;
1660
+ caret-color: transparent;
1661
+ outline: 0;
1662
+ transition-property: color, background-color, box-shadow;
1663
+ transition-duration: var(--ow-duration-fast);
1664
+ transition-timing-function: var(--ow-ease-standard);
1665
+ }
1666
+
1667
+ .ow-date-field__segment::selection {
1668
+ background: transparent;
1669
+ }
1670
+
1671
+ /* Tabular digits are 1ch wide, so a segment keeps its width while a value is half typed ("1" on the way to "12").
1672
+ Placeholders keep their own width, so the letters sit evenly. */
1673
+ .ow-date-field__segment--digits-2:not(.ow-date-field__segment--placeholder) {
1674
+ min-width: calc(2ch + 4px);
1675
+ }
1676
+
1677
+ .ow-date-field__segment--digits-4:not(.ow-date-field__segment--placeholder) {
1678
+ min-width: calc(4ch + 4px);
1679
+ }
1680
+
1681
+ .ow-date-field__segment--placeholder {
1682
+ color: var(--ow-text-muted);
1683
+ }
1684
+
1685
+ /* The tint and edge of selected things, as on Pagination's current page. */
1686
+ .ow-date-field__segment:focus {
1687
+ background: var(--ow-primary-subtle);
1688
+ box-shadow: inset 0 0 0 1px var(--ow-primary-border);
1689
+ color: var(--ow-primary-text);
1690
+ }
1691
+
1692
+ .ow-date-field__segment--placeholder:focus {
1693
+ color: var(--ow-text-muted);
1694
+ }
1695
+
1696
+ .ow-date-field--disabled .ow-date-field__segment {
1697
+ cursor: not-allowed;
1698
+ }
1699
+
1700
+ .ow-date-field--readonly .ow-date-field__segment {
1701
+ cursor: default;
1702
+ }
1703
+
1704
+ .ow-date-field__literal {
1705
+ color: var(--ow-text-muted);
1706
+ user-select: none;
1707
+ }
1708
+
1709
+ @media (prefers-reduced-motion: reduce) {
1710
+ .ow-date-field,
1711
+ .ow-date-field__segment {
1712
+ transition: none;
1713
+ }
1714
+ }
1715
+
1428
1716
  /* components/Textarea/Textarea.css */
1429
1717
  /* Textarea: the field look from Input.css, taller and resizable. */
1430
1718
  .ow-textarea {
@@ -1638,6 +1926,87 @@
1638
1926
  font-weight: var(--ow-weight-control);
1639
1927
  }
1640
1928
 
1929
+ /* components/ListBox/ListBox.css */
1930
+ /* ListBox: Select's list on the page. It wears Select.css's .ow-listbox and .ow-option (rows, checkmarks, group
1931
+ labels, sizes), so the two stay in step; this file only undoes the floating and adds the field states. */
1932
+ .ow-listbox.ow-listbox--standalone {
1933
+ position: relative;
1934
+ z-index: auto;
1935
+ min-width: 0;
1936
+ box-shadow: none;
1937
+ overscroll-behavior: auto;
1938
+ outline: 0;
1939
+ transition-property: border-color, box-shadow, opacity;
1940
+ transition-duration: var(--ow-duration-base);
1941
+ transition-timing-function: var(--ow-ease-standard);
1942
+ }
1943
+
1944
+ .ow-listbox--standalone .ow-option {
1945
+ user-select: none;
1946
+ transition: background-color var(--ow-duration-fast) var(--ow-ease-standard);
1947
+ }
1948
+
1949
+ /* In a floating list the pointer moves the highlight; here hover is its own state, apart from the keyboard's. */
1950
+ .ow-listbox--standalone:not(.ow-listbox--disabled, .ow-listbox--readonly) .ow-option:not(.ow-option--disabled):hover {
1951
+ background: var(--ow-hover);
1952
+ }
1953
+
1954
+ .ow-listbox--readonly .ow-option {
1955
+ cursor: default;
1956
+ }
1957
+
1958
+ .ow-listbox--standalone.ow-listbox--focus-visible {
1959
+ border-color: var(--ow-focus-border);
1960
+ box-shadow: var(--ow-shadow-focus);
1961
+ }
1962
+
1963
+ .ow-listbox--standalone.ow-listbox--invalid {
1964
+ border-color: var(--ow-danger-line);
1965
+ }
1966
+
1967
+ .ow-listbox--standalone.ow-listbox--invalid.ow-listbox--focus-visible {
1968
+ border-color: var(--ow-danger-solid);
1969
+ box-shadow: var(--ow-shadow-focus-danger);
1970
+ }
1971
+
1972
+ .ow-listbox--standalone.ow-listbox--disabled {
1973
+ cursor: not-allowed;
1974
+ opacity: 0.62;
1975
+ }
1976
+
1977
+ .ow-listbox--disabled .ow-option {
1978
+ cursor: not-allowed;
1979
+ }
1980
+
1981
+ /* An empty list is one option row tall. */
1982
+ .ow-listbox--standalone .ow-listbox__empty {
1983
+ padding: var(--ow-space-md);
1984
+ font-size: 14px;
1985
+ line-height: 16px;
1986
+ }
1987
+
1988
+ .ow-listbox--standalone.ow-listbox--sm .ow-listbox__empty {
1989
+ padding-block: var(--ow-space-sm);
1990
+ font-size: 12px;
1991
+ }
1992
+
1993
+ .ow-option__icon {
1994
+ display: flex;
1995
+ width: 16px;
1996
+ height: 16px;
1997
+ flex-shrink: 0;
1998
+ align-items: center;
1999
+ justify-content: center;
2000
+ color: var(--ow-text-muted);
2001
+ }
2002
+
2003
+ @media (prefers-reduced-motion: reduce) {
2004
+ .ow-listbox.ow-listbox--standalone,
2005
+ .ow-listbox--standalone .ow-option {
2006
+ transition: none;
2007
+ }
2008
+ }
2009
+
1641
2010
  /* components/Combobox/Combobox.css */
1642
2011
  /* Combobox: a grouped field (Input.css) with a chevron, over Select's listbox. */
1643
2012
  .ow-combobox {
@@ -2444,9 +2813,32 @@
2444
2813
  line-height: 1.4;
2445
2814
  }
2446
2815
 
2447
- /* components/Badge/Badge.css */
2448
- /* Badge (the app's Pill): status in a bordered pill. */
2449
- .ow-badge {
2816
+ /* A checkbox in a Field with an error (the terms, say) takes the invalid field's border until it's ticked. */
2817
+ .ow-field .ow-checkbox__input[aria-invalid="true"]:not(:checked, :disabled) {
2818
+ border-color: var(--ow-danger-line);
2819
+ }
2820
+
2821
+ /* components/Form/Form.css */
2822
+ /* Form: its rows sit ow-space-xl apart, as the README asks. */
2823
+ .ow-form {
2824
+ display: grid;
2825
+ grid-template-columns: minmax(0, 1fr);
2826
+ align-content: start;
2827
+ gap: var(--ow-space-xl);
2828
+ }
2829
+
2830
+ /* A button on a row of its own keeps its width, unless it's fullWidth. */
2831
+ .ow-form > .ow-button {
2832
+ justify-self: start;
2833
+ }
2834
+
2835
+ .ow-form > .ow-button--full {
2836
+ justify-self: stretch;
2837
+ }
2838
+
2839
+ /* components/Badge/Badge.css */
2840
+ /* Badge (the app's Pill): status in a bordered pill. */
2841
+ .ow-badge {
2450
2842
  display: inline-flex;
2451
2843
  width: fit-content;
2452
2844
  align-items: center;
@@ -2734,6 +3126,96 @@
2734
3126
  }
2735
3127
  }
2736
3128
 
3129
+ /* components/Meter/Meter.css */
3130
+ /* Meter: ProgressBar's header and track (Progress.css), for an amount within a range. Tones swap in a status colour. */
3131
+ .ow-meter {
3132
+ display: grid;
3133
+ min-width: 0;
3134
+ gap: var(--ow-space-sm);
3135
+ }
3136
+
3137
+ .ow-meter--primary {
3138
+ --ow-meter-fill: var(--ow-progress);
3139
+ }
3140
+
3141
+ /* Status fills use the status text colours, which keep 3:1 against the track in both themes. */
3142
+ .ow-meter--success {
3143
+ --ow-meter-fill: var(--ow-success-text);
3144
+ }
3145
+
3146
+ .ow-meter--warning {
3147
+ --ow-meter-fill: var(--ow-warning-text);
3148
+ }
3149
+
3150
+ .ow-meter--danger {
3151
+ --ow-meter-fill: var(--ow-danger-text);
3152
+ }
3153
+
3154
+ .ow-meter__header {
3155
+ display: flex;
3156
+ align-items: baseline;
3157
+ justify-content: space-between;
3158
+ gap: var(--ow-space-md);
3159
+ }
3160
+
3161
+ .ow-meter__label {
3162
+ min-width: 0;
3163
+ color: var(--ow-text);
3164
+ font-size: 14px;
3165
+ font-weight: var(--ow-weight-emphasis);
3166
+ }
3167
+
3168
+ .ow-meter__value {
3169
+ flex-shrink: 0;
3170
+ color: var(--ow-text-muted);
3171
+ font-size: 13px;
3172
+ font-variant-numeric: tabular-nums;
3173
+ }
3174
+
3175
+ .ow-meter__track {
3176
+ display: flex;
3177
+ height: 4px;
3178
+ overflow: hidden;
3179
+ border-radius: var(--ow-radius-pill);
3180
+ background: var(--ow-meter-track);
3181
+ }
3182
+
3183
+ .ow-meter--md .ow-meter__track {
3184
+ height: 8px;
3185
+ }
3186
+
3187
+ .ow-meter__fill {
3188
+ display: block;
3189
+ height: 100%;
3190
+ border-radius: inherit;
3191
+ background: var(--ow-meter-fill);
3192
+ transition:
3193
+ width var(--ow-duration-slow) var(--ow-ease-standard),
3194
+ background-color var(--ow-duration-base) var(--ow-ease-standard);
3195
+ }
3196
+
3197
+ /* Segments: the track splits into blocks, each with its own track and a share of the fill. */
3198
+ .ow-meter__track--segmented {
3199
+ gap: var(--ow-space-2xs);
3200
+ overflow: visible;
3201
+ border-radius: 0;
3202
+ background: none;
3203
+ }
3204
+
3205
+ .ow-meter__segment {
3206
+ min-width: 0;
3207
+ flex: 1;
3208
+ overflow: hidden;
3209
+ border-radius: var(--ow-radius-pill);
3210
+ background: var(--ow-meter-track);
3211
+ }
3212
+
3213
+ @media (prefers-reduced-motion: reduce) {
3214
+ .ow-meter__fill {
3215
+ transition: none;
3216
+ }
3217
+ }
3218
+
2737
3219
  /* components/Tooltip/Tooltip.css */
2738
3220
  /* 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). */
2739
3221
  .ow-tooltip {
@@ -3338,6 +3820,13 @@
3338
3820
  cursor: not-allowed;
3339
3821
  }
3340
3822
 
3823
+ /* Holds a missing button's place, so a month's name stays centred (RangeCalendar's months side by side). */
3824
+ .ow-calendar__nav-space {
3825
+ width: 32px;
3826
+ height: 32px;
3827
+ flex-shrink: 0;
3828
+ }
3829
+
3341
3830
  .ow-calendar__grid {
3342
3831
  border-collapse: separate;
3343
3832
  border-spacing: 2px;
@@ -3471,6 +3960,200 @@
3471
3960
  padding: var(--ow-space-md);
3472
3961
  }
3473
3962
 
3963
+ /* components/Calendar/RangeCalendar.css */
3964
+ /* RangeCalendar: Calendar's month grid, with the range's ends as solid caps and a primary-subtle band between them. */
3965
+ .ow-range-calendar {
3966
+ display: inline-flex;
3967
+ max-width: 100%;
3968
+ flex-wrap: wrap;
3969
+ align-items: flex-start;
3970
+ gap: var(--ow-space-2xl) var(--ow-space-4xl);
3971
+ color: var(--ow-text);
3972
+ font-family: var(--ow-font-sans);
3973
+ }
3974
+
3975
+ .ow-range-calendar .ow-calendar__cell {
3976
+ position: relative;
3977
+ }
3978
+
3979
+ /* The band sits behind the day buttons and reaches 1px into the 2px gaps either side, so the days join up. */
3980
+ .ow-range-calendar__cell--in-range::before {
3981
+ content: "";
3982
+ position: absolute;
3983
+ top: 0;
3984
+ right: -1px;
3985
+ bottom: 0;
3986
+ left: -1px;
3987
+ background: var(--ow-primary-subtle);
3988
+ }
3989
+
3990
+ /* It rounds off at the ends of each week, and side by side at the ends of each month. */
3991
+ .ow-range-calendar__cell--row-start::before {
3992
+ left: 0;
3993
+ border-top-left-radius: var(--ow-radius-form);
3994
+ border-bottom-left-radius: var(--ow-radius-form);
3995
+ }
3996
+
3997
+ .ow-range-calendar__cell--row-end::before {
3998
+ right: 0;
3999
+ border-top-right-radius: var(--ow-radius-form);
4000
+ border-bottom-right-radius: var(--ow-radius-form);
4001
+ }
4002
+
4003
+ /* At the caps it starts and stops halfway, so it fills in behind their inner corners. */
4004
+ .ow-range-calendar__cell--start::before {
4005
+ left: 50%;
4006
+ }
4007
+
4008
+ .ow-range-calendar__cell--end::before {
4009
+ right: 50%;
4010
+ }
4011
+
4012
+ .ow-range-calendar__day--in-range:not(.ow-calendar__day--disabled):hover {
4013
+ border-color: var(--ow-primary-border);
4014
+ background: var(--ow-primary-soft);
4015
+ }
4016
+
4017
+ /* components/Calendar/DateRangePicker.css */
4018
+ /* DateRangePicker: Select's trigger with a calendar icon and a clear button, opening a RangeCalendar and presets. */
4019
+ .ow-date-range-picker {
4020
+ position: relative;
4021
+ display: inline-flex;
4022
+ min-width: 0;
4023
+ vertical-align: middle;
4024
+ }
4025
+
4026
+ .ow-date-range-picker--md {
4027
+ min-width: 240px;
4028
+ }
4029
+
4030
+ .ow-date-range-picker--sm {
4031
+ min-width: 210px;
4032
+ }
4033
+
4034
+ .ow-date-range-picker__trigger {
4035
+ width: 100%;
4036
+ }
4037
+
4038
+ .ow-date-range-picker__icon {
4039
+ flex-shrink: 0;
4040
+ color: var(--ow-text-muted);
4041
+ }
4042
+
4043
+ /* The clear button sits over the trigger's right end (a button can't hold another), which leaves it room. */
4044
+ .ow-date-range-picker--clearable.ow-date-range-picker--md .ow-date-range-picker__trigger {
4045
+ padding-right: 38px;
4046
+ }
4047
+
4048
+ .ow-date-range-picker--clearable.ow-date-range-picker--sm .ow-date-range-picker__trigger {
4049
+ padding-right: 30px;
4050
+ }
4051
+
4052
+ .ow-date-range-picker__clear {
4053
+ position: absolute;
4054
+ top: 50%;
4055
+ right: var(--ow-space-sm);
4056
+ transform: translateY(-50%);
4057
+ }
4058
+
4059
+ .ow-date-range-picker--sm .ow-date-range-picker__clear {
4060
+ right: var(--ow-space-2xs);
4061
+ }
4062
+
4063
+ /* Hovering the clear button still shows the field's hover edge. */
4064
+ .ow-date-range-picker:hover .ow-date-range-picker__trigger:not(:disabled):not(.ow-select--open):not(.ow-select--invalid):not(:focus-visible) {
4065
+ border-color: var(--ow-border-hover);
4066
+ }
4067
+
4068
+ .ow-date-range-picker__panel {
4069
+ display: flex;
4070
+ width: auto;
4071
+ max-width: calc(100vw - 16px);
4072
+ align-items: flex-start;
4073
+ gap: var(--ow-space-lg);
4074
+ padding: var(--ow-space-md);
4075
+ }
4076
+
4077
+ .ow-date-range-picker__presets {
4078
+ display: grid;
4079
+ width: 148px;
4080
+ flex-shrink: 0;
4081
+ align-self: stretch;
4082
+ align-content: start;
4083
+ gap: var(--ow-space-2xs);
4084
+ border-right: 1px solid var(--ow-border);
4085
+ padding-right: var(--ow-space-md);
4086
+ }
4087
+
4088
+ .ow-date-range-picker__preset {
4089
+ display: flex;
4090
+ min-height: 32px;
4091
+ align-items: center;
4092
+ gap: var(--ow-space-sm);
4093
+ margin: 0;
4094
+ border: 0;
4095
+ border-radius: var(--ow-radius-lg);
4096
+ background: transparent;
4097
+ padding: var(--ow-space-xs) var(--ow-space-sm);
4098
+ color: var(--ow-text);
4099
+ font: inherit;
4100
+ font-size: 14px;
4101
+ font-weight: var(--ow-weight-control);
4102
+ line-height: 1.1;
4103
+ text-align: left;
4104
+ cursor: pointer;
4105
+ transition-property: color, background-color;
4106
+ transition-duration: var(--ow-duration-base);
4107
+ transition-timing-function: var(--ow-ease-standard);
4108
+ }
4109
+
4110
+ .ow-date-range-picker__preset:hover {
4111
+ background: var(--ow-hover);
4112
+ }
4113
+
4114
+ .ow-date-range-picker__preset:focus-visible {
4115
+ outline: 2px solid var(--ow-focus-ring);
4116
+ outline-offset: -2px;
4117
+ }
4118
+
4119
+ .ow-date-range-picker__preset--current,
4120
+ .ow-date-range-picker__preset--current:hover {
4121
+ background: var(--ow-primary-subtle);
4122
+ color: var(--ow-primary-text);
4123
+ font-weight: var(--ow-weight-emphasis);
4124
+ }
4125
+
4126
+ .ow-date-range-picker__preset-label {
4127
+ min-width: 0;
4128
+ flex: 1;
4129
+ }
4130
+
4131
+ .ow-date-range-picker__preset-check {
4132
+ flex-shrink: 0;
4133
+ }
4134
+
4135
+ /* On a phone the presets wrap in rows above the month, no wider than it. */
4136
+ @media (max-width: 479px) {
4137
+ .ow-date-range-picker__panel {
4138
+ width: min-content;
4139
+ flex-direction: column;
4140
+ align-items: stretch;
4141
+ }
4142
+
4143
+ .ow-date-range-picker__presets {
4144
+ display: flex;
4145
+ width: auto;
4146
+ flex-wrap: wrap;
4147
+ border-right: 0;
4148
+ border-bottom: 1px solid var(--ow-border);
4149
+ padding: 0 0 var(--ow-space-md);
4150
+ }
4151
+
4152
+ .ow-date-range-picker__preset {
4153
+ border: 1px solid var(--ow-border);
4154
+ }
4155
+ }
4156
+
3474
4157
  /* components/ColorPicker/ColorPicker.css */
3475
4158
  /* ColorPicker: react-colorful's saturation area and hue slider in Openware's look, with a hex field,
3476
4159
  an eyedropper and swatches. react-colorful injects its own styles after this sheet, so these
@@ -3669,6 +4352,318 @@
3669
4352
  padding: var(--ow-space-lg);
3670
4353
  }
3671
4354
 
4355
+ /* components/ColorPicker/ColorArea.css */
4356
+ /* ColorArea: one hue's square, white to the hue across and down to black, in ColorPicker's look (its corners,
4357
+ hairline and thumb), so the two can sit side by side. */
4358
+ .ow-color-area {
4359
+ --ow-color-area-direction: to right;
4360
+ position: relative;
4361
+ width: var(--ow-color-area-width, 232px);
4362
+ max-width: 100%;
4363
+ height: var(--ow-color-area-height, 152px);
4364
+ flex-shrink: 0;
4365
+ border-radius: var(--ow-radius-form);
4366
+ background: linear-gradient(to top, #000000, transparent), linear-gradient(var(--ow-color-area-direction), #ffffff, var(--ow-color-area-hue));
4367
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
4368
+ cursor: pointer;
4369
+ touch-action: none;
4370
+ user-select: none;
4371
+ -webkit-tap-highlight-color: transparent;
4372
+ }
4373
+
4374
+ .ow-color-area:dir(rtl) {
4375
+ --ow-color-area-direction: to left;
4376
+ }
4377
+
4378
+ .ow-color-area__thumb {
4379
+ position: absolute;
4380
+ top: var(--ow-color-area-y);
4381
+ inset-inline-start: var(--ow-color-area-x);
4382
+ width: 18px;
4383
+ height: 18px;
4384
+ border: 2px solid #ffffff;
4385
+ border-radius: 50%;
4386
+ background: var(--ow-color-area-color);
4387
+ box-shadow:
4388
+ 0 0 0 1px rgba(15, 23, 42, 0.18),
4389
+ 0 2px 6px rgba(15, 23, 42, 0.28);
4390
+ pointer-events: none;
4391
+ translate: -50% -50%;
4392
+ transition: scale var(--ow-duration-fast) var(--ow-ease-standard);
4393
+ }
4394
+
4395
+ .ow-color-area:dir(rtl) .ow-color-area__thumb {
4396
+ translate: 50% -50%;
4397
+ }
4398
+
4399
+ .ow-color-area--dragging .ow-color-area__thumb {
4400
+ scale: 1.15;
4401
+ }
4402
+
4403
+ /* Focused by a press, it shows no ring until a key is used (useDrag's pointerFocus). */
4404
+ .ow-color-area:not(.ow-color-area--pointer) .ow-color-area__thumb:has(:focus-visible) {
4405
+ outline: 2px solid var(--ow-focus-ring);
4406
+ outline-offset: 2px;
4407
+ }
4408
+
4409
+ .ow-color-area--disabled {
4410
+ cursor: not-allowed;
4411
+ opacity: 0.55;
4412
+ }
4413
+
4414
+ @media (prefers-reduced-motion: reduce) {
4415
+ .ow-color-area__thumb {
4416
+ transition: none;
4417
+ }
4418
+ }
4419
+
4420
+ /* components/ColorPicker/ColorSlider.css */
4421
+ /* ColorSlider: a 12px pill track painted with the channel's range, and ColorPicker's thumb, which shows the colour.
4422
+ The input is visually hidden inside the thumb, so a screen reader's focus box sits where the thumb is. */
4423
+ .ow-color-slider {
4424
+ --ow-color-slider-direction: to right;
4425
+ display: grid;
4426
+ min-width: 0;
4427
+ gap: var(--ow-space-md);
4428
+ }
4429
+
4430
+ .ow-color-slider--horizontal:dir(rtl) {
4431
+ --ow-color-slider-direction: to left;
4432
+ }
4433
+
4434
+ .ow-color-slider--vertical {
4435
+ --ow-color-slider-direction: to top;
4436
+ display: inline-flex;
4437
+ height: 152px;
4438
+ flex-direction: column;
4439
+ align-items: center;
4440
+ }
4441
+
4442
+ .ow-color-slider__header {
4443
+ display: flex;
4444
+ align-items: baseline;
4445
+ justify-content: space-between;
4446
+ gap: var(--ow-space-md);
4447
+ }
4448
+
4449
+ .ow-color-slider--vertical .ow-color-slider__header {
4450
+ flex-direction: column;
4451
+ align-items: center;
4452
+ gap: 0;
4453
+ }
4454
+
4455
+ .ow-color-slider__label {
4456
+ color: var(--ow-text);
4457
+ font-size: 14px;
4458
+ font-weight: var(--ow-weight-emphasis);
4459
+ }
4460
+
4461
+ .ow-color-slider__value {
4462
+ color: var(--ow-text-muted);
4463
+ font-size: 13px;
4464
+ font-variant-numeric: tabular-nums;
4465
+ }
4466
+
4467
+ .ow-color-slider__track {
4468
+ position: relative;
4469
+ border-radius: var(--ow-radius-pill);
4470
+ background: var(--ow-color-slider-gradient);
4471
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.1);
4472
+ cursor: pointer;
4473
+ touch-action: none;
4474
+ user-select: none;
4475
+ -webkit-tap-highlight-color: transparent;
4476
+ }
4477
+
4478
+ /* A taller target than the 12px track, the thumb's full height. */
4479
+ .ow-color-slider__track::before {
4480
+ position: absolute;
4481
+ content: "";
4482
+ }
4483
+
4484
+ .ow-color-slider--horizontal .ow-color-slider__track {
4485
+ height: 12px;
4486
+ }
4487
+
4488
+ .ow-color-slider--horizontal .ow-color-slider__track::before {
4489
+ inset: -4px 0;
4490
+ }
4491
+
4492
+ .ow-color-slider--vertical .ow-color-slider__track {
4493
+ width: 12px;
4494
+ min-height: 0;
4495
+ flex: 1;
4496
+ }
4497
+
4498
+ .ow-color-slider--vertical .ow-color-slider__track::before {
4499
+ inset: 0 -4px;
4500
+ }
4501
+
4502
+ .ow-color-slider--alpha .ow-color-slider__track {
4503
+ background:
4504
+ var(--ow-color-slider-gradient),
4505
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 12px 12px;
4506
+ }
4507
+
4508
+ .ow-color-slider__thumb {
4509
+ position: absolute;
4510
+ width: 16px;
4511
+ height: 16px;
4512
+ border: 2px solid #ffffff;
4513
+ border-radius: 50%;
4514
+ background:
4515
+ linear-gradient(var(--ow-color-slider-thumb), var(--ow-color-slider-thumb)),
4516
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 8px 8px;
4517
+ box-shadow:
4518
+ 0 0 0 1px rgba(15, 23, 42, 0.18),
4519
+ 0 2px 6px rgba(15, 23, 42, 0.28);
4520
+ pointer-events: none;
4521
+ transition: scale var(--ow-duration-fast) var(--ow-ease-standard);
4522
+ }
4523
+
4524
+ .ow-color-slider--horizontal .ow-color-slider__thumb {
4525
+ top: 50%;
4526
+ inset-inline-start: var(--ow-color-slider-position);
4527
+ translate: -50% -50%;
4528
+ }
4529
+
4530
+ .ow-color-slider--horizontal:dir(rtl) .ow-color-slider__thumb {
4531
+ translate: 50% -50%;
4532
+ }
4533
+
4534
+ .ow-color-slider--vertical .ow-color-slider__thumb {
4535
+ bottom: var(--ow-color-slider-position);
4536
+ left: 50%;
4537
+ translate: -50% 50%;
4538
+ }
4539
+
4540
+ .ow-color-slider--dragging .ow-color-slider__thumb {
4541
+ scale: 1.15;
4542
+ }
4543
+
4544
+ /* Focused by a press, it shows no ring until a key is used (useDrag's pointerFocus). */
4545
+ .ow-color-slider:not(.ow-color-slider--pointer) .ow-color-slider__thumb:has(:focus-visible) {
4546
+ outline: 2px solid var(--ow-focus-ring);
4547
+ outline-offset: 2px;
4548
+ }
4549
+
4550
+ .ow-color-slider--disabled {
4551
+ opacity: 0.55;
4552
+ }
4553
+
4554
+ .ow-color-slider--disabled .ow-color-slider__track {
4555
+ cursor: not-allowed;
4556
+ }
4557
+
4558
+ @media (prefers-reduced-motion: reduce) {
4559
+ .ow-color-slider__thumb {
4560
+ transition: none;
4561
+ }
4562
+ }
4563
+
4564
+ /* components/ColorPicker/ColorSwatchPicker.css */
4565
+ /* ColorSwatchPicker: swatches in wrapping rows, like ColorPicker's. The chosen one gets ColorPicker's ring (a gap in
4566
+ the surface colour, then a 2px ring in the text colour) and a check in white or slate, whichever reads on it.
4567
+ The focus outline lands exactly on the ring, so a focused swatch's ring turns the focus colour. */
4568
+ .ow-color-swatch-picker {
4569
+ display: flex;
4570
+ flex-wrap: wrap;
4571
+ align-items: center;
4572
+ gap: var(--ow-space-sm);
4573
+ }
4574
+
4575
+ .ow-color-swatch-picker--sm {
4576
+ gap: var(--ow-space-xs);
4577
+ }
4578
+
4579
+ .ow-color-swatch-picker__swatch {
4580
+ display: inline-flex;
4581
+ width: 32px;
4582
+ height: 32px;
4583
+ flex-shrink: 0;
4584
+ align-items: center;
4585
+ justify-content: center;
4586
+ border-radius: var(--ow-radius-form);
4587
+ background:
4588
+ linear-gradient(var(--ow-color-swatch-picker-value), var(--ow-color-swatch-picker-value)),
4589
+ repeating-conic-gradient(var(--ow-gray-200) 0 25%, #ffffff 0 50%) 0 0 / 8px 8px;
4590
+ box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
4591
+ cursor: pointer;
4592
+ outline: none;
4593
+ -webkit-tap-highlight-color: transparent;
4594
+ transition:
4595
+ transform var(--ow-duration-base) var(--ow-ease-spring),
4596
+ box-shadow var(--ow-duration-base) var(--ow-ease-standard);
4597
+ }
4598
+
4599
+ .ow-color-swatch-picker--sm .ow-color-swatch-picker__swatch {
4600
+ width: 24px;
4601
+ height: 24px;
4602
+ border-radius: var(--ow-radius-md);
4603
+ }
4604
+
4605
+ .ow-color-swatch-picker--circle .ow-color-swatch-picker__swatch {
4606
+ border-radius: 50%;
4607
+ }
4608
+
4609
+ .ow-color-swatch-picker__swatch:hover:not([aria-disabled="true"]) {
4610
+ transform: scale(1.1);
4611
+ }
4612
+
4613
+ .ow-color-swatch-picker__swatch[aria-checked="true"] {
4614
+ box-shadow:
4615
+ inset 0 0 0 1px rgba(15, 23, 42, 0.14),
4616
+ 0 0 0 2px var(--ow-surface),
4617
+ 0 0 0 4px var(--ow-text);
4618
+ }
4619
+
4620
+ .ow-color-swatch-picker__swatch:focus-visible {
4621
+ outline: 2px solid var(--ow-focus-ring);
4622
+ outline-offset: 2px;
4623
+ }
4624
+
4625
+ .ow-color-swatch-picker__check {
4626
+ opacity: 0;
4627
+ scale: 0.5;
4628
+ transition:
4629
+ opacity var(--ow-duration-fast) var(--ow-ease-standard),
4630
+ scale var(--ow-duration-base) var(--ow-ease-spring);
4631
+ }
4632
+
4633
+ .ow-color-swatch-picker__swatch[data-ink="light"] .ow-color-swatch-picker__check {
4634
+ color: #ffffff;
4635
+ }
4636
+
4637
+ .ow-color-swatch-picker__swatch[data-ink="dark"] .ow-color-swatch-picker__check {
4638
+ color: var(--ow-gray-900);
4639
+ }
4640
+
4641
+ .ow-color-swatch-picker__swatch[aria-checked="true"] .ow-color-swatch-picker__check {
4642
+ opacity: 1;
4643
+ scale: 1;
4644
+ }
4645
+
4646
+ .ow-color-swatch-picker__swatch[aria-disabled="true"] {
4647
+ cursor: not-allowed;
4648
+ opacity: 0.4;
4649
+ }
4650
+
4651
+ .ow-color-swatch-picker--disabled {
4652
+ opacity: 0.55;
4653
+ }
4654
+
4655
+ /* The group fades as a whole; its swatches don't fade again. */
4656
+ .ow-color-swatch-picker--disabled .ow-color-swatch-picker__swatch[aria-disabled="true"] {
4657
+ opacity: 1;
4658
+ }
4659
+
4660
+ @media (prefers-reduced-motion: reduce) {
4661
+ .ow-color-swatch-picker__swatch,
4662
+ .ow-color-swatch-picker__check {
4663
+ transition: none;
4664
+ }
4665
+ }
4666
+
3672
4667
  /* components/CommandPalette/CommandPalette.css */
3673
4668
  /* CommandPalette: a dialog 12vh from the top, 560px wide, with a search row and a results list. */
3674
4669
  .ow-palette {