@zentauri-ui/zentauri-components 1.4.41 → 1.4.61
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 +64 -1
- package/cli/registry.json +3 -1
- package/dist/ui/search/filter-search-suggestions.d.ts +15 -0
- package/dist/ui/search/filter-search-suggestions.d.ts.map +1 -0
- package/dist/ui/search/index.d.ts +7 -0
- package/dist/ui/search/index.d.ts.map +1 -0
- package/dist/ui/search/search-bar.d.ts +6 -0
- package/dist/ui/search/search-bar.d.ts.map +1 -0
- package/dist/ui/search/search-suggestion-list.d.ts +6 -0
- package/dist/ui/search/search-suggestion-list.d.ts.map +1 -0
- package/dist/ui/search/search-suggestion-utils.d.ts +6 -0
- package/dist/ui/search/search-suggestion-utils.d.ts.map +1 -0
- package/dist/ui/search/types.d.ts +44 -0
- package/dist/ui/search/types.d.ts.map +1 -0
- package/dist/ui/search.js +199 -0
- package/dist/ui/search.js.map +1 -0
- package/dist/ui/search.mjs +194 -0
- package/dist/ui/search.mjs.map +1 -0
- package/dist/ui/typography/blockquote-base.d.ts +6 -0
- package/dist/ui/typography/blockquote-base.d.ts.map +1 -0
- package/dist/ui/typography/blockquote.d.ts +6 -0
- package/dist/ui/typography/blockquote.d.ts.map +1 -0
- package/dist/ui/typography/code-block-base.d.ts +6 -0
- package/dist/ui/typography/code-block-base.d.ts.map +1 -0
- package/dist/ui/typography/code-block.d.ts +6 -0
- package/dist/ui/typography/code-block.d.ts.map +1 -0
- package/dist/ui/typography/heading-base.d.ts +6 -0
- package/dist/ui/typography/heading-base.d.ts.map +1 -0
- package/dist/ui/typography/heading.d.ts +6 -0
- package/dist/ui/typography/heading.d.ts.map +1 -0
- package/dist/ui/typography/index.d.ts +9 -0
- package/dist/ui/typography/index.d.ts.map +1 -0
- package/dist/ui/typography/inline-code-base.d.ts +6 -0
- package/dist/ui/typography/inline-code-base.d.ts.map +1 -0
- package/dist/ui/typography/inline-code.d.ts +6 -0
- package/dist/ui/typography/inline-code.d.ts.map +1 -0
- package/dist/ui/typography/list-base.d.ts +10 -0
- package/dist/ui/typography/list-base.d.ts.map +1 -0
- package/dist/ui/typography/list.d.ts +12 -0
- package/dist/ui/typography/list.d.ts.map +1 -0
- package/dist/ui/typography/text-base.d.ts +6 -0
- package/dist/ui/typography/text-base.d.ts.map +1 -0
- package/dist/ui/typography/text.d.ts +6 -0
- package/dist/ui/typography/text.d.ts.map +1 -0
- package/dist/ui/typography/types.d.ts +56 -0
- package/dist/ui/typography/types.d.ts.map +1 -0
- package/dist/ui/typography/variants.d.ts +16 -0
- package/dist/ui/typography/variants.d.ts.map +1 -0
- package/dist/ui/typography.js +334 -0
- package/dist/ui/typography.js.map +1 -0
- package/dist/ui/typography.mjs +321 -0
- package/dist/ui/typography.mjs.map +1 -0
- package/package.json +3 -3
- package/src/ui/search/filter-search-suggestions.test.ts +48 -0
- package/src/ui/search/filter-search-suggestions.ts +43 -0
- package/src/ui/search/index.ts +11 -0
- package/src/ui/search/search-bar.tsx +83 -0
- package/src/ui/search/search-suggestion-list.tsx +103 -0
- package/src/ui/search/search-suggestion-utils.test.ts +9 -0
- package/src/ui/search/search-suggestion-utils.ts +8 -0
- package/src/ui/search/types.ts +52 -0
- package/src/ui/typography/blockquote-base.tsx +39 -0
- package/src/ui/typography/blockquote.tsx +8 -0
- package/src/ui/typography/code-block-base.tsx +37 -0
- package/src/ui/typography/code-block.tsx +8 -0
- package/src/ui/typography/heading-base.tsx +59 -0
- package/src/ui/typography/heading.tsx +8 -0
- package/src/ui/typography/index.ts +28 -0
- package/src/ui/typography/inline-code-base.tsx +27 -0
- package/src/ui/typography/inline-code.tsx +8 -0
- package/src/ui/typography/list-base.tsx +88 -0
- package/src/ui/typography/list.tsx +15 -0
- package/src/ui/typography/text-base.tsx +43 -0
- package/src/ui/typography/text.tsx +8 -0
- package/src/ui/typography/types.ts +90 -0
- package/src/ui/typography/typography.test.tsx +80 -0
- package/src/ui/typography/variants.ts +72 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/ui/search/search-bar.tsx","../../src/ui/search/search-suggestion-utils.ts","../../src/ui/search/search-suggestion-list.tsx","../../src/ui/search/filter-search-suggestions.ts"],"names":["SearchBar","jsx","jsxs"],"mappings":";;;;;AASO,IAAM,SAAA,GAAY,SAASA,UAAAA,CAChC;AAAA,EACE,KAAA;AAAA,EACA,aAAA;AAAA,EACA,WAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,UAAA,GAAa,SAAA;AAAA,EACb,SAAA,GAAY,IAAA;AAAA,EACZ,IAAA,GAAO,IAAA;AAAA,EACP,EAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,iBAAA;AAAA,EACA,sBAAA;AAAA,EACA,gBAAA;AAAA,EACA,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EACA;AACA,EAAA,MAAM,cAAc,KAAA,EAAM;AAC1B,EAAA,MAAM,YAAY,EAAA,IAAM,WAAA;AACxB,EAAA,MAAM,QAAA,GAAW,QAAQ,iBAAiB,CAAA;AAE1C,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,WAAA,EAAU,YAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,2CAAA,EAA6C,SAAS,CAAA;AAAA,MAEnE,QAAA,EAAA;AAAA,QAAA,WAAA,mBACC,GAAA;AAAA,UAAC,MAAA;AAAA,UAAA;AAAA,YACC,SAAA,EAAU,qGAAA;AAAA,YACV,aAAA,EAAW,IAAA;AAAA,YAEV,QAAA,EAAA;AAAA;AAAA,SACH,GACE,IAAA;AAAA,wBACJ,GAAA;AAAA,UAAC,OAAA;AAAA,UAAA;AAAA,YACC,GAAA;AAAA,YACA,EAAA,EAAI,SAAA;AAAA,YACJ,MAAM,IAAA,IAAQ,QAAA;AAAA,YACd,YAAA,EAAa,KAAA;AAAA,YACb,UAAA,EAAY,KAAA;AA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;AAAA,EAClE,KAAA;AAAA,EACA,KAAA;AAAA,EACA,OAAA,GAAU,EAAE,UAAA,EAAY,EAAA;AAC1B,CAAA,EAIQ;AACN,EAAA,MAAM,UAAA,GAAa,QAAQ,UAAA,IAAc,EAAA;AACzC,EAAA,MAAM,UAAA,GAAa,KAAA,CAAM,IAAA,EAAK,CAAE,WAAA,EAAY;AAC5C,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA,OAAO,EAAC;AAAA,EACV;AAEA,EAAA,MAAM,UAAe,EAAC;AACtB,EAAA,KAAA,MAAW,QAAQ,KAAA,EAAO;AACxB,IAAA,MAAM,OAAA,GACJ,IAAA,CAAK,KAAA,CAAM,WAAA,GAAc,QAAA,CAAS,UAAU,CAAA,IAC3C,IAAA,CAAK,WAAA,EAAa,WAAA,EAAY,CAAE,QAAA,CAAS,UAAU,CAAA,IACnD,IAAA,CAAK,IAAA,EAAM,WAAA,EAAY,CAAE,QAAA,CAAS,UAAU,CAAA,IAC5C,KAAK,QAAA,EAAU,IAAA,CAAK,CAAC,CAAA,KAAM,CAAA,CAAE,WAAA,EAAY,CAAE,QAAA,CAAS,UAAU,CAAC,CAAA;AAElE,IAAA,IAAI,OAAA,EAAS;AACX,MAAA,OAAA,CAAQ,KAAK,IAAI,CAAA;AACjB,MAAA,IAAI,OAAA,CAAQ,MAAA,IAAU,UAAA,IAAc,UAAA,IAAc,CAAA,EAAG;AACnD,QAAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,EAAA,OAAO,OAAA;AACT","file":"search.mjs","sourcesContent":["\"use client\";\n\nimport { useId } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { inputVariants } from \"../inputs/variants\";\n\nimport type { SearchBarProps } from \"./types\";\n\nexport const SearchBar = function SearchBar(\n {\n value,\n onValueChange,\n leadingSlot,\n className,\n inputClassName,\n appearance = \"default\",\n inputSize = \"md\",\n ring = true,\n id,\n onChange,\n disabled,\n type,\n comboboxListboxId,\n comboboxActiveOptionId,\n comboboxExpanded,\n ref,\n ...rest\n }: SearchBarProps,\n) {\n const generatedId = useId();\n const controlId = id ?? generatedId;\n const combobox = Boolean(comboboxListboxId);\n\n return (\n <div\n data-slot=\"search-bar\"\n className={cn(\"relative flex w-full min-w-0 items-center\", className)}\n >\n {leadingSlot ? (\n <span\n className=\"pointer-events-none absolute left-3 top-1/2 z-1 flex -translate-y-1/2 text-slate-400 [&_svg]:size-4\"\n aria-hidden\n >\n {leadingSlot}\n </span>\n ) : null}\n <input\n ref={ref}\n id={controlId}\n type={type ?? \"search\"}\n autoComplete=\"off\"\n spellCheck={false}\n disabled={disabled}\n value={value}\n data-slot=\"search-bar-input\"\n className={cn(\n inputVariants({ appearance, size: inputSize, ring, as: \"input\" }),\n leadingSlot ? \"pl-10\" : null,\n inputClassName,\n )}\n onChange={(event) => {\n onChange?.(event);\n onValueChange?.(event.target.value);\n }}\n {...(combobox\n ? {\n role: \"combobox\" as const,\n \"aria-autocomplete\": \"list\" as const,\n \"aria-controls\": comboboxListboxId,\n \"aria-expanded\": comboboxExpanded ?? false,\n ...(comboboxActiveOptionId\n ? { \"aria-activedescendant\": comboboxActiveOptionId }\n : {}),\n }\n : {})}\n {...rest}\n />\n </div>\n );\n}\n\nSearchBar.displayName = \"SearchBar\";\n","/**\n * Builds a stable DOM id for a listbox option so `aria-activedescendant` on the combobox\n * input can reference it. Safe for href-like `itemId` strings.\n */\nexport function searchSuggestionOptionDomId(listboxId: string, itemId: string): string {\n const safe = itemId.replace(/[^a-zA-Z0-9_-]/g, \"_\");\n return `${listboxId}_opt_${safe}`;\n}\n","\"use client\";\n\nimport { Fragment } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { searchSuggestionOptionDomId } from \"./search-suggestion-utils\";\n\nimport type { SearchSuggestionListProps } from \"./types\";\n\nconst rowClassName =\n \"flex w-full flex-col gap-0.5 rounded-lg px-3 py-2.5 text-left text-sm transition-colors hover:bg-white/5 focus-visible:bg-white/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cyan-400/50\";\n\nexport function SearchSuggestionList({\n items,\n onSelect,\n activeId,\n onActiveIdChange,\n listboxId,\n className,\n listClassName,\n emptyLabel,\n}: SearchSuggestionListProps) {\n if (items.length === 0) {\n return (\n <div\n data-slot=\"search-suggestion-list-empty\"\n className={cn(\"px-1 py-6 text-center text-sm text-slate-500\", className)}\n >\n {emptyLabel ?? \"No matches.\"}\n </div>\n );\n }\n\n const useListbox = Boolean(listboxId);\n\n const rows: Array<{\n item: (typeof items)[number];\n showGroup: boolean;\n }> = [];\n let lastGroupSeen: string | undefined;\n for (const item of items) {\n const showGroup = Boolean(item.group && item.group !== lastGroupSeen);\n if (item.group) {\n lastGroupSeen = item.group;\n }\n rows.push({ item, showGroup });\n }\n\n return (\n <nav\n data-slot=\"search-suggestion-list\"\n aria-label=\"Search results\"\n className={cn(\"flex max-h-[min(50vh,360px)] flex-col gap-1 overflow-y-auto pr-1\", className)}\n >\n <div\n {...(useListbox\n ? {\n id: listboxId,\n role: \"listbox\" as const,\n }\n : {})}\n className={cn(\"flex flex-col gap-0.5\", listClassName)}\n >\n {rows.map(({ item, showGroup }) => {\n const isActive = activeId === item.id;\n const optionDomId =\n useListbox && listboxId ? searchSuggestionOptionDomId(listboxId, item.id) : undefined;\n return (\n <Fragment key={item.id}>\n {showGroup ? (\n <div\n role=\"presentation\"\n className=\"sticky top-0 z-1 bg-slate-950/95 px-2 pb-1 pt-2 text-xs font-semibold uppercase tracking-wide text-slate-500 backdrop-blur-sm\"\n >\n {item.group}\n </div>\n ) : null}\n <button\n type=\"button\"\n id={optionDomId}\n role={useListbox ? \"option\" : undefined}\n aria-selected={useListbox ? isActive : undefined}\n data-active={isActive ? \"\" : undefined}\n className={cn(rowClassName, isActive ? \"bg-white/5\" : null)}\n onMouseEnter={() => onActiveIdChange?.(item.id)}\n onFocus={() => onActiveIdChange?.(item.id)}\n onClick={() => onSelect(item.id)}\n >\n <span className=\"font-medium text-slate-100\">{item.label}</span>\n {item.description ? (\n <span className=\"truncate text-xs text-slate-500\">{item.description}</span>\n ) : null}\n </button>\n </Fragment>\n );\n })}\n </div>\n </nav>\n );\n}\n\nSearchSuggestionList.displayName = \"SearchSuggestionList\";\n\n","import type { SearchFilterable } from \"./types\";\n\nexport type FilterSearchSuggestionsOptions = {\n /** Maximum number of matches returned. */\n maxResults?: number;\n};\n\n/**\n * Returns items whose label, description, href, or keywords contain the query (case-insensitive).\n * Whitespace-only query matches no items.\n */\nexport function filterSearchSuggestions<T extends SearchFilterable>({\n query,\n items,\n options = { maxResults: 20 },\n}: {\n query: string;\n items: readonly T[];\n options?: FilterSearchSuggestionsOptions;\n}): T[] {\n const maxResults = options.maxResults ?? 20;\n const normalized = query.trim().toLowerCase();\n if (!normalized) {\n return [];\n }\n\n const matches: T[] = [];\n for (const item of items) {\n const isMatch =\n item.label.toLowerCase().includes(normalized) ||\n (item.description?.toLowerCase().includes(normalized)) ||\n (item.href?.toLowerCase().includes(normalized)) ||\n (item.keywords?.some((k) => k.toLowerCase().includes(normalized)));\n\n if (isMatch) {\n matches.push(item);\n if (matches.length >= maxResults || maxResults <= 0) {\n break;\n }\n }\n }\n return matches;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockquote-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/blockquote-base.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,eAAO,MAAM,cAAc;YAAW,eAAe;;CA6BpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/blockquote.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU;YAAW,eAAe;;CAEhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/code-block-base.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,eAAO,MAAM,aAAa;YAAW,cAAc;;CA2BlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/code-block.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,eAAO,MAAM,SAAS;YAAW,cAAc;;CAE9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/heading-base.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAe5C,eAAO,MAAM,WAAW;YAAW,YAAY;;CAqC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/heading.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,eAAO,MAAM,OAAO;YAAW,YAAY;;CAE1C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { Heading } from "./heading";
|
|
2
|
+
export { Text } from "./text";
|
|
3
|
+
export { List, ListItem } from "./list";
|
|
4
|
+
export { Blockquote } from "./blockquote";
|
|
5
|
+
export { InlineCode } from "./inline-code";
|
|
6
|
+
export { CodeBlock } from "./code-block";
|
|
7
|
+
export type { BlockquoteProps, CodeBlockProps, HeadingLevel, HeadingProps, InlineCodeProps, ListItemProps, ListProps, TextElement, TextProps, TypographyTone, UnorderedMarker, } from "./types";
|
|
8
|
+
export { headingLevelVariants, orderedListVariants, textSizeVariants, typographyToneVariants, unorderedListMarkerVariants, } from "./variants";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,YAAY,EACV,eAAe,EACf,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,aAAa,EACb,SAAS,EACT,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-code-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/inline-code-base.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG/C,eAAO,MAAM,cAAc;YAAW,eAAe;;CAiBpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline-code.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/inline-code.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU;YAAW,eAAe;;CAEhD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ListProps, ListItemProps } from "./types";
|
|
2
|
+
export declare function ListBase(props: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare namespace ListBase {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ListItemBase(props: ListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace ListItemBase {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=list-base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/list-base.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAOxD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,SAAS,2CA2DxC;yBA3De,QAAQ;;;AA+DxB,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,2CAahD;yBAbe,YAAY"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ListProps } from "./types";
|
|
2
|
+
import { ListItemBase } from "./list-base";
|
|
3
|
+
export declare const ListItem: typeof ListItemBase;
|
|
4
|
+
declare function ListRoot(props: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare namespace ListRoot {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const List: typeof ListRoot & {
|
|
9
|
+
Item: typeof ListItemBase;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAY,YAAY,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,QAAQ,qBAAe,CAAC;AAErC,iBAAS,QAAQ,CAAC,KAAK,EAAE,SAAS,2CAEjC;kBAFQ,QAAQ;;;AAIjB,eAAO,MAAM,IAAI;;CAEf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-base.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/text-base.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,eAAO,MAAM,QAAQ;YAAW,SAAS;;CAmCxC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI;YAAW,SAAS;;CAEpC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import type { ComponentProps, HTMLAttributes, RefObject } from "react";
|
|
3
|
+
import type { textSizeVariants, typographyToneVariants, unorderedListMarkerVariants } from "./variants";
|
|
4
|
+
export type TypographyTone = NonNullable<VariantProps<typeof typographyToneVariants>["tone"]>;
|
|
5
|
+
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
6
|
+
export type HeadingProps = Omit<ComponentProps<"h1">, "color"> & {
|
|
7
|
+
level: HeadingLevel;
|
|
8
|
+
/** Visual scale; defaults to `level`. */
|
|
9
|
+
displayLevel?: HeadingLevel;
|
|
10
|
+
tone?: TypographyTone;
|
|
11
|
+
bold?: boolean;
|
|
12
|
+
italic?: boolean;
|
|
13
|
+
underline?: boolean;
|
|
14
|
+
strikethrough?: boolean;
|
|
15
|
+
ref?: RefObject<HTMLHeadingElement>;
|
|
16
|
+
};
|
|
17
|
+
export type TextElement = "p" | "span" | "div" | "label";
|
|
18
|
+
export type TextProps = Omit<HTMLAttributes<HTMLElement>, "color"> & {
|
|
19
|
+
as?: TextElement;
|
|
20
|
+
size?: NonNullable<VariantProps<typeof textSizeVariants>["size"]>;
|
|
21
|
+
tone?: TypographyTone;
|
|
22
|
+
bold?: boolean;
|
|
23
|
+
italic?: boolean;
|
|
24
|
+
underline?: boolean;
|
|
25
|
+
strikethrough?: boolean;
|
|
26
|
+
highlight?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type UnorderedMarker = NonNullable<VariantProps<typeof unorderedListMarkerVariants>["marker"]>;
|
|
29
|
+
export type ListProps = (Omit<ComponentProps<"ul">, "color"> & {
|
|
30
|
+
ordered?: false;
|
|
31
|
+
marker?: UnorderedMarker;
|
|
32
|
+
tone?: TypographyTone;
|
|
33
|
+
}) | (Omit<ComponentProps<"ol">, "color"> & {
|
|
34
|
+
ordered: true;
|
|
35
|
+
marker?: undefined;
|
|
36
|
+
tone?: TypographyTone;
|
|
37
|
+
});
|
|
38
|
+
export type ListItemProps = ComponentProps<"li"> & {
|
|
39
|
+
ref?: RefObject<HTMLLIElement>;
|
|
40
|
+
};
|
|
41
|
+
export type BlockquoteProps = ComponentProps<"blockquote"> & {
|
|
42
|
+
tone?: TypographyTone;
|
|
43
|
+
/** Attribution label shown in a footer (distinct from the HTML `cite` URL attribute). */
|
|
44
|
+
attribution?: string;
|
|
45
|
+
ref?: RefObject<HTMLQuoteElement>;
|
|
46
|
+
};
|
|
47
|
+
export type InlineCodeProps = Omit<ComponentProps<"code">, "color"> & {
|
|
48
|
+
tone?: TypographyTone;
|
|
49
|
+
};
|
|
50
|
+
export type CodeBlockProps = Omit<ComponentProps<"pre">, "color"> & {
|
|
51
|
+
tone?: TypographyTone;
|
|
52
|
+
/** Hint for stacked highlighting stacks / aria-labels. */
|
|
53
|
+
language?: string;
|
|
54
|
+
ref?: RefObject<HTMLPreElement>;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,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AI,CAC/B,cAAc,CAAC,KAAK,CAAC,EACrB,OAAO,CACR,GAAG;IACF,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACjC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** Semantic text colors aligned with slate/cyan/violet accents used across the kit (dark-first). */
|
|
2
|
+
export declare const typographyToneVariants: (props?: ({
|
|
3
|
+
tone?: "error" | "default" | "secondary" | "destructive" | "success" | "warning" | "info" | "muted" | "primary" | "accent" | "gradient-pink-violet" | "gradient-cyan-violet" | "gradient-cyan-blue" | "gradient-cyan-green" | "gradient-cyan-orange" | "gradient-cyan-red" | "gradient-cyan-purple" | "gradient-cyan-pink" | null | undefined;
|
|
4
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
|
+
export declare const headingLevelVariants: (props?: ({
|
|
6
|
+
level?: 1 | 2 | 3 | 4 | 6 | 5 | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const textSizeVariants: (props?: ({
|
|
9
|
+
size?: "base" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
/** Marker style for unordered lists; ignored when `ordered` is true (decimal numbering). */
|
|
12
|
+
export declare const unorderedListMarkerVariants: (props?: ({
|
|
13
|
+
marker?: "circle" | "none" | "disc" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const orderedListVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
16
|
+
//# sourceMappingURL=variants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/ui/typography/variants.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,eAAO,MAAM,sBAAsB;;8EA0BjC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;8EAW/B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;8EAW3B,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B;;8EAWtC,CAAC;AAEH,eAAO,MAAM,mBAAmB,oFAAqC,CAAC"}
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkUOZYPWDZ_js = require('../chunk-UOZYPWDZ.js');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
|
|
8
|
+
var typographyToneVariants = classVarianceAuthority.cva("", {
|
|
9
|
+
variants: {
|
|
10
|
+
tone: {
|
|
11
|
+
default: "text-slate-50 border-white/15",
|
|
12
|
+
muted: "text-slate-400 border-white/15",
|
|
13
|
+
primary: "text-cyan-300 border-cyan-300/40",
|
|
14
|
+
secondary: "text-slate-300 border-white/15",
|
|
15
|
+
accent: "text-violet-300 border-violet-300/40",
|
|
16
|
+
destructive: "text-rose-400 border-rose-300/40",
|
|
17
|
+
info: "text-sky-300 border-sky-300/40",
|
|
18
|
+
success: "text-emerald-300 border-emerald-300/40",
|
|
19
|
+
warning: "text-amber-300 border-amber-300/40",
|
|
20
|
+
error: "text-red-300 border-red-300/40",
|
|
21
|
+
"gradient-pink-violet": "bg-linear-to-r from-pink-400 to-violet-400 bg-clip-text text-transparent",
|
|
22
|
+
"gradient-cyan-violet": "bg-linear-to-r from-cyan-400 to-violet-400 bg-clip-text text-transparent",
|
|
23
|
+
"gradient-cyan-blue": "bg-linear-to-r from-cyan-400 to-blue-400 bg-clip-text text-transparent",
|
|
24
|
+
"gradient-cyan-green": "bg-linear-to-r from-cyan-400 to-green-400 bg-clip-text text-transparent",
|
|
25
|
+
"gradient-cyan-orange": "bg-linear-to-r from-cyan-400 to-orange-400 bg-clip-text text-transparent",
|
|
26
|
+
"gradient-cyan-red": "bg-linear-to-r from-cyan-400 to-red-400 bg-clip-text text-transparent",
|
|
27
|
+
"gradient-cyan-purple": "bg-linear-to-r from-cyan-400 to-purple-400 bg-clip-text text-transparent",
|
|
28
|
+
"gradient-cyan-pink": "bg-linear-to-r from-cyan-400 to-pink-400 bg-clip-text text-transparent"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
tone: "default"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
var headingLevelVariants = classVarianceAuthority.cva("scroll-m-20", {
|
|
36
|
+
variants: {
|
|
37
|
+
level: {
|
|
38
|
+
1: "text-4xl font-bold tracking-tight md:text-5xl",
|
|
39
|
+
2: "text-3xl font-semibold tracking-tight",
|
|
40
|
+
3: "text-2xl font-semibold tracking-tight",
|
|
41
|
+
4: "text-xl font-semibold tracking-tight",
|
|
42
|
+
5: "text-lg font-medium",
|
|
43
|
+
6: "text-base font-medium"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
var textSizeVariants = classVarianceAuthority.cva("", {
|
|
48
|
+
variants: {
|
|
49
|
+
size: {
|
|
50
|
+
sm: "text-sm leading-relaxed",
|
|
51
|
+
base: "text-base leading-relaxed",
|
|
52
|
+
lg: "text-lg leading-relaxed"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: {
|
|
56
|
+
size: "base"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var unorderedListMarkerVariants = classVarianceAuthority.cva("space-y-2 pl-5", {
|
|
60
|
+
variants: {
|
|
61
|
+
marker: {
|
|
62
|
+
disc: "list-disc",
|
|
63
|
+
circle: "[list-style-type:circle]",
|
|
64
|
+
none: "list-none pl-0"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
marker: "disc"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var orderedListVariants = classVarianceAuthority.cva("list-decimal space-y-2 pl-5");
|
|
72
|
+
var HEADING_TAGS = {
|
|
73
|
+
1: "h1",
|
|
74
|
+
2: "h2",
|
|
75
|
+
3: "h3",
|
|
76
|
+
4: "h4",
|
|
77
|
+
5: "h5",
|
|
78
|
+
6: "h6"
|
|
79
|
+
};
|
|
80
|
+
var HeadingBase = (props) => {
|
|
81
|
+
const {
|
|
82
|
+
level,
|
|
83
|
+
displayLevel,
|
|
84
|
+
tone,
|
|
85
|
+
bold,
|
|
86
|
+
italic,
|
|
87
|
+
underline,
|
|
88
|
+
strikethrough,
|
|
89
|
+
ref,
|
|
90
|
+
className,
|
|
91
|
+
children,
|
|
92
|
+
...rest
|
|
93
|
+
} = props;
|
|
94
|
+
const Tag = HEADING_TAGS[level];
|
|
95
|
+
const scale = displayLevel ?? level;
|
|
96
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
+
Tag,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
"data-slot": "typography-heading",
|
|
101
|
+
"data-level": level,
|
|
102
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
103
|
+
typographyToneVariants({ tone }),
|
|
104
|
+
headingLevelVariants({ level: scale }),
|
|
105
|
+
bold && "font-bold",
|
|
106
|
+
italic && "italic",
|
|
107
|
+
underline && "underline underline-offset-4",
|
|
108
|
+
strikethrough && "line-through",
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...rest,
|
|
112
|
+
children
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
HeadingBase.displayName = "Heading";
|
|
117
|
+
var Heading = (props) => {
|
|
118
|
+
return /* @__PURE__ */ jsxRuntime.jsx(HeadingBase, { ...props });
|
|
119
|
+
};
|
|
120
|
+
Heading.displayName = "Heading";
|
|
121
|
+
var TextBase = (props) => {
|
|
122
|
+
const {
|
|
123
|
+
as = "p",
|
|
124
|
+
size = "base",
|
|
125
|
+
tone,
|
|
126
|
+
bold,
|
|
127
|
+
italic,
|
|
128
|
+
underline,
|
|
129
|
+
strikethrough,
|
|
130
|
+
highlight,
|
|
131
|
+
className,
|
|
132
|
+
children,
|
|
133
|
+
...rest
|
|
134
|
+
} = props;
|
|
135
|
+
const Component = as;
|
|
136
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
+
Component,
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "typography-text",
|
|
140
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
141
|
+
typographyToneVariants({ tone }),
|
|
142
|
+
textSizeVariants({ size }),
|
|
143
|
+
bold && "font-semibold",
|
|
144
|
+
italic && "italic",
|
|
145
|
+
underline && "underline underline-offset-2",
|
|
146
|
+
strikethrough && "line-through",
|
|
147
|
+
highlight && "rounded bg-amber-400/15 px-0.5",
|
|
148
|
+
className
|
|
149
|
+
),
|
|
150
|
+
...rest,
|
|
151
|
+
children
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
TextBase.displayName = "Text";
|
|
156
|
+
var Text = (props) => {
|
|
157
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextBase, { ...props });
|
|
158
|
+
};
|
|
159
|
+
Text.displayName = "Text";
|
|
160
|
+
function ListBase(props) {
|
|
161
|
+
if ("ordered" in props && props.ordered === true) {
|
|
162
|
+
const {
|
|
163
|
+
tone: tone2,
|
|
164
|
+
className: className2,
|
|
165
|
+
children: children2,
|
|
166
|
+
ref: ref2,
|
|
167
|
+
ordered: ordered2,
|
|
168
|
+
marker: marker2,
|
|
169
|
+
...rest2
|
|
170
|
+
} = props;
|
|
171
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
172
|
+
"ol",
|
|
173
|
+
{
|
|
174
|
+
ref: ref2,
|
|
175
|
+
"data-slot": "typography-list",
|
|
176
|
+
"data-list-type": "ordered",
|
|
177
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
178
|
+
typographyToneVariants({ tone: tone2 }),
|
|
179
|
+
orderedListVariants(),
|
|
180
|
+
className2
|
|
181
|
+
),
|
|
182
|
+
...rest2,
|
|
183
|
+
children: children2
|
|
184
|
+
}
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
const {
|
|
188
|
+
marker = "disc",
|
|
189
|
+
tone,
|
|
190
|
+
className,
|
|
191
|
+
children,
|
|
192
|
+
ref,
|
|
193
|
+
ordered,
|
|
194
|
+
...rest
|
|
195
|
+
} = props;
|
|
196
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
197
|
+
"ul",
|
|
198
|
+
{
|
|
199
|
+
ref,
|
|
200
|
+
"data-slot": "typography-list",
|
|
201
|
+
"data-list-type": "unordered",
|
|
202
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
203
|
+
typographyToneVariants({ tone }),
|
|
204
|
+
unorderedListMarkerVariants({ marker }),
|
|
205
|
+
className
|
|
206
|
+
),
|
|
207
|
+
...rest,
|
|
208
|
+
children
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
ListBase.displayName = "List";
|
|
213
|
+
function ListItemBase(props) {
|
|
214
|
+
const { className, children, ref, ...rest } = props;
|
|
215
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
216
|
+
"li",
|
|
217
|
+
{
|
|
218
|
+
ref,
|
|
219
|
+
"data-slot": "typography-list-item",
|
|
220
|
+
className: chunkUOZYPWDZ_js.cn("leading-relaxed", className),
|
|
221
|
+
...rest,
|
|
222
|
+
children
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
ListItemBase.displayName = "ListItem";
|
|
227
|
+
var ListItem = ListItemBase;
|
|
228
|
+
function ListRoot(props) {
|
|
229
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ListBase, { ...props });
|
|
230
|
+
}
|
|
231
|
+
var List = Object.assign(ListRoot, {
|
|
232
|
+
Item: ListItem
|
|
233
|
+
});
|
|
234
|
+
ListRoot.displayName = "List";
|
|
235
|
+
var BlockquoteBase = (props) => {
|
|
236
|
+
const {
|
|
237
|
+
tone,
|
|
238
|
+
attribution,
|
|
239
|
+
className,
|
|
240
|
+
children,
|
|
241
|
+
ref,
|
|
242
|
+
...rest
|
|
243
|
+
} = props;
|
|
244
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
245
|
+
"blockquote",
|
|
246
|
+
{
|
|
247
|
+
ref,
|
|
248
|
+
"data-slot": "typography-blockquote",
|
|
249
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
250
|
+
typographyToneVariants({ tone }),
|
|
251
|
+
"border-l-4 py-1 pl-4 italic",
|
|
252
|
+
className
|
|
253
|
+
),
|
|
254
|
+
...rest,
|
|
255
|
+
children: [
|
|
256
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 leading-relaxed", children }),
|
|
257
|
+
attribution ? /* @__PURE__ */ jsxRuntime.jsx("footer", { className: "mt-3 text-sm not-italic", children: /* @__PURE__ */ jsxRuntime.jsx("cite", { children: attribution }) }) : null
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
);
|
|
261
|
+
};
|
|
262
|
+
BlockquoteBase.displayName = "Blockquote";
|
|
263
|
+
var Blockquote = (props) => {
|
|
264
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BlockquoteBase, { ...props });
|
|
265
|
+
};
|
|
266
|
+
Blockquote.displayName = "Blockquote";
|
|
267
|
+
var InlineCodeBase = (props) => {
|
|
268
|
+
const { tone, className, children, ref, ...rest } = props;
|
|
269
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
270
|
+
"code",
|
|
271
|
+
{
|
|
272
|
+
ref,
|
|
273
|
+
"data-slot": "typography-inline-code",
|
|
274
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
275
|
+
typographyToneVariants({ tone }),
|
|
276
|
+
"rounded-md border border-white/10 bg-white/6 px-1.5 py-0.5 font-mono text-[0.925em] font-normal",
|
|
277
|
+
className
|
|
278
|
+
),
|
|
279
|
+
...rest,
|
|
280
|
+
children
|
|
281
|
+
}
|
|
282
|
+
);
|
|
283
|
+
};
|
|
284
|
+
InlineCodeBase.displayName = "InlineCode";
|
|
285
|
+
var InlineCode = (props) => {
|
|
286
|
+
return /* @__PURE__ */ jsxRuntime.jsx(InlineCodeBase, { ...props });
|
|
287
|
+
};
|
|
288
|
+
InlineCode.displayName = "InlineCode";
|
|
289
|
+
var CodeBlockBase = (props) => {
|
|
290
|
+
const {
|
|
291
|
+
tone,
|
|
292
|
+
language,
|
|
293
|
+
className,
|
|
294
|
+
children,
|
|
295
|
+
ref,
|
|
296
|
+
...rest
|
|
297
|
+
} = props;
|
|
298
|
+
const ariaLabel = language ? `Code sample (${language})` : "Code sample";
|
|
299
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
300
|
+
"pre",
|
|
301
|
+
{
|
|
302
|
+
ref,
|
|
303
|
+
"data-slot": "typography-code-block",
|
|
304
|
+
"aria-label": ariaLabel,
|
|
305
|
+
className: chunkUOZYPWDZ_js.cn(
|
|
306
|
+
typographyToneVariants({ tone }),
|
|
307
|
+
"overflow-x-auto rounded-xl border border-white/10 bg-slate-950/80 p-4 text-sm leading-relaxed shadow-inner shadow-slate-950/40",
|
|
308
|
+
className
|
|
309
|
+
),
|
|
310
|
+
...rest,
|
|
311
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("code", { className: "font-mono text-[0.95em] whitespace-pre-wrap wrap-break-word", children })
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
};
|
|
315
|
+
CodeBlockBase.displayName = "CodeBlock";
|
|
316
|
+
var CodeBlock = (props) => {
|
|
317
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CodeBlockBase, { ...props });
|
|
318
|
+
};
|
|
319
|
+
CodeBlock.displayName = "CodeBlock";
|
|
320
|
+
|
|
321
|
+
exports.Blockquote = Blockquote;
|
|
322
|
+
exports.CodeBlock = CodeBlock;
|
|
323
|
+
exports.Heading = Heading;
|
|
324
|
+
exports.InlineCode = InlineCode;
|
|
325
|
+
exports.List = List;
|
|
326
|
+
exports.ListItem = ListItem;
|
|
327
|
+
exports.Text = Text;
|
|
328
|
+
exports.headingLevelVariants = headingLevelVariants;
|
|
329
|
+
exports.orderedListVariants = orderedListVariants;
|
|
330
|
+
exports.textSizeVariants = textSizeVariants;
|
|
331
|
+
exports.typographyToneVariants = typographyToneVariants;
|
|
332
|
+
exports.unorderedListMarkerVariants = unorderedListMarkerVariants;
|
|
333
|
+
//# sourceMappingURL=typography.js.map
|
|
334
|
+
//# sourceMappingURL=typography.js.map
|