@carissa-io/theme-default 0.3.19 → 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 +9 -0
- package/README.md +6 -1
- package/dist/index.css +105 -0
- package/package.json +14 -4
- package/scss/_tokens.scss +8 -0
- package/scss/index.scss +30 -0
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 `-
|
|
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
|
@@ -5830,6 +5830,24 @@ button.c-theme-switch:focus-visible {
|
|
|
5830
5830
|
min-height: 0;
|
|
5831
5831
|
}
|
|
5832
5832
|
|
|
5833
|
+
.c-prompt-input .c-prompt-input__input .c-input__box {
|
|
5834
|
+
border: 0;
|
|
5835
|
+
background: transparent;
|
|
5836
|
+
padding-top: 0.8125rem;
|
|
5837
|
+
padding-bottom: 0.8125rem;
|
|
5838
|
+
padding-left: 0.25rem;
|
|
5839
|
+
padding-right: 0.25rem;
|
|
5840
|
+
min-height: 0;
|
|
5841
|
+
}
|
|
5842
|
+
.c-prompt-input .c-prompt-input__input .c-input__box:focus-within {
|
|
5843
|
+
box-shadow: none;
|
|
5844
|
+
}
|
|
5845
|
+
|
|
5846
|
+
.c-prompt-input:focus-within {
|
|
5847
|
+
border-color: var(--c-focus);
|
|
5848
|
+
box-shadow: 0 0 0 1px var(--c-focus);
|
|
5849
|
+
}
|
|
5850
|
+
|
|
5833
5851
|
.c-prompt-input__send,
|
|
5834
5852
|
.c-prompt-input__stop {
|
|
5835
5853
|
flex: 0 0 auto;
|
|
@@ -5876,3 +5894,90 @@ button.c-theme-switch:focus-visible {
|
|
|
5876
5894
|
.c-message-actions__action--copied {
|
|
5877
5895
|
color: var(--c-success);
|
|
5878
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.
|
|
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",
|
|
@@ -106,9 +106,11 @@
|
|
|
106
106
|
"@carissa-io/components-streaming-text": "^0.1.0",
|
|
107
107
|
"@carissa-io/components-message": "^0.1.0",
|
|
108
108
|
"@carissa-io/components-message-list": "^0.1.0",
|
|
109
|
-
"@carissa-io/components-prompt-input": "^0.1.
|
|
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",
|
|
@@ -379,13 +388,14 @@
|
|
|
379
388
|
"@carissa-io/components-phone": "^0.1.0",
|
|
380
389
|
"@carissa-io/components-popover": "^0.1.1",
|
|
381
390
|
"@carissa-io/components-progress": "^0.1.0",
|
|
382
|
-
"@carissa-io/components-prompt-input": "^0.1.
|
|
391
|
+
"@carissa-io/components-prompt-input": "^0.1.2",
|
|
383
392
|
"@carissa-io/components-prose": "^0.1.0",
|
|
384
393
|
"@carissa-io/components-radio-group": "^0.1.1",
|
|
385
394
|
"@carissa-io/components-rating": "^0.1.0",
|
|
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
|
@@ -1828,6 +1828,16 @@
|
|
|
1828
1828
|
$c-prompt-input-actions-gap: 0.25rem,
|
|
1829
1829
|
$c-prompt-input-input-min-width: 0,
|
|
1830
1830
|
$c-prompt-input-input-resize: none,
|
|
1831
|
+
// One box, not a box in a box: the field inside is flat, as tall as the 44px send button on one line, and the composer's own
|
|
1832
|
+
// border shows the focus (the Input's ring is turned off inside it).
|
|
1833
|
+
$c-prompt-input-input-border: 0,
|
|
1834
|
+
$c-prompt-input-input-background: transparent,
|
|
1835
|
+
$c-prompt-input-input-padding-y: 0.8125rem,
|
|
1836
|
+
$c-prompt-input-input-padding-x: 0.25rem,
|
|
1837
|
+
$c-prompt-input-input-box-min-height: 0,
|
|
1838
|
+
$c-prompt-input-input-focus-shadow: none,
|
|
1839
|
+
$c-prompt-input-border-color-focus: $var-focus,
|
|
1840
|
+
$c-prompt-input-focus-shadow: 0 0 0 $focus-width $var-focus,
|
|
1831
1841
|
$c-prompt-input-disabled-opacity: 1
|
|
1832
1842
|
);
|
|
1833
1843
|
|
|
@@ -1851,3 +1861,23 @@
|
|
|
1851
1861
|
$c-message-actions-pressed-color: $var-info,
|
|
1852
1862
|
$c-message-actions-copied-color: $var-success
|
|
1853
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
|
+
);
|