@astryxdesign/core 0.6.3-canary.1f30d4e → 0.6.3-canary.1ffe66d
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/Avatar/AvatarSizeContext.js +3 -3
- package/dist/AvatarGroup/AvatarGroupContext.d.ts.map +1 -1
- package/dist/AvatarGroup/AvatarGroupContext.js +4 -3
- package/dist/BottomSheet/BottomSheetPanel.d.ts +1 -1
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +7 -3
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +4 -3
- package/dist/Button/Button.js +5 -5
- package/dist/ButtonGroup/ButtonGroupContext.d.ts.map +1 -1
- package/dist/ButtonGroup/ButtonGroupContext.js +4 -3
- package/dist/Chat/ChatContext.d.ts +1 -1
- package/dist/Chat/ChatContext.d.ts.map +1 -1
- package/dist/Chat/ChatContext.js +4 -3
- package/dist/CheckboxInput/CheckboxInput.js +1 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListContext.js +3 -3
- package/dist/Collapsible/CollapsibleGroupContext.d.ts.map +1 -1
- package/dist/Collapsible/CollapsibleGroupContext.js +3 -2
- package/dist/Dialog/Dialog.d.ts +1 -1
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +11 -5
- package/dist/DropdownMenu/DropdownMenuContext.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuContext.js +3 -1
- package/dist/FormLayout/FormLayoutContext.js +3 -3
- package/dist/Icon/IconDefaultSizeContext.d.ts.map +1 -1
- package/dist/Icon/IconDefaultSizeContext.js +4 -3
- package/dist/Indicator/CheckboxIndicator.d.ts +5 -5
- package/dist/Indicator/CheckboxIndicator.js +5 -5
- package/dist/Indicator/types.d.ts +6 -4
- package/dist/Indicator/types.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupContext.d.ts.map +1 -1
- package/dist/InputGroup/InputGroupContext.js +4 -3
- package/dist/InputGroup/groupStyles.d.ts +1 -1
- package/dist/InputGroup/groupStyles.js +6 -6
- package/dist/Layer/LayerDepthContext.d.ts +1 -1
- package/dist/Layer/LayerDepthContext.js +1 -1
- package/dist/Layer/layerScopedContext.d.ts +13 -0
- package/dist/Layer/layerScopedContext.d.ts.map +1 -0
- package/dist/Layer/layerScopedContext.js +32 -0
- package/dist/Layer/layerStack.d.ts.map +1 -1
- package/dist/Layer/layerStack.js +12 -10
- package/dist/Layer/layerTextReset.stylex.d.ts +33 -0
- package/dist/Layer/layerTextReset.stylex.d.ts.map +1 -0
- package/dist/Layer/layerTextReset.stylex.js +39 -0
- package/dist/Layer/useLayer.d.ts +1 -1
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +11 -10
- package/dist/Layer/useLayerDismissal.d.ts +8 -8
- package/dist/Layer/useLayerDismissal.d.ts.map +1 -1
- package/dist/Layer/useLayerDismissal.js +18 -9
- package/dist/Layout/LayoutDividerContext.js +3 -3
- package/dist/Layout/LayoutSlotsContext.js +3 -3
- package/dist/Lightbox/Lightbox.d.ts +1 -1
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +82 -78
- package/dist/List/ListContext.js +3 -3
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +100 -16
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.d.ts +2 -0
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.d.ts.map +1 -0
- package/dist/Markdown/MarkdownTable.a11y.chromium.spec.js +589 -0
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +116 -23
- package/dist/MetadataList/MetadataListContext.js +3 -3
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +35 -31
- package/dist/NavMenu/NavMenuContext.d.ts.map +1 -1
- package/dist/NavMenu/NavMenuContext.js +3 -2
- package/dist/RadioList/RadioList.d.ts +0 -13
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +4 -3
- package/dist/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlContext.js +4 -3
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -1
- package/dist/Selector/SelectorRowLayoutContext.js +4 -3
- package/dist/SizeContext/SizeContext.d.ts.map +1 -1
- package/dist/SizeContext/SizeContext.js +4 -3
- package/dist/Stepper/StepperContext.d.ts +1 -1
- package/dist/Stepper/StepperContext.d.ts.map +1 -1
- package/dist/Stepper/StepperContext.js +5 -4
- package/dist/TabList/TabListContext.d.ts.map +1 -1
- package/dist/TabList/TabListContext.js +4 -3
- package/dist/Table/TableContext.js +3 -3
- package/dist/Toast/ToastViewport.d.ts.map +1 -1
- package/dist/Toast/ToastViewport.js +14 -10
- package/dist/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.ts.map +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.js +4 -3
- package/dist/TopNav/TopNavContext.d.ts.map +1 -1
- package/dist/TopNav/TopNavContext.js +9 -2
- package/dist/astryx.css +11 -3
- package/dist/utils/isRenderable.d.ts +10 -8
- package/dist/utils/isRenderable.d.ts.map +1 -1
- package/dist/utils/isRenderable.js +10 -8
- package/package.json +3 -3
- package/src/Avatar/AvatarSizeContext.ts +2 -2
- package/src/AvatarGroup/AvatarGroupContext.ts +3 -2
- package/src/BottomSheet/BottomSheetPanel.tsx +5 -2
- package/src/Breadcrumbs/Breadcrumbs.tsx +3 -2
- package/src/Button/Button.tsx +1 -1
- package/src/ButtonGroup/ButtonGroupContext.ts +6 -4
- package/src/Chat/ChatContext.tsx +6 -5
- package/src/CheckboxInput/CheckboxInput.doc.mjs +5 -4
- package/src/CheckboxInput/CheckboxInput.spec.md +187 -0
- package/src/CheckboxInput/CheckboxInput.test.tsx +32 -0
- package/src/CheckboxInput/CheckboxInput.tsx +1 -1
- package/src/CheckboxList/CheckboxListContext.tsx +3 -3
- package/src/Collapsible/CollapsibleGroupContext.tsx +3 -2
- package/src/Dialog/Dialog.doc.mjs +4 -2
- package/src/Dialog/Dialog.tsx +11 -3
- package/src/DropdownMenu/DropdownMenuContext.tsx +3 -1
- package/src/FormLayout/FormLayoutContext.ts +2 -2
- package/src/Icon/IconDefaultSizeContext.ts +3 -2
- package/src/Indicator/CheckboxIndicator.spec.md +161 -0
- package/src/Indicator/CheckboxIndicator.tsx +5 -5
- package/src/Indicator/Indicator.doc.mjs +5 -5
- package/src/Indicator/types.ts +6 -4
- package/src/InputGroup/InputGroupContext.ts +3 -2
- package/src/InputGroup/groupStyles.ts +4 -4
- package/src/Layer/Layer.doc.mjs +2 -2
- package/src/Layer/LayerDepthContext.tsx +1 -1
- package/src/Layer/layerScopedContext.test.tsx +499 -0
- package/src/Layer/layerScopedContext.tsx +37 -0
- package/src/Layer/layerStack.ts +12 -10
- package/src/Layer/layerTextReset.stylex.ts +37 -0
- package/src/Layer/useLayer.doc.mjs +3 -3
- package/src/Layer/useLayer.tsx +7 -10
- package/src/Layer/useLayerDismissal.test.tsx +28 -0
- package/src/Layer/useLayerDismissal.ts +18 -9
- package/src/Layout/LayoutDividerContext.ts +2 -2
- package/src/Layout/LayoutSlotsContext.ts +2 -2
- package/src/Lightbox/Lightbox.tsx +124 -100
- package/src/List/ListContext.tsx +2 -2
- package/src/Markdown/Markdown.doc.mjs +1 -1
- package/src/Markdown/Markdown.spec.md +7 -1
- package/src/Markdown/Markdown.test.tsx +120 -8
- package/src/Markdown/Markdown.tsx +108 -15
- package/src/Markdown/MarkdownTable.a11y.chromium.spec.ts +726 -0
- package/src/Markdown/ast.test.ts +67 -0
- package/src/Markdown/incremental.test.ts +43 -0
- package/src/Markdown/parser.test.ts +171 -0
- package/src/Markdown/parser.ts +196 -36
- package/src/MetadataList/MetadataListContext.tsx +2 -2
- package/src/MobileNav/MobileNav.tsx +36 -31
- package/src/NavMenu/NavMenuContext.tsx +3 -2
- package/src/RadioList/RadioList.tsx +2 -2
- package/src/SegmentedControl/SegmentedControlContext.ts +3 -2
- package/src/Selector/SelectorRowLayoutContext.ts +3 -2
- package/src/Selector/__tests__/Listbox.a11y.inventory.test.ts +2 -2
- package/src/Selector/__tests__/Listbox.a11y.known-failures.ts +1 -13
- package/src/SizeContext/SizeContext.ts +3 -2
- package/src/Stepper/StepperContext.ts +3 -2
- package/src/TabList/TabListContext.ts +3 -2
- package/src/Table/TableContext.ts +2 -2
- package/src/Toast/ToastViewport.tsx +22 -13
- package/src/ToggleButton/ToggleButtonGroup.tsx +3 -2
- package/src/TopNav/TopNavContext.ts +9 -3
- package/src/utils/isRenderable.ts +10 -8
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file AvatarSizeContext.ts
|
|
7
|
-
* @input
|
|
7
|
+
* @input Layer-scoped React context
|
|
8
8
|
* @output Exports AvatarSizeContext
|
|
9
9
|
* @position Internal context; provided by Avatar, consumed by sub-components
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update:
|
|
12
12
|
* - /packages/core/src/Avatar/Avatar.doc.mjs
|
|
13
13
|
*/
|
|
14
|
-
import { createContext } from
|
|
14
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Context that provides the resolved numeric avatar size (in pixels)
|
|
@@ -19,5 +19,5 @@ import { createContext } from 'react';
|
|
|
19
19
|
*
|
|
20
20
|
* Default value of 36 matches the default 'md' avatar size.
|
|
21
21
|
*/
|
|
22
|
-
export const AvatarSizeContext =
|
|
22
|
+
export const AvatarSizeContext = createContext(36);
|
|
23
23
|
AvatarSizeContext.displayName = 'AvatarSizeContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroupContext.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AvatarGroupContext.d.ts","sourceRoot":"","sources":["../../src/AvatarGroup/AvatarGroupContext.ts"],"names":[],"mappings":"AAYA,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"}
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @file AvatarGroupContext.ts
|
|
6
|
-
* @input
|
|
6
|
+
* @input Layer-scoped React context
|
|
7
7
|
* @output Exports AvatarGroup context and useAvatarGroup hook
|
|
8
8
|
* @position Shared context; consumed by children for group-aware styling
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
11
|
-
|
|
10
|
+
import { use } from 'react';
|
|
11
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
12
|
+
export const AvatarGroupContext = createContext(null);
|
|
12
13
|
AvatarGroupContext.displayName = 'AvatarGroupContext';
|
|
13
14
|
export function useAvatarGroup() {
|
|
14
15
|
return use(AvatarGroupContext);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file BottomSheetPanel.tsx
|
|
3
|
-
* @input Uses React, StyleX, theme tokens, sheet gestures, shared scroll behavior, and the host label
|
|
3
|
+
* @input Uses React, StyleX, theme tokens, text/provider boundaries, sheet gestures, shared scroll behavior, and the host label
|
|
4
4
|
* @output Internal BottomSheetPanel with a keyboard-reachable scrolling body and motion-state types
|
|
5
5
|
* @position Shared presentation layer for standalone and switcher BottomSheets
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheetPanel.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheetPanel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"BottomSheetPanel.d.ts","sourceRoot":"","sources":["../../src/BottomSheet/BottomSheetPanel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAmB5C,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,eAAe,CAAC;AAIvB,QAAA,MAAM,cAAc;;;;CAIV,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,cAAc,CAAC;AAC5D,YAAY,EAAC,oBAAoB,EAAC,CAAC;AAsMnC,MAAM,MAAM,sBAAsB,GAChC,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,qBAAqB,GAC7B;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAC,GAChB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAC,GACjC;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC1C,eAAe,EAAE,MAAM,CAAC;CACzB,GACD;IAAC,IAAI,EAAE,SAAS,CAAA;CAAC,CAAC;AAEtB,UAAU,qB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@input Uses React, StyleX, theme tokens, text/provider boundaries, sheet gestures, shared scroll behavior, and the host label
|
|
8
8
|
* @output Internal BottomSheetPanel with a keyboard-reachable scrolling body and motion-state types
|
|
9
9
|
* @position Shared presentation layer for standalone and switcher BottomSheets
|
|
10
10
|
*
|
|
@@ -28,6 +28,8 @@ import "../theme/tokens.stylex.js";
|
|
|
28
28
|
import { borderVars, colorVars, durationVars, easeVars, focusVars, radiusVars, shadowVars, sizeVars, spacingVars } from "../theme/tokens.stylex.js";
|
|
29
29
|
import { mergeProps, themeProps } from "../utils/index.js";
|
|
30
30
|
import { focusOutlineStyles } from "../utils/focusOutline.stylex.js";
|
|
31
|
+
import { layerTextReset } from "../Layer/layerTextReset.stylex.js";
|
|
32
|
+
import { LayerContentBoundary } from "../Layer/layerScopedContext.js";
|
|
31
33
|
import { overlayPaddingReset } from "../Layout/padding.stylex.js";
|
|
32
34
|
import { isValidSnapPoint, resolveSnapPoints } from "./snapOffsets.js";
|
|
33
35
|
import { useMobileKeyboard } from "./useMobileKeyboard.js";
|
|
@@ -453,7 +455,7 @@ export function BottomSheetPanel({
|
|
|
453
455
|
...props,
|
|
454
456
|
ref: setElement,
|
|
455
457
|
tabIndex: tabIndex ?? -1,
|
|
456
|
-
...mergeProps(themeProps('bottom-sheet'), stylex.props(styles.sheet, overlayPaddingReset.reset, height === 'hug' ? styles.hugHeight : styles.budget, isClosing && styles.sheetClosing, isFading && styles.sheetFading, isInactive && styles.sheetInactive, xstyle), className, {
|
|
458
|
+
...mergeProps(themeProps('bottom-sheet'), stylex.props(layerTextReset.reset, styles.sheet, overlayPaddingReset.reset, height === 'hug' ? styles.hugHeight : styles.budget, isClosing && styles.sheetClosing, isFading && styles.sheetFading, isInactive && styles.sheetInactive, xstyle), className, {
|
|
457
459
|
['--_sheet-budget']: budget,
|
|
458
460
|
...(isInteractive ? gestureStyle : isRetained ? {
|
|
459
461
|
transform: retainedTransform,
|
|
@@ -487,7 +489,9 @@ export function BottomSheetPanel({
|
|
|
487
489
|
...getContentProps({
|
|
488
490
|
className: "xufnvkl x9f619 x5yr21d x121v3j4"
|
|
489
491
|
}),
|
|
490
|
-
children:
|
|
492
|
+
children: /*#__PURE__*/_jsx(LayerContentBoundary, {
|
|
493
|
+
children: children
|
|
494
|
+
})
|
|
491
495
|
})
|
|
492
496
|
})]
|
|
493
497
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Breadcrumbs.tsx
|
|
3
|
-
* @input Uses React,
|
|
3
|
+
* @input Uses React, layer-scoped context, stylex, theme tokens
|
|
4
4
|
* @output Exports Breadcrumbs component, BreadcrumbsProps, BreadcrumbContext
|
|
5
5
|
* @position Core container component; consumed by index.ts
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAU,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAK9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EAAC,qBAAqB,EAAC,MAAM,SAAS,CAAC;AAMnD;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,qBAAqB,CAAC;AAM7D,8FAA8F;AAC9F,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB,iDAG5B,CAAC;AAOH,MAAM,WAAW,gBAAiB,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA4BD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAe,EACf,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,EAAE,cAAc,EACrB,GAAG,EACH,GAAG,IAAI,EACR,EAAE,gBAAgB,+BAwBlB;yBAlCe,WAAW"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Breadcrumbs.tsx
|
|
7
|
-
* @input Uses React,
|
|
7
|
+
* @input Uses React, layer-scoped context, stylex, theme tokens
|
|
8
8
|
* @output Exports Breadcrumbs component, BreadcrumbsProps, BreadcrumbContext
|
|
9
9
|
* @position Core container component; consumed by index.ts
|
|
10
10
|
*
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
* - /apps/storybook/stories/Breadcrumbs.stories.tsx
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/Breadcrumbs/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
18
|
+
import { useMemo } from 'react';
|
|
19
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
19
20
|
import * as stylex from '@stylexjs/stylex';
|
|
20
21
|
import "../theme/tokens.stylex.js";
|
|
21
22
|
import { spacingVars } from "../theme/tokens.stylex.js";
|
|
@@ -41,7 +42,7 @@ import { useTranslator } from "../i18n/index.js";
|
|
|
41
42
|
|
|
42
43
|
/** @internal Context for passing variant and separator from Breadcrumbs to BreadcrumbItem. */
|
|
43
44
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
44
|
-
export const BreadcrumbContext =
|
|
45
|
+
export const BreadcrumbContext = createContext({
|
|
45
46
|
variant: 'default',
|
|
46
47
|
separator: '/'
|
|
47
48
|
});
|
package/dist/Button/Button.js
CHANGED
|
@@ -254,13 +254,13 @@ const loadingStyles = {
|
|
|
254
254
|
* The leading edge still uses `:first-child` — a member's button always precedes
|
|
255
255
|
* its own layer, so the first button is genuinely `:first-child`.
|
|
256
256
|
*/
|
|
257
|
-
const IS_LAST_ITEM = ':not(:has(~ *:not([popover]):not(template)))';
|
|
257
|
+
const IS_LAST_ITEM = ':not(:has(~ *:not([popover]):not(template):not(dialog)))';
|
|
258
258
|
const groupStyles = {
|
|
259
259
|
horizontal: {
|
|
260
260
|
krdFHd: "x15mokao x8eehn2",
|
|
261
261
|
kVL7Gh: "xbiv7yw x1xrp5p4",
|
|
262
|
-
kfmiAY: "x1ga7v0g
|
|
263
|
-
kT0f0o: "x16uus16
|
|
262
|
+
kfmiAY: "x1ga7v0g x149bkfe",
|
|
263
|
+
kT0f0o: "x16uus16 x1ursds5",
|
|
264
264
|
k2ei4v: "xgbv0en x1pjv70x",
|
|
265
265
|
kVhnKS: "x1t7ytsu xyf0ibl",
|
|
266
266
|
kGJrpR: "x1j92z86",
|
|
@@ -269,8 +269,8 @@ const groupStyles = {
|
|
|
269
269
|
vertical: {
|
|
270
270
|
krdFHd: "x15mokao x8eehn2",
|
|
271
271
|
kfmiAY: "x1ga7v0g x2qxyot",
|
|
272
|
-
kVL7Gh: "xbiv7yw
|
|
273
|
-
kT0f0o: "x16uus16
|
|
272
|
+
kVL7Gh: "xbiv7yw xy2bsav",
|
|
273
|
+
kT0f0o: "x16uus16 x1ursds5",
|
|
274
274
|
kEafiO: "x11xkdxz x1g31smg",
|
|
275
275
|
kPef9Z: "x13fuv20 x1d9v4yf",
|
|
276
276
|
kLZC3w: "x1pc3f07",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroupContext.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroupContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonGroupContext.d.ts","sourceRoot":"","sources":["../../src/ButtonGroup/ButtonGroupContext.ts"],"names":[],"mappings":"AAcA,MAAM,MAAM,sBAAsB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,sBAAsB,CAAC;IACpC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,kBAAkB,yDAE9B,CAAC;AAGF;;;GAGG;AACH,wBAAgB,cAAc,IAAI,uBAAuB,GAAG,IAAI,CAE/D"}
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file ButtonGroupContext.ts
|
|
7
|
-
* @input
|
|
7
|
+
* @input Layer-scoped React context
|
|
8
8
|
* @output Exports ButtonGroup context and useButtonGroup hook
|
|
9
9
|
* @position Shared context; consumed by Button for group-aware styling
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { use } from 'react';
|
|
12
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
13
|
+
export const ButtonGroupContext = createContext(null);
|
|
13
14
|
ButtonGroupContext.displayName = 'ButtonGroupContext';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file ChatContext.tsx
|
|
3
|
-
* @input
|
|
3
|
+
* @input Layer-scoped React context
|
|
4
4
|
* @output Exports Chat message/list/composer/layout contexts. The composer
|
|
5
5
|
* context (value + input-control registration) is public composition API,
|
|
6
6
|
* re-exported from Chat/index.ts for custom inputs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatContext.tsx"],"names":[],"mappings":"AAIA;;;;;;;;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AAC,CAAC;CAC9D;AAED,eAAO,MAAM,mBAAmB,0DACsB,CAAC;AAGvD,wBAAgB,sBAAsB,IAAI,wBAAwB,GAAG,IAAI,CAExE;AAMD,MAAM,WAAW,sBAAsB;IACrC,2EAA2E;IAC3E,kBAAkB,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACxD,+FAA+F;IAC/F,UAAU,EAAE,CAAC,EAAE,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAGF,wBAAgB,oBAAoB,IAAI,sBAAsB,GAAG,IAAI,CAEpE"}
|
package/dist/Chat/ChatContext.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file ChatContext.tsx
|
|
7
|
-
* @input
|
|
7
|
+
* @input Layer-scoped React context
|
|
8
8
|
* @output Exports Chat message/list/composer/layout contexts. The composer
|
|
9
9
|
* context (value + input-control registration) is public composition API,
|
|
10
10
|
* re-exported from Chat/index.ts for custom inputs.
|
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
* ChatComposerInput, ChatSendButton, and custom inputs.
|
|
13
13
|
*/
|
|
14
14
|
import { createContext, use } from 'react';
|
|
15
|
-
|
|
15
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
16
|
+
export const ChatMessageContext = createLayerScopedContext(null);
|
|
16
17
|
ChatMessageContext.displayName = 'ChatMessageContext';
|
|
17
18
|
export function useChatMessageContext() {
|
|
18
19
|
return use(ChatMessageContext);
|
|
19
20
|
}
|
|
20
|
-
export const ChatListContext =
|
|
21
|
+
export const ChatListContext = createLayerScopedContext(null);
|
|
21
22
|
ChatListContext.displayName = 'ChatListContext';
|
|
22
23
|
export function useChatListContext() {
|
|
23
24
|
return use(ChatListContext);
|
|
@@ -184,7 +184,7 @@ export function CheckboxInput({
|
|
|
184
184
|
});
|
|
185
185
|
|
|
186
186
|
// The checkbox visual is an indicator: a theme can restyle it through the
|
|
187
|
-
// `checkbox` target or replace the component outright.
|
|
187
|
+
// canonical `checkbox-indicator` target or replace the component outright.
|
|
188
188
|
const CheckboxControl = useIndicator('checkbox');
|
|
189
189
|
// The ring is drawn on the indicator itself: the native input is
|
|
190
190
|
// `opacity: 0`, and only the indicator's own element can shape the outline
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxListContext.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListContext.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"CheckboxListContext.d.ts","sourceRoot":"","sources":["../../src/CheckboxList/CheckboxListContext.tsx"],"names":[],"mappings":"AAaA,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,UAAU,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,mBAAmB,0DACiC,CAAC"}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CheckboxListContext.tsx
|
|
7
|
-
* @input Uses
|
|
7
|
+
* @input Uses the private layer-scoped context factory
|
|
8
8
|
* @output Exports CheckboxListContext for parent-child communication
|
|
9
9
|
* @position Internal context; consumed by CheckboxList.tsx and CheckboxListItem.tsx
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
export const CheckboxListContext =
|
|
11
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
12
|
+
export const CheckboxListContext = createLayerScopedContext(null);
|
|
13
13
|
CheckboxListContext.displayName = 'CheckboxListContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleGroupContext.d.ts","sourceRoot":"","sources":["../../src/Collapsible/CollapsibleGroupContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CollapsibleGroupContext.d.ts","sourceRoot":"","sources":["../../src/Collapsible/CollapsibleGroupContext.tsx"],"names":[],"mappings":"AAqBA;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,gDAAgD;IAChD,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACnC,8CAA8C;IAC9C,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED;;;GAGG;AACH,eAAO,MAAM,uBAAuB,8DACsB,CAAC;AAG3D;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1E;;;;;;GAMG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,KAAK,CAAC;AAEzD;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,4EAA4E;IAC5E,WAAW,EAAE,OAAO,CAAC;IACrB,yEAAyE;IACzE,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACxC;;;;;OAKG;IACH,eAAe,EAAE,0BAA0B,GAAG,IAAI,CAAC;CACpD;AAED;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,mEAC0B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file CollapsibleGroupContext.tsx
|
|
7
|
-
* @input
|
|
7
|
+
* @input Layer-scoped React context
|
|
8
8
|
* @output Exports CollapsibleGroupContext, CollapsibleGroupContextValue,
|
|
9
9
|
* CollapsibleGroupPresentationContext, CollapsibleGroupPresentationValue,
|
|
10
10
|
* CollapsibleGroupDensity, and CollapsibleChevronPosition types
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* - /packages/cli/assets/templates/blocks/components/Collapsible/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
18
|
import { createContext } from 'react';
|
|
19
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Context value provided by CollapsibleGroup to coordinate collapsible children.
|
|
@@ -54,5 +55,5 @@ CollapsibleGroupContext.displayName = 'CollapsibleGroupContext';
|
|
|
54
55
|
* state API is unaffected. Collapsible resets this context around its
|
|
55
56
|
* children so nested collapsibles never inherit row chrome.
|
|
56
57
|
*/
|
|
57
|
-
export const CollapsibleGroupPresentationContext =
|
|
58
|
+
export const CollapsibleGroupPresentationContext = createLayerScopedContext(null);
|
|
58
59
|
CollapsibleGroupPresentationContext.displayName = 'CollapsibleGroupPresentationContext';
|
package/dist/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file Dialog.tsx
|
|
3
|
-
* @input Uses React, DialogHTMLAttributes, ReactNode, container (Layout), DialogContext
|
|
3
|
+
* @input Uses React, DialogHTMLAttributes, ReactNode, container (Layout), DialogContext, layerTextReset
|
|
4
4
|
* @output Exports Dialog component, DialogProps, DialogVariant, DialogPurpose types
|
|
5
5
|
* @position Core implementation; consumed by index.ts, tested by Dialog.test.tsx
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyB5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,SAAS,CAAC;AAuB9C;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,gBAAgB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzD,4EAA4E;AAC5E,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,MAAM,WAAW,cAAe,SAAQ,mBAAmB;IACzD,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,yEAAyE;IACzE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAuBD,2FAA2F;AAC3F,eAAO,MAAM,uCAAuC;;;;;;;;;;;CAW1C,CAAC;AAkJX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ReactNode, container (Layout), DialogContext
|
|
7
|
+
* @input Uses React, DialogHTMLAttributes, ReactNode, container (Layout), DialogContext, layerTextReset
|
|
8
8
|
* @output Exports Dialog component, DialogProps, DialogVariant, DialogPurpose types
|
|
9
9
|
* @position Core implementation; consumed by index.ts, tested by Dialog.test.tsx
|
|
10
10
|
*
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
import { useCallback, useEffect, useId, useMemo, useRef } from 'react';
|
|
26
26
|
import * as stylex from '@stylexjs/stylex';
|
|
27
27
|
import { useScrollLock } from "../hooks/useScrollLock.js";
|
|
28
|
+
import { layerTextReset } from "../Layer/layerTextReset.stylex.js";
|
|
29
|
+
import { LayerContentBoundary } from "../Layer/layerScopedContext.js";
|
|
28
30
|
import { LayerDepthProvider } from "../Layer/LayerDepthContext.js";
|
|
29
31
|
import { useLayerDismissal } from "../Layer/useLayerDismissal.js";
|
|
30
32
|
import "../theme/tokens.stylex.js";
|
|
@@ -483,10 +485,12 @@ export function Dialog({
|
|
|
483
485
|
...safeProps,
|
|
484
486
|
...mergeProps(themeProps('dialog', {
|
|
485
487
|
variant
|
|
486
|
-
}), stylex.props(styles.inlineWrapper, overlayPaddingReset.reset, standardSizing && dynamicStyles.sizing(standardSizing.width, standardSizing.maxWidth, standardSizing.maxHeight), isFullscreen && styles.fullscreen, xstyle), className, style),
|
|
488
|
+
}), stylex.props(layerTextReset.reset, styles.inlineWrapper, overlayPaddingReset.reset, standardSizing && dynamicStyles.sizing(standardSizing.width, standardSizing.maxWidth, standardSizing.maxHeight), isFullscreen && styles.fullscreen, xstyle), className, style),
|
|
487
489
|
"data-testid": props['data-testid'],
|
|
488
490
|
children: /*#__PURE__*/_jsx(LayerDepthProvider, {
|
|
489
|
-
children:
|
|
491
|
+
children: /*#__PURE__*/_jsx(LayerContentBoundary, {
|
|
492
|
+
children: innerContent
|
|
493
|
+
})
|
|
490
494
|
})
|
|
491
495
|
});
|
|
492
496
|
}
|
|
@@ -498,7 +502,7 @@ export function Dialog({
|
|
|
498
502
|
...safeProps,
|
|
499
503
|
...mergeProps(themeProps('dialog', {
|
|
500
504
|
variant
|
|
501
|
-
}), focusOutlineProps.focusVisible(styles.dialog, overlayPaddingReset.reset, isOpen && styles.open, styles.backdrop, standardSizing && dynamicStyles.sizing(standardSizing.width, standardSizing.maxWidth, standardSizing.maxHeight), hasPosition && (() => {
|
|
505
|
+
}), focusOutlineProps.focusVisible(layerTextReset.reset, styles.dialog, overlayPaddingReset.reset, isOpen && styles.open, styles.backdrop, standardSizing && dynamicStyles.sizing(standardSizing.width, standardSizing.maxWidth, standardSizing.maxHeight), hasPosition && (() => {
|
|
502
506
|
const o = resolveDialogPositionOffsets(position);
|
|
503
507
|
return dynamicStyles.position(o.top, o.insetInlineStart, o.insetInlineEnd, o.bottom);
|
|
504
508
|
})(), isFullscreen && styles.fullscreen, isFullscreen && isOpen && styles.fullscreenOpen, xstyle), className, style),
|
|
@@ -513,7 +517,9 @@ export function Dialog({
|
|
|
513
517
|
role: 'alertdialog'
|
|
514
518
|
} : undefined),
|
|
515
519
|
children: /*#__PURE__*/_jsx(LayerDepthProvider, {
|
|
516
|
-
children:
|
|
520
|
+
children: /*#__PURE__*/_jsx(LayerContentBoundary, {
|
|
521
|
+
children: innerContent
|
|
522
|
+
})
|
|
517
523
|
})
|
|
518
524
|
});
|
|
519
525
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenuContext.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DropdownMenuContext.d.ts","sourceRoot":"","sources":["../../src/DropdownMenu/DropdownMenuContext.tsx"],"names":[],"mappings":"AAkBA,uDAAuD;AACvD,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,MAAM,WAAW,wBAAwB;IACvC,uEAAuE;IACvE,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,yCAAyC;IACzC,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED,eAAO,MAAM,mBAAmB,0DACiC,CAAC;AAGlE;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,wBAAwB,GAAG,IAAI,CAExE;AAMD,MAAM,WAAW,kCAAkC;IACjD,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,uEAAuE;IACvE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qEAAqE;IACrE,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,6BAA6B,oEACsB,CAAC;AAGjE;;;GAGG;AACH,wBAAgB,gCAAgC,IAAI,kCAAkC,GAAG,IAAI,CAE5F"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file DropdownMenuContext.tsx
|
|
7
|
+
* @input Layer-scoped React context
|
|
7
8
|
* @output Exports context and hook for compound-component menu coordination
|
|
8
9
|
* @position Internal; used by DropdownMenu and DropdownMenuItem
|
|
9
10
|
*
|
|
@@ -12,10 +13,11 @@
|
|
|
12
13
|
* items don't need to register themselves.
|
|
13
14
|
*/
|
|
14
15
|
import { createContext, use } from 'react';
|
|
16
|
+
import { createLayerScopedContext } from "../Layer/layerScopedContext.js";
|
|
15
17
|
|
|
16
18
|
/** Menu size, derived from the trigger button size. */
|
|
17
19
|
|
|
18
|
-
export const DropdownMenuContext =
|
|
20
|
+
export const DropdownMenuContext = createLayerScopedContext(null);
|
|
19
21
|
DropdownMenuContext.displayName = 'DropdownMenuContext';
|
|
20
22
|
|
|
21
23
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file FormLayoutContext.ts
|
|
7
|
-
* @input
|
|
7
|
+
* @input Layer-scoped React context
|
|
8
8
|
* @output Exports FormLayoutContext, FormLayoutDirection, and FormOptionality types
|
|
9
9
|
* @position Context for form layout direction + default-optionality detection
|
|
10
10
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - /packages/core/src/Field/FieldLabel.tsx (indicator resolution)
|
|
14
14
|
* - /packages/core/src/FormLayout/index.ts (exports if types change)
|
|
15
15
|
*/
|
|
16
|
-
import { createContext } from
|
|
16
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Direction of form field arrangement.
|
|
@@ -40,7 +40,7 @@ import { createContext } from 'react';
|
|
|
40
40
|
* for spatial arrangement, and `defaultOptionality` so a field can suppress the
|
|
41
41
|
* indicator that merely restates the form-wide default.
|
|
42
42
|
*/
|
|
43
|
-
export const FormLayoutContext =
|
|
43
|
+
export const FormLayoutContext = createContext({
|
|
44
44
|
direction: 'vertical'
|
|
45
45
|
});
|
|
46
46
|
FormLayoutContext.displayName = 'FormLayoutContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconDefaultSizeContext.d.ts","sourceRoot":"","sources":["../../src/Icon/IconDefaultSizeContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconDefaultSizeContext.d.ts","sourceRoot":"","sources":["../../src/Icon/IconDefaultSizeContext.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAKhD,eAAO,MAAM,uBAAuB,6DAAkC,CAAC;AAEvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAGhE"}
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file IconDefaultSizeContext.ts
|
|
7
|
-
* @input Uses React context and an optional Icon size prop
|
|
7
|
+
* @input Uses layer-scoped React context and an optional Icon size prop
|
|
8
8
|
* @output Supplies a component-owned default size to descendant Icon instances
|
|
9
9
|
* @position Internal Icon sizing context; consumed by Icon and icon-slot owners
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { use } from 'react';
|
|
12
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
13
|
+
const IconDefaultSizeContext = createContext(null);
|
|
13
14
|
IconDefaultSizeContext.displayName = 'IconDefaultSizeContext';
|
|
14
15
|
export const IconDefaultSizeProvider = IconDefaultSizeContext.Provider;
|
|
15
16
|
export function useIconSize(size) {
|
|
@@ -4,11 +4,11 @@ import type { IndicatorProps } from './types';
|
|
|
4
4
|
* indeterminate bar.
|
|
5
5
|
*
|
|
6
6
|
* Decorative and non-interactive — it renders `aria-hidden` and owns no input,
|
|
7
|
-
* role, or focus behavior. The
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* `defineTheme({indicators: {checkbox: MyCheckbox}})`, or
|
|
11
|
-
* the `checkbox` theme target
|
|
7
|
+
* role, or focus behavior. The owning control keeps focus semantics and paints its
|
|
8
|
+
* standard focus ring onto this indicator element (see CheckboxInput), so a
|
|
9
|
+
* replacement's root radius determines the ring shape. Themes replace it
|
|
10
|
+
* wholesale through `defineTheme({indicators: {checkbox: MyCheckbox}})`, or
|
|
11
|
+
* restyle it through the canonical `checkbox-indicator` theme target.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```
|
|
@@ -113,11 +113,11 @@ const indeterminateSizeStyles = {
|
|
|
113
113
|
* indeterminate bar.
|
|
114
114
|
*
|
|
115
115
|
* Decorative and non-interactive — it renders `aria-hidden` and owns no input,
|
|
116
|
-
* role, or focus behavior. The
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
* `defineTheme({indicators: {checkbox: MyCheckbox}})`, or
|
|
120
|
-
* the `checkbox` theme target
|
|
116
|
+
* role, or focus behavior. The owning control keeps focus semantics and paints its
|
|
117
|
+
* standard focus ring onto this indicator element (see CheckboxInput), so a
|
|
118
|
+
* replacement's root radius determines the ring shape. Themes replace it
|
|
119
|
+
* wholesale through `defineTheme({indicators: {checkbox: MyCheckbox}})`, or
|
|
120
|
+
* restyle it through the canonical `checkbox-indicator` theme target.
|
|
121
121
|
*
|
|
122
122
|
* @example
|
|
123
123
|
* ```
|
|
@@ -91,10 +91,12 @@ export type IndicatorPosition = 'start' | 'end';
|
|
|
91
91
|
* excess-property checking, so a LITERAL `role=` is a compile error while
|
|
92
92
|
* `aria-hidden` and `aria-label` are not — and a spread (`{...props}`, the
|
|
93
93
|
* ordinary host idiom) bypasses the check for every member, `role` included.
|
|
94
|
-
* Measured, not assumed. So the components
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
94
|
+
* Measured, not assumed. So the components emit their own `aria-hidden` AFTER
|
|
95
|
+
* `{...rest}`; that ordering, not the type, prevents a caller from un-hiding the
|
|
96
|
+
* root. A spread can still forward `tabIndex`, so callers must keep focus props
|
|
97
|
+
* on the owning control; the supported typed indicator API rejects them. Nothing
|
|
98
|
+
* else is stripped — a forwarded `aria-label` remains inert inside the hidden
|
|
99
|
+
* subtree.
|
|
98
100
|
*
|
|
99
101
|
* Interaction state is deliberately *not* a prop. Hover and focus reach an
|
|
100
102
|
* indicator through the CSS ancestor marker ({@link indicatorScope}) applied
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/Indicator/types.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAE,SAAS,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IACjC,2EAA2E;IAC3E,eAAe,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,0EAA0E;IAC1E,cAAc,EAAE,WAAW,GAAG,SAAS,GAAG,eAAe,CAAC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../src/InputGroup/InputGroupContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputGroupContext.d.ts","sourceRoot":"","sources":["../../src/InputGroup/InputGroupContext.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,IAAI,CAAC;IAChB,sEAAsE;IACtE,OAAO,EAAE,MAAM,CAAC;IAChB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,wDAE7B,CAAC;AAGF;;;GAGG;AACH,wBAAgB,aAAa,IAAI,sBAAsB,GAAG,IAAI,CAE7D"}
|
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file InputGroupContext.ts
|
|
7
|
-
* @input React
|
|
7
|
+
* @input Layer-scoped React context/use
|
|
8
8
|
* @output Exports InputGroup context and useInputGroup hook
|
|
9
9
|
* @position Shared context; consumed by input components for group-aware styling and ARIA associations
|
|
10
10
|
*/
|
|
11
|
-
import {
|
|
12
|
-
|
|
11
|
+
import { use } from 'react';
|
|
12
|
+
import { createLayerScopedContext as createContext } from "../Layer/layerScopedContext.js";
|
|
13
|
+
export const InputGroupContext = createContext(null);
|
|
13
14
|
InputGroupContext.displayName = 'InputGroupContext';
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file groupStyles.ts
|
|
3
|
-
* @input Uses StyleX, theme tokens
|
|
3
|
+
* @input Uses StyleX, theme tokens, and layer-aware group end-cap selectors
|
|
4
4
|
* @output Exports shared group-aware styles for input components
|
|
5
5
|
* @position Shared styles consumed by InputGroup-compatible controls
|
|
6
6
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file groupStyles.ts
|
|
5
|
-
* @input Uses StyleX, theme tokens
|
|
5
|
+
* @input Uses StyleX, theme tokens, and layer-aware group end-cap selectors
|
|
6
6
|
* @output Exports shared group-aware styles for input components
|
|
7
7
|
* @position Shared styles consumed by InputGroup-compatible controls
|
|
8
8
|
*/
|
|
@@ -12,9 +12,9 @@ import "../theme/tokens.stylex.js";
|
|
|
12
12
|
import { radiusVars, borderVars } from "../theme/tokens.stylex.js";
|
|
13
13
|
|
|
14
14
|
// A grouped control may be followed by context-layer infrastructure rather
|
|
15
|
-
// than another control.
|
|
16
|
-
// group
|
|
17
|
-
const IS_LAST_ITEM = ':not(:has(~ *:not([popover]):not(template)))';
|
|
15
|
+
// than another control. Popovers, inert markers, and native dialog surfaces
|
|
16
|
+
// are not visual group members; skip them when finding the trailing edge.
|
|
17
|
+
const IS_LAST_ITEM = ':not(:has(~ *:not([popover]):not(template):not(dialog)))';
|
|
18
18
|
export const groupStyles = {
|
|
19
19
|
inGroup: {
|
|
20
20
|
kUk6DE: "x98rzlu",
|
|
@@ -23,8 +23,8 @@ export const groupStyles = {
|
|
|
23
23
|
keTefX: "xd10s4z x1pwwqoy",
|
|
24
24
|
krdFHd: "x15mokao x8eehn2",
|
|
25
25
|
kVL7Gh: "xbiv7yw x1xrp5p4",
|
|
26
|
-
kfmiAY: "x1ga7v0g
|
|
27
|
-
kT0f0o: "x16uus16
|
|
26
|
+
kfmiAY: "x1ga7v0g x149bkfe",
|
|
27
|
+
kT0f0o: "x16uus16 x1ursds5",
|
|
28
28
|
kXnDq0: "x1rm9qnc",
|
|
29
29
|
$$css: true
|
|
30
30
|
}
|