@tetherto/dev-websites-core 0.2.0 → 0.3.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/README.md +62 -9
- package/dist/cms/index.d.mts +3 -0
- package/dist/cms/index.mjs +3 -0
- package/dist/cms.mjs +1419 -0
- package/dist/cms.mjs.map +1 -0
- package/dist/i18n/index.d.mts +2 -0
- package/dist/i18n/index.mjs +2 -0
- package/dist/i18n.mjs +10 -0
- package/dist/i18n.mjs.map +1 -0
- package/dist/index.d.mts +214 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +7 -0
- package/dist/index2.d.mts +8 -0
- package/dist/index2.d.mts.map +1 -0
- package/dist/index3.d.mts +63 -0
- package/dist/index3.d.mts.map +1 -0
- package/dist/index4.d.mts +23 -0
- package/dist/index4.d.mts.map +1 -0
- package/dist/index5.d.mts +6 -0
- package/dist/logger.mjs +44 -0
- package/dist/logger.mjs.map +1 -0
- package/dist/readMediaBuffer.d.mts +15 -0
- package/dist/readMediaBuffer.d.mts.map +1 -0
- package/dist/readMediaBuffer.mjs +62 -0
- package/dist/readMediaBuffer.mjs.map +1 -0
- package/dist/seo/index.d.mts +2 -0
- package/dist/seo/index.mjs +2 -0
- package/dist/seo.mjs +124 -0
- package/dist/seo.mjs.map +1 -0
- package/dist/ui/a11y/focus.d.mts +6 -0
- package/dist/ui/a11y/focus.d.mts.map +1 -0
- package/dist/ui/a11y/focus.mjs +7 -0
- package/dist/ui/a11y/focus.mjs.map +1 -0
- package/dist/ui/a11y/index.d.mts +4 -0
- package/dist/ui/a11y/index.mjs +4 -0
- package/dist/ui/carousel/index.d.mts +3 -0
- package/dist/ui/carousel/index.mjs +3 -0
- package/dist/ui/components/Accordion/Accordion.d.mts +16 -0
- package/dist/ui/components/Accordion/Accordion.d.mts.map +1 -0
- package/dist/ui/components/Accordion/Accordion.mjs +51 -0
- package/dist/ui/components/Accordion/Accordion.mjs.map +1 -0
- package/dist/ui/components/Accordion/index.d.mts +2 -0
- package/dist/ui/components/Accordion/index.mjs +2 -0
- package/dist/ui/components/Avatar/Avatar.d.mts +9 -0
- package/dist/ui/components/Avatar/Avatar.d.mts.map +1 -0
- package/dist/ui/components/Avatar/Avatar.mjs +15 -0
- package/dist/ui/components/Avatar/Avatar.mjs.map +1 -0
- package/dist/ui/components/Avatar/index.d.mts +2 -0
- package/dist/ui/components/Avatar/index.mjs +2 -0
- package/dist/ui/components/Badge/Badge.d.mts +14 -0
- package/dist/ui/components/Badge/Badge.d.mts.map +1 -0
- package/dist/ui/components/Badge/Badge.mjs +30 -0
- package/dist/ui/components/Badge/Badge.mjs.map +1 -0
- package/dist/ui/components/Badge/index.d.mts +2 -0
- package/dist/ui/components/Badge/index.mjs +2 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts +24 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.d.mts.map +1 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.mjs +66 -0
- package/dist/ui/components/BadgeVersion/BadgeVersion.mjs.map +1 -0
- package/dist/ui/components/BadgeVersion/index.d.mts +2 -0
- package/dist/ui/components/BadgeVersion/index.mjs +2 -0
- package/dist/ui/components/Button/Button.d.mts +14 -0
- package/dist/ui/components/Button/Button.d.mts.map +1 -0
- package/dist/ui/components/Button/Button.mjs +48 -0
- package/dist/ui/components/Button/Button.mjs.map +1 -0
- package/dist/ui/components/Button/index.d.mts +2 -0
- package/dist/ui/components/Button/index.mjs +2 -0
- package/dist/ui/components/Card/Card.d.mts +14 -0
- package/dist/ui/components/Card/Card.d.mts.map +1 -0
- package/dist/ui/components/Card/Card.mjs +40 -0
- package/dist/ui/components/Card/Card.mjs.map +1 -0
- package/dist/ui/components/Card/index.d.mts +2 -0
- package/dist/ui/components/Card/index.mjs +2 -0
- package/dist/ui/components/Carousel/Carousel.d.mts +42 -0
- package/dist/ui/components/Carousel/Carousel.d.mts.map +1 -0
- package/dist/ui/components/Carousel/Carousel.mjs +164 -0
- package/dist/ui/components/Carousel/Carousel.mjs.map +1 -0
- package/dist/ui/components/Carousel/index.d.mts +2 -0
- package/dist/ui/components/Carousel/index.mjs +2 -0
- package/dist/ui/components/Checkbox/Checkbox.d.mts +8 -0
- package/dist/ui/components/Checkbox/Checkbox.d.mts.map +1 -0
- package/dist/ui/components/Checkbox/Checkbox.mjs +39 -0
- package/dist/ui/components/Checkbox/Checkbox.mjs.map +1 -0
- package/dist/ui/components/Checkbox/index.d.mts +2 -0
- package/dist/ui/components/Checkbox/index.mjs +2 -0
- package/dist/ui/components/CodeBlock/CodeBlock.d.mts +22 -0
- package/dist/ui/components/CodeBlock/CodeBlock.d.mts.map +1 -0
- package/dist/ui/components/CodeBlock/CodeBlock.mjs +66 -0
- package/dist/ui/components/CodeBlock/CodeBlock.mjs.map +1 -0
- package/dist/ui/components/CodeBlock/index.d.mts +2 -0
- package/dist/ui/components/CodeBlock/index.mjs +2 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts +19 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.d.mts.map +1 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs +59 -0
- package/dist/ui/components/CodeBlockTabs/CodeBlockTabs.mjs.map +1 -0
- package/dist/ui/components/CodeBlockTabs/index.d.mts +2 -0
- package/dist/ui/components/CodeBlockTabs/index.mjs +2 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts +13 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.d.mts.map +1 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs +55 -0
- package/dist/ui/components/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
- package/dist/ui/components/CollapsibleSection/index.d.mts +2 -0
- package/dist/ui/components/CollapsibleSection/index.mjs +2 -0
- package/dist/ui/components/CopyButton/CopyButton.d.mts +12 -0
- package/dist/ui/components/CopyButton/CopyButton.d.mts.map +1 -0
- package/dist/ui/components/CopyButton/CopyButton.mjs +45 -0
- package/dist/ui/components/CopyButton/CopyButton.mjs.map +1 -0
- package/dist/ui/components/CopyButton/index.d.mts +2 -0
- package/dist/ui/components/CopyButton/index.mjs +2 -0
- package/dist/ui/components/Dialog/Dialog.d.mts +26 -0
- package/dist/ui/components/Dialog/Dialog.d.mts.map +1 -0
- package/dist/ui/components/Dialog/Dialog.mjs +79 -0
- package/dist/ui/components/Dialog/Dialog.mjs.map +1 -0
- package/dist/ui/components/Dialog/index.d.mts +2 -0
- package/dist/ui/components/Dialog/index.mjs +2 -0
- package/dist/ui/components/EmptyState/EmptyState.d.mts +18 -0
- package/dist/ui/components/EmptyState/EmptyState.d.mts.map +1 -0
- package/dist/ui/components/EmptyState/EmptyState.mjs +36 -0
- package/dist/ui/components/EmptyState/EmptyState.mjs.map +1 -0
- package/dist/ui/components/EmptyState/index.d.mts +2 -0
- package/dist/ui/components/EmptyState/index.mjs +2 -0
- package/dist/ui/components/FieldError/FieldError.d.mts +14 -0
- package/dist/ui/components/FieldError/FieldError.d.mts.map +1 -0
- package/dist/ui/components/FieldError/FieldError.mjs +19 -0
- package/dist/ui/components/FieldError/FieldError.mjs.map +1 -0
- package/dist/ui/components/FieldError/index.d.mts +2 -0
- package/dist/ui/components/FieldError/index.mjs +2 -0
- package/dist/ui/components/FormattedDate/FormattedDate.d.mts +15 -0
- package/dist/ui/components/FormattedDate/FormattedDate.d.mts.map +1 -0
- package/dist/ui/components/FormattedDate/FormattedDate.mjs +23 -0
- package/dist/ui/components/FormattedDate/FormattedDate.mjs.map +1 -0
- package/dist/ui/components/FormattedDate/index.d.mts +2 -0
- package/dist/ui/components/FormattedDate/index.mjs +2 -0
- package/dist/ui/components/IconButton/IconButton.d.mts +10 -0
- package/dist/ui/components/IconButton/IconButton.d.mts.map +1 -0
- package/dist/ui/components/IconButton/IconButton.mjs +19 -0
- package/dist/ui/components/IconButton/IconButton.mjs.map +1 -0
- package/dist/ui/components/IconButton/index.d.mts +2 -0
- package/dist/ui/components/IconButton/index.mjs +2 -0
- package/dist/ui/components/Input/Input.d.mts +12 -0
- package/dist/ui/components/Input/Input.d.mts.map +1 -0
- package/dist/ui/components/Input/Input.mjs +43 -0
- package/dist/ui/components/Input/Input.mjs.map +1 -0
- package/dist/ui/components/Input/index.d.mts +2 -0
- package/dist/ui/components/Input/index.mjs +2 -0
- package/dist/ui/components/Label/Label.d.mts +11 -0
- package/dist/ui/components/Label/Label.d.mts.map +1 -0
- package/dist/ui/components/Label/Label.mjs +18 -0
- package/dist/ui/components/Label/Label.mjs.map +1 -0
- package/dist/ui/components/Label/index.d.mts +2 -0
- package/dist/ui/components/Label/index.mjs +2 -0
- package/dist/ui/components/LazyVideo/LazyVideo.d.mts +23 -0
- package/dist/ui/components/LazyVideo/LazyVideo.d.mts.map +1 -0
- package/dist/ui/components/LazyVideo/LazyVideo.mjs +57 -0
- package/dist/ui/components/LazyVideo/LazyVideo.mjs.map +1 -0
- package/dist/ui/components/LazyVideo/index.d.mts +2 -0
- package/dist/ui/components/LazyVideo/index.mjs +2 -0
- package/dist/ui/components/Pagination/Pagination.d.mts +38 -0
- package/dist/ui/components/Pagination/Pagination.d.mts.map +1 -0
- package/dist/ui/components/Pagination/Pagination.mjs +110 -0
- package/dist/ui/components/Pagination/Pagination.mjs.map +1 -0
- package/dist/ui/components/Pagination/index.d.mts +2 -0
- package/dist/ui/components/Pagination/index.mjs +2 -0
- package/dist/ui/components/PaginationItem/PaginationItem.d.mts +15 -0
- package/dist/ui/components/PaginationItem/PaginationItem.d.mts.map +1 -0
- package/dist/ui/components/PaginationItem/PaginationItem.mjs +34 -0
- package/dist/ui/components/PaginationItem/PaginationItem.mjs.map +1 -0
- package/dist/ui/components/PaginationItem/index.d.mts +2 -0
- package/dist/ui/components/PaginationItem/index.mjs +2 -0
- package/dist/ui/components/PasswordInput/PasswordInput.d.mts +10 -0
- package/dist/ui/components/PasswordInput/PasswordInput.d.mts.map +1 -0
- package/dist/ui/components/PasswordInput/PasswordInput.mjs +39 -0
- package/dist/ui/components/PasswordInput/PasswordInput.mjs.map +1 -0
- package/dist/ui/components/PasswordInput/index.d.mts +2 -0
- package/dist/ui/components/PasswordInput/index.mjs +2 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts +20 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.d.mts.map +1 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.mjs +39 -0
- package/dist/ui/components/ProgressStepper/ProgressStepper.mjs.map +1 -0
- package/dist/ui/components/ProgressStepper/index.d.mts +2 -0
- package/dist/ui/components/ProgressStepper/index.mjs +2 -0
- package/dist/ui/components/Prose/Prose.d.mts +10 -0
- package/dist/ui/components/Prose/Prose.d.mts.map +1 -0
- package/dist/ui/components/Prose/Prose.mjs +19 -0
- package/dist/ui/components/Prose/Prose.mjs.map +1 -0
- package/dist/ui/components/Prose/index.d.mts +2 -0
- package/dist/ui/components/Prose/index.mjs +2 -0
- package/dist/ui/components/Radio/Radio.d.mts +8 -0
- package/dist/ui/components/Radio/Radio.d.mts.map +1 -0
- package/dist/ui/components/Radio/Radio.mjs +25 -0
- package/dist/ui/components/Radio/Radio.mjs.map +1 -0
- package/dist/ui/components/Radio/index.d.mts +2 -0
- package/dist/ui/components/Radio/index.mjs +2 -0
- package/dist/ui/components/Reveal/Reveal.d.mts +10 -0
- package/dist/ui/components/Reveal/Reveal.d.mts.map +1 -0
- package/dist/ui/components/Reveal/Reveal.mjs +18 -0
- package/dist/ui/components/Reveal/Reveal.mjs.map +1 -0
- package/dist/ui/components/Reveal/index.d.mts +2 -0
- package/dist/ui/components/Reveal/index.mjs +2 -0
- package/dist/ui/components/SearchInput/SearchInput.d.mts +15 -0
- package/dist/ui/components/SearchInput/SearchInput.d.mts.map +1 -0
- package/dist/ui/components/SearchInput/SearchInput.mjs +28 -0
- package/dist/ui/components/SearchInput/SearchInput.mjs.map +1 -0
- package/dist/ui/components/SearchInput/index.d.mts +2 -0
- package/dist/ui/components/SearchInput/index.mjs +2 -0
- package/dist/ui/components/Select/Select.d.mts +34 -0
- package/dist/ui/components/Select/Select.d.mts.map +1 -0
- package/dist/ui/components/Select/Select.mjs +167 -0
- package/dist/ui/components/Select/Select.mjs.map +1 -0
- package/dist/ui/components/Select/index.d.mts +2 -0
- package/dist/ui/components/Select/index.mjs +2 -0
- package/dist/ui/components/Sheet/Sheet.d.mts +19 -0
- package/dist/ui/components/Sheet/Sheet.d.mts.map +1 -0
- package/dist/ui/components/Sheet/Sheet.mjs +59 -0
- package/dist/ui/components/Sheet/Sheet.mjs.map +1 -0
- package/dist/ui/components/Sheet/index.d.mts +2 -0
- package/dist/ui/components/Sheet/index.mjs +2 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts +10 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.d.mts.map +1 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.mjs +31 -0
- package/dist/ui/components/StaggerReveal/StaggerReveal.mjs.map +1 -0
- package/dist/ui/components/StaggerReveal/index.d.mts +2 -0
- package/dist/ui/components/StaggerReveal/index.mjs +2 -0
- package/dist/ui/components/Stepper/Stepper.d.mts +15 -0
- package/dist/ui/components/Stepper/Stepper.d.mts.map +1 -0
- package/dist/ui/components/Stepper/Stepper.mjs +38 -0
- package/dist/ui/components/Stepper/Stepper.mjs.map +1 -0
- package/dist/ui/components/Stepper/index.d.mts +2 -0
- package/dist/ui/components/Stepper/index.mjs +2 -0
- package/dist/ui/components/Switch/Switch.d.mts +12 -0
- package/dist/ui/components/Switch/Switch.d.mts.map +1 -0
- package/dist/ui/components/Switch/Switch.mjs +34 -0
- package/dist/ui/components/Switch/Switch.mjs.map +1 -0
- package/dist/ui/components/Switch/index.d.mts +2 -0
- package/dist/ui/components/Switch/index.mjs +2 -0
- package/dist/ui/components/TextButton/TextButton.d.mts +9 -0
- package/dist/ui/components/TextButton/TextButton.d.mts.map +1 -0
- package/dist/ui/components/TextButton/TextButton.mjs +16 -0
- package/dist/ui/components/TextButton/TextButton.mjs.map +1 -0
- package/dist/ui/components/TextButton/index.d.mts +2 -0
- package/dist/ui/components/TextButton/index.mjs +2 -0
- package/dist/ui/components/Textarea/Textarea.d.mts +9 -0
- package/dist/ui/components/Textarea/Textarea.d.mts.map +1 -0
- package/dist/ui/components/Textarea/Textarea.mjs +27 -0
- package/dist/ui/components/Textarea/Textarea.mjs.map +1 -0
- package/dist/ui/components/Textarea/index.d.mts +2 -0
- package/dist/ui/components/Textarea/index.mjs +2 -0
- package/dist/ui/components/Toast/Toast.d.mts +20 -0
- package/dist/ui/components/Toast/Toast.d.mts.map +1 -0
- package/dist/ui/components/Toast/Toast.mjs +128 -0
- package/dist/ui/components/Toast/Toast.mjs.map +1 -0
- package/dist/ui/components/Toast/index.d.mts +2 -0
- package/dist/ui/components/Toast/index.mjs +2 -0
- package/dist/ui/components/Tooltip/Tooltip.d.mts +11 -0
- package/dist/ui/components/Tooltip/Tooltip.d.mts.map +1 -0
- package/dist/ui/components/Tooltip/Tooltip.mjs +20 -0
- package/dist/ui/components/Tooltip/Tooltip.mjs.map +1 -0
- package/dist/ui/components/Tooltip/index.d.mts +2 -0
- package/dist/ui/components/Tooltip/index.mjs +2 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts +7 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.d.mts.map +1 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs +13 -0
- package/dist/ui/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
- package/dist/ui/components/VisuallyHidden/index.d.mts +2 -0
- package/dist/ui/components/VisuallyHidden/index.mjs +2 -0
- package/dist/ui/hooks/index.d.mts +2 -0
- package/dist/ui/hooks/index.mjs +2 -0
- package/dist/ui/hooks/useInView.d.mts +13 -0
- package/dist/ui/hooks/useInView.d.mts.map +1 -0
- package/dist/ui/hooks/useInView.mjs +37 -0
- package/dist/ui/hooks/useInView.mjs.map +1 -0
- package/dist/ui/index.d.mts +81 -0
- package/dist/ui/index.mjs +40 -0
- package/dist/ui/theme/preset.d.mts +170 -0
- package/dist/ui/theme/preset.d.mts.map +1 -0
- package/dist/ui/theme/preset.mjs +143 -0
- package/dist/ui/theme/preset.mjs.map +1 -0
- package/dist/ui/utils/cn.d.mts +6 -0
- package/dist/ui/utils/cn.d.mts.map +1 -0
- package/dist/ui/utils/cn.mjs +42 -0
- package/dist/ui/utils/cn.mjs.map +1 -0
- package/dist/ui/utils/index.d.mts +2 -0
- package/dist/ui/utils/index.mjs +2 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.mjs +3 -0
- package/dist/utils.mjs +18 -0
- package/dist/utils.mjs.map +1 -0
- package/package.json +66 -7
- package/src/ui/theme/preset.css +53 -0
- package/src/ui/theme/preset.ts +131 -0
- package/src/ui/theme/theme.css +12 -0
- package/src/ui/theme/tokens.css +57 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
//#region src/ui/hooks/useInView.ts
|
|
4
|
+
function useInView({ once = true, rootMargin = "0px 0px -15% 0px", threshold = 0 } = {}) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
const [inView, setInView] = useState(false);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const el = ref.current;
|
|
9
|
+
if (!el) return;
|
|
10
|
+
if (typeof IntersectionObserver === "undefined") {
|
|
11
|
+
const id = setTimeout(() => setInView(true));
|
|
12
|
+
return () => clearTimeout(id);
|
|
13
|
+
}
|
|
14
|
+
const observer = new IntersectionObserver((entries) => {
|
|
15
|
+
const isIntersecting = entries.some((entry) => entry.isIntersecting);
|
|
16
|
+
setInView(isIntersecting);
|
|
17
|
+
if (isIntersecting && once) observer.disconnect();
|
|
18
|
+
}, {
|
|
19
|
+
rootMargin,
|
|
20
|
+
threshold
|
|
21
|
+
});
|
|
22
|
+
observer.observe(el);
|
|
23
|
+
return () => observer.disconnect();
|
|
24
|
+
}, [
|
|
25
|
+
once,
|
|
26
|
+
rootMargin,
|
|
27
|
+
threshold
|
|
28
|
+
]);
|
|
29
|
+
return {
|
|
30
|
+
ref,
|
|
31
|
+
inView
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { useInView };
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=useInView.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInView.mjs","names":[],"sources":["../../../src/ui/hooks/useInView.ts"],"sourcesContent":["'use client'\n\nimport { useEffect, useRef, useState } from 'react'\n\nexport type UseInViewOptions = {\n once?: boolean\n rootMargin?: string\n threshold?: number\n}\n\nexport function useInView<T extends Element>({\n once = true,\n rootMargin = '0px 0px -15% 0px',\n threshold = 0,\n}: UseInViewOptions = {}) {\n const ref = useRef<T | null>(null)\n const [inView, setInView] = useState(false)\n\n useEffect(() => {\n const el = ref.current\n if (!el) return\n\n if (typeof IntersectionObserver === 'undefined') {\n const id = setTimeout(() => setInView(true))\n return () => clearTimeout(id)\n }\n\n const observer = new IntersectionObserver(\n (entries) => {\n const isIntersecting = entries.some((entry) => entry.isIntersecting)\n setInView(isIntersecting)\n if (isIntersecting && once) observer.disconnect()\n },\n { rootMargin, threshold }\n )\n\n observer.observe(el)\n return () => observer.disconnect()\n }, [once, rootMargin, threshold])\n\n return { ref, inView }\n}\n"],"mappings":";;;AAUA,SAAgB,UAA6B,EAC3C,OAAO,MACP,aAAa,oBACb,YAAY,MACQ,CAAC,GAAG;CACxB,MAAM,MAAM,OAAiB,IAAI;CACjC,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAE1C,gBAAgB;EACd,MAAM,KAAK,IAAI;EACf,IAAI,CAAC,IAAI;EAET,IAAI,OAAO,yBAAyB,aAAa;GAC/C,MAAM,KAAK,iBAAiB,UAAU,IAAI,CAAC;GAC3C,aAAa,aAAa,EAAE;EAC9B;EAEA,MAAM,WAAW,IAAI,sBAClB,YAAY;GACX,MAAM,iBAAiB,QAAQ,MAAM,UAAU,MAAM,cAAc;GACnE,UAAU,cAAc;GACxB,IAAI,kBAAkB,MAAM,SAAS,WAAW;EAClD,GACA;GAAE;GAAY;EAAU,CAC1B;EAEA,SAAS,QAAQ,EAAE;EACnB,aAAa,SAAS,WAAW;CACnC,GAAG;EAAC;EAAM;EAAY;CAAS,CAAC;CAEhC,OAAO;EAAE;EAAK;CAAO;AACvB"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { focusRingClassName } from "./a11y/focus.mjs";
|
|
2
|
+
import { VisuallyHidden, VisuallyHiddenProps } from "./components/VisuallyHidden/VisuallyHidden.mjs";
|
|
3
|
+
import "./components/VisuallyHidden/index.mjs";
|
|
4
|
+
import "./a11y/index.mjs";
|
|
5
|
+
import { Accordion, AccordionItem, AccordionProps } from "./components/Accordion/Accordion.mjs";
|
|
6
|
+
import "./components/Accordion/index.mjs";
|
|
7
|
+
import { Avatar, AvatarProps } from "./components/Avatar/Avatar.mjs";
|
|
8
|
+
import "./components/Avatar/index.mjs";
|
|
9
|
+
import { Badge, BadgeProps, badgeVariants } from "./components/Badge/Badge.mjs";
|
|
10
|
+
import "./components/Badge/index.mjs";
|
|
11
|
+
import { BADGE_VERSION_RELEASE_TYPE_STYLES, BadgeVersion, BadgeVersionProps, ReleaseType, coerceBadgeReleaseType } from "./components/BadgeVersion/BadgeVersion.mjs";
|
|
12
|
+
import "./components/BadgeVersion/index.mjs";
|
|
13
|
+
import { Button, ButtonProps, buttonVariants } from "./components/Button/Button.mjs";
|
|
14
|
+
import "./components/Button/index.mjs";
|
|
15
|
+
import { Card, CardProps, cardVariants } from "./components/Card/Card.mjs";
|
|
16
|
+
import "./components/Card/index.mjs";
|
|
17
|
+
import { Checkbox, CheckboxProps } from "./components/Checkbox/Checkbox.mjs";
|
|
18
|
+
import "./components/Checkbox/index.mjs";
|
|
19
|
+
import { CodeBlock, CodeBlockProps, CodeBlockTheme } from "./components/CodeBlock/CodeBlock.mjs";
|
|
20
|
+
import "./components/CodeBlock/index.mjs";
|
|
21
|
+
import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsProps, CodeBlockTabsTheme } from "./components/CodeBlockTabs/CodeBlockTabs.mjs";
|
|
22
|
+
import "./components/CodeBlockTabs/index.mjs";
|
|
23
|
+
import { CollapsibleSection, CollapsibleSectionProps } from "./components/CollapsibleSection/CollapsibleSection.mjs";
|
|
24
|
+
import "./components/CollapsibleSection/index.mjs";
|
|
25
|
+
import { IconButton, IconButtonProps } from "./components/IconButton/IconButton.mjs";
|
|
26
|
+
import { CopyButton, CopyButtonProps } from "./components/CopyButton/CopyButton.mjs";
|
|
27
|
+
import "./components/CopyButton/index.mjs";
|
|
28
|
+
import { Dialog, DialogBody, DialogClose, DialogContent, DialogContentProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, DialogOverlayProps, DialogPortal, DialogTitle, DialogTitleProps, DialogTrigger, dialogFullscreenOnMobile } from "./components/Dialog/Dialog.mjs";
|
|
29
|
+
import "./components/Dialog/index.mjs";
|
|
30
|
+
import { EmptyState, EmptyStateProps, emptyStateVariants } from "./components/EmptyState/EmptyState.mjs";
|
|
31
|
+
import "./components/EmptyState/index.mjs";
|
|
32
|
+
import { FieldError, FieldErrorProps } from "./components/FieldError/FieldError.mjs";
|
|
33
|
+
import "./components/FieldError/index.mjs";
|
|
34
|
+
import { FormatDateOptions, FormattedDate, FormattedDateProps, formatDate } from "./components/FormattedDate/FormattedDate.mjs";
|
|
35
|
+
import "./components/FormattedDate/index.mjs";
|
|
36
|
+
import "./components/IconButton/index.mjs";
|
|
37
|
+
import { Input, InputProps } from "./components/Input/Input.mjs";
|
|
38
|
+
import "./components/Input/index.mjs";
|
|
39
|
+
import { Label, LabelProps } from "./components/Label/Label.mjs";
|
|
40
|
+
import "./components/Label/index.mjs";
|
|
41
|
+
import { LazyVideo, LazyVideoProps } from "./components/LazyVideo/LazyVideo.mjs";
|
|
42
|
+
import "./components/LazyVideo/index.mjs";
|
|
43
|
+
import { Pagination, PaginationLabels, PaginationProps, buildPageItems } from "./components/Pagination/Pagination.mjs";
|
|
44
|
+
import "./components/Pagination/index.mjs";
|
|
45
|
+
import { PaginationItem, PaginationItemProps } from "./components/PaginationItem/PaginationItem.mjs";
|
|
46
|
+
import "./components/PaginationItem/index.mjs";
|
|
47
|
+
import { PasswordInput, PasswordInputProps } from "./components/PasswordInput/PasswordInput.mjs";
|
|
48
|
+
import "./components/PasswordInput/index.mjs";
|
|
49
|
+
import { ProgressStepper, ProgressStepperProps, segmentVariants } from "./components/ProgressStepper/ProgressStepper.mjs";
|
|
50
|
+
import "./components/ProgressStepper/index.mjs";
|
|
51
|
+
import { Prose, ProseProps } from "./components/Prose/Prose.mjs";
|
|
52
|
+
import "./components/Prose/index.mjs";
|
|
53
|
+
import { Radio, RadioProps } from "./components/Radio/Radio.mjs";
|
|
54
|
+
import "./components/Radio/index.mjs";
|
|
55
|
+
import { Reveal, RevealProps } from "./components/Reveal/Reveal.mjs";
|
|
56
|
+
import "./components/Reveal/index.mjs";
|
|
57
|
+
import { SearchInput, SearchInputProps } from "./components/SearchInput/SearchInput.mjs";
|
|
58
|
+
import "./components/SearchInput/index.mjs";
|
|
59
|
+
import { Select, SelectOption, SelectProps } from "./components/Select/Select.mjs";
|
|
60
|
+
import "./components/Select/index.mjs";
|
|
61
|
+
import { Sheet, SheetClose, SheetContent, SheetContentProps, SheetOverlay, SheetOverlayProps, SheetPortal, SheetTrigger } from "./components/Sheet/Sheet.mjs";
|
|
62
|
+
import "./components/Sheet/index.mjs";
|
|
63
|
+
import { StaggerReveal, StaggerRevealProps } from "./components/StaggerReveal/StaggerReveal.mjs";
|
|
64
|
+
import "./components/StaggerReveal/index.mjs";
|
|
65
|
+
import { Stepper, StepperItem, StepperProps } from "./components/Stepper/Stepper.mjs";
|
|
66
|
+
import "./components/Stepper/index.mjs";
|
|
67
|
+
import { Switch, SwitchProps } from "./components/Switch/Switch.mjs";
|
|
68
|
+
import "./components/Switch/index.mjs";
|
|
69
|
+
import { TextButton, TextButtonProps } from "./components/TextButton/TextButton.mjs";
|
|
70
|
+
import "./components/TextButton/index.mjs";
|
|
71
|
+
import { Textarea, TextareaProps } from "./components/Textarea/Textarea.mjs";
|
|
72
|
+
import "./components/Textarea/index.mjs";
|
|
73
|
+
import { ToastProvider, ToastProviderProps, useToast } from "./components/Toast/Toast.mjs";
|
|
74
|
+
import "./components/Toast/index.mjs";
|
|
75
|
+
import { Tooltip, TooltipContent, TooltipContentProps, TooltipProvider, TooltipTrigger } from "./components/Tooltip/Tooltip.mjs";
|
|
76
|
+
import "./components/Tooltip/index.mjs";
|
|
77
|
+
import { UseInViewOptions, useInView } from "./hooks/useInView.mjs";
|
|
78
|
+
import "./hooks/index.mjs";
|
|
79
|
+
import { cn } from "./utils/cn.mjs";
|
|
80
|
+
import "./utils/index.mjs";
|
|
81
|
+
export { Accordion, type AccordionItem, type AccordionProps, Avatar, type AvatarProps, BADGE_VERSION_RELEASE_TYPE_STYLES, Badge, type BadgeProps, BadgeVersion, type BadgeVersionProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, type CodeBlockTab, CodeBlockTabs, type CodeBlockTabsProps, type CodeBlockTabsTheme, type CodeBlockTheme, CollapsibleSection, type CollapsibleSectionProps, CopyButton, type CopyButtonProps, Dialog, DialogBody, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, EmptyState, type EmptyStateProps, FieldError, type FieldErrorProps, type FormatDateOptions, FormattedDate, type FormattedDateProps, IconButton, type IconButtonProps, Input, type InputProps, Label, type LabelProps, LazyVideo, type LazyVideoProps, Pagination, PaginationItem, type PaginationItemProps, type PaginationLabels, type PaginationProps, PasswordInput, type PasswordInputProps, ProgressStepper, type ProgressStepperProps, Prose, type ProseProps, Radio, type RadioProps, type ReleaseType, Reveal, type RevealProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetOverlay, type SheetOverlayProps, SheetPortal, SheetTrigger, StaggerReveal, type StaggerRevealProps, Stepper, type StepperItem, type StepperProps, Switch, type SwitchProps, TextButton, type TextButtonProps, Textarea, type TextareaProps, ToastProvider, type ToastProviderProps, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseInViewOptions, VisuallyHidden, type VisuallyHiddenProps, badgeVariants, buildPageItems, buttonVariants, cardVariants, cn, coerceBadgeReleaseType, dialogFullscreenOnMobile, emptyStateVariants, focusRingClassName, formatDate, segmentVariants, useInView, useToast };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export * from './utils/index.mjs'
|
|
2
|
+
export * from './a11y/index.mjs'
|
|
3
|
+
export * from './hooks/index.mjs'
|
|
4
|
+
export * from './components/Button/index.mjs'
|
|
5
|
+
export * from './components/IconButton/index.mjs'
|
|
6
|
+
export * from './components/TextButton/index.mjs'
|
|
7
|
+
export * from './components/Input/index.mjs'
|
|
8
|
+
export * from './components/Textarea/index.mjs'
|
|
9
|
+
export * from './components/Checkbox/index.mjs'
|
|
10
|
+
export * from './components/Radio/index.mjs'
|
|
11
|
+
export * from './components/Label/index.mjs'
|
|
12
|
+
export * from './components/Dialog/index.mjs'
|
|
13
|
+
export * from './components/Card/index.mjs'
|
|
14
|
+
export * from './components/Badge/index.mjs'
|
|
15
|
+
export * from './components/BadgeVersion/index.mjs'
|
|
16
|
+
export * from './components/Avatar/index.mjs'
|
|
17
|
+
export * from './components/EmptyState/index.mjs'
|
|
18
|
+
export * from './components/CopyButton/index.mjs'
|
|
19
|
+
export * from './components/Accordion/index.mjs'
|
|
20
|
+
export * from './components/Stepper/index.mjs'
|
|
21
|
+
export * from './components/Switch/index.mjs'
|
|
22
|
+
export * from './components/Sheet/index.mjs'
|
|
23
|
+
export * from './components/Select/index.mjs'
|
|
24
|
+
export * from './components/Toast/index.mjs'
|
|
25
|
+
export * from './components/CodeBlock/index.mjs'
|
|
26
|
+
export * from './components/CodeBlockTabs/index.mjs'
|
|
27
|
+
export * from './components/ProgressStepper/index.mjs'
|
|
28
|
+
export * from './components/Pagination/index.mjs'
|
|
29
|
+
export * from './components/PaginationItem/index.mjs'
|
|
30
|
+
export * from './components/Prose/index.mjs'
|
|
31
|
+
export * from './components/FormattedDate/index.mjs'
|
|
32
|
+
export * from './components/VisuallyHidden/index.mjs'
|
|
33
|
+
export * from './components/Tooltip/index.mjs'
|
|
34
|
+
export * from './components/LazyVideo/index.mjs'
|
|
35
|
+
export * from './components/Reveal/index.mjs'
|
|
36
|
+
export * from './components/StaggerReveal/index.mjs'
|
|
37
|
+
export * from './components/PasswordInput/index.mjs'
|
|
38
|
+
export * from './components/SearchInput/index.mjs'
|
|
39
|
+
export * from './components/FieldError/index.mjs'
|
|
40
|
+
export * from './components/CollapsibleSection/index.mjs'
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
//#region src/ui/theme/preset.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared websites UI Tailwind preset — full theme contract, WDK defaults.
|
|
4
|
+
*
|
|
5
|
+
* Same utility names everywhere (`bg-accent`, `text-foreground`, `text-display-1`,
|
|
6
|
+
* `rounded-btn`, `h-btn`, …). Apps point CSS variables at their brand palette.
|
|
7
|
+
*
|
|
8
|
+
* // WDK — defaults already match site tokens
|
|
9
|
+
* presets: [uiPreset]
|
|
10
|
+
*
|
|
11
|
+
* // QVAC — same keys, override color (and any other) values
|
|
12
|
+
* presets: [uiPreset]
|
|
13
|
+
* theme: { extend: { colors: { accent: { DEFAULT: '…' }, … } } }
|
|
14
|
+
*
|
|
15
|
+
* CSS: define the `--color-*` / `--primitive-*` / `--btn-*` vars the preset
|
|
16
|
+
* references (see WDK `globals.css`), or remap them in the app `:root`.
|
|
17
|
+
*/
|
|
18
|
+
declare const preset: {
|
|
19
|
+
theme: {
|
|
20
|
+
extend: {
|
|
21
|
+
colors: {
|
|
22
|
+
background: string;
|
|
23
|
+
recessed: string;
|
|
24
|
+
surface: string;
|
|
25
|
+
'surface-elevated': string;
|
|
26
|
+
card: string;
|
|
27
|
+
'card-elevated': string;
|
|
28
|
+
foreground: string;
|
|
29
|
+
secondary: string;
|
|
30
|
+
muted: string;
|
|
31
|
+
'landing-text': string;
|
|
32
|
+
'landing-text-light': string;
|
|
33
|
+
'landing-text-light-30': string;
|
|
34
|
+
accent: {
|
|
35
|
+
DEFAULT: string;
|
|
36
|
+
foreground: string;
|
|
37
|
+
hover: string;
|
|
38
|
+
dim: string;
|
|
39
|
+
};
|
|
40
|
+
border: {
|
|
41
|
+
DEFAULT: string;
|
|
42
|
+
subtle: string;
|
|
43
|
+
};
|
|
44
|
+
success: string;
|
|
45
|
+
warning: string;
|
|
46
|
+
error: string;
|
|
47
|
+
destructive: string;
|
|
48
|
+
info: string;
|
|
49
|
+
ring: string;
|
|
50
|
+
teal: string;
|
|
51
|
+
amber: string;
|
|
52
|
+
purple: string;
|
|
53
|
+
green: string;
|
|
54
|
+
'blog-primary': string;
|
|
55
|
+
'blog-body': string;
|
|
56
|
+
'blog-meta': string;
|
|
57
|
+
primitive: {
|
|
58
|
+
black: string;
|
|
59
|
+
'dark-grey': string;
|
|
60
|
+
grey: string;
|
|
61
|
+
'light-grey': string;
|
|
62
|
+
white: string;
|
|
63
|
+
orange: string;
|
|
64
|
+
'orange-dark': string;
|
|
65
|
+
purple: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
fontFamily: {
|
|
69
|
+
sans: string[];
|
|
70
|
+
display: string[];
|
|
71
|
+
mono: string[];
|
|
72
|
+
};
|
|
73
|
+
fontSize: {
|
|
74
|
+
'display-1': (string | {
|
|
75
|
+
lineHeight: string;
|
|
76
|
+
letterSpacing: string;
|
|
77
|
+
})[];
|
|
78
|
+
'display-2': (string | {
|
|
79
|
+
lineHeight: string;
|
|
80
|
+
letterSpacing: string;
|
|
81
|
+
})[];
|
|
82
|
+
'heading-3': (string | {
|
|
83
|
+
lineHeight: string;
|
|
84
|
+
letterSpacing: string;
|
|
85
|
+
})[];
|
|
86
|
+
'subhead-1': (string | {
|
|
87
|
+
lineHeight: string;
|
|
88
|
+
letterSpacing: string;
|
|
89
|
+
})[];
|
|
90
|
+
'subhead-2': (string | {
|
|
91
|
+
lineHeight: string;
|
|
92
|
+
letterSpacing: string;
|
|
93
|
+
})[];
|
|
94
|
+
'subhead-3': (string | {
|
|
95
|
+
lineHeight: string;
|
|
96
|
+
letterSpacing: string;
|
|
97
|
+
})[];
|
|
98
|
+
'body-1': (string | {
|
|
99
|
+
lineHeight: string;
|
|
100
|
+
})[];
|
|
101
|
+
'body-2': (string | {
|
|
102
|
+
lineHeight: string;
|
|
103
|
+
})[];
|
|
104
|
+
'body-sm': (string | {
|
|
105
|
+
lineHeight: string;
|
|
106
|
+
})[];
|
|
107
|
+
'body-md': (string | {
|
|
108
|
+
lineHeight: string;
|
|
109
|
+
})[];
|
|
110
|
+
'body-xs': (string | {
|
|
111
|
+
lineHeight: string;
|
|
112
|
+
})[];
|
|
113
|
+
btn: (string | {
|
|
114
|
+
lineHeight: string;
|
|
115
|
+
letterSpacing: string;
|
|
116
|
+
})[];
|
|
117
|
+
'btn-cta': (string | {
|
|
118
|
+
lineHeight: string;
|
|
119
|
+
})[];
|
|
120
|
+
code: (string | {
|
|
121
|
+
lineHeight: string;
|
|
122
|
+
})[];
|
|
123
|
+
label: (string | {
|
|
124
|
+
lineHeight: string;
|
|
125
|
+
letterSpacing: string;
|
|
126
|
+
})[];
|
|
127
|
+
badge: (string | {
|
|
128
|
+
lineHeight: string;
|
|
129
|
+
letterSpacing: string;
|
|
130
|
+
})[];
|
|
131
|
+
caption: (string | {
|
|
132
|
+
lineHeight: string;
|
|
133
|
+
})[];
|
|
134
|
+
'inter-h1': (string | {
|
|
135
|
+
lineHeight: string;
|
|
136
|
+
})[];
|
|
137
|
+
'inter-h2': (string | {
|
|
138
|
+
lineHeight: string;
|
|
139
|
+
})[];
|
|
140
|
+
'inter-h3': (string | {
|
|
141
|
+
lineHeight: string;
|
|
142
|
+
})[];
|
|
143
|
+
'blog-mob': (string | {
|
|
144
|
+
lineHeight: string;
|
|
145
|
+
})[];
|
|
146
|
+
};
|
|
147
|
+
borderRadius: {
|
|
148
|
+
btn: string;
|
|
149
|
+
card: string;
|
|
150
|
+
badge: string;
|
|
151
|
+
control: string;
|
|
152
|
+
pill: string;
|
|
153
|
+
};
|
|
154
|
+
height: {
|
|
155
|
+
btn: string;
|
|
156
|
+
'btn-sm': string;
|
|
157
|
+
};
|
|
158
|
+
size: {
|
|
159
|
+
'btn-sm': string;
|
|
160
|
+
};
|
|
161
|
+
padding: {
|
|
162
|
+
btn: string;
|
|
163
|
+
'btn-sm': string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
//#endregion
|
|
169
|
+
export { preset as default };
|
|
170
|
+
//# sourceMappingURL=preset.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.mts","names":[],"sources":["../../../src/ui/theme/preset.ts"],"mappings":";;;;;;;;;;;;;;;;;cAoBM"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
//#region src/ui/theme/preset.ts
|
|
2
|
+
/**
|
|
3
|
+
* Shared websites UI Tailwind preset — full theme contract, WDK defaults.
|
|
4
|
+
*
|
|
5
|
+
* Same utility names everywhere (`bg-accent`, `text-foreground`, `text-display-1`,
|
|
6
|
+
* `rounded-btn`, `h-btn`, …). Apps point CSS variables at their brand palette.
|
|
7
|
+
*
|
|
8
|
+
* // WDK — defaults already match site tokens
|
|
9
|
+
* presets: [uiPreset]
|
|
10
|
+
*
|
|
11
|
+
* // QVAC — same keys, override color (and any other) values
|
|
12
|
+
* presets: [uiPreset]
|
|
13
|
+
* theme: { extend: { colors: { accent: { DEFAULT: '…' }, … } } }
|
|
14
|
+
*
|
|
15
|
+
* CSS: define the `--color-*` / `--primitive-*` / `--btn-*` vars the preset
|
|
16
|
+
* references (see WDK `globals.css`), or remap them in the app `:root`.
|
|
17
|
+
*/
|
|
18
|
+
const hsl = (name) => `hsl(var(${name}) / <alpha-value>)`;
|
|
19
|
+
const cssVar = (name) => `var(${name})`;
|
|
20
|
+
const preset = { theme: { extend: {
|
|
21
|
+
colors: {
|
|
22
|
+
"background": hsl("--color-bg-base"),
|
|
23
|
+
"recessed": hsl("--color-bg-recessed"),
|
|
24
|
+
"surface": hsl("--color-bg-surface"),
|
|
25
|
+
"surface-elevated": hsl("--color-bg-card-elevated"),
|
|
26
|
+
"card": hsl("--color-bg-card"),
|
|
27
|
+
"card-elevated": hsl("--color-bg-card-elevated"),
|
|
28
|
+
"foreground": hsl("--color-text-primary"),
|
|
29
|
+
"secondary": hsl("--color-text-secondary"),
|
|
30
|
+
"muted": hsl("--color-text-muted"),
|
|
31
|
+
"landing-text": hsl("--color-landing-text"),
|
|
32
|
+
"landing-text-light": hsl("--color-landing-text-light"),
|
|
33
|
+
"landing-text-light-30": cssVar("--landing-text-light-30"),
|
|
34
|
+
"accent": {
|
|
35
|
+
DEFAULT: hsl("--color-accent"),
|
|
36
|
+
foreground: hsl("--color-text-primary"),
|
|
37
|
+
hover: hsl("--color-accent-hover"),
|
|
38
|
+
dim: hsl("--color-accent-dim")
|
|
39
|
+
},
|
|
40
|
+
"border": {
|
|
41
|
+
DEFAULT: hsl("--color-border-default"),
|
|
42
|
+
subtle: hsl("--color-border-subtle")
|
|
43
|
+
},
|
|
44
|
+
"success": hsl("--color-success"),
|
|
45
|
+
"warning": hsl("--color-warning"),
|
|
46
|
+
"error": hsl("--color-error"),
|
|
47
|
+
"destructive": hsl("--color-error"),
|
|
48
|
+
"info": hsl("--color-info"),
|
|
49
|
+
"ring": hsl("--color-accent"),
|
|
50
|
+
"teal": hsl("--color-teal"),
|
|
51
|
+
"amber": hsl("--color-amber"),
|
|
52
|
+
"purple": hsl("--color-purple"),
|
|
53
|
+
"green": hsl("--color-green"),
|
|
54
|
+
"blog-primary": hsl("--color-blog-primary"),
|
|
55
|
+
"blog-body": hsl("--color-blog-body"),
|
|
56
|
+
"blog-meta": hsl("--color-blog-meta"),
|
|
57
|
+
"primitive": {
|
|
58
|
+
"black": hsl("--primitive-black"),
|
|
59
|
+
"dark-grey": hsl("--primitive-dark-grey"),
|
|
60
|
+
"grey": hsl("--primitive-grey"),
|
|
61
|
+
"light-grey": hsl("--primitive-light-grey"),
|
|
62
|
+
"white": hsl("--primitive-white"),
|
|
63
|
+
"orange": hsl("--primitive-orange"),
|
|
64
|
+
"orange-dark": hsl("--primitive-orange-dark"),
|
|
65
|
+
"purple": hsl("--primitive-purple")
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
fontFamily: {
|
|
69
|
+
sans: ["var(--font-sans)", "sans-serif"],
|
|
70
|
+
display: ["var(--font-sharp)", "sans-serif"],
|
|
71
|
+
mono: ["var(--font-mono)", "monospace"]
|
|
72
|
+
},
|
|
73
|
+
fontSize: {
|
|
74
|
+
"display-1": ["60px", {
|
|
75
|
+
lineHeight: "1.05",
|
|
76
|
+
letterSpacing: "0"
|
|
77
|
+
}],
|
|
78
|
+
"display-2": ["50px", {
|
|
79
|
+
lineHeight: "1.05",
|
|
80
|
+
letterSpacing: "0"
|
|
81
|
+
}],
|
|
82
|
+
"heading-3": ["38px", {
|
|
83
|
+
lineHeight: "40px",
|
|
84
|
+
letterSpacing: "0"
|
|
85
|
+
}],
|
|
86
|
+
"subhead-1": ["28px", {
|
|
87
|
+
lineHeight: "32px",
|
|
88
|
+
letterSpacing: "0"
|
|
89
|
+
}],
|
|
90
|
+
"subhead-2": ["22px", {
|
|
91
|
+
lineHeight: "26px",
|
|
92
|
+
letterSpacing: "0"
|
|
93
|
+
}],
|
|
94
|
+
"subhead-3": ["13px", {
|
|
95
|
+
lineHeight: "1",
|
|
96
|
+
letterSpacing: "2px"
|
|
97
|
+
}],
|
|
98
|
+
"body-1": ["22px", { lineHeight: "32px" }],
|
|
99
|
+
"body-2": ["18px", { lineHeight: "28px" }],
|
|
100
|
+
"body-sm": ["15px", { lineHeight: "20px" }],
|
|
101
|
+
"body-md": ["14px", { lineHeight: "20px" }],
|
|
102
|
+
"body-xs": ["13px", { lineHeight: "18px" }],
|
|
103
|
+
"btn": ["14px", {
|
|
104
|
+
lineHeight: "19px",
|
|
105
|
+
letterSpacing: "0.5px"
|
|
106
|
+
}],
|
|
107
|
+
"btn-cta": ["15px", { lineHeight: "1" }],
|
|
108
|
+
"code": ["17px", { lineHeight: "20px" }],
|
|
109
|
+
"label": ["11px", {
|
|
110
|
+
lineHeight: "16px",
|
|
111
|
+
letterSpacing: "0.3px"
|
|
112
|
+
}],
|
|
113
|
+
"badge": ["10px", {
|
|
114
|
+
lineHeight: "1",
|
|
115
|
+
letterSpacing: "0.4px"
|
|
116
|
+
}],
|
|
117
|
+
"caption": ["12px", { lineHeight: "16px" }],
|
|
118
|
+
"inter-h1": ["50px", { lineHeight: "60px" }],
|
|
119
|
+
"inter-h2": ["30px", { lineHeight: "38px" }],
|
|
120
|
+
"inter-h3": ["26px", { lineHeight: "36px" }],
|
|
121
|
+
"blog-mob": ["16px", { lineHeight: "24px" }]
|
|
122
|
+
},
|
|
123
|
+
borderRadius: {
|
|
124
|
+
btn: "5px",
|
|
125
|
+
card: "10px",
|
|
126
|
+
badge: "5px",
|
|
127
|
+
control: "var(--control-radius)",
|
|
128
|
+
pill: "9999px"
|
|
129
|
+
},
|
|
130
|
+
height: {
|
|
131
|
+
"btn": "var(--btn-primary-height)",
|
|
132
|
+
"btn-sm": "var(--btn-sm-height)"
|
|
133
|
+
},
|
|
134
|
+
size: { "btn-sm": "var(--btn-sm-height)" },
|
|
135
|
+
padding: {
|
|
136
|
+
"btn": "var(--btn-primary-px)",
|
|
137
|
+
"btn-sm": "var(--btn-sm-px)"
|
|
138
|
+
}
|
|
139
|
+
} } };
|
|
140
|
+
//#endregion
|
|
141
|
+
export { preset as default };
|
|
142
|
+
|
|
143
|
+
//# sourceMappingURL=preset.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.mjs","names":[],"sources":["../../../src/ui/theme/preset.ts"],"sourcesContent":["/**\n * Shared websites UI Tailwind preset — full theme contract, WDK defaults.\n *\n * Same utility names everywhere (`bg-accent`, `text-foreground`, `text-display-1`,\n * `rounded-btn`, `h-btn`, …). Apps point CSS variables at their brand palette.\n *\n * // WDK — defaults already match site tokens\n * presets: [uiPreset]\n *\n * // QVAC — same keys, override color (and any other) values\n * presets: [uiPreset]\n * theme: { extend: { colors: { accent: { DEFAULT: '…' }, … } } }\n *\n * CSS: define the `--color-*` / `--primitive-*` / `--btn-*` vars the preset\n * references (see WDK `globals.css`), or remap them in the app `:root`.\n */\n\nconst hsl = (name: string) => `hsl(var(${name}) / <alpha-value>)`\nconst cssVar = (name: string) => `var(${name})`\n\nconst preset = {\n theme: {\n extend: {\n colors: {\n 'background': hsl('--color-bg-base'),\n 'recessed': hsl('--color-bg-recessed'),\n 'surface': hsl('--color-bg-surface'),\n 'surface-elevated': hsl('--color-bg-card-elevated'),\n 'card': hsl('--color-bg-card'),\n 'card-elevated': hsl('--color-bg-card-elevated'),\n 'foreground': hsl('--color-text-primary'),\n 'secondary': hsl('--color-text-secondary'),\n 'muted': hsl('--color-text-muted'),\n 'landing-text': hsl('--color-landing-text'),\n 'landing-text-light': hsl('--color-landing-text-light'),\n 'landing-text-light-30': cssVar('--landing-text-light-30'),\n\n 'accent': {\n DEFAULT: hsl('--color-accent'),\n foreground: hsl('--color-text-primary'),\n hover: hsl('--color-accent-hover'),\n dim: hsl('--color-accent-dim'),\n },\n 'border': {\n DEFAULT: hsl('--color-border-default'),\n subtle: hsl('--color-border-subtle'),\n },\n 'success': hsl('--color-success'),\n 'warning': hsl('--color-warning'),\n 'error': hsl('--color-error'),\n 'destructive': hsl('--color-error'),\n 'info': hsl('--color-info'),\n 'ring': hsl('--color-accent'),\n\n 'teal': hsl('--color-teal'),\n 'amber': hsl('--color-amber'),\n 'purple': hsl('--color-purple'),\n 'green': hsl('--color-green'),\n\n 'blog-primary': hsl('--color-blog-primary'),\n 'blog-body': hsl('--color-blog-body'),\n 'blog-meta': hsl('--color-blog-meta'),\n\n 'primitive': {\n 'black': hsl('--primitive-black'),\n 'dark-grey': hsl('--primitive-dark-grey'),\n 'grey': hsl('--primitive-grey'),\n 'light-grey': hsl('--primitive-light-grey'),\n 'white': hsl('--primitive-white'),\n 'orange': hsl('--primitive-orange'),\n 'orange-dark': hsl('--primitive-orange-dark'),\n 'purple': hsl('--primitive-purple'),\n },\n },\n\n fontFamily: {\n sans: ['var(--font-sans)', 'sans-serif'],\n display: ['var(--font-sharp)', 'sans-serif'],\n mono: ['var(--font-mono)', 'monospace'],\n },\n\n fontSize: {\n 'display-1': ['60px', { lineHeight: '1.05', letterSpacing: '0' }],\n 'display-2': ['50px', { lineHeight: '1.05', letterSpacing: '0' }],\n 'heading-3': ['38px', { lineHeight: '40px', letterSpacing: '0' }],\n 'subhead-1': ['28px', { lineHeight: '32px', letterSpacing: '0' }],\n 'subhead-2': ['22px', { lineHeight: '26px', letterSpacing: '0' }],\n 'subhead-3': ['13px', { lineHeight: '1', letterSpacing: '2px' }],\n 'body-1': ['22px', { lineHeight: '32px' }],\n 'body-2': ['18px', { lineHeight: '28px' }],\n 'body-sm': ['15px', { lineHeight: '20px' }],\n 'body-md': ['14px', { lineHeight: '20px' }],\n 'body-xs': ['13px', { lineHeight: '18px' }],\n 'btn': ['14px', { lineHeight: '19px', letterSpacing: '0.5px' }],\n 'btn-cta': ['15px', { lineHeight: '1' }],\n 'code': ['17px', { lineHeight: '20px' }],\n 'label': ['11px', { lineHeight: '16px', letterSpacing: '0.3px' }],\n 'badge': ['10px', { lineHeight: '1', letterSpacing: '0.4px' }],\n 'caption': ['12px', { lineHeight: '16px' }],\n 'inter-h1': ['50px', { lineHeight: '60px' }],\n 'inter-h2': ['30px', { lineHeight: '38px' }],\n 'inter-h3': ['26px', { lineHeight: '36px' }],\n 'blog-mob': ['16px', { lineHeight: '24px' }],\n },\n\n borderRadius: {\n btn: '5px',\n card: '10px',\n badge: '5px',\n control: 'var(--control-radius)',\n pill: '9999px',\n },\n\n height: {\n 'btn': 'var(--btn-primary-height)',\n 'btn-sm': 'var(--btn-sm-height)',\n },\n\n size: {\n 'btn-sm': 'var(--btn-sm-height)',\n },\n\n padding: {\n 'btn': 'var(--btn-primary-px)',\n 'btn-sm': 'var(--btn-sm-px)',\n },\n },\n },\n}\n\nexport default preset\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.mts","names":[],"sources":["../../../src/ui/utils/cn.ts"],"mappings":";;iBAgDgB,MAAM,QAAQ"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { extendTailwindMerge } from "tailwind-merge";
|
|
3
|
+
const twMerge = extendTailwindMerge({ extend: { classGroups: {
|
|
4
|
+
"font-size": [{ text: [
|
|
5
|
+
"display-1",
|
|
6
|
+
"display-2",
|
|
7
|
+
"heading-1",
|
|
8
|
+
"heading-2",
|
|
9
|
+
"heading-3",
|
|
10
|
+
"heading-4",
|
|
11
|
+
"heading-5",
|
|
12
|
+
"heading-6",
|
|
13
|
+
"subhead-1",
|
|
14
|
+
"subhead-2",
|
|
15
|
+
"subhead-3",
|
|
16
|
+
"body-1",
|
|
17
|
+
"body-2",
|
|
18
|
+
"body-lg",
|
|
19
|
+
"body-md",
|
|
20
|
+
"body-sm",
|
|
21
|
+
"body-xs",
|
|
22
|
+
"btn",
|
|
23
|
+
"btn-cta",
|
|
24
|
+
"code",
|
|
25
|
+
"label",
|
|
26
|
+
"badge",
|
|
27
|
+
"caption",
|
|
28
|
+
"eyebrow",
|
|
29
|
+
"inter-h1",
|
|
30
|
+
"inter-h2",
|
|
31
|
+
"inter-h3",
|
|
32
|
+
"blog-mob"
|
|
33
|
+
] }],
|
|
34
|
+
"text-color": ["text-on-action", "visited:text-on-action"]
|
|
35
|
+
} } });
|
|
36
|
+
function cn(...inputs) {
|
|
37
|
+
return twMerge(clsx(inputs));
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { cn };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=cn.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.mjs","names":[],"sources":["../../../src/ui/utils/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\n/**\n * Shared `cn()` helper. Extends tailwind-merge so shared typography tokens from\n * WDK and QVAC are treated as font-size / color groups and do not cancel each\n * other incorrectly.\n */\nconst CUSTOM_FONT_SIZES = [\n 'display-1',\n 'display-2',\n 'heading-1',\n 'heading-2',\n 'heading-3',\n 'heading-4',\n 'heading-5',\n 'heading-6',\n 'subhead-1',\n 'subhead-2',\n 'subhead-3',\n 'body-1',\n 'body-2',\n 'body-lg',\n 'body-md',\n 'body-sm',\n 'body-xs',\n 'btn',\n 'btn-cta',\n 'code',\n 'label',\n 'badge',\n 'caption',\n 'eyebrow',\n 'inter-h1',\n 'inter-h2',\n 'inter-h3',\n 'blog-mob',\n]\n\nconst twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n 'font-size': [{ text: CUSTOM_FONT_SIZES }],\n 'text-color': ['text-on-action', 'visited:text-on-action'],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"mappings":";;AAuCA,MAAM,UAAU,oBAAoB,EAClC,QAAQ,EACN,aAAa;CACX,aAAa,CAAC,EAAE,MAAM;EAjC1B;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAM0B,EAAkB,CAAC;CACzC,cAAc,CAAC,kBAAkB,wBAAwB;AAC3D,EACF,EACF,CAAC;AAED,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B"}
|
package/dist/utils.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/utils/stripShikiPreBackground.ts
|
|
2
|
+
function stripShikiPreBackground(html) {
|
|
3
|
+
return html.replace(/<pre([^>]*)style="([^"]*)"([^>]*)>/, (_, before, styles, after) => {
|
|
4
|
+
const nextStyles = styles.replace(/background-color:[^;"]*;?/gi, "").replace(/(^|;)\s*;+/g, "$1").trim().replace(/^;|;$/g, "");
|
|
5
|
+
if (!nextStyles) return `<pre${before}${after}>`;
|
|
6
|
+
return `<pre${before}style="${nextStyles}"${after}>`;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region src/utils/toPlainValue.ts
|
|
11
|
+
function toPlainValue(value) {
|
|
12
|
+
if (value == null) return value;
|
|
13
|
+
return JSON.parse(JSON.stringify(value));
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { stripShikiPreBackground as n, toPlainValue as t };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":[],"sources":["../src/utils/stripShikiPreBackground.ts","../src/utils/toPlainValue.ts"],"sourcesContent":["export function stripShikiPreBackground(html: string): string {\n return html.replace(/<pre([^>]*)style=\"([^\"]*)\"([^>]*)>/, (_, before, styles, after) => {\n const nextStyles = styles\n .replace(/background-color:[^;\"]*;?/gi, '')\n .replace(/(^|;)\\s*;+/g, '$1')\n .trim()\n .replace(/^;|;$/g, '')\n\n if (!nextStyles) {\n return `<pre${before}${after}>`\n }\n\n return `<pre${before}style=\"${nextStyles}\"${after}>`\n })\n}\n","export function toPlainValue<T>(value: T): T {\n if (value == null) return value\n return JSON.parse(JSON.stringify(value)) as T\n}\n"],"mappings":";AAAA,SAAgB,wBAAwB,MAAsB;CAC5D,OAAO,KAAK,QAAQ,uCAAuC,GAAG,QAAQ,QAAQ,UAAU;EACtF,MAAM,aAAa,OAChB,QAAQ,+BAA+B,EAAE,CAAC,CAC1C,QAAQ,eAAe,IAAI,CAAC,CAC5B,KAAK,CAAC,CACN,QAAQ,UAAU,EAAE;EAEvB,IAAI,CAAC,YACH,OAAO,OAAO,SAAS,MAAM;EAG/B,OAAO,OAAO,OAAO,SAAS,WAAW,GAAG,MAAM;CACpD,CAAC;AACH;;;ACdA,SAAgB,aAAgB,OAAa;CAC3C,IAAI,SAAS,MAAM,OAAO;CAC1B,OAAO,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC;AACzC"}
|