@starci/grammar 0.2.0 → 0.4.1
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 +54 -30
- package/dist/common/conformance.d.ts +31 -0
- package/dist/common/conformance.d.ts.map +1 -0
- package/dist/common/conformance.js +33 -0
- package/dist/common/conformance.js.map +1 -0
- package/dist/common/index.d.ts +5 -73
- package/dist/common/index.d.ts.map +1 -1
- package/dist/common/index.js +5 -202
- package/dist/common/index.js.map +1 -1
- package/dist/common/registry.d.ts +79 -0
- package/dist/common/registry.d.ts.map +1 -0
- package/dist/common/registry.js +34 -0
- package/dist/common/registry.js.map +1 -0
- package/dist/common/renderers.d.ts +41 -0
- package/dist/common/renderers.d.ts.map +1 -0
- package/dist/common/renderers.js +44 -0
- package/dist/common/renderers.js.map +1 -0
- package/dist/common/rule-catalog.generated.d.ts +40 -0
- package/dist/common/rule-catalog.generated.d.ts.map +1 -0
- package/dist/common/rule-catalog.generated.js +230 -0
- package/dist/common/rule-catalog.generated.js.map +1 -0
- package/dist/common/spacing.d.ts +20 -0
- package/dist/common/spacing.d.ts.map +1 -0
- package/dist/common/spacing.js +18 -0
- package/dist/common/spacing.js.map +1 -0
- package/dist/common/state.d.ts +6 -0
- package/dist/common/state.d.ts.map +1 -0
- package/dist/common/state.js +11 -0
- package/dist/common/state.js.map +1 -0
- package/dist/common/styles.css +1566 -2
- package/dist/core/LeadingNumber.d.ts +12 -0
- package/dist/core/LeadingNumber.d.ts.map +1 -0
- package/dist/core/LeadingNumber.js +10 -0
- package/dist/core/LeadingNumber.js.map +1 -0
- package/dist/core/OtpInput.d.ts +12 -0
- package/dist/core/OtpInput.d.ts.map +1 -0
- package/dist/core/OtpInput.js +22 -0
- package/dist/core/OtpInput.js.map +1 -0
- package/dist/core/StateMark.d.ts +3 -5
- package/dist/core/StateMark.d.ts.map +1 -1
- package/dist/core/StateMark.js +3 -3
- package/dist/core/StateMark.js.map +1 -1
- package/dist/core/branch/MarkdownArticle/classNames.d.ts +9 -0
- package/dist/core/branch/MarkdownArticle/classNames.d.ts.map +1 -0
- package/dist/core/branch/MarkdownArticle/classNames.js +10 -0
- package/dist/core/branch/MarkdownArticle/classNames.js.map +1 -0
- package/dist/core/branch/MarkdownArticle/index.d.ts +30 -0
- package/dist/core/branch/MarkdownArticle/index.d.ts.map +1 -0
- package/dist/core/branch/MarkdownArticle/index.js +12 -0
- package/dist/core/branch/MarkdownArticle/index.js.map +1 -0
- package/dist/core/branch/Rail/classNames.d.ts +9 -0
- package/dist/core/branch/Rail/classNames.d.ts.map +1 -0
- package/dist/core/branch/Rail/classNames.js +10 -0
- package/dist/core/branch/Rail/classNames.js.map +1 -0
- package/dist/core/branch/Rail/index.d.ts +7 -6
- package/dist/core/branch/Rail/index.d.ts.map +1 -1
- package/dist/core/branch/Rail/index.js +16 -5
- package/dist/core/branch/Rail/index.js.map +1 -1
- package/dist/core/branch/Subnav/classNames.d.ts +8 -0
- package/dist/core/branch/Subnav/classNames.d.ts.map +1 -0
- package/dist/core/branch/Subnav/classNames.js +9 -0
- package/dist/core/branch/Subnav/classNames.js.map +1 -0
- package/dist/core/branch/Subnav/index.d.ts +17 -0
- package/dist/core/branch/Subnav/index.d.ts.map +1 -0
- package/dist/core/branch/Subnav/index.js +6 -0
- package/dist/core/branch/Subnav/index.js.map +1 -0
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts +19 -0
- package/dist/core/branch/SurfaceAccordionCard/classNames.d.ts.map +1 -0
- package/dist/core/branch/SurfaceAccordionCard/classNames.js +21 -0
- package/dist/core/branch/SurfaceAccordionCard/classNames.js.map +1 -0
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts +44 -0
- package/dist/core/branch/SurfaceAccordionCard/index.d.ts.map +1 -0
- package/dist/core/branch/SurfaceAccordionCard/index.js +42 -0
- package/dist/core/branch/SurfaceAccordionCard/index.js.map +1 -0
- package/dist/core/branch/SurfaceCard/classNames.d.ts +23 -0
- package/dist/core/branch/SurfaceCard/classNames.d.ts.map +1 -0
- package/dist/core/branch/SurfaceCard/classNames.js +23 -0
- package/dist/core/branch/SurfaceCard/classNames.js.map +1 -0
- package/dist/core/branch/SurfaceCard/index.d.ts +14 -7
- package/dist/core/branch/SurfaceCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceCard/index.js +18 -4
- package/dist/core/branch/SurfaceCard/index.js.map +1 -1
- package/dist/core/branch/SurfaceListCard/classNames.d.ts +13 -0
- package/dist/core/branch/SurfaceListCard/classNames.d.ts.map +1 -0
- package/dist/core/branch/SurfaceListCard/classNames.js +14 -0
- package/dist/core/branch/SurfaceListCard/classNames.js.map +1 -0
- package/dist/core/branch/SurfaceListCard/index.d.ts +5 -19
- package/dist/core/branch/SurfaceListCard/index.d.ts.map +1 -1
- package/dist/core/branch/SurfaceListCard/index.js +6 -8
- package/dist/core/branch/SurfaceListCard/index.js.map +1 -1
- package/dist/core/branch/Tabs/classNames.d.ts +11 -0
- package/dist/core/branch/Tabs/classNames.d.ts.map +1 -0
- package/dist/core/branch/Tabs/classNames.js +13 -0
- package/dist/core/branch/Tabs/classNames.js.map +1 -0
- package/dist/core/branch/Tabs/index.d.ts +22 -0
- package/dist/core/branch/Tabs/index.d.ts.map +1 -0
- package/dist/core/branch/Tabs/index.js +28 -0
- package/dist/core/branch/Tabs/index.js.map +1 -0
- package/dist/core/branch/Tooltip/classNames.d.ts +3 -0
- package/dist/core/branch/Tooltip/classNames.d.ts.map +1 -0
- package/dist/core/branch/Tooltip/classNames.js +4 -0
- package/dist/core/branch/Tooltip/classNames.js.map +1 -0
- package/dist/core/branch/Tooltip/index.d.ts +18 -0
- package/dist/core/branch/Tooltip/index.d.ts.map +1 -0
- package/dist/core/branch/Tooltip/index.js +14 -0
- package/dist/core/branch/Tooltip/index.js.map +1 -0
- package/dist/core/classNames.d.ts +23 -0
- package/dist/core/classNames.d.ts.map +1 -0
- package/dist/core/classNames.js +24 -0
- package/dist/core/classNames.js.map +1 -0
- package/dist/core/composite/EmptyNotice/index.d.ts +17 -0
- package/dist/core/composite/EmptyNotice/index.d.ts.map +1 -0
- package/dist/core/composite/EmptyNotice/index.js +7 -0
- package/dist/core/composite/EmptyNotice/index.js.map +1 -0
- package/dist/core/composite/HorizontalScrollRegion/index.d.ts +9 -0
- package/dist/core/composite/HorizontalScrollRegion/index.d.ts.map +1 -0
- package/dist/core/composite/HorizontalScrollRegion/index.js +10 -0
- package/dist/core/composite/HorizontalScrollRegion/index.js.map +1 -0
- package/dist/core/composite/StaticStateRow/index.d.ts +1 -5
- package/dist/core/composite/StaticStateRow/index.d.ts.map +1 -1
- package/dist/core/composite/StaticStateRow/index.js +4 -3
- package/dist/core/composite/StaticStateRow/index.js.map +1 -1
- package/dist/core/composite/VerticalScrollRegion/index.d.ts +10 -0
- package/dist/core/composite/VerticalScrollRegion/index.d.ts.map +1 -0
- package/dist/core/composite/VerticalScrollRegion/index.js +10 -0
- package/dist/core/composite/VerticalScrollRegion/index.js.map +1 -0
- package/dist/core/composition/ChatWorkspace/classNames.d.ts +30 -0
- package/dist/core/composition/ChatWorkspace/classNames.d.ts.map +1 -0
- package/dist/core/composition/ChatWorkspace/classNames.js +31 -0
- package/dist/core/composition/ChatWorkspace/classNames.js.map +1 -0
- package/dist/core/composition/ChatWorkspace/index.d.ts +48 -0
- package/dist/core/composition/ChatWorkspace/index.d.ts.map +1 -0
- package/dist/core/composition/ChatWorkspace/index.js +40 -0
- package/dist/core/composition/ChatWorkspace/index.js.map +1 -0
- package/dist/core/composition/NavigationFeatureNav/classNames.d.ts +9 -0
- package/dist/core/composition/NavigationFeatureNav/classNames.d.ts.map +1 -0
- package/dist/core/composition/NavigationFeatureNav/classNames.js +10 -0
- package/dist/core/composition/NavigationFeatureNav/classNames.js.map +1 -0
- package/dist/core/composition/NavigationFeatureNav/index.d.ts +26 -0
- package/dist/core/composition/NavigationFeatureNav/index.d.ts.map +1 -0
- package/dist/core/composition/NavigationFeatureNav/index.js +13 -0
- package/dist/core/composition/NavigationFeatureNav/index.js.map +1 -0
- package/dist/core/composition/PrimaryRailLayout/index.d.ts +14 -0
- package/dist/core/composition/PrimaryRailLayout/index.d.ts.map +1 -0
- package/dist/core/composition/PrimaryRailLayout/index.js +8 -0
- package/dist/core/composition/PrimaryRailLayout/index.js.map +1 -0
- package/dist/core/composition/Sidebar/index.d.ts +31 -0
- package/dist/core/composition/Sidebar/index.d.ts.map +1 -0
- package/dist/core/composition/Sidebar/index.js +40 -0
- package/dist/core/composition/Sidebar/index.js.map +1 -0
- package/dist/core/composition/WorkspaceShell/classNames.d.ts +11 -0
- package/dist/core/composition/WorkspaceShell/classNames.d.ts.map +1 -0
- package/dist/core/composition/WorkspaceShell/classNames.js +12 -0
- package/dist/core/composition/WorkspaceShell/classNames.js.map +1 -0
- package/dist/core/composition/WorkspaceShell/index.d.ts +67 -0
- package/dist/core/composition/WorkspaceShell/index.d.ts.map +1 -0
- package/dist/core/composition/WorkspaceShell/index.js +20 -0
- package/dist/core/composition/WorkspaceShell/index.js.map +1 -0
- package/dist/core/dna.d.ts +180 -0
- package/dist/core/dna.d.ts.map +1 -0
- package/dist/core/dna.js +175 -0
- package/dist/core/dna.js.map +1 -0
- package/dist/core/index.d.ts +59 -10
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +27 -10
- package/dist/core/index.js.map +1 -1
- package/dist/core/primitive/Badge/index.d.ts +12 -0
- package/dist/core/primitive/Badge/index.d.ts.map +1 -0
- package/dist/core/primitive/Badge/index.js +15 -0
- package/dist/core/primitive/Badge/index.js.map +1 -0
- package/dist/core/primitive/Button/index.d.ts +52 -0
- package/dist/core/primitive/Button/index.d.ts.map +1 -0
- package/dist/core/primitive/Button/index.js +26 -0
- package/dist/core/primitive/Button/index.js.map +1 -0
- package/dist/core/primitive/Divider/index.d.ts +7 -0
- package/dist/core/primitive/Divider/index.d.ts.map +1 -0
- package/dist/core/primitive/Divider/index.js +5 -0
- package/dist/core/primitive/Divider/index.js.map +1 -0
- package/dist/core/primitive/GrammarRoot/index.d.ts +10 -0
- package/dist/core/primitive/GrammarRoot/index.d.ts.map +1 -0
- package/dist/core/primitive/GrammarRoot/index.js +5 -0
- package/dist/core/primitive/GrammarRoot/index.js.map +1 -0
- package/dist/core/primitive/Heading/index.d.ts +15 -0
- package/dist/core/primitive/Heading/index.d.ts.map +1 -0
- package/dist/core/primitive/Heading/index.js +26 -0
- package/dist/core/primitive/Heading/index.js.map +1 -0
- package/dist/core/primitive/Icon/index.d.ts +31 -0
- package/dist/core/primitive/Icon/index.d.ts.map +1 -0
- package/dist/core/primitive/Icon/index.js +23 -0
- package/dist/core/primitive/Icon/index.js.map +1 -0
- package/dist/core/primitive/IconButton/index.d.ts +13 -0
- package/dist/core/primitive/IconButton/index.d.ts.map +1 -0
- package/dist/core/primitive/IconButton/index.js +9 -0
- package/dist/core/primitive/IconButton/index.js.map +1 -0
- package/dist/core/primitive/IconTile/index.d.ts +17 -0
- package/dist/core/primitive/IconTile/index.d.ts.map +1 -0
- package/dist/core/primitive/IconTile/index.js +32 -0
- package/dist/core/primitive/IconTile/index.js.map +1 -0
- package/dist/core/primitive/IncludedMark/index.d.ts +10 -0
- package/dist/core/primitive/IncludedMark/index.d.ts.map +1 -0
- package/dist/core/primitive/IncludedMark/index.js +8 -0
- package/dist/core/primitive/IncludedMark/index.js.map +1 -0
- package/dist/core/primitive/Input/index.d.ts +31 -0
- package/dist/core/primitive/Input/index.d.ts.map +1 -0
- package/dist/core/primitive/Input/index.js +27 -0
- package/dist/core/primitive/Input/index.js.map +1 -0
- package/dist/core/primitive/Label/classNames.d.ts +12 -0
- package/dist/core/primitive/Label/classNames.d.ts.map +1 -0
- package/dist/core/primitive/Label/classNames.js +13 -0
- package/dist/core/primitive/Label/classNames.js.map +1 -0
- package/dist/core/primitive/Label/index.d.ts +11 -0
- package/dist/core/primitive/Label/index.d.ts.map +1 -0
- package/dist/core/primitive/Label/index.js +14 -0
- package/dist/core/primitive/Label/index.js.map +1 -0
- package/dist/core/primitive/MediaFrame/index.d.ts +15 -0
- package/dist/core/primitive/MediaFrame/index.d.ts.map +1 -0
- package/dist/core/primitive/MediaFrame/index.js +8 -0
- package/dist/core/primitive/MediaFrame/index.js.map +1 -0
- package/dist/core/primitive/PageContainer/index.d.ts +9 -0
- package/dist/core/primitive/PageContainer/index.d.ts.map +1 -0
- package/dist/core/primitive/PageContainer/index.js +8 -0
- package/dist/core/primitive/PageContainer/index.js.map +1 -0
- package/dist/core/primitive/Progress/index.d.ts +11 -0
- package/dist/core/primitive/Progress/index.d.ts.map +1 -0
- package/dist/core/primitive/Progress/index.js +13 -0
- package/dist/core/primitive/Progress/index.js.map +1 -0
- package/dist/core/primitive/RankArtwork/index.d.ts +12 -0
- package/dist/core/primitive/RankArtwork/index.d.ts.map +1 -0
- package/dist/core/primitive/RankArtwork/index.js +14 -0
- package/dist/core/primitive/RankArtwork/index.js.map +1 -0
- package/dist/core/primitive/SectionHeader/index.d.ts +15 -0
- package/dist/core/primitive/SectionHeader/index.d.ts.map +1 -0
- package/dist/core/primitive/SectionHeader/index.js +6 -0
- package/dist/core/primitive/SectionHeader/index.js.map +1 -0
- package/dist/core/primitive/SurfaceCopyGroup/index.d.ts +7 -0
- package/dist/core/primitive/SurfaceCopyGroup/index.d.ts.map +1 -0
- package/dist/core/primitive/SurfaceCopyGroup/index.js +5 -0
- package/dist/core/primitive/SurfaceCopyGroup/index.js.map +1 -0
- package/dist/core/primitive/Text/index.d.ts +25 -0
- package/dist/core/primitive/Text/index.d.ts.map +1 -0
- package/dist/core/primitive/Text/index.js +57 -0
- package/dist/core/primitive/Text/index.js.map +1 -0
- package/dist/core/primitive/TextAction/index.d.ts +45 -0
- package/dist/core/primitive/TextAction/index.d.ts.map +1 -0
- package/dist/core/primitive/TextAction/index.js +112 -0
- package/dist/core/primitive/TextAction/index.js.map +1 -0
- package/dist/core/primitive/actionStyles.d.ts +5 -0
- package/dist/core/primitive/actionStyles.d.ts.map +1 -0
- package/dist/core/primitive/actionStyles.js +19 -0
- package/dist/core/primitive/actionStyles.js.map +1 -0
- package/dist/core/state.d.ts +4 -4
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +4 -4
- package/dist/core/state.js.map +1 -1
- package/dist/core/styles.css +152 -225
- package/dist/heritage/index.d.ts +27 -0
- package/dist/heritage/index.d.ts.map +1 -0
- package/dist/heritage/index.js +44 -0
- package/dist/heritage/index.js.map +1 -0
- package/dist/heritage/styles.css +165 -0
- package/dist/offset-pop/index.d.ts +9 -263
- package/dist/offset-pop/index.d.ts.map +1 -1
- package/dist/offset-pop/index.js +35 -63
- package/dist/offset-pop/index.js.map +1 -1
- package/dist/offset-pop/styles.css +292 -393
- package/package.json +78 -72
- package/dist/core/contracts.d.ts +0 -190
- package/dist/core/contracts.d.ts.map +0 -1
- package/dist/core/contracts.js +0 -145
- package/dist/core/contracts.js.map +0 -1
- package/dist/core/grammar.d.ts +0 -18
- package/dist/core/grammar.d.ts.map +0 -1
- package/dist/core/grammar.js +0 -27
- package/dist/core/grammar.js.map +0 -1
- package/dist/core/layout.d.ts +0 -9
- package/dist/core/layout.d.ts.map +0 -1
- package/dist/core/layout.js +0 -43
- package/dist/core/layout.js.map +0 -1
- package/dist/core/rules.d.ts +0 -63
- package/dist/core/rules.d.ts.map +0 -1
- package/dist/core/rules.js +0 -66
- package/dist/core/rules.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type SurfaceCardMeasure = "content" | "form" | "formCompact";
|
|
2
|
+
export type SurfaceCardHeight = "auto" | "fill";
|
|
3
|
+
/** Identifies the outer labelled surface-card anatomy. */
|
|
4
|
+
export declare const surfaceCardClassName: import("tailwind-variants").CnReturn;
|
|
5
|
+
/** Selects an owned measure and height contract without exposing structural class hooks to consumers. */
|
|
6
|
+
export declare const getSurfaceCardClassName: (measure: SurfaceCardMeasure, height: SurfaceCardHeight) => import("tailwind-variants").CnReturn;
|
|
7
|
+
/** Identifies the external label row of a surface card. */
|
|
8
|
+
export declare const surfaceLabelClassName: import("tailwind-variants").CnReturn;
|
|
9
|
+
/** Identifies the bounded surface content shell. */
|
|
10
|
+
export declare const surfaceClassName: import("tailwind-variants").CnReturn;
|
|
11
|
+
/** Frameless surfaces let nested bounded cards own clipping; Core CSS sets overflow: visible. */
|
|
12
|
+
export declare const framelessSurfaceClassName: import("tailwind-variants").CnReturn;
|
|
13
|
+
/** Identifies the content region inside a surface. */
|
|
14
|
+
export declare const surfaceContentClassName: import("tailwind-variants").CnReturn;
|
|
15
|
+
/** Binds the form-scroll measure to the Grammar-owned scroll viewport only when it exists. */
|
|
16
|
+
export declare const getSurfaceContentClassName: (measure: SurfaceCardMeasure, contained: boolean) => import("tailwind-variants").CnReturn;
|
|
17
|
+
/** Anchor the singular legacy continuation highlight at the surface boundary. */
|
|
18
|
+
export declare const surfaceHighlightClassName: import("tailwind-variants").CnReturn;
|
|
19
|
+
/** Decorative sweep layer painted behind the highlighted surface. */
|
|
20
|
+
export declare const surfaceHighlightSweepClassName: import("tailwind-variants").CnReturn;
|
|
21
|
+
/** Selects the bounded or frameless surface treatment without changing anatomy. */
|
|
22
|
+
export declare const getSurfaceFrameClassName: (frame: "bounded" | "frameless") => import("tailwind-variants").CnReturn;
|
|
23
|
+
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceCard/classNames.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,MAAM,GAAG,aAAa,CAAA;AACnE,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAA;AAE/C,0DAA0D;AAC1D,eAAO,MAAM,oBAAoB,sCAAgE,CAAA;AACjG,yGAAyG;AACzG,eAAO,MAAM,uBAAuB,GAAI,SAAS,kBAAkB,EAAE,QAAQ,iBAAiB,yCAK7F,CAAA;AACD,2DAA2D;AAC3D,eAAO,MAAM,qBAAqB,sCAAyC,CAAA;AAC3E,oDAAoD;AACpD,eAAO,MAAM,gBAAgB,sCAAiE,CAAA;AAC9F,iGAAiG;AACjG,eAAO,MAAM,yBAAyB,sCAAmG,CAAA;AACzI,sDAAsD;AACtD,eAAO,MAAM,uBAAuB,sCAA+C,CAAA;AACnF,8FAA8F;AAC9F,eAAO,MAAM,0BAA0B,GAAI,SAAS,kBAAkB,EAAE,WAAW,OAAO,yCAGzF,CAAA;AACD,iFAAiF;AACjF,eAAO,MAAM,yBAAyB,sCAA4D,CAAA;AAClG,qEAAqE;AACrE,eAAO,MAAM,8BAA8B,sCAA4C,CAAA;AAEvF,mFAAmF;AACnF,eAAO,MAAM,wBAAwB,GAAI,OAAO,SAAS,GAAG,WAAW,yCAItE,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "@heroui/react";
|
|
2
|
+
import { formCompactSurfaceClassName, formScrollViewportClassName, formSurfaceClassName, } from "../../classNames.js";
|
|
3
|
+
/** Identifies the outer labelled surface-card anatomy. */
|
|
4
|
+
export const surfaceCardClassName = cn("starci-core-surface-card", "flex", "min-w-0", "flex-col");
|
|
5
|
+
/** Selects an owned measure and height contract without exposing structural class hooks to consumers. */
|
|
6
|
+
export const getSurfaceCardClassName = (measure, height) => cn(surfaceCardClassName, measure === "form" || measure === "formCompact" ? formSurfaceClassName : undefined, measure === "formCompact" ? formCompactSurfaceClassName : undefined, height === "fill" ? "starci-core-surface-card--fill" : undefined);
|
|
7
|
+
/** Identifies the external label row of a surface card. */
|
|
8
|
+
export const surfaceLabelClassName = cn("starci-core-surface-label", "p-0");
|
|
9
|
+
/** Identifies the bounded surface content shell. */
|
|
10
|
+
export const surfaceClassName = cn("starci-core-surface", "min-w-0", "overflow-hidden", "p-0");
|
|
11
|
+
/** Frameless surfaces let nested bounded cards own clipping; Core CSS sets overflow: visible. */
|
|
12
|
+
export const framelessSurfaceClassName = cn("starci-core-surface", "starci-core-frameless-surface", "min-w-0", "overflow-visible", "p-0");
|
|
13
|
+
/** Identifies the content region inside a surface. */
|
|
14
|
+
export const surfaceContentClassName = cn("starci-core-surface-content", "min-w-0");
|
|
15
|
+
/** Binds the form-scroll measure to the Grammar-owned scroll viewport only when it exists. */
|
|
16
|
+
export const getSurfaceContentClassName = (measure, contained) => cn(surfaceContentClassName, contained && (measure === "form" || measure === "formCompact") ? formScrollViewportClassName : undefined);
|
|
17
|
+
/** Anchor the singular legacy continuation highlight at the surface boundary. */
|
|
18
|
+
export const surfaceHighlightClassName = cn("starci-core-surface-highlight", "relative", "h-full");
|
|
19
|
+
/** Decorative sweep layer painted behind the highlighted surface. */
|
|
20
|
+
export const surfaceHighlightSweepClassName = cn("starci-core-surface-highlight-sweep");
|
|
21
|
+
/** Selects the bounded or frameless surface treatment without changing anatomy. */
|
|
22
|
+
export const getSurfaceFrameClassName = (frame) => cn(frame === "frameless" ? framelessSurfaceClassName : surfaceClassName, frame === "frameless" ? "border-0" : undefined, frame === "frameless" ? "shadow-none" : undefined);
|
|
23
|
+
//# sourceMappingURL=classNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceCard/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EACH,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,GACvB,MAAM,qBAAqB,CAAA;AAK5B,0DAA0D;AAC1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC,0BAA0B,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AACjG,yGAAyG;AACzG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,OAA2B,EAAE,MAAyB,EAAE,EAAE,CAAC,EAAE,CACjG,oBAAoB,EACpB,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,aAAa,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC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C,CAAC,CAAC,gBAAgB,EACpE,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,EAC9C,KAAK,KAAK,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,CACpD,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import { type PresentationState } from "../../state.js";
|
|
3
|
+
import { type SurfaceCardHeight, type SurfaceCardMeasure } from "./classNames.js";
|
|
3
4
|
export type WholeCardAction = {
|
|
4
5
|
readonly kind: "link";
|
|
5
6
|
readonly href: string;
|
|
@@ -15,7 +16,8 @@ type LabelledSurfaceCard = {
|
|
|
15
16
|
};
|
|
16
17
|
type SelfNamedSurfaceCard = {
|
|
17
18
|
readonly label?: undefined;
|
|
18
|
-
|
|
19
|
+
/** Optional when the surrounding semantic owner already names this purely visual boundary. */
|
|
20
|
+
readonly ariaLabel?: string;
|
|
19
21
|
};
|
|
20
22
|
export type SurfaceCardProps = (LabelledSurfaceCard | SelfNamedSurfaceCard) & {
|
|
21
23
|
readonly children: ReactNode;
|
|
@@ -29,12 +31,17 @@ export type SurfaceCardProps = (LabelledSurfaceCard | SelfNamedSurfaceCard) & {
|
|
|
29
31
|
readonly frame?: "bounded" | "frameless";
|
|
30
32
|
/** Contained content has exactly one internal scroll owner. */
|
|
31
33
|
readonly scroll?: "page" | "contained";
|
|
34
|
+
/** Convenience capability: make the content region a HeroUI Vertical ScrollShadow. */
|
|
35
|
+
readonly isScrollable?: boolean;
|
|
36
|
+
/** One inset block or multiple touching child faces separated inside the card. */
|
|
37
|
+
readonly composition?: "single" | "joined";
|
|
38
|
+
/** Grammar-owned width contract for ordinary content or compact form surfaces. */
|
|
39
|
+
readonly measure?: SurfaceCardMeasure;
|
|
40
|
+
/** Let a peer grid stretch the complete surface anatomy without consumer descendant selectors. */
|
|
41
|
+
readonly height?: SurfaceCardHeight;
|
|
42
|
+
/** Draw one legacy accent sweep behind this surface; use for one featured card only. */
|
|
43
|
+
readonly isHighlight?: boolean;
|
|
32
44
|
};
|
|
33
|
-
export declare const SurfaceCard: (
|
|
34
|
-
export declare const meta: {
|
|
35
|
-
readonly shape: "branch";
|
|
36
|
-
readonly grammar: "core";
|
|
37
|
-
readonly contract: "core.branch.surface-card";
|
|
38
|
-
};
|
|
45
|
+
export declare const SurfaceCard: (props: SurfaceCardProps) => import("react").JSX.Element;
|
|
39
46
|
export {};
|
|
40
47
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceCard/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceCard/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAyC,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAG9F,OAAO,EAOH,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAC1B,MAAM,iBAAiB,CAAA;AAExB,MAAM,MAAM,eAAe,GACrB;IACE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACzB,GACC;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,IAAI,CAAA;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACzB,CAAA;AAEL,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,KAAK,oBAAoB,GAAG;IACxB,QAAQ,CA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resentationState, treatmentFor } from "../../state.js";
|
|
4
|
-
|
|
5
|
+
import { VerticalScrollRegion } from "../../composite/VerticalScrollRegion/index.js";
|
|
6
|
+
import { Label } from "../../primitive/Label/index.js";
|
|
7
|
+
import { getSurfaceCardClassName, getSurfaceContentClassName, getSurfaceFrameClassName, surfaceHighlightClassName, surfaceHighlightSweepClassName, surfaceLabelClassName, } from "./classNames.js";
|
|
8
|
+
export const SurfaceCard = (props) => {
|
|
9
|
+
const { label, ariaLabel, children, fact, labelEnd, depth = "top", state = "neutral", wholeAction, frame = "bounded", scroll = "page", isScrollable = false, composition = "single", measure = "content", height = "auto", isHighlight = false, } = props;
|
|
5
10
|
assertPresentationState(state);
|
|
6
11
|
const headingId = useId();
|
|
7
12
|
const treatment = treatmentFor(state);
|
|
8
13
|
const disabled = state === "unavailable" || state === "pending";
|
|
9
14
|
const accessibleName = ariaLabel ?? label;
|
|
15
|
+
const contained = isScrollable || scroll === "contained";
|
|
16
|
+
const compositionContract = composition === "joined" ? "GAP-0 PADDING-0" : "PADDING-4";
|
|
17
|
+
const contentContract = [
|
|
18
|
+
frame === "frameless" ? "SURFACE-1" : "SURFACE-2",
|
|
19
|
+
compositionContract,
|
|
20
|
+
frame === "frameless" ? "OVERFLOW-1 OVERFLOW-2" : "OVERFLOW-2",
|
|
21
|
+
depth === "nested" ? "BOUNDARY-5" : "BOUNDARY-6",
|
|
22
|
+
].join(" ");
|
|
23
|
+
const rootContract = wholeAction === undefined ? undefined : "SURFACE-4";
|
|
10
24
|
const action = wholeAction?.kind === "link" ? (_jsx("a", { "aria-disabled": disabled || undefined, "aria-label": wholeAction.label, "data-grammar-whole-action": "link", href: disabled ? undefined : wholeAction.href, tabIndex: disabled ? -1 : undefined })) : wholeAction?.kind === "button" ? (_jsx("button", { "aria-label": wholeAction.label, "data-grammar-whole-action": "button", disabled: disabled, onClick: wholeAction.press, type: "button" })) : null;
|
|
11
|
-
const surface = (_jsxs(
|
|
12
|
-
|
|
25
|
+
const surface = (_jsxs(Card.Content, { "aria-label": label === undefined ? accessibleName : undefined, "aria-labelledby": label === undefined ? undefined : headingId, className: getSurfaceFrameClassName(frame) ?? "", "data-contract": contentContract, "data-grammar-frame": frame, "data-grammar-surface-composition": composition, "data-grammar-surface-height": height, "data-grammar-scroll": contained ? "contained" : "page", "data-grammar-state": state, "data-grammar-surface-depth": depth, "data-grammar-treatment": treatment.tone, children: [_jsx(VerticalScrollRegion, { className: getSurfaceContentClassName(measure, contained), "data-grammar-surface-content": "true", "data-grammar-surface-composition": composition, isScrollable: contained, children: children }), action] }));
|
|
26
|
+
const highlightedSurface = isHighlight && state !== "pending" ? (_jsxs("div", { className: surfaceHighlightClassName, "data-grammar-highlight": "true", children: [_jsx("div", { "aria-hidden": true, className: surfaceHighlightSweepClassName }), surface] })) : surface;
|
|
27
|
+
return (_jsxs(Card.Root, { className: getSurfaceCardClassName(measure, height) ?? "", "data-contract": rootContract, "data-grammar-frame": frame, "data-grammar-surface-composition": composition, "data-grammar-surface-height": height, "data-grammar-interaction": wholeAction === undefined ? "static" : "whole-action", "data-grammar-surface-labelled": label === undefined ? "false" : "true", "data-grammar-surface-card": "true", render: (cardProps) => _jsx("section", { ...cardProps }), variant: "transparent", children: [label === undefined ? null : (_jsxs(Card.Header, { className: surfaceLabelClassName ?? "", "data-contract": "GAP-2", "data-grammar-surface-label": "true", children: [_jsx(Label, { as: "h3", id: headingId, children: label }), labelEnd ?? (fact === undefined ? null : _jsx("span", { children: fact }))] })), highlightedSurface] }));
|
|
13
28
|
};
|
|
14
|
-
export const meta = { shape: "branch", grammar: "core", contract: "core.branch.surface-card" };
|
|
15
29
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,uBAAuB,EAAE,YAAY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EAAC,IAAI,EAAC,EAAE,EAAE,SAAS,YAAG,KAAK,GAAS,EAC5C,QAAQ,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,yBAAO,IAAI,GAAQ,CAAC,IACpD,CACjB,EACA,kBAAkB,IACX,CACf,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Identifies the outer surface-list anatomy. */
|
|
2
|
+
export declare const surfaceListClassName: import("tailwind-variants").CnReturn;
|
|
3
|
+
/** Identifies the external label row shared by surface branches. */
|
|
4
|
+
export declare const surfaceLabelClassName: import("tailwind-variants").CnReturn;
|
|
5
|
+
/** Keeps the peer fact at the same visual level as its owning label. */
|
|
6
|
+
export declare const getSurfaceFactClassName: (depth: "top" | "nested") => import("tailwind-variants").CnReturn;
|
|
7
|
+
/** Identifies the list's bounded surface shell. */
|
|
8
|
+
export declare const listShellClassName: import("tailwind-variants").CnReturn;
|
|
9
|
+
/** Identifies the optional footer region. */
|
|
10
|
+
export declare const surfaceFooterClassName: import("tailwind-variants").CnReturn;
|
|
11
|
+
/** Selects the collection treatment for verdict and ordinary lists. */
|
|
12
|
+
export declare const getCollectionClassName: (isVerdict: boolean) => import("tailwind-variants").CnReturn;
|
|
13
|
+
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/classNames.ts"],"names":[],"mappings":"AAEA,iDAAiD;AACjD,eAAO,MAAM,oBAAoB,sCAAgE,CAAA;AACjG,oEAAoE;AACpE,eAAO,MAAM,qBAAqB,sCAEjC,CAAA;AACD,wEAAwE;AACxE,eAAO,MAAM,uBAAuB,GAAI,OAAO,KAAK,GAAG,QAAQ,yCAG9D,CAAA;AACD,mDAAmD;AACnD,eAAO,MAAM,kBAAkB,sCAAoF,CAAA;AACnH,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,sCAA2D,CAAA;AAC9F,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,GAAI,WAAW,OAAO,yCAAyF,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cn } from "@heroui/react";
|
|
2
|
+
/** Identifies the outer surface-list anatomy. */
|
|
3
|
+
export const surfaceListClassName = cn("starci-core-surface-list", "flex", "min-w-0", "flex-col");
|
|
4
|
+
/** Identifies the external label row shared by surface branches. */
|
|
5
|
+
export const surfaceLabelClassName = cn("starci-core-surface-label");
|
|
6
|
+
/** Keeps the peer fact at the same visual level as its owning label. */
|
|
7
|
+
export const getSurfaceFactClassName = (depth) => cn("text-muted", depth === "nested" ? "text-xs leading-4" : "text-sm leading-5");
|
|
8
|
+
/** Identifies the list's bounded surface shell. */
|
|
9
|
+
export const listShellClassName = cn("starci-core-surface", "starci-core-list-shell", "min-w-0", "overflow-hidden");
|
|
10
|
+
/** Identifies the optional footer region. */
|
|
11
|
+
export const surfaceFooterClassName = cn("starci-core-surface-footer", "flex", "items-center");
|
|
12
|
+
/** Selects the collection treatment for verdict and ordinary lists. */
|
|
13
|
+
export const getCollectionClassName = (isVerdict) => cn("starci-core-owned-collection", "w-full", isVerdict ? "rounded-none" : undefined);
|
|
14
|
+
//# sourceMappingURL=classNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAElC,iDAAiD;AACjD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC,0BAA0B,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;AACjG,oEAAoE;AACpE,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CACnC,2BAA2B,CAC9B,CAAA;AACD,wEAAwE;AACxE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAuB,EAAE,EAAE,CAAC,EAAE,CAClE,YAAY,EACZ,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,mBAAmB,CACjE,CAAA;AACD,mDAAmD;AACnD,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC,qBAAqB,EAAE,wBAAwB,EAAE,SAAS,EAAE,iBAAiB,CAAC,CAAA;AACnH,6CAA6C;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC,4BAA4B,EAAE,MAAM,EAAE,cAAc,CAAC,CAAA;AAC9F,uEAAuE;AACvE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAkB,EAAE,EAAE,CAAC,EAAE,CAAC,8BAA8B,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type StaticStateRowData } from "../../composite/StaticStateRow/index.js";
|
|
3
|
-
export type SurfaceListItem = StaticStateRowData;
|
|
4
2
|
type LabelledSurfaceList = {
|
|
5
3
|
readonly label: string;
|
|
6
4
|
readonly ariaLabel?: string;
|
|
@@ -15,25 +13,13 @@ type SurfaceListFrameProps = (LabelledSurfaceList | SelfNamedSurfaceList) & {
|
|
|
15
13
|
readonly labelHidden?: boolean;
|
|
16
14
|
readonly footer?: ReactNode;
|
|
17
15
|
readonly depth?: "top" | "nested";
|
|
16
|
+
readonly isLoading?: boolean;
|
|
17
|
+
readonly isVerdict?: boolean;
|
|
18
|
+
readonly isScrollable?: boolean;
|
|
18
19
|
};
|
|
19
|
-
type
|
|
20
|
-
readonly items: ReadonlyArray<SurfaceListItem>;
|
|
21
|
-
readonly emptyLabel?: string;
|
|
22
|
-
readonly children?: never;
|
|
23
|
-
readonly rowMode?: "static";
|
|
24
|
-
};
|
|
25
|
-
type ContentOwnedSurfaceListProps = {
|
|
20
|
+
export type SurfaceListCardProps = SurfaceListFrameProps & {
|
|
26
21
|
readonly children: ReactNode;
|
|
27
|
-
readonly rowMode: "interactive";
|
|
28
|
-
readonly items?: never;
|
|
29
|
-
readonly emptyLabel?: never;
|
|
30
|
-
};
|
|
31
|
-
export type SurfaceListCardProps = SurfaceListFrameProps & (StaticSurfaceListProps | ContentOwnedSurfaceListProps);
|
|
32
|
-
export declare const SurfaceListCard: ({ label, ariaLabel, items, children, fact, labelEnd, labelHidden, footer, depth, emptyLabel, rowMode, }: SurfaceListCardProps) => import("react").JSX.Element;
|
|
33
|
-
export declare const meta: {
|
|
34
|
-
readonly shape: "branch";
|
|
35
|
-
readonly grammar: "core";
|
|
36
|
-
readonly contract: "core.branch.surface-list-card";
|
|
37
22
|
};
|
|
23
|
+
export declare const SurfaceListCard: (props: SurfaceListCardProps) => import("react").JSX.Element;
|
|
38
24
|
export {};
|
|
39
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAK7C,KAAK,mBAAmB,GAAG;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED,KAAK,oBAAoB,GAAG;IACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED,KAAK,qBAAqB,GAAG,CAAC,mBAAmB,GAAG,oBAAoB,CAAC,GAAG;IACxE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAA;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAClC,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG;IACvD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,oBAAoB,gCA8D1D,CAAA"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useId } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { VerticalScrollRegion } from "../../composite/VerticalScrollRegion/index.js";
|
|
4
|
+
import { Label } from "../../primitive/Label/index.js";
|
|
5
|
+
import { getCollectionClassName, getSurfaceFactClassName, listShellClassName, surfaceFooterClassName, surfaceLabelClassName, surfaceListClassName } from "./classNames.js";
|
|
6
|
+
export const SurfaceListCard = (props) => {
|
|
7
|
+
const { label, ariaLabel, children, fact, labelEnd, labelHidden = false, footer, depth = "top", isLoading = false, isVerdict = false, isScrollable = false, } = props;
|
|
6
8
|
const headingId = useId();
|
|
7
|
-
for (const item of items ?? [])
|
|
8
|
-
assertPresentationState(item.state ?? "neutral");
|
|
9
9
|
const accessibleName = ariaLabel ?? label;
|
|
10
|
-
|
|
11
|
-
return (_jsxs("section", { className: "starci-core-surface-list", "data-grammar-contract": "core.surface-list-card", "data-grammar-label-visibility": labelHidden ? "hidden" : "visible", "data-grammar-list-mode": rowMode, "data-grammar-surface-list": "true", children: [label === undefined || labelHidden ? null : (_jsxs("div", { className: "starci-core-surface-label", "data-grammar-surface-label": "true", children: [_jsx("h3", { id: headingId, children: label }), labelEnd ?? (fact === undefined ? null : _jsx("span", { children: fact }))] })), _jsx("div", { "aria-label": labelHidden || label === undefined ? accessibleName : undefined, "aria-labelledby": !labelHidden && label !== undefined ? headingId : undefined, className: "starci-core-surface starci-core-list-shell", "data-grammar-surface": "true", "data-grammar-surface-depth": depth, children: collection }), footer === undefined ? null : (_jsx("div", { className: "starci-core-surface-footer", "data-grammar-surface-footer": "true", children: footer }))] }));
|
|
10
|
+
return (_jsxs("section", { className: surfaceListClassName, "data-grammar-label-visibility": labelHidden ? "hidden" : "visible", "data-grammar-surface-list": "true", "data-grammar-surface-depth": depth, children: [label === undefined || labelHidden ? null : (_jsxs("div", { className: surfaceLabelClassName, "data-contract": "GAP-2", "data-grammar-surface-label": "true", children: [_jsx(Label, { as: "h3", id: headingId, depth: depth, children: label }), labelEnd ?? (fact === undefined ? null : (_jsx("span", { className: getSurfaceFactClassName(depth), "data-contract": `TONE-2 ${depth === "nested" ? "FONT-1" : "FONT-2"}`, children: fact })))] })), _jsx("div", { "aria-label": labelHidden || label === undefined ? accessibleName : undefined, "aria-labelledby": !labelHidden && label !== undefined ? headingId : undefined, className: listShellClassName, "data-contract": "SURFACE-2 PADDING-0 OVERFLOW-2", "data-grammar-surface": "true", "data-grammar-scroll": isScrollable ? "contained" : "page", "data-grammar-surface-depth": depth, "data-surface-context": depth === "nested" ? "nested" : "page", "data-verdict": String(isVerdict), children: _jsx(VerticalScrollRegion, { className: getCollectionClassName(isVerdict), "data-grammar-list": "true", "data-loading": String(isLoading), isScrollable: isScrollable, children: children }) }), footer === undefined ? null : (_jsx("div", { className: surfaceFooterClassName, "data-grammar-surface-footer": "true", children: footer }))] }));
|
|
12
11
|
};
|
|
13
|
-
export const meta = { shape: "branch", grammar: "core", contract: "core.branch.surface-list-card" };
|
|
14
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/SurfaceListCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAA;AACpF,OAAO,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AA2B1K,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC3D,MAAM,EACF,KAAK,EACL,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,GAAG,KAAK,EACnB,MAAM,EACN,KAAK,GAAG,KAAK,EACb,SAAS,GAAG,KAAK,EACjB,SAAS,GAAG,KAAK,EACjB,YAAY,GAAG,KAAK,GACvB,GAAG,KAAK,CAAA;IACT,MAAM,SAAS,GAAG,KAAK,EAAE,CAAA;IACzB,MAAM,cAAc,GAAG,SAAS,IAAI,KAAK,CAAA;IAEzC,OAAO,CACH,mBACI,SAAS,EAAE,oBAAoB,mCACA,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,+BACvC,MAAM,gCACJ,KAAK,aAEhC,KAAK,KAAK,SAAS,IAAI,W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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Owns the full-width peer-tab region without allowing intrinsic content to widen the page. */
|
|
2
|
+
export declare const tabsFrameClassName: import("tailwind-variants").CnReturn;
|
|
3
|
+
/** Makes clipped destinations reachable through the Core horizontal overflow treatment. */
|
|
4
|
+
export declare const tabsScrollClassName: import("tailwind-variants").CnReturn;
|
|
5
|
+
/** Preserves the tab row's intrinsic width inside its scroll owner. */
|
|
6
|
+
export declare const tabsClassName: import("tailwind-variants").CnReturn;
|
|
7
|
+
/** Keeps icon and stable label aligned as one tab identity. */
|
|
8
|
+
export declare const tabContentClassName: import("tailwind-variants").CnReturn;
|
|
9
|
+
/** Core hides labels only while the accessible name and icon remain available. */
|
|
10
|
+
export declare const tabLabelClassName: import("tailwind-variants").CnReturn;
|
|
11
|
+
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Tabs/classNames.ts"],"names":[],"mappings":"AAGA,gGAAgG;AAChG,eAAO,MAAM,kBAAkB,sCAA+B,CAAA;AAC9D,2FAA2F;AAC3F,eAAO,MAAM,mBAAmB,sCAAiE,CAAA;AACjG,uEAAuE;AACvE,eAAO,MAAM,aAAa,sCAAyB,CAAA;AACnD,+DAA+D;AAC/D,eAAO,MAAM,mBAAmB,sCAAgC,CAAA;AAChE,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,sCAA8B,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { cn } from "@heroui/react";
|
|
2
|
+
import { horizontalScrollRegionClassName } from "../../classNames.js";
|
|
3
|
+
/** Owns the full-width peer-tab region without allowing intrinsic content to widen the page. */
|
|
4
|
+
export const tabsFrameClassName = cn("starci-core-tabs-frame");
|
|
5
|
+
/** Makes clipped destinations reachable through the Core horizontal overflow treatment. */
|
|
6
|
+
export const tabsScrollClassName = cn(horizontalScrollRegionClassName, "starci-core-tabs-scroll");
|
|
7
|
+
/** Preserves the tab row's intrinsic width inside its scroll owner. */
|
|
8
|
+
export const tabsClassName = cn("starci-core-tabs");
|
|
9
|
+
/** Keeps icon and stable label aligned as one tab identity. */
|
|
10
|
+
export const tabContentClassName = cn("starci-core-tab-content");
|
|
11
|
+
/** Core hides labels only while the accessible name and icon remain available. */
|
|
12
|
+
export const tabLabelClassName = cn("starci-core-tab-label");
|
|
13
|
+
//# sourceMappingURL=classNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/Tabs/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAA;AAErE,gGAAgG;AAChG,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,CAAC,wBAAwB,CAAC,CAAA;AAC9D,2FAA2F;AAC3F,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC,+BAA+B,EAAE,yBAAyB,CAAC,CAAA;AACjG,uEAAuE;AACvE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,kBAAkB,CAAC,CAAA;AACnD,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC,yBAAyB,CAAC,CAAA;AAChE,kFAAkF;AAClF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** One stable peer destination rendered by the Core tab object. */
|
|
3
|
+
export type TabItem = {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly leading?: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
/** Business-neutral controlled peer tabs with one declared overflow owner. */
|
|
9
|
+
export type TabsProps = {
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly selectedKey: string;
|
|
12
|
+
readonly items: ReadonlyArray<TabItem>;
|
|
13
|
+
readonly onSelect?: (key: string) => void;
|
|
14
|
+
readonly panelId?: (key: string) => string;
|
|
15
|
+
/** Keep stable labels visible when icon-only navigation would make peer views ambiguous. */
|
|
16
|
+
readonly labelVisibility?: "responsive" | "always";
|
|
17
|
+
/** Page chrome owns whether the peer strip starts at the shared page inset. */
|
|
18
|
+
readonly inset?: "page" | "none";
|
|
19
|
+
};
|
|
20
|
+
/** Render peer tabs through Core's selected, accessible and responsive treatment. */
|
|
21
|
+
export declare const Tabs: (props: TabsProps) => import("react").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Tabs/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAUpF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG;IAClB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAA;CAC/B,CAAA;AAED,8EAA8E;AAC9E,MAAM,MAAM,SAAS,GAAG;IACpB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAA;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAA;IAC1C,4FAA4F;IAC5F,QAAQ,CAAC,eAAe,CAAC,EAAE,YAAY,GAAG,QAAQ,CAAA;IAClD,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CACnC,CAAA;AAED,qFAAqF;AACrF,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,gCAgDpC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Tabs as HeroTabs } from "@heroui/react";
|
|
4
|
+
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
5
|
+
import { HorizontalScrollRegion } from "../../composite/HorizontalScrollRegion/index.js";
|
|
6
|
+
import { tabContentClassName, tabLabelClassName, tabsClassName, tabsFrameClassName, tabsScrollClassName, } from "./classNames.js";
|
|
7
|
+
/** Render peer tabs through Core's selected, accessible and responsive treatment. */
|
|
8
|
+
export const Tabs = (props) => {
|
|
9
|
+
const [isClientReady, setIsClientReady] = useState(false);
|
|
10
|
+
const frameRef = useRef(null);
|
|
11
|
+
useEffect(() => setIsClientReady(true), []);
|
|
12
|
+
useLayoutEffect(() => {
|
|
13
|
+
if (!isClientReady || props.panelId === undefined)
|
|
14
|
+
return;
|
|
15
|
+
frameRef.current?.querySelectorAll("[data-grammar-tab-id]").forEach((identity) => {
|
|
16
|
+
const itemId = identity.dataset.grammarTabId;
|
|
17
|
+
const tab = identity.closest("[role='tab']");
|
|
18
|
+
if (itemId !== undefined && tab !== null)
|
|
19
|
+
tab.setAttribute("aria-controls", props.panelId?.(itemId) ?? "");
|
|
20
|
+
});
|
|
21
|
+
}, [isClientReady, props.items, props.panelId]);
|
|
22
|
+
const inset = props.inset ?? "none";
|
|
23
|
+
const frameContract = inset === "page" ? "PADDING-5" : undefined;
|
|
24
|
+
if (!isClientReady)
|
|
25
|
+
return _jsx("div", { "aria-hidden": "true", className: tabsFrameClassName, "data-contract": frameContract, "data-grammar-tabs": "true", "data-grammar-tabs-client": "pending", "data-grammar-tabs-inset": inset, style: { minHeight: "3rem" } });
|
|
26
|
+
return _jsx("div", { ref: frameRef, className: tabsFrameClassName, "data-contract": frameContract, "data-grammar-tabs": "true", "data-grammar-tabs-client": "ready", "data-grammar-tabs-inset": inset, "data-grammar-tab-labels": props.labelVisibility ?? "responsive", children: _jsx(HorizontalScrollRegion, { className: tabsScrollClassName, "data-contract": "OVERFLOW-4", "data-grammar-tabs-overflow": "scroll", hideScrollBar: true, children: _jsx(HeroTabs, { variant: "secondary", selectedKey: props.selectedKey, onSelectionChange: (key) => props.onSelect?.(String(key)), className: tabsClassName ?? "", "data-contract": "FLOW-2", children: _jsx(HeroTabs.ListContainer, { children: _jsx(HeroTabs.List, { "aria-label": props.label, children: props.items.map((item) => (_jsxs(HeroTabs.Tab, { id: item.id, "aria-label": item.label, "aria-controls": props.panelId?.(item.id), "data-contract": "PADDING-3", children: [_jsxs("span", { className: tabContentClassName, "data-contract": "GAP-2", "data-grammar-tab-id": item.id, children: [item.leading, _jsx("span", { className: tabLabelClassName, style: props.labelVisibility === "always" ? { display: "inline" } : undefined, children: item.label })] }), _jsx(HeroTabs.Indicator, {})] }, item.id))) }) }) }) }) });
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/Tabs/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAA;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iDAAiD,CAAA;AACxF,OAAO,EACH,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACtB,MAAM,iBAAiB,CAAA;AAsBxB,qFA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K,GAClB,GACU,GACvB,CAAA;AACV,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Tooltip/classNames.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oBAAoB,sCAAwD,CAAA;AAEzF,eAAO,MAAM,uBAAuB,sCAAoC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../../../src/core/branch/Tooltip/classNames.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAElC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC,qBAAqB,EAAE,aAAa,EAAE,WAAW,CAAC,CAAA;AAEzF,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC,6BAA6B,CAAC,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/** Where the tooltip sits relative to its trigger. */
|
|
3
|
+
export type TooltipPlacement = "top" | "bottom";
|
|
4
|
+
/** Props for {@link Tooltip}. */
|
|
5
|
+
export type TooltipProps = {
|
|
6
|
+
/** The already-resolved words shown on hover or focus. */
|
|
7
|
+
readonly content: ReactNode;
|
|
8
|
+
readonly children: ReactNode;
|
|
9
|
+
readonly placement?: TooltipPlacement;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* BRANCH - `Tooltip`: one hover/focus annotation anchored to a trigger.
|
|
13
|
+
*
|
|
14
|
+
* The trigger keeps its own semantics; this branch only owns placement, contrast and the zero-delay
|
|
15
|
+
* reveal rhythm shared across StarCi surfaces.
|
|
16
|
+
*/
|
|
17
|
+
export declare const Tooltip: ({ content, children, placement, }: TooltipProps) => import("react").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/branch/Tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAG7C,sDAAsD;AACtD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAA;AAE/C,iCAAiC;AACjC,MAAM,MAAM,YAAY,GAAG;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;CACxC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,mCAIrB,YAAY,gCAuBd,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { tooltipContentClassName, tooltipRootClassName } from "./classNames.js";
|
|
4
|
+
/**
|
|
5
|
+
* BRANCH - `Tooltip`: one hover/focus annotation anchored to a trigger.
|
|
6
|
+
*
|
|
7
|
+
* The trigger keeps its own semantics; this branch only owns placement, contrast and the zero-delay
|
|
8
|
+
* reveal rhythm shared across StarCi surfaces.
|
|
9
|
+
*/
|
|
10
|
+
export const Tooltip = ({ content, children, placement = "top", }) => {
|
|
11
|
+
const tooltipId = useId();
|
|
12
|
+
return (_jsxs("span", { className: tooltipRootClassName, "data-grammar-tooltip": "true", "data-grammar-tooltip-placement": placement, children: [_jsx("span", { "aria-describedby": tooltipId, "data-grammar-tooltip-trigger": "true", children: children }), _jsx("span", { id: tooltipId, role: "tooltip", className: tooltipContentClassName, "data-contract": "PADDING-1 PADDING-2 FLOW-2 FONT-1", "data-grammar-tooltip-content": "true", children: content })] }));
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/branch/Tooltip/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAA;AAC7C,OAAO,EAAE,uBAAuB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAa/E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EACpB,OAAO,EACP,QAAQ,EACR,SAAS,GAAG,KAAK,GACN,EAAE,EAAE;IACf,MAAM,SAAS,GAAG,KAAK,EAAE,CAAA;IAEzB,OAAO,CACH,gBACI,SAAS,EAAE,oBAAoB,0BACV,MAAM,oCACK,SAAS,aAEzC,mCAAwB,SAAS,kCAA+B,MAAM,YACjE,QAAQ,GACN,EACP,eACI,EAAE,EAAE,SAAS,EACb,IAAI,EAAC,SAAS,EACd,SAAS,EAAE,uBAAuB,mBACpB,mCAAmC,kCACpB,MAAM,YAElC,OAAO,GACL,IACJ,CACV,CAAA;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Identifies the compact state mark in the offset-pop visual layer. */
|
|
2
|
+
export declare const stateMarkClassName: import("tailwind-variants").CnReturn;
|
|
3
|
+
/** Identifies the quiet ordinal prefix used by ordered content. */
|
|
4
|
+
export declare const leadingNumberClassName: import("tailwind-variants").CnReturn;
|
|
5
|
+
/** Identifies one static state row shell. */
|
|
6
|
+
export declare const staticRowClassName: import("tailwind-variants").CnReturn;
|
|
7
|
+
/** Identifies the text grouping inside a static state row. */
|
|
8
|
+
export declare const staticRowCopyClassName: import("tailwind-variants").CnReturn;
|
|
9
|
+
/** Identifies the full page that centres one compact form surface. */
|
|
10
|
+
export declare const formPageClassName: import("tailwind-variants").CnReturn;
|
|
11
|
+
/** Identifies the bounded viewport that owns form-surface scrolling under zoom. */
|
|
12
|
+
export declare const formScrollViewportClassName: import("tailwind-variants").CnReturn;
|
|
13
|
+
/** Identifies a form card whose inset belongs to its content region. */
|
|
14
|
+
export declare const formSurfaceClassName: import("tailwind-variants").CnReturn;
|
|
15
|
+
/** Narrows only a form state whose own content remains comfortable at the compact measure. */
|
|
16
|
+
export declare const formCompactSurfaceClassName: import("tailwind-variants").CnReturn;
|
|
17
|
+
/** Identifies the vertical label-control-help anatomy of one form field. */
|
|
18
|
+
export declare const formFieldClassName: import("tailwind-variants").CnReturn;
|
|
19
|
+
/** Identifies a semantic form label that remains available only to assistive technology. */
|
|
20
|
+
export declare const formScreenReaderLabelClassName: import("tailwind-variants").CnReturn;
|
|
21
|
+
/** Identifies content whose intrinsic inline measure must scroll instead of being compressed. */
|
|
22
|
+
export declare const horizontalScrollRegionClassName: import("tailwind-variants").CnReturn;
|
|
23
|
+
//# sourceMappingURL=classNames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.d.ts","sourceRoot":"","sources":["../../src/core/classNames.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,sCAA2B,CAAA;AAC1D,mEAAmE;AACnE,eAAO,MAAM,sBAAsB,sCAAuE,CAAA;AAC1G,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,sCAAuE,CAAA;AACtG,8DAA8D;AAC9D,eAAO,MAAM,sBAAsB,sCAA4E,CAAA;AAE/G,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,sCAA8B,CAAA;AAC5D,mFAAmF;AACnF,eAAO,MAAM,2BAA2B,sCAAyC,CAAA;AACjF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,sCAAiC,CAAA;AAClE,8FAA8F;AAC9F,eAAO,MAAM,2BAA2B,sCAA0C,CAAA;AAClF,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,sCAA+B,CAAA;AAC9D,4FAA4F;AAC5F,eAAO,MAAM,8BAA8B,sCAA8C,CAAA;AACzF,iGAAiG;AACjG,eAAO,MAAM,+BAA+B,sCAA6C,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from "@heroui/react";
|
|
2
|
+
/** Identifies the compact state mark in the offset-pop visual layer. */
|
|
3
|
+
export const stateMarkClassName = cn("size-5", "shrink-0");
|
|
4
|
+
/** Identifies the quiet ordinal prefix used by ordered content. */
|
|
5
|
+
export const leadingNumberClassName = cn("starci-core-leading-number", "shrink-0", "font-mono", "text-sm");
|
|
6
|
+
/** Identifies one static state row shell. */
|
|
7
|
+
export const staticRowClassName = cn("starci-core-static-row", "flex", "items-start", "gap-2", "py-2");
|
|
8
|
+
/** Identifies the text grouping inside a static state row. */
|
|
9
|
+
export const staticRowCopyClassName = cn("starci-core-static-row-copy", "flex", "min-w-0", "flex-col", "gap-1");
|
|
10
|
+
/** Identifies the full page that centres one compact form surface. */
|
|
11
|
+
export const formPageClassName = cn("starci-core-form-page");
|
|
12
|
+
/** Identifies the bounded viewport that owns form-surface scrolling under zoom. */
|
|
13
|
+
export const formScrollViewportClassName = cn("starci-core-form-scroll-viewport");
|
|
14
|
+
/** Identifies a form card whose inset belongs to its content region. */
|
|
15
|
+
export const formSurfaceClassName = cn("starci-core-form-surface");
|
|
16
|
+
/** Narrows only a form state whose own content remains comfortable at the compact measure. */
|
|
17
|
+
export const formCompactSurfaceClassName = cn("starci-core-form-surface--compact");
|
|
18
|
+
/** Identifies the vertical label-control-help anatomy of one form field. */
|
|
19
|
+
export const formFieldClassName = cn("starci-core-form-field");
|
|
20
|
+
/** Identifies a semantic form label that remains available only to assistive technology. */
|
|
21
|
+
export const formScreenReaderLabelClassName = cn("starci-core-form-label--screen-reader");
|
|
22
|
+
/** Identifies content whose intrinsic inline measure must scroll instead of being compressed. */
|
|
23
|
+
export const horizontalScrollRegionClassName = cn("starci-core-horizontal-scroll-region");
|
|
24
|
+
//# sourceMappingURL=classNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classNames.js","sourceRoot":"","sources":["../../src/core/classNames.ts"],"names":[],"mappings":"AAAA,OAAO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";
|
|
3
|
+
import type { IconSource } from "../../primitive/Icon/index.js";
|
|
4
|
+
export type EmptyNoticeProps = {
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly description?: string;
|
|
7
|
+
/** Optional app-owned mark for the empty condition. */
|
|
8
|
+
readonly iconSource?: IconSource;
|
|
9
|
+
readonly actionLabel?: string;
|
|
10
|
+
readonly actionStartContent?: ReactNode;
|
|
11
|
+
readonly actionVariant?: ButtonVariant;
|
|
12
|
+
readonly isActionPending?: boolean;
|
|
13
|
+
readonly onAction?: () => void;
|
|
14
|
+
};
|
|
15
|
+
/** Settled empty-region answer with an optional recovery action. */
|
|
16
|
+
export declare const EmptyNotice: ({ message, description, iconSource, actionLabel, actionStartContent, actionVariant, isActionPending, onAction, }: EmptyNoticeProps) => import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/composite/EmptyNotice/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAA;AAG/D,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAA;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,SAAS,CAAA;IACvC,QAAQ,CAAC,aAAa,CAAC,EAAE,aAAa,CAAA;IACtC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;CACjC,CAAA;AAED,oEAAoE;AACpE,eAAO,MAAM,WAAW,GAAI,kHASzB,gBAAgB,gCAsBlB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from "../../primitive/Button/index.js";
|
|
3
|
+
import { IconTile } from "../../primitive/IconTile/index.js";
|
|
4
|
+
import { Text } from "../../primitive/Text/index.js";
|
|
5
|
+
/** Settled empty-region answer with an optional recovery action. */
|
|
6
|
+
export const EmptyNotice = ({ message, description, iconSource, actionLabel, actionStartContent, actionVariant = "primary", isActionPending = false, onAction, }) => (_jsxs("div", { "data-tier": "composite", "data-component": "EmptyNotice", "data-contract": "GAP-3 PADDING-4", className: "flex flex-col items-center gap-3 p-4 text-center", children: [iconSource === undefined ? null : _jsx(IconTile, { source: iconSource, tone: "neutral", size: "md" }), _jsx(Text, { size: "sm", tone: "muted", children: message }), description === undefined ? null : _jsx(Text, { size: "xs", tone: "muted", children: description }), actionLabel === undefined ? null : (_jsx(Button, { variant: actionVariant, size: "sm", startContent: actionStartContent, isPending: isActionPending, ...(onAction === undefined ? {} : { onPress: onAction }), children: actionLabel }))] }));
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/composite/EmptyNotice/index.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAsB,MAAM,iCAAiC,CAAA;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AAE5D,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAA;AAcpD,oEAAoE;AACpE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EACxB,OAAO,EACP,WAAW,EACX,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,GAAG,SAAS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