@xerios/design-system 0.1.1 → 0.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,48 @@
1
+ # Changelog
2
+
3
+ What changed in each release of `@xerios/design-system`, newest first. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow [semver](https://semver.org/): while on
5
+ 0.x, a breaking change (a renamed or removed token, class, prop or export) bumps the minor version, anything else the
6
+ patch. Breaking entries are marked **Breaking** and say what to change in an app.
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [0.1.2] - 2026-11-20
11
+
12
+ ### Changed
13
+
14
+ - `Dialogs` (`alertDialog`, `confirmDialog`, `promptDialog`): under 860px the dialog sits at the bottom of the screen with its buttons sharing the row; cancel and confirm are spaced further apart.
15
+ - `.dialog`: its backdrop can't be selected.
16
+ - `--ease-spring` (a modal dialog's scale-in): a softer bounce, overshooting by about 8% instead of 20%.
17
+ - `ButtonGroup`, `Segmented`, `RadioGroup`: unchosen options have muted text until hovered; the chosen one stays clear.
18
+ - `FilterChip` (and `FilterBar`'s filters): resting fill a step stronger (`--control-2`), so a filter stands out more.
19
+
20
+ ### Removed
21
+
22
+ - **Breaking** `Button`: the `pressed` prop and the flat look of a toggled `.btn[aria-pressed="true"]` are gone. Drop
23
+ `bind:pressed` from your buttons; for an on/off choice use a `Switch`, `Segmented` or `ButtonGroup`.
24
+
25
+ ## [0.1.1] - 2026-11-20
26
+
27
+ ### Added
28
+
29
+ - `Button`: `pressed` (bindable) makes it a toggle button (`aria-pressed`), flipped on each press. Toggled on, a
30
+ secondary `.btn` drops its fill and shadow and keeps its hairline; any `.btn[aria-pressed="true"]` gets the same look.
31
+
32
+ ### Changed
33
+
34
+ - `ButtonGroup`, `Segmented`, `RadioGroup`: flat at rest; only the chosen option is filled and raised.
35
+ - `FilterBar`: a filter left with no value leaves `filters` at once; its chip stays on the row until its panel closes,
36
+ and picking a value again puts it back in its place.
37
+ - `FilterBar`: Backspace in the add panel's value step goes back to the field list from any editor, unless it deletes
38
+ something there (typed text, a word).
39
+
40
+ ## [0.1.0] - 2026-11-20
41
+
42
+ First release: theme tokens, global CSS (`base`, `effects`, `atoms`), the components listed in the README and the
43
+ `lib/` helpers.
44
+
45
+ [Unreleased]: https://github.com/Xerios/design-system/compare/v0.1.2...HEAD
46
+ [0.1.2]: https://github.com/Xerios/design-system/compare/v0.1.1...v0.1.2
47
+ [0.1.1]: https://github.com/Xerios/design-system/compare/v0.1.0...v0.1.1
48
+ [0.1.0]: https://github.com/Xerios/design-system/releases/tag/v0.1.0
package/README.md CHANGED
@@ -168,7 +168,7 @@ wrapper for display components, the control itself (input, button) for inputs, P
168
168
  | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
169
169
  | `Icon` | Any icon (Phosphor regular) | `name`, `size` sm/md/lg, `label` (only if it carries meaning) |
170
170
  | `empty/` (`Empty`, `Empty.Error`) | Empty state; `Empty.Error` for a view that failed to load, with a retry (an alert) | `title`, `body`, `level`, `icon`, children for actions; Error: `title`, `message`, `onretry` (may be async), `retryLabel` |
171
- | `Button` | Every `.btn` / `.icon-btn` with behaviour: an icon, async actions (spinner and `pendingLabel` while the promise runs, presses ignored meanwhile, a rejection's message in a bubble under it), links drawn as buttons | `variant` secondary/primary/danger, `small`, `icon`, `iconOnly` + `label`, `href`, `type`, `onclick` (may return a promise), `pending`, `pendingLabel`, `onerror`, `pressed` (bindable; a toggle) |
171
+ | `Button` | Every `.btn` / `.icon-btn` with behaviour: an icon, async actions (spinner and `pendingLabel` while the promise runs, presses ignored meanwhile, a rejection's message in a bubble under it), links drawn as buttons | `variant` secondary/primary/danger, `small`, `icon`, `iconOnly` + `label`, `href`, `type`, `onclick` (may return a promise), `pending`, `pendingLabel`, `onerror` |
172
172
  | `ErrorMessage` | Error text: inline, or a dismissible bubble under a control | `message`, `id`, `floating`, `ondismiss` |
173
173
  | `Notice` | Inline notice about a standing condition | `tone`, `icon`, children for the text |
174
174
  | `Shimmer` | "Working…" text | `text` or children, `active`, `as` |
@@ -7,7 +7,6 @@
7
7
  * <Button iconOnly icon="refresh" label="Refresh" onclick={reload} />
8
8
  * <Button type="submit" form="new-site" variant="primary" pending={submitting}>Create</Button>
9
9
  * <Button href="/">Go to apps</Button>
10
- * <Button icon="eye" bind:pressed={showHidden}>Show hidden</Button>
11
10
  *
12
11
  * onclick may return a promise. Until it settles the button is busy, drawn as Select is while loading: it drops its
13
12
  * fill (a solid one becomes an outlined pill), the working sweep runs along its edge (.shimmer) and its label shimmers
@@ -20,8 +19,6 @@
20
19
  * pending: busy from outside, e.g. a form submit button while its form's request runs.
21
20
  *
22
21
  * variant: secondary (default) | primary | danger. small: the 24px size. icon: an Icon name, before the label.
23
- * pressed: makes it a toggle button (aria-pressed); each press flips it before onclick runs, so use bind:pressed.
24
- * Toggled on, a secondary button drops its fill and keeps only its hairline. Leave it undefined for an ordinary button.
25
22
  * iconOnly: the round .icon-btn showing just the icon; `label` is then required, and becomes its accessible name and
26
23
  * its tooltip. href: a link drawn as a button (navigation, never an action). disabled: as on any button.
27
24
  * Other attributes (class, form, autofocus…) and attachments go to the <button> (or <a>).
@@ -45,7 +42,6 @@
45
42
  * @property {boolean} [pending]
46
43
  * @property {string} [pendingLabel]
47
44
  * @property {(error: unknown) => void} [onerror]
48
- * @property {boolean} [pressed] a toggle button's state (bindable); undefined for an ordinary button
49
45
  * @property {boolean} [disabled]
50
46
  * @property {import('svelte').Snippet} [children]
51
47
  */
@@ -62,7 +58,6 @@
62
58
  pending = false,
63
59
  pendingLabel,
64
60
  onerror,
65
- pressed = $bindable(),
66
61
  disabled = false,
67
62
  class: className,
68
63
  children,
@@ -94,7 +89,6 @@
94
89
  return
95
90
  }
96
91
  error = ''
97
- if (pressed !== undefined) pressed = !pressed
98
92
  const result = onclick?.(event)
99
93
  if (!(result instanceof Promise)) return
100
94
  running = true
@@ -128,7 +122,6 @@
128
122
  style:anchor-name={anchor}
129
123
  {disabled}
130
124
  aria-label={iconOnly ? label : undefined}
131
- aria-pressed={pressed}
132
125
  aria-busy={busy || undefined}
133
126
  aria-disabled={busy || undefined}
134
127
  aria-describedby={error ? `${uid}-error` : undefined}
@@ -18,10 +18,6 @@ declare const Button: import("svelte").Component<{
18
18
  pending?: boolean | undefined;
19
19
  pendingLabel?: string | undefined;
20
20
  onerror?: ((error: unknown) => void) | undefined;
21
- /**
22
- * a toggle button's state (bindable); undefined for an ordinary button
23
- */
24
- pressed?: boolean | undefined;
25
21
  disabled?: boolean | undefined;
26
22
  children?: import("svelte").Snippet<[]> | undefined;
27
23
  } & Omit<import("svelte/elements").HTMLButtonAttributes & import("svelte/elements").HTMLAnchorAttributes, keyof {
@@ -39,13 +35,9 @@ declare const Button: import("svelte").Component<{
39
35
  pending?: boolean | undefined;
40
36
  pendingLabel?: string | undefined;
41
37
  onerror?: ((error: unknown) => void) | undefined;
42
- /**
43
- * a toggle button's state (bindable); undefined for an ordinary button
44
- */
45
- pressed?: boolean | undefined;
46
38
  disabled?: boolean | undefined;
47
39
  children?: import("svelte").Snippet<[]> | undefined;
48
- }>, {}, "pressed">;
40
+ }>, {}, "">;
49
41
  type Props = {
50
42
  variant?: "secondary" | "primary" | "danger" | undefined;
51
43
  small?: boolean | undefined;
@@ -61,10 +53,6 @@ type Props = {
61
53
  pending?: boolean | undefined;
62
54
  pendingLabel?: string | undefined;
63
55
  onerror?: ((error: unknown) => void) | undefined;
64
- /**
65
- * a toggle button's state (bindable); undefined for an ordinary button
66
- */
67
- pressed?: boolean | undefined;
68
56
  disabled?: boolean | undefined;
69
57
  children?: import("svelte").Snippet<[]> | undefined;
70
58
  };
@@ -116,6 +116,18 @@
116
116
  .dialog-form {
117
117
  display: contents;
118
118
  }
119
+ /* Cancel and confirm held apart, so a quick tap can't land on the wrong one. On a phone they share the row equally. */
120
+ .dialog-foot {
121
+ gap: var(--space-4);
122
+ }
123
+ @media (max-width: 860px) {
124
+ .spacer {
125
+ display: none;
126
+ }
127
+ .dialog-foot > :global(.btn) {
128
+ flex: 1;
129
+ }
130
+ }
119
131
  .body {
120
132
  overflow-wrap: anywhere;
121
133
  white-space: pre-line;
@@ -141,7 +141,7 @@
141
141
  {/if}
142
142
 
143
143
  <style>
144
- /* Segments on one faint control fill, split by hairlines that run the pill's full height. */
144
+ /* Segments on one light control fill, split by hairlines that run the pill's full height. */
145
145
  /* Chrome, not content: its field name and condition are plain spans, which base.css doesn't cover. */
146
146
  .filter-chip {
147
147
  user-select: none;
@@ -151,7 +151,7 @@
151
151
  max-width: 100%;
152
152
  min-height: 26px;
153
153
  border-radius: var(--r-sm);
154
- background: var(--control-1);
154
+ background: var(--control-2);
155
155
  font: var(--w-medium) 12px/14px var(--font-body);
156
156
  white-space: nowrap;
157
157
  }
@@ -63,7 +63,8 @@
63
63
  border: 0;
64
64
  border-radius: 0;
65
65
  background: none;
66
- color: var(--fg);
66
+ /* Unchosen options are dimmed until hovered; the chosen one is clear. */
67
+ color: var(--muted);
67
68
  font-size: 12px;
68
69
  line-height: 14px;
69
70
  font-weight: var(--w-medium);
@@ -89,8 +90,10 @@
89
90
  }
90
91
  button:not([aria-checked='true']):hover {
91
92
  background: var(--control-2);
93
+ color: var(--fg);
92
94
  }
93
95
  [aria-checked='true'] {
96
+ color: var(--fg);
94
97
  background: var(--control-4);
95
98
  box-shadow: var(--shadow-btn);
96
99
  }
@@ -106,7 +106,8 @@
106
106
  border: 0;
107
107
  border-radius: calc(var(--r) - 2px);
108
108
  background: none;
109
- color: var(--fg);
109
+ /* Unchosen options are dimmed until hovered; the chosen one is clear. */
110
+ color: var(--muted);
110
111
  font-size: 12px;
111
112
  line-height: 14px;
112
113
  font-weight: var(--w-medium);
@@ -119,6 +120,7 @@
119
120
  }
120
121
  button:not([aria-checked='true']):hover {
121
122
  background: var(--control-2);
123
+ color: var(--fg);
122
124
  }
123
125
  [aria-checked='true'] {
124
126
  color: var(--fg);
@@ -57,7 +57,8 @@
57
57
  line-height: 14px;
58
58
  font-weight: var(--w-medium);
59
59
  cursor: pointer;
60
- color: var(--fg);
60
+ /* Unchosen options are dimmed until hovered; the chosen one is clear. */
61
+ color: var(--muted);
61
62
  transition:
62
63
  color var(--dur) var(--ease-out),
63
64
  background-color var(--dur) var(--ease-out),
@@ -65,8 +66,10 @@
65
66
  }
66
67
  button:not([aria-checked='true']):hover {
67
68
  background: var(--control-2);
69
+ color: var(--fg);
68
70
  }
69
71
  [aria-checked='true'] {
72
+ color: var(--fg);
70
73
  background: var(--control-4);
71
74
  box-shadow:
72
75
  inset 0 0 0 1px var(--line),
@@ -2,9 +2,7 @@
2
2
 
3
3
  /* ---------- controls ---------- */
4
4
  /* Linear's pill buttons: secondary is a translucent fill with an inset hairline; primary is solid indigo; icon buttons are ghost circles.
5
- The solid buttons (primary, danger) are raised: their top inner edge catches the light.
6
- A toggled secondary button (aria-pressed="true", Button's `pressed`) is flat: just its usual hairline, no fill at rest. It
7
- still fills on hover and press (the rules below outrank it), and its text stays --fg. */
5
+ The solid buttons (primary, danger) are raised: their top inner edge catches the light. */
8
6
  .btn {
9
7
  display: inline-flex;
10
8
  align-items: center;
@@ -34,11 +32,6 @@
34
32
  filter var(--dur) var(--ease-out);
35
33
  }
36
34
 
37
- .btn:where([aria-pressed='true']) {
38
- background: none;
39
- box-shadow: none;
40
- }
41
-
42
35
  .btn :where(.icon) {
43
36
  color: var(--muted);
44
37
  transition: color var(--dur) var(--ease-out);
@@ -591,6 +584,15 @@
591
584
  width: min(var(--dialog-width, 420px), calc(100% - var(--space-8)));
592
585
  }
593
586
 
587
+ /* On a phone a question sits at the bottom of the screen, within the thumb's reach, and the full width less the gutters. */
588
+ @media (max-width: 860px) {
589
+ .dialog.confirm {
590
+ width: calc(100% - var(--space-8));
591
+ max-height: calc(100dvh - var(--space-8));
592
+ margin: auto auto var(--space-4);
593
+ }
594
+ }
595
+
594
596
  /* Only `display` depends on [open]: it is held through the closing transition, so the layout can't change mid-fade. */
595
597
  .dialog[open] {
596
598
  display: flex;
@@ -602,6 +604,8 @@
602
604
  var(--grain) 0 0 / 256px 256px,
603
605
  var(--scrim);
604
606
  backdrop-filter: blur(2px);
607
+ -webkit-user-select: none;
608
+ user-select: none;
605
609
  }
606
610
 
607
611
  .dialog-head {
package/dist/css/base.css CHANGED
@@ -294,8 +294,7 @@ kbd {
294
294
  [role='radio'][aria-checked='true'],
295
295
  [role='option'].active,
296
296
  [role^='menuitem']:focus,
297
- .icon-btn:is([aria-pressed='true'], [aria-expanded='true']),
298
- .btn[aria-pressed='true'] {
297
+ .icon-btn:is([aria-pressed='true'], [aria-expanded='true']) {
299
298
  background: Highlight !important;
300
299
  color: HighlightText !important;
301
300
  }
@@ -165,50 +165,50 @@
165
165
  --dur-enter: 120ms;
166
166
  --ease-exit: cubic-bezier(0.3, 0, 1, 1);
167
167
  --dur-exit: 80ms;
168
- /* Modal dialogs' own motion. Spring: a damped spring that overshoots by a fifth and settles back (the bounce a dialog
168
+ /* Modal dialogs' own motion. Spring: a damped spring that overshoots by about 8% and settles back (the bounce a dialog
169
169
  scales in with). Dip: sinks to a third of the way below the start by 30%, then accelerates to the end (the small
170
170
  drop before a dialog lifts away). Both are sampled curves, so they go past 0 and 1 where cubic-bezier() can't shape them. */
171
171
  --ease-spring: linear(
172
172
  0,
173
- 0.047,
174
- 0.167,
175
- 0.332,
176
- 0.515,
177
- 0.695,
178
- 0.857,
179
- 0.991,
180
- 1.092,
181
- 1.16,
182
- 1.196,
183
- 1.205,
184
- 1.194,
185
- 1.168,
186
- 1.134,
187
- 1.096,
188
- 1.059,
189
- 1.027,
190
- 1,
191
- 0.979,
192
- 0.966,
193
- 0.959,
194
- 0.958,
195
- 0.961,
196
- 0.966,
197
- 0.973,
198
- 0.981,
199
- 0.988,
200
- 0.995,
201
- 1.001,
202
- 1.005,
203
- 1.007,
204
- 1.008,
173
+ 0.049,
174
+ 0.168,
175
+ 0.322,
176
+ 0.485,
177
+ 0.639,
178
+ 0.773,
179
+ 0.881,
180
+ 0.963,
181
+ 1.021,
182
+ 1.056,
183
+ 1.075,
184
+ 1.08,
185
+ 1.076,
186
+ 1.066,
187
+ 1.054,
188
+ 1.041,
189
+ 1.029,
190
+ 1.018,
205
191
  1.009,
206
- 1.008,
207
- 1.007,
208
- 1.005,
209
- 1.004,
210
- 1.002,
192
+ 1.003,
193
+ 0.998,
194
+ 0.996,
195
+ 0.994,
196
+ 0.994,
197
+ 0.994,
198
+ 0.995,
199
+ 0.996,
200
+ 0.997,
201
+ 0.998,
202
+ 0.999,
203
+ 0.999,
204
+ 1.0,
205
+ 1.0,
206
+ 1.0,
207
+ 1.0,
211
208
  1.001,
209
+ 1.0,
210
+ 1.0,
211
+ 1.0,
212
212
  1
213
213
  );
214
214
  --dur-spring: 400ms;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xerios/design-system",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Linear-style design system for Svelte 5: theme tokens, global CSS and generic components",
5
5
  "keywords": [
6
6
  "svelte",
@@ -19,7 +19,8 @@
19
19
  "bugs": "https://github.com/Xerios/design-system/issues",
20
20
  "type": "module",
21
21
  "files": [
22
- "dist"
22
+ "dist",
23
+ "CHANGELOG.md"
23
24
  ],
24
25
  "sideEffects": [
25
26
  "./dist/fonts.js",