@ceebee/ui 1.4.0 → 1.4.2

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 (2) hide show
  1. package/dist/styles.css +81 -22
  2. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -1919,13 +1919,21 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1919
1919
  the ones Ant already puts in the server-rendered markup, including its variant and size classes,
1920
1920
  so a first paint can respect them. */
1921
1921
 
1922
+ /* Sizes below are Ant's own derived values, read out of a rendered control and then expressed in
1923
+ Tokens rather than guessed: Ant lands on a spacing Token less its own border width, so
1924
+ `space-4 - border-width` is 15px and `space-3 - border-width` is 11px. Where a variant's geometry
1925
+ has not been measured that way, this layer states no size for it — a wrong size flickers as badly
1926
+ as no size, and pretends to be right. */
1927
+
1922
1928
  :where(.ant-btn) {
1929
+ box-sizing: border-box;
1923
1930
  display: inline-flex;
1924
- min-height: var(--cb-control-height-md);
1931
+ height: var(--cb-control-height-md);
1925
1932
  align-items: center;
1926
1933
  justify-content: center;
1927
1934
  gap: var(--cb-space-2);
1928
- padding-inline: var(--cb-space-4);
1935
+ padding-block: var(--cb-space-0);
1936
+ padding-inline: calc(var(--cb-space-4) - var(--cb-border-width));
1929
1937
  border: var(--cb-border-width) solid var(--cb-border-strong);
1930
1938
  border-radius: var(--cb-radius-sm);
1931
1939
  background: var(--cb-surface);
@@ -1934,20 +1942,20 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1934
1942
  font-size: var(--cb-text-sm);
1935
1943
  }
1936
1944
 
1945
+ /* Height and type scale come straight from the Tokens the bridge already hands Ant, so they agree.
1946
+ The inline padding of these two sizes has not been measured, so it is left to Ant. */
1937
1947
  :where(.ant-btn-sm) {
1938
- min-height: var(--cb-control-height-sm);
1939
- padding-inline: var(--cb-space-3);
1948
+ height: var(--cb-control-height-sm);
1940
1949
  font-size: var(--cb-text-xs);
1941
1950
  }
1942
1951
 
1943
1952
  :where(.ant-btn-lg) {
1944
- min-height: var(--cb-control-height-lg);
1945
- padding-inline: var(--cb-space-5);
1953
+ height: var(--cb-control-height-lg);
1946
1954
  font-size: var(--cb-text-md);
1947
1955
  }
1948
1956
 
1949
1957
  :where(.ant-btn-icon-only) {
1950
- min-width: var(--cb-control-height-md);
1958
+ width: var(--cb-control-height-md);
1951
1959
  padding-inline: var(--cb-space-0);
1952
1960
  }
1953
1961
 
@@ -1968,12 +1976,15 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1968
1976
  color: var(--cb-fg-on-brand);
1969
1977
  }
1970
1978
 
1971
- :where(.ant-input, .ant-input-affix-wrapper, .ant-select .ant-select-selector) {
1979
+ /* The framed text controls. `.ant-select` carries its own box in this runtime — the inner element is
1980
+ `.ant-select-content`, not a selector class this layer needs to name. */
1981
+ :where(.ant-input, .ant-input-affix-wrapper, .ant-select) {
1982
+ box-sizing: border-box;
1972
1983
  display: flex;
1973
- min-height: var(--cb-control-height-md);
1984
+ height: var(--cb-control-height-md);
1974
1985
  align-items: center;
1975
- gap: var(--cb-space-2);
1976
- padding-inline: var(--cb-space-3);
1986
+ padding-block: var(--cb-space-2);
1987
+ padding-inline: calc(var(--cb-space-3) - var(--cb-border-width));
1977
1988
  border: var(--cb-border-width) solid var(--cb-border-strong);
1978
1989
  border-radius: var(--cb-radius-sm);
1979
1990
  background: var(--cb-surface);
@@ -1982,12 +1993,57 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1982
1993
  font-size: var(--cb-text-sm);
1983
1994
  }
1984
1995
 
1985
- /* An input inside an affix wrapper is already framed by the wrapper. */
1996
+ :where(.ant-input-lg, .ant-input-affix-wrapper-lg, .ant-select-lg) {
1997
+ height: var(--cb-control-height-lg);
1998
+ padding-block: calc(var(--cb-space-3) - var(--cb-border-width));
1999
+ border-radius: var(--cb-radius-md);
2000
+ font-size: var(--cb-text-md);
2001
+ }
2002
+
2003
+ :where(.ant-input-sm, .ant-input-affix-wrapper-sm, .ant-select-sm) {
2004
+ height: var(--cb-control-height-sm);
2005
+ font-size: var(--cb-text-xs);
2006
+ }
2007
+
2008
+ /* An input inside an affix wrapper is framed by the wrapper, so it states no box of its own. */
1986
2009
  :where(.ant-input-affix-wrapper .ant-input) {
1987
- min-height: auto;
1988
- padding-inline: var(--cb-space-0);
2010
+ width: 100%;
2011
+ height: auto;
2012
+ padding: var(--cb-space-0);
1989
2013
  border: none;
2014
+ border-radius: var(--cb-radius-none);
1990
2015
  background: transparent;
2016
+ font-size: inherit;
2017
+ line-height: var(--cb-leading-normal);
2018
+ }
2019
+
2020
+ /* The prefix sets the text's starting position, so leaving its spacing out moved the placeholder
2021
+ sideways when Ant landed. Measured: Ant states `margin-inline-end` here, and its value is one
2022
+ space step, mirrored on the suffix, which Ant spaces the same way. */
2023
+ :where(.ant-input-prefix, .ant-input-suffix) {
2024
+ display: flex;
2025
+ flex: none;
2026
+ align-items: center;
2027
+ }
2028
+
2029
+ :where(.ant-input-prefix) {
2030
+ margin-inline-end: var(--cb-space-1);
2031
+ }
2032
+
2033
+ :where(.ant-input-suffix) {
2034
+ margin-inline-start: var(--cb-space-1);
2035
+ }
2036
+
2037
+ /* `allowClear` renders its clear control on an empty field and hides it from JavaScript-built CSS.
2038
+ Without that rule a stray clear icon is painted in every input until hydration, so the hidden
2039
+ state is stated here too. */
2040
+ :where(.ant-input-clear-icon) {
2041
+ font-size: var(--cb-text-xs);
2042
+ color: var(--cb-fg-subtle);
2043
+ }
2044
+
2045
+ :where(.ant-input-clear-icon-hidden) {
2046
+ visibility: hidden;
1991
2047
  }
1992
2048
 
1993
2049
  /* A pseudo-element cannot live inside `:where()` — the rule would be dropped — so it sits outside
@@ -1997,20 +2053,23 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1997
2053
  color: var(--cb-fg-muted);
1998
2054
  }
1999
2055
 
2056
+ /* Segmented is measured at a 6px radius and 2px of inline padding, and no Token carries either
2057
+ value — Ant derives them through its own algorithm from tokens the bridge does not feed. So this
2058
+ states no size or radius for it, only the axis it lays out on, which it otherwise loses entirely
2059
+ and stacks vertically, and the colours, which are Tokens. */
2000
2060
  :where(.ant-segmented) {
2001
- display: inline-flex;
2002
- align-items: center;
2003
- gap: var(--cb-space-1);
2004
- padding: var(--cb-space-1);
2005
- border-radius: var(--cb-radius-sm);
2006
2061
  background: var(--cb-bg-subtle);
2007
2062
  font-family: var(--cb-font-sans);
2008
- font-size: var(--cb-text-xs);
2063
+ font-size: var(--cb-text-sm);
2064
+ }
2065
+
2066
+ /* The options are laid out by an inner group, not by the root, so without this the control paints
2067
+ as a vertical stack of labels. */
2068
+ :where(.ant-segmented-group) {
2069
+ display: flex;
2009
2070
  }
2010
2071
 
2011
2072
  :where(.ant-segmented-item) {
2012
- padding-inline: var(--cb-space-3);
2013
- border-radius: var(--cb-radius-sm);
2014
2073
  color: var(--cb-fg-muted);
2015
2074
  }
2016
2075
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceebee/ui",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Ceebee's design system: tokens, themed primitives, motion, and onboarding.",
5
5
  "license": "MIT",
6
6
  "repository": {