@xerios/design-system 0.0.0-stage → 0.1.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 (214) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +403 -2
  3. package/dist/components/AnchorHeading.svelte +79 -0
  4. package/dist/components/AnchorHeading.svelte.d.ts +28 -0
  5. package/dist/components/Breadcrumbs.svelte +216 -0
  6. package/dist/components/Breadcrumbs.svelte.d.ts +37 -0
  7. package/dist/components/Button.svelte +178 -0
  8. package/dist/components/Button.svelte.d.ts +58 -0
  9. package/dist/components/Canvas.svelte +248 -0
  10. package/dist/components/Canvas.svelte.d.ts +91 -0
  11. package/dist/components/Collapsible.svelte +139 -0
  12. package/dist/components/Collapsible.svelte.d.ts +52 -0
  13. package/dist/components/CollapsibleAdvanced.svelte +174 -0
  14. package/dist/components/CollapsibleAdvanced.svelte.d.ts +43 -0
  15. package/dist/components/DashOutline.svelte +47 -0
  16. package/dist/components/DashOutline.svelte.d.ts +6 -0
  17. package/dist/components/Dialogs.svelte +123 -0
  18. package/dist/components/Dialogs.svelte.d.ts +6 -0
  19. package/dist/components/Drawer.svelte +231 -0
  20. package/dist/components/Drawer.svelte.d.ts +62 -0
  21. package/dist/components/ErrorMessage.svelte +140 -0
  22. package/dist/components/ErrorMessage.svelte.d.ts +41 -0
  23. package/dist/components/Icon.svelte +94 -0
  24. package/dist/components/Icon.svelte.d.ts +33 -0
  25. package/dist/components/InfoTip.svelte +183 -0
  26. package/dist/components/InfoTip.svelte.d.ts +28 -0
  27. package/dist/components/Md.svelte +28 -0
  28. package/dist/components/Md.svelte.d.ts +11 -0
  29. package/dist/components/Modal.svelte +91 -0
  30. package/dist/components/Modal.svelte.d.ts +41 -0
  31. package/dist/components/Notice.svelte +50 -0
  32. package/dist/components/Notice.svelte.d.ts +30 -0
  33. package/dist/components/Popover.svelte +212 -0
  34. package/dist/components/Popover.svelte.d.ts +70 -0
  35. package/dist/components/Shimmer.svelte +27 -0
  36. package/dist/components/Shimmer.svelte.d.ts +22 -0
  37. package/dist/components/Splitter.svelte +152 -0
  38. package/dist/components/Splitter.svelte.d.ts +41 -0
  39. package/dist/components/Table.svelte +448 -0
  40. package/dist/components/Table.svelte.d.ts +268 -0
  41. package/dist/components/Toast.svelte +273 -0
  42. package/dist/components/Toast.svelte.d.ts +31 -0
  43. package/dist/components/Tooltip.svelte +97 -0
  44. package/dist/components/Tooltip.svelte.d.ts +19 -0
  45. package/dist/components/WorkingBorder.svelte +105 -0
  46. package/dist/components/WorkingBorder.svelte.d.ts +26 -0
  47. package/dist/components/empty/Empty.svelte +55 -0
  48. package/dist/components/empty/Empty.svelte.d.ts +39 -0
  49. package/dist/components/empty/EmptyError.svelte +47 -0
  50. package/dist/components/empty/EmptyError.svelte.d.ts +28 -0
  51. package/dist/components/empty/index.d.ts +18 -0
  52. package/dist/components/empty/index.js +10 -0
  53. package/dist/components/filters/DateFilter.svelte +59 -0
  54. package/dist/components/filters/DateFilter.svelte.d.ts +23 -0
  55. package/dist/components/filters/FilterBar.svelte +342 -0
  56. package/dist/components/filters/FilterBar.svelte.d.ts +283 -0
  57. package/dist/components/filters/FilterChip.svelte +235 -0
  58. package/dist/components/filters/FilterChip.svelte.d.ts +68 -0
  59. package/dist/components/filters/OptionList.svelte +352 -0
  60. package/dist/components/filters/OptionList.svelte.d.ts +91 -0
  61. package/dist/components/filters/Panel.svelte +123 -0
  62. package/dist/components/filters/Panel.svelte.d.ts +25 -0
  63. package/dist/components/filters/index.d.ts +288 -0
  64. package/dist/components/filters/index.js +12 -0
  65. package/dist/components/icons.d.ts +54 -0
  66. package/dist/components/icons.js +58 -0
  67. package/dist/components/inputs/ButtonGroup.svelte +104 -0
  68. package/dist/components/inputs/ButtonGroup.svelte.d.ts +40 -0
  69. package/dist/components/inputs/Calendar.svelte +535 -0
  70. package/dist/components/inputs/Calendar.svelte.d.ts +45 -0
  71. package/dist/components/inputs/DateField.svelte +247 -0
  72. package/dist/components/inputs/DateField.svelte.d.ts +74 -0
  73. package/dist/components/inputs/DateInput.svelte +118 -0
  74. package/dist/components/inputs/DateInput.svelte.d.ts +43 -0
  75. package/dist/components/inputs/DatePicker.svelte +102 -0
  76. package/dist/components/inputs/DatePicker.svelte.d.ts +67 -0
  77. package/dist/components/inputs/DateRangePicker.svelte +208 -0
  78. package/dist/components/inputs/DateRangePicker.svelte.d.ts +76 -0
  79. package/dist/components/inputs/DateRangeSelect.svelte +548 -0
  80. package/dist/components/inputs/DateRangeSelect.svelte.d.ts +70 -0
  81. package/dist/components/inputs/FieldLabel.svelte +43 -0
  82. package/dist/components/inputs/FieldLabel.svelte.d.ts +28 -0
  83. package/dist/components/inputs/ListSearch.svelte +142 -0
  84. package/dist/components/inputs/ListSearch.svelte.d.ts +35 -0
  85. package/dist/components/inputs/RadioGroup.svelte +153 -0
  86. package/dist/components/inputs/RadioGroup.svelte.d.ts +49 -0
  87. package/dist/components/inputs/RangeShortcuts.svelte +90 -0
  88. package/dist/components/inputs/RangeShortcuts.svelte.d.ts +31 -0
  89. package/dist/components/inputs/RangeSlider.svelte +225 -0
  90. package/dist/components/inputs/RangeSlider.svelte.d.ts +37 -0
  91. package/dist/components/inputs/SearchField.svelte +24 -0
  92. package/dist/components/inputs/SearchField.svelte.d.ts +41 -0
  93. package/dist/components/inputs/Segmented.svelte +76 -0
  94. package/dist/components/inputs/Segmented.svelte.d.ts +43 -0
  95. package/dist/components/inputs/Select.svelte +552 -0
  96. package/dist/components/inputs/Select.svelte.d.ts +100 -0
  97. package/dist/components/inputs/Slider.svelte +177 -0
  98. package/dist/components/inputs/Slider.svelte.d.ts +33 -0
  99. package/dist/components/inputs/SliderTicks.svelte +62 -0
  100. package/dist/components/inputs/SliderTicks.svelte.d.ts +23 -0
  101. package/dist/components/inputs/Switch.svelte +120 -0
  102. package/dist/components/inputs/Switch.svelte.d.ts +31 -0
  103. package/dist/components/inputs/TagInput.svelte +296 -0
  104. package/dist/components/inputs/TagInput.svelte.d.ts +61 -0
  105. package/dist/components/inputs/TextArea.svelte +86 -0
  106. package/dist/components/inputs/TextArea.svelte.d.ts +56 -0
  107. package/dist/components/inputs/TextField.svelte +170 -0
  108. package/dist/components/inputs/TextField.svelte.d.ts +80 -0
  109. package/dist/components/menu/ContextMenu.svelte +25 -0
  110. package/dist/components/menu/ContextMenu.svelte.d.ts +26 -0
  111. package/dist/components/menu/MenuButton.svelte +46 -0
  112. package/dist/components/menu/MenuButton.svelte.d.ts +16 -0
  113. package/dist/components/menu/MenuList.svelte +319 -0
  114. package/dist/components/menu/MenuList.svelte.d.ts +30 -0
  115. package/dist/components/metadata/Metadata.svelte +38 -0
  116. package/dist/components/metadata/Metadata.svelte.d.ts +31 -0
  117. package/dist/components/metadata/MetadataRow.svelte +84 -0
  118. package/dist/components/metadata/MetadataRow.svelte.d.ts +26 -0
  119. package/dist/components/metadata/index.d.ts +8 -0
  120. package/dist/components/metadata/index.js +13 -0
  121. package/dist/components/side-menu/SideMenu.svelte +138 -0
  122. package/dist/components/side-menu/SideMenu.svelte.d.ts +25 -0
  123. package/dist/components/side-menu/SideMenuGroup.svelte +108 -0
  124. package/dist/components/side-menu/SideMenuGroup.svelte.d.ts +31 -0
  125. package/dist/components/side-menu/SideMenuItem.svelte +221 -0
  126. package/dist/components/side-menu/SideMenuItem.svelte.d.ts +46 -0
  127. package/dist/components/side-menu/context.d.ts +1 -0
  128. package/dist/components/side-menu/context.js +3 -0
  129. package/dist/components/side-menu/index.d.ts +62 -0
  130. package/dist/components/side-menu/index.js +15 -0
  131. package/dist/components/tiles/Tile.svelte +419 -0
  132. package/dist/components/tiles/Tile.svelte.d.ts +58 -0
  133. package/dist/components/tiles/TileGroup.svelte +135 -0
  134. package/dist/components/tiles/TileGroup.svelte.d.ts +45 -0
  135. package/dist/components/tiles/context.d.ts +35 -0
  136. package/dist/components/tiles/context.js +14 -0
  137. package/dist/components/tiles/index.d.ts +6 -0
  138. package/dist/components/tiles/index.js +13 -0
  139. package/dist/components/upload/FileCard.svelte +301 -0
  140. package/dist/components/upload/FileCard.svelte.d.ts +127 -0
  141. package/dist/components/upload/Thumb.svelte +274 -0
  142. package/dist/components/upload/Thumb.svelte.d.ts +101 -0
  143. package/dist/components/upload/UploadFile.svelte +123 -0
  144. package/dist/components/upload/UploadFile.svelte.d.ts +48 -0
  145. package/dist/components/upload/UploadFiles.svelte +177 -0
  146. package/dist/components/upload/UploadFiles.svelte.d.ts +50 -0
  147. package/dist/components/upload/UploadFolder.svelte +153 -0
  148. package/dist/components/upload/UploadFolder.svelte.d.ts +63 -0
  149. package/dist/components/upload/UploadImage.svelte +137 -0
  150. package/dist/components/upload/UploadImage.svelte.d.ts +52 -0
  151. package/dist/components/upload/UploadImages.svelte +172 -0
  152. package/dist/components/upload/UploadImages.svelte.d.ts +52 -0
  153. package/dist/components/upload/UploadZone.svelte +130 -0
  154. package/dist/components/upload/UploadZone.svelte.d.ts +41 -0
  155. package/dist/components/upload/common.d.ts +31 -0
  156. package/dist/components/upload/common.js +103 -0
  157. package/dist/components/upload/context.d.ts +18 -0
  158. package/dist/components/upload/context.js +10 -0
  159. package/dist/components/upload/index.d.ts +16 -0
  160. package/dist/components/upload/index.js +18 -0
  161. package/dist/css/atoms.css +892 -0
  162. package/dist/css/base.css +333 -0
  163. package/dist/css/effects.css +430 -0
  164. package/dist/css/index.css +10 -0
  165. package/dist/css/tokens.css +296 -0
  166. package/dist/fonts.d.ts +1 -0
  167. package/dist/fonts.js +7 -0
  168. package/dist/index.d.ts +68 -0
  169. package/dist/index.js +77 -0
  170. package/dist/lib/announce.d.ts +8 -0
  171. package/dist/lib/announce.js +48 -0
  172. package/dist/lib/controls.d.ts +10 -0
  173. package/dist/lib/controls.js +42 -0
  174. package/dist/lib/dates.d.ts +104 -0
  175. package/dist/lib/dates.js +235 -0
  176. package/dist/lib/dialogs.svelte.d.ts +8 -0
  177. package/dist/lib/dialogs.svelte.js +45 -0
  178. package/dist/lib/dom.d.ts +34 -0
  179. package/dist/lib/dom.js +90 -0
  180. package/dist/lib/field-errors.svelte.d.ts +40 -0
  181. package/dist/lib/field-errors.svelte.js +89 -0
  182. package/dist/lib/files.d.ts +74 -0
  183. package/dist/lib/files.js +215 -0
  184. package/dist/lib/inline-md.d.ts +1 -0
  185. package/dist/lib/inline-md.js +36 -0
  186. package/dist/lib/invalid.d.ts +4 -0
  187. package/dist/lib/invalid.js +35 -0
  188. package/dist/lib/list-search.d.ts +9 -0
  189. package/dist/lib/list-search.js +27 -0
  190. package/dist/lib/menu.svelte.d.ts +39 -0
  191. package/dist/lib/menu.svelte.js +98 -0
  192. package/dist/lib/morph.svelte.d.ts +17 -0
  193. package/dist/lib/morph.svelte.js +46 -0
  194. package/dist/lib/motion.d.ts +115 -0
  195. package/dist/lib/motion.js +174 -0
  196. package/dist/lib/observe.d.ts +36 -0
  197. package/dist/lib/observe.js +142 -0
  198. package/dist/lib/reveal.d.ts +7 -0
  199. package/dist/lib/reveal.js +28 -0
  200. package/dist/lib/roving.d.ts +16 -0
  201. package/dist/lib/roving.js +35 -0
  202. package/dist/lib/runs.d.ts +18 -0
  203. package/dist/lib/runs.js +25 -0
  204. package/dist/lib/scroll-fade.d.ts +4 -0
  205. package/dist/lib/scroll-fade.js +71 -0
  206. package/dist/lib/spotlight.d.ts +4 -0
  207. package/dist/lib/spotlight.js +109 -0
  208. package/dist/lib/ticks.d.ts +12 -0
  209. package/dist/lib/ticks.js +24 -0
  210. package/dist/lib/tooltip.d.ts +4 -0
  211. package/dist/lib/tooltip.js +110 -0
  212. package/dist/lib/validity.d.ts +16 -0
  213. package/dist/lib/validity.js +36 -0
  214. package/package.json +69 -3
@@ -0,0 +1,430 @@
1
+ /* Light and motion: scroll-edge fades, the lit edge, corner glow, shine, shell atmosphere, the working shimmer, the spotlight and dialog motion. */
2
+
3
+ /* ---------- scroll fade ---------- */
4
+ /* Set by the scrollFade attachment (../lib/scroll-fade.js) on scroll areas that overflow: the top edge fades while there's
5
+ content above ("above"), the bottom edge while there's more below ("below"); each eases back to solid at its end.
6
+ The band reserved by scroll-padding-top (a sticky header) stays solid, and the fade starts under it.
7
+ Layers: the fades, then solid strips over the vertical and horizontal scrollbars so they stay crisp.
8
+ Override the height per area with --scroll-fade. Pointing at or keyboard-focusing inside the area clears the fades,
9
+ so nothing you're working with is dimmed. */
10
+ @property --scroll-fade-t {
11
+ syntax: '<length>';
12
+ inherits: false;
13
+ initial-value: 0px;
14
+ }
15
+ @property --scroll-fade-b {
16
+ syntax: '<length>';
17
+ inherits: false;
18
+ initial-value: 0px;
19
+ }
20
+ [data-scroll-fade] {
21
+ --scroll-fade-t: 0px;
22
+ --scroll-fade-b: 0px;
23
+ --scroll-fade-mask:
24
+ linear-gradient(
25
+ to bottom,
26
+ #000 var(--scroll-fade-inset, 0px),
27
+ transparent var(--scroll-fade-inset, 0px),
28
+ #000 calc(var(--scroll-fade-inset, 0px) + var(--scroll-fade-t)),
29
+ #000 calc(100% - var(--scroll-fade-sb-h, 0px) - var(--scroll-fade-b)),
30
+ transparent calc(100% - var(--scroll-fade-sb-h, 0px))
31
+ ),
32
+ linear-gradient(#000, #000), linear-gradient(#000, #000);
33
+ transition:
34
+ --scroll-fade-t var(--dur-slow) var(--ease-out),
35
+ --scroll-fade-b var(--dur-slow) var(--ease-out);
36
+ -webkit-mask-image: var(--scroll-fade-mask);
37
+ mask-image: var(--scroll-fade-mask);
38
+ -webkit-mask-size:
39
+ 100% 100%,
40
+ var(--scroll-fade-sb-w, 0px) 100%,
41
+ 100% var(--scroll-fade-sb-h, 0px);
42
+ mask-size:
43
+ 100% 100%,
44
+ var(--scroll-fade-sb-w, 0px) 100%,
45
+ 100% var(--scroll-fade-sb-h, 0px);
46
+ -webkit-mask-position:
47
+ 0 0,
48
+ 100% 0,
49
+ 0 100%;
50
+ mask-position:
51
+ 0 0,
52
+ 100% 0,
53
+ 0 100%;
54
+ -webkit-mask-repeat: no-repeat;
55
+ mask-repeat: no-repeat;
56
+ }
57
+ [data-scroll-fade~='above'] {
58
+ --scroll-fade-t: var(--scroll-fade, 48px);
59
+ }
60
+ [data-scroll-fade~='below'] {
61
+ --scroll-fade-b: var(--scroll-fade, 48px);
62
+ }
63
+ /* Keyboard focus only: a click also focuses, and that focus outlives the pointer leaving. */
64
+ [data-scroll-fade]:focus-visible,
65
+ [data-scroll-fade]:has(:focus-visible) {
66
+ --scroll-fade-t: 0px;
67
+ --scroll-fade-b: 0px;
68
+ }
69
+ /* Real hover only; on touch screens it sticks after a tap. */
70
+ @media (hover: hover) {
71
+ [data-scroll-fade]:hover {
72
+ --scroll-fade-t: 0px;
73
+ --scroll-fade-b: 0px;
74
+ }
75
+ }
76
+ @media (prefers-reduced-motion: reduce) {
77
+ [data-scroll-fade] {
78
+ transition: none;
79
+ }
80
+ }
81
+
82
+ /* ---------- edges ---------- */
83
+ /* Linear's lit corner (their .edgeHighlightRing): the element's hairline in --edge-b, with --edge-a stacked on top inside a
84
+ radial at the top-left corner, solid for the first --edge-plateau and fading out by --edge-r. --edge-shadow rings the outside.
85
+ .edge draws it over the element's outer edge (give the element border: 0). Tune per element with --edge-a (corner colour),
86
+ --edge-b (hairline), --edge-r (reach), --edge-w (width), --edge-x / --edge-y (which corner).
87
+ Scroll containers (menus, popovers, dialogs) can't host the ring since it would scroll with them; they paint it as background
88
+ layers instead: border: 1px solid transparent; background: linear-gradient(<bg>, <bg>) padding-box, var(--edge-grad-float).
89
+ The tokens' layers carry their own box (border-box, no-repeat), so the hairline shows through the transparent border
90
+ and the lit corner is drawn once, at the top left, and nowhere else. A fill of your own goes on padding-box. */
91
+ :where(.edge) {
92
+ position: relative;
93
+ isolation: isolate;
94
+ box-shadow: var(--edge-shadow);
95
+ }
96
+ .edge::before {
97
+ content: '';
98
+ position: absolute;
99
+ inset: 0;
100
+ z-index: 100;
101
+ pointer-events: none;
102
+ border-radius: inherit;
103
+ padding: var(--edge-w, 1px);
104
+ background:
105
+ radial-gradient(
106
+ var(--edge-r) var(--edge-r) at var(--edge-x, 0) var(--edge-y, 0),
107
+ var(--edge-a, var(--edge-hi)) 0%,
108
+ var(--edge-a, var(--edge-hi)) var(--edge-plateau),
109
+ transparent 100%
110
+ ),
111
+ linear-gradient(var(--edge-b, var(--line-strong)), var(--edge-b, var(--line-strong)));
112
+ -webkit-mask:
113
+ linear-gradient(#000 0 0) content-box,
114
+ linear-gradient(#000 0 0);
115
+ -webkit-mask-composite: xor;
116
+ mask:
117
+ linear-gradient(#000 0 0) content-box,
118
+ linear-gradient(#000 0 0);
119
+ mask-composite: exclude;
120
+ }
121
+
122
+ /* ---------- corner glow ---------- */
123
+ /* Linear's .corner-glow: a 400px soft light (--glow) centred on the top-left corner, so a quarter of it washes the box.
124
+ Only that quarter is drawn (a 200px box with the gradient centred on its corner), so the host needn't clip.
125
+ Add an empty <span class="corner-glow" aria-hidden="true"></span> to a positioned box that is its own stacking
126
+ context (.edge or isolation: isolate); it sits behind the box's content and follows its top-left radius. */
127
+ .corner-glow {
128
+ position: absolute;
129
+ top: 0;
130
+ left: 0;
131
+ z-index: -1;
132
+ width: min(200px, 100%);
133
+ height: min(200px, 100%);
134
+ pointer-events: none;
135
+ border-top-left-radius: inherit;
136
+ background: radial-gradient(200px 200px at 0 0, var(--glow) 0%, transparent 90%);
137
+ }
138
+
139
+ /* ---------- shine ---------- */
140
+ /* Linear's .shine: a second hairline in --shine, visible only inside a 200px radial beam (at --shine-x / --shine-y), so one
141
+ stretch of the edge catches the light. Put .shine on a non-scrolling box; it draws on ::after (so it combines with .edge,
142
+ which uses ::before) and sits just above sticky headers and below scrims, drawers and menus.
143
+ It lies inside the box's 1px border, so its radius is the box's less 1px. CSS can't do arithmetic on an inherited
144
+ radius, so it reads the box's from --shine-r: set that when the box isn't rounded by --r-xl.
145
+ Modal dialogs (.dialog, see atoms.css) always have it. */
146
+ :where(.shine) {
147
+ position: relative;
148
+ }
149
+ .shine::after,
150
+ .dialog::after {
151
+ content: '';
152
+ position: absolute;
153
+ inset: 0;
154
+ z-index: calc(var(--z-sticky) + 1);
155
+ pointer-events: none;
156
+ border-radius: max(0px, calc(var(--shine-r, var(--r-xl)) - 1px));
157
+ border: var(--edge-w, 1px) solid var(--shine);
158
+ -webkit-mask-image: radial-gradient(200px 200px at var(--shine-x, 0) var(--shine-y, 50px), #000 0%, #0009 30%, #0003 50%, #0000 70%);
159
+ mask-image: radial-gradient(200px 200px at var(--shine-x, 0) var(--shine-y, 50px), #000 0%, #0009 30%, #0003 50%, #0000 70%);
160
+ }
161
+
162
+ /* ---------- shell atmosphere ---------- */
163
+ /* Linear's app frame: a lit-relief texture over a soft shading over --bg (only the texture overlay-blends) and a 400px
164
+ light (--glow) centred on the top-left corner (::before, which ignores the pointer). Put .shell on the app's root frame;
165
+ it carries no layout. It is its own stacking context and clips the corner light. ::after is left free. */
166
+ .shell {
167
+ position: relative;
168
+ isolation: isolate;
169
+ overflow: clip;
170
+ background: var(--relief-texture), var(--relief-shade), var(--bg);
171
+ background-blend-mode: overlay, normal, normal;
172
+ }
173
+ .shell::before {
174
+ content: '';
175
+ position: absolute;
176
+ top: 0;
177
+ left: 0;
178
+ z-index: -1;
179
+ width: 400px;
180
+ height: 400px;
181
+ pointer-events: none;
182
+ border-radius: var(--r-pill);
183
+ background: radial-gradient(50% 50%, var(--glow) 0%, transparent 90%);
184
+ translate: -50% -50%;
185
+ }
186
+
187
+ /* ---------- working shimmer ---------- */
188
+ /* Linear's "working" badge: a blurred, tilted stripe (indigo and greys, the image below) sweeps along the pill's hairline
189
+ every 2s. Put .shimmer on the pill and a Shimmer label inside it. Reduced motion leaves it still. */
190
+ :root {
191
+ /* The stripe, two ways: on dark, indigo with pale greys (Linear's); on light the greys would vanish into the
192
+ surface, so it is a deeper indigo, violet and dark grey, blurred less, so more of it lands on the 1px edge. */
193
+ --shimmer-image-dark: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%2072%22%20fill%3D%22none%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cfilter%20id%3D%22blur%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%0A%20%20%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%226%22%20%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22rotate(-30%2090%2036)%22%20filter%3D%22url(%23blur)%22%3E%0A%20%20%20%20%3Crect%20x%3D%2272%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%235e6ad2%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%23e4e5e9%22%20fill-opacity%3D%220.5%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2290%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%239c9da1%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%23e4e5e9%22%20fill-opacity%3D%220.4%22%20%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E');
194
+ --shimmer-image-light: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20180%2072%22%20fill%3D%22none%22%3E%0A%20%20%3Cdefs%3E%0A%20%20%20%20%3Cfilter%20id%3D%22blur%22%20x%3D%22-100%25%22%20y%3D%22-100%25%22%20width%3D%22300%25%22%20height%3D%22300%25%22%3E%0A%20%20%20%20%20%20%3CfeGaussianBlur%20stdDeviation%3D%224%22%20%2F%3E%0A%20%20%20%20%3C%2Ffilter%3E%0A%20%20%3C%2Fdefs%3E%0A%20%20%3Cg%20transform%3D%22rotate%28-30%2090%2036%29%22%20filter%3D%22url%28%23blur%29%22%3E%0A%20%20%20%20%3Crect%20x%3D%2272%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%234f46e5%22%20fill-opacity%3D%221%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%238b5cf6%22%20fill-opacity%3D%220.7%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2290%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%233c4149%22%20fill-opacity%3D%220.9%22%20%2F%3E%0A%20%20%20%20%3Crect%20x%3D%2281%22%20y%3D%2218%22%20width%3D%2218%22%20height%3D%2236%22%20fill%3D%22%236366f1%22%20fill-opacity%3D%220.5%22%20%2F%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E');
195
+ --shimmer-image: var(--shimmer-image-light);
196
+ }
197
+ :root[data-theme='dark'] {
198
+ --shimmer-image: var(--shimmer-image-dark);
199
+ }
200
+ @media (prefers-color-scheme: dark) {
201
+ :root:not([data-theme='light']) {
202
+ --shimmer-image: var(--shimmer-image-dark);
203
+ }
204
+ }
205
+ .shimmer {
206
+ position: relative;
207
+ }
208
+ .shimmer::after {
209
+ content: '';
210
+ position: absolute;
211
+ inset: -1px;
212
+ padding: 1px;
213
+ border-radius: inherit;
214
+ pointer-events: none;
215
+ opacity: var(--shimmer-strength);
216
+ background: var(--shimmer-image) 0 50% / 120px 72px repeat-x;
217
+ -webkit-mask:
218
+ linear-gradient(#000 0 0) content-box,
219
+ linear-gradient(#000 0 0);
220
+ -webkit-mask-composite: xor;
221
+ mask:
222
+ linear-gradient(#000 0 0) content-box,
223
+ linear-gradient(#000 0 0);
224
+ mask-composite: exclude;
225
+ will-change: background-position;
226
+ animation: shimmer-ring 2s linear -0.08s infinite;
227
+ }
228
+ /* Thinking text (Linear's "Thinking…" / "Working…" labels): the label rests at --shimmer-base and a soft band of --shimmer-hi
229
+ sweeps through it every 2s. Both are theme tokens, so it reads on light and dark. Use the Shimmer component rather than
230
+ the class directly. Reduced motion leaves the label still, at --shimmer-base. */
231
+ .shimmer-text {
232
+ color: var(--shimmer-base);
233
+ background: linear-gradient(100deg, var(--shimmer-base) 0%, var(--shimmer-base) 40%, var(--shimmer-hi) 50%, var(--shimmer-base) 60%, var(--shimmer-base) 100%)
234
+ 0 0 / 200% 100%;
235
+ -webkit-background-clip: text;
236
+ background-clip: text;
237
+ -webkit-text-fill-color: transparent;
238
+ animation: shimmer-sweep 2s linear infinite;
239
+ }
240
+ @keyframes shimmer-sweep {
241
+ from {
242
+ background-position: 150% 0;
243
+ }
244
+ to {
245
+ background-position: -50% 0;
246
+ }
247
+ }
248
+ @keyframes shimmer-ring {
249
+ to {
250
+ background-position: 120px 50%;
251
+ }
252
+ }
253
+ @media (prefers-reduced-motion: reduce) {
254
+ .shimmer-text {
255
+ background: none;
256
+ -webkit-text-fill-color: currentColor;
257
+ }
258
+ }
259
+
260
+ /* ---------- spotlight ---------- */
261
+ /* Set for a moment by spotlight() (../lib/spotlight.js) on the element someone was sent to: an accent tint and inset
262
+ hairline fade in, hold, then ease back to the element's own background and shadow (the keyframes leave 0% and 100%
263
+ out, so it starts and ends on whatever the element already has). Reduced motion shows the tint still for the same time. */
264
+ [data-spotlight] {
265
+ animation: spotlight 1.8s var(--ease-out);
266
+ }
267
+ /* With it, a bright band runs once round the element's edge (a 1px ring, cut out as .shimmer's is), coming in and
268
+ fading as it crosses: the ring spotlight() lays over the element for the purpose. Not under reduced motion. */
269
+ .spotlight-ring {
270
+ position: fixed;
271
+ z-index: var(--z-overlay);
272
+ padding: 1px;
273
+ pointer-events: none;
274
+ background: linear-gradient(90deg, transparent, var(--accent) 35%, color-mix(in lch, var(--accent) 45%, white) 50%, var(--accent) 65%, transparent) -150% 0 /
275
+ 60% 100% no-repeat;
276
+ -webkit-mask:
277
+ linear-gradient(#000 0 0) content-box,
278
+ linear-gradient(#000 0 0);
279
+ -webkit-mask-composite: xor;
280
+ mask:
281
+ linear-gradient(#000 0 0) content-box,
282
+ linear-gradient(#000 0 0);
283
+ mask-composite: exclude;
284
+ animation: spotlight-sweep 0.9s var(--ease-out) forwards;
285
+ }
286
+ @keyframes spotlight-sweep {
287
+ 0% {
288
+ background-position: -150% 0;
289
+ opacity: 0;
290
+ }
291
+ 12%,
292
+ 70% {
293
+ opacity: 1;
294
+ }
295
+ 100% {
296
+ background-position: 250% 0;
297
+ opacity: 0;
298
+ }
299
+ }
300
+ /* Alongside it, a few accent lines close in on the element from 24px out, each 120ms after the last, fading in and then
301
+ out as they land on its edge: the rings spotlight() lays over the element with --i set to their order. Shrinking the
302
+ outline's offset rather than scaling keeps the gap the same on every side whatever the element's shape. The last one
303
+ lands (2 × 120ms + 600ms) before spotlight() removes them at 900ms. Not under reduced motion. */
304
+ .spotlight-line {
305
+ position: fixed;
306
+ z-index: var(--z-overlay);
307
+ pointer-events: none;
308
+ outline: 1px solid var(--accent);
309
+ animation: spotlight-line 0.6s var(--ease-out) calc(var(--i, 0) * 120ms) both;
310
+ }
311
+ @keyframes spotlight-line {
312
+ 0% {
313
+ outline-offset: 24px;
314
+ opacity: 0;
315
+ }
316
+ 35% {
317
+ opacity: 0.7;
318
+ }
319
+ 100% {
320
+ outline-offset: 0;
321
+ opacity: 0;
322
+ }
323
+ }
324
+ @keyframes spotlight {
325
+ 12%,
326
+ 50% {
327
+ background-color: var(--accent-soft);
328
+ box-shadow: inset 0 0 0 1px var(--accent-line);
329
+ }
330
+ }
331
+ @media (prefers-reduced-motion: reduce) {
332
+ [data-spotlight] {
333
+ background-color: var(--accent-soft);
334
+ box-shadow: inset 0 0 0 1px var(--accent-line);
335
+ }
336
+ }
337
+
338
+ /* ---------- modals ---------- */
339
+ /* Every <dialog> opened with showModal() fades in while settling from 120% scale to its size, over 180ms on the standard
340
+ decelerate curve. Closing flies it 64px down while it shrinks to 80% and fades out over 200ms on the standard
341
+ accelerate curve. A transition takes the timing of the state it moves to, so the closed rules carry the exit timing
342
+ and the [open] rules the entrance timing; @starting-style gives the entrance its own start, separate from the exit's
343
+ end. The overlay/display transitions with allow-discrete keep it on screen until the exit finishes.
344
+ Motion uses the individual translate and scale properties, each stated on every side, so neither appears only
345
+ mid-transition and nothing else in a transform has to be restated. */
346
+ dialog {
347
+ opacity: 0;
348
+ translate: 0 64px;
349
+ scale: 0.96;
350
+ transition:
351
+ opacity var(--dur-exit) var(--ease-exit),
352
+ translate var(--dur-exit) var(--ease-exit),
353
+ scale var(--dur-exit) var(--ease-exit),
354
+ overlay var(--dur-exit) allow-discrete,
355
+ display var(--dur-exit) allow-discrete;
356
+ }
357
+ dialog[open] {
358
+ opacity: 1;
359
+ translate: 0 0;
360
+ scale: 1;
361
+ transition-duration: var(--dur-enter);
362
+ transition-timing-function: var(--ease-enter), var(--ease-enter), var(--ease-enter), linear, linear;
363
+ }
364
+ @starting-style {
365
+ dialog[open] {
366
+ opacity: 0;
367
+ translate: 0 0;
368
+ scale: 1.16;
369
+ }
370
+ }
371
+ /* Modal dialogs (.dialog: Modal and the confirm and prompt dialogs) bounce in instead: scaling up from 90% on a spring
372
+ (--ease-spring), past full size and back, while the fade finishes in the first 120ms. Closing, they drop 4px, then lift
373
+ 12px above where they sat, shrinking back to 90% and fading out, over 240ms; the scrim fades with them. Scoped to the
374
+ class because Drawer slides by translate and takes the base dialog's timing, which a dip would make lurch. */
375
+ .dialog {
376
+ translate: 0 -12px;
377
+ scale: 0.9;
378
+ transition:
379
+ opacity var(--dur-dip) var(--ease-exit),
380
+ translate var(--dur-dip) var(--ease-dip),
381
+ scale var(--dur-dip) var(--ease-exit),
382
+ overlay var(--dur-dip) allow-discrete,
383
+ display var(--dur-dip) allow-discrete;
384
+ }
385
+ .dialog[open] {
386
+ transition:
387
+ opacity var(--dur-enter) var(--ease-enter),
388
+ translate var(--dur-spring) var(--ease-spring),
389
+ scale var(--dur-spring) var(--ease-spring),
390
+ overlay var(--dur-spring) allow-discrete,
391
+ display var(--dur-spring) allow-discrete;
392
+ }
393
+ @starting-style {
394
+ .dialog[open] {
395
+ opacity: 0;
396
+ translate: 0 0;
397
+ scale: 0.9;
398
+ }
399
+ }
400
+ .dialog::backdrop {
401
+ transition-duration: var(--dur-dip);
402
+ }
403
+ /* A modal holds the page still: scroll gestures inside it, or on the backdrop, don't chain to the page underneath, whether
404
+ or not the dialog scrolls. The backdrop must be a scroll container (overflow: hidden, not clip) for overscroll-behavior
405
+ to apply. Never overflow: hidden on <html> for this: it drops the scrollbar, shifts the layout and breaks sticky. */
406
+ dialog:modal {
407
+ overscroll-behavior: contain;
408
+ }
409
+ dialog::backdrop {
410
+ overflow: hidden;
411
+ overscroll-behavior: contain;
412
+ }
413
+ dialog::backdrop {
414
+ opacity: 0;
415
+ transition:
416
+ opacity var(--dur-exit) var(--ease-exit),
417
+ overlay var(--dur-exit) allow-discrete,
418
+ display var(--dur-exit) allow-discrete;
419
+ }
420
+ dialog[open]::backdrop {
421
+ opacity: 1;
422
+ transition-duration: var(--dur-enter);
423
+ transition-timing-function: var(--ease-enter), linear, linear;
424
+ backdrop-filter: blur(2px);
425
+ }
426
+ @starting-style {
427
+ dialog[open]::backdrop {
428
+ opacity: 0;
429
+ }
430
+ }
@@ -0,0 +1,10 @@
1
+ /* The design system's whole global layer, in cascade order. Import once, before the app's own CSS.
2
+ Each file goes into its own cascade layer under `ds`, declared up front so the order holds whatever loads first.
3
+ Anything unlayered (the app's CSS, every component's scoped <style>) beats all of it whatever its specificity, so
4
+ overriding a token, atom or base rule never needs a heavier selector or !important. An app that layers its own CSS
5
+ declares `@layer ds, app;` (or similar) before importing this. */
6
+ @layer ds.tokens, ds.base, ds.effects, ds.atoms;
7
+ @import './tokens.css' layer(ds.tokens);
8
+ @import './base.css' layer(ds.base);
9
+ @import './effects.css' layer(ds.effects);
10
+ @import './atoms.css' layer(ds.atoms);