@manakind/ui-core 0.19.0 → 0.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/centered-layout/centered-layout.css +36 -0
- package/dist/centered-layout/centered-layout.css.d.ts +2 -0
- package/dist/centered-layout/centered-layout.d.ts +18 -0
- package/dist/centered-layout/centered-layout.d.ts.map +1 -0
- package/dist/centered-layout/centered-layout.js +16 -0
- package/dist/centered-layout/centered-layout.js.map +1 -0
- package/dist/centered-layout/index.d.ts +3 -0
- package/dist/centered-layout/index.d.ts.map +1 -0
- package/dist/centered-layout/index.js +2 -0
- package/dist/centered-layout/index.js.map +1 -0
- package/dist/divider/divider.css +18 -0
- package/dist/divider/divider.css.d.ts +2 -0
- package/dist/divider/divider.d.ts +26 -0
- package/dist/divider/divider.d.ts.map +1 -0
- package/dist/divider/divider.js +15 -0
- package/dist/divider/divider.js.map +1 -0
- package/dist/divider/index.d.ts +3 -0
- package/dist/divider/index.d.ts.map +1 -0
- package/dist/divider/index.js +2 -0
- package/dist/divider/index.js.map +1 -0
- package/dist/empty-state/empty-state.css +37 -0
- package/dist/empty-state/empty-state.css.d.ts +2 -0
- package/dist/empty-state/empty-state.d.ts +26 -0
- package/dist/empty-state/empty-state.d.ts.map +1 -0
- package/dist/empty-state/empty-state.js +16 -0
- package/dist/empty-state/empty-state.js.map +1 -0
- package/dist/empty-state/index.d.ts +3 -0
- package/dist/empty-state/index.d.ts.map +1 -0
- package/dist/empty-state/index.js +2 -0
- package/dist/empty-state/index.js.map +1 -0
- package/dist/form-layout/form-layout.css +18 -0
- package/dist/form-layout/form-layout.css.d.ts +2 -0
- package/dist/form-layout/form-layout.d.ts +21 -0
- package/dist/form-layout/form-layout.d.ts.map +1 -0
- package/dist/form-layout/form-layout.js +24 -0
- package/dist/form-layout/form-layout.js.map +1 -0
- package/dist/form-layout/index.d.ts +3 -0
- package/dist/form-layout/index.d.ts.map +1 -0
- package/dist/form-layout/index.js +2 -0
- package/dist/form-layout/index.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/index.js.map +1 -0
- package/dist/layout/layout.css +185 -0
- package/dist/layout/layout.css.d.ts +2 -0
- package/dist/layout/layout.d.ts +105 -0
- package/dist/layout/layout.d.ts.map +1 -0
- package/dist/layout/layout.js +77 -0
- package/dist/layout/layout.js.map +1 -0
- package/dist/page-layout/index.d.ts +3 -0
- package/dist/page-layout/index.d.ts.map +1 -0
- package/dist/page-layout/index.js +2 -0
- package/dist/page-layout/index.js.map +1 -0
- package/dist/page-layout/page-layout.css +81 -0
- package/dist/page-layout/page-layout.css.d.ts +2 -0
- package/dist/page-layout/page-layout.d.ts +43 -0
- package/dist/page-layout/page-layout.d.ts.map +1 -0
- package/dist/page-layout/page-layout.js +42 -0
- package/dist/page-layout/page-layout.js.map +1 -0
- package/dist/section/index.d.ts +3 -0
- package/dist/section/index.d.ts.map +1 -0
- package/dist/section/index.js +2 -0
- package/dist/section/index.js.map +1 -0
- package/dist/section/section.css +31 -0
- package/dist/section/section.css.d.ts +2 -0
- package/dist/section/section.d.ts +31 -0
- package/dist/section/section.d.ts.map +1 -0
- package/dist/section/section.js +19 -0
- package/dist/section/section.js.map +1 -0
- package/dist/show/index.d.ts +3 -0
- package/dist/show/index.d.ts.map +1 -0
- package/dist/show/index.js +2 -0
- package/dist/show/index.js.map +1 -0
- package/dist/show/show.css +67 -0
- package/dist/show/show.css.d.ts +2 -0
- package/dist/show/show.d.ts +36 -0
- package/dist/show/show.d.ts.map +1 -0
- package/dist/show/show.js +23 -0
- package/dist/show/show.js.map +1 -0
- package/dist/skeleton/index.d.ts +3 -0
- package/dist/skeleton/index.d.ts.map +1 -0
- package/dist/skeleton/index.js +2 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/skeleton.css +36 -0
- package/dist/skeleton/skeleton.css.d.ts +2 -0
- package/dist/skeleton/skeleton.d.ts +26 -0
- package/dist/skeleton/skeleton.d.ts.map +1 -0
- package/dist/skeleton/skeleton.js +21 -0
- package/dist/skeleton/skeleton.js.map +1 -0
- package/dist/split-layout/index.d.ts +3 -0
- package/dist/split-layout/index.d.ts.map +1 -0
- package/dist/split-layout/index.js +2 -0
- package/dist/split-layout/index.js.map +1 -0
- package/dist/split-layout/split-layout.css +71 -0
- package/dist/split-layout/split-layout.css.d.ts +2 -0
- package/dist/split-layout/split-layout.d.ts +32 -0
- package/dist/split-layout/split-layout.d.ts.map +1 -0
- package/dist/split-layout/split-layout.js +25 -0
- package/dist/split-layout/split-layout.js.map +1 -0
- package/dist/text/index.d.ts +3 -0
- package/dist/text/index.d.ts.map +1 -0
- package/dist/text/index.js +2 -0
- package/dist/text/index.js.map +1 -0
- package/dist/text/text.css +128 -0
- package/dist/text/text.css.d.ts +2 -0
- package/dist/text/text.d.ts +78 -0
- package/dist/text/text.d.ts.map +1 -0
- package/dist/text/text.js +56 -0
- package/dist/text/text.js.map +1 -0
- package/dist/visually-hidden/index.d.ts +3 -0
- package/dist/visually-hidden/index.d.ts.map +1 -0
- package/dist/visually-hidden/index.js +2 -0
- package/dist/visually-hidden/index.js.map +1 -0
- package/dist/visually-hidden/visually-hidden.css +19 -0
- package/dist/visually-hidden/visually-hidden.css.d.ts +2 -0
- package/dist/visually-hidden/visually-hidden.d.ts +15 -0
- package/dist/visually-hidden/visually-hidden.d.ts.map +1 -0
- package/dist/visually-hidden/visually-hidden.js +17 -0
- package/dist/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/wizard-layout/index.d.ts +3 -0
- package/dist/wizard-layout/index.d.ts.map +1 -0
- package/dist/wizard-layout/index.js +2 -0
- package/dist/wizard-layout/index.js.map +1 -0
- package/dist/wizard-layout/wizard-layout.css +52 -0
- package/dist/wizard-layout/wizard-layout.css.d.ts +2 -0
- package/dist/wizard-layout/wizard-layout.d.ts +50 -0
- package/dist/wizard-layout/wizard-layout.d.ts.map +1 -0
- package/dist/wizard-layout/wizard-layout.js +38 -0
- package/dist/wizard-layout/wizard-layout.js.map +1 -0
- package/package.json +106 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
3
|
+
import './section.css';
|
|
4
|
+
import { type HeadingLevel } from '../text/text';
|
|
5
|
+
/**
|
|
6
|
+
* No `asChild`: the region renders its own header beside `children`, and Ark's
|
|
7
|
+
* `asChild` clones exactly one element, so it would render nothing.
|
|
8
|
+
*/
|
|
9
|
+
export interface SectionProps extends Omit<ComponentProps<typeof ark.section>, 'title' | 'asChild'> {
|
|
10
|
+
/** The section's heading, which also names the region for assistive technology. */
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* The heading level of `title`. Defaults to `2`, a section of a page; a
|
|
14
|
+
* section inside another section is `3`.
|
|
15
|
+
*/
|
|
16
|
+
titleLevel?: HeadingLevel;
|
|
17
|
+
/** Muted copy under the title. */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
/** Controls beside the title: a "See all" link, a filter. */
|
|
20
|
+
actions?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A titled region of a page.
|
|
24
|
+
*
|
|
25
|
+
* Renders a `section` named by its own heading (`aria-labelledby`), so a
|
|
26
|
+
* screen reader can jump between the page's regions by name. The header is
|
|
27
|
+
* title and description with the actions beside them; the children follow
|
|
28
|
+
* at the section's own gap, tighter than the page's.
|
|
29
|
+
*/
|
|
30
|
+
export declare function Section({ title, titleLevel, description, actions, className, children, ...props }: SectionProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
//# sourceMappingURL=section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/section/section.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AACnE,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAW,KAAK,YAAY,EAAQ,MAAM,cAAc,CAAC;AAEhE;;;GAGG;AACH,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACrE,mFAAmF;IACnF,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,kCAAkC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,UAAc,EACd,WAAW,EACX,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,YAAY,2CAoBd"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ark } from '@ark-ui/react/factory';
|
|
3
|
+
import { useId } from 'react';
|
|
4
|
+
import './section.css';
|
|
5
|
+
import { cx } from '../cx';
|
|
6
|
+
import { Heading, Text } from '../text/text';
|
|
7
|
+
/**
|
|
8
|
+
* A titled region of a page.
|
|
9
|
+
*
|
|
10
|
+
* Renders a `section` named by its own heading (`aria-labelledby`), so a
|
|
11
|
+
* screen reader can jump between the page's regions by name. The header is
|
|
12
|
+
* title and description with the actions beside them; the children follow
|
|
13
|
+
* at the section's own gap, tighter than the page's.
|
|
14
|
+
*/
|
|
15
|
+
export function Section({ title, titleLevel = 2, description, actions, className, children, ...props }) {
|
|
16
|
+
const titleId = useId();
|
|
17
|
+
return (_jsxs(ark.section, { "aria-labelledby": titleId, className: cx('ds-section', className), ...props, children: [_jsxs("div", { className: "ds-section__header", children: [_jsxs("div", { className: "ds-section__heading", children: [_jsx(Heading, { level: titleLevel, size: "xl", id: titleId, className: "ds-section__title", children: title }), description ? (_jsx(Text, { tone: "muted", className: "ds-section__description", children: description })) : null] }), actions ? _jsx("div", { className: "ds-section__actions", children: actions }) : null] }), children] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/section/section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,EAAuC,KAAK,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAqB,IAAI,EAAE,MAAM,cAAc,CAAC;AAqBhE;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,EACtB,KAAK,EACL,UAAU,GAAG,CAAC,EACd,WAAW,EACX,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACK;IACb,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,OAAO,CACL,MAAC,GAAG,CAAC,OAAO,uBAAkB,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,KAAM,KAAK,aACtF,eAAK,SAAS,EAAC,oBAAoB,aACjC,eAAK,SAAS,EAAC,qBAAqB,aAClC,KAAC,OAAO,IAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC,mBAAmB,YAC7E,KAAK,GACE,EACT,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,IAAI,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,yBAAyB,YACnD,WAAW,GACP,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,qBAAqB,YAAE,OAAO,GAAO,CAAC,CAAC,CAAC,IAAI,IAClE,EACL,QAAQ,IACG,CACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/show/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/show/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/*
|
|
3
|
+
* The wrapper is transparent to layout. `display: contents` is safe here
|
|
4
|
+
* because the wrapper is a plain div with no role; it is never applied to
|
|
5
|
+
* the consumer's own element (asChild).
|
|
6
|
+
*/
|
|
7
|
+
.ds-show--wrapper {
|
|
8
|
+
display: contents;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* One rule per side of each viewport step, written as literals because
|
|
13
|
+
* `@media` cannot read a custom property; `check:breakpoints` pins them to
|
|
14
|
+
* the viewport tokens. The class is doubled for specificity: with `asChild`
|
|
15
|
+
* the rule lands on an element that sets its own `display` (a Grid, a
|
|
16
|
+
* Skeleton), and at equal specificity the stylesheet loaded later would win.
|
|
17
|
+
* A product element styled outside any cascade layer still beats this rule;
|
|
18
|
+
* for one of those, use the wrapper form.
|
|
19
|
+
*/
|
|
20
|
+
@media (width < 40rem) {
|
|
21
|
+
.ds-show--above-sm.ds-show--above-sm {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (width < 48rem) {
|
|
27
|
+
.ds-show--above-md.ds-show--above-md {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@media (width < 64rem) {
|
|
33
|
+
.ds-show--above-lg.ds-show--above-lg {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (width < 80rem) {
|
|
39
|
+
.ds-show--above-xl.ds-show--above-xl {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (width >= 40rem) {
|
|
45
|
+
.ds-show--below-sm.ds-show--below-sm {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (width >= 48rem) {
|
|
51
|
+
.ds-show--below-md.ds-show--below-md {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media (width >= 64rem) {
|
|
57
|
+
.ds-show--below-lg.ds-show--below-lg {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (width >= 80rem) {
|
|
63
|
+
.ds-show--below-xl.ds-show--below-xl {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import './show.css';
|
|
4
|
+
import type { Breakpoint } from '../layout/layout';
|
|
5
|
+
/**
|
|
6
|
+
* Exactly one of `above` or `below`: an element shown at every width would
|
|
7
|
+
* need no `Show`, and one hidden at every width would be `hidden`.
|
|
8
|
+
*/
|
|
9
|
+
type ShowRange = {
|
|
10
|
+
/** Show from this viewport step up; hidden on narrower viewports. */
|
|
11
|
+
above: Breakpoint;
|
|
12
|
+
below?: never;
|
|
13
|
+
} | {
|
|
14
|
+
above?: never;
|
|
15
|
+
/** Show on viewports narrower than this step; hidden from it up. */
|
|
16
|
+
below: Breakpoint;
|
|
17
|
+
};
|
|
18
|
+
export type ShowProps = ComponentProps<typeof ark.div> & ShowRange;
|
|
19
|
+
/**
|
|
20
|
+
* Children that exist only on one side of a breakpoint.
|
|
21
|
+
*
|
|
22
|
+
* A full navigation above `md` and a menu button below it; a sidebar that
|
|
23
|
+
* has no room on a phone. Both sides stay in the DOM and are hidden with
|
|
24
|
+
* `display: none`, so the hidden side is out of the accessibility tree and
|
|
25
|
+
* the tab order too. The breakpoints are the viewport tokens.
|
|
26
|
+
*
|
|
27
|
+
* Renders a wrapper `div` that takes no part in layout (`display: contents`),
|
|
28
|
+
* so the children sit in their parent's grid or flex as if the wrapper were
|
|
29
|
+
* not there. Pass `asChild` to put the behaviour on your own element instead
|
|
30
|
+
* (`<Show above="md" asChild><nav>…</nav></Show>`); the hiding rule outranks a
|
|
31
|
+
* `display` the element's own layered stylesheet sets, but not one set
|
|
32
|
+
* outside every cascade layer, so keep the wrapper for such an element.
|
|
33
|
+
*/
|
|
34
|
+
export declare function Show({ above, below, asChild, className, children, ...props }: ShowProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=show.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.d.ts","sourceRoot":"","sources":["../../src/show/show.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,KAAK,SAAS,GACV;IACE,qEAAqE;IACrE,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,GACD;IACE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,oEAAoE;IACpE,KAAK,EAAE,UAAU,CAAC;CACnB,CAAC;AAEN,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CAgBvF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ark } from '@ark-ui/react/factory';
|
|
3
|
+
import './show.css';
|
|
4
|
+
import { cx } from '../cx';
|
|
5
|
+
/**
|
|
6
|
+
* Children that exist only on one side of a breakpoint.
|
|
7
|
+
*
|
|
8
|
+
* A full navigation above `md` and a menu button below it; a sidebar that
|
|
9
|
+
* has no room on a phone. Both sides stay in the DOM and are hidden with
|
|
10
|
+
* `display: none`, so the hidden side is out of the accessibility tree and
|
|
11
|
+
* the tab order too. The breakpoints are the viewport tokens.
|
|
12
|
+
*
|
|
13
|
+
* Renders a wrapper `div` that takes no part in layout (`display: contents`),
|
|
14
|
+
* so the children sit in their parent's grid or flex as if the wrapper were
|
|
15
|
+
* not there. Pass `asChild` to put the behaviour on your own element instead
|
|
16
|
+
* (`<Show above="md" asChild><nav>…</nav></Show>`); the hiding rule outranks a
|
|
17
|
+
* `display` the element's own layered stylesheet sets, but not one set
|
|
18
|
+
* outside every cascade layer, so keep the wrapper for such an element.
|
|
19
|
+
*/
|
|
20
|
+
export function Show({ above, below, asChild, className, children, ...props }) {
|
|
21
|
+
return (_jsx(ark.div, { asChild: asChild, className: cx('ds-show', !asChild && 'ds-show--wrapper', above && `ds-show--above-${above}`, below && `ds-show--below-${below}`, className), ...props, children: children }));
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=show.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"show.js","sourceRoot":"","sources":["../../src/show/show.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,YAAY,CAAC;AACpB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAqB3B;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa;IACtF,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,EAAE,CACX,SAAS,EACT,CAAC,OAAO,IAAI,kBAAkB,EAC9B,KAAK,IAAI,kBAAkB,KAAK,EAAE,EAClC,KAAK,IAAI,kBAAkB,KAAK,EAAE,EAClC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/skeleton/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/skeleton/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ds-skeleton {
|
|
3
|
+
display: block;
|
|
4
|
+
background-color: var(--ds-skeleton-bg);
|
|
5
|
+
border-radius: var(--ds-skeleton-radius);
|
|
6
|
+
animation: ds-skeleton-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
7
|
+
|
|
8
|
+
&.ds-skeleton--text {
|
|
9
|
+
height: 1lh;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.ds-skeleton--circle {
|
|
14
|
+
width: var(--ds-avatar-size-md);
|
|
15
|
+
height: var(--ds-avatar-size-md);
|
|
16
|
+
border-radius: 50%;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* Fades to the dimmed opacity the contract already has for an inert
|
|
22
|
+
* control: a placeholder is the inert state of content, so the same step
|
|
23
|
+
* reads right and adds no key of its own.
|
|
24
|
+
*/
|
|
25
|
+
@keyframes ds-skeleton-pulse {
|
|
26
|
+
50% {
|
|
27
|
+
opacity: var(--ds-opacity-disabled);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media (prefers-reduced-motion: reduce) {
|
|
32
|
+
.ds-skeleton {
|
|
33
|
+
animation: none;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import './skeleton.css';
|
|
3
|
+
/**
|
|
4
|
+
* `block` is a rounded rectangle for a card or an image; `text` a line of
|
|
5
|
+
* text, one line-height tall; `circle` an avatar.
|
|
6
|
+
*/
|
|
7
|
+
export type SkeletonShape = 'block' | 'text' | 'circle';
|
|
8
|
+
export interface SkeletonProps extends ComponentProps<'div'> {
|
|
9
|
+
/** Defaults to `block`. */
|
|
10
|
+
shape?: SkeletonShape;
|
|
11
|
+
/** A CSS length, or a number of pixels. A `text` skeleton is as wide as its container unless told otherwise. */
|
|
12
|
+
width?: number | string;
|
|
13
|
+
/** A CSS length, or a number of pixels. `text` and `circle` have a height of their own. */
|
|
14
|
+
height?: number | string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A placeholder for content still loading.
|
|
18
|
+
*
|
|
19
|
+
* The pulse, the fill and the corner radius are the component's; the size
|
|
20
|
+
* and placement are the caller's, through `width`, `height` or the parent's
|
|
21
|
+
* layout. Hidden from assistive technology: the region that is loading says
|
|
22
|
+
* so with `aria-busy`, which announces once, rather than each placeholder
|
|
23
|
+
* announcing nothing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function Skeleton({ shape, width, height, className, style, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/skeleton/skeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,OAAO,CAAC;AAC3D,OAAO,gBAAgB,CAAC;AAGxB;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC1D,2BAA2B;IAC3B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,gHAAgH;IAChH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,2FAA2F;IAC3F,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EACvB,KAAe,EACf,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,aAAa,2CAYf"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './skeleton.css';
|
|
3
|
+
import { cx } from '../cx';
|
|
4
|
+
/**
|
|
5
|
+
* A placeholder for content still loading.
|
|
6
|
+
*
|
|
7
|
+
* The pulse, the fill and the corner radius are the component's; the size
|
|
8
|
+
* and placement are the caller's, through `width`, `height` or the parent's
|
|
9
|
+
* layout. Hidden from assistive technology: the region that is loading says
|
|
10
|
+
* so with `aria-busy`, which announces once, rather than each placeholder
|
|
11
|
+
* announcing nothing.
|
|
12
|
+
*/
|
|
13
|
+
export function Skeleton({ shape = 'block', width, height, className, style, ...props }) {
|
|
14
|
+
const size = {};
|
|
15
|
+
if (width !== undefined)
|
|
16
|
+
size.width = width;
|
|
17
|
+
if (height !== undefined)
|
|
18
|
+
size.height = height;
|
|
19
|
+
return (_jsx("div", { "aria-hidden": "true", className: cx('ds-skeleton', `ds-skeleton--${shape}`, className), style: { ...size, ...style }, ...props }));
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../src/skeleton/skeleton.tsx"],"names":[],"mappings":";AACA,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAiB3B;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,EACvB,KAAK,GAAG,OAAO,EACf,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACM;IACd,MAAM,IAAI,GAAkB,EAAE,CAAC;IAC/B,IAAI,KAAK,KAAK,SAAS;QAAE,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IAC5C,IAAI,MAAM,KAAK,SAAS;QAAE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IAC/C,OAAO,CACL,6BACc,MAAM,EAClB,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,gBAAgB,KAAK,EAAE,EAAE,SAAS,CAAC,EAChE,KAAK,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,KACxB,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/split-layout/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/split-layout/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
/*
|
|
3
|
+
* Stacked by default, main first. From the collapse step the grid takes two
|
|
4
|
+
* columns, the aside's at its content width on the side it was given. Child
|
|
5
|
+
* combinators, so a SplitLayout nested in an aside keeps its own order. Breakpoints are the viewport tokens,
|
|
6
|
+
* written as literals because `@media` cannot read a custom property
|
|
7
|
+
* (`check:breakpoints`).
|
|
8
|
+
*/
|
|
9
|
+
.ds-split-layout {
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: minmax(0, 1fr);
|
|
12
|
+
gap: var(--ds-split-layout-gap);
|
|
13
|
+
min-width: 0;
|
|
14
|
+
overflow-wrap: anywhere;
|
|
15
|
+
|
|
16
|
+
&.ds-split-layout--aside-sm {
|
|
17
|
+
--_aside-width: var(--ds-layout-content-sm);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.ds-split-layout--aside-md {
|
|
21
|
+
--_aside-width: var(--ds-layout-content-md);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
& > .ds-split-layout__main,
|
|
25
|
+
& > .ds-split-layout__aside {
|
|
26
|
+
min-width: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@media (width >= 40rem) {
|
|
31
|
+
.ds-split-layout--collapse-sm.ds-split-layout--aside-end {
|
|
32
|
+
grid-template-columns: minmax(0, 1fr) var(--_aside-width);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ds-split-layout--collapse-sm.ds-split-layout--aside-start {
|
|
36
|
+
grid-template-columns: var(--_aside-width) minmax(0, 1fr);
|
|
37
|
+
|
|
38
|
+
& > .ds-split-layout__aside {
|
|
39
|
+
order: -1;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@media (width >= 48rem) {
|
|
45
|
+
.ds-split-layout--collapse-md.ds-split-layout--aside-end {
|
|
46
|
+
grid-template-columns: minmax(0, 1fr) var(--_aside-width);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ds-split-layout--collapse-md.ds-split-layout--aside-start {
|
|
50
|
+
grid-template-columns: var(--_aside-width) minmax(0, 1fr);
|
|
51
|
+
|
|
52
|
+
& > .ds-split-layout__aside {
|
|
53
|
+
order: -1;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media (width >= 64rem) {
|
|
59
|
+
.ds-split-layout--collapse-lg.ds-split-layout--aside-end {
|
|
60
|
+
grid-template-columns: minmax(0, 1fr) var(--_aside-width);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ds-split-layout--collapse-lg.ds-split-layout--aside-start {
|
|
64
|
+
grid-template-columns: var(--_aside-width) minmax(0, 1fr);
|
|
65
|
+
|
|
66
|
+
& > .ds-split-layout__aside {
|
|
67
|
+
order: -1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ark } from '@ark-ui/react/factory';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import './split-layout.css';
|
|
4
|
+
import type { Breakpoint, ContentWidth } from '../layout/layout';
|
|
5
|
+
export interface SplitLayoutProps extends ComponentProps<typeof ark.div> {
|
|
6
|
+
/**
|
|
7
|
+
* The viewport step from which the two regions sit side by side; below it
|
|
8
|
+
* they stack, main first. Defaults to `lg`.
|
|
9
|
+
*/
|
|
10
|
+
collapseBelow?: Exclude<Breakpoint, 'xl'>;
|
|
11
|
+
/** The aside's width when side by side: a content width step. Defaults to `sm`. */
|
|
12
|
+
asideWidth?: Exclude<ContentWidth, 'lg' | 'xl'>;
|
|
13
|
+
/** Which side the aside takes when side by side. Defaults to `end`. */
|
|
14
|
+
asidePosition?: 'start' | 'end';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A main region with an aside: content and its filters, a detail and its
|
|
18
|
+
* facts, a list and a summary.
|
|
19
|
+
*
|
|
20
|
+
* Side by side from `collapseBelow` up, with the aside at a fixed content
|
|
21
|
+
* width and the main region taking the rest; stacked on a narrower viewport
|
|
22
|
+
* with the main region first in reading order whatever side the aside
|
|
23
|
+
* takes. Compose with {@link SplitMain} and {@link SplitAside}.
|
|
24
|
+
*/
|
|
25
|
+
export declare function SplitLayout({ collapseBelow, asideWidth, asidePosition, className, children, ...props }: SplitLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export type SplitMainProps = ComponentProps<typeof ark.div>;
|
|
27
|
+
/** The main region. Pass `asChild` to make it a landmark (`<main>`, `<section>`). */
|
|
28
|
+
export declare function SplitMain({ className, children, ...props }: SplitMainProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export type SplitAsideProps = ComponentProps<typeof ark.aside>;
|
|
30
|
+
/** The aside. Renders an `aside`; name it with `aria-label` when a page has more than one. */
|
|
31
|
+
export declare function SplitAside({ className, children, ...props }: SplitAsideProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
//# sourceMappingURL=split-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../src/split-layout/split-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,WAAW,gBAAiB,SAAQ,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC;IACtE;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1C,mFAAmF;IACnF,UAAU,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;IAChD,uEAAuE;IACvE,aAAa,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CACjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAC1B,aAAoB,EACpB,UAAiB,EACjB,aAAqB,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAelB;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AAE5D,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,2CAM1E;AAED,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;AAE/D,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAM5E"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ark } from '@ark-ui/react/factory';
|
|
3
|
+
import './split-layout.css';
|
|
4
|
+
import { cx } from '../cx';
|
|
5
|
+
/**
|
|
6
|
+
* A main region with an aside: content and its filters, a detail and its
|
|
7
|
+
* facts, a list and a summary.
|
|
8
|
+
*
|
|
9
|
+
* Side by side from `collapseBelow` up, with the aside at a fixed content
|
|
10
|
+
* width and the main region taking the rest; stacked on a narrower viewport
|
|
11
|
+
* with the main region first in reading order whatever side the aside
|
|
12
|
+
* takes. Compose with {@link SplitMain} and {@link SplitAside}.
|
|
13
|
+
*/
|
|
14
|
+
export function SplitLayout({ collapseBelow = 'lg', asideWidth = 'sm', asidePosition = 'end', className, children, ...props }) {
|
|
15
|
+
return (_jsx(ark.div, { className: cx('ds-split-layout', `ds-split-layout--collapse-${collapseBelow}`, `ds-split-layout--aside-${asideWidth}`, `ds-split-layout--aside-${asidePosition}`, className), ...props, children: children }));
|
|
16
|
+
}
|
|
17
|
+
/** The main region. Pass `asChild` to make it a landmark (`<main>`, `<section>`). */
|
|
18
|
+
export function SplitMain({ className, children, ...props }) {
|
|
19
|
+
return (_jsx(ark.div, { className: cx('ds-split-layout__main', className), ...props, children: children }));
|
|
20
|
+
}
|
|
21
|
+
/** The aside. Renders an `aside`; name it with `aria-label` when a page has more than one. */
|
|
22
|
+
export function SplitAside({ className, children, ...props }) {
|
|
23
|
+
return (_jsx(ark.aside, { className: cx('ds-split-layout__aside', className), ...props, children: children }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=split-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"split-layout.js","sourceRoot":"","sources":["../../src/split-layout/split-layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAE5C,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAe3B;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,aAAa,GAAG,IAAI,EACpB,UAAU,GAAG,IAAI,EACjB,aAAa,GAAG,KAAK,EACrB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS;IACjB,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IACN,SAAS,EAAE,EAAE,CACX,iBAAiB,EACjB,6BAA6B,aAAa,EAAE,EAC5C,0BAA0B,UAAU,EAAE,EACtC,0BAA0B,aAAa,EAAE,EACzC,SAAS,CACV,KACG,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,qFAAqF;AACrF,MAAM,UAAU,SAAS,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB;IACzE,OAAO,CACL,KAAC,GAAG,CAAC,GAAG,IAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAAM,KAAK,YAClE,QAAQ,GACD,CACX,CAAC;AACJ,CAAC;AAID,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB;IAC3E,OAAO,CACL,KAAC,GAAG,CAAC,KAAK,IAAC,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAAM,KAAK,YACrE,QAAQ,GACC,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,SAAS,EACT,QAAQ,EACR,cAAc,EACd,OAAO,EACP,QAAQ,EACR,UAAU,GACX,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/text/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ds-text {
|
|
3
|
+
margin: 0;
|
|
4
|
+
font-family: inherit;
|
|
5
|
+
color: var(--ds-text-tone-default);
|
|
6
|
+
overflow-wrap: anywhere;
|
|
7
|
+
|
|
8
|
+
&.ds-text--body {
|
|
9
|
+
font-weight: inherit;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&.ds-text--heading {
|
|
13
|
+
font-weight: var(--ds-text-heading-font-weight);
|
|
14
|
+
line-height: var(--ds-text-heading-line-height);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.ds-text--size-xs {
|
|
18
|
+
font-size: var(--ds-text-size-xs-font-size);
|
|
19
|
+
line-height: var(--ds-text-size-xs-line-height);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.ds-text--size-sm {
|
|
23
|
+
font-size: var(--ds-text-size-sm-font-size);
|
|
24
|
+
line-height: var(--ds-text-size-sm-line-height);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.ds-text--size-md {
|
|
28
|
+
font-size: var(--ds-text-size-md-font-size);
|
|
29
|
+
line-height: var(--ds-text-size-md-line-height);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.ds-text--size-lg {
|
|
33
|
+
font-size: var(--ds-text-size-lg-font-size);
|
|
34
|
+
line-height: var(--ds-text-size-lg-line-height);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.ds-text--size-xl {
|
|
38
|
+
font-size: var(--ds-text-size-xl-font-size);
|
|
39
|
+
line-height: var(--ds-text-size-xl-line-height);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.ds-text--size-2xl {
|
|
43
|
+
font-size: var(--ds-text-size-2xl-font-size);
|
|
44
|
+
line-height: var(--ds-text-size-2xl-line-height);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.ds-text--size-3xl {
|
|
48
|
+
font-size: var(--ds-text-size-3xl-font-size);
|
|
49
|
+
line-height: var(--ds-text-size-3xl-line-height);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.ds-text--size-4xl {
|
|
53
|
+
font-size: var(--ds-text-size-4xl-font-size);
|
|
54
|
+
line-height: var(--ds-text-size-4xl-line-height);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* A heading keeps its own line height whatever its size. */
|
|
58
|
+
&.ds-text--heading[class*="ds-text--size-"] {
|
|
59
|
+
line-height: var(--ds-text-heading-line-height);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.ds-text--weight-regular {
|
|
63
|
+
font-weight: var(--ds-text-weight-regular);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.ds-text--weight-medium {
|
|
67
|
+
font-weight: var(--ds-text-weight-medium);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.ds-text--weight-semibold {
|
|
71
|
+
font-weight: var(--ds-text-weight-semibold);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&.ds-text--weight-bold {
|
|
75
|
+
font-weight: var(--ds-text-weight-bold);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.ds-text--tone-muted {
|
|
79
|
+
color: var(--ds-text-tone-muted);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.ds-text--tone-success {
|
|
83
|
+
color: var(--ds-text-tone-success);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.ds-text--tone-warning {
|
|
87
|
+
color: var(--ds-text-tone-warning);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.ds-text--tone-danger {
|
|
91
|
+
color: var(--ds-text-tone-danger);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&.ds-text--tone-info {
|
|
95
|
+
color: var(--ds-text-tone-info);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&.ds-text--align-start {
|
|
99
|
+
text-align: start;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.ds-text--align-center {
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&.ds-text--align-end {
|
|
107
|
+
text-align: end;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&.ds-text--caps {
|
|
111
|
+
text-transform: uppercase;
|
|
112
|
+
letter-spacing: var(--ds-text-caps-letter-spacing);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/*
|
|
116
|
+
* Clipped by its own box, not kept from wrapping: `white-space: nowrap`
|
|
117
|
+
* would let a long word push past the edge, which is the one thing the
|
|
118
|
+
* long-words guard forbids. `-webkit-line-clamp` is the form every
|
|
119
|
+
* engine ships; the unprefixed `line-clamp` is not there yet.
|
|
120
|
+
*/
|
|
121
|
+
&.ds-text--truncate {
|
|
122
|
+
display: -webkit-box;
|
|
123
|
+
-webkit-box-orient: vertical;
|
|
124
|
+
-webkit-line-clamp: var(--_text-lines);
|
|
125
|
+
overflow: hidden;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|