@carissa-io/theme-default 0.3.20 → 0.3.21

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/DESIGN.md CHANGED
@@ -486,6 +486,15 @@ From [components-suggested-prompts](components/components-suggested-prompts): `S
486
486
  ## Message actions
487
487
  From [components-message-actions](components/components-message-actions): `MessageActions`. Quiet ghost icon buttons (transparent, a `--c-surface` fill on hover, `--c-surface-active` while pressed), 0.25rem apart, 16px icons in the `--c-text` colour (14.23:1 / 13.88:1 or more on the bubbles). Keyboard focus is the Button's `--c-focus` ring on the item that holds the roving focus. A chosen thumb takes `--c-info` (6.15:1 / 7.05:1 on `--c-surface`, 6.70:1 / 7.79:1 on the background) and a copied action `--c-success` (4.60:1 / 10.29:1 on `--c-surface`, 5.02:1 / 11.36:1 on the background; 3.98:1 on `--c-surface-active` in light, which is above the 3:1 an icon needs). Neither state is colour alone: the thumb carries `aria-pressed` and the copied action swaps the copy icon for a check and takes the `Copied` name, which is also announced. The component has no variable for a fill on the chosen thumb, so the visible cue of the chosen thumb is its colour; a filled icon or a background would be a component release.
488
488
 
489
+ ## Motion
490
+ The motion components read five shared tokens (`$motion-duration-short` 0.25s, `$motion-duration-medium` 0.5s, `$motion-duration-long` 0.9s, `$motion-easing` `cubic-bezier(0.16, 1, 0.3, 1)` and `$motion-stagger` 0.15s), so the character of the motion moves from one place. The easing decelerates: a fast start and a soft landing. They are not interface transitions: those stay on `$transition-duration` (0.2s, `ease`).
491
+
492
+ ## Animate
493
+ From [components-animate](components/components-animate): `Animate`. The entrance lasts the medium token, lands on the shared easing and travels 0.75rem (`rise`) or starts at 96% (`scale`); the `pulse` is a 6% swell. Only opacity and transform move: the block sets no colour, so the text inside keeps the contrast of the palette (17.93:1 / 18.16:1 for `--c-text` on the background) once the entrance has landed, in both modes. The default stays no motion: the page picks one orchestrated moment. Under `prefers-reduced-motion` the element shows its final state at once.
494
+
495
+ ## Sequence
496
+ From [components-sequence](components/components-sequence): `Sequence`. The items come in 0.15s apart (`$motion-stagger`), stacked with 1rem between them; the motion itself is the Animate one, so the block is configured after it. No colour of its own. Under `prefers-reduced-motion` every item is shown at once.
497
+
489
498
  ## Keyboard focus (all controls)
490
499
  One rule keeps the controls coherent: **an outlined control thickens its own border from 1px to 2px, black** (text fields,
491
500
  select, combobox, date picker, textarea, upload, empty checkbox, off switch, radio, secondary and ghost buttons); **a filled
package/README.md CHANGED
@@ -123,6 +123,11 @@ change.
123
123
  | `$focus-color` | `$black` | focus color |
124
124
  | `$focus-width` | `1px` | focus ring width |
125
125
  | `$transition-duration` | `0.2s` | color and border transitions |
126
+ | `$motion-duration-short` | `0.25s` | quick entrances and small moves |
127
+ | `$motion-duration-medium` | `0.5s` | the default entrance (`animate`) |
128
+ | `$motion-duration-long` | `0.9s` | counts, reveals and other slow moves |
129
+ | `$motion-easing` | `cubic-bezier(0.16, 1, 0.3, 1)` | the one decelerating easing of the motion components |
130
+ | `$motion-stagger` | `0.15s` | gap between the items of a `sequence` |
126
131
  | `$label-font-size` | `0.6875rem` | field label size |
127
132
  | `$label-font-weight` | `700` | field label weight |
128
133
  | `$label-letter-spacing` | `0.1em` | field label tracking |
@@ -169,7 +174,7 @@ it: check the names against the theme's `scss/_tokens.scss` before you switch.
169
174
 
170
175
  ## What it configures
171
176
  `components-input`, `-button`, `-checkbox`, `-switch`, `-radio-group`, `-slider`, `-popover`, `-listbox`, `-select`,
172
- `-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree`, `-code`, `-field`, `-number-input`, `-otp-input`, `-phone`, `-tag-input`, `-time-picker`, `-date-range`, `-rating`, `-color-picker`, `-async-autocomplete`, `-section`, `-faq`, `-carousel`, `-visually-hidden`, `-live-region`, `-theme-switch`, `-icon`, `-ai-label`, `-thinking-indicator`, `-streaming-text`, `-message`, `-message-list`, `-prompt-input`, `-suggested-prompts` and `-message-actions`. `components-email`, `-password`, `-url` and `-textarea`
177
+ `-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip`, `-prose`, `-tabs`, `-accordion`, `-breadcrumb`, `-pagination`, `-stepper`, `-sidebar`, `-navbar`, `-drawer`, `-menu`, `-table`, `-list`, `-description-list`, `-stat`, `-empty-state`, `-timeline`, `-tree`, `-code`, `-field`, `-number-input`, `-otp-input`, `-phone`, `-tag-input`, `-time-picker`, `-date-range`, `-rating`, `-color-picker`, `-async-autocomplete`, `-section`, `-faq`, `-carousel`, `-visually-hidden`, `-live-region`, `-theme-switch`, `-icon`, `-ai-label`, `-thinking-indicator`, `-streaming-text`, `-message`, `-message-list`, `-prompt-input`, `-suggested-prompts`, `-message-actions`, `-animate` and `-sequence`. `components-email`, `-password`, `-url` and `-textarea`
173
178
  are styled through the input.
174
179
 
175
180
  The checkbox's mixed state (`indeterminate`, from the next `components-checkbox` release, class `c-checkbox--indeterminate`) is the checked box with a 10px dash in `--c-on-primary`; on an older checkbox the rule is simply unused.
package/dist/index.css CHANGED
@@ -5894,3 +5894,90 @@ button.c-theme-switch:focus-visible {
5894
5894
  .c-message-actions__action--copied {
5895
5895
  color: var(--c-success);
5896
5896
  }
5897
+
5898
+ @keyframes c-animate-fade {
5899
+ from {
5900
+ opacity: 0;
5901
+ }
5902
+ to {
5903
+ opacity: 1;
5904
+ }
5905
+ }
5906
+ @keyframes c-animate-rise {
5907
+ from {
5908
+ opacity: 0;
5909
+ transform: translateY(0.75rem);
5910
+ }
5911
+ to {
5912
+ opacity: 1;
5913
+ transform: none;
5914
+ }
5915
+ }
5916
+ @keyframes c-animate-scale {
5917
+ from {
5918
+ opacity: 0;
5919
+ transform: scale(0.96);
5920
+ }
5921
+ to {
5922
+ opacity: 1;
5923
+ transform: none;
5924
+ }
5925
+ }
5926
+ @keyframes c-animate-pulse {
5927
+ 0%, 100% {
5928
+ transform: none;
5929
+ }
5930
+ 50% {
5931
+ transform: scale(1.06);
5932
+ }
5933
+ }
5934
+ .c-animate--fade[data-state=active],
5935
+ .c-animate--rise[data-state=active],
5936
+ .c-animate--scale[data-state=active],
5937
+ .c-animate--pulse[data-state=active] {
5938
+ animation-duration: var(--c-animate-duration, 0.5s);
5939
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
5940
+ animation-delay: var(--c-animate-delay, 0s);
5941
+ animation-fill-mode: both;
5942
+ }
5943
+
5944
+ .c-animate--fade[data-state=active] {
5945
+ animation-name: c-animate-fade;
5946
+ }
5947
+
5948
+ .c-animate--rise[data-state=active] {
5949
+ animation-name: c-animate-rise;
5950
+ }
5951
+
5952
+ .c-animate--scale[data-state=active] {
5953
+ animation-name: c-animate-scale;
5954
+ }
5955
+
5956
+ .c-animate--pulse[data-state=active] {
5957
+ animation-name: c-animate-pulse;
5958
+ }
5959
+
5960
+ .c-animate--entrance[data-state=idle] {
5961
+ opacity: 0;
5962
+ }
5963
+
5964
+ @media (prefers-reduced-motion: reduce) {
5965
+ .c-animate,
5966
+ .c-animate[data-state] {
5967
+ opacity: 1;
5968
+ transform: none;
5969
+ animation: none;
5970
+ }
5971
+ }
5972
+ .c-sequence {
5973
+ display: flex;
5974
+ flex-direction: column;
5975
+ gap: 1rem;
5976
+ }
5977
+ .c-sequence[data-running=false] * {
5978
+ animation-play-state: paused;
5979
+ }
5980
+
5981
+ .c-sequence__item {
5982
+ --c-animate-delay: calc(var(--c-sequence-index, 0) * var(--c-sequence-stagger, 0.15s));
5983
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carissa-io/theme-default",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "description": "Carissa UI: the default theme (Swiss minimalism) as SCSS variable overrides of the Carissa components, with a compiled CSS build",
5
5
  "type": "module",
6
6
  "style": "dist/index.css",
@@ -108,7 +108,9 @@
108
108
  "@carissa-io/components-message-list": "^0.1.0",
109
109
  "@carissa-io/components-prompt-input": "^0.1.2",
110
110
  "@carissa-io/components-suggested-prompts": "^0.1.0",
111
- "@carissa-io/components-message-actions": "^0.1.0"
111
+ "@carissa-io/components-message-actions": "^0.1.0",
112
+ "@carissa-io/components-animate": "^0.1.0",
113
+ "@carissa-io/components-sequence": "^0.1.0"
112
114
  },
113
115
  "peerDependenciesMeta": {
114
116
  "@carissa-io/components-input": {
@@ -335,12 +337,19 @@
335
337
  },
336
338
  "@carissa-io/components-message-actions": {
337
339
  "optional": true
340
+ },
341
+ "@carissa-io/components-animate": {
342
+ "optional": true
343
+ },
344
+ "@carissa-io/components-sequence": {
345
+ "optional": true
338
346
  }
339
347
  },
340
348
  "devDependencies": {
341
349
  "@carissa-io/components-accordion": "^0.1.0",
342
350
  "@carissa-io/components-ai-label": "^0.1.0",
343
351
  "@carissa-io/components-alert": "^0.1.0",
352
+ "@carissa-io/components-animate": "^0.1.0",
344
353
  "@carissa-io/components-async-autocomplete": "^0.1.0",
345
354
  "@carissa-io/components-avatar": "^0.1.0",
346
355
  "@carissa-io/components-badge": "^0.1.0",
@@ -386,6 +395,7 @@
386
395
  "@carissa-io/components-search": "^0.1.1",
387
396
  "@carissa-io/components-section": "^0.1.0",
388
397
  "@carissa-io/components-select": "^0.1.1",
398
+ "@carissa-io/components-sequence": "^0.1.0",
389
399
  "@carissa-io/components-sidebar": "^0.1.0",
390
400
  "@carissa-io/components-skeleton": "^0.1.0",
391
401
  "@carissa-io/components-slider": "^0.1.1",
package/scss/_tokens.scss CHANGED
@@ -30,6 +30,14 @@ $min-height: 2.75rem; // 44px touch target
30
30
  $focus-color: $black;
31
31
  $focus-width: 1px;
32
32
  $transition-duration: 0.2s;
33
+ // Motion tokens shared by every motion component (entrances, counts, sequences), so the character of the motion moves from one
34
+ // place. They are not interface transitions: those stay on $transition-duration above. One decelerating easing: fast start,
35
+ // soft landing.
36
+ $motion-duration-short: 0.25s;
37
+ $motion-duration-medium: 0.5s;
38
+ $motion-duration-long: 0.9s;
39
+ $motion-easing: cubic-bezier(0.16, 1, 0.3, 1);
40
+ $motion-stagger: 0.15s; // the gap between the items of a sequence
33
41
  $label-font-size: 0.6875rem;
34
42
  $label-font-weight: 700;
35
43
  $label-letter-spacing: 0.1em;
package/scss/index.scss CHANGED
@@ -1861,3 +1861,23 @@
1861
1861
  $c-message-actions-pressed-color: $var-info,
1862
1862
  $c-message-actions-copied-color: $var-success
1863
1863
  );
1864
+
1865
+ // Animate: the entrance lasts the medium motion token and lands on the shared decelerating easing; the rise travels 0.75rem and
1866
+ // the pulse is a 6% swell. It has no colour of its own (opacity and transform only), so both modes follow. The default of the
1867
+ // component stays no motion: the page chooses its one orchestrated moment. Under prefers-reduced-motion every element shows its
1868
+ // final state at once.
1869
+ @use '@carissa-io/components-animate/scss' as animate with (
1870
+ $c-animate-duration: $motion-duration-medium,
1871
+ $c-animate-easing: $motion-easing,
1872
+ $c-animate-distance: 0.75rem,
1873
+ $c-animate-scale-from: 0.96,
1874
+ $c-animate-pulse-scale: 1.06
1875
+ );
1876
+
1877
+ // Sequence: the items come in $motion-stagger apart (the short token is too slow for a list), stacked with 1rem between them.
1878
+ // The motion itself (duration, distance, easing) is the Animate one above, so this block comes after it. No colours.
1879
+ @use '@carissa-io/components-sequence/scss' as sequence with (
1880
+ $c-sequence-stagger: $motion-stagger,
1881
+ $c-sequence-direction: column,
1882
+ $c-sequence-gap: 1rem
1883
+ );