@xenosystem/elements-react 0.0.1 → 0.0.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 (49) hide show
  1. package/LICENSE +18 -18
  2. package/README.md +41 -41
  3. package/package.json +58 -58
  4. package/src/chrome-separated.css +132 -132
  5. package/src/chrome-unified.css +72 -72
  6. package/src/containers/Badges.css +116 -116
  7. package/src/containers/avatar.css +70 -70
  8. package/src/containers/card.css +75 -75
  9. package/src/containers/chip.css +103 -103
  10. package/src/containers/list-row.css +132 -132
  11. package/src/containers/message-bubble.css +112 -112
  12. package/src/containers/panel.css +120 -120
  13. package/src/containers/table.css +102 -102
  14. package/src/containers/tile.css +17 -17
  15. package/src/content/callout.css +77 -77
  16. package/src/content/caret.css +30 -30
  17. package/src/content/code-block.css +159 -159
  18. package/src/content/collapsible.css +80 -80
  19. package/src/content/inline-code.css +14 -14
  20. package/src/content/model-picker.css +219 -219
  21. package/src/content/source-card.css +99 -99
  22. package/src/content/sources-disclosure.css +118 -118
  23. package/src/controls.css +453 -453
  24. package/src/fonts.css +34 -34
  25. package/src/forms/Checkbox.css +114 -114
  26. package/src/forms/RadioGroup.css +115 -115
  27. package/src/goo.css +97 -97
  28. package/src/icon-motion.css +1909 -1909
  29. package/src/layout/ResizablePanel.css +79 -79
  30. package/src/nav/sidebar.css +296 -296
  31. package/src/overlays/date-time-picker.css +238 -238
  32. package/src/overlays/menu.css +195 -195
  33. package/src/overlays/modal.css +167 -167
  34. package/src/overlays/picker-field.css +81 -81
  35. package/src/overlays/pill-filter.css +129 -129
  36. package/src/overlays/reveal.css +56 -56
  37. package/src/overlays/segmented-control.css +185 -185
  38. package/src/overlays/tabs.css +143 -143
  39. package/src/overlays/tooltip.css +126 -126
  40. package/src/scrollbar.css +184 -184
  41. package/src/size.css +179 -179
  42. package/src/status/progress-bar.css +88 -88
  43. package/src/status/spinner.css +33 -33
  44. package/src/status/statusindicator.css +65 -65
  45. package/src/status/steptimeline.css +137 -137
  46. package/src/status/thinkingcube.css +75 -75
  47. package/src/xeno-element.css +60 -60
  48. package/src/xeno-elements.css +71 -71
  49. package/src/xeno-theme.css +99 -99
package/src/goo.css CHANGED
@@ -1,97 +1,97 @@
1
- /*
2
- * `goo.css` — the travelling hover pill, as a primitive rather than a menu feature.
3
- *
4
- * ONE filled row that travels to whatever you are pointing at, instead of each row painting its own
5
- * background. A fill that appears on the new row and vanishes from the old one is two events with no
6
- * journey between them, and it never says where it came from.
7
- *
8
- * This lives outside `menu.css` because the behaviour is not about menus. Any vertical list of rows can
9
- * host it — a menu, a command palette, a product's own hand-rolled dropdown — and the alternative was
10
- * every one of those copying the same twenty lines. Pair it with `useGooPill()`, which supplies the two
11
- * numbers a stylesheet cannot work out on its own: where the row starts and how tall it is.
12
- *
13
- * The sidebar keeps its own version, and that is not duplication: a sidebar OWNS its rows (it maps an
14
- * `items` array, so the offset is `index x stride` and pure CSS can do it). A host with arbitrary
15
- * children cannot assume a stride, so it measures. Same effect, two honest implementations.
16
- */
17
- .xeno-goo-host {
18
- /* How far the pill misbehaves on the way. Restrained on purpose — enough deformation to read as
19
- weight, not enough to look like jelly on something you use constantly. */
20
- --xeno-goo-stretch: 0.14;
21
- --xeno-goo-squeeze: 0.06;
22
- --xeno-goo-dur: 220ms;
23
- --xeno-goo-pill-ease: cubic-bezier(0.34, 1.12, 0.5, 1);
24
- isolation: isolate;
25
- }
26
-
27
- /* The pill is positioned against the host, so the host has to be a containing block — but claiming
28
- `position: relative` outright would be this stylesheet overruling the host's own layout. A menu panel
29
- is `absolute` (it is anchored to a trigger) and a product's panel is Tailwind's `.absolute`; both are
30
- one class, so whoever loads last would win, and a panel silently dropped back into flow is a much
31
- worse bug than a pill in the wrong place.
32
- `:where()` is specificity ZERO: it supplies `relative` only where nothing else has an opinion, and
33
- loses to every real position the host declares. `absolute`, `fixed` and `sticky` are all containing
34
- blocks too, so losing is the correct outcome, not a fallback. */
35
- :where(.xeno-goo-host) {
36
- position: relative;
37
- }
38
-
39
- /* `--xeno-goo-inset` defaults to the 4px a padded list gives itself, so the pill lines up with the rows
40
- rather than with the panel edge. Fill and radius are tokens so a product can hand it its own ink. */
41
- .xeno-goo-pill {
42
- position: absolute;
43
- z-index: -1;
44
- left: var(--xeno-goo-inset, 4px);
45
- right: var(--xeno-goo-inset, 4px);
46
- top: var(--xeno-goo-y, 0px);
47
- height: var(--xeno-goo-h, 0px);
48
- background: var(--xeno-goo-fill, var(--xeno-control));
49
- border-radius: var(--xeno-goo-radius, var(--xeno-radius-sm));
50
- opacity: 0;
51
- pointer-events: none;
52
- transition:
53
- top var(--xeno-goo-dur) var(--xeno-goo-pill-ease),
54
- height var(--xeno-goo-dur) var(--xeno-goo-pill-ease),
55
- opacity var(--xeno-dur, 0.14s) ease;
56
- }
57
- .xeno-goo-host[data-goo='on'] > .xeno-goo-pill {
58
- opacity: 1;
59
- }
60
-
61
- /* The stretch, keyed off the row index so re-pointing restarts it — a browser will not replay an
62
- animation whose name did not change. Ten rows; past that the pill still travels, it just stops
63
- stretching, which is a fair trade for a list nobody scans by deformation anyway. */
64
- .xeno-goo-host[data-goo='on'][data-goo-index='0'] > .xeno-goo-pill { animation: xeno-goo-pill-0 var(--xeno-goo-dur) 1; }
65
- .xeno-goo-host[data-goo='on'][data-goo-index='1'] > .xeno-goo-pill { animation: xeno-goo-pill-1 var(--xeno-goo-dur) 1; }
66
- .xeno-goo-host[data-goo='on'][data-goo-index='2'] > .xeno-goo-pill { animation: xeno-goo-pill-2 var(--xeno-goo-dur) 1; }
67
- .xeno-goo-host[data-goo='on'][data-goo-index='3'] > .xeno-goo-pill { animation: xeno-goo-pill-3 var(--xeno-goo-dur) 1; }
68
- .xeno-goo-host[data-goo='on'][data-goo-index='4'] > .xeno-goo-pill { animation: xeno-goo-pill-4 var(--xeno-goo-dur) 1; }
69
- .xeno-goo-host[data-goo='on'][data-goo-index='5'] > .xeno-goo-pill { animation: xeno-goo-pill-5 var(--xeno-goo-dur) 1; }
70
- .xeno-goo-host[data-goo='on'][data-goo-index='6'] > .xeno-goo-pill { animation: xeno-goo-pill-6 var(--xeno-goo-dur) 1; }
71
- .xeno-goo-host[data-goo='on'][data-goo-index='7'] > .xeno-goo-pill { animation: xeno-goo-pill-7 var(--xeno-goo-dur) 1; }
72
- .xeno-goo-host[data-goo='on'][data-goo-index='8'] > .xeno-goo-pill { animation: xeno-goo-pill-8 var(--xeno-goo-dur) 1; }
73
- .xeno-goo-host[data-goo='on'][data-goo-index='9'] > .xeno-goo-pill { animation: xeno-goo-pill-9 var(--xeno-goo-dur) 1; }
74
- @keyframes xeno-goo-pill-0 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
75
- @keyframes xeno-goo-pill-1 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
76
- @keyframes xeno-goo-pill-2 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
77
- @keyframes xeno-goo-pill-3 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
78
- @keyframes xeno-goo-pill-4 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
79
- @keyframes xeno-goo-pill-5 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
80
- @keyframes xeno-goo-pill-6 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
81
- @keyframes xeno-goo-pill-7 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
82
- @keyframes xeno-goo-pill-8 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
83
- @keyframes xeno-goo-pill-9 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
84
-
85
- /* Nothing here raises the rows, on purpose. A negative `z-index` child paints below its parent's in-flow
86
- content, so the rows are already over the pill without a single declaration — and a blanket
87
- `position: relative` on the host's children would quietly re-anchor any absolutely-positioned
88
- descendant (a submenu, a tooltip) to the wrong box. The one thing a host DOES have to give up is rows
89
- that paint their own hover background: two filled surfaces read as two highlights. */
90
-
91
- /* Motion off: the pill still marks the row, it just stops travelling and deforming to get there. */
92
- @media (prefers-reduced-motion: reduce) {
93
- .xeno-goo-pill {
94
- transition: opacity var(--xeno-dur, 0.14s) ease;
95
- animation: none !important;
96
- }
97
- }
1
+ /*
2
+ * `goo.css` — the travelling hover pill, as a primitive rather than a menu feature.
3
+ *
4
+ * ONE filled row that travels to whatever you are pointing at, instead of each row painting its own
5
+ * background. A fill that appears on the new row and vanishes from the old one is two events with no
6
+ * journey between them, and it never says where it came from.
7
+ *
8
+ * This lives outside `menu.css` because the behaviour is not about menus. Any vertical list of rows can
9
+ * host it — a menu, a command palette, a product's own hand-rolled dropdown — and the alternative was
10
+ * every one of those copying the same twenty lines. Pair it with `useGooPill()`, which supplies the two
11
+ * numbers a stylesheet cannot work out on its own: where the row starts and how tall it is.
12
+ *
13
+ * The sidebar keeps its own version, and that is not duplication: a sidebar OWNS its rows (it maps an
14
+ * `items` array, so the offset is `index x stride` and pure CSS can do it). A host with arbitrary
15
+ * children cannot assume a stride, so it measures. Same effect, two honest implementations.
16
+ */
17
+ .xeno-goo-host {
18
+ /* How far the pill misbehaves on the way. Restrained on purpose — enough deformation to read as
19
+ weight, not enough to look like jelly on something you use constantly. */
20
+ --xeno-goo-stretch: 0.14;
21
+ --xeno-goo-squeeze: 0.06;
22
+ --xeno-goo-dur: 220ms;
23
+ --xeno-goo-pill-ease: cubic-bezier(0.34, 1.12, 0.5, 1);
24
+ isolation: isolate;
25
+ }
26
+
27
+ /* The pill is positioned against the host, so the host has to be a containing block — but claiming
28
+ `position: relative` outright would be this stylesheet overruling the host's own layout. A menu panel
29
+ is `absolute` (it is anchored to a trigger) and a product's panel is Tailwind's `.absolute`; both are
30
+ one class, so whoever loads last would win, and a panel silently dropped back into flow is a much
31
+ worse bug than a pill in the wrong place.
32
+ `:where()` is specificity ZERO: it supplies `relative` only where nothing else has an opinion, and
33
+ loses to every real position the host declares. `absolute`, `fixed` and `sticky` are all containing
34
+ blocks too, so losing is the correct outcome, not a fallback. */
35
+ :where(.xeno-goo-host) {
36
+ position: relative;
37
+ }
38
+
39
+ /* `--xeno-goo-inset` defaults to the 4px a padded list gives itself, so the pill lines up with the rows
40
+ rather than with the panel edge. Fill and radius are tokens so a product can hand it its own ink. */
41
+ .xeno-goo-pill {
42
+ position: absolute;
43
+ z-index: -1;
44
+ left: var(--xeno-goo-inset, 4px);
45
+ right: var(--xeno-goo-inset, 4px);
46
+ top: var(--xeno-goo-y, 0px);
47
+ height: var(--xeno-goo-h, 0px);
48
+ background: var(--xeno-goo-fill, var(--xeno-control));
49
+ border-radius: var(--xeno-goo-radius, var(--xeno-radius-sm));
50
+ opacity: 0;
51
+ pointer-events: none;
52
+ transition:
53
+ top var(--xeno-goo-dur) var(--xeno-goo-pill-ease),
54
+ height var(--xeno-goo-dur) var(--xeno-goo-pill-ease),
55
+ opacity var(--xeno-dur, 0.14s) ease;
56
+ }
57
+ .xeno-goo-host[data-goo='on'] > .xeno-goo-pill {
58
+ opacity: 1;
59
+ }
60
+
61
+ /* The stretch, keyed off the row index so re-pointing restarts it — a browser will not replay an
62
+ animation whose name did not change. Ten rows; past that the pill still travels, it just stops
63
+ stretching, which is a fair trade for a list nobody scans by deformation anyway. */
64
+ .xeno-goo-host[data-goo='on'][data-goo-index='0'] > .xeno-goo-pill { animation: xeno-goo-pill-0 var(--xeno-goo-dur) 1; }
65
+ .xeno-goo-host[data-goo='on'][data-goo-index='1'] > .xeno-goo-pill { animation: xeno-goo-pill-1 var(--xeno-goo-dur) 1; }
66
+ .xeno-goo-host[data-goo='on'][data-goo-index='2'] > .xeno-goo-pill { animation: xeno-goo-pill-2 var(--xeno-goo-dur) 1; }
67
+ .xeno-goo-host[data-goo='on'][data-goo-index='3'] > .xeno-goo-pill { animation: xeno-goo-pill-3 var(--xeno-goo-dur) 1; }
68
+ .xeno-goo-host[data-goo='on'][data-goo-index='4'] > .xeno-goo-pill { animation: xeno-goo-pill-4 var(--xeno-goo-dur) 1; }
69
+ .xeno-goo-host[data-goo='on'][data-goo-index='5'] > .xeno-goo-pill { animation: xeno-goo-pill-5 var(--xeno-goo-dur) 1; }
70
+ .xeno-goo-host[data-goo='on'][data-goo-index='6'] > .xeno-goo-pill { animation: xeno-goo-pill-6 var(--xeno-goo-dur) 1; }
71
+ .xeno-goo-host[data-goo='on'][data-goo-index='7'] > .xeno-goo-pill { animation: xeno-goo-pill-7 var(--xeno-goo-dur) 1; }
72
+ .xeno-goo-host[data-goo='on'][data-goo-index='8'] > .xeno-goo-pill { animation: xeno-goo-pill-8 var(--xeno-goo-dur) 1; }
73
+ .xeno-goo-host[data-goo='on'][data-goo-index='9'] > .xeno-goo-pill { animation: xeno-goo-pill-9 var(--xeno-goo-dur) 1; }
74
+ @keyframes xeno-goo-pill-0 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
75
+ @keyframes xeno-goo-pill-1 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
76
+ @keyframes xeno-goo-pill-2 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
77
+ @keyframes xeno-goo-pill-3 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
78
+ @keyframes xeno-goo-pill-4 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
79
+ @keyframes xeno-goo-pill-5 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
80
+ @keyframes xeno-goo-pill-6 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
81
+ @keyframes xeno-goo-pill-7 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
82
+ @keyframes xeno-goo-pill-8 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
83
+ @keyframes xeno-goo-pill-9 { 0% { scale: 1 1; } 50% { scale: calc(1 - var(--xeno-goo-squeeze)) calc(1 + var(--xeno-goo-stretch)); } 100% { scale: 1 1; } }
84
+
85
+ /* Nothing here raises the rows, on purpose. A negative `z-index` child paints below its parent's in-flow
86
+ content, so the rows are already over the pill without a single declaration — and a blanket
87
+ `position: relative` on the host's children would quietly re-anchor any absolutely-positioned
88
+ descendant (a submenu, a tooltip) to the wrong box. The one thing a host DOES have to give up is rows
89
+ that paint their own hover background: two filled surfaces read as two highlights. */
90
+
91
+ /* Motion off: the pill still marks the row, it just stops travelling and deforming to get there. */
92
+ @media (prefers-reduced-motion: reduce) {
93
+ .xeno-goo-pill {
94
+ transition: opacity var(--xeno-dur, 0.14s) ease;
95
+ animation: none !important;
96
+ }
97
+ }