@behavioral-agentic-design-system/core 0.22.0 → 0.24.0
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/package.json +6 -4
- package/scripts/size-audit.cjs +147 -0
- package/src/api/layers/file.ts +0 -1
- package/src/app/layout.tsx +29 -4
- package/src/app/opengraph-image.tsx +103 -0
- package/src/app/preview/components/page.tsx +405 -5
- package/src/app/shell.tsx +31 -7
- package/src/components/customize-tab.tsx +111 -139
- package/src/components/home-tab.tsx +7 -14
- package/src/components/layers-tab.tsx +5 -0
- package/src/components/onboarding-wizard.tsx +1 -1
- package/src/components/ui/copy-button.tsx +2 -2
- package/src/components/ui/data-list.tsx +169 -0
- package/src/components/ui/editable.tsx +56 -27
- package/src/components/ui/fieldset.tsx +244 -0
- package/src/components/ui/index.ts +4 -0
- package/src/components/ui/input-group.tsx +204 -0
- package/src/components/ui/qr-code.tsx +107 -0
- package/src/data/docs-index.ts +14 -0
- package/src/stories/Accordion.stories.tsx +21 -0
- package/src/stories/Button.stories.tsx +15 -0
- package/src/stories/CopyButton.stories.tsx +3 -3
- package/src/stories/DataList.stories.tsx +160 -0
- package/src/stories/Dialog.stories.tsx +33 -0
- package/src/stories/Editable.stories.tsx +34 -7
- package/src/stories/Field.stories.tsx +1 -1
- package/src/stories/Fieldset.stories.tsx +253 -0
- package/src/stories/InputGroup.stories.tsx +227 -0
- package/src/stories/Label.stories.tsx +2 -2
- package/src/stories/QrCode.stories.tsx +146 -0
- package/src/stories/Tabs.stories.tsx +24 -0
- package/src/styles.css +0 -12
- package/src/tokens.json +45 -49
package/src/styles.css
CHANGED
|
@@ -95,18 +95,6 @@
|
|
|
95
95
|
--sidebar-accent-foreground: oklch(0.2050 0 0);
|
|
96
96
|
--sidebar-border: oklch(0.6100 0 0);
|
|
97
97
|
--sidebar-ring: oklch(0.4500 0 0);
|
|
98
|
-
--semantic-text-primary: var(--foreground);
|
|
99
|
-
--semantic-text-secondary: var(--muted-foreground);
|
|
100
|
-
--semantic-text-on-primary: var(--primary-foreground);
|
|
101
|
-
--semantic-surface-page: var(--background);
|
|
102
|
-
--semantic-surface-card: var(--card);
|
|
103
|
-
--semantic-surface-overlay: oklch(0.145 0 0 / 0.8);
|
|
104
|
-
--semantic-border-default: var(--border);
|
|
105
|
-
--semantic-border-input: var(--input);
|
|
106
|
-
--semantic-border-focus: var(--ring);
|
|
107
|
-
--semantic-action-primary: var(--primary);
|
|
108
|
-
--semantic-action-primary-hover: oklch(from var(--primary) calc(l + 0.1) c h);
|
|
109
|
-
--semantic-action-destructive: var(--destructive);
|
|
110
98
|
|
|
111
99
|
--radius: 0.625rem;
|
|
112
100
|
--shadow-opacity: 0.10;
|
package/src/tokens.json
CHANGED
|
@@ -807,6 +807,50 @@
|
|
|
807
807
|
}
|
|
808
808
|
}
|
|
809
809
|
},
|
|
810
|
+
"composites": {
|
|
811
|
+
"$description": "Hypertoken-style named bundles — multi-property style fragments that agents and forks reference as a unit instead of reconstructing from primitives. Concept: Jake Albaugh (Figma, Config 2026); see docs/roadmap.md → Layer 3/4 composites for the full activation plan. This group is a DOCUMENTATION LAYER — values here are not read by build-tokens.cjs and do not emit CSS. They exist so: (1) agents calling the MCP get_token / list_tokens tools see the canonical bundle before guessing; (2) forks have a single place to look up what tokens compose a card surface, an elevated popover, or a modal overlay. When a composite is fully specified and tooling support matures, this layer will drive generation. For now, treat each entry as the authoritative spec for hand-authoring — use the cssVars and tailwind fields as the generated equivalents.",
|
|
812
|
+
"textStyle": {
|
|
813
|
+
"$description": "Text style bundles. The canonical source is the `typography` group above — this entry is a cross-reference for agents that search for 'textStyle' or 'heading style'. Use `get_token` with path `typography.heading-xl` etc. Typography bundles: heading-xl, heading-lg, heading-md, heading-sm, body, body-sm, caption, code.",
|
|
814
|
+
"$ref": "typography"
|
|
815
|
+
},
|
|
816
|
+
"surface": {
|
|
817
|
+
"$description": "Named surface bundles — background + border + radius + shadow combined. Use these specs when building custom compositions that don't use a BADS primitive. Prefer the BADS component (Card, Popover, Sheet, Dialog) over hand-rolling; these bundles exist for compositions that genuinely can't use the primitive.",
|
|
818
|
+
"card": {
|
|
819
|
+
"$type": "composite",
|
|
820
|
+
"$description": "Standard card surface. The go-to raised container for content sections, stat tiles, and form groups. Prefer <Card> primitive over hand-rolling.",
|
|
821
|
+
"background": { "$value": "{theme.light.card}", "$type": "color", "$description": "CSS: var(--card). Switches automatically in dark mode." },
|
|
822
|
+
"border": { "$value": "{theme.light.border}", "$type": "color", "$description": "CSS: 1px solid var(--border)." },
|
|
823
|
+
"borderRadius": { "$value": "{borderRadius.lg}", "$type": "dimension", "$description": "CSS: var(--radius-lg). 8px default." },
|
|
824
|
+
"shadow": { "$value": "{shadow.sm}", "$type": "shadow", "$description": "CSS: var(--shadow-sm)." },
|
|
825
|
+
"tailwind": { "$value": "bg-card border border-border rounded-lg shadow-sm", "$type": "string", "$description": "The Tailwind class string equivalent. The lint will flag this combination on a raw div — use <Card> instead." }
|
|
826
|
+
},
|
|
827
|
+
"popover": {
|
|
828
|
+
"$type": "composite",
|
|
829
|
+
"$description": "Elevated floating surface — used by Popover, DropdownMenu, Tooltip, Select content. Renders in a Radix portal; use PortalThemeProvider if your fork uses scoped CSS vars.",
|
|
830
|
+
"background": { "$value": "{theme.light.popover}", "$type": "color", "$description": "CSS: var(--popover)." },
|
|
831
|
+
"border": { "$value": "{theme.light.border}", "$type": "color", "$description": "CSS: 1px solid var(--border)." },
|
|
832
|
+
"borderRadius": { "$value": "{borderRadius.lg}", "$type": "dimension", "$description": "CSS: var(--radius-lg)." },
|
|
833
|
+
"shadow": { "$value": "{shadow.md}", "$type": "shadow", "$description": "CSS: var(--shadow-md). One step above card — signals elevation." },
|
|
834
|
+
"tailwind": { "$value": "bg-popover border border-border rounded-lg shadow-md", "$type": "string" }
|
|
835
|
+
},
|
|
836
|
+
"sheet": {
|
|
837
|
+
"$type": "composite",
|
|
838
|
+
"$description": "Side-anchored overlay panel (drawer). Full-height, no drop shadow — the overlay scrim provides separation. The border is on the inward edge only (border-r for left sheet, border-l for right sheet).",
|
|
839
|
+
"background": { "$value": "{theme.light.card}", "$type": "color", "$description": "CSS: var(--card). Sheets share the card surface." },
|
|
840
|
+
"borderRadius": { "$value": "{borderRadius.none}", "$type": "dimension", "$description": "Sheets are flush — no radius on the viewport edge." },
|
|
841
|
+
"tailwind": { "$value": "bg-card border-r", "$type": "string", "$description": "Adjust border direction (border-l / border-r / border-t / border-b) per anchor side." }
|
|
842
|
+
},
|
|
843
|
+
"modal": {
|
|
844
|
+
"$type": "composite",
|
|
845
|
+
"$description": "Centered blocking overlay (Dialog). The 2xl shadow is intentionally stronger than card/popover — it separates the modal from the scrim behind it.",
|
|
846
|
+
"background": { "$value": "{theme.light.card}", "$type": "color", "$description": "CSS: var(--card)." },
|
|
847
|
+
"border": { "$value": "{theme.light.border}", "$type": "color", "$description": "CSS: 1px solid var(--border)." },
|
|
848
|
+
"borderRadius": { "$value": "{borderRadius.lg}", "$type": "dimension", "$description": "CSS: var(--radius-lg)." },
|
|
849
|
+
"shadow": { "$value": "{shadow.2xl}", "$type": "shadow", "$description": "CSS: var(--shadow-2xl). Deepest elevation tier." },
|
|
850
|
+
"tailwind": { "$value": "bg-card border border-border rounded-lg shadow-2xl", "$type": "string" }
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
},
|
|
810
854
|
"theme": {
|
|
811
855
|
"$description": "Theme tokens — values feed directly into the published styles.css and the preview app's globals.css. The build script (scripts/build-tokens.js) regenerates both files from these values. Edit here, then run `pnpm build:tokens`.",
|
|
812
856
|
"light": {
|
|
@@ -976,54 +1020,6 @@
|
|
|
976
1020
|
"$value": "oklch(0.4500 0 0)",
|
|
977
1021
|
"$type": "color",
|
|
978
1022
|
"$description": "AAA non-text 3:1 on sidebar."
|
|
979
|
-
},
|
|
980
|
-
"semantic-text-primary": {
|
|
981
|
-
"$value": "var(--foreground)",
|
|
982
|
-
"$type": "color"
|
|
983
|
-
},
|
|
984
|
-
"semantic-text-secondary": {
|
|
985
|
-
"$value": "var(--muted-foreground)",
|
|
986
|
-
"$type": "color"
|
|
987
|
-
},
|
|
988
|
-
"semantic-text-on-primary": {
|
|
989
|
-
"$value": "var(--primary-foreground)",
|
|
990
|
-
"$type": "color"
|
|
991
|
-
},
|
|
992
|
-
"semantic-surface-page": {
|
|
993
|
-
"$value": "var(--background)",
|
|
994
|
-
"$type": "color"
|
|
995
|
-
},
|
|
996
|
-
"semantic-surface-card": {
|
|
997
|
-
"$value": "var(--card)",
|
|
998
|
-
"$type": "color"
|
|
999
|
-
},
|
|
1000
|
-
"semantic-surface-overlay": {
|
|
1001
|
-
"$value": "oklch(0.145 0 0 / 0.8)",
|
|
1002
|
-
"$type": "color"
|
|
1003
|
-
},
|
|
1004
|
-
"semantic-border-default": {
|
|
1005
|
-
"$value": "var(--border)",
|
|
1006
|
-
"$type": "color"
|
|
1007
|
-
},
|
|
1008
|
-
"semantic-border-input": {
|
|
1009
|
-
"$value": "var(--input)",
|
|
1010
|
-
"$type": "color"
|
|
1011
|
-
},
|
|
1012
|
-
"semantic-border-focus": {
|
|
1013
|
-
"$value": "var(--ring)",
|
|
1014
|
-
"$type": "color"
|
|
1015
|
-
},
|
|
1016
|
-
"semantic-action-primary": {
|
|
1017
|
-
"$value": "var(--primary)",
|
|
1018
|
-
"$type": "color"
|
|
1019
|
-
},
|
|
1020
|
-
"semantic-action-primary-hover": {
|
|
1021
|
-
"$value": "oklch(from var(--primary) calc(l + 0.1) c h)",
|
|
1022
|
-
"$type": "color"
|
|
1023
|
-
},
|
|
1024
|
-
"semantic-action-destructive": {
|
|
1025
|
-
"$value": "var(--destructive)",
|
|
1026
|
-
"$type": "color"
|
|
1027
1023
|
}
|
|
1028
1024
|
},
|
|
1029
1025
|
"dark": {
|
|
@@ -1238,4 +1234,4 @@
|
|
|
1238
1234
|
"$description": "Chroma multiplier on series 2 only (others inherit primary chroma)."
|
|
1239
1235
|
}
|
|
1240
1236
|
}
|
|
1241
|
-
}
|
|
1237
|
+
}
|