@agent-native/design-system 0.0.0-stage → 0.229.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/LICENSE +21 -0
- package/README.md +78 -2
- package/THIRD_PARTY_NOTICES.md +58 -0
- package/css/appearances.css +91 -0
- package/css/main.css +174 -0
- package/css/parts/accordion.css +104 -0
- package/css/parts/alert-dialog.css +159 -0
- package/css/parts/app-shell.css +45 -0
- package/css/parts/aspect-ratio.css +20 -0
- package/css/parts/autocomplete.css +366 -0
- package/css/parts/avatar.css +108 -0
- package/css/parts/badge.css +100 -0
- package/css/parts/blockquote.css +23 -0
- package/css/parts/button.css +238 -0
- package/css/parts/callout.css +108 -0
- package/css/parts/card.css +144 -0
- package/css/parts/checkbox-cards.css +59 -0
- package/css/parts/checkbox-group.css +20 -0
- package/css/parts/checkbox.css +127 -0
- package/css/parts/code.css +194 -0
- package/css/parts/collapsible.css +40 -0
- package/css/parts/combobox.css +171 -0
- package/css/parts/context-menu.css +18 -0
- package/css/parts/data-list.css +130 -0
- package/css/parts/dialog.css +251 -0
- package/css/parts/drawer.css +289 -0
- package/css/parts/em.css +16 -0
- package/css/parts/field.css +55 -0
- package/css/parts/fieldset.css +34 -0
- package/css/parts/form.css +18 -0
- package/css/parts/heading.css +25 -0
- package/css/parts/icon-button.css +30 -0
- package/css/parts/input.css +206 -0
- package/css/parts/inset.css +90 -0
- package/css/parts/item.css +208 -0
- package/css/parts/kbd.css +126 -0
- package/css/parts/link.css +99 -0
- package/css/parts/menu.css +342 -0
- package/css/parts/menubar.css +71 -0
- package/css/parts/meter.css +112 -0
- package/css/parts/navigation-menu.css +199 -0
- package/css/parts/number-field.css +124 -0
- package/css/parts/otp-field.css +137 -0
- package/css/parts/page-header.css +45 -0
- package/css/parts/popover.css +149 -0
- package/css/parts/preview-card.css +116 -0
- package/css/parts/progress.css +159 -0
- package/css/parts/quote.css +18 -0
- package/css/parts/radio-cards.css +188 -0
- package/css/parts/radio-group.css +124 -0
- package/css/parts/scroll-area.css +95 -0
- package/css/parts/segmented-control.css +191 -0
- package/css/parts/select.css +378 -0
- package/css/parts/separator.css +48 -0
- package/css/parts/sidebar.css +211 -0
- package/css/parts/skeleton.css +65 -0
- package/css/parts/slider.css +156 -0
- package/css/parts/spinner.css +52 -0
- package/css/parts/strong.css +15 -0
- package/css/parts/switch.css +138 -0
- package/css/parts/tab-nav.css +48 -0
- package/css/parts/table.css +177 -0
- package/css/parts/tabs.css +214 -0
- package/css/parts/text-area.css +140 -0
- package/css/parts/text.css +245 -0
- package/css/parts/toast.css +302 -0
- package/css/parts/toggle-group.css +25 -0
- package/css/parts/toggle.css +181 -0
- package/css/parts/toolbar.css +133 -0
- package/css/parts/tooltip.css +61 -0
- package/css/parts/visually-hidden.css +21 -0
- package/css/styles.css +73 -0
- package/css/themes/agent-native.css +2321 -0
- package/css/themes/analytics.css +1159 -0
- package/css/themes/assets.css +1159 -0
- package/css/themes/baseline.css +1107 -0
- package/css/themes/brain.css +1159 -0
- package/css/themes/calendar.css +1159 -0
- package/css/themes/chat.css +1159 -0
- package/css/themes/clips.css +1159 -0
- package/css/themes/content.css +1159 -0
- package/css/themes/crm.css +1159 -0
- package/css/themes/design.css +1159 -0
- package/css/themes/desktop.css +1159 -0
- package/css/themes/dispatch.css +1159 -0
- package/css/themes/docs.css +1159 -0
- package/css/themes/factory.css +1159 -0
- package/css/themes/forms.css +1159 -0
- package/css/themes/mail.css +1159 -0
- package/css/themes/plan.css +1159 -0
- package/css/themes/slides.css +1159 -0
- package/css/themes/tasks.css +1159 -0
- package/css/tokens.css +1249 -0
- package/package.json +67 -4
- package/src/catalog/components/alert-dialog.ts +9 -0
- package/src/catalog/components/aspect-ratio.ts +6 -0
- package/src/catalog/components/autocomplete.ts +23 -0
- package/src/catalog/components/avatar.ts +16 -0
- package/src/catalog/components/badge.ts +19 -0
- package/src/catalog/components/blockquote.ts +10 -0
- package/src/catalog/components/button.ts +24 -0
- package/src/catalog/components/callout.ts +17 -0
- package/src/catalog/components/card.ts +10 -0
- package/src/catalog/components/checkbox-cards.ts +14 -0
- package/src/catalog/components/checkbox-group.ts +13 -0
- package/src/catalog/components/checkbox.ts +13 -0
- package/src/catalog/components/code.ts +22 -0
- package/src/catalog/components/combobox.ts +23 -0
- package/src/catalog/components/context-menu.ts +20 -0
- package/src/catalog/components/data-list.ts +14 -0
- package/src/catalog/components/dialog.ts +9 -0
- package/src/catalog/components/drawer.ts +9 -0
- package/src/catalog/components/em.ts +7 -0
- package/src/catalog/components/heading.ts +11 -0
- package/src/catalog/components/index.ts +54 -0
- package/src/catalog/components/input.ts +23 -0
- package/src/catalog/components/inset.ts +15 -0
- package/src/catalog/components/item.ts +21 -0
- package/src/catalog/components/kbd.ts +9 -0
- package/src/catalog/components/link.ts +19 -0
- package/src/catalog/components/menu.ts +20 -0
- package/src/catalog/components/menubar.ts +20 -0
- package/src/catalog/components/meter.ts +19 -0
- package/src/catalog/components/number-field.ts +10 -0
- package/src/catalog/components/otp-field.ts +9 -0
- package/src/catalog/components/popover.ts +9 -0
- package/src/catalog/components/preview-card.ts +9 -0
- package/src/catalog/components/progress.ts +24 -0
- package/src/catalog/components/quote.ts +7 -0
- package/src/catalog/components/radio-cards.ts +14 -0
- package/src/catalog/components/radio-group.ts +13 -0
- package/src/catalog/components/scroll-area.ts +15 -0
- package/src/catalog/components/segmented-control.ts +8 -0
- package/src/catalog/components/select.ts +26 -0
- package/src/catalog/components/separator.ts +14 -0
- package/src/catalog/components/skeleton.ts +8 -0
- package/src/catalog/components/slider.ts +19 -0
- package/src/catalog/components/spinner.ts +15 -0
- package/src/catalog/components/strong.ts +7 -0
- package/src/catalog/components/switch.ts +19 -0
- package/src/catalog/components/tab-nav.ts +18 -0
- package/src/catalog/components/table.ts +34 -0
- package/src/catalog/components/tabs.ts +18 -0
- package/src/catalog/components/text-area.ts +24 -0
- package/src/catalog/components/text.ts +11 -0
- package/src/catalog/components/toast.ts +12 -0
- package/src/catalog/components/toggle-group.ts +17 -0
- package/src/catalog/components/toggle.ts +17 -0
- package/src/catalog/components/toolbar.ts +6 -0
- package/src/catalog/index.ts +4 -0
- package/src/catalog/parts.ts +915 -0
- package/src/catalog/prop-types-source.ts +93 -0
- package/src/catalog/prop-types.generated.ts +1402 -0
- package/src/catalog/props.ts +225 -0
- package/src/css.ts +318 -0
- package/src/generated-css.ts +21 -0
- package/src/index.ts +8 -0
- package/src/model/compare.ts +127 -0
- package/src/model/dom.ts +253 -0
- package/src/model/ids.ts +25 -0
- package/src/model/index.ts +6 -0
- package/src/model/styles.ts +254 -0
- package/src/model/types.ts +97 -0
- package/src/model/validate.ts +133 -0
- package/src/themes/appearances.ts +105 -0
- package/src/themes/baseline.ts +27 -0
- package/src/themes/index.ts +85 -0
- package/src/themes/reference.ts +9 -0
- package/src/themes/shadcn.ts +239 -0
- package/src/themes/types.ts +53 -0
- package/src/tokens/at.ts +13 -0
- package/src/tokens/base.ts +48 -0
- package/src/tokens/color/bezier.ts +111 -0
- package/src/tokens/color/index.ts +2 -0
- package/src/tokens/color/radix-generator.ts +516 -0
- package/src/tokens/dtcg.ts +298 -0
- package/src/tokens/files/foundations.tokens.json +318 -0
- package/src/tokens/files/palette.tokens.json +58 -0
- package/src/tokens/files/themes/agent-native.dark.tokens.json +405 -0
- package/src/tokens/files/themes/agent-native.light.tokens.json +405 -0
- package/src/tokens/files/themes/analytics.dark.tokens.json +391 -0
- package/src/tokens/files/themes/analytics.light.tokens.json +391 -0
- package/src/tokens/files/themes/assets.dark.tokens.json +391 -0
- package/src/tokens/files/themes/assets.light.tokens.json +391 -0
- package/src/tokens/files/themes/brain.dark.tokens.json +391 -0
- package/src/tokens/files/themes/brain.light.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.dark.tokens.json +391 -0
- package/src/tokens/files/themes/calendar.light.tokens.json +391 -0
- package/src/tokens/files/themes/chat.dark.tokens.json +391 -0
- package/src/tokens/files/themes/chat.light.tokens.json +391 -0
- package/src/tokens/files/themes/clips.dark.tokens.json +391 -0
- package/src/tokens/files/themes/clips.light.tokens.json +391 -0
- package/src/tokens/files/themes/content.dark.tokens.json +391 -0
- package/src/tokens/files/themes/content.light.tokens.json +391 -0
- package/src/tokens/files/themes/crm.dark.tokens.json +391 -0
- package/src/tokens/files/themes/crm.light.tokens.json +391 -0
- package/src/tokens/files/themes/design.dark.tokens.json +391 -0
- package/src/tokens/files/themes/design.light.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.dark.tokens.json +391 -0
- package/src/tokens/files/themes/desktop.light.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.dark.tokens.json +391 -0
- package/src/tokens/files/themes/dispatch.light.tokens.json +391 -0
- package/src/tokens/files/themes/docs.dark.tokens.json +391 -0
- package/src/tokens/files/themes/docs.light.tokens.json +391 -0
- package/src/tokens/files/themes/factory.dark.tokens.json +391 -0
- package/src/tokens/files/themes/factory.light.tokens.json +391 -0
- package/src/tokens/files/themes/forms.dark.tokens.json +391 -0
- package/src/tokens/files/themes/forms.light.tokens.json +391 -0
- package/src/tokens/files/themes/mail.dark.tokens.json +391 -0
- package/src/tokens/files/themes/mail.light.tokens.json +391 -0
- package/src/tokens/files/themes/plan.dark.tokens.json +391 -0
- package/src/tokens/files/themes/plan.light.tokens.json +391 -0
- package/src/tokens/files/themes/slides.dark.tokens.json +391 -0
- package/src/tokens/files/themes/slides.light.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.dark.tokens.json +391 -0
- package/src/tokens/files/themes/tasks.light.tokens.json +391 -0
- package/src/tokens/palette.ts +354 -0
- package/src/tokens/primitives.ts +84 -0
- package/src/tokens/roles.ts +269 -0
- package/src/tokens/round-trip.ts +277 -0
- package/src/tokens/source.ts +302 -0
- package/tsconfig.json +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-native/design-system",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.229.0",
|
|
4
|
+
"description": "Skinnable design tokens, brand color generation, and component CSS for Agent-Native apps.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"files": [
|
|
7
|
+
"css",
|
|
8
|
+
"dist",
|
|
9
|
+
"src",
|
|
10
|
+
"!src/**/*.spec.ts",
|
|
11
|
+
"!src/**/__fixtures__",
|
|
12
|
+
"THIRD_PARTY_NOTICES.md",
|
|
13
|
+
"tsconfig.json"
|
|
14
|
+
],
|
|
15
|
+
"type": "module",
|
|
16
|
+
"sideEffects": [
|
|
17
|
+
"*.css"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./color": {
|
|
25
|
+
"types": "./dist/tokens/color/index.d.ts",
|
|
26
|
+
"default": "./dist/tokens/color/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./catalog": {
|
|
29
|
+
"types": "./dist/catalog/index.d.ts",
|
|
30
|
+
"default": "./dist/catalog/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./model": {
|
|
33
|
+
"types": "./dist/model/index.d.ts",
|
|
34
|
+
"default": "./dist/model/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./tokens.css": "./css/tokens.css",
|
|
37
|
+
"./main.css": "./css/main.css",
|
|
38
|
+
"./styles.css": "./css/styles.css",
|
|
39
|
+
"./themes/*.css": "./css/themes/*.css",
|
|
40
|
+
"./appearances.css": "./css/appearances.css",
|
|
41
|
+
"./package.json": "./package.json"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"provenance": true
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc",
|
|
49
|
+
"css": "tsx scripts/build-css.ts",
|
|
50
|
+
"css:check": "tsx scripts/build-css.ts --check",
|
|
51
|
+
"props": "tsx scripts/build-prop-types.ts",
|
|
52
|
+
"props:check": "tsx scripts/build-prop-types.ts --check",
|
|
53
|
+
"tokens:export": "tsx scripts/tokens.ts export",
|
|
54
|
+
"tokens:import": "tsx scripts/tokens.ts import",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"test": "vitest --run"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@radix-ui/colors": "^3.0.0",
|
|
60
|
+
"colorjs.io": "^0.7.1"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/node": "^24.2.1",
|
|
64
|
+
"jsdom": "30.1.2",
|
|
65
|
+
"tsx": "^4.20.3",
|
|
66
|
+
"typescript-7": "catalog:",
|
|
67
|
+
"vitest": "catalog:"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
colorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
popupColorProp,
|
|
6
|
+
radiusProp,
|
|
7
|
+
sizeProp,
|
|
8
|
+
variantProp,
|
|
9
|
+
} from "../props.js";
|
|
10
|
+
|
|
11
|
+
/** The input takes Input's props; the popup takes Menu's. */
|
|
12
|
+
export const autocompleteProps = {
|
|
13
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
14
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
15
|
+
color: colorProp,
|
|
16
|
+
radius: radiusProp,
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export const autocompletePopupProps = {
|
|
20
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
21
|
+
color: popupColorProp,
|
|
22
|
+
highContrast: highContrastProp,
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
colorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
radiusProp,
|
|
6
|
+
sizeProp,
|
|
7
|
+
variantProp,
|
|
8
|
+
} from "../props.js";
|
|
9
|
+
|
|
10
|
+
export const avatarProps = {
|
|
11
|
+
size: sizeProp(CONTROL_SIZES, "3", "Diameter"),
|
|
12
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
13
|
+
color: colorProp,
|
|
14
|
+
highContrast: highContrastProp,
|
|
15
|
+
radius: radiusProp,
|
|
16
|
+
} as const;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
booleanProp,
|
|
3
|
+
colorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
radiusProp,
|
|
6
|
+
sizeProp,
|
|
7
|
+
variantProp,
|
|
8
|
+
} from "../props.js";
|
|
9
|
+
|
|
10
|
+
export const badgeProps = {
|
|
11
|
+
size: sizeProp(["1", "2", "3"], "2"),
|
|
12
|
+
variant: variantProp(["solid", "soft", "surface", "outline"], "soft"),
|
|
13
|
+
color: colorProp,
|
|
14
|
+
highContrast: highContrastProp,
|
|
15
|
+
radius: radiusProp,
|
|
16
|
+
dot: booleanProp(
|
|
17
|
+
"Shows only a dot in the badge's color; the label stays for assistive technology.",
|
|
18
|
+
),
|
|
19
|
+
} as const;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { enumProp, TEXT_SIZES, textProps } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const blockquoteProps = {
|
|
4
|
+
size: enumProp(TEXT_SIZES, "A step of the type scale; unset, it inherits."),
|
|
5
|
+
weight: textProps.weight,
|
|
6
|
+
truncate: textProps.truncate,
|
|
7
|
+
wrap: textProps.wrap,
|
|
8
|
+
color: textProps.color,
|
|
9
|
+
highContrast: textProps.highContrast,
|
|
10
|
+
} as const;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
booleanProp,
|
|
4
|
+
colorProp,
|
|
5
|
+
highContrastProp,
|
|
6
|
+
radiusProp,
|
|
7
|
+
sizeProp,
|
|
8
|
+
VARIANTS,
|
|
9
|
+
variantProp,
|
|
10
|
+
} from "../props.js";
|
|
11
|
+
|
|
12
|
+
/** Button and Icon Button share their props, as in Radix Themes. */
|
|
13
|
+
export const buttonProps = {
|
|
14
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
15
|
+
variant: variantProp(VARIANTS, "solid"),
|
|
16
|
+
color: colorProp,
|
|
17
|
+
highContrast: highContrastProp,
|
|
18
|
+
radius: radiusProp,
|
|
19
|
+
loading: booleanProp(
|
|
20
|
+
"Shows a spinner over the content, keeping the width, and disables the button.",
|
|
21
|
+
),
|
|
22
|
+
} as const;
|
|
23
|
+
|
|
24
|
+
export const iconButtonProps = buttonProps;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
variantProp,
|
|
6
|
+
} from "../props.js";
|
|
7
|
+
|
|
8
|
+
export const calloutProps = {
|
|
9
|
+
size: enumProp(
|
|
10
|
+
["1", "2", "3"],
|
|
11
|
+
"Padding, gap and type step of the callout: compact, standard, roomy.",
|
|
12
|
+
"2",
|
|
13
|
+
),
|
|
14
|
+
variant: variantProp(["soft", "surface", "outline"], "soft"),
|
|
15
|
+
color: colorProp,
|
|
16
|
+
highContrast: highContrastProp,
|
|
17
|
+
} as const;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { enumProp, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const cardProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
["1", "2", "3", "4", "5"],
|
|
6
|
+
"Padding: 1 is 8px, 2 12px, 3 16px, 4 24px, 5 32px.",
|
|
7
|
+
"2",
|
|
8
|
+
),
|
|
9
|
+
variant: variantProp(["surface", "ghost"], "surface"),
|
|
10
|
+
} as const;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
variantProp,
|
|
6
|
+
} from "../props.js";
|
|
7
|
+
|
|
8
|
+
/** Radix Themes' checkbox cards: a Checkbox Group whose options are cards. */
|
|
9
|
+
export const checkboxCardsProps = {
|
|
10
|
+
size: enumProp(["1", "2", "3"], "Padding and type step of each card.", "2"),
|
|
11
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
12
|
+
color: colorProp,
|
|
13
|
+
highContrast: highContrastProp,
|
|
14
|
+
} as const;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
variantProp,
|
|
6
|
+
} from "../props.js";
|
|
7
|
+
|
|
8
|
+
export const checkboxGroupProps = {
|
|
9
|
+
size: enumProp(["1", "2", "3"], "Box: 1 is 12px, 2 is 16px, 3 is 20px.", "2"),
|
|
10
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
11
|
+
color: colorProp,
|
|
12
|
+
highContrast: highContrastProp,
|
|
13
|
+
} as const;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
variantProp,
|
|
6
|
+
} from "../props.js";
|
|
7
|
+
|
|
8
|
+
export const checkboxProps = {
|
|
9
|
+
size: enumProp(["1", "2", "3"], "Box: 1 is 12px, 2 is 16px, 3 is 20px.", "2"),
|
|
10
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
11
|
+
color: colorProp,
|
|
12
|
+
highContrast: highContrastProp,
|
|
13
|
+
} as const;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
TEXT_SIZES,
|
|
6
|
+
TEXT_WEIGHTS,
|
|
7
|
+
textProps,
|
|
8
|
+
variantProp,
|
|
9
|
+
} from "../props.js";
|
|
10
|
+
|
|
11
|
+
export const codeProps = {
|
|
12
|
+
size: enumProp(
|
|
13
|
+
TEXT_SIZES,
|
|
14
|
+
"A step of the type scale; unset, it follows the surrounding text.",
|
|
15
|
+
),
|
|
16
|
+
variant: variantProp(["solid", "soft", "outline", "ghost"], "soft"),
|
|
17
|
+
weight: enumProp(TEXT_WEIGHTS, "Font weight, one of the weight tokens."),
|
|
18
|
+
truncate: textProps.truncate,
|
|
19
|
+
wrap: textProps.wrap,
|
|
20
|
+
color: colorProp,
|
|
21
|
+
highContrast: highContrastProp,
|
|
22
|
+
} as const;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
colorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
popupColorProp,
|
|
6
|
+
radiusProp,
|
|
7
|
+
sizeProp,
|
|
8
|
+
variantProp,
|
|
9
|
+
} from "../props.js";
|
|
10
|
+
|
|
11
|
+
/** The input takes Input's props; the popup takes Menu's. */
|
|
12
|
+
export const comboboxProps = {
|
|
13
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
14
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
15
|
+
color: colorProp,
|
|
16
|
+
radius: radiusProp,
|
|
17
|
+
} as const;
|
|
18
|
+
|
|
19
|
+
export const comboboxPopupProps = {
|
|
20
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
21
|
+
color: popupColorProp,
|
|
22
|
+
highContrast: highContrastProp,
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
popupColorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
sizeProp,
|
|
6
|
+
variantProp,
|
|
7
|
+
} from "../props.js";
|
|
8
|
+
|
|
9
|
+
/** The popup: its rows' size and how the highlighted row is filled. */
|
|
10
|
+
export const contextMenuContentProps = {
|
|
11
|
+
size: sizeProp(["2", "3"], "3", "Row height"),
|
|
12
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
13
|
+
color: popupColorProp,
|
|
14
|
+
highContrast: highContrastProp,
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/** A row: `color` marks a destructive or status item, as in Radix Themes. */
|
|
18
|
+
export const contextMenuItemProps = {
|
|
19
|
+
color: colorProp,
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { enumProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const dataListProps = {
|
|
4
|
+
orientation: enumProp(
|
|
5
|
+
["horizontal", "vertical"],
|
|
6
|
+
"Labels beside their values, or above them.",
|
|
7
|
+
"horizontal",
|
|
8
|
+
),
|
|
9
|
+
size: enumProp(["1", "2", "3"], "Type step and spacing of the rows.", "2"),
|
|
10
|
+
trim: enumProp(
|
|
11
|
+
["normal", "start", "end", "both"],
|
|
12
|
+
"Trims the leading of the first and last rows.",
|
|
13
|
+
),
|
|
14
|
+
} as const;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { enumProp, TEXT_SIZES, textProps } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const headingProps = {
|
|
4
|
+
as: enumProp(
|
|
5
|
+
["h1", "h2", "h3", "h4", "h5", "h6"],
|
|
6
|
+
"The heading level it renders.",
|
|
7
|
+
"h1",
|
|
8
|
+
),
|
|
9
|
+
size: enumProp(TEXT_SIZES, "A step of the type scale.", "6"),
|
|
10
|
+
...textProps,
|
|
11
|
+
} as const;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export * from "./alert-dialog.js";
|
|
2
|
+
export * from "./aspect-ratio.js";
|
|
3
|
+
export * from "./autocomplete.js";
|
|
4
|
+
export * from "./avatar.js";
|
|
5
|
+
export * from "./badge.js";
|
|
6
|
+
export * from "./blockquote.js";
|
|
7
|
+
export * from "./button.js";
|
|
8
|
+
export * from "./callout.js";
|
|
9
|
+
export * from "./card.js";
|
|
10
|
+
export * from "./checkbox.js";
|
|
11
|
+
export * from "./checkbox-cards.js";
|
|
12
|
+
export * from "./checkbox-group.js";
|
|
13
|
+
export * from "./code.js";
|
|
14
|
+
export * from "./combobox.js";
|
|
15
|
+
export * from "./context-menu.js";
|
|
16
|
+
export * from "./data-list.js";
|
|
17
|
+
export * from "./dialog.js";
|
|
18
|
+
export * from "./drawer.js";
|
|
19
|
+
export * from "./em.js";
|
|
20
|
+
export * from "./heading.js";
|
|
21
|
+
export * from "./input.js";
|
|
22
|
+
export * from "./inset.js";
|
|
23
|
+
export * from "./item.js";
|
|
24
|
+
export * from "./kbd.js";
|
|
25
|
+
export * from "./link.js";
|
|
26
|
+
export * from "./menu.js";
|
|
27
|
+
export * from "./menubar.js";
|
|
28
|
+
export * from "./meter.js";
|
|
29
|
+
export * from "./number-field.js";
|
|
30
|
+
export * from "./otp-field.js";
|
|
31
|
+
export * from "./popover.js";
|
|
32
|
+
export * from "./preview-card.js";
|
|
33
|
+
export * from "./progress.js";
|
|
34
|
+
export * from "./quote.js";
|
|
35
|
+
export * from "./radio-cards.js";
|
|
36
|
+
export * from "./radio-group.js";
|
|
37
|
+
export * from "./scroll-area.js";
|
|
38
|
+
export * from "./segmented-control.js";
|
|
39
|
+
export * from "./select.js";
|
|
40
|
+
export * from "./separator.js";
|
|
41
|
+
export * from "./skeleton.js";
|
|
42
|
+
export * from "./slider.js";
|
|
43
|
+
export * from "./spinner.js";
|
|
44
|
+
export * from "./strong.js";
|
|
45
|
+
export * from "./switch.js";
|
|
46
|
+
export * from "./tab-nav.js";
|
|
47
|
+
export * from "./table.js";
|
|
48
|
+
export * from "./tabs.js";
|
|
49
|
+
export * from "./text.js";
|
|
50
|
+
export * from "./text-area.js";
|
|
51
|
+
export * from "./toast.js";
|
|
52
|
+
export * from "./toggle.js";
|
|
53
|
+
export * from "./toggle-group.js";
|
|
54
|
+
export * from "./toolbar.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
colorProp,
|
|
4
|
+
enumProp,
|
|
5
|
+
radiusProp,
|
|
6
|
+
sizeProp,
|
|
7
|
+
variantProp,
|
|
8
|
+
} from "../props.js";
|
|
9
|
+
|
|
10
|
+
export const inputProps = {
|
|
11
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
12
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
13
|
+
color: colorProp,
|
|
14
|
+
radius: radiusProp,
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/** A slot in the input's frame, for an icon, a button or text. */
|
|
18
|
+
export const inputSlotProps = {
|
|
19
|
+
side: enumProp(
|
|
20
|
+
["left", "right"],
|
|
21
|
+
"The side it sits on; unset, the first slot goes left and the next right.",
|
|
22
|
+
),
|
|
23
|
+
} as const;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { enumProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Lets media inside a Card run to its edges, as Radix Themes' Inset. */
|
|
4
|
+
export const insetProps = {
|
|
5
|
+
side: enumProp(
|
|
6
|
+
["all", "x", "y", "top", "bottom", "left", "right"],
|
|
7
|
+
"The edges it pulls out to.",
|
|
8
|
+
"all",
|
|
9
|
+
),
|
|
10
|
+
clip: enumProp(
|
|
11
|
+
["border-box", "padding-box"],
|
|
12
|
+
"Clips its content to the card's border or its padding.",
|
|
13
|
+
"border-box",
|
|
14
|
+
),
|
|
15
|
+
} as const;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { booleanProp, enumProp, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Not in Radix Themes: a row in a list, its size the row's padding. */
|
|
4
|
+
export const itemProps = {
|
|
5
|
+
size: enumProp(
|
|
6
|
+
["1", "2"],
|
|
7
|
+
"Padding: 1 is the compact row, 2 the standard one.",
|
|
8
|
+
"2",
|
|
9
|
+
),
|
|
10
|
+
variant: variantProp(["ghost", "outline", "soft"], "ghost"),
|
|
11
|
+
} as const;
|
|
12
|
+
|
|
13
|
+
export const itemGroupProps = {
|
|
14
|
+
variant: variantProp(["ghost", "outline"], "ghost"),
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export const itemMediaProps = {
|
|
18
|
+
framed: booleanProp(
|
|
19
|
+
"Sets an icon in a framed tile; unframed media, an Avatar, stays as it is.",
|
|
20
|
+
),
|
|
21
|
+
} as const;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { enumProp, TEXT_SIZES, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const kbdProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
TEXT_SIZES,
|
|
6
|
+
"A step of the type scale; unset, it follows the surrounding text.",
|
|
7
|
+
),
|
|
8
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
9
|
+
} as const;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { enumProp, TEXT_SIZES, textProps } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const linkProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
TEXT_SIZES,
|
|
6
|
+
"A step of the type scale; unset, it follows the surrounding text.",
|
|
7
|
+
),
|
|
8
|
+
underline: enumProp(
|
|
9
|
+
["auto", "always", "hover", "none"],
|
|
10
|
+
"When the underline shows; `auto` shows it on hover, and always in high contrast.",
|
|
11
|
+
"auto",
|
|
12
|
+
),
|
|
13
|
+
weight: textProps.weight,
|
|
14
|
+
trim: textProps.trim,
|
|
15
|
+
truncate: textProps.truncate,
|
|
16
|
+
wrap: textProps.wrap,
|
|
17
|
+
color: textProps.color,
|
|
18
|
+
highContrast: textProps.highContrast,
|
|
19
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
popupColorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
sizeProp,
|
|
6
|
+
variantProp,
|
|
7
|
+
} from "../props.js";
|
|
8
|
+
|
|
9
|
+
/** The popup: its rows' size and how the highlighted row is filled. */
|
|
10
|
+
export const menuContentProps = {
|
|
11
|
+
size: sizeProp(["2", "3"], "3", "Row height"),
|
|
12
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
13
|
+
color: popupColorProp,
|
|
14
|
+
highContrast: highContrastProp,
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/** A row: `color` marks a destructive or status item, as in Radix Themes. */
|
|
18
|
+
export const menuItemProps = {
|
|
19
|
+
color: colorProp,
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
popupColorProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
sizeProp,
|
|
6
|
+
variantProp,
|
|
7
|
+
} from "../props.js";
|
|
8
|
+
|
|
9
|
+
/** The popup: its rows' size and how the highlighted row is filled. */
|
|
10
|
+
export const menubarContentProps = {
|
|
11
|
+
size: sizeProp(["2", "3"], "3", "Row height"),
|
|
12
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
13
|
+
color: popupColorProp,
|
|
14
|
+
highContrast: highContrastProp,
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
/** A row: `color` marks a destructive or status item, as in Radix Themes. */
|
|
18
|
+
export const menubarItemProps = {
|
|
19
|
+
color: colorProp,
|
|
20
|
+
} as const;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
radiusProp,
|
|
6
|
+
variantProp,
|
|
7
|
+
} from "../props.js";
|
|
8
|
+
|
|
9
|
+
export const meterProps = {
|
|
10
|
+
size: enumProp(
|
|
11
|
+
["1", "2", "3"],
|
|
12
|
+
"Track thickness: 1 is 4px, 2 is 6px, 3 is 8px.",
|
|
13
|
+
"2",
|
|
14
|
+
),
|
|
15
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
16
|
+
color: colorProp,
|
|
17
|
+
highContrast: highContrastProp,
|
|
18
|
+
radius: radiusProp,
|
|
19
|
+
} as const;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import { colorProp, radiusProp, sizeProp, variantProp } from "../props.js";
|
|
3
|
+
|
|
4
|
+
/** Base UI's number field, drawn as Input is, with its scrub area and steppers. */
|
|
5
|
+
export const numberFieldProps = {
|
|
6
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
7
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
8
|
+
color: colorProp,
|
|
9
|
+
radius: radiusProp,
|
|
10
|
+
} as const;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import { colorProp, radiusProp, sizeProp, variantProp } from "../props.js";
|
|
3
|
+
|
|
4
|
+
export const otpFieldProps = {
|
|
5
|
+
size: sizeProp(CONTROL_SIZES, "4"),
|
|
6
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
7
|
+
color: colorProp,
|
|
8
|
+
radius: radiusProp,
|
|
9
|
+
} as const;
|