@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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
radiusProp,
|
|
6
|
+
variantProp,
|
|
7
|
+
} from "../props.js";
|
|
8
|
+
|
|
9
|
+
export const progressProps = {
|
|
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
|
+
duration: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description:
|
|
22
|
+
"A CSS duration: an indeterminate bar fills over it, as in Radix Themes.",
|
|
23
|
+
},
|
|
24
|
+
} as const;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colorProp,
|
|
3
|
+
enumProp,
|
|
4
|
+
highContrastProp,
|
|
5
|
+
variantProp,
|
|
6
|
+
} from "../props.js";
|
|
7
|
+
|
|
8
|
+
/** Radix Themes' radio cards: a Radio Group whose options are cards. */
|
|
9
|
+
export const radioCardsProps = {
|
|
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 radioGroupProps = {
|
|
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,15 @@
|
|
|
1
|
+
import { enumProp, radiusProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const scrollAreaProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
["1", "2", "3"],
|
|
6
|
+
"Scrollbar thickness: 1 is 4px, 2 is 8px, 3 is 12px.",
|
|
7
|
+
"1",
|
|
8
|
+
),
|
|
9
|
+
radius: radiusProp,
|
|
10
|
+
scrollbars: enumProp(
|
|
11
|
+
["vertical", "horizontal", "both"],
|
|
12
|
+
"Which scrollbars it draws.",
|
|
13
|
+
"both",
|
|
14
|
+
),
|
|
15
|
+
} as const;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { enumProp, radiusProp, sizeProp, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Radix Themes' segmented control: one choice among a few, in one track. */
|
|
4
|
+
export const segmentedControlProps = {
|
|
5
|
+
size: sizeProp(["2", "3", "4"], "3"),
|
|
6
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
7
|
+
radius: radiusProp,
|
|
8
|
+
} as const;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { CONTROL_SIZES } from "../../tokens/roles.js";
|
|
2
|
+
import {
|
|
3
|
+
colorProp,
|
|
4
|
+
popupColorProp,
|
|
5
|
+
highContrastProp,
|
|
6
|
+
radiusProp,
|
|
7
|
+
sizeProp,
|
|
8
|
+
variantProp,
|
|
9
|
+
} from "../props.js";
|
|
10
|
+
|
|
11
|
+
/** On the root: the trigger and the popup share one size, as in Radix Themes. */
|
|
12
|
+
export const selectRootProps = {
|
|
13
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
16
|
+
export const selectTriggerProps = {
|
|
17
|
+
variant: variantProp(["surface", "soft", "ghost"], "surface"),
|
|
18
|
+
color: colorProp,
|
|
19
|
+
radius: radiusProp,
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
export const selectContentProps = {
|
|
23
|
+
variant: variantProp(["solid", "soft"], "soft"),
|
|
24
|
+
color: popupColorProp,
|
|
25
|
+
highContrast: highContrastProp,
|
|
26
|
+
} as const;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { COLORS, enumProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const separatorProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
["1", "2", "3", "4"],
|
|
6
|
+
"Length: 1 is 16px, 2 is 32px, 3 is 64px, 4 is the full length.",
|
|
7
|
+
"4",
|
|
8
|
+
),
|
|
9
|
+
color: enumProp(
|
|
10
|
+
COLORS,
|
|
11
|
+
"The scale the line draws from; gray unless set.",
|
|
12
|
+
"gray",
|
|
13
|
+
),
|
|
14
|
+
} 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 sliderProps = {
|
|
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,15 @@
|
|
|
1
|
+
import { enumProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const spinnerProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
["1", "2", "3"],
|
|
6
|
+
"Diameter: 1 is 12px, 2 is 16px, 3 is 20px.",
|
|
7
|
+
"2",
|
|
8
|
+
),
|
|
9
|
+
loading: {
|
|
10
|
+
type: "boolean",
|
|
11
|
+
default: true,
|
|
12
|
+
description:
|
|
13
|
+
"While false, renders its children in place of the spinner, as Radix Themes does.",
|
|
14
|
+
},
|
|
15
|
+
} 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 switchProps = {
|
|
10
|
+
size: enumProp(
|
|
11
|
+
["1", "2", "3"],
|
|
12
|
+
"Track height: 1 is 12px, 2 is 16px, 3 is 20px.",
|
|
13
|
+
"2",
|
|
14
|
+
),
|
|
15
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
16
|
+
color: colorProp,
|
|
17
|
+
highContrast: highContrastProp,
|
|
18
|
+
radius: radiusProp,
|
|
19
|
+
} as const;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { colorProp, enumProp, highContrastProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Radix Themes' tab nav: Tabs' look for links between pages. */
|
|
4
|
+
export const tabNavProps = {
|
|
5
|
+
size: enumProp(["1", "2"], "Link height: 1 is 24px, 2 is 32px.", "2"),
|
|
6
|
+
color: colorProp,
|
|
7
|
+
highContrast: highContrastProp,
|
|
8
|
+
justify: enumProp(
|
|
9
|
+
["start", "center", "end"],
|
|
10
|
+
"Where the links sit along the row.",
|
|
11
|
+
"start",
|
|
12
|
+
),
|
|
13
|
+
wrap: enumProp(
|
|
14
|
+
["nowrap", "wrap", "wrap-reverse"],
|
|
15
|
+
"Whether the links wrap onto more rows.",
|
|
16
|
+
"nowrap",
|
|
17
|
+
),
|
|
18
|
+
} as const;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { enumProp, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const tableProps = {
|
|
4
|
+
size: enumProp(
|
|
5
|
+
["1", "2", "3"],
|
|
6
|
+
"Cell padding: compact, standard, roomy.",
|
|
7
|
+
"2",
|
|
8
|
+
),
|
|
9
|
+
variant: variantProp(["surface", "ghost"], "ghost"),
|
|
10
|
+
layout: enumProp(
|
|
11
|
+
["auto", "fixed"],
|
|
12
|
+
"The table's column layout algorithm.",
|
|
13
|
+
"auto",
|
|
14
|
+
),
|
|
15
|
+
} as const;
|
|
16
|
+
|
|
17
|
+
export const tableRowProps = {
|
|
18
|
+
align: enumProp(
|
|
19
|
+
["start", "center", "end", "baseline"],
|
|
20
|
+
"Where the row's cells sit vertically.",
|
|
21
|
+
"start",
|
|
22
|
+
),
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
25
|
+
export const tableCellProps = {
|
|
26
|
+
justify: enumProp(
|
|
27
|
+
["start", "center", "end"],
|
|
28
|
+
"Where the cell's content sits along the row.",
|
|
29
|
+
"start",
|
|
30
|
+
),
|
|
31
|
+
width: { type: "string", description: "A CSS width for the cell's column." },
|
|
32
|
+
minWidth: { type: "string", description: "A CSS minimum width." },
|
|
33
|
+
maxWidth: { type: "string", description: "A CSS maximum width." },
|
|
34
|
+
} as const;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { colorProp, enumProp, highContrastProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Radix Themes' tabs: a row of triggers over an underline indicator. */
|
|
4
|
+
export const tabsListProps = {
|
|
5
|
+
size: enumProp(["1", "2"], "Trigger height: 1 is 24px, 2 is 32px.", "2"),
|
|
6
|
+
color: colorProp,
|
|
7
|
+
highContrast: highContrastProp,
|
|
8
|
+
justify: enumProp(
|
|
9
|
+
["start", "center", "end"],
|
|
10
|
+
"Where the triggers sit along the list.",
|
|
11
|
+
"start",
|
|
12
|
+
),
|
|
13
|
+
wrap: enumProp(
|
|
14
|
+
["nowrap", "wrap", "wrap-reverse"],
|
|
15
|
+
"Whether the triggers wrap onto more rows.",
|
|
16
|
+
"nowrap",
|
|
17
|
+
),
|
|
18
|
+
} as const;
|
|
@@ -0,0 +1,24 @@
|
|
|
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 textAreaProps = {
|
|
11
|
+
size: sizeProp(
|
|
12
|
+
CONTROL_SIZES,
|
|
13
|
+
"3",
|
|
14
|
+
"The height of the Input it matches, which sets its padding and type",
|
|
15
|
+
),
|
|
16
|
+
variant: variantProp(["surface", "soft"], "surface"),
|
|
17
|
+
color: colorProp,
|
|
18
|
+
radius: radiusProp,
|
|
19
|
+
resize: enumProp(
|
|
20
|
+
["none", "vertical", "horizontal", "both"],
|
|
21
|
+
"Which way the reader can resize it.",
|
|
22
|
+
"vertical",
|
|
23
|
+
),
|
|
24
|
+
} as const;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { enumProp, TEXT_SIZES, textProps } from "../props.js";
|
|
2
|
+
|
|
3
|
+
export const textComponentProps = {
|
|
4
|
+
as: enumProp(
|
|
5
|
+
["span", "div", "label", "p"],
|
|
6
|
+
"The element it renders.",
|
|
7
|
+
"span",
|
|
8
|
+
),
|
|
9
|
+
size: enumProp(TEXT_SIZES, "A step of the type scale; unset, it inherits."),
|
|
10
|
+
...textProps,
|
|
11
|
+
} as const;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { COLORS, enumProp, highContrastProp, variantProp } from "../props.js";
|
|
2
|
+
|
|
3
|
+
/** Base UI's toast. `color` marks a status toast: success, danger and so on. */
|
|
4
|
+
export const toastProps = {
|
|
5
|
+
variant: variantProp(["surface", "soft", "solid"], "surface"),
|
|
6
|
+
color: enumProp(
|
|
7
|
+
COLORS,
|
|
8
|
+
"The status the toast reports; gray unless set.",
|
|
9
|
+
"gray",
|
|
10
|
+
),
|
|
11
|
+
highContrast: highContrastProp,
|
|
12
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/** Not in Radix Themes: an Icon Button that stays filled while pressed. */
|
|
11
|
+
export const toggleGroupProps = {
|
|
12
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
13
|
+
variant: variantProp(["ghost", "soft", "surface", "outline"], "ghost"),
|
|
14
|
+
color: colorProp,
|
|
15
|
+
highContrast: highContrastProp,
|
|
16
|
+
radius: radiusProp,
|
|
17
|
+
} as const;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
/** Not in Radix Themes: an Icon Button that stays filled while pressed. */
|
|
11
|
+
export const toggleProps = {
|
|
12
|
+
size: sizeProp(CONTROL_SIZES, "3"),
|
|
13
|
+
variant: variantProp(["ghost", "soft", "surface", "outline"], "ghost"),
|
|
14
|
+
color: colorProp,
|
|
15
|
+
highContrast: highContrastProp,
|
|
16
|
+
radius: radiusProp,
|
|
17
|
+
} as const;
|