@astryxdesign/core 0.5.2-canary.e4f8e4e → 0.5.2-canary.edc0cfc
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/AppShell/AppShell.d.ts +2 -2
- package/dist/AppShell/AppShell.js +2 -2
- package/dist/Chat/ChatToolCalls.d.ts +1 -1
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +12 -34
- package/dist/Layout/Layout.d.ts +7 -8
- package/dist/Layout/Layout.d.ts.map +1 -1
- package/dist/Layout/Layout.js +7 -8
- package/dist/Spinner/Spinner.d.ts.map +1 -1
- package/dist/Spinner/Spinner.js +1 -1
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts +13 -10
- package/dist/Table/plugins/rowStatus/useTableRowStatus.d.ts.map +1 -1
- package/dist/Table/plugins/rowStatus/useTableRowStatus.js +24 -11
- package/dist/astryx.css +0 -1
- package/package.json +2 -2
- package/src/AppShell/AppShell.doc.mjs +4 -3
- package/src/AppShell/AppShell.tsx +2 -2
- package/src/BottomSheet/BottomSheet.doc.mjs +31 -0
- package/src/BottomSheet/BottomSheet.spec.md +177 -0
- package/src/Chat/ChatToolCalls.doc.mjs +1 -1
- package/src/Chat/ChatToolCalls.test.tsx +33 -1
- package/src/Chat/ChatToolCalls.tsx +13 -34
- package/src/CheckboxList/CheckboxList.doc.mjs +172 -31
- package/src/CheckboxList/CheckboxList.spec.md +214 -0
- package/src/CommandPalette/CommandPalette.doc.mjs +72 -0
- package/src/CommandPalette/CommandPalette.spec.md +223 -0
- package/src/ComplexSelector/ComplexSelector.doc.mjs +42 -0
- package/src/ComplexSelector/ComplexSelector.spec.md +189 -0
- package/src/ContextMenu/ContextMenu.doc.mjs +48 -0
- package/src/ContextMenu/ContextMenu.spec.md +206 -0
- package/src/Divider/Divider.doc.mjs +24 -0
- package/src/Divider/Divider.spec.md +156 -0
- package/src/DropdownMenu/DropdownMenu.doc.mjs +104 -0
- package/src/DropdownMenu/DropdownMenu.spec.md +245 -0
- package/src/FieldStatus/FieldStatus.doc.mjs +21 -0
- package/src/FieldStatus/FieldStatus.spec.md +212 -0
- package/src/Grid/Grid.doc.mjs +19 -0
- package/src/Grid/Grid.spec.md +161 -0
- package/src/Icon/Icon.doc.mjs +196 -48
- package/src/Icon/Icon.spec.md +191 -0
- package/src/Kbd/Kbd.doc.mjs +18 -0
- package/src/Kbd/Kbd.spec.md +141 -0
- package/src/Layout/Layout.doc.mjs +57 -17
- package/src/Layout/Layout.spec.md +234 -0
- package/src/Layout/Layout.test.tsx +1 -1
- package/src/Layout/Layout.tsx +7 -8
- package/src/Lightbox/Lightbox.doc.mjs +149 -33
- package/src/Lightbox/Lightbox.spec.md +197 -0
- package/src/Markdown/Markdown.doc.mjs +60 -0
- package/src/Markdown/Markdown.spec.md +206 -0
- package/src/MobileNav/MobileNav.doc.mjs +140 -32
- package/src/MobileNav/MobileNav.spec.md +208 -0
- package/src/MoreMenu/MoreMenu.doc.mjs +42 -0
- package/src/MoreMenu/MoreMenu.spec.md +221 -0
- package/src/MultiSelector/MultiSelector.doc.mjs +112 -0
- package/src/MultiSelector/MultiSelector.spec.md +266 -0
- package/src/NavIcon/NavIcon.doc.mjs +17 -0
- package/src/NavIcon/NavIcon.spec.md +133 -0
- package/src/NavMenu/NavHeadingMenu.spec.md +209 -0
- package/src/NavMenu/NavMenu.doc.mjs +37 -0
- package/src/Outline/Outline.doc.mjs +35 -0
- package/src/Outline/Outline.spec.md +161 -0
- package/src/OverflowList/OverflowList.doc.mjs +24 -0
- package/src/OverflowList/OverflowList.spec.md +156 -0
- package/src/Pagination/Pagination.doc.mjs +74 -0
- package/src/Pagination/Pagination.spec.md +225 -0
- package/src/ProgressBar/ProgressBar.doc.mjs +198 -38
- package/src/ProgressBar/ProgressBar.spec.md +77 -25
- package/src/Resizable/Resizable.doc.mjs +59 -16
- package/src/Resizable/Resizable.spec.md +194 -0
- package/src/Section/Section.doc.mjs +17 -0
- package/src/Section/Section.spec.md +138 -0
- package/src/SegmentedControl/SegmentedControl.doc.mjs +27 -0
- package/src/SegmentedControl/SegmentedControl.spec.md +151 -0
- package/src/Selector/Selector.doc.mjs +125 -96
- package/src/Selector/Selector.spec.md +278 -0
- package/src/Skeleton/Skeleton.doc.mjs +12 -0
- package/src/Skeleton/Skeleton.spec.md +126 -0
- package/src/Slider/Slider.doc.mjs +184 -30
- package/src/Slider/Slider.spec.md +223 -0
- package/src/Spinner/Spinner.tsx +21 -1
- package/src/Stack/Stack.doc.mjs +22 -0
- package/src/Stack/Stack.spec.md +154 -0
- package/src/StatusDot/StatusDot.doc.mjs +17 -0
- package/src/StatusDot/StatusDot.spec.md +137 -0
- package/src/Switch/Switch.doc.mjs +40 -0
- package/src/Switch/Switch.spec.md +174 -0
- package/src/Table/Table.doc.mjs +102 -24
- package/src/Table/Table.spec.md +285 -0
- package/src/Table/plugins/rowStatus/useTableRowStatus.test.tsx +38 -20
- package/src/Table/plugins/rowStatus/useTableRowStatus.tsx +30 -12
- package/src/Table/useTableRowStatus.doc.mjs +4 -4
- package/src/Text/Text.doc.mjs +190 -43
- package/src/Text/Text.spec.md +205 -0
- package/src/TextArea/TextArea.doc.mjs +255 -45
- package/src/TextArea/TextArea.spec.md +204 -0
- package/src/Toolbar/Toolbar.doc.mjs +19 -0
- package/src/Toolbar/Toolbar.spec.md +173 -0
- package/src/Tooltip/Tooltip.doc.mjs +17 -0
- package/src/Tooltip/Tooltip.spec.md +141 -0
- package/src/TreeList/TreeList.doc.mjs +58 -0
- package/src/TreeList/TreeList.spec.md +223 -0
- package/src/Typeahead/Typeahead.doc.mjs +83 -1
- package/src/Typeahead/Typeahead.spec.md +250 -0
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
* @file AppShell.tsx
|
|
4
4
|
* @input Uses React, Layout, LayoutHeader, LayoutPanel, LayoutContent, StyleX
|
|
5
5
|
* @output Exports AppShell component and AppShellProps type
|
|
6
|
-
* @position
|
|
6
|
+
* @position Page shell for an application — the top-level wrapper for any app.
|
|
7
7
|
* Composes Layout internally to provide header, sideNav, and main content areas.
|
|
8
8
|
* Use for any app that needs a top nav, side navigation, and scrollable content.
|
|
9
9
|
*
|
|
@@ -175,7 +175,7 @@ export interface AppShellProps extends BaseProps<HTMLDivElement> {
|
|
|
175
175
|
topNav?: ReactNode;
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
178
|
-
*
|
|
178
|
+
* Page shell for an application. Provides the structural frame for an app:
|
|
179
179
|
* top navigation, side navigation, and main content area.
|
|
180
180
|
*
|
|
181
181
|
* Slot-based API with `topNav`, `sideNav`, `banner`, and `children`.
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
* @file AppShell.tsx
|
|
9
9
|
* @input Uses React, Layout, LayoutHeader, LayoutPanel, LayoutContent, StyleX
|
|
10
10
|
* @output Exports AppShell component and AppShellProps type
|
|
11
|
-
* @position
|
|
11
|
+
* @position Page shell for an application — the top-level wrapper for any app.
|
|
12
12
|
* Composes Layout internally to provide header, sideNav, and main content areas.
|
|
13
13
|
* Use for any app that needs a top nav, side navigation, and scrollable content.
|
|
14
14
|
*
|
|
@@ -199,7 +199,7 @@ const styles = {
|
|
|
199
199
|
// =============================================================================
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
*
|
|
202
|
+
* Page shell for an application. Provides the structural frame for an app:
|
|
203
203
|
* top navigation, side navigation, and main content area.
|
|
204
204
|
*
|
|
205
205
|
* Slot-based API with `topNav`, `sideNav`, `banner`, and `children`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatToolCalls.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatToolCalls.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAA+B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,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AC5B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAkaD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,4BA2JtD;yBA3Je,aAAa"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @file ChatToolCalls.tsx
|
|
7
|
-
* @input Uses React, StyleX, theme tokens
|
|
7
|
+
* @input Uses React, StyleX, semantic icon registry, theme tokens
|
|
8
8
|
* @output Exports ChatToolCalls component
|
|
9
9
|
* @position Chat component — displays tool/function call invocations
|
|
10
10
|
*
|
|
@@ -32,7 +32,7 @@ import { useTranslator } from "../i18n/index.js";
|
|
|
32
32
|
// =============================================================================
|
|
33
33
|
// Types
|
|
34
34
|
// =============================================================================
|
|
35
|
-
import { jsx as _jsx,
|
|
35
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
36
36
|
// =============================================================================
|
|
37
37
|
// =============================================================================
|
|
38
38
|
// Styles
|
|
@@ -93,8 +93,8 @@ const styles = {
|
|
|
93
93
|
const STATUS_ICON_NAMES = {
|
|
94
94
|
pending: 'clock',
|
|
95
95
|
running: null,
|
|
96
|
-
complete: '
|
|
97
|
-
error: '
|
|
96
|
+
complete: 'success',
|
|
97
|
+
error: 'error'
|
|
98
98
|
};
|
|
99
99
|
const STATUS_STYLES = {
|
|
100
100
|
pending: styles.colorPending,
|
|
@@ -168,21 +168,10 @@ function CallRow({
|
|
|
168
168
|
size: "sm",
|
|
169
169
|
shade: "subtle",
|
|
170
170
|
"aria-hidden": "true"
|
|
171
|
-
}) : /*#__PURE__*/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
177
|
-
...{
|
|
178
|
-
className: "x1n2onr6 x3nfvp2"
|
|
179
|
-
},
|
|
180
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
181
|
-
icon: STATUS_ICON_NAMES[status] ?? 'check',
|
|
182
|
-
size: "xsm",
|
|
183
|
-
color: "inherit"
|
|
184
|
-
})
|
|
185
|
-
})]
|
|
171
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
172
|
+
icon: STATUS_ICON_NAMES[status] ?? 'success',
|
|
173
|
+
size: "xsm",
|
|
174
|
+
color: "inherit"
|
|
186
175
|
}), /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
187
176
|
children: statusAnnouncement
|
|
188
177
|
})]
|
|
@@ -365,21 +354,10 @@ export function ChatToolCalls(props) {
|
|
|
365
354
|
size: "sm",
|
|
366
355
|
shade: "subtle",
|
|
367
356
|
"aria-hidden": "true"
|
|
368
|
-
}) : /*#__PURE__*/
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}
|
|
373
|
-
}), /*#__PURE__*/_jsx("span", {
|
|
374
|
-
...{
|
|
375
|
-
className: "x1n2onr6 x3nfvp2"
|
|
376
|
-
},
|
|
377
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
|
378
|
-
icon: STATUS_ICON_NAMES[latestStatus] ?? 'check',
|
|
379
|
-
size: "xsm",
|
|
380
|
-
color: "inherit"
|
|
381
|
-
})
|
|
382
|
-
})]
|
|
357
|
+
}) : /*#__PURE__*/_jsx(Icon, {
|
|
358
|
+
icon: STATUS_ICON_NAMES[latestStatus] ?? 'success',
|
|
359
|
+
size: "xsm",
|
|
360
|
+
color: "inherit"
|
|
383
361
|
}), /*#__PURE__*/_jsx(VisuallyHidden, {
|
|
384
362
|
children: latestStatusAnnouncement
|
|
385
363
|
})]
|
package/dist/Layout/Layout.d.ts
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @file Layout.tsx
|
|
3
3
|
* @input Uses React, stack/stackItem utilities, LayoutAreaContext, LayoutSlotsContext
|
|
4
4
|
* @output Exports Layout component and LayoutProps, LayoutHeight types
|
|
5
|
-
* @position
|
|
6
|
-
* Building a page with a
|
|
5
|
+
* @position General five-slot layout primitive for arranging header, start, content, end, and footer regions.
|
|
6
|
+
* Building a page area with a side panel? Use Layout with start/end slots.
|
|
7
7
|
* Need a header + scrollable content? Use Layout with header + content slots.
|
|
8
|
-
*
|
|
8
|
+
* AppShell owns the page shell and app-wide navigation behavior.
|
|
9
9
|
*
|
|
10
10
|
* SYNC: When modified, update these files to stay in sync:
|
|
11
11
|
* - /packages/core/src/Layout/Layout.doc.mjs
|
|
@@ -87,11 +87,10 @@ export interface LayoutProps extends Omit<BaseProps, 'content'> {
|
|
|
87
87
|
children?: ReactNode;
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
91
|
-
* Use
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* (Card, Section) for content-level layouts.
|
|
90
|
+
* General layout primitive with header, start, content, end, and footer slots.
|
|
91
|
+
* Use it to arrange regions within a page or bounded container. AppShell owns
|
|
92
|
+
* the page shell, app-wide navigation, responsive shell behavior, skip link,
|
|
93
|
+
* and main landmark.
|
|
95
94
|
*
|
|
96
95
|
* Handles padding collapse between adjacent slots, scroll containment in the
|
|
97
96
|
* content area, and automatic RTL support via CSS logical properties.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../src/Layout/Layout.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAQ9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAO3D;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAgD3C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,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EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAkBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,QAAQ,EACR,OAAO,EACP,YAAY,EACZ,kBAAkB,EAClB,GAAG,EACH,MAAM,EACN,MAAM,EACN,MAAe,EACf,OAAO,EACP,GAAG,EACH,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,WAAW,+BA0Eb;yBAzFe,MAAM"}
|
package/dist/Layout/Layout.js
CHANGED
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @file Layout.tsx
|
|
7
7
|
* @input Uses React, stack/stackItem utilities, LayoutAreaContext, LayoutSlotsContext
|
|
8
8
|
* @output Exports Layout component and LayoutProps, LayoutHeight types
|
|
9
|
-
* @position
|
|
10
|
-
* Building a page with a
|
|
9
|
+
* @position General five-slot layout primitive for arranging header, start, content, end, and footer regions.
|
|
10
|
+
* Building a page area with a side panel? Use Layout with start/end slots.
|
|
11
11
|
* Need a header + scrollable content? Use Layout with header + content slots.
|
|
12
|
-
*
|
|
12
|
+
* AppShell owns the page shell and app-wide navigation behavior.
|
|
13
13
|
*
|
|
14
14
|
* SYNC: When modified, update these files to stay in sync:
|
|
15
15
|
* - /packages/core/src/Layout/Layout.doc.mjs
|
|
@@ -104,11 +104,10 @@ function AreaProvider({
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
108
|
-
* Use
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* (Card, Section) for content-level layouts.
|
|
107
|
+
* General layout primitive with header, start, content, end, and footer slots.
|
|
108
|
+
* Use it to arrange regions within a page or bounded container. AppShell owns
|
|
109
|
+
* the page shell, app-wide navigation, responsive shell behavior, skip link,
|
|
110
|
+
* and main landmark.
|
|
112
111
|
*
|
|
113
112
|
* Handles padding collapse between adjacent slots, scroll containment in the
|
|
114
113
|
* content area, and automatic RTL support via CSS logical properties.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyB5C,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;CAKV,CAAC;
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/Spinner/Spinner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAQ,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAG5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAyB5C,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;CAKV,CAAC;AAgVF,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,KAAK,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAExE,MAAM,WAAW,YAAa,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB;;;;;;;;;;;;;OAaG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAW,EACX,KAAiB,EACjB,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,MAAM,EACrB,GAAG,EACH,GAAG,SAAS,EACb,EAAE,YAAY,+BAuHd;yBAlIe,OAAO"}
|
package/dist/Spinner/Spinner.js
CHANGED
|
@@ -229,11 +229,11 @@ const styles = {
|
|
|
229
229
|
spinner: {
|
|
230
230
|
k1xSpc: "xwz0xwf",
|
|
231
231
|
kgQiWS: "x1ku5rj1",
|
|
232
|
-
kVQacm: "xb3r6kr",
|
|
233
232
|
kXLuUW: "xxymvpz",
|
|
234
233
|
"--_spinner-ring-diameter": "x2lq4xu",
|
|
235
234
|
"--_spinner-ring-stroke": "x10qssua",
|
|
236
235
|
"--_spinner-box-size": "x69vvuq",
|
|
236
|
+
kmuXW: "x2lah0s",
|
|
237
237
|
$$css: true
|
|
238
238
|
},
|
|
239
239
|
circle: {
|
|
@@ -6,18 +6,21 @@ import type { TablePlugin } from '../../types';
|
|
|
6
6
|
*/
|
|
7
7
|
export type TableRowStatusColor = 'accent' | 'success' | 'error' | 'warning' | 'red' | 'orange' | 'green' | 'yellow' | 'blue' | 'gray';
|
|
8
8
|
/**
|
|
9
|
-
* A row's status indicator.
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
9
|
+
* A row's status indicator. Semantic status colors (`success`, `warning`,
|
|
10
|
+
* `error`) resolve to the matching themed semantic icon by default. Palette
|
|
11
|
+
* colors and raw CSS values retain the neutral dot because color alone cannot
|
|
12
|
+
* establish an outcome glyph. Provide `icon` to override either default.
|
|
13
|
+
* `label` is required so the status is never conveyed by color alone — it names
|
|
14
|
+
* the indicator for assistive technology and shows on hover. Return `null` for
|
|
15
|
+
* rows with no status.
|
|
16
16
|
*/
|
|
17
17
|
export interface TableRowStatus {
|
|
18
18
|
/** Semantic status color (preferred) or a raw CSS color string. */
|
|
19
19
|
color: TableRowStatusColor | (string & {});
|
|
20
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Optional icon override. Semantic status colors use their matching themed
|
|
22
|
+
* icon by default; palette/raw colors use a dot.
|
|
23
|
+
*/
|
|
21
24
|
icon?: IconName;
|
|
22
25
|
/**
|
|
23
26
|
* Accessible name for the status, announced to assistive technology and
|
|
@@ -42,8 +45,8 @@ export interface UseTableRowStatusConfig<T extends Record<string, unknown>> {
|
|
|
42
45
|
}
|
|
43
46
|
/**
|
|
44
47
|
* Returns a {@link TablePlugin} that prepends a narrow column signaling per-row
|
|
45
|
-
* status: a
|
|
46
|
-
*
|
|
48
|
+
* status: a themed semantic icon for `success`, `warning`, and `error`; a
|
|
49
|
+
* colored dot for palette/raw colors; or an explicit icon override.
|
|
47
50
|
*
|
|
48
51
|
* @example
|
|
49
52
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableRowStatus.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowStatus/useTableRowStatus.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,eAAe,CAAC;AAIlE,OAAO,KAAK,EAAc,WAAW,EAAC,MAAM,aAAa,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"useTableRowStatus.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowStatus/useTableRowStatus.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,eAAe,CAAC;AAIlE,OAAO,KAAK,EAAc,WAAW,EAAC,MAAM,aAAa,CAAC;AAE1D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,GACR,SAAS,GACT,OAAO,GACP,SAAS,GACT,KAAK,GACL,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,MAAM,CAAC;AAyCX;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,mEAAmE;IACnE,KAAK,EAAE,mBAAmB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC3C;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mDAAmD;AACnD,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACxE;;;;;;;;;OASG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,cAAc,GAAG,IAAI,CAAC;CAC/C;AA2BD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,MAAM,EAAE,uBAAuB,CAAC,CAAC,CAAC,GACjC,WAAW,CAAC,CAAC,CAAC,CAuDhB"}
|
|
@@ -51,13 +51,25 @@ const ICON_COLOR_BY_STATUS = {
|
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
* Semantic statuses resolve through the theme-aware icon registry by default, so
|
|
55
|
+
* a theme owns both their shape and color. Palette colors and raw CSS values do
|
|
56
|
+
* not carry outcome semantics, so they retain the neutral dot unless the caller
|
|
57
|
+
* provides an explicit icon.
|
|
58
|
+
*/
|
|
59
|
+
const DEFAULT_ICON_BY_STATUS = {
|
|
60
|
+
success: 'success',
|
|
61
|
+
error: 'error',
|
|
62
|
+
warning: 'warning'
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* A row's status indicator. Semantic status colors (`success`, `warning`,
|
|
67
|
+
* `error`) resolve to the matching themed semantic icon by default. Palette
|
|
68
|
+
* colors and raw CSS values retain the neutral dot because color alone cannot
|
|
69
|
+
* establish an outcome glyph. Provide `icon` to override either default.
|
|
70
|
+
* `label` is required so the status is never conveyed by color alone — it names
|
|
71
|
+
* the indicator for assistive technology and shows on hover. Return `null` for
|
|
72
|
+
* rows with no status.
|
|
61
73
|
*/
|
|
62
74
|
|
|
63
75
|
/** Configuration for {@link useTableRowStatus}. */
|
|
@@ -91,8 +103,8 @@ const styles = {
|
|
|
91
103
|
|
|
92
104
|
/**
|
|
93
105
|
* Returns a {@link TablePlugin} that prepends a narrow column signaling per-row
|
|
94
|
-
* status: a
|
|
95
|
-
*
|
|
106
|
+
* status: a themed semantic icon for `success`, `warning`, and `error`; a
|
|
107
|
+
* colored dot for palette/raw colors; or an explicit icon override.
|
|
96
108
|
*
|
|
97
109
|
* @example
|
|
98
110
|
* ```
|
|
@@ -126,8 +138,9 @@ export function useTableRowStatus(config) {
|
|
|
126
138
|
if (!status) {
|
|
127
139
|
return null;
|
|
128
140
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
141
|
+
const icon = status.icon ?? DEFAULT_ICON_BY_STATUS[status.color];
|
|
142
|
+
const signifier = icon ? /*#__PURE__*/_jsx(Icon, {
|
|
143
|
+
icon: icon,
|
|
131
144
|
size: "xsm",
|
|
132
145
|
color: ICON_COLOR_BY_STATUS[status.color] ?? 'primary'
|
|
133
146
|
}) : /*#__PURE__*/_jsx("span", {
|
package/dist/astryx.css
CHANGED
|
@@ -659,7 +659,6 @@
|
|
|
659
659
|
.xlp1x4z:not(#\#):not(#\#):not(#\#){backface-visibility:hidden}
|
|
660
660
|
.xx83zyx:not(#\#):not(#\#):not(#\#){background-clip:padding-box}
|
|
661
661
|
.x1rkw3yq:not(#\#):not(#\#):not(#\#){background-color:color-mix(in srgb,white 60%,transparent)}
|
|
662
|
-
.xtwfq29:not(#\#):not(#\#):not(#\#){background-color:currentColor}
|
|
663
662
|
.xgcd1z6:not(#\#):not(#\#):not(#\#){background-color:inherit}
|
|
664
663
|
.xcpsgoo:not(#\#):not(#\#):not(#\#){background-color:rgba(0,0,0,.5)}
|
|
665
664
|
.xjbqb8w:not(#\#):not(#\#):not(#\#){background-color:transparent}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/core",
|
|
3
|
-
"version": "0.5.2-canary.
|
|
3
|
+
"version": "0.5.2-canary.edc0cfc",
|
|
4
4
|
"displayName": "Astryx Core",
|
|
5
5
|
"description": "The component library. Accessible, themeable React components with built-in spacing, dark mode, and StyleX styling.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -661,7 +661,7 @@
|
|
|
661
661
|
"react-dom": ">=19.0.0"
|
|
662
662
|
},
|
|
663
663
|
"devDependencies": {
|
|
664
|
-
"@astryxdesign/cli": "0.5.2-canary.
|
|
664
|
+
"@astryxdesign/cli": "0.5.2-canary.edc0cfc",
|
|
665
665
|
"@babel/cli": "^8.0.4",
|
|
666
666
|
"@babel/core": "^7.29.7",
|
|
667
667
|
"@babel/preset-react": "^8.0.1",
|
|
@@ -10,7 +10,7 @@ export const docs = {
|
|
|
10
10
|
keywords: ["appshell","layout","scaffold","sidebar","sidenav","topnav","header","navigation","dashboard","shell","page","frame"],
|
|
11
11
|
usage: {
|
|
12
12
|
description:
|
|
13
|
-
'
|
|
13
|
+
'AppShell is the page shell for an application. It provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive mobile navigation and skip-to-content automatically. Configure side nav collapse on SideNav with its collapsible prop.',
|
|
14
14
|
bestPractices: [
|
|
15
15
|
{guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},
|
|
16
16
|
{guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},
|
|
@@ -21,6 +21,7 @@ export const docs = {
|
|
|
21
21
|
{guidance: false, description: 'Add your own skip link or <main> element. AppShell already renders both, and a second main landmark makes the first ambiguous.'},
|
|
22
22
|
],
|
|
23
23
|
anatomy: [
|
|
24
|
+
{name: 'Page shell', required: true, description: 'Outermost application frame that owns page-level navigation, responsive shell behavior, and the main content landmark.'},
|
|
24
25
|
{name: 'Skip link', required: true, description: 'First focusable element on the page. Visually hidden until focused, then moves focus to the main content area.'},
|
|
25
26
|
{name: 'Banner', required: false, description: 'The banner slot, for system-wide announcements. Renders above the top nav, inside the banner landmark.'},
|
|
26
27
|
{name: 'Top navigation', required: false, description: 'The topNav slot, typically TopNav. Below the mobile breakpoint it becomes a compact bar carrying the nav toggle.'},
|
|
@@ -137,7 +138,7 @@ export const docsZh = {
|
|
|
137
138
|
displayName: 'App Shell',
|
|
138
139
|
usage: {
|
|
139
140
|
description:
|
|
140
|
-
'
|
|
141
|
+
'AppShell is the page shell for an application. It provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive mobile navigation and skip-to-content automatically. Configure side nav collapse on SideNav with its collapsible prop.',
|
|
141
142
|
bestPractices: [
|
|
142
143
|
{guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},
|
|
143
144
|
{guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},
|
|
@@ -199,7 +200,7 @@ export const docsDense = {
|
|
|
199
200
|
'app-level layout shell w/ header, side nav, main content; composes Layout internally, replaces Page+PageLayout',
|
|
200
201
|
usage: {
|
|
201
202
|
description:
|
|
202
|
-
'
|
|
203
|
+
'AppShell is the page shell for an application. It provides slots for top navigation, side navigation, banners, and main content. Use it as the root wrapper for every page. It handles responsive mobile navigation and skip-to-content automatically. Configure side nav collapse on SideNav with its collapsible prop.',
|
|
203
204
|
bestPractices: [
|
|
204
205
|
{guidance: true, description: 'Choose the right height: use "fill" for dashboards with internal scrolling and "auto" for pages that grow with content.'},
|
|
205
206
|
{guidance: true, description: 'Set `contentPadding` based on content type: 4 for forms and settings, 0 for tables and dashboards.'},
|
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
* @file AppShell.tsx
|
|
9
9
|
* @input Uses React, Layout, LayoutHeader, LayoutPanel, LayoutContent, StyleX
|
|
10
10
|
* @output Exports AppShell component and AppShellProps type
|
|
11
|
-
* @position
|
|
11
|
+
* @position Page shell for an application — the top-level wrapper for any app.
|
|
12
12
|
* Composes Layout internally to provide header, sideNav, and main content areas.
|
|
13
13
|
* Use for any app that needs a top nav, side navigation, and scrollable content.
|
|
14
14
|
*
|
|
@@ -430,7 +430,7 @@ const styles = stylex.create({
|
|
|
430
430
|
// =============================================================================
|
|
431
431
|
|
|
432
432
|
/**
|
|
433
|
-
*
|
|
433
|
+
* Page shell for an application. Provides the structural frame for an app:
|
|
434
434
|
* top navigation, side navigation, and main content area.
|
|
435
435
|
*
|
|
436
436
|
* Slot-based API with `topNav`, `sideNav`, `banner`, and `children`.
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/** @type {import('@astryxdesign/cli/authoring').ComponentAnatomyElement[]} */
|
|
4
|
+
const anatomy = [
|
|
5
|
+
{
|
|
6
|
+
name: 'Sheet panel',
|
|
7
|
+
required: true,
|
|
8
|
+
description:
|
|
9
|
+
'Painted surface that rises from the bottom edge and contains the sheet.',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: 'Content area',
|
|
13
|
+
required: true,
|
|
14
|
+
description:
|
|
15
|
+
'Scrollable area that presents the caller-provided sheet content.',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'Handle',
|
|
19
|
+
required: true,
|
|
20
|
+
description:
|
|
21
|
+
'Decorative grab affordance and drag region at the top of the panel.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'Scrim',
|
|
25
|
+
required: false,
|
|
26
|
+
description:
|
|
27
|
+
'Backdrop that dims and blocks the page in a scrim-backed presentation.',
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
|
|
2
31
|
/** @type {import('@astryxdesign/cli/authoring').ComponentDoc} */
|
|
3
32
|
|
|
4
33
|
export const docs = {
|
|
@@ -126,6 +155,7 @@ export const docs = {
|
|
|
126
155
|
},
|
|
127
156
|
],
|
|
128
157
|
usage: {
|
|
158
|
+
anatomy,
|
|
129
159
|
description:
|
|
130
160
|
'A mobile touch surface for filters, actions, forms, and detail views that should rise from the bottom of the viewport; use BottomSheetSwitcher for multi-step flows.',
|
|
131
161
|
bestPractices: [
|
|
@@ -277,6 +307,7 @@ export const docsDense = {
|
|
|
277
307
|
description:
|
|
278
308
|
'mobile touch sheet rising from the bottom edge (native <dialog>): grab handle, opt-in transform-based drag-to-resize snap points (snapPoints: viewport fraction, percent or px length), scrolling area resizes to the snapped visible height on release (a peek stop, a quarter of the sheet or less, keeps the full height and slides instead), Dialog-aligned dismissal purpose (info/form/required), purpose-gated swipe-to-dismiss, fully-expanded Tall visual-viewport mobile-keyboard handling, named height scale, modal (default) or non-modal (hasScrim={false}) presentation',
|
|
279
309
|
usage: {
|
|
310
|
+
anatomy,
|
|
280
311
|
description:
|
|
281
312
|
'Mobile touch surface for filters, actions, forms, and detail views that should rise from the bottom of the viewport; use BottomSheetSwitcher for multi-step flows.',
|
|
282
313
|
bestPractices: [
|