@carissa-io/theme-default 0.3.4 → 0.3.6
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 +45 -0
- package/README.md +1 -1
- package/dist/index.css +799 -0
- package/package.json +47 -2
- package/scss/index.scss +252 -0
package/DESIGN.md
CHANGED
|
@@ -274,6 +274,51 @@ placements. The look of each toast is the Alert's (see above), so its colors, ro
|
|
|
274
274
|
0.875rem button in `--c-text` (14.8:1 or more on every tint). A toast slides 0.75rem from its edge and fades in over `$transition-duration`; with reduced motion
|
|
275
275
|
only the fade stays. The region is in the page, not in the browser's top layer, so a toast shown while a modal is open sits behind the modal's backdrop.
|
|
276
276
|
|
|
277
|
+
## Divider
|
|
278
|
+
From [components-divider](components/components-divider): `Divider`, a 1px line in `--c-muted` (the edge of the cards and fields: 4.74:1 on the background in light, 7.85:1 in dark),
|
|
279
|
+
1rem of space around it. With a label the text is the small `--c-muted` text (0.875rem, same contrast) with 0.75rem between it and each line. Horizontal is an `hr`, vertical and labelled
|
|
280
|
+
ones are `role="separator"`.
|
|
281
|
+
|
|
282
|
+
## Badge
|
|
283
|
+
From [components-badge](components/components-badge): `Badge` in six variants and two sizes (`md` 0.75rem, `sm` 0.6875rem, bold), square like the rest, plus a `dot`. The variants are **tinted
|
|
284
|
+
like the Alert**: 12% of the role color (`--c-primary`, `--c-success`, `--c-warning`, `--c-error`, `--c-info`) over `--c-background` with `color-mix`, a 1px border at 35% of the same color.
|
|
285
|
+
**The text is always `--c-text`**, never the status color: it is 13.6:1 or more on every tint in both modes (light 13.63 to 15.32, dark 13.63 to 15.87), where the raw light `error` on its own tint would
|
|
286
|
+
fail. Neutral is `--c-surface` with a `--c-muted` border (text 16.44:1). The **dot** carries the role color (`--c-muted` for neutral) and is 3:1 or more as a graphic on its tint in both modes: in light 3.81 (error), 4.21 (warning), 4.27 (success), 5.56 (info), 15.97 (primary) and 4.35 (neutral); in dark 6.25 or more. A dot has no text, so the caller gives it `aria-label`.
|
|
287
|
+
|
|
288
|
+
## Tag
|
|
289
|
+
From [components-tag](components/components-tag): `Tag`, a chip with the same six tints, the same text rule (`--c-text`, same ratios) and square corners as the Badge, bold, 0.875rem (`md`) or 0.75rem (`sm`). A removable tag is
|
|
290
|
+
one tab stop and takes the theme focus ring (1px `--c-focus`, offset 2px). The remove "x" is the tag text color at 70%, full on hover. Disabled tags are exempt from contrast (55% opacity).
|
|
291
|
+
|
|
292
|
+
## Link
|
|
293
|
+
From [components-link](components/components-link): `Link` in `default`, `subtle` and `inline`. The default is `--c-primary` (black in light, white in dark: 21:1 and 19.8:1 on the background), bold, **always underlined**: a black link
|
|
294
|
+
beside near-black text is told apart by the underline alone, so there is no un-underlined default. Hover is `--c-primary-hover`. `subtle` is `--c-muted` (4.74:1 light, 7.85:1 dark), `--c-text` on hover. Focus is the theme ring
|
|
295
|
+
(1px `--c-focus`, offset 2px). Disabled is `--c-disabled-text` at full opacity (exempt from contrast, as the other disabled states).
|
|
296
|
+
|
|
297
|
+
## Avatar
|
|
298
|
+
From [components-avatar](components/components-avatar): `Avatar` in five sizes (`xs` 1.5rem to `xl` 5rem), a circle or a square (theme radius, so square). The initials are bold `--c-text` on `--c-surface-active`
|
|
299
|
+
(14.23:1 light, 13.88:1 dark); the placeholder without a name is the empty disc. `AvatarGroup` overlaps avatars by 0.5rem with a 2px ring in `--c-background`, so the separation works in both modes.
|
|
300
|
+
|
|
301
|
+
## Skeleton
|
|
302
|
+
From [components-skeleton](components/components-skeleton): `Skeleton` as a text line, a circle or a rectangle, in `--c-surface-active` (a faint block on purpose: 1.26:1 on the light background, 1.31:1 in dark; it carries no information and is `aria-hidden`).
|
|
303
|
+
The sweep is a band of `--c-background` at 60%, 1.5s per pass; with `prefers-reduced-motion` it is removed and the block stays static.
|
|
304
|
+
|
|
305
|
+
## Progress
|
|
306
|
+
From [components-progress](components/components-progress): `Progress` as a bar (0.25, 0.5 or 0.75rem tall, square ends) or a ring (1.5, 2.5 or 4rem). The track is `--c-surface-active` and the fill `--c-primary` (black in light, white in dark): 16.67:1 and 15.13:1 on
|
|
307
|
+
the track, well above the 3:1 of a graphic. The visible percentage is bold `--c-text`. Indeterminate slides (bar) or turns (ring) in 1.4s; with reduced motion both become a slow opacity pulse (2s).
|
|
308
|
+
|
|
309
|
+
## Tooltip
|
|
310
|
+
From [components-tooltip](components/components-tooltip): `Tooltip`, a short hint on hover and keyboard focus. **The bubble is inverted**: `--c-text` as the background and `--c-background` as the text, so it stands out from
|
|
311
|
+
the page in both modes and needs no shadow. Light: white text on `#171717`, 17.93:1; dark: `#0a0a0a` text on `#f5f5f5`, 18.16:1 (the same ratios separate the bubble from the page as a graphic). Square corners, 0.875rem text,
|
|
312
|
+
0.5rem padding on the block axis and 0.75rem on the inline one, at most 20rem wide, a 0.5rem arrow, 0.5rem from the trigger. The fade follows `$transition-duration` (0.2s) and is removed with reduced motion. It opens after 300ms of hover
|
|
313
|
+
or focus, stays open while the pointer is over it and closes on `Escape`; the bubble is `role="tooltip"` and the trigger gets `aria-describedby`. The hint is never the only way to get information (touch has no hover).
|
|
314
|
+
|
|
315
|
+
## Prose
|
|
316
|
+
From [components-prose](components/components-prose): `Prose`, raw HTML content (markdown, a CMS, an article) with the same hierarchy as `Heading` and `Text`. Body text is `--c-text` at 1rem and a 1.6 line height, 65ch wide (small and
|
|
317
|
+
large scale the text and the headings by 0.875 and 1.125). Headings use the type scale tokens: `h1` and `h2` black (900), `h3` to `h6` bold, with the line heights of the typography block. Links are `--c-primary` and always underlined
|
|
318
|
+
(21:1 light, 19.8:1 dark), `--c-primary-hover` on hover (15.13:1 and 15.72:1). The quote edge, the `hr` and the table borders are `--c-muted` (4.74:1 light, 7.85:1 dark, above the 3:1 of a graphic); the quote text and the figure
|
|
319
|
+
caption are `--c-muted` on the page background too. Code, `pre`, `kbd` and the table head sit on `--c-surface` with `--c-text` (16.44:1 in both modes); `kbd` has a `--c-muted` edge. Everything is square (`$radius`), code uses `$font-family-mono`.
|
|
320
|
+
`--c-muted` is not used for text on `--c-surface` (4.35:1 in light).
|
|
321
|
+
|
|
277
322
|
## Keyboard focus (all controls)
|
|
278
323
|
One rule keeps the controls coherent: **an outlined control thickens its own border from 1px to 2px, black** (text fields,
|
|
279
324
|
select, combobox, date picker, textarea, upload, empty checkbox, off switch, radio, secondary and ghost buttons); **a filled
|
package/README.md
CHANGED
|
@@ -142,7 +142,7 @@ it: check the names against the theme's `scss/_tokens.scss` before you switch.
|
|
|
142
142
|
|
|
143
143
|
## What it configures
|
|
144
144
|
`components-input`, `-button`, `-checkbox`, `-switch`, `-radio-group`, `-slider`, `-popover`, `-listbox`, `-select`,
|
|
145
|
-
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal` and `-
|
|
145
|
+
`-combobox`, `-upload`, `-calendar`, `-date-picker`, `-search`, `-typography`, `-card`, `-alert`, `-spinner`, `-modal`, `-toast`, `-divider`, `-badge`, `-tag`, `-link`, `-avatar`, `-skeleton`, `-progress`, `-tooltip` and `-prose`. `components-email`, `-password`, `-url` and `-textarea`
|
|
146
146
|
are styled through the input.
|
|
147
147
|
|
|
148
148
|
## Change a value
|
package/dist/index.css
CHANGED
|
@@ -1786,3 +1786,802 @@
|
|
|
1786
1786
|
outline: 2px solid currentColor;
|
|
1787
1787
|
outline-offset: 2px;
|
|
1788
1788
|
}
|
|
1789
|
+
|
|
1790
|
+
.c-divider {
|
|
1791
|
+
box-sizing: border-box;
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.c-divider--horizontal {
|
|
1795
|
+
width: 100%;
|
|
1796
|
+
margin: 1rem 0;
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
hr.c-divider {
|
|
1800
|
+
height: 0;
|
|
1801
|
+
border: 0;
|
|
1802
|
+
border-top: 1px solid var(--c-muted);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.c-divider--vertical {
|
|
1806
|
+
display: inline-block;
|
|
1807
|
+
align-self: stretch;
|
|
1808
|
+
width: 0;
|
|
1809
|
+
min-height: 1em;
|
|
1810
|
+
margin: 0 1rem;
|
|
1811
|
+
vertical-align: middle;
|
|
1812
|
+
border-left: 1px solid var(--c-muted);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.c-divider--labeled {
|
|
1816
|
+
display: flex;
|
|
1817
|
+
gap: 0.75rem;
|
|
1818
|
+
align-items: center;
|
|
1819
|
+
font-size: 0.875rem;
|
|
1820
|
+
color: var(--c-muted);
|
|
1821
|
+
}
|
|
1822
|
+
.c-divider--labeled::before, .c-divider--labeled::after {
|
|
1823
|
+
flex: 1 1 auto;
|
|
1824
|
+
height: 0;
|
|
1825
|
+
content: "";
|
|
1826
|
+
border-top: 1px solid var(--c-muted);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.c-divider__label {
|
|
1830
|
+
flex: none;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
.c-badge {
|
|
1834
|
+
box-sizing: border-box;
|
|
1835
|
+
display: inline-flex;
|
|
1836
|
+
gap: 0.25em;
|
|
1837
|
+
align-items: center;
|
|
1838
|
+
justify-content: center;
|
|
1839
|
+
font-weight: 700;
|
|
1840
|
+
line-height: 1.5;
|
|
1841
|
+
white-space: nowrap;
|
|
1842
|
+
vertical-align: middle;
|
|
1843
|
+
border: 1px solid transparent;
|
|
1844
|
+
border-radius: 0;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
.c-badge--md {
|
|
1848
|
+
padding: 0.125rem 0.625rem;
|
|
1849
|
+
font-size: 0.75rem;
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
.c-badge--sm {
|
|
1853
|
+
padding: 0 0.4375rem;
|
|
1854
|
+
font-size: 0.6875rem;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
.c-badge--neutral {
|
|
1858
|
+
color: var(--c-text);
|
|
1859
|
+
background: var(--c-surface);
|
|
1860
|
+
border-color: var(--c-muted);
|
|
1861
|
+
}
|
|
1862
|
+
.c-badge--neutral.c-badge--dot {
|
|
1863
|
+
background: var(--c-muted);
|
|
1864
|
+
border-color: var(--c-muted);
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
.c-badge--primary {
|
|
1868
|
+
color: var(--c-text);
|
|
1869
|
+
background: color-mix(in srgb, var(--c-primary) 12%, var(--c-background));
|
|
1870
|
+
border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-background));
|
|
1871
|
+
}
|
|
1872
|
+
.c-badge--primary.c-badge--dot {
|
|
1873
|
+
background: var(--c-primary);
|
|
1874
|
+
border-color: var(--c-primary);
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
.c-badge--success {
|
|
1878
|
+
color: var(--c-text);
|
|
1879
|
+
background: color-mix(in srgb, var(--c-success) 12%, var(--c-background));
|
|
1880
|
+
border-color: color-mix(in srgb, var(--c-success) 35%, var(--c-background));
|
|
1881
|
+
}
|
|
1882
|
+
.c-badge--success.c-badge--dot {
|
|
1883
|
+
background: var(--c-success);
|
|
1884
|
+
border-color: var(--c-success);
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
.c-badge--warning {
|
|
1888
|
+
color: var(--c-text);
|
|
1889
|
+
background: color-mix(in srgb, var(--c-warning) 12%, var(--c-background));
|
|
1890
|
+
border-color: color-mix(in srgb, var(--c-warning) 35%, var(--c-background));
|
|
1891
|
+
}
|
|
1892
|
+
.c-badge--warning.c-badge--dot {
|
|
1893
|
+
background: var(--c-warning);
|
|
1894
|
+
border-color: var(--c-warning);
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
.c-badge--error {
|
|
1898
|
+
color: var(--c-text);
|
|
1899
|
+
background: color-mix(in srgb, var(--c-error) 12%, var(--c-background));
|
|
1900
|
+
border-color: color-mix(in srgb, var(--c-error) 35%, var(--c-background));
|
|
1901
|
+
}
|
|
1902
|
+
.c-badge--error.c-badge--dot {
|
|
1903
|
+
background: var(--c-error);
|
|
1904
|
+
border-color: var(--c-error);
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
.c-badge--info {
|
|
1908
|
+
color: var(--c-text);
|
|
1909
|
+
background: color-mix(in srgb, var(--c-info) 12%, var(--c-background));
|
|
1910
|
+
border-color: color-mix(in srgb, var(--c-info) 35%, var(--c-background));
|
|
1911
|
+
}
|
|
1912
|
+
.c-badge--info.c-badge--dot {
|
|
1913
|
+
background: var(--c-info);
|
|
1914
|
+
border-color: var(--c-info);
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
.c-badge--dot {
|
|
1918
|
+
width: 0.5rem;
|
|
1919
|
+
height: 0.5rem;
|
|
1920
|
+
padding: 0;
|
|
1921
|
+
border-radius: 50%;
|
|
1922
|
+
}
|
|
1923
|
+
.c-badge--dot.c-badge--sm {
|
|
1924
|
+
width: 0.375rem;
|
|
1925
|
+
height: 0.375rem;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
.c-tag {
|
|
1929
|
+
box-sizing: border-box;
|
|
1930
|
+
display: inline-flex;
|
|
1931
|
+
gap: 0.375rem;
|
|
1932
|
+
align-items: center;
|
|
1933
|
+
max-width: 100%;
|
|
1934
|
+
font-weight: 700;
|
|
1935
|
+
line-height: 1.5;
|
|
1936
|
+
vertical-align: middle;
|
|
1937
|
+
border: 1px solid transparent;
|
|
1938
|
+
border-radius: 0;
|
|
1939
|
+
}
|
|
1940
|
+
.c-tag:focus-visible {
|
|
1941
|
+
outline: 1px solid var(--c-focus);
|
|
1942
|
+
outline-offset: 2px;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
.c-tag--md {
|
|
1946
|
+
padding: 0.125rem 0.625rem;
|
|
1947
|
+
font-size: 0.875rem;
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
.c-tag--sm {
|
|
1951
|
+
padding: 0 0.5rem;
|
|
1952
|
+
font-size: 0.75rem;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
.c-tag__label {
|
|
1956
|
+
min-width: 0;
|
|
1957
|
+
overflow: hidden;
|
|
1958
|
+
text-overflow: ellipsis;
|
|
1959
|
+
white-space: nowrap;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
.c-tag__remove {
|
|
1963
|
+
display: inline-flex;
|
|
1964
|
+
flex: none;
|
|
1965
|
+
align-items: center;
|
|
1966
|
+
justify-content: center;
|
|
1967
|
+
padding: 0;
|
|
1968
|
+
font-size: 1em;
|
|
1969
|
+
line-height: 1;
|
|
1970
|
+
color: inherit;
|
|
1971
|
+
cursor: pointer;
|
|
1972
|
+
background: none;
|
|
1973
|
+
border: 0;
|
|
1974
|
+
border-radius: 50%;
|
|
1975
|
+
opacity: 0.7;
|
|
1976
|
+
}
|
|
1977
|
+
.c-tag__remove:hover:not(:disabled) {
|
|
1978
|
+
opacity: 1;
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
.c-tag--disabled {
|
|
1982
|
+
cursor: not-allowed;
|
|
1983
|
+
opacity: 0.55;
|
|
1984
|
+
}
|
|
1985
|
+
.c-tag--disabled .c-tag__remove {
|
|
1986
|
+
cursor: not-allowed;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
.c-tag--neutral {
|
|
1990
|
+
color: var(--c-text);
|
|
1991
|
+
background: var(--c-surface);
|
|
1992
|
+
border-color: var(--c-muted);
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.c-tag--primary {
|
|
1996
|
+
color: var(--c-text);
|
|
1997
|
+
background: color-mix(in srgb, var(--c-primary) 12%, var(--c-background));
|
|
1998
|
+
border-color: color-mix(in srgb, var(--c-primary) 35%, var(--c-background));
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
.c-tag--success {
|
|
2002
|
+
color: var(--c-text);
|
|
2003
|
+
background: color-mix(in srgb, var(--c-success) 12%, var(--c-background));
|
|
2004
|
+
border-color: color-mix(in srgb, var(--c-success) 35%, var(--c-background));
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
.c-tag--warning {
|
|
2008
|
+
color: var(--c-text);
|
|
2009
|
+
background: color-mix(in srgb, var(--c-warning) 12%, var(--c-background));
|
|
2010
|
+
border-color: color-mix(in srgb, var(--c-warning) 35%, var(--c-background));
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
.c-tag--error {
|
|
2014
|
+
color: var(--c-text);
|
|
2015
|
+
background: color-mix(in srgb, var(--c-error) 12%, var(--c-background));
|
|
2016
|
+
border-color: color-mix(in srgb, var(--c-error) 35%, var(--c-background));
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
.c-tag--info {
|
|
2020
|
+
color: var(--c-text);
|
|
2021
|
+
background: color-mix(in srgb, var(--c-info) 12%, var(--c-background));
|
|
2022
|
+
border-color: color-mix(in srgb, var(--c-info) 35%, var(--c-background));
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
.c-link {
|
|
2026
|
+
font-weight: 700;
|
|
2027
|
+
color: var(--c-primary);
|
|
2028
|
+
text-decoration: underline;
|
|
2029
|
+
cursor: pointer;
|
|
2030
|
+
}
|
|
2031
|
+
.c-link:hover {
|
|
2032
|
+
color: var(--c-primary-hover);
|
|
2033
|
+
text-decoration: underline;
|
|
2034
|
+
}
|
|
2035
|
+
.c-link:focus-visible {
|
|
2036
|
+
outline: 1px solid var(--c-focus);
|
|
2037
|
+
outline-offset: 2px;
|
|
2038
|
+
border-radius: 0;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
.c-link--subtle {
|
|
2042
|
+
color: var(--c-muted);
|
|
2043
|
+
}
|
|
2044
|
+
.c-link--subtle:hover {
|
|
2045
|
+
color: var(--c-text);
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
.c-link--inline {
|
|
2049
|
+
text-decoration: underline;
|
|
2050
|
+
text-underline-offset: 0.15em;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
.c-link--disabled,
|
|
2054
|
+
.c-link--disabled:hover {
|
|
2055
|
+
color: var(--c-disabled-text);
|
|
2056
|
+
text-decoration: underline;
|
|
2057
|
+
cursor: not-allowed;
|
|
2058
|
+
opacity: 1;
|
|
2059
|
+
}
|
|
2060
|
+
|
|
2061
|
+
.c-avatar {
|
|
2062
|
+
--c-avatar-size: 2.5rem;
|
|
2063
|
+
position: relative;
|
|
2064
|
+
box-sizing: border-box;
|
|
2065
|
+
display: inline-flex;
|
|
2066
|
+
flex: none;
|
|
2067
|
+
align-items: center;
|
|
2068
|
+
justify-content: center;
|
|
2069
|
+
width: var(--c-avatar-size);
|
|
2070
|
+
height: var(--c-avatar-size);
|
|
2071
|
+
overflow: hidden;
|
|
2072
|
+
font-size: calc(var(--c-avatar-size) * 0.4);
|
|
2073
|
+
font-weight: 700;
|
|
2074
|
+
line-height: 1;
|
|
2075
|
+
color: var(--c-text);
|
|
2076
|
+
vertical-align: middle;
|
|
2077
|
+
user-select: none;
|
|
2078
|
+
background: var(--c-surface-active);
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
.c-avatar--xs {
|
|
2082
|
+
--c-avatar-size: 1.5rem;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
.c-avatar--sm {
|
|
2086
|
+
--c-avatar-size: 2rem;
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
.c-avatar--md {
|
|
2090
|
+
--c-avatar-size: 2.5rem;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
.c-avatar--lg {
|
|
2094
|
+
--c-avatar-size: 3.5rem;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
.c-avatar--xl {
|
|
2098
|
+
--c-avatar-size: 5rem;
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
.c-avatar--circle {
|
|
2102
|
+
border-radius: 50%;
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
.c-avatar--square {
|
|
2106
|
+
border-radius: 0;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
.c-avatar__initials {
|
|
2110
|
+
text-transform: uppercase;
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
.c-avatar__image {
|
|
2114
|
+
position: absolute;
|
|
2115
|
+
inset: 0;
|
|
2116
|
+
width: 100%;
|
|
2117
|
+
height: 100%;
|
|
2118
|
+
object-fit: cover;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.c-avatar-group {
|
|
2122
|
+
display: inline-flex;
|
|
2123
|
+
align-items: center;
|
|
2124
|
+
}
|
|
2125
|
+
.c-avatar-group > .c-avatar {
|
|
2126
|
+
box-shadow: 0 0 0 2px var(--c-background);
|
|
2127
|
+
}
|
|
2128
|
+
.c-avatar-group > .c-avatar + .c-avatar {
|
|
2129
|
+
margin-inline-start: -0.5rem;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
@keyframes c-skeleton-shimmer {
|
|
2133
|
+
from {
|
|
2134
|
+
background-position: 200% 0;
|
|
2135
|
+
}
|
|
2136
|
+
to {
|
|
2137
|
+
background-position: -200% 0;
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
.c-skeleton {
|
|
2141
|
+
display: block;
|
|
2142
|
+
width: 100%;
|
|
2143
|
+
background-color: var(--c-surface-active);
|
|
2144
|
+
border-radius: 0;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
.c-skeleton--text {
|
|
2148
|
+
height: 1em;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
.c-skeleton--circle {
|
|
2152
|
+
flex: none;
|
|
2153
|
+
width: 2.5rem;
|
|
2154
|
+
height: 2.5rem;
|
|
2155
|
+
border-radius: 50%;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
.c-skeleton--rect {
|
|
2159
|
+
min-height: 1px;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
.c-skeleton--animated {
|
|
2163
|
+
background-image: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--c-background) 60%, transparent) 50%, transparent 100%);
|
|
2164
|
+
background-repeat: no-repeat;
|
|
2165
|
+
background-size: 50% 100%;
|
|
2166
|
+
animation: c-skeleton-shimmer 1.5s linear infinite;
|
|
2167
|
+
}
|
|
2168
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2169
|
+
.c-skeleton--animated {
|
|
2170
|
+
background-image: none;
|
|
2171
|
+
animation: none;
|
|
2172
|
+
}
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
.c-skeleton-lines {
|
|
2176
|
+
display: flex;
|
|
2177
|
+
flex-direction: column;
|
|
2178
|
+
gap: 0.5rem;
|
|
2179
|
+
width: 100%;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
.c-skeleton--last {
|
|
2183
|
+
width: 60%;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
@keyframes c-progress-slide {
|
|
2187
|
+
from {
|
|
2188
|
+
transform: translateX(-100%);
|
|
2189
|
+
}
|
|
2190
|
+
to {
|
|
2191
|
+
transform: translateX(250%);
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
@keyframes c-progress-spin {
|
|
2195
|
+
to {
|
|
2196
|
+
transform: rotate(360deg);
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
@keyframes c-progress-pulse {
|
|
2200
|
+
0%, 100% {
|
|
2201
|
+
opacity: 1;
|
|
2202
|
+
}
|
|
2203
|
+
50% {
|
|
2204
|
+
opacity: 0.35;
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
.c-progress {
|
|
2208
|
+
--c-progress-bar-height: 0.5rem;
|
|
2209
|
+
--c-progress-circular-size: 2.5rem;
|
|
2210
|
+
box-sizing: border-box;
|
|
2211
|
+
font-size: 0.75rem;
|
|
2212
|
+
font-weight: 700;
|
|
2213
|
+
line-height: 1;
|
|
2214
|
+
color: var(--c-text);
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
.c-progress--sm {
|
|
2218
|
+
--c-progress-bar-height: 0.25rem;
|
|
2219
|
+
--c-progress-circular-size: 1.5rem;
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
.c-progress--md {
|
|
2223
|
+
--c-progress-bar-height: 0.5rem;
|
|
2224
|
+
--c-progress-circular-size: 2.5rem;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
.c-progress--lg {
|
|
2228
|
+
--c-progress-bar-height: 0.75rem;
|
|
2229
|
+
--c-progress-circular-size: 4rem;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
.c-progress--bar {
|
|
2233
|
+
display: flex;
|
|
2234
|
+
gap: 0.75rem;
|
|
2235
|
+
align-items: center;
|
|
2236
|
+
width: 100%;
|
|
2237
|
+
}
|
|
2238
|
+
.c-progress--bar .c-progress__track {
|
|
2239
|
+
position: relative;
|
|
2240
|
+
flex: 1;
|
|
2241
|
+
height: var(--c-progress-bar-height);
|
|
2242
|
+
overflow: hidden;
|
|
2243
|
+
background: var(--c-surface-active);
|
|
2244
|
+
border-radius: 0;
|
|
2245
|
+
}
|
|
2246
|
+
.c-progress--bar .c-progress__fill {
|
|
2247
|
+
display: block;
|
|
2248
|
+
height: 100%;
|
|
2249
|
+
background: var(--c-primary);
|
|
2250
|
+
border-radius: inherit;
|
|
2251
|
+
transition: width 0.2s ease;
|
|
2252
|
+
}
|
|
2253
|
+
.c-progress--bar.c-progress--indeterminate .c-progress__fill {
|
|
2254
|
+
width: 40%;
|
|
2255
|
+
transition: none;
|
|
2256
|
+
animation: c-progress-slide 1.4s ease-in-out infinite;
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
.c-progress--circular {
|
|
2260
|
+
position: relative;
|
|
2261
|
+
display: inline-flex;
|
|
2262
|
+
flex: none;
|
|
2263
|
+
align-items: center;
|
|
2264
|
+
justify-content: center;
|
|
2265
|
+
width: var(--c-progress-circular-size);
|
|
2266
|
+
height: var(--c-progress-circular-size);
|
|
2267
|
+
vertical-align: middle;
|
|
2268
|
+
}
|
|
2269
|
+
.c-progress--circular .c-progress__svg {
|
|
2270
|
+
position: absolute;
|
|
2271
|
+
inset: 0;
|
|
2272
|
+
width: 100%;
|
|
2273
|
+
height: 100%;
|
|
2274
|
+
transform: rotate(-90deg);
|
|
2275
|
+
}
|
|
2276
|
+
.c-progress--circular .c-progress__track {
|
|
2277
|
+
stroke: var(--c-surface-active);
|
|
2278
|
+
stroke-width: 8;
|
|
2279
|
+
}
|
|
2280
|
+
.c-progress--circular .c-progress__fill {
|
|
2281
|
+
stroke: var(--c-primary);
|
|
2282
|
+
stroke-width: 8;
|
|
2283
|
+
stroke-linecap: round;
|
|
2284
|
+
transition: stroke-dashoffset 0.2s ease;
|
|
2285
|
+
}
|
|
2286
|
+
.c-progress--circular .c-progress__value {
|
|
2287
|
+
position: relative;
|
|
2288
|
+
font-size: calc(var(--c-progress-circular-size) * 0.28);
|
|
2289
|
+
}
|
|
2290
|
+
.c-progress--circular.c-progress--indeterminate .c-progress__svg {
|
|
2291
|
+
animation: c-progress-spin 1.4s linear infinite;
|
|
2292
|
+
}
|
|
2293
|
+
.c-progress--circular.c-progress--indeterminate .c-progress__fill {
|
|
2294
|
+
stroke-dashoffset: 210;
|
|
2295
|
+
transition: none;
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2299
|
+
.c-progress--bar.c-progress--indeterminate .c-progress__fill {
|
|
2300
|
+
width: 100%;
|
|
2301
|
+
animation: c-progress-pulse 2s ease-in-out infinite;
|
|
2302
|
+
}
|
|
2303
|
+
.c-progress--circular.c-progress--indeterminate .c-progress__svg {
|
|
2304
|
+
animation: c-progress-pulse 2s ease-in-out infinite;
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
.c-tooltip {
|
|
2308
|
+
position: relative;
|
|
2309
|
+
display: inline-block;
|
|
2310
|
+
}
|
|
2311
|
+
|
|
2312
|
+
.c-tooltip__bubble {
|
|
2313
|
+
position: absolute;
|
|
2314
|
+
z-index: 1000;
|
|
2315
|
+
box-sizing: border-box;
|
|
2316
|
+
width: max-content;
|
|
2317
|
+
max-width: 20rem;
|
|
2318
|
+
padding: 0.5rem 0.75rem;
|
|
2319
|
+
font-size: 0.875rem;
|
|
2320
|
+
font-weight: 400;
|
|
2321
|
+
line-height: 1.5;
|
|
2322
|
+
color: var(--c-background);
|
|
2323
|
+
text-align: start;
|
|
2324
|
+
overflow-wrap: break-word;
|
|
2325
|
+
white-space: normal;
|
|
2326
|
+
visibility: hidden;
|
|
2327
|
+
background: var(--c-text);
|
|
2328
|
+
border-radius: 0;
|
|
2329
|
+
box-shadow: none;
|
|
2330
|
+
opacity: 0;
|
|
2331
|
+
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
|
|
2332
|
+
pointer-events: none;
|
|
2333
|
+
}
|
|
2334
|
+
.c-tooltip__bubble::before {
|
|
2335
|
+
position: absolute;
|
|
2336
|
+
content: "";
|
|
2337
|
+
}
|
|
2338
|
+
.c-tooltip__bubble::after {
|
|
2339
|
+
position: absolute;
|
|
2340
|
+
width: 0.5rem;
|
|
2341
|
+
height: 0.5rem;
|
|
2342
|
+
content: "";
|
|
2343
|
+
background: inherit;
|
|
2344
|
+
transform: rotate(45deg);
|
|
2345
|
+
}
|
|
2346
|
+
.c-tooltip__bubble--top, .c-tooltip__bubble--bottom {
|
|
2347
|
+
left: 50%;
|
|
2348
|
+
translate: -50% 0;
|
|
2349
|
+
}
|
|
2350
|
+
.c-tooltip__bubble--top::before, .c-tooltip__bubble--bottom::before {
|
|
2351
|
+
right: 0;
|
|
2352
|
+
left: 0;
|
|
2353
|
+
height: 0.5rem;
|
|
2354
|
+
}
|
|
2355
|
+
.c-tooltip__bubble--top::after, .c-tooltip__bubble--bottom::after {
|
|
2356
|
+
left: calc(50% - 0.5rem / 2);
|
|
2357
|
+
}
|
|
2358
|
+
.c-tooltip__bubble--top {
|
|
2359
|
+
bottom: calc(100% + 0.5rem);
|
|
2360
|
+
}
|
|
2361
|
+
.c-tooltip__bubble--top::before {
|
|
2362
|
+
top: 100%;
|
|
2363
|
+
}
|
|
2364
|
+
.c-tooltip__bubble--top::after {
|
|
2365
|
+
bottom: calc(0.5rem / -2);
|
|
2366
|
+
}
|
|
2367
|
+
.c-tooltip__bubble--bottom {
|
|
2368
|
+
top: calc(100% + 0.5rem);
|
|
2369
|
+
}
|
|
2370
|
+
.c-tooltip__bubble--bottom::before {
|
|
2371
|
+
bottom: 100%;
|
|
2372
|
+
}
|
|
2373
|
+
.c-tooltip__bubble--bottom::after {
|
|
2374
|
+
top: calc(0.5rem / -2);
|
|
2375
|
+
}
|
|
2376
|
+
.c-tooltip__bubble--left, .c-tooltip__bubble--right {
|
|
2377
|
+
top: 50%;
|
|
2378
|
+
translate: 0 -50%;
|
|
2379
|
+
}
|
|
2380
|
+
.c-tooltip__bubble--left::before, .c-tooltip__bubble--right::before {
|
|
2381
|
+
top: 0;
|
|
2382
|
+
bottom: 0;
|
|
2383
|
+
width: 0.5rem;
|
|
2384
|
+
}
|
|
2385
|
+
.c-tooltip__bubble--left::after, .c-tooltip__bubble--right::after {
|
|
2386
|
+
top: calc(50% - 0.5rem / 2);
|
|
2387
|
+
}
|
|
2388
|
+
.c-tooltip__bubble--left {
|
|
2389
|
+
right: calc(100% + 0.5rem);
|
|
2390
|
+
}
|
|
2391
|
+
.c-tooltip__bubble--left::before {
|
|
2392
|
+
left: 100%;
|
|
2393
|
+
}
|
|
2394
|
+
.c-tooltip__bubble--left::after {
|
|
2395
|
+
right: calc(0.5rem / -2);
|
|
2396
|
+
}
|
|
2397
|
+
.c-tooltip__bubble--right {
|
|
2398
|
+
left: calc(100% + 0.5rem);
|
|
2399
|
+
}
|
|
2400
|
+
.c-tooltip__bubble--right::before {
|
|
2401
|
+
right: 100%;
|
|
2402
|
+
}
|
|
2403
|
+
.c-tooltip__bubble--right::after {
|
|
2404
|
+
left: calc(0.5rem / -2);
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
.c-tooltip--open > .c-tooltip__bubble {
|
|
2408
|
+
visibility: visible;
|
|
2409
|
+
opacity: 1;
|
|
2410
|
+
pointer-events: auto;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2414
|
+
.c-tooltip__bubble {
|
|
2415
|
+
transition: none;
|
|
2416
|
+
}
|
|
2417
|
+
}
|
|
2418
|
+
.c-prose {
|
|
2419
|
+
--c-prose-scale: 1;
|
|
2420
|
+
max-width: 65ch;
|
|
2421
|
+
font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
|
|
2422
|
+
font-size: calc(1rem * var(--c-prose-scale));
|
|
2423
|
+
line-height: 1.6;
|
|
2424
|
+
color: var(--c-text);
|
|
2425
|
+
}
|
|
2426
|
+
.c-prose--sm {
|
|
2427
|
+
--c-prose-scale: 0.875;
|
|
2428
|
+
}
|
|
2429
|
+
.c-prose--md {
|
|
2430
|
+
--c-prose-scale: 1;
|
|
2431
|
+
}
|
|
2432
|
+
.c-prose--lg {
|
|
2433
|
+
--c-prose-scale: 1.125;
|
|
2434
|
+
}
|
|
2435
|
+
.c-prose p,
|
|
2436
|
+
.c-prose ul,
|
|
2437
|
+
.c-prose ol,
|
|
2438
|
+
.c-prose blockquote,
|
|
2439
|
+
.c-prose pre,
|
|
2440
|
+
.c-prose figure,
|
|
2441
|
+
.c-prose table {
|
|
2442
|
+
margin: 1.25em 0;
|
|
2443
|
+
}
|
|
2444
|
+
.c-prose h1,
|
|
2445
|
+
.c-prose h2,
|
|
2446
|
+
.c-prose h3,
|
|
2447
|
+
.c-prose h4,
|
|
2448
|
+
.c-prose h5,
|
|
2449
|
+
.c-prose h6 {
|
|
2450
|
+
margin: 1.75em 0 0.5em;
|
|
2451
|
+
font-family: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
|
|
2452
|
+
color: var(--c-text);
|
|
2453
|
+
}
|
|
2454
|
+
.c-prose h1 {
|
|
2455
|
+
font-size: calc(2.5rem * var(--c-prose-scale));
|
|
2456
|
+
font-weight: 900;
|
|
2457
|
+
line-height: 1.1;
|
|
2458
|
+
}
|
|
2459
|
+
.c-prose h2 {
|
|
2460
|
+
font-size: calc(1.75rem * var(--c-prose-scale));
|
|
2461
|
+
font-weight: 900;
|
|
2462
|
+
line-height: 1.2;
|
|
2463
|
+
}
|
|
2464
|
+
.c-prose h3 {
|
|
2465
|
+
font-size: calc(1.25rem * var(--c-prose-scale));
|
|
2466
|
+
font-weight: 700;
|
|
2467
|
+
line-height: 1.3;
|
|
2468
|
+
}
|
|
2469
|
+
.c-prose h4 {
|
|
2470
|
+
font-size: calc(1.125rem * var(--c-prose-scale));
|
|
2471
|
+
font-weight: 700;
|
|
2472
|
+
line-height: 1.3;
|
|
2473
|
+
}
|
|
2474
|
+
.c-prose h5 {
|
|
2475
|
+
font-size: calc(1rem * var(--c-prose-scale));
|
|
2476
|
+
font-weight: 700;
|
|
2477
|
+
line-height: 1.4;
|
|
2478
|
+
}
|
|
2479
|
+
.c-prose h6 {
|
|
2480
|
+
font-size: calc(0.875rem * var(--c-prose-scale));
|
|
2481
|
+
font-weight: 700;
|
|
2482
|
+
line-height: 1.4;
|
|
2483
|
+
}
|
|
2484
|
+
.c-prose ul,
|
|
2485
|
+
.c-prose ol {
|
|
2486
|
+
padding-inline-start: 1.5em;
|
|
2487
|
+
}
|
|
2488
|
+
.c-prose ul {
|
|
2489
|
+
list-style: disc;
|
|
2490
|
+
}
|
|
2491
|
+
.c-prose ol {
|
|
2492
|
+
list-style: decimal;
|
|
2493
|
+
}
|
|
2494
|
+
.c-prose li {
|
|
2495
|
+
margin: 0.25em 0;
|
|
2496
|
+
}
|
|
2497
|
+
.c-prose li > ul,
|
|
2498
|
+
.c-prose li > ol {
|
|
2499
|
+
margin: 0.25em 0 0;
|
|
2500
|
+
}
|
|
2501
|
+
.c-prose a {
|
|
2502
|
+
color: var(--c-primary);
|
|
2503
|
+
text-decoration: underline;
|
|
2504
|
+
}
|
|
2505
|
+
.c-prose a:hover {
|
|
2506
|
+
color: var(--c-primary-hover);
|
|
2507
|
+
text-decoration: underline;
|
|
2508
|
+
}
|
|
2509
|
+
.c-prose blockquote {
|
|
2510
|
+
padding: 0 0 0 1em;
|
|
2511
|
+
color: var(--c-muted);
|
|
2512
|
+
border-inline-start: 4px solid var(--c-muted);
|
|
2513
|
+
}
|
|
2514
|
+
.c-prose code,
|
|
2515
|
+
.c-prose kbd {
|
|
2516
|
+
font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
|
|
2517
|
+
font-size: 0.875em;
|
|
2518
|
+
}
|
|
2519
|
+
.c-prose code {
|
|
2520
|
+
padding: 0.15em 0.4em;
|
|
2521
|
+
color: var(--c-text);
|
|
2522
|
+
background: var(--c-surface);
|
|
2523
|
+
border-radius: 0;
|
|
2524
|
+
}
|
|
2525
|
+
.c-prose kbd {
|
|
2526
|
+
padding: 0.1em 0.4em;
|
|
2527
|
+
color: var(--c-text);
|
|
2528
|
+
background: var(--c-surface);
|
|
2529
|
+
border: 1px solid var(--c-muted);
|
|
2530
|
+
border-bottom-width: 2px;
|
|
2531
|
+
border-radius: 0;
|
|
2532
|
+
}
|
|
2533
|
+
.c-prose pre {
|
|
2534
|
+
padding: 1rem;
|
|
2535
|
+
overflow: auto;
|
|
2536
|
+
color: var(--c-text);
|
|
2537
|
+
background: var(--c-surface);
|
|
2538
|
+
border-radius: 0;
|
|
2539
|
+
}
|
|
2540
|
+
.c-prose pre code {
|
|
2541
|
+
padding: 0;
|
|
2542
|
+
font-size: 0.875em;
|
|
2543
|
+
color: inherit;
|
|
2544
|
+
background: none;
|
|
2545
|
+
border-radius: 0;
|
|
2546
|
+
}
|
|
2547
|
+
.c-prose hr {
|
|
2548
|
+
height: 0;
|
|
2549
|
+
margin: 2em 0;
|
|
2550
|
+
border: 0;
|
|
2551
|
+
border-top: 1px solid var(--c-muted);
|
|
2552
|
+
}
|
|
2553
|
+
.c-prose img {
|
|
2554
|
+
display: block;
|
|
2555
|
+
max-width: 100%;
|
|
2556
|
+
height: auto;
|
|
2557
|
+
border-radius: 0;
|
|
2558
|
+
}
|
|
2559
|
+
.c-prose figure > img {
|
|
2560
|
+
margin-inline: auto;
|
|
2561
|
+
}
|
|
2562
|
+
.c-prose figcaption {
|
|
2563
|
+
margin-top: 0.5em;
|
|
2564
|
+
font-size: 0.875em;
|
|
2565
|
+
color: var(--c-muted);
|
|
2566
|
+
}
|
|
2567
|
+
.c-prose table {
|
|
2568
|
+
width: 100%;
|
|
2569
|
+
border-collapse: collapse;
|
|
2570
|
+
}
|
|
2571
|
+
.c-prose th,
|
|
2572
|
+
.c-prose td {
|
|
2573
|
+
padding: 0.5rem 0.75rem;
|
|
2574
|
+
text-align: start;
|
|
2575
|
+
vertical-align: top;
|
|
2576
|
+
border: 1px solid var(--c-muted);
|
|
2577
|
+
}
|
|
2578
|
+
.c-prose th {
|
|
2579
|
+
font-weight: 700;
|
|
2580
|
+
background: var(--c-surface);
|
|
2581
|
+
}
|
|
2582
|
+
.c-prose > :first-child {
|
|
2583
|
+
margin-top: 0;
|
|
2584
|
+
}
|
|
2585
|
+
.c-prose > :last-child {
|
|
2586
|
+
margin-bottom: 0;
|
|
2587
|
+
}
|
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.6",
|
|
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",
|
|
@@ -57,7 +57,16 @@
|
|
|
57
57
|
"@carissa-io/components-alert": "^0.1.0",
|
|
58
58
|
"@carissa-io/components-spinner": "^0.1.0",
|
|
59
59
|
"@carissa-io/components-modal": "^0.1.0",
|
|
60
|
-
"@carissa-io/components-toast": "^0.1.0"
|
|
60
|
+
"@carissa-io/components-toast": "^0.1.0",
|
|
61
|
+
"@carissa-io/components-divider": "^0.1.0",
|
|
62
|
+
"@carissa-io/components-badge": "^0.1.0",
|
|
63
|
+
"@carissa-io/components-tag": "^0.1.0",
|
|
64
|
+
"@carissa-io/components-link": "^0.1.0",
|
|
65
|
+
"@carissa-io/components-avatar": "^0.1.0",
|
|
66
|
+
"@carissa-io/components-skeleton": "^0.1.0",
|
|
67
|
+
"@carissa-io/components-progress": "^0.1.0",
|
|
68
|
+
"@carissa-io/components-tooltip": "^0.1.0",
|
|
69
|
+
"@carissa-io/components-prose": "^0.1.0"
|
|
61
70
|
},
|
|
62
71
|
"peerDependenciesMeta": {
|
|
63
72
|
"@carissa-io/components-input": {
|
|
@@ -131,27 +140,63 @@
|
|
|
131
140
|
},
|
|
132
141
|
"@carissa-io/components-toast": {
|
|
133
142
|
"optional": true
|
|
143
|
+
},
|
|
144
|
+
"@carissa-io/components-divider": {
|
|
145
|
+
"optional": true
|
|
146
|
+
},
|
|
147
|
+
"@carissa-io/components-badge": {
|
|
148
|
+
"optional": true
|
|
149
|
+
},
|
|
150
|
+
"@carissa-io/components-tag": {
|
|
151
|
+
"optional": true
|
|
152
|
+
},
|
|
153
|
+
"@carissa-io/components-link": {
|
|
154
|
+
"optional": true
|
|
155
|
+
},
|
|
156
|
+
"@carissa-io/components-avatar": {
|
|
157
|
+
"optional": true
|
|
158
|
+
},
|
|
159
|
+
"@carissa-io/components-skeleton": {
|
|
160
|
+
"optional": true
|
|
161
|
+
},
|
|
162
|
+
"@carissa-io/components-progress": {
|
|
163
|
+
"optional": true
|
|
164
|
+
},
|
|
165
|
+
"@carissa-io/components-tooltip": {
|
|
166
|
+
"optional": true
|
|
167
|
+
},
|
|
168
|
+
"@carissa-io/components-prose": {
|
|
169
|
+
"optional": true
|
|
134
170
|
}
|
|
135
171
|
},
|
|
136
172
|
"devDependencies": {
|
|
137
173
|
"@carissa-io/components-alert": "^0.1.0",
|
|
174
|
+
"@carissa-io/components-avatar": "^0.1.0",
|
|
175
|
+
"@carissa-io/components-badge": "^0.1.0",
|
|
138
176
|
"@carissa-io/components-button": "^0.1.1",
|
|
139
177
|
"@carissa-io/components-calendar": "^0.1.1",
|
|
140
178
|
"@carissa-io/components-card": "^0.1.0",
|
|
141
179
|
"@carissa-io/components-checkbox": "^0.1.1",
|
|
142
180
|
"@carissa-io/components-combobox": "^0.1.1",
|
|
143
181
|
"@carissa-io/components-date-picker": "^0.1.1",
|
|
182
|
+
"@carissa-io/components-divider": "^0.1.0",
|
|
144
183
|
"@carissa-io/components-input": "^0.2.1",
|
|
184
|
+
"@carissa-io/components-link": "^0.1.0",
|
|
145
185
|
"@carissa-io/components-listbox": "^0.1.1",
|
|
146
186
|
"@carissa-io/components-modal": "^0.1.0",
|
|
147
187
|
"@carissa-io/components-popover": "^0.1.1",
|
|
188
|
+
"@carissa-io/components-progress": "^0.1.0",
|
|
189
|
+
"@carissa-io/components-prose": "^0.1.0",
|
|
148
190
|
"@carissa-io/components-radio-group": "^0.1.1",
|
|
149
191
|
"@carissa-io/components-search": "^0.1.1",
|
|
150
192
|
"@carissa-io/components-select": "^0.1.1",
|
|
193
|
+
"@carissa-io/components-skeleton": "^0.1.0",
|
|
151
194
|
"@carissa-io/components-slider": "^0.1.1",
|
|
152
195
|
"@carissa-io/components-spinner": "^0.1.0",
|
|
153
196
|
"@carissa-io/components-switch": "^0.1.1",
|
|
197
|
+
"@carissa-io/components-tag": "^0.1.0",
|
|
154
198
|
"@carissa-io/components-toast": "^0.1.0",
|
|
199
|
+
"@carissa-io/components-tooltip": "^0.1.0",
|
|
155
200
|
"@carissa-io/components-typography": "^0.1.0",
|
|
156
201
|
"@carissa-io/components-upload": "^0.1.1",
|
|
157
202
|
"sass-embedded": "^1.105.1",
|
package/scss/index.scss
CHANGED
|
@@ -685,3 +685,255 @@
|
|
|
685
685
|
$c-toast-enter-duration: $transition-duration,
|
|
686
686
|
$c-toast-enter-distance: 0.75rem
|
|
687
687
|
);
|
|
688
|
+
|
|
689
|
+
// Divider: a 1px line in the muted color (the same edge as the card and field borders), so it reads in both modes. The
|
|
690
|
+
// label is the small muted text, 0.75rem from each line. Spacing 1rem above and below (or at the sides when vertical).
|
|
691
|
+
@use '@carissa-io/components-divider/scss' as divider with (
|
|
692
|
+
$c-divider-color: $var-muted,
|
|
693
|
+
$c-divider-thickness: 1px,
|
|
694
|
+
$c-divider-spacing: 1rem,
|
|
695
|
+
$c-divider-label-color: $var-muted,
|
|
696
|
+
$c-divider-label-gap: 0.75rem,
|
|
697
|
+
$c-divider-label-font-size: $font-size-small
|
|
698
|
+
);
|
|
699
|
+
|
|
700
|
+
// Badge: a small status marker, square like everything else. The variants are tinted like the alerts (12% of the role over
|
|
701
|
+
// the page background, 35% for the border) and the text stays --c-text (14.8:1 or more on every tint): the raw status
|
|
702
|
+
// colors are under 4.5:1 on some tints, so they only color the dot. Neutral is the surface with the muted border.
|
|
703
|
+
// Primary is the tint of --c-primary (a light grey in light, a dark one in dark).
|
|
704
|
+
@use '@carissa-io/components-badge/scss' as badge with (
|
|
705
|
+
$c-badge-radius: $radius,
|
|
706
|
+
$c-badge-border-width: 1px,
|
|
707
|
+
$c-badge-font-weight: $font-weight-bold,
|
|
708
|
+
$c-badge-md-font-size: $font-size-caption,
|
|
709
|
+
$c-badge-sm-font-size: $font-size-overline,
|
|
710
|
+
|
|
711
|
+
// Neutral
|
|
712
|
+
$c-badge-neutral-background: $var-surface,
|
|
713
|
+
$c-badge-neutral-border-color: $var-muted,
|
|
714
|
+
$c-badge-neutral-color: $var-text,
|
|
715
|
+
$c-badge-neutral-dot-color: $var-muted,
|
|
716
|
+
|
|
717
|
+
// Primary
|
|
718
|
+
$c-badge-primary-background: color-mix(in srgb, $var-primary 12%, $var-background),
|
|
719
|
+
$c-badge-primary-border-color: color-mix(in srgb, $var-primary 35%, $var-background),
|
|
720
|
+
$c-badge-primary-color: $var-text,
|
|
721
|
+
$c-badge-primary-dot-color: $var-primary,
|
|
722
|
+
|
|
723
|
+
// Success
|
|
724
|
+
$c-badge-success-background: color-mix(in srgb, $var-success 12%, $var-background),
|
|
725
|
+
$c-badge-success-border-color: color-mix(in srgb, $var-success 35%, $var-background),
|
|
726
|
+
$c-badge-success-color: $var-text,
|
|
727
|
+
$c-badge-success-dot-color: $var-success,
|
|
728
|
+
|
|
729
|
+
// Warning
|
|
730
|
+
$c-badge-warning-background: color-mix(in srgb, $var-warning 12%, $var-background),
|
|
731
|
+
$c-badge-warning-border-color: color-mix(in srgb, $var-warning 35%, $var-background),
|
|
732
|
+
$c-badge-warning-color: $var-text,
|
|
733
|
+
$c-badge-warning-dot-color: $var-warning,
|
|
734
|
+
|
|
735
|
+
// Error
|
|
736
|
+
$c-badge-error-background: color-mix(in srgb, $var-error 12%, $var-background),
|
|
737
|
+
$c-badge-error-border-color: color-mix(in srgb, $var-error 35%, $var-background),
|
|
738
|
+
$c-badge-error-color: $var-text,
|
|
739
|
+
$c-badge-error-dot-color: $var-error,
|
|
740
|
+
|
|
741
|
+
// Info
|
|
742
|
+
$c-badge-info-background: color-mix(in srgb, $var-info 12%, $var-background),
|
|
743
|
+
$c-badge-info-border-color: color-mix(in srgb, $var-info 35%, $var-background),
|
|
744
|
+
$c-badge-info-color: $var-text,
|
|
745
|
+
$c-badge-info-dot-color: $var-info
|
|
746
|
+
);
|
|
747
|
+
|
|
748
|
+
// Tag: the same tints as the badge, square, with the label-sized text and the theme focus ring (1px, offset 2px) because a
|
|
749
|
+
// removable tag is a tab stop. The remove button is the tag's text color at 70%, full on hover.
|
|
750
|
+
@use '@carissa-io/components-tag/scss' as tag with (
|
|
751
|
+
$c-tag-radius: $radius,
|
|
752
|
+
$c-tag-border-width: 1px,
|
|
753
|
+
$c-tag-font-weight: $font-weight-bold,
|
|
754
|
+
$c-tag-md-font-size: $font-size-small,
|
|
755
|
+
$c-tag-sm-font-size: $font-size-caption,
|
|
756
|
+
$c-tag-focus-outline: $focus-width solid $var-focus,
|
|
757
|
+
$c-tag-focus-outline-offset: 2px,
|
|
758
|
+
|
|
759
|
+
// Neutral
|
|
760
|
+
$c-tag-neutral-background: $var-surface,
|
|
761
|
+
$c-tag-neutral-border-color: $var-muted,
|
|
762
|
+
$c-tag-neutral-color: $var-text,
|
|
763
|
+
|
|
764
|
+
// Primary
|
|
765
|
+
$c-tag-primary-background: color-mix(in srgb, $var-primary 12%, $var-background),
|
|
766
|
+
$c-tag-primary-border-color: color-mix(in srgb, $var-primary 35%, $var-background),
|
|
767
|
+
$c-tag-primary-color: $var-text,
|
|
768
|
+
|
|
769
|
+
// Success
|
|
770
|
+
$c-tag-success-background: color-mix(in srgb, $var-success 12%, $var-background),
|
|
771
|
+
$c-tag-success-border-color: color-mix(in srgb, $var-success 35%, $var-background),
|
|
772
|
+
$c-tag-success-color: $var-text,
|
|
773
|
+
|
|
774
|
+
// Warning
|
|
775
|
+
$c-tag-warning-background: color-mix(in srgb, $var-warning 12%, $var-background),
|
|
776
|
+
$c-tag-warning-border-color: color-mix(in srgb, $var-warning 35%, $var-background),
|
|
777
|
+
$c-tag-warning-color: $var-text,
|
|
778
|
+
|
|
779
|
+
// Error
|
|
780
|
+
$c-tag-error-background: color-mix(in srgb, $var-error 12%, $var-background),
|
|
781
|
+
$c-tag-error-border-color: color-mix(in srgb, $var-error 35%, $var-background),
|
|
782
|
+
$c-tag-error-color: $var-text,
|
|
783
|
+
|
|
784
|
+
// Info
|
|
785
|
+
$c-tag-info-background: color-mix(in srgb, $var-info 12%, $var-background),
|
|
786
|
+
$c-tag-info-border-color: color-mix(in srgb, $var-info 35%, $var-background),
|
|
787
|
+
$c-tag-info-color: $var-text
|
|
788
|
+
);
|
|
789
|
+
|
|
790
|
+
// Link: --c-primary (black in light, white in dark) with an underline, because a black link on black text is told apart
|
|
791
|
+
// by the underline alone; --c-primary-hover on hover. Subtle is --c-muted (4.7:1 on the background) and turns --c-text.
|
|
792
|
+
// Disabled is --c-disabled-text at full opacity. The focus ring is the theme's 1px ring, offset 2px.
|
|
793
|
+
@use '@carissa-io/components-link/scss' as link with (
|
|
794
|
+
$c-link-color: $var-primary,
|
|
795
|
+
$c-link-color-hover: $var-primary-hover,
|
|
796
|
+
$c-link-decoration: underline,
|
|
797
|
+
$c-link-hover-decoration: underline,
|
|
798
|
+
$c-link-font-weight: $font-weight-bold,
|
|
799
|
+
$c-link-subtle-color: $var-muted,
|
|
800
|
+
$c-link-subtle-color-hover: $var-text,
|
|
801
|
+
$c-link-inline-decoration: underline,
|
|
802
|
+
$c-link-inline-underline-offset: 0.15em,
|
|
803
|
+
$c-link-focus-outline: $focus-width solid $var-focus,
|
|
804
|
+
$c-link-focus-outline-offset: 2px,
|
|
805
|
+
$c-link-focus-radius: $radius,
|
|
806
|
+
$c-link-disabled-color: $var-disabled-text,
|
|
807
|
+
$c-link-disabled-opacity: 1
|
|
808
|
+
);
|
|
809
|
+
|
|
810
|
+
// Avatar: a --c-surface-active disc (or a square, with the theme radius) with --c-text initials, bold. The ring that
|
|
811
|
+
// separates overlapping avatars in a group is the page background, so it blends in both modes.
|
|
812
|
+
@use '@carissa-io/components-avatar/scss' as avatar with (
|
|
813
|
+
$c-avatar-background: $var-surface-active,
|
|
814
|
+
$c-avatar-color: $var-text,
|
|
815
|
+
$c-avatar-font-weight: $font-weight-bold,
|
|
816
|
+
$c-avatar-radius-square: $radius,
|
|
817
|
+
$c-avatar-group-overlap: -0.5rem,
|
|
818
|
+
$c-avatar-group-ring-width: 2px,
|
|
819
|
+
$c-avatar-group-ring-color: $var-background
|
|
820
|
+
);
|
|
821
|
+
|
|
822
|
+
// Skeleton: a --c-surface-active block, square, with a band of the page background at 60% sweeping across (a lighter band in
|
|
823
|
+
// light, a darker one in dark). Reduced motion removes the sweep (the package handles it).
|
|
824
|
+
@use '@carissa-io/components-skeleton/scss' as skeleton with (
|
|
825
|
+
$c-skeleton-background: $var-surface-active,
|
|
826
|
+
$c-skeleton-highlight: color-mix(in srgb, $var-background 60%, transparent),
|
|
827
|
+
$c-skeleton-radius: $radius,
|
|
828
|
+
$c-skeleton-text-height: 1em,
|
|
829
|
+
$c-skeleton-lines-gap: 0.5rem,
|
|
830
|
+
$c-skeleton-last-line-width: 60%,
|
|
831
|
+
$c-skeleton-circle-size: 2.5rem,
|
|
832
|
+
$c-skeleton-duration: 1.5s
|
|
833
|
+
);
|
|
834
|
+
|
|
835
|
+
// Progress: a --c-surface-active track with a --c-primary fill (black in light, white in dark), square ends, the
|
|
836
|
+
// percentage in --c-text. Indeterminate loops at 1.4s; with reduced motion the package swaps the motion for a slow pulse.
|
|
837
|
+
@use '@carissa-io/components-progress/scss' as progress with (
|
|
838
|
+
$c-progress-track-color: $var-surface-active,
|
|
839
|
+
$c-progress-fill-color: $var-primary,
|
|
840
|
+
$c-progress-color: $var-text,
|
|
841
|
+
$c-progress-font-size: $font-size-caption,
|
|
842
|
+
$c-progress-font-weight: $font-weight-bold,
|
|
843
|
+
$c-progress-gap: 0.75rem,
|
|
844
|
+
$c-progress-bar-height-sm: 0.25rem,
|
|
845
|
+
$c-progress-bar-height-md: 0.5rem,
|
|
846
|
+
$c-progress-bar-height-lg: 0.75rem,
|
|
847
|
+
$c-progress-bar-radius: $radius,
|
|
848
|
+
$c-progress-transition: width $transition-duration ease,
|
|
849
|
+
$c-progress-circular-size-sm: 1.5rem,
|
|
850
|
+
$c-progress-circular-size-md: 2.5rem,
|
|
851
|
+
$c-progress-circular-size-lg: 4rem,
|
|
852
|
+
$c-progress-circular-thickness: 8,
|
|
853
|
+
$c-progress-duration: 1.4s,
|
|
854
|
+
$c-progress-duration-reduced: 2s
|
|
855
|
+
);
|
|
856
|
+
|
|
857
|
+
// Tooltip: the bubble is inverted (--c-text as the background, --c-background as the text), so it reads against the page in
|
|
858
|
+
// both modes: a near-black bubble with white text in light, a near-white one with near-black text in dark. Square like the
|
|
859
|
+
// rest, no shadow (the contrast is the separation), 0.875rem text, at most 20rem wide, a 0.5rem arrow. The fade follows
|
|
860
|
+
// $transition-duration and the package removes it with reduced motion. No other block forwards it, so it can go anywhere.
|
|
861
|
+
@use '@carissa-io/components-tooltip/scss' as tooltip with (
|
|
862
|
+
$c-tooltip-background: $var-text,
|
|
863
|
+
$c-tooltip-color: $var-background,
|
|
864
|
+
$c-tooltip-radius: $radius,
|
|
865
|
+
$c-tooltip-padding: 0.5rem 0.75rem,
|
|
866
|
+
$c-tooltip-font-size: $font-size-small,
|
|
867
|
+
$c-tooltip-line-height: $line-height-normal,
|
|
868
|
+
$c-tooltip-max-width: 20rem,
|
|
869
|
+
$c-tooltip-shadow: none,
|
|
870
|
+
$c-tooltip-offset: 0.5rem,
|
|
871
|
+
$c-tooltip-arrow-size: 0.5rem,
|
|
872
|
+
$c-tooltip-transition-duration: $transition-duration
|
|
873
|
+
);
|
|
874
|
+
|
|
875
|
+
// Prose: raw HTML content with the same hierarchy as Heading and Text: the type scale tokens ($font-size-h1 to h6, the weights
|
|
876
|
+
// and line heights of the typography block), body text in --c-text at a 1.6 line height, 65ch measure. Links are --c-primary
|
|
877
|
+
// and underlined like Link; the quote edge, the rules and the table borders are --c-muted (the card and field edge), code, pre
|
|
878
|
+
// and the table head sit on --c-surface. Colors only through the custom properties. No other block forwards it.
|
|
879
|
+
@use '@carissa-io/components-prose/scss' as prose with (
|
|
880
|
+
$c-prose-max-width: 65ch,
|
|
881
|
+
$c-prose-font-family: $font-family,
|
|
882
|
+
$c-prose-font-size: $font-size-body,
|
|
883
|
+
$c-prose-color: $var-text,
|
|
884
|
+
$c-prose-line-height: 1.6,
|
|
885
|
+
$c-prose-gap: 1.25em,
|
|
886
|
+
|
|
887
|
+
$c-prose-heading-font-family: $font-family,
|
|
888
|
+
$c-prose-heading-color: $var-text,
|
|
889
|
+
|
|
890
|
+
$c-prose-h1-font-size: $font-size-h1,
|
|
891
|
+
$c-prose-h1-font-weight: $font-weight-black,
|
|
892
|
+
$c-prose-h1-line-height: 1.1,
|
|
893
|
+
$c-prose-h2-font-size: $font-size-h2,
|
|
894
|
+
$c-prose-h2-font-weight: $font-weight-black,
|
|
895
|
+
$c-prose-h2-line-height: 1.2,
|
|
896
|
+
$c-prose-h3-font-size: $font-size-h3,
|
|
897
|
+
$c-prose-h3-font-weight: $font-weight-bold,
|
|
898
|
+
$c-prose-h3-line-height: $line-height-tight,
|
|
899
|
+
$c-prose-h4-font-size: $font-size-h4,
|
|
900
|
+
$c-prose-h4-font-weight: $font-weight-bold,
|
|
901
|
+
$c-prose-h4-line-height: $line-height-tight,
|
|
902
|
+
$c-prose-h5-font-size: $font-size-h5,
|
|
903
|
+
$c-prose-h5-font-weight: $font-weight-bold,
|
|
904
|
+
$c-prose-h5-line-height: 1.4,
|
|
905
|
+
$c-prose-h6-font-size: $font-size-h6,
|
|
906
|
+
$c-prose-h6-font-weight: $font-weight-bold,
|
|
907
|
+
$c-prose-h6-line-height: 1.4,
|
|
908
|
+
|
|
909
|
+
$c-prose-link-color: $var-primary,
|
|
910
|
+
$c-prose-link-decoration: underline,
|
|
911
|
+
$c-prose-link-hover-color: $var-primary-hover,
|
|
912
|
+
$c-prose-link-hover-decoration: underline,
|
|
913
|
+
|
|
914
|
+
$c-prose-blockquote-border-width: 4px,
|
|
915
|
+
$c-prose-blockquote-border-color: $var-muted,
|
|
916
|
+
$c-prose-blockquote-color: $var-muted,
|
|
917
|
+
|
|
918
|
+
$c-prose-code-font-family: $font-family-mono,
|
|
919
|
+
$c-prose-code-font-size: 0.875em,
|
|
920
|
+
$c-prose-code-background: $var-surface,
|
|
921
|
+
$c-prose-code-color: $var-text,
|
|
922
|
+
$c-prose-code-radius: $radius,
|
|
923
|
+
$c-prose-pre-background: $var-surface,
|
|
924
|
+
$c-prose-pre-color: $var-text,
|
|
925
|
+
$c-prose-pre-radius: $radius,
|
|
926
|
+
|
|
927
|
+
$c-prose-kbd-background: $var-surface,
|
|
928
|
+
$c-prose-kbd-color: $var-text,
|
|
929
|
+
$c-prose-kbd-border-color: $var-muted,
|
|
930
|
+
$c-prose-kbd-radius: $radius,
|
|
931
|
+
|
|
932
|
+
$c-prose-hr-color: $var-muted,
|
|
933
|
+
$c-prose-img-radius: $radius,
|
|
934
|
+
$c-prose-figcaption-color: $var-muted,
|
|
935
|
+
|
|
936
|
+
$c-prose-table-border-color: $var-muted,
|
|
937
|
+
$c-prose-table-head-background: $var-surface,
|
|
938
|
+
$c-prose-table-head-font-weight: $font-weight-bold
|
|
939
|
+
);
|