@ceebee/ui 1.3.3 → 1.4.1

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 +116 -0
  2. package/package.json +1 -1
package/dist/styles.css CHANGED
@@ -774,6 +774,19 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
774
774
  }
775
775
  .cb-palette__input::placeholder { color: var(--cb-fg-subtle); }
776
776
 
777
+ /* The `outline: none` above states the intent, but a consumer's global `:focus-visible` reset
778
+ matches this input at the same weight and, imported after this stylesheet, wins on order — which
779
+ draws a hard box around a deliberately borderless field. Restating it against `:focus-visible`
780
+ settles it by weight instead. Focus stays visible: the search row takes the brand colour, and the
781
+ active command is highlighted the moment the palette opens. */
782
+ .cb-palette__input:focus-visible {
783
+ outline: none;
784
+ }
785
+
786
+ .cb-palette__search:focus-within {
787
+ border-bottom-color: var(--cb-tone-brand);
788
+ }
789
+
777
790
  .cb-palette__list { overflow-y: auto; padding: var(--cb-space-2); }
778
791
  .cb-palette__group + .cb-palette__group { margin-top: var(--cb-space-2); }
779
792
  .cb-palette__group-label {
@@ -1889,3 +1902,106 @@ html, body { background: var(--cb-bg); color: var(--cb-fg); }
1889
1902
  .cb-checklist__description { font-size: var(--cb-text-xs); color: var(--cb-fg-subtle); }
1890
1903
  .cb-checklist__chevron { flex: none; color: var(--cb-fg-subtle); align-self: center; }
1891
1904
  .cb-checklist__complete { padding: var(--cb-space-2) 0; }
1905
+
1906
+ /* theme/ant-prepaint.css */
1907
+ /* Ant builds its stylesheet in JavaScript, so a server-rendered document carries Ant's class names
1908
+ and none of the rules behind them. Until hydration its controls paint with the browser's native
1909
+ appearance: a square grey button on a Ceebee surface, in both colour modes.
1910
+
1911
+ Extracting Ant's rules on the server does not fix this. Ant derives its seed from live CSS Tokens,
1912
+ which a server cannot read, so extracted rules carry Ant's default light palette and a dark reader
1913
+ gets a white control instead of a tonally correct one — measured, and worse than the native
1914
+ appearance, which at least follows `color-scheme`.
1915
+
1916
+ These declarations give Ant's primitives a token-correct first paint instead. Every selector is
1917
+ wrapped in `:where()`, which contributes no specificity, so each real Ant rule wins the instant it
1918
+ arrives and nothing here competes with the runtime that owns these components. The class names are
1919
+ the ones Ant already puts in the server-rendered markup, including its variant and size classes,
1920
+ so a first paint can respect them. */
1921
+
1922
+ :where(.ant-btn) {
1923
+ display: inline-flex;
1924
+ height: var(--cb-control-height-md);
1925
+ align-items: center;
1926
+ justify-content: center;
1927
+ gap: var(--cb-space-2);
1928
+ padding-inline: var(--cb-space-4);
1929
+ border: var(--cb-border-width) solid var(--cb-border-strong);
1930
+ border-radius: var(--cb-radius-sm);
1931
+ background: var(--cb-surface);
1932
+ color: var(--cb-fg);
1933
+ font-family: var(--cb-font-sans);
1934
+ font-size: var(--cb-text-sm);
1935
+ }
1936
+
1937
+ :where(.ant-btn-sm) {
1938
+ height: var(--cb-control-height-sm);
1939
+ padding-inline: var(--cb-space-3);
1940
+ font-size: var(--cb-text-xs);
1941
+ }
1942
+
1943
+ :where(.ant-btn-lg) {
1944
+ height: var(--cb-control-height-lg);
1945
+ padding-inline: var(--cb-space-5);
1946
+ font-size: var(--cb-text-md);
1947
+ }
1948
+
1949
+ :where(.ant-btn-icon-only) {
1950
+ padding-inline: var(--cb-space-2);
1951
+ }
1952
+
1953
+ :where(.ant-btn-block) {
1954
+ width: 100%;
1955
+ }
1956
+
1957
+ /* A text or link button carries no chrome of its own, so borrowing the surface would make one look
1958
+ like an outlined button for as long as the first paint lasts. */
1959
+ :where(.ant-btn-variant-text, .ant-btn-variant-link) {
1960
+ border-color: transparent;
1961
+ background: transparent;
1962
+ }
1963
+
1964
+ :where(.ant-btn-variant-solid) {
1965
+ border-color: transparent;
1966
+ background: var(--cb-tone-brand);
1967
+ color: var(--cb-fg-on-brand);
1968
+ }
1969
+
1970
+ :where(.ant-input, .ant-input-affix-wrapper, .ant-select .ant-select-selector) {
1971
+ border: var(--cb-border-width) solid var(--cb-border-strong);
1972
+ border-radius: var(--cb-radius-sm);
1973
+ background: var(--cb-surface);
1974
+ color: var(--cb-fg);
1975
+ font-family: var(--cb-font-sans);
1976
+ font-size: var(--cb-text-sm);
1977
+ }
1978
+
1979
+ /* An input inside an affix wrapper is already framed by the wrapper. */
1980
+ :where(.ant-input-affix-wrapper .ant-input) {
1981
+ border: none;
1982
+ background: transparent;
1983
+ }
1984
+
1985
+ /* A pseudo-element cannot live inside `:where()` — the rule would be dropped — so it sits outside
1986
+ it and carries only its own element-level weight, which Ant's `.ant-input::placeholder` outranks. */
1987
+ :where(.ant-input)::placeholder,
1988
+ :where(.ant-select-placeholder) {
1989
+ color: var(--cb-fg-muted);
1990
+ }
1991
+
1992
+ :where(.ant-segmented) {
1993
+ border-radius: var(--cb-radius-sm);
1994
+ background: var(--cb-bg-subtle);
1995
+ font-family: var(--cb-font-sans);
1996
+ font-size: var(--cb-text-xs);
1997
+ }
1998
+
1999
+ :where(.ant-segmented-item) {
2000
+ border-radius: var(--cb-radius-sm);
2001
+ color: var(--cb-fg-muted);
2002
+ }
2003
+
2004
+ :where(.ant-segmented-item-selected) {
2005
+ background: var(--cb-surface);
2006
+ color: var(--cb-fg);
2007
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ceebee/ui",
3
- "version": "1.3.3",
3
+ "version": "1.4.1",
4
4
  "description": "Ceebee's design system: tokens, themed primitives, motion, and onboarding.",
5
5
  "license": "MIT",
6
6
  "repository": {