@astryxdesign/core 0.5.0-canary.7b60efa → 0.5.0-canary.7bd80db
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/dist/AlertDialog/AlertDialog.d.ts +1 -1
- package/dist/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/AlertDialog/AlertDialog.js +45 -20
- package/dist/AspectRatio/AspectRatio.d.ts +6 -6
- package/dist/Avatar/Avatar.d.ts +25 -1
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +43 -9
- package/dist/Avatar/index.d.ts +2 -2
- package/dist/Avatar/index.d.ts.map +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.ts +9 -2
- package/dist/AvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.js +5 -2
- package/dist/AvatarGroup/AvatarGroupContext.d.ts +2 -1
- package/dist/AvatarGroup/AvatarGroupContext.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupOverflow.js +10 -6
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +6 -2
- package/dist/Calendar/Calendar.js +1 -1
- package/dist/Calendar/styles.d.ts +5 -14
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +15 -15
- package/dist/Card/Card.d.ts +12 -12
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +17 -9
- package/dist/Card/index.d.ts +35 -1
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/Card/index.js +21 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +7 -1
- package/dist/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/CodeBlock/CodeBlock.js +15 -4
- package/dist/CodeBlock/highlightRanges.js +1 -1
- package/dist/CodeBlock/highlightStyles.js +13 -13
- package/dist/DateInput/DateInput.d.ts +43 -0
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +19 -0
- package/dist/DateInput/NativeDateField.d.ts +10 -0
- package/dist/DateInput/NativeDateField.d.ts.map +1 -0
- package/dist/DateInput/NativeDateField.js +494 -0
- package/dist/DateInput/TouchDateField.d.ts.map +1 -1
- package/dist/DateInput/TouchDateField.js +44 -19
- package/dist/DateInput/index.d.ts +1 -1
- package/dist/DateInput/index.d.ts.map +1 -1
- package/dist/DateInput/nativeDateSegments.d.ts +22 -0
- package/dist/DateInput/nativeDateSegments.d.ts.map +1 -0
- package/dist/DateInput/nativeDateSegments.js +111 -0
- package/dist/Dialog/Dialog.d.ts +16 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +28 -7
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +9 -1
- package/dist/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/HoverCard/HoverCard.js +104 -3
- package/dist/HoverCard/useHoverCard.d.ts +14 -2
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +7 -1
- package/dist/List/List.d.ts +1 -1
- package/dist/List/List.d.ts.map +1 -1
- package/dist/List/List.js +15 -4
- package/dist/Markdown/Markdown.d.ts +1 -1
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +20 -7
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +5 -3
- package/dist/MetadataList/MetadataListItem.d.ts +1 -1
- package/dist/MetadataList/MetadataListItem.d.ts.map +1 -1
- package/dist/MetadataList/MetadataListItem.js +4 -1
- package/dist/MultiSelector/MultiSelector.d.ts +18 -1
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +46 -5
- package/dist/NavIcon/NavIcon.d.ts.map +1 -1
- package/dist/NavIcon/NavIcon.js +5 -1
- package/dist/NavMenu/NavHeadingMenu.d.ts +1 -1
- package/dist/NavMenu/NavHeadingMenu.d.ts.map +1 -1
- package/dist/NavMenu/NavHeadingMenu.js +7 -4
- package/dist/NumberInput/NumberInput.d.ts +6 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +54 -104
- package/dist/NumberInput/numberInputCommit.d.ts +34 -0
- package/dist/NumberInput/numberInputCommit.d.ts.map +1 -0
- package/dist/NumberInput/numberInputCommit.js +71 -0
- package/dist/NumberInput/numberParser.d.ts +64 -0
- package/dist/NumberInput/numberParser.d.ts.map +1 -0
- package/dist/NumberInput/numberParser.js +350 -0
- package/dist/PowerSearch/PowerSearchValueEditor.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearchValueEditor.js +91 -18
- package/dist/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/ProgressBar/ProgressBar.js +18 -5
- package/dist/SelectableCard/SelectableCard.d.ts.map +1 -1
- package/dist/SelectableCard/SelectableCard.js +9 -0
- package/dist/Selector/Selector.d.ts +17 -0
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +76 -14
- package/dist/SideNav/SideNavHeading.js +2 -2
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +34 -2
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +6 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +5 -1
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +6 -1
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Table/Table.js +3 -6
- package/dist/Table/plugins/filtering/useTableFiltering.d.ts.map +1 -1
- package/dist/Table/plugins/filtering/useTableFiltering.js +73 -4
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts +26 -0
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +34 -3
- package/dist/Table/plugins/selection/useTableSelection.d.ts.map +1 -1
- package/dist/Table/plugins/selection/useTableSelection.js +25 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.d.ts.map +1 -1
- package/dist/Table/plugins/stickyColumns/useTableStickyColumns.js +3 -4
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +6 -1
- package/dist/Timestamp/Timestamp.d.ts +1 -1
- package/dist/Timestamp/Timestamp.d.ts.map +1 -1
- package/dist/Timestamp/Timestamp.js +10 -18
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +27 -8
- package/dist/Token/Token.d.ts +1 -1
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +20 -9
- package/dist/Token/TokenLink.d.ts +1 -1
- package/dist/Token/TokenLink.d.ts.map +1 -1
- package/dist/Token/TokenLink.js +5 -2
- package/dist/TopNav/TopNavHeading.js +2 -2
- package/dist/TopNav/TopNavMegaMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMegaMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenu.js +29 -9
- package/dist/TopNav/TopNavMenu.d.ts +1 -1
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +19 -5
- package/dist/TreeList/TreeList.d.ts +1 -1
- package/dist/TreeList/TreeList.d.ts.map +1 -1
- package/dist/TreeList/TreeList.js +7 -2
- package/dist/Typeahead/TypeaheadItem.d.ts +1 -1
- package/dist/Typeahead/TypeaheadItem.d.ts.map +1 -1
- package/dist/Typeahead/TypeaheadItem.js +7 -2
- package/dist/astryx.css +37 -9
- package/dist/theme/Theme.d.ts.map +1 -1
- package/dist/theme/Theme.js +46 -10
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +24 -4
- package/dist/theme/generateThemeRules.d.ts +21 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +26 -0
- package/locales/en.json +127 -3
- package/locales/pseudo.json +93 -0
- package/package.json +2 -2
- package/src/AlertDialog/AlertDialog.doc.mjs +114 -30
- package/src/AlertDialog/AlertDialog.test.tsx +211 -2
- package/src/AlertDialog/AlertDialog.tsx +62 -20
- package/src/AspectRatio/AspectRatio.doc.mjs +3 -3
- package/src/AspectRatio/AspectRatio.tsx +6 -6
- package/src/Avatar/Avatar.doc.mjs +12 -2
- package/src/Avatar/Avatar.test.tsx +80 -0
- package/src/Avatar/Avatar.tsx +64 -14
- package/src/Avatar/index.ts +2 -2
- package/src/AvatarGroup/AvatarGroup.doc.mjs +8 -2
- package/src/AvatarGroup/AvatarGroup.test.tsx +24 -0
- package/src/AvatarGroup/AvatarGroup.tsx +12 -4
- package/src/AvatarGroup/AvatarGroupContext.ts +5 -3
- package/src/AvatarGroup/AvatarGroupOverflow.tsx +10 -4
- package/src/Button/Button.doc.mjs +2 -1
- package/src/Button/Button.test.tsx +19 -4
- package/src/Button/Button.tsx +7 -1
- package/src/ButtonGroup/ButtonGroup.doc.mjs +2 -2
- package/src/ButtonGroup/ButtonGroup.test.tsx +13 -0
- package/src/Calendar/Calendar.test.tsx +51 -0
- package/src/Calendar/Calendar.tsx +1 -1
- package/src/Calendar/styles.ts +49 -31
- package/src/Card/Card.doc.mjs +10 -7
- package/src/Card/Card.test.tsx +113 -19
- package/src/Card/Card.tsx +67 -89
- package/src/Card/index.ts +36 -1
- package/src/CheckboxInput/CheckboxInput.doc.mjs +2 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +15 -0
- package/src/CheckboxInput/CheckboxInput.tsx +5 -0
- package/src/CodeBlock/CodeBlock.doc.mjs +10 -4
- package/src/CodeBlock/CodeBlock.test.tsx +37 -0
- package/src/CodeBlock/CodeBlock.tsx +20 -4
- package/src/CodeBlock/highlightRanges.ts +1 -1
- package/src/CodeBlock/highlightStyles.ts +13 -13
- package/src/DateInput/DateInput.doc.mjs +16 -0
- package/src/DateInput/DateInput.tsx +52 -0
- package/src/DateInput/DateInputTouch.test.tsx +110 -32
- package/src/DateInput/NativeDateField.test.tsx +635 -0
- package/src/DateInput/NativeDateField.tsx +641 -0
- package/src/DateInput/TouchDateField.tsx +70 -20
- package/src/DateInput/index.ts +1 -0
- package/src/DateInput/nativeDateSegments.ts +127 -0
- package/src/Dialog/Dialog.test.tsx +185 -18
- package/src/Dialog/Dialog.tsx +35 -11
- package/src/Field/FieldLabel.test.tsx +29 -0
- package/src/Field/FieldLabel.tsx +7 -0
- package/src/HoverCard/HoverCard.doc.mjs +8 -2
- package/src/HoverCard/HoverCard.test.tsx +154 -4
- package/src/HoverCard/HoverCard.tsx +137 -3
- package/src/HoverCard/useHoverCard.tsx +23 -3
- package/src/Layer/useLayer.test.tsx +62 -14
- package/src/List/List.test.tsx +38 -0
- package/src/List/List.tsx +8 -1
- package/src/Markdown/Markdown.test.tsx +37 -0
- package/src/Markdown/Markdown.tsx +16 -5
- package/src/Markdown/parser.test.ts +33 -0
- package/src/Markdown/parser.ts +9 -3
- package/src/MetadataList/MetadataList.test.tsx +75 -2
- package/src/MetadataList/MetadataListItem.tsx +5 -2
- package/src/MultiSelector/MultiSelector.doc.mjs +22 -1
- package/src/MultiSelector/MultiSelector.test.tsx +171 -0
- package/src/MultiSelector/MultiSelector.tsx +92 -5
- package/src/NavIcon/NavIcon.doc.mjs +8 -2
- package/src/NavIcon/NavIcon.test.tsx +9 -0
- package/src/NavIcon/NavIcon.tsx +5 -1
- package/src/NavMenu/NavHeadingMenu.test.tsx +30 -0
- package/src/NavMenu/NavHeadingMenu.tsx +7 -4
- package/src/NumberInput/NumberInput.doc.mjs +26 -7
- package/src/NumberInput/NumberInput.test.tsx +436 -8
- package/src/NumberInput/NumberInput.tsx +62 -114
- package/src/NumberInput/numberInputCommit.test.ts +72 -0
- package/src/NumberInput/numberInputCommit.ts +103 -0
- package/src/NumberInput/numberParser.docblock.test.ts +234 -0
- package/src/NumberInput/numberParser.test.ts +222 -0
- package/src/NumberInput/numberParser.ts +403 -0
- package/src/Pagination/Pagination.test.tsx +3 -2
- package/src/PowerSearch/PowerSearchEditPopover.test.tsx +87 -0
- package/src/PowerSearch/PowerSearchValueEditor.test.tsx +64 -0
- package/src/PowerSearch/PowerSearchValueEditor.tsx +109 -10
- package/src/ProgressBar/ProgressBar.doc.mjs +42 -6
- package/src/ProgressBar/ProgressBar.test.tsx +24 -0
- package/src/ProgressBar/ProgressBar.tsx +28 -8
- package/src/SelectableCard/SelectableCard.doc.mjs +3 -0
- package/src/SelectableCard/SelectableCard.tsx +16 -0
- package/src/Selector/Selector.doc.mjs +14 -0
- package/src/Selector/Selector.test.tsx +266 -0
- package/src/Selector/Selector.tsx +128 -15
- package/src/SideNav/SideNavHeading.tsx +2 -2
- package/src/Slider/Slider.test.tsx +106 -1
- package/src/Slider/Slider.tsx +52 -1
- package/src/StatusDot/StatusDot.doc.mjs +8 -2
- package/src/StatusDot/StatusDot.test.tsx +9 -0
- package/src/StatusDot/StatusDot.tsx +7 -1
- package/src/Stepper/Step.doc.mjs +1 -1
- package/src/Switch/Switch.doc.mjs +2 -0
- package/src/Switch/Switch.test.tsx +10 -0
- package/src/Switch/Switch.tsx +3 -0
- package/src/Table/BaseTable.tsx +6 -1
- package/src/Table/Table.doc.mjs +3 -1
- package/src/Table/Table.tsx +3 -8
- package/src/Table/TableBody.doc.mjs +2 -2
- package/src/Table/TableHeader.doc.mjs +1 -1
- package/src/Table/plugins/filtering/useTableFiltering.test.tsx +44 -6
- package/src/Table/plugins/filtering/useTableFiltering.tsx +100 -4
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +50 -4
- package/src/Table/plugins/selection/useTableSelection.test.tsx +62 -0
- package/src/Table/plugins/selection/useTableSelection.tsx +25 -2
- package/src/Table/plugins/stickyColumns/useTableStickyColumns.tsx +1 -2
- package/src/Table/useTableGroupedRows.doc.mjs +3 -3
- package/src/Table/useTablePagination.doc.mjs +1 -1
- package/src/TextArea/TextArea.doc.mjs +8 -2
- package/src/TextArea/TextArea.test.tsx +11 -0
- package/src/TextArea/TextArea.tsx +12 -6
- package/src/Timestamp/Timestamp.test.tsx +58 -0
- package/src/Timestamp/Timestamp.tsx +8 -8
- package/src/Toast/ToastViewport.tsx +17 -1
- package/src/Token/Token.test.tsx +95 -0
- package/src/Token/Token.tsx +15 -10
- package/src/Token/TokenLink.tsx +12 -3
- package/src/TopNav/TopNavHeading.tsx +2 -2
- package/src/TopNav/TopNavMegaMenu.test.tsx +104 -0
- package/src/TopNav/TopNavMegaMenu.tsx +45 -4
- package/src/TopNav/TopNavMenu.test.tsx +133 -1
- package/src/TopNav/TopNavMenu.tsx +35 -5
- package/src/TreeList/TreeList.test.tsx +49 -0
- package/src/TreeList/TreeList.tsx +7 -2
- package/src/Typeahead/TypeaheadItem.test.tsx +43 -0
- package/src/Typeahead/TypeaheadItem.tsx +8 -1
- package/src/raw-import.d.ts +14 -0
- package/src/theme/Theme.test.tsx +104 -2
- package/src/theme/Theme.tsx +49 -14
- package/src/theme/defineTheme.test.ts +23 -0
- package/src/theme/derivedVarRegistry.test.ts +23 -3
- package/src/theme/derivedVarRegistry.ts +23 -4
- package/src/theme/generateThemeRules.test.ts +99 -1
- package/src/theme/generateThemeRules.ts +28 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file AlertDialog.tsx
|
|
3
|
-
* @input Uses React, Dialog, Layout, Heading, Text, Button
|
|
3
|
+
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button
|
|
4
4
|
* @output Exports AlertDialog component, AlertDialogProps type
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by AlertDialog.test.tsx
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.d.ts","sourceRoot":"","sources":["../../src/AlertDialog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,EACX,aAA6B,EAC7B,eAAe,EACf,QAAQ,EACR,KAAW,EACX,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,gBAAgB,qBA8FlB;yBAhHe,WAAW"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AlertDialog.tsx
|
|
7
|
-
* @input Uses React, Dialog, Layout, Heading, Text, Button
|
|
7
|
+
* @input Uses React, StyleX, Dialog, Layout, Heading, Text, Button
|
|
8
8
|
* @output Exports AlertDialog component, AlertDialogProps type
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by AlertDialog.test.tsx
|
|
10
10
|
*
|
|
@@ -16,18 +16,32 @@
|
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/AlertDialog/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
18
|
import React, { useId, useCallback } from 'react';
|
|
19
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
20
|
import { Dialog } from "../Dialog/index.js";
|
|
20
21
|
import { Layout } from "../Layout/Layout.js";
|
|
21
22
|
import { LayoutContent } from "../Layout/LayoutContent.js";
|
|
22
23
|
import { LayoutFooter } from "../Layout/LayoutFooter.js";
|
|
23
|
-
import {
|
|
24
|
+
import { Stack } from "../Stack/index.js";
|
|
24
25
|
import { Heading } from "../Heading/Heading.js";
|
|
25
26
|
import { Text } from "../Text/Text.js";
|
|
26
27
|
import { Button } from "../Button/index.js";
|
|
27
28
|
import { mergeProps } from "../utils/index.js";
|
|
28
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
29
30
|
import { useTranslator } from "../i18n/index.js";
|
|
31
|
+
import { useMediaQuery } from "../hooks/index.js";
|
|
30
32
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
+
const SMALL_SCREEN_QUERY = '(max-width: 640px)';
|
|
34
|
+
const styles = {
|
|
35
|
+
action: {
|
|
36
|
+
ks0D6T: "x193iq5w",
|
|
37
|
+
k7Eaqz: "xeuugli",
|
|
38
|
+
$$css: true
|
|
39
|
+
},
|
|
40
|
+
stackedAction: {
|
|
41
|
+
kzqmXN: "xh8yej3",
|
|
42
|
+
$$css: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
31
45
|
/**
|
|
32
46
|
* A confirmation dialog for destructive or irreversible actions.
|
|
33
47
|
*
|
|
@@ -77,9 +91,33 @@ export function AlertDialog({
|
|
|
77
91
|
const cancelLabel = cancelLabelFromProps ?? t('@astryx.alertDialog.cancel');
|
|
78
92
|
const titleId = useId();
|
|
79
93
|
const descriptionId = useId();
|
|
94
|
+
// Width stays delegated to Dialog: this query exists only so AlertDialog can
|
|
95
|
+
// keep narrow visual, DOM, and tab order aligned for its destructive/cancel
|
|
96
|
+
// semantics without coupling action order to pointer or hover capability.
|
|
97
|
+
const isSmallScreen = useMediaQuery(SMALL_SCREEN_QUERY);
|
|
80
98
|
const handleCancel = useCallback(() => {
|
|
81
99
|
onOpenChange(false);
|
|
82
100
|
}, [onOpenChange]);
|
|
101
|
+
const buttonActionStyle = [styles.action, isSmallScreen && styles.stackedAction];
|
|
102
|
+
const cancelButton = /*#__PURE__*/_jsx(Button, {
|
|
103
|
+
variant: "ghost",
|
|
104
|
+
label: cancelLabel,
|
|
105
|
+
onClick: handleCancel,
|
|
106
|
+
xstyle: buttonActionStyle
|
|
107
|
+
// Dialog focuses [data-autofocus] itself after showModal(), because
|
|
108
|
+
// React's autoFocus runs during commit while the dialog is invisible.
|
|
109
|
+
// Cancel is least destructive, so it remains the autofocus target even
|
|
110
|
+
// when small-screen visual order places the destructive action above it.
|
|
111
|
+
,
|
|
112
|
+
"data-autofocus": true
|
|
113
|
+
}, "cancel");
|
|
114
|
+
const actionButton = /*#__PURE__*/_jsx(Button, {
|
|
115
|
+
variant: actionVariant,
|
|
116
|
+
label: actionLabel,
|
|
117
|
+
onClick: onAction,
|
|
118
|
+
isLoading: isActionLoading,
|
|
119
|
+
xstyle: buttonActionStyle
|
|
120
|
+
}, "action");
|
|
83
121
|
return /*#__PURE__*/_jsx(Dialog, {
|
|
84
122
|
...rest,
|
|
85
123
|
ref: ref,
|
|
@@ -117,25 +155,12 @@ export function AlertDialog({
|
|
|
117
155
|
})]
|
|
118
156
|
}),
|
|
119
157
|
footer: /*#__PURE__*/_jsx(LayoutFooter, {
|
|
120
|
-
children: /*#__PURE__*/
|
|
158
|
+
children: /*#__PURE__*/_jsx(Stack, {
|
|
159
|
+
direction: isSmallScreen ? 'vertical' : 'horizontal',
|
|
121
160
|
gap: 2,
|
|
122
|
-
hAlign:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
label: cancelLabel,
|
|
126
|
-
onClick: handleCancel
|
|
127
|
-
// Dialog focuses [data-autofocus] itself after showModal(),
|
|
128
|
-
// because React's autoFocus runs during commit while the
|
|
129
|
-
// dialog is still invisible. Cancel is the least destructive
|
|
130
|
-
// choice, so it is the one that should be preselected.
|
|
131
|
-
,
|
|
132
|
-
"data-autofocus": true
|
|
133
|
-
}), /*#__PURE__*/_jsx(Button, {
|
|
134
|
-
variant: actionVariant,
|
|
135
|
-
label: actionLabel,
|
|
136
|
-
onClick: onAction,
|
|
137
|
-
isLoading: isActionLoading
|
|
138
|
-
})]
|
|
161
|
+
hAlign: isSmallScreen ? 'stretch' : 'end',
|
|
162
|
+
wrap: isSmallScreen ? 'nowrap' : 'wrap',
|
|
163
|
+
children: isSmallScreen ? [actionButton, cancelButton] : [cancelButton, actionButton]
|
|
139
164
|
})
|
|
140
165
|
})
|
|
141
166
|
})
|
|
@@ -44,14 +44,14 @@ export interface AspectRatioProps extends BaseProps<HTMLDivElement> {
|
|
|
44
44
|
* `astryx-base` cascade layer, and unlayered CSS wins over layered
|
|
45
45
|
* rules regardless of specificity.
|
|
46
46
|
*
|
|
47
|
+
* A responsive ratio is set in CSS, not on the component. For example, a 3:1
|
|
48
|
+
* hero can become 3:2 when its container narrows by targeting the element's
|
|
49
|
+
* class from a container query:
|
|
50
|
+
* `@container gallery (max-width: 720px) { .gallery-hero { aspect-ratio: 3 / 2; } }`.
|
|
51
|
+
*
|
|
47
52
|
* @example
|
|
48
53
|
* ```
|
|
49
|
-
*
|
|
50
|
-
* <AspectRatio ratio={3 / 1} className="gallery-hero">…</AspectRatio>
|
|
51
|
-
*
|
|
52
|
-
* // CSS: @container gallery (max-width: 720px) {
|
|
53
|
-
* // .gallery-hero { aspect-ratio: 3 / 2; }
|
|
54
|
-
* // }
|
|
54
|
+
* <AspectRatio ratio={3 / 1} className="gallery-hero">...</AspectRatio>
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
57
|
ratio: number;
|
package/dist/Avatar/Avatar.d.ts
CHANGED
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { type ReactNode } from 'react';
|
|
18
18
|
import type { BaseProps } from '../BaseProps';
|
|
19
|
+
import * as stylex from '@stylexjs/stylex';
|
|
19
20
|
import type { LinkComponentType } from '../Link/types';
|
|
20
21
|
/**
|
|
21
22
|
* Named size options.
|
|
@@ -33,10 +34,25 @@ type AvatarNumericSize = 16 | 20 | 24 | 32 | 36 | 40 | 48 | 60 | 64 | 72 | 96 |
|
|
|
33
34
|
* Avatar size - can be a named size or a specific pixel value
|
|
34
35
|
*/
|
|
35
36
|
export type AvatarSize = AvatarNamedSize | AvatarNumericSize;
|
|
37
|
+
/**
|
|
38
|
+
* Avatar shape options
|
|
39
|
+
*/
|
|
40
|
+
export type AvatarShape = 'circle' | 'rounded' | 'square';
|
|
36
41
|
/**
|
|
37
42
|
* Resolves named sizes to their numeric pixel values
|
|
38
43
|
*/
|
|
39
44
|
export declare function resolveSize(size: AvatarSize): number;
|
|
45
|
+
export declare const shapeStyles: Readonly<{
|
|
46
|
+
readonly circle: Readonly<{
|
|
47
|
+
readonly '--_avatar-radius': stylex.StyleXClassNameFor<"--_avatar-radius", "9999px">;
|
|
48
|
+
}>;
|
|
49
|
+
readonly rounded: Readonly<{
|
|
50
|
+
readonly '--_avatar-radius': stylex.StyleXClassNameFor<"--_avatar-radius", "8px">;
|
|
51
|
+
}>;
|
|
52
|
+
readonly square: Readonly<{
|
|
53
|
+
readonly '--_avatar-radius': stylex.StyleXClassNameFor<"--_avatar-radius", "0px">;
|
|
54
|
+
}>;
|
|
55
|
+
}>;
|
|
40
56
|
export interface AvatarProps extends BaseProps<HTMLDivElement> {
|
|
41
57
|
/** Ref forwarded to the root element */
|
|
42
58
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -69,6 +85,14 @@ export interface AvatarProps extends BaseProps<HTMLDivElement> {
|
|
|
69
85
|
* @default 'md'
|
|
70
86
|
*/
|
|
71
87
|
size?: AvatarSize;
|
|
88
|
+
/**
|
|
89
|
+
* Shape variant of the avatar.
|
|
90
|
+
* - 'circle': Full circle (default)
|
|
91
|
+
* - 'rounded': Rounded square
|
|
92
|
+
* - 'square': Sharp square
|
|
93
|
+
* @default 'circle'
|
|
94
|
+
*/
|
|
95
|
+
shape?: AvatarShape;
|
|
72
96
|
/**
|
|
73
97
|
* The primary image source for the avatar.
|
|
74
98
|
*/
|
|
@@ -147,7 +171,7 @@ export interface AvatarProps extends BaseProps<HTMLDivElement> {
|
|
|
147
171
|
* <Avatar src="/user.jpg" name="John Doe" onClick={() => openProfile()} />
|
|
148
172
|
* ```
|
|
149
173
|
*/
|
|
150
|
-
export declare function Avatar({ alt, 'data-testid': testId, fallbackSrc, name, size, src, status, tooltip, href, as, target, rel, onClick, xstyle, className, style, ref, ...props }: AvatarProps): import("react").JSX.Element;
|
|
174
|
+
export declare function Avatar({ alt, 'data-testid': testId, fallbackSrc, name, size, shape, src, status, tooltip, href, as, target, rel, onClick, xstyle, className, style, ref, ...props }: AvatarProps): import("react").JSX.Element;
|
|
151
175
|
export declare namespace Avatar {
|
|
152
176
|
var displayName: string;
|
|
153
177
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../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AGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAChD;AAwHD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,EACrB,GAAG,EACH,aAAa,EAAE,MAAM,EACrB,WAAW,EACX,IAAI,EACJ,IAAW,EACX,KAAgB,EAChB,GAAG,EACH,MAAM,EACN,OAAc,EACd,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,+BAsVb;yBA1We,MAAM"}
|
package/dist/Avatar/Avatar.js
CHANGED
|
@@ -77,6 +77,10 @@ const INITIALS_FONT_SIZE_RATIO = 0.4;
|
|
|
77
77
|
* Avatar size - can be a named size or a specific pixel value
|
|
78
78
|
*/
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Avatar shape options
|
|
82
|
+
*/
|
|
83
|
+
|
|
80
84
|
/**
|
|
81
85
|
* Resolves named sizes to their numeric pixel values
|
|
82
86
|
*/
|
|
@@ -98,6 +102,28 @@ export function resolveSize(size) {
|
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
|
|
105
|
+
// Sets one local custom property rather than `borderRadius` directly, so
|
|
106
|
+
// every clipping/ring surface that needs the shape's radius (the wrapper,
|
|
107
|
+
// the interactive focus ring, the content div that actually clips via
|
|
108
|
+
// `overflow: hidden`, and AvatarGroupOverflow's "+N" indicator) reads the
|
|
109
|
+
// same value instead of each hardcoding its own borderRadius independently.
|
|
110
|
+
// A theme override only has to reach this one property, not fight the
|
|
111
|
+
// per-surface StyleX class order to change the shape everywhere at once.
|
|
112
|
+
export const shapeStyles = {
|
|
113
|
+
circle: {
|
|
114
|
+
"--_avatar-radius": "xeincmr",
|
|
115
|
+
$$css: true
|
|
116
|
+
},
|
|
117
|
+
rounded: {
|
|
118
|
+
"--_avatar-radius": "xdarwi0",
|
|
119
|
+
$$css: true
|
|
120
|
+
},
|
|
121
|
+
square: {
|
|
122
|
+
"--_avatar-radius": "x877142",
|
|
123
|
+
$$css: true
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
101
127
|
/**
|
|
102
128
|
* Base styles for the avatar
|
|
103
129
|
* Uses a wrapper/content structure so status isn't clipped by overflow:hidden
|
|
@@ -107,7 +133,7 @@ const styles = {
|
|
|
107
133
|
kVAEAm: "x1n2onr6",
|
|
108
134
|
k1xSpc: "x3nfvp2",
|
|
109
135
|
kmuXW: "x2lah0s",
|
|
110
|
-
kaIpWk: "
|
|
136
|
+
kaIpWk: "xbc78cj",
|
|
111
137
|
$$css: true
|
|
112
138
|
},
|
|
113
139
|
fallback: {
|
|
@@ -138,7 +164,7 @@ const styles = {
|
|
|
138
164
|
kVVagm: "xln7xf2",
|
|
139
165
|
kybGjl: "x1hl2dhg",
|
|
140
166
|
kkrTdU: "x1ypdohk x16khyan",
|
|
141
|
-
kaIpWk: "
|
|
167
|
+
kaIpWk: "xbc78cj",
|
|
142
168
|
$$css: true
|
|
143
169
|
}
|
|
144
170
|
};
|
|
@@ -168,15 +194,20 @@ const dynamicStyles = {
|
|
|
168
194
|
fontSize: size => [_temp, {
|
|
169
195
|
"--x-fontSize": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`${size * INITIALS_FONT_SIZE_RATIO}px`)
|
|
170
196
|
}],
|
|
171
|
-
|
|
197
|
+
statusPositionCircle: size => [_temp2, {
|
|
172
198
|
"--x-bottom": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(size * CIRCLE_EDGE_OFFSET_RATIO),
|
|
173
199
|
"--x-insetInlineEnd": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(size * CIRCLE_EDGE_OFFSET_RATIO)
|
|
174
|
-
}]
|
|
200
|
+
}],
|
|
201
|
+
statusPositionCorner: {
|
|
202
|
+
krVfgx: "x1ey2m1c",
|
|
203
|
+
kt4wiu: "xtijo5x",
|
|
204
|
+
k3aq6I: "xv8yid9 x10fxb7p",
|
|
205
|
+
$$css: true
|
|
206
|
+
}
|
|
175
207
|
};
|
|
176
208
|
const BORDER_WIDTH = 2;
|
|
177
209
|
const groupStyles = {
|
|
178
210
|
ring: {
|
|
179
|
-
kaIpWk: "xjspbzw",
|
|
180
211
|
kMzoRj: "xdh2fpr",
|
|
181
212
|
ksu8eU: "x1y0btm7",
|
|
182
213
|
kVAM5u: "x1touxvs",
|
|
@@ -333,6 +364,7 @@ export function Avatar({
|
|
|
333
364
|
fallbackSrc,
|
|
334
365
|
name,
|
|
335
366
|
size = 'md',
|
|
367
|
+
shape = 'circle',
|
|
336
368
|
src,
|
|
337
369
|
status,
|
|
338
370
|
tooltip = true,
|
|
@@ -384,6 +416,7 @@ export function Avatar({
|
|
|
384
416
|
} : undefined;
|
|
385
417
|
const avatarGroup = useAvatarGroup();
|
|
386
418
|
const resolvedSize = avatarGroup?.size ?? size;
|
|
419
|
+
const resolvedShape = avatarGroup?.shape ?? shape;
|
|
387
420
|
const numericSize = useMemo(() => resolveSize(resolvedSize), [resolvedSize]);
|
|
388
421
|
|
|
389
422
|
// Resolve the tooltip content:
|
|
@@ -487,7 +520,7 @@ export function Avatar({
|
|
|
487
520
|
const visualContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
488
521
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
489
522
|
...{
|
|
490
|
-
className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d
|
|
523
|
+
className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xb3r6kr x87ps6o xbc78cj"
|
|
491
524
|
},
|
|
492
525
|
children: [showImage && /*#__PURE__*/_jsx("img", {
|
|
493
526
|
src: src,
|
|
@@ -519,7 +552,7 @@ export function Avatar({
|
|
|
519
552
|
})
|
|
520
553
|
})]
|
|
521
554
|
}), status && /*#__PURE__*/_jsx("div", {
|
|
522
|
-
...stylex.props(styles.status, dynamicStyles.
|
|
555
|
+
...stylex.props(styles.status, resolvedShape === 'circle' ? dynamicStyles.statusPositionCircle(numericSize) : dynamicStyles.statusPositionCorner),
|
|
523
556
|
children: status
|
|
524
557
|
})]
|
|
525
558
|
});
|
|
@@ -529,8 +562,9 @@ export function Avatar({
|
|
|
529
562
|
// tooltip tab-stop focus ring all live here so the interactive
|
|
530
563
|
// `<a>`/`<button>` and the static `<div>` carry the exact same box.
|
|
531
564
|
const rootStylexProps = mergeProps(themeProps('avatar', {
|
|
532
|
-
size: resolvedSize
|
|
533
|
-
|
|
565
|
+
size: resolvedSize,
|
|
566
|
+
shape: resolvedShape
|
|
567
|
+
}), focusOutlineProps.focusVisible(styles.wrapper, dynamicStyles.size(numericSize), isInteractive && styles.interactive, avatarGroup && groupStyles.ring, avatarGroup && groupStyles.overlap, avatarGroup && groupDynamicStyles.overlap(-avatarGroup.overlap), shapeStyles[resolvedShape], xstyle), className, style);
|
|
534
568
|
let rootElement;
|
|
535
569
|
|
|
536
570
|
// `props` is typed for the default `<div>` root (its event handlers are
|
package/dist/Avatar/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file index.ts
|
|
3
3
|
* @input Imports Avatar component and types from Avatar.tsx, AvatarStatusDot from AvatarStatusDot.tsx
|
|
4
|
-
* @output Exports Avatar, AvatarProps, AvatarSize, AvatarStatusDot, AvatarStatusDotProps, AvatarStatusDotVariant
|
|
4
|
+
* @output Exports Avatar, AvatarProps, AvatarSize, AvatarShape, resolveSize, AvatarStatusDot, AvatarStatusDotProps, AvatarStatusDotVariant
|
|
5
5
|
* @position Component entry point; re-exported by /packages/core/src/index.ts
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update this header and /packages/core/src/Avatar/Avatar.doc.mjs
|
|
@@ -32,7 +32,7 @@ export interface AvatarStatusDotVariantMap {
|
|
|
32
32
|
error: true;
|
|
33
33
|
}
|
|
34
34
|
export { Avatar, resolveSize } from './Avatar';
|
|
35
|
-
export type { AvatarProps, AvatarSize } from './Avatar';
|
|
35
|
+
export type { AvatarProps, AvatarSize, AvatarShape } from './Avatar';
|
|
36
36
|
export { AvatarStatusDot } from './AvatarStatusDot';
|
|
37
37
|
export type { AvatarStatusDotProps, AvatarStatusDotVariant, } from './AvatarStatusDot';
|
|
38
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;CACb;AAED,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Avatar/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,IAAI,CAAC;IACd,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;CACb;AAED,OAAO,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAC,MAAM,UAAU,CAAC;AACnE,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC"}
|
package/dist/Avatar/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file index.ts
|
|
7
7
|
* @input Imports Avatar component and types from Avatar.tsx, AvatarStatusDot from AvatarStatusDot.tsx
|
|
8
|
-
* @output Exports Avatar, AvatarProps, AvatarSize, AvatarStatusDot, AvatarStatusDotProps, AvatarStatusDotVariant
|
|
8
|
+
* @output Exports Avatar, AvatarProps, AvatarSize, AvatarShape, resolveSize, AvatarStatusDot, AvatarStatusDotProps, AvatarStatusDotVariant
|
|
9
9
|
* @position Component entry point; re-exported by /packages/core/src/index.ts
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update this header and /packages/core/src/Avatar/Avatar.doc.mjs
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
import { type ReactNode } from 'react';
|
|
24
24
|
import type { BaseProps } from '../BaseProps';
|
|
25
|
-
import { type AvatarSize } from '../Avatar';
|
|
25
|
+
import { type AvatarShape, type AvatarSize } from '../Avatar';
|
|
26
26
|
export interface AvatarGroupProps extends BaseProps<HTMLDivElement> {
|
|
27
27
|
/** Ref forwarded to the root element. */
|
|
28
28
|
ref?: React.Ref<HTMLDivElement>;
|
|
@@ -38,6 +38,13 @@ export interface AvatarGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
38
38
|
* @default 'md'
|
|
39
39
|
*/
|
|
40
40
|
size?: AvatarSize;
|
|
41
|
+
/**
|
|
42
|
+
* Shape applied to all avatars via context, overriding each avatar's own
|
|
43
|
+
* `shape` prop so a group stays visually uniform. Also applied to the
|
|
44
|
+
* `AvatarGroupOverflow` "+N" indicator, so it matches the group.
|
|
45
|
+
* @default 'circle'
|
|
46
|
+
*/
|
|
47
|
+
shape?: AvatarShape;
|
|
41
48
|
/**
|
|
42
49
|
* Test ID for integration testing.
|
|
43
50
|
*/
|
|
@@ -61,7 +68,7 @@ export interface AvatarGroupProps extends BaseProps<HTMLDivElement> {
|
|
|
61
68
|
* </AvatarGroup>
|
|
62
69
|
* ```
|
|
63
70
|
*/
|
|
64
|
-
export declare function AvatarGroup({ children, size, 'data-testid': testId, 'aria-label': ariaLabelFromProps, 'aria-describedby': ariaDescribedByFromProps, onKeyDown, onFocus, xstyle, className, style, ref, ...props }: AvatarGroupProps): ReactNode;
|
|
71
|
+
export declare function AvatarGroup({ children, size, shape, 'data-testid': testId, 'aria-label': ariaLabelFromProps, 'aria-describedby': ariaDescribedByFromProps, onKeyDown, onFocus, xstyle, className, style, ref, ...props }: AvatarGroupProps): ReactNode;
|
|
65
72
|
export declare namespace AvatarGroup {
|
|
66
73
|
var displayName: string;
|
|
67
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAA2B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,KAAK,UAAU,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAA2B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC/D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAc,KAAK,WAAW,EAAE,KAAK,UAAU,EAAC,MAAM,WAAW,CAAC;AAczE,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,cAAc,CAAC;IACjE,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,IAAW,EACX,KAAgB,EAChB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,kBAAkB,EAChC,kBAAkB,EAAE,wBAAwB,EAC5C,SAAS,EACT,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,gBAAgB,GAAG,SAAS,CAmE9B;yBAjFe,WAAW"}
|
|
@@ -66,6 +66,7 @@ const styles = {
|
|
|
66
66
|
export function AvatarGroup({
|
|
67
67
|
children,
|
|
68
68
|
size = 'md',
|
|
69
|
+
shape = 'circle',
|
|
69
70
|
'data-testid': testId,
|
|
70
71
|
'aria-label': ariaLabelFromProps,
|
|
71
72
|
'aria-describedby': ariaDescribedByFromProps,
|
|
@@ -83,9 +84,10 @@ export function AvatarGroup({
|
|
|
83
84
|
const overlap = Math.round(numericSize * OVERLAP_RATIO);
|
|
84
85
|
const contextValue = useMemo(() => ({
|
|
85
86
|
size,
|
|
87
|
+
shape,
|
|
86
88
|
overlap,
|
|
87
89
|
numericSize
|
|
88
|
-
}), [size, overlap, numericSize]);
|
|
90
|
+
}), [size, shape, overlap, numericSize]);
|
|
89
91
|
|
|
90
92
|
// The keyboard hint and roving tab stop only make sense once the group has
|
|
91
93
|
// interactive children. Detect their presence from the rendered DOM after
|
|
@@ -127,7 +129,8 @@ export function AvatarGroup({
|
|
|
127
129
|
onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown),
|
|
128
130
|
onFocus: composeEventHandlers(onFocus, handleFocus),
|
|
129
131
|
...mergeProps(themeProps('avatar-group', {
|
|
130
|
-
size
|
|
132
|
+
size,
|
|
133
|
+
shape
|
|
131
134
|
}), stylex.props(styles.root, xstyle), className, style),
|
|
132
135
|
children: [children, hasInteractiveItems && /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
133
136
|
id: hintId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroupContext.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupContext.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"AvatarGroupContext.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupContext.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAC,WAAW,EAAE,UAAU,EAAC,MAAM,WAAW,CAAC;AAEvD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,yDAE9B,CAAC;AAGF,wBAAgB,cAAc,IAAI,uBAAuB,GAAG,IAAI,CAE/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAa5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"AvatarGroupOverflow.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupOverflow.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAAC,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAa5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAQ5C,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CACpD,SAAS,CAAC,WAAW,CAAC,EACtB,SAAS,CACV;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAwFD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,KAAK,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,GAAG,SAAS,CAkEtC;yBA3Ee,mBAAmB"}
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
import React from 'react';
|
|
16
16
|
import * as stylex from '@stylexjs/stylex';
|
|
17
17
|
import "../theme/tokens.stylex.js";
|
|
18
|
-
import { colorVars, typographyVars, typeScaleVars, fontWeightVars,
|
|
18
|
+
import { colorVars, typographyVars, typeScaleVars, fontWeightVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
19
|
+
import { shapeStyles } from "../Avatar/Avatar.js";
|
|
19
20
|
import { mergeProps } from "../utils/index.js";
|
|
20
21
|
import { resolveSize } from "../Avatar/index.js";
|
|
21
22
|
import { useAvatarGroup } from "./AvatarGroupContext.js";
|
|
@@ -31,7 +32,7 @@ const styles = {
|
|
|
31
32
|
k1xSpc: "x3nfvp2",
|
|
32
33
|
kGNEyG: "x6s0dn4",
|
|
33
34
|
kjj79g: "xl56j7k",
|
|
34
|
-
kaIpWk: "
|
|
35
|
+
kaIpWk: "xbc78cj",
|
|
35
36
|
kWkggS: "x10xzikg",
|
|
36
37
|
kMwMTN: "xv1l7n4",
|
|
37
38
|
kMv6JI: "x9ynric",
|
|
@@ -109,6 +110,7 @@ export function AvatarGroupOverflow({
|
|
|
109
110
|
const t = useTranslator();
|
|
110
111
|
const group = useAvatarGroup();
|
|
111
112
|
const size = group?.size ?? 'md';
|
|
113
|
+
const shape = group?.shape ?? 'circle';
|
|
112
114
|
const numericSize = group?.numericSize ?? resolveSize('md');
|
|
113
115
|
const overlap = group?.overlap ?? 0;
|
|
114
116
|
|
|
@@ -129,8 +131,9 @@ export function AvatarGroupOverflow({
|
|
|
129
131
|
"aria-label": label,
|
|
130
132
|
"data-avatar-item": "",
|
|
131
133
|
...mergeProps(themeProps('avatar-group-overflow', {
|
|
132
|
-
size
|
|
133
|
-
|
|
134
|
+
size,
|
|
135
|
+
shape
|
|
136
|
+
}), focusOutlineProps.focusVisible(styles.base, styles.button, styles.overlap, dynamicStyles.size(numericSize), dynamicStyles.fontSize(numericSize), dynamicStyles.overlap(-overlap), shapeStyles[shape], xstyle), className, style),
|
|
134
137
|
children: content
|
|
135
138
|
});
|
|
136
139
|
}
|
|
@@ -139,8 +142,9 @@ export function AvatarGroupOverflow({
|
|
|
139
142
|
...rest,
|
|
140
143
|
"aria-label": label,
|
|
141
144
|
...mergeProps(themeProps('avatar-group-overflow', {
|
|
142
|
-
size
|
|
143
|
-
|
|
145
|
+
size,
|
|
146
|
+
shape
|
|
147
|
+
}), stylex.props(styles.base, styles.overlap, dynamicStyles.size(numericSize), dynamicStyles.fontSize(numericSize), dynamicStyles.overlap(-overlap), shapeStyles[shape], xstyle), className, style),
|
|
144
148
|
children: content
|
|
145
149
|
});
|
|
146
150
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAwB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAwB3C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAIrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AA0G9C,QAAA,MAAM,UAAU;;;;;;;;;;EAUd,CAAC;AAkFH;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;GAEG;AACH,MAAM,MAA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ClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,EAAE,CAAC,EAAE,iBAAiB,CAAC;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAuJD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAqB,EACrB,IAAI,EAAE,QAAQ,EACd,IAAe,EACf,UAAkB,EAClB,SAAiB,EACjB,eAAuB,EACvB,WAAW,EACX,IAAI,EACJ,UAAkB,EAClB,KAAK,EACL,SAAkB,EAClB,QAAQ,EACR,UAAU,EACV,OAAO,EACP,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,GAAG,SAAS,CAmPzB;yBA5Qe,MAAM"}
|
package/dist/Button/Button.js
CHANGED
|
@@ -445,9 +445,13 @@ export function Button({
|
|
|
445
445
|
// for every variant, and `destructive` re-colors just the ring to match
|
|
446
446
|
// its own surface. Ordering is the mechanism — StyleX is last-wins.
|
|
447
447
|
variants[variant], xstyle);
|
|
448
|
-
const sharedMergedProps = mergeProps(
|
|
448
|
+
const sharedMergedProps = mergeProps(
|
|
449
|
+
// Inside a group the group owns the surface's elevation, so the button
|
|
450
|
+
// reflects the tier it actually paints rather than the prop it was handed.
|
|
451
|
+
themeProps('button', {
|
|
449
452
|
variant,
|
|
450
|
-
size
|
|
453
|
+
size,
|
|
454
|
+
elevation: buttonGroup ? 'none' : elevation
|
|
451
455
|
}), sharedStylexProps, className, style);
|
|
452
456
|
const buttonContent = /*#__PURE__*/_jsxs(_Fragment, {
|
|
453
457
|
children: [isLoadingState && /*#__PURE__*/_jsx("span", {
|
|
@@ -261,7 +261,7 @@ export function Calendar({
|
|
|
261
261
|
if (plainDateIsEqual(date, startPd)) {
|
|
262
262
|
setRangeSelectionStart(null);
|
|
263
263
|
announce(t('@astryx.calendar.rangeClearedAnnounce', {
|
|
264
|
-
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY)
|
|
264
|
+
date: plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY, locale)
|
|
265
265
|
}));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
@@ -33,19 +33,9 @@ export declare const calendarStyles: Readonly<{
|
|
|
33
33
|
}>;
|
|
34
34
|
readonly monthsContainer: Readonly<{
|
|
35
35
|
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
36
|
+
readonly flexWrap: stylex.StyleXClassNameFor<"flexWrap", "wrap">;
|
|
36
37
|
readonly gap: stylex.StyleXClassNameFor<"gap", "16px">;
|
|
37
38
|
}>;
|
|
38
|
-
readonly srOnly: Readonly<{
|
|
39
|
-
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
40
|
-
readonly width: stylex.StyleXClassNameFor<"width", "1px">;
|
|
41
|
-
readonly height: stylex.StyleXClassNameFor<"height", "1px">;
|
|
42
|
-
readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
|
|
43
|
-
readonly margin: stylex.StyleXClassNameFor<"margin", "-1px">;
|
|
44
|
-
readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
|
|
45
|
-
readonly clip: stylex.StyleXClassNameFor<"clip", "rect(0, 0, 0, 0)">;
|
|
46
|
-
readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
47
|
-
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
48
|
-
}>;
|
|
49
39
|
readonly navIcon: Readonly<{
|
|
50
40
|
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
51
41
|
}>;
|
|
@@ -154,7 +144,7 @@ export declare const dayCellStyles: Readonly<{
|
|
|
154
144
|
readonly display: stylex.StyleXClassNameFor<"display", "flex">;
|
|
155
145
|
readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
|
|
156
146
|
readonly justifyContent: stylex.StyleXClassNameFor<"justifyContent", "center">;
|
|
157
|
-
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "
|
|
147
|
+
readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", "9999px">;
|
|
158
148
|
readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
|
|
159
149
|
readonly borderStyle: stylex.StyleXClassNameFor<"borderStyle", "none">;
|
|
160
150
|
readonly cursor: stylex.StyleXClassNameFor<"cursor", "default" | "pointer">;
|
|
@@ -209,8 +199,9 @@ export declare const dayCellTheme: Readonly<{
|
|
|
209
199
|
readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", `inset 0 0 0 1px ${stylex.StyleXVar<"light-dark(#0A1317, #DFE2E5)">}`>;
|
|
210
200
|
}>;
|
|
211
201
|
readonly daySelected: Readonly<{
|
|
212
|
-
readonly
|
|
213
|
-
readonly
|
|
202
|
+
readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
|
|
203
|
+
readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "light-dark(#0064E0, #2694FE)" | "Highlight">;
|
|
204
|
+
readonly color: stylex.StyleXClassNameFor<"color", "light-dark(#FFFFFF, #FFFFFF)" | "HighlightText">;
|
|
214
205
|
readonly backgroundImage: stylex.StyleXClassNameFor<"backgroundImage", {
|
|
215
206
|
readonly '@media (hover: hover)': `linear-gradient(${stylex.StyleXVar<"light-dark(#0536590C, #FFFFFF0C)">}, ${stylex.StyleXVar<"light-dark(#0536590C, #FFFFFF0C)">})`;
|
|
216
207
|
} | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Calendar/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAgB3C,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Calendar/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAgB3C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCzB,CAAC;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC1B,CAAC;AAiBH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+GxB,CAAC;AAMH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0EvB,CAAC"}
|