@astryxdesign/core 0.7.7-canary.36f8ea1 → 0.7.7-canary.653624f

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../src/AppShell/AppShell.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAwCf,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAChD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAU5C,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,SAAS,CAAC;AA+ChD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAE9D;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAEhC;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,G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EACR,cAAc,EACd,aAAa,EAAE,UAAU,EACzB,MAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,qBAgxBf;yBA/xBe,QAAQ"}
@@ -215,23 +215,6 @@ const styles = {
215
215
  kY2c9j: "x1vjfegm",
216
216
  $$css: true
217
217
  },
218
- headerSafeAreaTop: {
219
- kLKAdn: "x1mrd0q",
220
- $$css: true
221
- },
222
- headerSafeAreaSides: {
223
- kZCmMZ: "xs5q72w xqbmqmu",
224
- kwRFfy: "x180b3rg x17h5b6w",
225
- $$css: true
226
- },
227
- headerStickyBelowTopInset: {
228
- k87sOh: "xz44ai8",
229
- $$css: true
230
- },
231
- mainSafeAreaEnd: {
232
- kGO01o: "xvmia7e",
233
- $$css: true
234
- },
235
218
  panelAutoFill: {
236
219
  kUk6DE: "x98rzlu",
237
220
  kVQacm: "xysyzu8",
@@ -552,7 +535,7 @@ export function AppShell({
552
535
  role: "banner",
553
536
  ...mergeProps(themeProps('app-shell-header', {
554
537
  variant
555
- }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky, styles.headerSafeAreaTop, styles.headerSafeAreaSides)),
538
+ }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky)),
556
539
  children: headerInner
557
540
  }) : undefined;
558
541
 
@@ -822,7 +805,7 @@ export function AppShell({
822
805
  tabIndex: isMainScrollRegion ? 0 : -1,
823
806
  isScrollable: isFill,
824
807
  onBlur: handleMainBlur,
825
- xstyle: [contentAreaStyle, drawsMainFocusRing && shouldElevateWithCorner && styles.mainElevatedCorner, drawsMainFocusRing ? [focusOutlineStyles.focusVisible, styles.mainScrollRegionInset] : styles.mainFocusTarget, styles.mainSafeAreaEnd],
808
+ xstyle: [contentAreaStyle, drawsMainFocusRing && shouldElevateWithCorner && styles.mainElevatedCorner, drawsMainFocusRing ? [focusOutlineStyles.focusVisible, styles.mainScrollRegionInset] : styles.mainFocusTarget],
826
809
  children: children
827
810
  });
828
811
 
@@ -867,10 +850,7 @@ export function AppShell({
867
850
  role: headerContent == null ? 'banner' : undefined,
868
851
  ...mergeProps(themeProps('app-shell-header', {
869
852
  variant
870
- }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky, styles.headerSafeAreaSides,
871
- // Under a banner, the banner's wrapper pads the top inset. This top
872
- // bar takes only the side insets.
873
- headerContent == null && styles.headerSafeAreaTop, isAuto && headerContent != null && styles.headerStickyBelowTopInset)),
853
+ }), stylex.props(headerAreaStyle, isAuto && styles.headerSticky)),
874
854
  children: /*#__PURE__*/_jsx(LayoutHeader, {
875
855
  padding: 0,
876
856
  hasDivider: navHasDividers,
package/dist/astryx.css CHANGED
@@ -1254,7 +1254,6 @@
1254
1254
  .x1g2apga:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--_textarea-inline-padding) + var(--spacing-12))}
1255
1255
  .xp2dy4z:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--_textarea-inline-padding) + var(--spacing-6))}
1256
1256
  .x12frdag:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--container-padding-inline-end) - var(--border-width))}
1257
- .x180b3rg:not(#\#):not(#\#):not(#\#){padding-inline-end:env(safe-area-inset-right,0px)}
1258
1257
  .x1ahicqp:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-end,0px)))}
1259
1258
  .xy07wb4:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-end,0px)))}
1260
1259
  .x1pyz5s7:not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--container-padding-inline-end,0px),var(--_item-inset-inline))}
@@ -1287,7 +1286,6 @@
1287
1286
  .x1b6te9z:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--_textarea-inline-padding) + var(--spacing-6))}
1288
1287
  .xs19ii7:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--container-padding-inline-start) - var(--border-width))}
1289
1288
  .x2a0j69:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
1290
- .xs5q72w:not(#\#):not(#\#):not(#\#){padding-inline-start:env(safe-area-inset-left,0px)}
1291
1289
  .xhlv5e7:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc((100cqi - var(--layout-alignment-width)) / 2 + var(--container-padding-inline-start,0px)))}
1292
1290
  .xxjme2g:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),calc(100cqi - var(--layout-alignment-width) + var(--container-padding-inline-start,0px)))}
1293
1291
  .xua885n:not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--container-padding-inline-start,0px),var(--_item-inset-inline))}
@@ -1583,11 +1581,9 @@
1583
1581
  .x1vwwbsn:focus-visible:not(#\#):not(#\#):not(#\#){outline-offset:var(--focus-outline-offset)}
1584
1582
  .x1jhp3zv:focus-visible:not(#\#):not(#\#):not(#\#){outline-style:var(--focus-outline-style)}
1585
1583
  .x1vidyx5:focus-visible:not(#\#):not(#\#):not(#\#){outline-width:var(--focus-outline-width)}
1586
- .x17h5b6w:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-end:env(safe-area-inset-left,0px)}
1587
1584
  .x1n6uwha:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-end:max(var(--spacing-4),env(safe-area-inset-left,0px))}
1588
1585
  .xtjjor6:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-dialog-padding-inline-end,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-left,0px)))))}
1589
1586
  .x1jwxvv4:placeholder-shown:is(:not(:focus), :read-only):not(#\#):not(#\#):not(#\#){padding-inline-start:0}
1590
- .xqbmqmu:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-start:env(safe-area-inset-right,0px)}
1591
1587
  .x19efkpl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-start:max(var(--spacing-4),env(safe-area-inset-right,0px))}
1592
1588
  .x1i7f2ot:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,max(var(--spacing-4),env(safe-area-inset-right,0px)))))}
1593
1589
  .xbt4iw:focus-within:not(#\#):not(#\#):not(#\#){pointer-events:auto}
@@ -2071,7 +2067,6 @@
2071
2067
  .x1enrzb7:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--border-width) + var(--spacing-1))}
2072
2068
  .x1nex4ik:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--container-padding-block-start) - var(--border-width))}
2073
2069
  .x1132dcy:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-4) + var(--spacing-1))}
2074
- .x1mrd0q:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:env(safe-area-inset-top,0px)}
2075
2070
  .x1vjezoa:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:max(var(--spacing-4),env(safe-area-inset-top,0px))}
2076
2071
  .x2gtn7z:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--_chat-composer-padding)}
2077
2072
  .x1q01h0h:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--_layout-flush-block-start,var(--layout-padding-inner-y,var(--spacing-4)))}
@@ -2102,7 +2097,6 @@
2102
2097
  .x1oysc8t:not(#\#):not(#\#):not(#\#):not(#\#){top:calc(var(--size-element-lg) / 2 - 1px)}
2103
2098
  .xkmsrut:not(#\#):not(#\#):not(#\#):not(#\#){top:calc(var(--size-element-md) / 2 - 1px)}
2104
2099
  .x1968x6z:not(#\#):not(#\#):not(#\#):not(#\#){top:calc(var(--size-element-sm) / 2 - 1px)}
2105
- .xz44ai8:not(#\#):not(#\#):not(#\#):not(#\#){top:env(safe-area-inset-top,0px)}
2106
2100
  .xht72ud:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--_app-shell-header-height,0px)}
2107
2101
  .xawarol:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--astryx-layer-inset-block-start,0px)}
2108
2102
  .x8d4r5l:not(#\#):not(#\#):not(#\#):not(#\#){top:var(--spacing-1)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astryxdesign/core",
3
- "version": "0.7.7-canary.36f8ea1",
3
+ "version": "0.7.7-canary.653624f",
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",
@@ -860,9 +860,9 @@
860
860
  "react-dom": ">=19.0.0"
861
861
  },
862
862
  "devDependencies": {
863
- "@astryxdesign/a11y-spec": "0.7.7-canary.36f8ea1",
864
- "@astryxdesign/cli": "0.7.7-canary.36f8ea1",
865
- "@astryxdesign/interaction-harness": "0.7.7-canary.36f8ea1",
863
+ "@astryxdesign/a11y-spec": "0.7.7-canary.653624f",
864
+ "@astryxdesign/cli": "0.7.7-canary.653624f",
865
+ "@astryxdesign/interaction-harness": "0.7.7-canary.653624f",
866
866
  "@babel/cli": "^7.29.7",
867
867
  "@babel/core": "^7.29.7",
868
868
  "@babel/preset-react": "^7.29.7",
@@ -45,11 +45,6 @@ export const docs = {
45
45
  description:
46
46
  'Start the page heading inside `children`. AppShell owns the skip link, the banner landmark and the main landmark, but it renders no heading, so the first heading in the content area is the page h1.',
47
47
  },
48
- {
49
- guidance: true,
50
- description:
51
- 'On phones, opt the page into the full screen with `viewport-fit=cover` in the viewport meta tag (`width=device-width, initial-scale=1, viewport-fit=cover`). AppShell then extends its header under the status bar and out to the screen sides, and keeps the header\'s items and the end of the content inside the device\'s safe area. An installed web app can also draw under the status bar with `<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">`. In landscape only the header is inset: an inline SideNav and the content\'s sides still reach under a notch, so keep content padding there. A shell with no header region or phone top bar keeps no top inset; keep top padding there.',
52
- },
53
48
  {
54
49
  guidance: false,
55
50
  description:
@@ -348,11 +343,6 @@ export const docsDense = {
348
343
  description:
349
344
  'Give every nav slot an accessible name: TopNav and SideNav are separate navigation landmarks, so pass `label` to each.',
350
345
  },
351
- {
352
- guidance: true,
353
- description:
354
- 'Phones: add `viewport-fit=cover` to the viewport meta; the header then reaches under the status bar while its items and the content end stay in the safe area. Landscape: only the header is inset (not an inline SideNav or the content sides). No header region or phone top bar: no top inset, so keep top padding. Installed web apps: `apple-mobile-web-app-status-bar-style` `black-translucent`.',
355
- },
356
346
  {
357
347
  guidance: true,
358
348
  description:
@@ -471,38 +471,6 @@ const styles = stylex.create({
471
471
  top: 0,
472
472
  zIndex: 1,
473
473
  },
474
- // The insets are zero unless the page sets `viewport-fit=cover`. The header
475
- // background goes under the status bar and to the screen sides, as a UIKit
476
- // bar does.
477
- headerSafeAreaTop: {
478
- paddingBlockStart: 'env(safe-area-inset-top, 0px)',
479
- },
480
- // The insets are physical sides, so a right-to-left context swaps them on
481
- // the inline sides.
482
- headerSafeAreaSides: {
483
- paddingInlineStart: {
484
- default: 'env(safe-area-inset-left, 0px)',
485
- ':is([dir="rtl"] *)': 'env(safe-area-inset-right, 0px)',
486
- },
487
- paddingInlineEnd: {
488
- default: 'env(safe-area-inset-right, 0px)',
489
- ':is([dir="rtl"] *)': 'env(safe-area-inset-left, 0px)',
490
- },
491
- },
492
- // In `auto`, the banner's wrapper and the phone top bar both stick. Below a
493
- // banner, the bar sticks under the top inset, so its items stay clear of the
494
- // status bar.
495
- headerStickyBelowTopInset: {
496
- top: 'env(safe-area-inset-top, 0px)',
497
- },
498
- // Main adds the bottom inset to the padding that LayoutContent publishes for
499
- // `contentPadding`. The published value excludes the inset, so a bleed child
500
- // subtracts only `contentPadding`. Main is border-box, so a child that fills
501
- // it ends above the inset.
502
- mainSafeAreaEnd: {
503
- paddingBlockEnd:
504
- 'calc(var(--container-padding-block-end, 0px) + env(safe-area-inset-bottom, 0px))',
505
- },
506
474
  // Sticky sideNav for auto height mode — sticks within the wrapper.
507
475
  // This div replaces the panel as the direct flex child of the middle
508
476
  // (horizontal) container, so it needs the same flex properties that
@@ -923,12 +891,7 @@ export function AppShell({
923
891
  role="banner"
924
892
  {...mergeProps(
925
893
  themeProps('app-shell-header', {variant}),
926
- stylex.props(
927
- headerAreaStyle,
928
- isAuto && styles.headerSticky,
929
- styles.headerSafeAreaTop,
930
- styles.headerSafeAreaSides,
931
- ),
894
+ stylex.props(headerAreaStyle, isAuto && styles.headerSticky),
932
895
  )}>
933
896
  {headerInner}
934
897
  </div>
@@ -1221,7 +1184,6 @@ export function AppShell({
1221
1184
  drawsMainFocusRing
1222
1185
  ? [focusOutlineStyles.focusVisible, styles.mainScrollRegionInset]
1223
1186
  : styles.mainFocusTarget,
1224
- styles.mainSafeAreaEnd,
1225
1187
  ]}>
1226
1188
  {children}
1227
1189
  </LayoutContent>
@@ -1268,15 +1230,7 @@ export function AppShell({
1268
1230
  role={headerContent == null ? 'banner' : undefined}
1269
1231
  {...mergeProps(
1270
1232
  themeProps('app-shell-header', {variant}),
1271
- stylex.props(
1272
- headerAreaStyle,
1273
- isAuto && styles.headerSticky,
1274
- styles.headerSafeAreaSides,
1275
- // Under a banner, the banner's wrapper pads the top inset. This top
1276
- // bar takes only the side insets.
1277
- headerContent == null && styles.headerSafeAreaTop,
1278
- isAuto && headerContent != null && styles.headerStickyBelowTopInset,
1279
- ),
1233
+ stylex.props(headerAreaStyle, isAuto && styles.headerSticky),
1280
1234
  )}>
1281
1235
  <LayoutHeader padding={0} hasDivider={navHasDividers}>
1282
1236
  <div