@qeetrix/react 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +288 -0
- package/README.md +240 -4
- package/dist/accordion/accordion.d.ts +42 -0
- package/dist/accordion/accordion.js +72 -0
- package/dist/accordion/index.d.ts +2 -0
- package/dist/accordion/index.js +1 -0
- package/dist/avatar/avatar.d.ts +21 -0
- package/dist/avatar/avatar.js +43 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +1 -0
- package/dist/badge/badge.d.ts +14 -0
- package/dist/badge/badge.js +25 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +1 -0
- package/dist/box/box.d.ts +27 -0
- package/dist/box/box.js +21 -0
- package/dist/box/index.d.ts +2 -0
- package/dist/box/index.js +1 -0
- package/dist/button/button.d.ts +50 -0
- package/dist/button/button.js +78 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +1 -0
- package/dist/card/card.d.ts +30 -0
- package/dist/card/card.js +56 -0
- package/dist/card/index.d.ts +2 -0
- package/dist/card/index.js +1 -0
- package/dist/checkbox/checkbox.d.ts +33 -0
- package/dist/checkbox/checkbox.js +61 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/css/accordion.css +73 -0
- package/dist/css/avatar.css +50 -0
- package/dist/css/badge.css +59 -0
- package/dist/css/box.css +163 -0
- package/dist/css/button.css +243 -0
- package/dist/css/card.css +75 -0
- package/dist/css/checkbox.css +67 -0
- package/dist/css/dialog.css +128 -0
- package/dist/css/drawer.css +129 -0
- package/dist/css/experimental/alert.css +89 -0
- package/dist/css/experimental/app-shell.css +258 -0
- package/dist/css/experimental/breadcrumb.css +67 -0
- package/dist/css/experimental/copy-button.css +13 -0
- package/dist/css/experimental/empty-state.css +63 -0
- package/dist/css/experimental/otp-input.css +84 -0
- package/dist/css/experimental/page-header.css +110 -0
- package/dist/css/experimental/password-input.css +21 -0
- package/dist/css/experimental/sidebar.css +234 -0
- package/dist/css/experimental/stat.css +115 -0
- package/dist/css/experimental/top-bar.css +299 -0
- package/dist/css/field.css +121 -0
- package/dist/css/fieldset.css +37 -0
- package/dist/css/grid.css +86 -0
- package/dist/css/heading.css +93 -0
- package/dist/css/inline.css +85 -0
- package/dist/css/input.css +108 -0
- package/dist/css/link.css +45 -0
- package/dist/css/menu.css +166 -0
- package/dist/css/popover.css +72 -0
- package/dist/css/progress.css +102 -0
- package/dist/css/radio.css +54 -0
- package/dist/css/scroll-area.css +70 -0
- package/dist/css/select.css +189 -0
- package/dist/css/separator.css +35 -0
- package/dist/css/skeleton.css +39 -0
- package/dist/css/skip-link.css +33 -0
- package/dist/css/slider.css +108 -0
- package/dist/css/spinner.css +55 -0
- package/dist/css/stack.css +76 -0
- package/dist/css/switch.css +112 -0
- package/dist/css/table.css +68 -0
- package/dist/css/tabs.css +123 -0
- package/dist/css/text-field.css +4 -0
- package/dist/css/text.css +106 -0
- package/dist/css/toast.css +115 -0
- package/dist/css/toggle.css +125 -0
- package/dist/css/tooltip.css +47 -0
- package/dist/css/visually-hidden.css +15 -0
- package/dist/dialog/dialog.d.ts +54 -0
- package/dist/dialog/dialog.js +121 -0
- package/dist/dialog/index.d.ts +2 -0
- package/dist/dialog/index.js +1 -0
- package/dist/drawer/drawer.d.ts +49 -0
- package/dist/drawer/drawer.js +102 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +1 -0
- package/dist/experimental/alert/alert.d.ts +29 -0
- package/dist/experimental/alert/alert.js +72 -0
- package/dist/experimental/alert/index.d.ts +2 -0
- package/dist/experimental/app-shell/app-shell.d.ts +60 -0
- package/dist/experimental/app-shell/app-shell.js +224 -0
- package/dist/experimental/app-shell/index.d.ts +2 -0
- package/dist/experimental/breadcrumb/breadcrumb.d.ts +27 -0
- package/dist/experimental/breadcrumb/breadcrumb.js +48 -0
- package/dist/experimental/breadcrumb/index.d.ts +2 -0
- package/dist/experimental/copy-button/copy-button.d.ts +27 -0
- package/dist/experimental/copy-button/copy-button.js +61 -0
- package/dist/experimental/copy-button/index.d.ts +2 -0
- package/dist/experimental/empty-state/data-state.d.ts +23 -0
- package/dist/experimental/empty-state/data-state.js +40 -0
- package/dist/experimental/empty-state/empty-state.d.ts +26 -0
- package/dist/experimental/empty-state/empty-state.js +46 -0
- package/dist/experimental/empty-state/index.d.ts +3 -0
- package/dist/experimental/index.d.ts +24 -0
- package/dist/experimental/index.js +13 -0
- package/dist/experimental/otp-input/index.d.ts +2 -0
- package/dist/experimental/otp-input/otp-input.d.ts +27 -0
- package/dist/experimental/otp-input/otp-input.js +39 -0
- package/dist/experimental/page-header/index.d.ts +2 -0
- package/dist/experimental/page-header/page-header.d.ts +32 -0
- package/dist/experimental/page-header/page-header.js +73 -0
- package/dist/experimental/password-input/index.d.ts +2 -0
- package/dist/experimental/password-input/password-input.d.ts +26 -0
- package/dist/experimental/password-input/password-input.js +103 -0
- package/dist/experimental/sidebar/index.d.ts +2 -0
- package/dist/experimental/sidebar/sidebar.d.ts +64 -0
- package/dist/experimental/sidebar/sidebar.js +200 -0
- package/dist/experimental/stat/index.d.ts +2 -0
- package/dist/experimental/stat/stat.d.ts +31 -0
- package/dist/experimental/stat/stat.js +90 -0
- package/dist/experimental/top-bar/index.d.ts +2 -0
- package/dist/experimental/top-bar/top-bar.d.ts +60 -0
- package/dist/experimental/top-bar/top-bar.js +162 -0
- package/dist/field/choice.d.ts +21 -0
- package/dist/field/choice.js +67 -0
- package/dist/field/field.d.ts +31 -0
- package/dist/field/field.js +78 -0
- package/dist/field/index.d.ts +3 -0
- package/dist/field/index.js +1 -0
- package/dist/fieldset/fieldset.d.ts +19 -0
- package/dist/fieldset/fieldset.js +29 -0
- package/dist/fieldset/index.d.ts +2 -0
- package/dist/fieldset/index.js +1 -0
- package/dist/format/format.d.ts +12 -0
- package/dist/format/format.js +50 -0
- package/dist/format/index.d.ts +2 -0
- package/dist/format/index.js +1 -0
- package/dist/grid/grid.d.ts +30 -0
- package/dist/grid/grid.js +36 -0
- package/dist/grid/index.d.ts +2 -0
- package/dist/grid/index.js +1 -0
- package/dist/heading/heading.d.ts +23 -0
- package/dist/heading/heading.js +30 -0
- package/dist/heading/index.d.ts +2 -0
- package/dist/heading/index.js +1 -0
- package/dist/index.d.ts +84 -1
- package/dist/index.js +40 -0
- package/dist/inline/index.d.ts +2 -0
- package/dist/inline/index.js +1 -0
- package/dist/inline/inline.d.ts +19 -0
- package/dist/inline/inline.js +16 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +1 -0
- package/dist/input/input.d.ts +37 -0
- package/dist/input/input.js +63 -0
- package/dist/internal/control.d.ts +9 -0
- package/dist/internal/control.js +4 -0
- package/dist/internal/cx.js +7 -0
- package/dist/internal/media.js +15 -0
- package/dist/internal/messages.d.ts +75 -0
- package/dist/internal/messages.js +61 -0
- package/dist/internal/refs.js +23 -0
- package/dist/internal/render.d.ts +6 -0
- package/dist/internal/render.js +22 -0
- package/dist/internal/space.d.ts +9 -0
- package/dist/internal/text.d.ts +5 -0
- package/dist/internal/text.js +18 -0
- package/dist/link/index.d.ts +2 -0
- package/dist/link/index.js +1 -0
- package/dist/link/link.d.ts +19 -0
- package/dist/link/link.js +32 -0
- package/dist/locales/hi.d.ts +8 -0
- package/dist/locales/hi.js +60 -0
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +1 -0
- package/dist/menu/menu.d.ts +76 -0
- package/dist/menu/menu.js +172 -0
- package/dist/popover/index.d.ts +2 -0
- package/dist/popover/index.js +1 -0
- package/dist/popover/popover.d.ts +33 -0
- package/dist/popover/popover.js +48 -0
- package/dist/progress/index.d.ts +2 -0
- package/dist/progress/index.js +1 -0
- package/dist/progress/progress.d.ts +26 -0
- package/dist/progress/progress.js +62 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/provider/index.js +1 -0
- package/dist/provider/provider.d.ts +46 -0
- package/dist/provider/provider.js +90 -0
- package/dist/radio/index.d.ts +2 -0
- package/dist/radio/index.js +1 -0
- package/dist/radio/radio.d.ts +31 -0
- package/dist/radio/radio.js +47 -0
- package/dist/scroll-area/index.d.ts +2 -0
- package/dist/scroll-area/index.js +1 -0
- package/dist/scroll-area/scroll-area.d.ts +18 -0
- package/dist/scroll-area/scroll-area.js +39 -0
- package/dist/select/index.d.ts +2 -0
- package/dist/select/index.js +1 -0
- package/dist/select/select.d.ts +36 -0
- package/dist/select/select.js +82 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator/separator.d.ts +16 -0
- package/dist/separator/separator.js +16 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/skeleton.d.ts +12 -0
- package/dist/skeleton/skeleton.js +18 -0
- package/dist/skip-link/index.d.ts +2 -0
- package/dist/skip-link/index.js +1 -0
- package/dist/skip-link/skip-link.d.ts +13 -0
- package/dist/skip-link/skip-link.js +18 -0
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +1 -0
- package/dist/slider/slider.d.ts +20 -0
- package/dist/slider/slider.js +58 -0
- package/dist/spinner/index.d.ts +2 -0
- package/dist/spinner/index.js +1 -0
- package/dist/spinner/spinner.d.ts +15 -0
- package/dist/spinner/spinner.js +19 -0
- package/dist/stack/index.d.ts +2 -0
- package/dist/stack/index.js +1 -0
- package/dist/stack/stack.d.ts +17 -0
- package/dist/stack/stack.js +15 -0
- package/dist/styles.css +4548 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/switch.d.ts +18 -0
- package/dist/switch/switch.js +31 -0
- package/dist/table/index.d.ts +2 -0
- package/dist/table/index.js +1 -0
- package/dist/table/table.d.ts +36 -0
- package/dist/table/table.js +69 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +1 -0
- package/dist/tabs/tabs.d.ts +43 -0
- package/dist/tabs/tabs.js +66 -0
- package/dist/text/index.d.ts +3 -0
- package/dist/text/index.js +1 -0
- package/dist/text/text.d.ts +24 -0
- package/dist/text/text.js +24 -0
- package/dist/text-field/index.d.ts +2 -0
- package/dist/text-field/index.js +1 -0
- package/dist/text-field/text-field.d.ts +15 -0
- package/dist/text-field/text-field.js +43 -0
- package/dist/toast/index.d.ts +2 -0
- package/dist/toast/index.js +1 -0
- package/dist/toast/toast.d.ts +57 -0
- package/dist/toast/toast.js +124 -0
- package/dist/toggle/index.d.ts +2 -0
- package/dist/toggle/index.js +1 -0
- package/dist/toggle/toggle.d.ts +48 -0
- package/dist/toggle/toggle.js +54 -0
- package/dist/tooltip/index.d.ts +2 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/tooltip/tooltip.d.ts +26 -0
- package/dist/tooltip/tooltip.js +39 -0
- package/dist/visually-hidden/index.d.ts +2 -0
- package/dist/visually-hidden/index.js +1 -0
- package/dist/visually-hidden/visually-hidden.d.ts +8 -0
- package/dist/visually-hidden/visually-hidden.js +12 -0
- package/package.json +170 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Accordion, AccordionItem, AccordionItemProps, AccordionProps, Collapsible, CollapsiblePanel, CollapsiblePanelProps, CollapsibleProps, CollapsibleTrigger, CollapsibleTriggerProps } from "./accordion.js";
|
|
2
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, Collapsible, CollapsiblePanel, type CollapsiblePanelProps, type CollapsibleProps, CollapsibleTrigger, type CollapsibleTriggerProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion, AccordionItem, Collapsible, CollapsiblePanel, CollapsibleTrigger } from "./accordion.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
2
|
+
import { CSSProperties, ReactElement } from "react";
|
|
3
|
+
export type AvatarSize = "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export interface AvatarProps extends Omit<Avatar.Root.Props, "className" | "style" | "children"> {
|
|
5
|
+
/** The person's name: the image's text alternative, and the source of the initials. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The photo. The initials show while it loads, and if it fails. */
|
|
8
|
+
src?: string;
|
|
9
|
+
/** `sm` 24, `md` 32 (default), `lg` 40 or `xl` 48px. */
|
|
10
|
+
size?: AvatarSize;
|
|
11
|
+
/** The name is shown beside it: hide the avatar from assistive technology. */
|
|
12
|
+
decorative?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A person: their photo, or their initials (06-component-specs.md, increment 6). A circle, since
|
|
18
|
+
* people are one of the two soft shapes. It's named by `name`, unless `decorative`.
|
|
19
|
+
*/
|
|
20
|
+
declare function Avatar$1({ name, src, size, decorative, className, ...props }: AvatarProps): ReactElement;
|
|
21
|
+
export { Avatar$1 as Avatar };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
5
|
+
// src/avatar/avatar.tsx
|
|
6
|
+
const graphemes = typeof Intl !== "undefined" && "Segmenter" in Intl ? new Intl.Segmenter(void 0, { granularity: "grapheme" }) : void 0;
|
|
7
|
+
function firstGrapheme(word) {
|
|
8
|
+
if (!graphemes) return Array.from(word)[0] ?? "";
|
|
9
|
+
for (const { segment } of graphemes.segment(word)) return segment;
|
|
10
|
+
return "";
|
|
11
|
+
}
|
|
12
|
+
/** The first grapheme of the first and last words: "Priya Sharma" is "PS". */
|
|
13
|
+
function initials(name) {
|
|
14
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
15
|
+
const first = words[0] ?? "";
|
|
16
|
+
const last = words.length > 1 ? words.at(-1) ?? "" : "";
|
|
17
|
+
return (firstGrapheme(first) + firstGrapheme(last)).toLocaleUpperCase();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A person: their photo, or their initials (06-component-specs.md, increment 6). A circle, since
|
|
21
|
+
* people are one of the two soft shapes. It's named by `name`, unless `decorative`.
|
|
22
|
+
*/
|
|
23
|
+
function Avatar$1({ name, src, size = "md", decorative, className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsxs(Avatar.Root, {
|
|
25
|
+
...props,
|
|
26
|
+
role: decorative ? void 0 : "img",
|
|
27
|
+
"aria-label": decorative ? void 0 : name,
|
|
28
|
+
"aria-hidden": decorative || void 0,
|
|
29
|
+
className: cx("qx-avatar", className),
|
|
30
|
+
"data-slot": "avatar",
|
|
31
|
+
"data-size": size,
|
|
32
|
+
children: [src && /* @__PURE__ */ jsx(Avatar.Image, {
|
|
33
|
+
src,
|
|
34
|
+
alt: "",
|
|
35
|
+
className: "qx-avatar-image"
|
|
36
|
+
}), /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
37
|
+
className: "qx-avatar-fallback",
|
|
38
|
+
"aria-hidden": true,
|
|
39
|
+
children: initials(name)
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
export { Avatar$1 as Avatar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from "./avatar.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { QeetrixIcon } from "../internal/control.js";
|
|
2
|
+
import { ComponentProps, ReactElement } from "react";
|
|
3
|
+
export type BadgeTone = "neutral" | "brand" | "info" | "success" | "warning" | "danger";
|
|
4
|
+
export interface BadgeProps extends ComponentProps<"span"> {
|
|
5
|
+
/** Default `neutral`. The word carries the meaning; the tone only reinforces it. */
|
|
6
|
+
tone?: BadgeTone;
|
|
7
|
+
/** A leading icon from `@qeetrix/icons`: sharp, 12px, decorative. */
|
|
8
|
+
icon?: QeetrixIcon;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A short, static status or count: one or two words (06-component-specs.md §10). It truncates with
|
|
12
|
+
* an ellipsis; pass `title` with the full text where it may be cut. Server-safe.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Badge({ tone, icon: Icon, className, children, ...props }: BadgeProps): ReactElement;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cx } from "../internal/cx.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
// src/badge/badge.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A short, static status or count: one or two words (06-component-specs.md §10). It truncates with
|
|
6
|
+
* an ellipsis; pass `title` with the full text where it may be cut. Server-safe.
|
|
7
|
+
*/
|
|
8
|
+
function Badge({ tone = "neutral", icon: Icon, className, children, ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
10
|
+
...props,
|
|
11
|
+
className: cx("qx-badge", className),
|
|
12
|
+
"data-slot": "badge",
|
|
13
|
+
"data-tone": tone,
|
|
14
|
+
children: [Icon && /* @__PURE__ */ jsx(Icon, {
|
|
15
|
+
shape: "sharp",
|
|
16
|
+
size: 12,
|
|
17
|
+
"aria-hidden": true,
|
|
18
|
+
className: "qx-badge-icon"
|
|
19
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
20
|
+
className: "qx-badge-label",
|
|
21
|
+
children
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
export { Badge };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge } from "./badge.js";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RenderProp } from "../internal/render.js";
|
|
2
|
+
import { Inset } from "../internal/space.js";
|
|
3
|
+
import { ComponentProps, ReactElement } from "react";
|
|
4
|
+
export type BoxBackground = "canvas" | "default" | "raised" | "sunken" | "overlay" | "inverse" | "neutral" | "brand" | "selected";
|
|
5
|
+
export type BoxBorder = "none" | "subtle" | "default" | "strong";
|
|
6
|
+
export type BoxRadius = "none" | "sm" | "control" | "surface" | "overlay" | "modal" | "chip" | "full";
|
|
7
|
+
export interface BoxProps extends ComponentProps<"div"> {
|
|
8
|
+
/** Padding on every side, from the inset tokens. */
|
|
9
|
+
padding?: Inset;
|
|
10
|
+
/** Padding at the start and end; overrides `padding` on those sides. */
|
|
11
|
+
paddingInline?: Inset;
|
|
12
|
+
/** Padding at the top and bottom; overrides `padding` on those sides. */
|
|
13
|
+
paddingBlock?: Inset;
|
|
14
|
+
/** A surface or tint from the tokens. `inverse` also sets inverse text colour. */
|
|
15
|
+
background?: BoxBackground;
|
|
16
|
+
/** A 1px border in a token colour. */
|
|
17
|
+
border?: BoxBorder;
|
|
18
|
+
/** Corners from the radius tokens. */
|
|
19
|
+
radius?: BoxRadius;
|
|
20
|
+
/** Render a different element, e.g. `<section />`. */
|
|
21
|
+
render?: RenderProp;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A token-only surface: the sanctioned way to give a region padding, a background, a border or
|
|
25
|
+
* corners. It has no margin: space between siblings belongs to the parent's `gap`.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Box({ padding, paddingInline, paddingBlock, background, border, radius, render, className, ...props }: BoxProps): ReactElement;
|
package/dist/box/box.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cx } from "../internal/cx.js";
|
|
2
|
+
import { renderElement } from "../internal/render.js";
|
|
3
|
+
// src/box/box.tsx
|
|
4
|
+
/**
|
|
5
|
+
* A token-only surface: the sanctioned way to give a region padding, a background, a border or
|
|
6
|
+
* corners. It has no margin: space between siblings belongs to the parent's `gap`.
|
|
7
|
+
*/
|
|
8
|
+
function Box({ padding, paddingInline, paddingBlock, background, border, radius, render, className, ...props }) {
|
|
9
|
+
return renderElement("div", render, {
|
|
10
|
+
...props,
|
|
11
|
+
className: cx("qx-box", className),
|
|
12
|
+
"data-slot": "box",
|
|
13
|
+
"data-padding": padding,
|
|
14
|
+
"data-padding-inline": paddingInline,
|
|
15
|
+
"data-padding-block": paddingBlock,
|
|
16
|
+
"data-background": background,
|
|
17
|
+
"data-border": border,
|
|
18
|
+
"data-radius": radius
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export { Box };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Box } from "./box.js";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ControlSize, QeetrixIcon } from "../internal/control.js";
|
|
2
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
3
|
+
import { Button } from "@base-ui/react/button";
|
|
4
|
+
export type ButtonVariant = "solid" | "soft" | "ghost";
|
|
5
|
+
export type ButtonTone = "brand" | "danger" | "neutral";
|
|
6
|
+
interface ButtonBaseProps extends Omit<ComponentProps<"button">, "children"> {
|
|
7
|
+
/** Emphasis: `solid` (primary, Ember), `soft` (secondary, graphite), `ghost` (tertiary). */
|
|
8
|
+
variant?: ButtonVariant;
|
|
9
|
+
/**
|
|
10
|
+
* `danger` for the confirming action of a destructive flow. `neutral` for ghost utility actions
|
|
11
|
+
* in toolbars and headers, whose icons stay neutral (design rules §16); a solid or soft neutral
|
|
12
|
+
* button looks like the soft one.
|
|
13
|
+
*/
|
|
14
|
+
tone?: ButtonTone;
|
|
15
|
+
/** Height from the density tokens. Default `md`. */
|
|
16
|
+
size?: ControlSize;
|
|
17
|
+
/** Busy: a spinner replaces the icon, clicks are ignored and `aria-busy` is set. */
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
/** Render a different element through Base UI, e.g. a router link. */
|
|
20
|
+
render?: Button.Props["render"];
|
|
21
|
+
}
|
|
22
|
+
export interface ButtonProps extends ButtonBaseProps {
|
|
23
|
+
/** The label. Write it as a verb: "Create invoice". */
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/** A trailing icon from `@qeetrix/icons`; rendered in the sharp shape. */
|
|
26
|
+
icon?: QeetrixIcon;
|
|
27
|
+
/** Fill the width of the container (forms, mobile). */
|
|
28
|
+
fullWidth?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IconButtonProps extends ButtonBaseProps {
|
|
31
|
+
/** The icon, from `@qeetrix/icons`; rendered in the sharp shape. */
|
|
32
|
+
icon: QeetrixIcon;
|
|
33
|
+
/** Required: an icon-only button has no visible label. */
|
|
34
|
+
"aria-label": string;
|
|
35
|
+
/**
|
|
36
|
+
* The tooltip, which shows the `aria-label` by default (06-component-specs.md §1). Pass other text
|
|
37
|
+
* to show that instead, or `false` where the label is visible nearby.
|
|
38
|
+
*/
|
|
39
|
+
tooltip?: ReactNode | false;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* An action. One `solid` and one `soft` per region, everything else `ghost` (design rules §7).
|
|
43
|
+
* Disabled buttons stay focusable, so the reason they're disabled can be read.
|
|
44
|
+
*/
|
|
45
|
+
declare function Button$1({ variant, tone, size, icon, loading, fullWidth, disabled, className, children, type, ...props }: ButtonProps): ReactElement;
|
|
46
|
+
/**
|
|
47
|
+
* A square, icon-only button. Its `aria-label` is required by its type, and it shows as a tooltip.
|
|
48
|
+
*/
|
|
49
|
+
export declare function IconButton({ variant, tone, size, icon, loading, tooltip, disabled, className, type, ...props }: IconButtonProps): ReactElement;
|
|
50
|
+
export { Button$1 as Button };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { iconSize } from "../internal/control.js";
|
|
4
|
+
import { Spinner } from "../spinner/spinner.js";
|
|
5
|
+
import { Tooltip } from "../tooltip/tooltip.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Button } from "@base-ui/react/button";
|
|
8
|
+
// src/button/button.tsx
|
|
9
|
+
function content(icon, size, loading) {
|
|
10
|
+
if (loading) return /* @__PURE__ */ jsx(Spinner, {
|
|
11
|
+
decorative: true,
|
|
12
|
+
size: size === "lg" ? "lg" : "md"
|
|
13
|
+
});
|
|
14
|
+
if (!icon) return null;
|
|
15
|
+
return /* @__PURE__ */ jsx(icon, {
|
|
16
|
+
shape: "sharp",
|
|
17
|
+
size: iconSize(size),
|
|
18
|
+
"aria-hidden": true,
|
|
19
|
+
className: "qx-button-icon",
|
|
20
|
+
"data-slot": "button-icon"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* An action. One `solid` and one `soft` per region, everything else `ghost` (design rules §7).
|
|
25
|
+
* Disabled buttons stay focusable, so the reason they're disabled can be read.
|
|
26
|
+
*/
|
|
27
|
+
function Button$1({ variant = "solid", tone = "brand", size = "md", icon, loading = false, fullWidth, disabled, className, children, type = "button", ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
29
|
+
...props,
|
|
30
|
+
type,
|
|
31
|
+
disabled: disabled || loading,
|
|
32
|
+
focusableWhenDisabled: true,
|
|
33
|
+
"aria-busy": loading || void 0,
|
|
34
|
+
className: cx("qx-button", className),
|
|
35
|
+
"data-slot": "button",
|
|
36
|
+
"data-variant": variant,
|
|
37
|
+
"data-tone": tone,
|
|
38
|
+
"data-size": size,
|
|
39
|
+
"data-icon": icon ? "" : void 0,
|
|
40
|
+
"data-loading": loading ? "" : void 0,
|
|
41
|
+
"data-full-width": fullWidth ? "" : void 0,
|
|
42
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "qx-button-label",
|
|
44
|
+
"data-slot": "button-label",
|
|
45
|
+
children
|
|
46
|
+
}), (icon || loading) && /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: "qx-button-zone",
|
|
48
|
+
"data-slot": "button-zone",
|
|
49
|
+
children: content(icon, size, loading)
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* A square, icon-only button. Its `aria-label` is required by its type, and it shows as a tooltip.
|
|
55
|
+
*/
|
|
56
|
+
function IconButton({ variant = "ghost", tone = "brand", size = "md", icon, loading = false, tooltip, disabled, className, type = "button", ...props }) {
|
|
57
|
+
const button = /* @__PURE__ */ jsx(Button, {
|
|
58
|
+
...props,
|
|
59
|
+
type,
|
|
60
|
+
disabled: disabled || loading,
|
|
61
|
+
focusableWhenDisabled: true,
|
|
62
|
+
"aria-busy": loading || void 0,
|
|
63
|
+
className: cx("qx-button qx-icon-button", className),
|
|
64
|
+
"data-slot": "icon-button",
|
|
65
|
+
"data-variant": variant,
|
|
66
|
+
"data-tone": tone,
|
|
67
|
+
"data-size": size,
|
|
68
|
+
"data-icon": "",
|
|
69
|
+
"data-loading": loading ? "" : void 0,
|
|
70
|
+
children: content(icon, size, loading)
|
|
71
|
+
});
|
|
72
|
+
if (tooltip === false) return button;
|
|
73
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
74
|
+
content: tooltip ?? props["aria-label"],
|
|
75
|
+
children: button
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
export { Button$1 as Button, IconButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button, IconButton } from "./button.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RenderProp } from "../internal/render.js";
|
|
2
|
+
import { HeadingLevel } from "../heading/heading.js";
|
|
3
|
+
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
4
|
+
/** A titled card names its heading level, so the page sets the outline, not the look. */
|
|
5
|
+
type CardTitle = {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
level: HeadingLevel;
|
|
8
|
+
} | {
|
|
9
|
+
title?: undefined;
|
|
10
|
+
level?: undefined;
|
|
11
|
+
};
|
|
12
|
+
interface CardOwnProps extends Omit<ComponentProps<"div">, "title"> {
|
|
13
|
+
/** A line under the title. */
|
|
14
|
+
description?: ReactNode;
|
|
15
|
+
/** Actions at the end of the header, e.g. a ghost "View all" button. */
|
|
16
|
+
actions?: ReactNode;
|
|
17
|
+
/** A ruled footer, e.g. the card's actions. */
|
|
18
|
+
footer?: ReactNode;
|
|
19
|
+
/** Render a different element, e.g. `render={<article />}`. */
|
|
20
|
+
render?: RenderProp;
|
|
21
|
+
}
|
|
22
|
+
/** Card props: a `title` needs its heading `level`. The children are the body. */
|
|
23
|
+
export type CardProps = CardOwnProps & CardTitle;
|
|
24
|
+
/**
|
|
25
|
+
* Related content on a page (06-component-specs.md §9): a raised, ruled surface with no shadow. A
|
|
26
|
+
* titled card is a section labelled by its title. A Table as the body's direct child runs edge to
|
|
27
|
+
* edge. Server-safe.
|
|
28
|
+
*/
|
|
29
|
+
export declare function Card({ title, level, description, actions, footer, render, className, children, ...props }: CardProps): ReactElement;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { cx } from "../internal/cx.js";
|
|
2
|
+
import { renderElement } from "../internal/render.js";
|
|
3
|
+
import { Heading } from "../heading/heading.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { useId } from "react";
|
|
6
|
+
// src/card/card.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Related content on a page (06-component-specs.md §9): a raised, ruled surface with no shadow. A
|
|
9
|
+
* titled card is a section labelled by its title. A Table as the body's direct child runs edge to
|
|
10
|
+
* edge. Server-safe.
|
|
11
|
+
*/
|
|
12
|
+
function Card({ title, level, description, actions, footer, render, className, children, ...props }) {
|
|
13
|
+
const titleId = useId();
|
|
14
|
+
const titled = title != null && level !== void 0;
|
|
15
|
+
const header = titled || description != null || actions != null;
|
|
16
|
+
return renderElement(titled ? "section" : "div", render, {
|
|
17
|
+
...titled ? { "aria-labelledby": titleId } : {},
|
|
18
|
+
...props,
|
|
19
|
+
className: cx("qx-card", className),
|
|
20
|
+
"data-slot": "card",
|
|
21
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22
|
+
header && /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: "qx-card-header",
|
|
24
|
+
"data-slot": "card-header",
|
|
25
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
26
|
+
className: "qx-card-heading",
|
|
27
|
+
children: [titled && /* @__PURE__ */ jsx(Heading, {
|
|
28
|
+
level,
|
|
29
|
+
size: "title-sm",
|
|
30
|
+
id: titleId,
|
|
31
|
+
children: title
|
|
32
|
+
}), description != null && /* @__PURE__ */ jsx("p", {
|
|
33
|
+
className: "qx-card-description",
|
|
34
|
+
"data-slot": "card-description",
|
|
35
|
+
children: description
|
|
36
|
+
})]
|
|
37
|
+
}), actions != null && /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: "qx-card-actions",
|
|
39
|
+
"data-slot": "card-actions",
|
|
40
|
+
children: actions
|
|
41
|
+
})]
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ jsx("div", {
|
|
44
|
+
className: "qx-card-body",
|
|
45
|
+
"data-slot": "card-body",
|
|
46
|
+
children
|
|
47
|
+
}),
|
|
48
|
+
footer != null && /* @__PURE__ */ jsx("div", {
|
|
49
|
+
className: "qx-card-footer",
|
|
50
|
+
"data-slot": "card-footer",
|
|
51
|
+
children: footer
|
|
52
|
+
})
|
|
53
|
+
] })
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
export { Card };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card } from "./card.js";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { FieldMessageProps } from "../field/field.js";
|
|
2
|
+
import { ChoiceLabelProps, ChoiceOrientation } from "../field/choice.js";
|
|
3
|
+
import { CSSProperties, ReactElement, ReactNode } from "react";
|
|
4
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
5
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
6
|
+
interface CheckboxOwnProps extends Omit<Checkbox.Root.Props, "className" | "style" | "children"> {
|
|
7
|
+
/** A line under the label. */
|
|
8
|
+
description?: ReactNode;
|
|
9
|
+
/** Placement of the row (or of the control alone, with no label) only. */
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
/** Checkbox props: Base UI's, plus `label` — or, with no visible label, a required `aria-label`. */
|
|
14
|
+
export type CheckboxProps = CheckboxOwnProps & ChoiceLabelProps;
|
|
15
|
+
/**
|
|
16
|
+
* Turns one option on or off, or picks several inside a CheckboxGroup (06-component-specs.md §3).
|
|
17
|
+
* `ref` and Base UI props go to the control; the label makes the whole row the click target.
|
|
18
|
+
*/
|
|
19
|
+
declare function Checkbox$1({ label, description, className, style, indeterminate, ...props }: CheckboxProps): ReactElement;
|
|
20
|
+
export interface CheckboxGroupProps extends Omit<CheckboxGroup.Props, "className" | "style" | "render">, FieldMessageProps {
|
|
21
|
+
/** The question, shown as the group's legend. */
|
|
22
|
+
label: ReactNode;
|
|
23
|
+
/** The field name the checked values submit under. */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** `vertical` (default) or `horizontal` for short options. */
|
|
26
|
+
orientation?: ChoiceOrientation;
|
|
27
|
+
/** Placement only (margin, width, grid placement). */
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
}
|
|
31
|
+
/** Several options under one question; `value` is the array of checked options' values. */
|
|
32
|
+
declare function CheckboxGroup$1({ label, description, error, name, disabled, orientation, className, style, children, ...props }: CheckboxGroupProps): ReactElement;
|
|
33
|
+
export { Checkbox$1 as Checkbox, CheckboxGroup$1 as CheckboxGroup };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../internal/cx.js";
|
|
3
|
+
import { ChoiceGroup, ChoiceRow } from "../field/choice.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
6
|
+
import { CheckboxGroup } from "@base-ui/react/checkbox-group";
|
|
7
|
+
import { CheckIcon } from "@qeetrix/icons/icons/check";
|
|
8
|
+
import { MinusIcon } from "@qeetrix/icons/icons/minus";
|
|
9
|
+
// src/checkbox/checkbox.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Turns one option on or off, or picks several inside a CheckboxGroup (06-component-specs.md §3).
|
|
12
|
+
* `ref` and Base UI props go to the control; the label makes the whole row the click target.
|
|
13
|
+
*/
|
|
14
|
+
function Checkbox$1({ label, description, className, style, indeterminate, ...props }) {
|
|
15
|
+
const Mark = indeterminate ? MinusIcon : CheckIcon;
|
|
16
|
+
return /* @__PURE__ */ jsx(ChoiceRow, {
|
|
17
|
+
kind: "checkbox",
|
|
18
|
+
label,
|
|
19
|
+
description,
|
|
20
|
+
disabled: props.disabled,
|
|
21
|
+
className,
|
|
22
|
+
style,
|
|
23
|
+
children: /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
24
|
+
...props,
|
|
25
|
+
indeterminate,
|
|
26
|
+
className: cx("qx-checkbox", label == null ? className : void 0),
|
|
27
|
+
style: label == null ? style : void 0,
|
|
28
|
+
"data-slot": "checkbox-indicator",
|
|
29
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
30
|
+
className: "qx-checkbox-mark",
|
|
31
|
+
"data-slot": "checkbox-mark",
|
|
32
|
+
children: /* @__PURE__ */ jsx(Mark, {
|
|
33
|
+
shape: "sharp",
|
|
34
|
+
size: 12,
|
|
35
|
+
strokeWidth: 3,
|
|
36
|
+
"aria-hidden": true
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/** Several options under one question; `value` is the array of checked options' values. */
|
|
43
|
+
function CheckboxGroup$1({ label, description, error, name, disabled, orientation = "vertical", className, style, children, ...props }) {
|
|
44
|
+
return /* @__PURE__ */ jsx(ChoiceGroup, {
|
|
45
|
+
kind: "checkbox",
|
|
46
|
+
label,
|
|
47
|
+
description,
|
|
48
|
+
error,
|
|
49
|
+
name,
|
|
50
|
+
disabled,
|
|
51
|
+
orientation,
|
|
52
|
+
className,
|
|
53
|
+
style,
|
|
54
|
+
group: /* @__PURE__ */ jsx(CheckboxGroup, {
|
|
55
|
+
...props,
|
|
56
|
+
disabled
|
|
57
|
+
}),
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
export { Checkbox$1 as Checkbox, CheckboxGroup$1 as CheckboxGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Checkbox, CheckboxGroup } from "./checkbox.js";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
@import "./base.css";
|
|
2
|
+
|
|
3
|
+
@layer qx.components {
|
|
4
|
+
.qx-accordion {
|
|
5
|
+
border-block-end: var(--qx-border-width-default) solid var(--qx-color-border-subtle);
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
min-inline-size: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.qx-accordion-item {
|
|
12
|
+
border-block-start: var(--qx-border-width-default) solid var(--qx-color-border-subtle);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.qx-accordion-header {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.qx-accordion-trigger {
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--qx-space-gap-md);
|
|
23
|
+
inline-size: 100%;
|
|
24
|
+
min-block-size: var(--qx-size-control-lg);
|
|
25
|
+
color: var(--qx-color-text-default);
|
|
26
|
+
font: var(--qx-typography-title-sm);
|
|
27
|
+
font-variation-settings: "GEOM" var(--qx-font-geometry-heading);
|
|
28
|
+
text-align: start;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
background: none;
|
|
31
|
+
border: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
display: flex;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.qx-accordion-trigger:focus-visible {
|
|
37
|
+
outline: var(--qx-focus-ring-width) solid var(--qx-color-border-focus);
|
|
38
|
+
outline-offset: calc(-1 * var(--qx-focus-ring-width));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.qx-accordion-trigger[data-disabled] {
|
|
42
|
+
color: var(--qx-color-text-disabled);
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.qx-accordion-icon {
|
|
47
|
+
color: var(--qx-color-icon-subtle);
|
|
48
|
+
transition-property: rotate;
|
|
49
|
+
transition-duration: var(--qx-motion-duration-normal);
|
|
50
|
+
transition-timing-function: var(--qx-motion-easing-standard);
|
|
51
|
+
flex: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-panel-open] > .qx-accordion-icon {
|
|
55
|
+
rotate: 180deg;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.qx-accordion-panel, .qx-collapsible-panel {
|
|
59
|
+
block-size: var(--accordion-panel-height, var(--collapsible-panel-height));
|
|
60
|
+
transition-property: block-size;
|
|
61
|
+
transition-duration: var(--qx-motion-duration-normal);
|
|
62
|
+
transition-timing-function: var(--qx-motion-easing-standard);
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:is(.qx-accordion-panel, .qx-collapsible-panel)[data-starting-style], :is(.qx-accordion-panel, .qx-collapsible-panel)[data-ending-style] {
|
|
67
|
+
block-size: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.qx-accordion-content {
|
|
71
|
+
padding-block-end: var(--qx-space-inset-lg);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@import "./base.css";
|
|
2
|
+
|
|
3
|
+
@layer qx.components {
|
|
4
|
+
.qx-avatar {
|
|
5
|
+
border-radius: var(--qx-radius-full);
|
|
6
|
+
background: var(--qx-color-bg-neutral-subtle-pressed);
|
|
7
|
+
block-size: 32px;
|
|
8
|
+
inline-size: 32px;
|
|
9
|
+
color: var(--qx-color-text-default);
|
|
10
|
+
font: var(--qx-typography-label-sm);
|
|
11
|
+
font-variation-settings: "GEOM" var(--qx-font-geometry-body);
|
|
12
|
+
vertical-align: middle;
|
|
13
|
+
-webkit-user-select: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
flex: none;
|
|
16
|
+
place-items: center;
|
|
17
|
+
display: inline-grid;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.qx-avatar[data-size="sm"] {
|
|
22
|
+
block-size: 24px;
|
|
23
|
+
inline-size: 24px;
|
|
24
|
+
font-size: var(--qx-typography-label-sm-font-size);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.qx-avatar[data-size="lg"] {
|
|
28
|
+
block-size: 40px;
|
|
29
|
+
inline-size: 40px;
|
|
30
|
+
font: var(--qx-typography-label-md);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.qx-avatar[data-size="xl"] {
|
|
34
|
+
block-size: 48px;
|
|
35
|
+
inline-size: 48px;
|
|
36
|
+
font: var(--qx-typography-label-md);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.qx-avatar-image {
|
|
40
|
+
object-fit: cover;
|
|
41
|
+
block-size: 100%;
|
|
42
|
+
inline-size: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media (forced-colors: active) {
|
|
46
|
+
.qx-avatar {
|
|
47
|
+
border: var(--qx-border-width-default) solid CanvasText;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|