@starci/grammar 0.12.0 → 0.12.3
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/README.md +65 -18
- package/dist/.build-stamp.json +4 -4
- package/dist/common/components-forms.css +5 -0
- package/dist/common/components-navigation.css +8 -6
- package/dist/common/components-overlays.css +0 -10
- package/dist/common/registry.d.ts +6 -6
- package/dist/common/renderers-forms.d.ts +1 -1
- package/dist/common/renderers-navigation.d.ts +2 -2
- package/dist/common/renderers.d.ts +1 -1
- package/dist/common/renderers.d.ts.map +1 -1
- package/dist/common/renderers.js.map +1 -1
- package/dist/common/rule-catalog.generated.d.ts +1 -0
- package/dist/common/rule-catalog.generated.d.ts.map +1 -1
- package/dist/common/rule-catalog.generated.js +10 -1
- package/dist/common/rule-catalog.generated.js.map +1 -1
- package/dist/common/styles.css +91 -112
- package/dist/core/branch/DropdownMenu/index.d.ts +2 -7
- package/dist/core/branch/DropdownMenu/index.d.ts.map +1 -1
- package/dist/core/branch/DropdownMenu/index.js +2 -4
- package/dist/core/branch/DropdownMenu/index.js.map +1 -1
- package/dist/core/branch/Rail/index.d.ts.map +1 -1
- package/dist/core/branch/Rail/index.js +2 -4
- package/dist/core/branch/Rail/index.js.map +1 -1
- package/dist/core/branch/Select/index.js +2 -2
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts +1 -1
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/classNames.js +3 -3
- package/dist/core/branch/SurfaceAccordionCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts +2 -2
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceAccordionCard/index.js +10 -9
- package/dist/core/branch/SurfaceAccordionCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.d.ts +0 -4
- package/dist/core/branch/SurfaceCard/classNames.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/classNames.js +0 -4
- package/dist/core/branch/SurfaceCard/classNames.js.map +1 -1
- package/dist/core/branch/SurfaceCard/index.d.ts +0 -3
- package/dist/core/branch/SurfaceCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/index.js +10 -29
- package/dist/core/branch/SurfaceCard/index.js.map +1 -1
- package/dist/core/branch/Tabs/index.d.ts +3 -2
- package/dist/core/branch/Tabs/index.d.ts.map +1 -1
- package/dist/core/branch/Tabs/index.js +3 -1
- package/dist/core/branch/Tabs/index.js.map +1 -1
- package/dist/core/branch/Toast/index.js +2 -2
- package/dist/core/branch/Toast/index.js.map +1 -1
- package/dist/core/branch/Tooltip/classNames.d.ts +1 -2
- package/dist/core/branch/Tooltip/classNames.d.ts.map +1 -1
- package/dist/core/branch/Tooltip/classNames.js +1 -2
- package/dist/core/branch/Tooltip/classNames.js.map +1 -1
- package/dist/core/branch/Tooltip/index.d.ts +18 -9
- package/dist/core/branch/Tooltip/index.d.ts.map +1 -1
- package/dist/core/branch/Tooltip/index.js +12 -11
- package/dist/core/branch/Tooltip/index.js.map +1 -1
- package/dist/core/composite/AvatarButton/index.d.ts.map +1 -1
- package/dist/core/composite/AvatarButton/index.js +1 -1
- package/dist/core/composite/AvatarButton/index.js.map +1 -1
- package/dist/core/composite/IdentityLockup/index.d.ts +4 -2
- package/dist/core/composite/IdentityLockup/index.d.ts.map +1 -1
- package/dist/core/composite/IdentityLockup/index.js +1 -1
- package/dist/core/composite/IdentityLockup/index.js.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/index.d.ts.map +1 -1
- package/dist/core/composition/NavigationFeatureNav/index.js +2 -1
- package/dist/core/composition/NavigationFeatureNav/index.js.map +1 -1
- package/dist/core/composition/Sidebar/index.d.ts +8 -1
- package/dist/core/composition/Sidebar/index.d.ts.map +1 -1
- package/dist/core/composition/Sidebar/index.js +49 -27
- package/dist/core/composition/Sidebar/index.js.map +1 -1
- package/dist/core/composition/TopBar/index.d.ts.map +1 -1
- package/dist/core/composition/TopBar/index.js +2 -1
- package/dist/core/composition/TopBar/index.js.map +1 -1
- package/dist/core/composition/WorkspaceShell/index.d.ts.map +1 -1
- package/dist/core/composition/WorkspaceShell/index.js +6 -4
- package/dist/core/composition/WorkspaceShell/index.js.map +1 -1
- package/dist/core/dna.d.ts +4 -0
- package/dist/core/dna.d.ts.map +1 -1
- package/dist/core/dna.js +4 -0
- package/dist/core/dna.js.map +1 -1
- package/dist/core/primitive/Button/index.d.ts +3 -2
- package/dist/core/primitive/Button/index.d.ts.map +1 -1
- package/dist/core/primitive/Button/index.js +4 -4
- package/dist/core/primitive/Button/index.js.map +1 -1
- package/dist/core/primitive/Divider/index.d.ts.map +1 -1
- package/dist/core/primitive/Divider/index.js +3 -4
- package/dist/core/primitive/Divider/index.js.map +1 -1
- package/dist/core/primitive/IconButton/index.d.ts +14 -10
- package/dist/core/primitive/IconButton/index.d.ts.map +1 -1
- package/dist/core/primitive/IconButton/index.js +1 -1
- package/dist/core/primitive/IconButton/index.js.map +1 -1
- package/dist/core/primitive/Input/index.d.ts +3 -1
- package/dist/core/primitive/Input/index.d.ts.map +1 -1
- package/dist/core/primitive/Input/index.js +3 -3
- package/dist/core/primitive/Input/index.js.map +1 -1
- package/dist/core/primitive/PlainPressable/index.d.ts +3 -1
- package/dist/core/primitive/PlainPressable/index.d.ts.map +1 -1
- package/dist/core/primitive/PlainPressable/index.js +1 -1
- package/dist/core/primitive/PlainPressable/index.js.map +1 -1
- package/dist/core/primitive/Progress/index.d.ts.map +1 -1
- package/dist/core/primitive/Progress/index.js +1 -1
- package/dist/core/primitive/Progress/index.js.map +1 -1
- package/dist/core/primitive/RelativeTime/index.d.ts +19 -6
- package/dist/core/primitive/RelativeTime/index.d.ts.map +1 -1
- package/dist/core/primitive/RelativeTime/index.js +44 -23
- package/dist/core/primitive/RelativeTime/index.js.map +1 -1
- package/dist/core/primitive/SearchField/index.d.ts +3 -1
- package/dist/core/primitive/SearchField/index.d.ts.map +1 -1
- package/dist/core/primitive/SearchField/index.js +2 -2
- package/dist/core/primitive/SearchField/index.js.map +1 -1
- package/dist/core/primitive/Text/index.d.ts +1 -0
- package/dist/core/primitive/Text/index.d.ts.map +1 -1
- package/dist/core/primitive/Text/index.js +1 -2
- package/dist/core/primitive/Text/index.js.map +1 -1
- package/dist/core/primitive/TextAction/index.d.ts +3 -3
- package/dist/core/primitive/TextAction/index.d.ts.map +1 -1
- package/dist/core/primitive/TextAction/index.js +5 -3
- package/dist/core/primitive/TextAction/index.js.map +1 -1
- package/dist/core/primitive/actionStyles.d.ts +1 -1
- package/dist/core/primitive/actionStyles.d.ts.map +1 -1
- package/dist/offset-pop/conformance.d.ts +1 -1
- package/dist/offset-pop/conformance.js +1 -1
- package/dist/offset-pop/conformance.js.map +1 -1
- package/package.json +5 -3
package/dist/common/styles.css
CHANGED
|
@@ -728,54 +728,6 @@
|
|
|
728
728
|
line-height: 1rem;
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
.starci-core-tooltip {
|
|
732
|
-
position: relative;
|
|
733
|
-
max-width: fit-content;
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
.starci-core-tooltip-content {
|
|
737
|
-
position: absolute;
|
|
738
|
-
z-index: 20;
|
|
739
|
-
pointer-events: none;
|
|
740
|
-
white-space: nowrap;
|
|
741
|
-
border-radius: var(--starci-core-control-radius, 0.75rem);
|
|
742
|
-
background: var(--starci-core-foreground, var(--foreground, CanvasText));
|
|
743
|
-
color: var(--starci-core-canvas, var(--background, Canvas));
|
|
744
|
-
padding: 0.25rem 0.5rem;
|
|
745
|
-
font-size: 0.75rem;
|
|
746
|
-
line-height: 1rem;
|
|
747
|
-
font-weight: 500;
|
|
748
|
-
opacity: 0;
|
|
749
|
-
transition:
|
|
750
|
-
opacity var(--starci-core-motion-duration, 180ms) var(--starci-core-motion-easing, cubic-bezier(0.2, 0, 0, 1)),
|
|
751
|
-
visibility var(--starci-core-motion-duration, 180ms) var(--starci-core-motion-easing, cubic-bezier(0.2, 0, 0, 1));
|
|
752
|
-
visibility: hidden;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
.starci-core-tooltip:hover > .starci-core-tooltip-content,
|
|
756
|
-
.starci-core-tooltip:focus-within > .starci-core-tooltip-content {
|
|
757
|
-
opacity: 1;
|
|
758
|
-
visibility: visible;
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
.starci-core-tooltip[data-grammar-tooltip-placement="top"] > .starci-core-tooltip-content {
|
|
762
|
-
bottom: calc(100% + 0.375rem);
|
|
763
|
-
left: 50%;
|
|
764
|
-
transform: translateX(-50%);
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
.starci-core-tooltip[data-grammar-tooltip-placement="bottom"] > .starci-core-tooltip-content {
|
|
768
|
-
top: calc(100% + 0.375rem);
|
|
769
|
-
left: 50%;
|
|
770
|
-
transform: translateX(-50%);
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
@media (prefers-reduced-motion: reduce) {
|
|
774
|
-
.starci-core-tooltip-content {
|
|
775
|
-
transition: none;
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
|
|
779
731
|
.starci-core-surface {
|
|
780
732
|
position: relative;
|
|
781
733
|
min-width: 0;
|
|
@@ -1823,9 +1775,10 @@
|
|
|
1823
1775
|
}
|
|
1824
1776
|
|
|
1825
1777
|
.starci-core-navigation-feature-nav {
|
|
1778
|
+
box-sizing: border-box;
|
|
1826
1779
|
width: 100%;
|
|
1827
1780
|
border-bottom: 1px solid var(--separator, var(--starci-core-separator, GrayText));
|
|
1828
|
-
background: var(--
|
|
1781
|
+
background: var(--surface, Canvas);
|
|
1829
1782
|
color: var(--foreground, var(--starci-core-foreground, CanvasText));
|
|
1830
1783
|
}
|
|
1831
1784
|
|
|
@@ -1835,33 +1788,18 @@
|
|
|
1835
1788
|
top: 0;
|
|
1836
1789
|
}
|
|
1837
1790
|
|
|
1838
|
-
/*
|
|
1839
|
-
* THE BAND PUBLISHES ITS OWN HEIGHT.
|
|
1840
|
-
*
|
|
1841
|
-
* A page under a sticky band needs exactly one number - where the band stops - to pin a rail
|
|
1842
|
-
* beneath it, and until now every consumer RESTATED that number: `calc(4rem + 1px)` for the
|
|
1843
|
-
* primary row and its separator, `calc(4rem + 2rem + 1px)` once a feature layer is stacked.
|
|
1844
|
-
* Restated geometry is wrong the moment the band changes, so the band publishes it instead.
|
|
1845
|
-
*
|
|
1846
|
-
* It is published with `:has()` on the Grammar root, not measured in JS, because presence and
|
|
1847
|
-
* stacking are already spelled by the data attributes these compositions emit, and a custom
|
|
1848
|
-
* property set on the root inherits to every page inside it. The root - not `:root` - keeps the
|
|
1849
|
-
* package inside its own boundary, which is the same reason no rule here touches the document.
|
|
1850
|
-
*
|
|
1851
|
-
* NOTHING is defined when no sticky band is present, so `var(--starci-core-band-offset, X)`
|
|
1852
|
-
* still resolves to a consumer's own X exactly as it did before this property existed.
|
|
1853
|
-
*/
|
|
1791
|
+
/* The Grammar root publishes the sticky band offset, including its separator and optional feature layer. */
|
|
1854
1792
|
.grammar-common-root:has(.starci-core-navigation-feature-nav[data-grammar-navigation-feature-nav-position="sticky"]),
|
|
1855
1793
|
.grammar-common-root:has(.starci-core-subnav[data-grammar-subnav-position="sticky"]) {
|
|
1856
1794
|
--starci-core-band-offset: calc(var(--starci-core-band-height, 0rem) + var(--starci-core-band-subnav-height, 0rem));
|
|
1857
1795
|
}
|
|
1858
1796
|
|
|
1859
1797
|
.grammar-common-root:has(.starci-core-navigation-feature-nav[data-grammar-navigation-feature-nav-position="sticky"]) {
|
|
1860
|
-
--starci-core-band-height:
|
|
1798
|
+
--starci-core-band-height: 4rem;
|
|
1861
1799
|
}
|
|
1862
1800
|
|
|
1863
1801
|
.grammar-common-root:has(.starci-core-navigation-feature-nav[data-grammar-navigation-feature-nav-position="sticky"][data-grammar-navigation-feature-nav-layers="two"]) {
|
|
1864
|
-
--starci-core-band-height:
|
|
1802
|
+
--starci-core-band-height: 6rem;
|
|
1865
1803
|
}
|
|
1866
1804
|
|
|
1867
1805
|
/* A sticky Subnav stacks under the band, so it adds its own height and separator to the offset. */
|
|
@@ -1871,7 +1809,9 @@
|
|
|
1871
1809
|
|
|
1872
1810
|
.starci-core-navigation-feature-nav-primary {
|
|
1873
1811
|
display: grid !important;
|
|
1874
|
-
|
|
1812
|
+
box-sizing: border-box;
|
|
1813
|
+
block-size: calc(4rem - 1px);
|
|
1814
|
+
min-height: calc(4rem - 1px);
|
|
1875
1815
|
grid-template-columns: minmax(0, 1fr) auto auto !important;
|
|
1876
1816
|
align-items: center;
|
|
1877
1817
|
gap: var(--grammar-row-gap, 0.75rem);
|
|
@@ -1882,6 +1822,15 @@
|
|
|
1882
1822
|
padding-inline: 0.75rem;
|
|
1883
1823
|
}
|
|
1884
1824
|
|
|
1825
|
+
.starci-core-navigation-feature-nav[data-grammar-navigation-feature-nav-layers="one"] {
|
|
1826
|
+
block-size: 4rem;
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
.starci-core-navigation-feature-nav[data-grammar-navigation-feature-nav-layers="one"] .starci-core-navigation-feature-nav-primary {
|
|
1830
|
+
block-size: 100%;
|
|
1831
|
+
min-height: 0;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1885
1834
|
.starci-core-navigation-feature-nav-identity,
|
|
1886
1835
|
.starci-core-navigation-feature-nav-navigation,
|
|
1887
1836
|
.starci-core-navigation-feature-nav-compact-navigation,
|
|
@@ -1913,34 +1862,12 @@
|
|
|
1913
1862
|
gap: var(--grammar-inline-gap, 0.5rem);
|
|
1914
1863
|
}
|
|
1915
1864
|
|
|
1916
|
-
/*
|
|
1917
|
-
* THE BAND'S OWN CONTROLS MEET THE 44px TOUCH FLOOR.
|
|
1918
|
-
*
|
|
1919
|
-
* Every pressable in the two action slots was the vendor button's own height - 2.25rem on
|
|
1920
|
-
* desktop and 2.5rem compact - so the language menu, the cart, the account button, the compact
|
|
1921
|
-
* drawer trigger and the field-shaped search trigger all sat under the floor, on the surface a
|
|
1922
|
-
* reader is most likely to touch. It is a MINIMUM, not a size: `min-inline-size` and
|
|
1923
|
-
* `min-block-size` are properties the vendor's rules never set, so the glyph, the label, the
|
|
1924
|
-
* paint and the corner are all untouched and no `!important` is owed to the components layer.
|
|
1925
|
-
*
|
|
1926
|
-
* The band does NOT grow. The primary row is 4rem with a 0.5rem block inset on each side, so
|
|
1927
|
-
* 44px is 4px short of the 3rem it already offers a control, and `--starci-core-band-height`
|
|
1928
|
-
* stays `calc(4rem + 1px)`. The floor is spelled on the pressable, never on the slot: a slot
|
|
1929
|
-
* with a min-height would pad a row that has nothing in it.
|
|
1930
|
-
*
|
|
1931
|
-
* The feature layer is deliberately out of scope - its tabs are a Tabs branch, and a tab's
|
|
1932
|
-
* target is that branch's to answer.
|
|
1933
|
-
*
|
|
1934
|
-
* The primary destinations in the `navigation` slot carry the identical selector: a
|
|
1935
|
-
* `route`-appearance TextAction already meets the floor on its own (below), but the slot rule
|
|
1936
|
-
* is the family's general-purpose net for ANY pressable a consumer puts there, the same way the
|
|
1937
|
-
* action slots protect a control regardless of which leaf renders it.
|
|
1938
|
-
*/
|
|
1865
|
+
/* Navbar controls share one exact height; the feature layer keeps its own tab geometry. */
|
|
1939
1866
|
.starci-core-navigation-feature-nav-actions :where(button, [role="button"], a[href]),
|
|
1940
1867
|
.starci-core-navigation-feature-nav-navigation :where(button, [role="button"], a[href]),
|
|
1941
1868
|
.starci-core-navigation-feature-nav-compact-navigation :where(button, [role="button"], a[href]) {
|
|
1942
|
-
min-inline-size:
|
|
1943
|
-
min-block-size:
|
|
1869
|
+
min-inline-size: var(--starci-core-control-min-size, 2.75rem);
|
|
1870
|
+
min-block-size: var(--starci-core-control-min-size, 2.75rem);
|
|
1944
1871
|
}
|
|
1945
1872
|
|
|
1946
1873
|
/*
|
|
@@ -2284,6 +2211,17 @@
|
|
|
2284
2211
|
margin-block-end: 0;
|
|
2285
2212
|
}
|
|
2286
2213
|
|
|
2214
|
+
.starci-core-workspace-shell-header[data-grammar-workspace-header-landmark="shell"] {
|
|
2215
|
+
box-sizing: border-box;
|
|
2216
|
+
display: flex;
|
|
2217
|
+
block-size: 4rem;
|
|
2218
|
+
align-items: center;
|
|
2219
|
+
padding-block: 0.5rem;
|
|
2220
|
+
padding-inline: var(--grammar-page-inset, 1rem);
|
|
2221
|
+
border-block-end: 1px solid var(--separator, GrayText);
|
|
2222
|
+
background: var(--surface, Canvas);
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2287
2225
|
.starci-core-workspace-shell[data-grammar-workspace-viewport="fixed"] > .starci-core-workspace-shell-layout {
|
|
2288
2226
|
min-block-size: 0;
|
|
2289
2227
|
flex: 1 1 0%;
|
|
@@ -2300,15 +2238,33 @@
|
|
|
2300
2238
|
overscroll-behavior: contain;
|
|
2301
2239
|
}
|
|
2302
2240
|
|
|
2241
|
+
@media (min-width: 48rem) and (max-width: 56rem) {
|
|
2242
|
+
.starci-core-workspace-shell[data-grammar-workspace-viewport="fixed"] > .starci-core-workspace-shell-layout[data-grammar-workspace-navigation="present"] {
|
|
2243
|
+
grid-template-areas: "navigation primary" "navigation rail";
|
|
2244
|
+
grid-template-columns: var(--starci-core-workspace-navigation-track) minmax(0, 1fr);
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
.starci-core-workspace-shell[data-grammar-workspace-viewport="fixed"] > .starci-core-workspace-shell-layout[data-grammar-workspace-navigation="present"][data-grammar-workspace-rail="absent"] {
|
|
2248
|
+
grid-template-areas: "navigation primary";
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2303
2252
|
/* The compact opener row: the bar's height, an edge-to-edge divider, the opener at the inline start. */
|
|
2304
2253
|
.starci-core-workspace-shell-opener {
|
|
2254
|
+
box-sizing: border-box;
|
|
2305
2255
|
display: flex;
|
|
2306
|
-
|
|
2256
|
+
block-size: 4rem;
|
|
2257
|
+
min-block-size: 4rem;
|
|
2307
2258
|
align-items: center;
|
|
2308
2259
|
gap: var(--grammar-inline-gap, 0.5rem);
|
|
2309
2260
|
padding-inline: var(--grammar-page-inset, 1rem);
|
|
2261
|
+
padding-block: 0.5rem;
|
|
2310
2262
|
border-block-end: 1px solid var(--separator, var(--starci-core-separator, GrayText));
|
|
2311
|
-
background: var(--
|
|
2263
|
+
background: var(--surface, Canvas);
|
|
2264
|
+
}
|
|
2265
|
+
|
|
2266
|
+
.starci-core-workspace-shell-compact-header.starci-core-workspace-shell-opener {
|
|
2267
|
+
display: none;
|
|
2312
2268
|
}
|
|
2313
2269
|
|
|
2314
2270
|
.starci-core-workspace-shell-opener-title {
|
|
@@ -2349,7 +2305,7 @@
|
|
|
2349
2305
|
min-width: 0;
|
|
2350
2306
|
flex-direction: column;
|
|
2351
2307
|
overflow: hidden;
|
|
2352
|
-
background: var(--
|
|
2308
|
+
background: var(--surface, Canvas);
|
|
2353
2309
|
color: var(--foreground, var(--starci-core-foreground, CanvasText));
|
|
2354
2310
|
}
|
|
2355
2311
|
|
|
@@ -2397,6 +2353,7 @@
|
|
|
2397
2353
|
|
|
2398
2354
|
.starci-core-sidebar[data-collapsed="true"] .starci-core-sidebar-list {
|
|
2399
2355
|
align-items: center;
|
|
2356
|
+
gap: 1rem;
|
|
2400
2357
|
padding: 0.5rem !important;
|
|
2401
2358
|
}
|
|
2402
2359
|
|
|
@@ -2407,6 +2364,10 @@
|
|
|
2407
2364
|
gap: 0.25rem !important;
|
|
2408
2365
|
}
|
|
2409
2366
|
|
|
2367
|
+
.starci-core-sidebar-section[data-grammar-sidebar-end-start="true"] {
|
|
2368
|
+
margin-block-start: auto;
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2410
2371
|
.starci-core-sidebar[data-collapsed="true"] .starci-core-sidebar-section {
|
|
2411
2372
|
align-items: center !important;
|
|
2412
2373
|
}
|
|
@@ -2433,6 +2394,7 @@
|
|
|
2433
2394
|
}
|
|
2434
2395
|
|
|
2435
2396
|
.starci-core-sidebar-item {
|
|
2397
|
+
position: relative;
|
|
2436
2398
|
display: flex;
|
|
2437
2399
|
min-width: 0;
|
|
2438
2400
|
align-items: center;
|
|
@@ -2455,7 +2417,8 @@
|
|
|
2455
2417
|
background: var(--default, var(--starci-core-surface-secondary, Canvas));
|
|
2456
2418
|
}
|
|
2457
2419
|
|
|
2458
|
-
.starci-core-sidebar-item[data-selected="true"]
|
|
2420
|
+
.starci-core-sidebar-item[data-selected="true"],
|
|
2421
|
+
.starci-core-sidebar-item[data-grammar-current="true"] {
|
|
2459
2422
|
background: var(--accent-soft, var(--starci-core-accent, Highlight)) !important;
|
|
2460
2423
|
color: var(--accent-soft-foreground, var(--starci-core-accent, HighlightText));
|
|
2461
2424
|
}
|
|
@@ -2483,6 +2446,12 @@
|
|
|
2483
2446
|
flex-shrink: 0;
|
|
2484
2447
|
}
|
|
2485
2448
|
|
|
2449
|
+
.starci-core-sidebar:not([data-collapsed="true"]) .starci-core-sidebar-item-badge {
|
|
2450
|
+
position: static;
|
|
2451
|
+
flex: none;
|
|
2452
|
+
box-shadow: none;
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2486
2455
|
.starci-core-sidebar-footer {
|
|
2487
2456
|
min-width: 0;
|
|
2488
2457
|
padding: 0.75rem;
|
|
@@ -2638,7 +2607,7 @@
|
|
|
2638
2607
|
}
|
|
2639
2608
|
}
|
|
2640
2609
|
|
|
2641
|
-
@media (max-width:
|
|
2610
|
+
@media (max-width: 47.999rem) {
|
|
2642
2611
|
.starci-core-workspace-shell-layout[data-grammar-workspace-navigation-visibility="wide"] .starci-core-workspace-shell-navigation {
|
|
2643
2612
|
display: none;
|
|
2644
2613
|
}
|
|
@@ -2669,6 +2638,10 @@
|
|
|
2669
2638
|
display: block;
|
|
2670
2639
|
}
|
|
2671
2640
|
|
|
2641
|
+
.starci-core-workspace-shell-compact-header.starci-core-workspace-shell-opener {
|
|
2642
|
+
display: flex;
|
|
2643
|
+
}
|
|
2644
|
+
|
|
2672
2645
|
.starci-core-workspace-shell-compact-navigation {
|
|
2673
2646
|
position: sticky;
|
|
2674
2647
|
z-index: 40;
|
|
@@ -2814,9 +2787,7 @@
|
|
|
2814
2787
|
}
|
|
2815
2788
|
|
|
2816
2789
|
.starci-core-divider-rule {
|
|
2817
|
-
height: 1px;
|
|
2818
2790
|
flex: 1 1 0%;
|
|
2819
|
-
background: var(--border, var(--separator, var(--starci-core-separator, GrayText)));
|
|
2820
2791
|
}
|
|
2821
2792
|
|
|
2822
2793
|
/* Region, List, ListItem: semantic page structure that draws nothing of its own. */
|
|
@@ -2840,18 +2811,6 @@
|
|
|
2840
2811
|
overflow-x: auto;
|
|
2841
2812
|
}
|
|
2842
2813
|
|
|
2843
|
-
/* The unlabelled hairline (0.6.0): BOUNDARY-1, one pixel of --separator across its container, no margin. */
|
|
2844
|
-
.starci-core-divider-bare {
|
|
2845
|
-
display: block;
|
|
2846
|
-
width: 100%;
|
|
2847
|
-
height: 0;
|
|
2848
|
-
flex: none;
|
|
2849
|
-
margin: 0;
|
|
2850
|
-
border: 0;
|
|
2851
|
-
/* A border, not a background: forced colours keep a border and drop a background. */
|
|
2852
|
-
border-block-start: 1px solid var(--separator, var(--starci-core-separator, GrayText));
|
|
2853
|
-
}
|
|
2854
|
-
|
|
2855
2814
|
/* --- Pinned action bar (0.6.0): the narrow-screen page command, sticky at the bottom edge. --- */
|
|
2856
2815
|
.starci-core-pinned-action-bar {
|
|
2857
2816
|
position: sticky;
|
|
@@ -2906,6 +2865,25 @@
|
|
|
2906
2865
|
}
|
|
2907
2866
|
|
|
2908
2867
|
/* --- Icon button: a HeroUI `Button` worn as a circle. --- */
|
|
2868
|
+
[data-grammar-control-size="control"],
|
|
2869
|
+
.starci-core-control-size .starci-core-field-skeleton-control {
|
|
2870
|
+
box-sizing: border-box;
|
|
2871
|
+
block-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2872
|
+
min-block-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2873
|
+
max-block-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
.starci-core-icon-button[data-grammar-control-size="control"] {
|
|
2877
|
+
inline-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2878
|
+
min-inline-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2879
|
+
max-inline-size: var(--starci-core-control-min-size, 2.75rem) !important;
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
.starci-core-text-action[data-size="control"] {
|
|
2883
|
+
font-size: 0.875rem;
|
|
2884
|
+
line-height: 1.25rem;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2909
2887
|
.starci-core-icon-button {
|
|
2910
2888
|
border-radius: var(--starci-core-pill-radius, 999px) !important;
|
|
2911
2889
|
}
|
|
@@ -3017,6 +2995,7 @@
|
|
|
3017
2995
|
display: grid;
|
|
3018
2996
|
width: 100%;
|
|
3019
2997
|
gap: 0.25rem;
|
|
2998
|
+
background: transparent;
|
|
3020
2999
|
}
|
|
3021
3000
|
|
|
3022
3001
|
.starci-core-progress-step {
|
|
@@ -10,12 +10,7 @@ export type DropdownMenuItem = {
|
|
|
10
10
|
readonly description?: string;
|
|
11
11
|
/** Shortcut chord drawn with `Kbd`, e.g. `["command", "K"]`. Display only: the app binds the keys. */
|
|
12
12
|
readonly shortcut?: readonly string[];
|
|
13
|
-
/**
|
|
14
|
-
* A node in the leading position instead of a glyph, e.g. an identity mark. It sits in a 20px slot (the same box a glyph gets) and
|
|
15
|
-
* wins over `iconSource` or `mark` when also given.
|
|
16
|
-
*/
|
|
17
|
-
readonly leading?: ReactNode;
|
|
18
|
-
/** `danger` marks a destructive command (sign out, delete, remove, revoke): HeroUI's danger variant colours its label and glyph. */
|
|
13
|
+
/** `danger` marks a destructive command. */
|
|
19
14
|
readonly tone?: DropdownMenuItemTone;
|
|
20
15
|
readonly isDisabled?: boolean;
|
|
21
16
|
/** A destination: the item renders a real link. */
|
|
@@ -32,7 +27,7 @@ export type DropdownMenuItem = {
|
|
|
32
27
|
/** Decorative identity artwork in the same leading icon box. The item's label supplies its name. */
|
|
33
28
|
readonly mark?: ReactNode;
|
|
34
29
|
});
|
|
35
|
-
/** Checkable items
|
|
30
|
+
/** Checkable items use HeroUI's default checkmark in both selection modes. */
|
|
36
31
|
export type DropdownMenuSelection = {
|
|
37
32
|
readonly mode: "single" | "multiple";
|
|
38
33
|
readonly selectedIds: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/DropdownMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACpG,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAGrE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEvD,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,sGAAsG;IACtG,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACrC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/DropdownMenu/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAyC,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACpG,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAGrE,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAEv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A;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,qBAAqB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,mBAAmB,CAAA;AAEtE,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAA;AAE3F,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG;IAC/C;;;OAGG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAA;IAC9C,kFAAkF;IAClF,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,QAAQ,CAAC,SAAS,CAAC,EAAE,qBAAqB,CAAA;CAC7C,CAAA;AAeD;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,yDAM1B,iBAAiB,gCAgInB,CAAA"}
|
|
@@ -36,10 +36,8 @@ export const DropdownMenu = ({ trigger, entries, onAction, placement = "bottom s
|
|
|
36
36
|
};
|
|
37
37
|
const renderItem = (item, selectionMode) => {
|
|
38
38
|
const tone = item.tone ?? "neutral";
|
|
39
|
-
const icon = item.
|
|
40
|
-
? _jsx("span", { "aria-hidden": "true", "data-grammar-menu-
|
|
41
|
-
: item.iconSource !== undefined ? _jsx(Icon, { source: item.iconSource, usage: "leading" })
|
|
42
|
-
: item.mark === undefined || item.mark === null ? null : (_jsx("span", { "aria-hidden": "true", className: "starci-core-icon", "data-usage": "leading", "data-grammar-menu-mark": "true", children: item.mark }));
|
|
39
|
+
const icon = item.iconSource !== undefined ? _jsx(Icon, { source: item.iconSource, usage: "leading" })
|
|
40
|
+
: item.mark === undefined || item.mark === null || item.mark === false || item.mark === "" ? null : (_jsx("span", { "aria-hidden": "true", className: "starci-core-icon", "data-usage": "leading", "data-grammar-menu-mark": "true", children: item.mark }));
|
|
43
41
|
const content = (_jsxs(_Fragment, { children: [selectionMode === undefined ? null : _jsx(HeroDropdown.ItemIndicator, {}), item.description === undefined ? icon : icon === null ? null : _jsx("div", { "data-grammar-menu-icon-slot": "true", children: icon }), item.description === undefined ? _jsx(HeroLabel, { children: item.label }) : (_jsxs("div", { "data-grammar-menu-copy": "true", children: [_jsx(HeroLabel, { children: item.label }), _jsx(HeroDescription, { children: item.description })] })), item.shortcut === undefined ? null : (_jsx(HeroKbd, { "data-grammar-menu-shortcut": "true", slot: "keyboard", variant: "light", children: kbdChordContent(item.shortcut) })), item.submenu === undefined ? null : _jsx(HeroDropdown.SubmenuIndicator, {})] }));
|
|
44
42
|
const itemElement = (_jsx(HeroDropdown.Item, { id: item.id, textValue: item.label, variant: tone === "danger" ? "danger" : "default", isDisabled: item.isDisabled ?? false, ...(item.href === undefined ? {} : { href: item.href }), "data-grammar-menu-item": "true", "data-contract": "FOCUS-1 CTA-2", "data-grammar-tone": tone, children: content }, item.id));
|
|
45
43
|
if (item.submenu === undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/DropdownMenu/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,IAAI,UAAU,EAAE,GAAG,IAAI,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,eAAe,CAAA;AAE9K,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAyB,MAAM,uBAAuB,CAAA;AACpG,OAAO,EAAE,IAAI,EAAmB,MAAM,+BAA+B,CAAA;AACrE,OAAO,EAAE,eAAe,EAA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ACL,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Rail/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Rail/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAyC,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAG9F,KAAK,sBAAsB,GAAG;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAA;CACtC,CAAA;AAED,KAAK,0BAA0B,GAAG;IAC9B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAA;IACtB,gGAAgG;IAChG,QAAQ,CAAC,QAAQ,EAAE,oBAAoB,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,CAAC,sBAAsB,GAAG,0BAA0B,CAAC,GAAG;IAC5E,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,gGAAgG;IAChG,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACjC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAA;IAChD,QAAQ,CAAC,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,WAAW,CAAA;IAC5C,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAA;IACnD,sFAAsF;IACtF,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;IAChC,mEAAmE;IACnE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,4GAA4G;IAC5G,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAC5C,CAAA;AAED,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,gCA4EpC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createElement, useId } from "react";
|
|
4
|
-
import { SurfaceNesting } from "../../surfaceContext.js";
|
|
5
4
|
import { assertPresentationState, treatmentFor } from "../../state.js";
|
|
6
5
|
import { railBodyClassName, railClassName, railFooterClassName, railFrameClassName } from "./classNames.js";
|
|
7
6
|
export const Rail = (props) => {
|
|
@@ -33,7 +32,6 @@ export const Rail = (props) => {
|
|
|
33
32
|
"data-grammar-rail-height": height,
|
|
34
33
|
"data-grammar-motion": motion,
|
|
35
34
|
"data-grammar-rail": "true",
|
|
36
|
-
"data-grammar-nesting": "surface",
|
|
37
35
|
"data-component": "Rail",
|
|
38
36
|
"data-tier": "branch",
|
|
39
37
|
"data-grammar-rail-mode": mode,
|
|
@@ -42,7 +40,7 @@ export const Rail = (props) => {
|
|
|
42
40
|
"data-grammar-treatment": treatment.tone,
|
|
43
41
|
};
|
|
44
42
|
if (landmark === "content-navigation")
|
|
45
|
-
return _jsx(
|
|
46
|
-
return (_jsx(
|
|
43
|
+
return _jsx("div", { ...shared, children: frame });
|
|
44
|
+
return (_jsx("aside", { "aria-labelledby": headingId, ...shared, children: frame }));
|
|
47
45
|
};
|
|
48
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/Rail/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,aAAa,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/Rail/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,aAAa,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC5D,OAAO,EAAE,uBAAuB,EAAE,YAAY,EAA0B,MAAM,gBAAgB,CAAA;AAC9F,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AA+B3G,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAE,EAAE;IACrC,MAAM,EACF,KAAK,EACL,QAAQ,GAAG,eAAe,EAC1B,QAAQ,EACR,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,IAAI,GAAG,MAAM,EACb,KAAK,GAAG,UAAU,EAClB,KAAK,GAAG,SAAS,EACjB,QAAQ,GAAG,UAAU,EACrB,MAAM,GAAG,QAAQ,EACjB,aAAa,GAAG,KAAK,EACrB,KAAK,GAAG,MAAM,EACd,YAAY,GAAG,CAAC,GACnB,GAAG,KAAK,CAAA;IACT,uBAAuB,CAAC,KAAK,CAAC,CAAA;IAC9B,MAAM,SAAS,GAAG,KAAK,EAAE,CAAA;IACzB,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAA;IAErC,MAAM,YAAY,GAAG;QACjB,8EAA8E;QAC9E,mEAAmE;QACnE,oFAAoF;QACpF,oFAAoF;QACpF,sBAAsB;QACtB,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,YAAY;QAC9C,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC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Q;QACrB,wBAAwB,EAAE,IAAI;QAC9B,yBAAyB,EAAE,KAAK;QAChC,oBAAoB,EAAE,KAAK;QAC3B,wBAAwB,EAAE,SAAS,CAAC,IAAI;KAClC,CAAA;IAEV,IAAI,QAAQ,KAAK,oBAAoB;QAAE,OAAO,iBAAS,MAAM,YAAG,KAAK,GAAO,CAAA;IAC5E,OAAO,CACH,mCACqB,SAAS,KACtB,MAAM,YAET,KAAK,GACF,CACX,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -13,8 +13,8 @@ export const ListOptions = ({ options }) => (_jsx(_Fragment, { children: options
|
|
|
13
13
|
/*
|
|
14
14
|
* Anatomy and look are HeroUI's own: `Select.Trigger` holding `Select.Value` and `Select.Indicator`, `Select.Popover` holding a
|
|
15
15
|
* `ListBox` of items. The Grammar class names (`starci-core-select`, `-select-trigger`, `-select-indicator`, `-list-popover`,
|
|
16
|
-
* `-list`) are stamps a consumer or family stylesheet selects
|
|
17
|
-
*
|
|
16
|
+
* `-list`) are stamps a consumer or family stylesheet selects. Grammar sets the trigger's shared 2.5rem field-height floor to match Input
|
|
17
|
+
* (owner 2026-10-25), and the larger touch-target floor on a coarse pointer.
|
|
18
18
|
*/
|
|
19
19
|
/**
|
|
20
20
|
* A single choice from a closed list, opened from a field-shaped trigger.
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/** Identifies the joined disclosure-card outer shell. */
|
|
10
10
|
export declare const accordionCardClassName: string;
|
|
11
|
-
/** Selects bounded or
|
|
11
|
+
/** Selects bounded or unpainted disclosure surfaces. */
|
|
12
12
|
export declare const getAccordionShellClassName: (bounded: boolean) => import("tailwind-variants").CnReturn;
|
|
13
13
|
/** Keeps the HeroUI primitive full-width inside the Grammar-owned surface shell. */
|
|
14
14
|
export declare const accordionRootClassName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceAccordionCard/classNames.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,QAAmF,CAAA;AACtH,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,GAAI,SAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceAccordionCard/classNames.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AAEH,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,QAAmF,CAAA;AACtH,wDAAwD;AACxD,eAAO,MAAM,0BAA0B,GAAI,SAAS,OAAO,yCAI1D,CAAA;AACD,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,QAAmE,CAAA;AACtG,yFAAyF;AACzF,eAAO,MAAM,qBAAqB,QAAiE,CAAA;AACnG,kDAAkD;AAClD,eAAO,MAAM,yBAAyB,QAAyE,CAAA;AAC/G,iDAAiD;AACjD,eAAO,MAAM,yBAAyB,QAAyE,CAAA;AAC/G,4FAA4F;AAC5F,eAAO,MAAM,uBAAuB,QAAqE,CAAA;AACzG,uGAAuG;AACvG,eAAO,MAAM,sBAAsB,QAAmE,CAAA;AACtG,sDAAsD;AACtD,eAAO,MAAM,8BAA8B,QAAqF,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "@heroui/react";
|
|
2
|
-
import {
|
|
2
|
+
import { surfaceClassName } from "../SurfaceCard/classNames.js";
|
|
3
3
|
/**
|
|
4
4
|
* Disclosure-card geometry is SHIPPED.
|
|
5
5
|
*
|
|
@@ -10,8 +10,8 @@ import { getSurfaceFrameClassName } from "../SurfaceCard/classNames.js";
|
|
|
10
10
|
*/
|
|
11
11
|
/** Identifies the joined disclosure-card outer shell. */
|
|
12
12
|
export const accordionCardClassName = cn("starci-core-surface-accordion-card") ?? "starci-core-surface-accordion-card";
|
|
13
|
-
/** Selects bounded or
|
|
14
|
-
export const getAccordionShellClassName = (bounded) => cn("starci-core-accordion-shell",
|
|
13
|
+
/** Selects bounded or unpainted disclosure surfaces. */
|
|
14
|
+
export const getAccordionShellClassName = (bounded) => cn("starci-core-accordion-shell", surfaceClassName, bounded ? undefined : "starci-core-frameless-surface");
|
|
15
15
|
/** Keeps the HeroUI primitive full-width inside the Grammar-owned surface shell. */
|
|
16
16
|
export const accordionRootClassName = cn("starci-core-accordion-root") ?? "starci-core-accordion-root";
|
|
17
17
|
/** Identifies one HeroUI-owned disclosure row; the primitive owns sibling separators. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceAccordionCard/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceAccordionCard/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAE/D;;;;;;;GAOG;AAEH,yDAAyD;AACzD,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,oCAAoC,CAAC,IAAI,oCAAoC,CAAA;AACtH,wDAAwD;AACxD,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,OAAgB,EAAE,EAAE,CAAC,EAAE,CAC9D,6BAA6B,EAC7B,gBAAgB,EAChB,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CACxD,CAAA;AACD,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,4BAA4B,CAAC,IAAI,4BAA4B,CAAA;AACtG,yFAAyF;AACzF,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAC,2BAA2B,CAAC,IAAI,2BAA2B,CAAA;AACnG,kDAAkD;AAClD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC,+BAA+B,CAAC,IAAI,+BAA+B,CAAA;AAC/G,iDAAiD;AACjD,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC,+BAA+B,CAAC,IAAI,+BAA+B,CAAA;AAC/G,4FAA4F;AAC5F,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC,6BAA6B,CAAC,IAAI,6BAA6B,CAAA;AACzG,uGAAuG;AACvG,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,4BAA4B,CAAC,IAAI,4BAA4B,CAAA;AACtG,sDAAsD;AACtD,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC,qCAAqC,CAAC,IAAI,qCAAqC,CAAA"}
|
|
@@ -15,8 +15,8 @@ type SurfaceAccordionCardIdentityProps = {
|
|
|
15
15
|
readonly ariaLabel?: string;
|
|
16
16
|
};
|
|
17
17
|
type SurfaceAccordionCardCommonProps<Summary, Body> = SurfaceAccordionCardIdentityProps & {
|
|
18
|
-
/**
|
|
19
|
-
readonly
|
|
18
|
+
/** Bounded surfaces derive their depth from context; unpainted disclosures inherit the enclosing surface. */
|
|
19
|
+
readonly frame?: "bounded" | "unpainted";
|
|
20
20
|
/**
|
|
21
21
|
* Outline rank of the visible `label` (default 3). Pick the rank below the nearest heading
|
|
22
22
|
* above this surface so the page never skips a level.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceAccordionCard/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAY,KAAK,SAAS,EAAS,MAAM,OAAO,CAAA;AAGvD,OAAO,EAAwC,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAI/G,MAAM,MAAM,wBAAwB,CAAC,OAAO,EAAE,IAAI,IAAI;IAClD,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,OA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QAAQ,CAAC,UAAU,EAAE,IAAI,CAAA;IACzB,QAAQ,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAA;CACnD,CAAC,CAAA;AAoHF,qGAAqG;AACrG,eAAO,MAAM,oBAAoB,GAAI,OAAO,EAAE,IAAI,EAAE,OAAO,yBAAyB,CAAC,OAAO,EAAE,IAAI,CAAC,gCAgC9F,CAAA"}
|
|
@@ -3,13 +3,14 @@ import { createElement as _createElement } from "react";
|
|
|
3
3
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Accordion } from "@heroui/react";
|
|
5
5
|
import { useId } from "react";
|
|
6
|
-
import { SurfaceNesting } from "../../surfaceContext.js";
|
|
6
|
+
import { SurfaceNesting, useSurfaceNesting } from "../../surfaceContext.js";
|
|
7
7
|
import { VerticalScrollRegion } from "../../composite/VerticalScrollRegion/index.js";
|
|
8
8
|
import { DEFAULT_SURFACE_HEADING_LEVEL, Label } from "../../primitive/Label/index.js";
|
|
9
9
|
import { surfaceLabelClassName } from "../SurfaceCard/classNames.js";
|
|
10
10
|
import { accordionBodyClassName, accordionCardClassName, accordionHeadingClassName, accordionPanelClassName, accordionRootClassName, accordionRowClassName, accordionScrollRegionClassName, getAccordionShellClassName, accordionTriggerClassName } from "./classNames.js";
|
|
11
|
-
const SurfaceAccordionRows = ({ label, ariaLabel,
|
|
12
|
-
const bounded =
|
|
11
|
+
const SurfaceAccordionRows = ({ label, ariaLabel, frame = "bounded", headingLevel = DEFAULT_SURFACE_HEADING_LEVEL, items, renderSummary, renderBody, onItemOpenChange, isScrollable = false, }) => {
|
|
12
|
+
const bounded = frame === "bounded";
|
|
13
|
+
const depth = useSurfaceNesting() ? "nested" : "top";
|
|
13
14
|
const headingId = useId();
|
|
14
15
|
const accessibleName = ariaLabel ?? label;
|
|
15
16
|
const expandedKeys = new Set(items.filter((item) => item.isOpen).map((item) => item.id));
|
|
@@ -21,25 +22,25 @@ const SurfaceAccordionRows = ({ label, ariaLabel, depth, headingLevel = DEFAULT_
|
|
|
21
22
|
onItemOpenChange(item.id, nextOpen);
|
|
22
23
|
}
|
|
23
24
|
};
|
|
24
|
-
const content = (_jsxs("section", { className: accordionCardClassName, "data-grammar-surface-accordion-card": "true", "data-grammar-nesting": "surface", "data-component": "SurfaceAccordionCard", "data-tier": "branch", children: [label === undefined ? null : (_jsx("div", { className: surfaceLabelClassName, "data-contract": "GAP-2", "data-grammar-surface-label": "true", children: _jsx(Label, { as: `h${headingLevel}`, depth: depth
|
|
25
|
+
const content = (_jsxs("section", { className: accordionCardClassName, "data-grammar-surface-accordion-card": bounded ? "true" : undefined, "data-grammar-nesting": bounded ? "surface" : undefined, "data-component": "SurfaceAccordionCard", "data-tier": "branch", children: [label === undefined ? null : (_jsx("div", { className: surfaceLabelClassName, "data-contract": "GAP-2", "data-grammar-surface-label": "true", children: _jsx(Label, { as: `h${headingLevel}`, depth: depth, id: headingId, children: label }) })), _jsx("div", { "aria-label": label === undefined ? accessibleName : undefined, "aria-labelledby": label === undefined ? undefined : headingId, className: getAccordionShellClassName(bounded), "data-contract": [
|
|
25
26
|
bounded ? "SURFACE-2" : "SURFACE-1",
|
|
26
27
|
bounded ? "OVERFLOW-2" : "OVERFLOW-1 OVERFLOW-2",
|
|
27
|
-
depth === "nested" ? "BOUNDARY-5" :
|
|
28
|
-
].filter(Boolean).join(" "), "data-grammar-accordion-shell": "true", "data-grammar-frame":
|
|
28
|
+
bounded ? depth === "nested" ? "BOUNDARY-5" : "BOUNDARY-6" : undefined,
|
|
29
|
+
].filter(Boolean).join(" "), "data-grammar-accordion-shell": "true", "data-grammar-frame": frame, "data-grammar-scroll": isScrollable ? "contained" : "page", "data-grammar-surface": bounded ? "true" : undefined, "data-grammar-surface-depth": bounded ? depth : undefined, "data-surface-context": bounded ? depth === "nested" ? "nested" : "page" : undefined, children: _jsx(VerticalScrollRegion, { className: accordionScrollRegionClassName, isScrollable: isScrollable, ...(isScrollable ? (label === undefined ? (accessibleName === undefined ? {} : { "aria-label": accessibleName }) : { "aria-labelledby": headingId }) : {}), children: _jsx(Accordion.Root, { allowsMultipleExpanded: true, className: accordionRootClassName ?? "", expandedKeys: expandedKeys, onExpandedChange: onExpandedChange, children: items.map((item) => {
|
|
29
30
|
return (_createElement(Accordion.Item, { className: accordionRowClassName ?? "", "data-contract": "BOUNDARY-3", "data-grammar-accordion-row": "true", "data-grammar-disclosure-state": item.isOpen ? "open" : "closed", id: item.id, ...(item.isDisabled === undefined ? {} : { isDisabled: item.isDisabled }), key: item.id },
|
|
30
31
|
_jsx(Accordion.Heading, { className: accordionHeadingClassName ?? "", "data-contract": "MARGIN-0", children: _jsx(Accordion.Trigger, { className: accordionTriggerClassName ?? "", "data-contract": "PADDING-4", children: renderSummary(item.summaryRender) }) }),
|
|
31
32
|
_jsx(Accordion.Panel, { className: accordionPanelClassName ?? "", "data-contract": "PADDING-0", role: "region", children: _jsx(Accordion.Body, { children: _jsx("div", { className: accordionBodyClassName ?? "", "data-contract": "PADDING-0 PADDING-3 PADDING-4 PADDING-5 TONE-1", children: renderBody(item.bodyRender) }) }) })));
|
|
32
33
|
}) }) }) })] }));
|
|
33
|
-
return _jsx(SurfaceNesting, { children: content });
|
|
34
|
+
return bounded ? _jsx(SurfaceNesting, { children: content }) : content;
|
|
34
35
|
};
|
|
35
36
|
/** Draw one full-width joined disclosure surface whose reusable anatomy is owned by Core Grammar. */
|
|
36
37
|
export const SurfaceAccordionCard = (props) => props.items === undefined
|
|
37
|
-
? (_jsx(SurfaceAccordionRows, { ...(props.label === undefined ? {} : { label: props.label }), ...(props.ariaLabel === undefined ? {} : { ariaLabel: props.ariaLabel }), ...(props.
|
|
38
|
+
? (_jsx(SurfaceAccordionRows, { ...(props.label === undefined ? {} : { label: props.label }), ...(props.ariaLabel === undefined ? {} : { ariaLabel: props.ariaLabel }), ...(props.frame === undefined ? {} : { frame: props.frame }), ...(props.headingLevel === undefined ? {} : { headingLevel: props.headingLevel }), items: [{
|
|
38
39
|
id: "surface-accordion-item",
|
|
39
40
|
isOpen: props.isOpen,
|
|
40
41
|
...(props.isDisabled === undefined ? {} : { isDisabled: props.isDisabled }),
|
|
41
42
|
summaryRender: props.summaryRender,
|
|
42
43
|
bodyRender: props.bodyRender,
|
|
43
44
|
}], renderSummary: props.renderSummary, renderBody: props.renderBody, onItemOpenChange: (_id, isOpen) => props.onOpenChange(isOpen), ...(props.isScrollable === undefined ? {} : { isScrollable: props.isScrollable }) }))
|
|
44
|
-
: (_jsx(SurfaceAccordionRows, { ...(props.label === undefined ? {} : { label: props.label }), ...(props.ariaLabel === undefined ? {} : { ariaLabel: props.ariaLabel }), ...(props.
|
|
45
|
+
: (_jsx(SurfaceAccordionRows, { ...(props.label === undefined ? {} : { label: props.label }), ...(props.ariaLabel === undefined ? {} : { ariaLabel: props.ariaLabel }), ...(props.frame === undefined ? {} : { frame: props.frame }), ...(props.headingLevel === undefined ? {} : { headingLevel: props.headingLevel }), items: props.items, renderSummary: props.renderSummary, renderBody: props.renderBody, onItemOpenChange: props.onItemOpenChange, ...(props.isScrollable === undefined ? {} : { isScrollable: props.isScrollable }) }));
|
|
45
46
|
//# sourceMappingURL=index.js.map
|