@askrjs/themes 0.0.4 → 0.0.6
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/dist/components/_internal/layout.js +2 -1
- package/dist/components/_internal/layout.js.map +1 -1
- package/dist/components/container/container.a11y.d.ts +0 -1
- package/dist/components/container/container.js +7 -7
- package/dist/components/container/container.js.map +1 -1
- package/dist/components/container/container.types.d.ts +2 -3
- package/dist/themes/default/index.css +84 -5
- package/package.json +2 -2
- package/src/components/_internal/layout.ts +1 -0
- package/src/components/container/container.a11y.ts +0 -1
- package/src/components/container/container.tsx +9 -19
- package/src/components/container/container.types.ts +1 -3
- package/src/themes/default/styles/display/coverage.css +91 -1
- package/src/themes/default/styles/layout/layout.css +1 -1
- package/src/themes/default/styles/layout/responsive-layout.css +3 -1
- package/src/themes/default/styles/shell/sidebar.css +22 -1
- package/templates/theme/styles/display/coverage.css +91 -1
- package/templates/theme/styles/layout/responsive-layout.css +3 -1
|
@@ -34,7 +34,8 @@ const CONTAINER_SIZE_MAP = {
|
|
|
34
34
|
sm: "var(--ak-container-1)",
|
|
35
35
|
md: "var(--ak-container-2)",
|
|
36
36
|
lg: "var(--ak-container-3)",
|
|
37
|
-
xl: "var(--ak-container-4)"
|
|
37
|
+
xl: "var(--ak-container-4)",
|
|
38
|
+
fluid: "100%"
|
|
38
39
|
};
|
|
39
40
|
/**
|
|
40
41
|
* Returns true when `value` is a concrete CSS length/size that can be serialized
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","names":[],"sources":["../../../src/components/_internal/layout.ts"],"sourcesContent":["/**\n * Layout helpers shared by headless layout primitives.\n */\n\nexport type LayoutBreakpoint = \"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;\n\nconst BREAKPOINTS: readonly LayoutBreakpoint[] = [\"initial\", \"sm\", \"md\", \"lg\", \"xl\"];\n\n/** Units and patterns that identify a concrete CSS length value. */\nconst CSS_UNIT_RE =\n /^-?[\\d.]+(%|px|em|rem|ex|ch|ic|lh|rlh|vw|vh|vmin|vmax|svw|svh|dvw|dvh|cqw|cqh|cqi|cqb|fr|cm|mm|in|pt|pc|Q)$/;\n\nconst SPACE_TOKEN_MAP: Record<string, string> = {\n \"1\": \"var(--ak-space-1)\",\n \"2\": \"var(--ak-space-2)\",\n \"3\": \"var(--ak-space-3)\",\n \"4\": \"var(--ak-space-4)\",\n \"5\": \"var(--ak-space-5)\",\n \"6\": \"var(--ak-space-6)\",\n \"7\": \"var(--ak-space-7)\",\n \"8\": \"var(--ak-space-8)\",\n \"9\": \"var(--ak-space-9)\",\n xs: \"var(--ak-space-xs)\",\n sm: \"var(--ak-space-sm)\",\n md: \"var(--ak-space-md)\",\n lg: \"var(--ak-space-lg)\",\n xl: \"var(--ak-space-xl)\",\n \"2xl\": \"var(--ak-space-2xl)\",\n \"3xl\": \"var(--ak-space-3xl)\",\n};\n\nconst CONTAINER_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-container-1)\",\n \"2\": \"var(--ak-container-2)\",\n \"3\": \"var(--ak-container-3)\",\n \"4\": \"var(--ak-container-4)\",\n sm: \"var(--ak-container-1)\",\n md: \"var(--ak-container-2)\",\n lg: \"var(--ak-container-3)\",\n xl: \"var(--ak-container-4)\",\n};\n\nconst SECTION_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-section-1)\",\n \"2\": \"var(--ak-section-2)\",\n \"3\": \"var(--ak-section-3)\",\n \"4\": \"var(--ak-section-4)\",\n};\n\n/**\n * Returns true when `value` is a concrete CSS length/size that can be serialized\n * into a CSS declaration without token translation.\n */\nexport function isCssLength(value: unknown): value is string {\n if (typeof value !== \"string\") return false;\n const v = value.trim();\n if (v === \"0\") return true;\n if (CSS_UNIT_RE.test(v)) return true;\n // CSS functions: calc(), min(), max(), clamp(), fit-content(), env(), var()\n if (/^[a-z][a-z-]*\\(/.test(v)) return true;\n return false;\n}\n\nexport function isResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): value is Partial<Record<LayoutBreakpoint, T>> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n return BREAKPOINTS.some((breakpoint) => breakpoint in value);\n}\n\nexport function normalizeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): Partial<Record<LayoutBreakpoint, T>> | undefined {\n if (value === undefined) return undefined;\n if (isResponsiveValue(value)) return value;\n return { initial: value };\n}\n\nexport function serializeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n return BREAKPOINTS.map((breakpoint) => {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) return \"\";\n return `${breakpoint}:${String(breakpointValue)}`;\n })\n .filter(Boolean)\n .join(\"|\");\n}\n\nexport function serializeResponsiveValueIf<T>(\n value: ResponsiveValue<T> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n if (!predicate(breakpointValue)) return undefined;\n }\n\n return serializeResponsiveValue(value);\n}\n\nexport function serializeValueIf<T>(\n value: T | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (value === undefined || !predicate(value)) return undefined;\n return String(value);\n}\n\nexport function setResponsiveStyleVar<T>(\n styles: Record<string, string | number>,\n variable: string,\n value: ResponsiveValue<T> | undefined,\n resolve: (value: T) => string | number | undefined = (input) =>\n input as string | number | undefined,\n) {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n const resolved = resolve(breakpointValue);\n if (resolved === undefined || resolved === null || resolved === \"\") continue;\n styles[`--ak-${variable}-${breakpoint}`] = resolved;\n }\n}\n\nexport function resolveSpaceValue(value: string | number): string | number {\n if (typeof value === \"number\") return String(value);\n const trimmed = value.trim();\n return SPACE_TOKEN_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveContainerSizeValue(value: string): string {\n const trimmed = value.trim();\n return CONTAINER_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveSectionSizeValue(value: string): string {\n const trimmed = value.trim();\n return SECTION_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveJustifyValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"between\") return \"space-between\";\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveAlignValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveInlineAlignValue(value: \"left\" | \"center\" | \"right\"): {\n marginLeft?: string;\n marginRight?: string;\n} {\n if (value === \"left\") return { marginLeft: \"0\", marginRight: \"auto\" };\n if (value === \"right\") return { marginLeft: \"auto\", marginRight: \"0\" };\n return { marginLeft: \"auto\", marginRight: \"auto\" };\n}\n\n/**\n * Merges a record of computed layout declarations with a user-supplied style\n * value. The user's declarations take precedence for conflicting keys.\n */\nexport function mergeLayoutStyles(\n layout: Record<string, string | number>,\n user: unknown,\n): string | undefined {\n const merged: Record<string, unknown> = { ...layout };\n\n if (user !== null && user !== undefined && typeof user === \"object\") {\n Object.assign(merged, user as Record<string, unknown>);\n }\n\n const mergedString = objectToCssString(merged);\n\n if (typeof user === \"string\" && user.trim()) {\n return mergedString ? `${mergedString};${user.trim()}` : user.trim();\n }\n\n return mergedString || undefined;\n}\n\nfunction camelToKebab(s: string): string {\n return s.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);\n}\n\nfunction objectToCssString(styles: Record<string, unknown>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(\";\");\n}\n"],"mappings":";AAOA,MAAM,cAA2C;CAAC;CAAW;CAAM;CAAM;CAAM;CAAK;;AAGpF,MAAM,cACJ;AAEF,MAAM,kBAA0C;CAC9C,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACR;AAED,MAAM,qBAA6C;CACjD,KAAK;CACL,KAAK;CACL,KAAK;CACL,KAAK;CACL,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;
|
|
1
|
+
{"version":3,"file":"layout.js","names":[],"sources":["../../../src/components/_internal/layout.ts"],"sourcesContent":["/**\n * Layout helpers shared by headless layout primitives.\n */\n\nexport type LayoutBreakpoint = \"initial\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ResponsiveValue<T> = T | Partial<Record<LayoutBreakpoint, T>>;\n\nconst BREAKPOINTS: readonly LayoutBreakpoint[] = [\"initial\", \"sm\", \"md\", \"lg\", \"xl\"];\n\n/** Units and patterns that identify a concrete CSS length value. */\nconst CSS_UNIT_RE =\n /^-?[\\d.]+(%|px|em|rem|ex|ch|ic|lh|rlh|vw|vh|vmin|vmax|svw|svh|dvw|dvh|cqw|cqh|cqi|cqb|fr|cm|mm|in|pt|pc|Q)$/;\n\nconst SPACE_TOKEN_MAP: Record<string, string> = {\n \"1\": \"var(--ak-space-1)\",\n \"2\": \"var(--ak-space-2)\",\n \"3\": \"var(--ak-space-3)\",\n \"4\": \"var(--ak-space-4)\",\n \"5\": \"var(--ak-space-5)\",\n \"6\": \"var(--ak-space-6)\",\n \"7\": \"var(--ak-space-7)\",\n \"8\": \"var(--ak-space-8)\",\n \"9\": \"var(--ak-space-9)\",\n xs: \"var(--ak-space-xs)\",\n sm: \"var(--ak-space-sm)\",\n md: \"var(--ak-space-md)\",\n lg: \"var(--ak-space-lg)\",\n xl: \"var(--ak-space-xl)\",\n \"2xl\": \"var(--ak-space-2xl)\",\n \"3xl\": \"var(--ak-space-3xl)\",\n};\n\nconst CONTAINER_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-container-1)\",\n \"2\": \"var(--ak-container-2)\",\n \"3\": \"var(--ak-container-3)\",\n \"4\": \"var(--ak-container-4)\",\n sm: \"var(--ak-container-1)\",\n md: \"var(--ak-container-2)\",\n lg: \"var(--ak-container-3)\",\n xl: \"var(--ak-container-4)\",\n fluid: \"100%\",\n};\n\nconst SECTION_SIZE_MAP: Record<string, string> = {\n \"1\": \"var(--ak-section-1)\",\n \"2\": \"var(--ak-section-2)\",\n \"3\": \"var(--ak-section-3)\",\n \"4\": \"var(--ak-section-4)\",\n};\n\n/**\n * Returns true when `value` is a concrete CSS length/size that can be serialized\n * into a CSS declaration without token translation.\n */\nexport function isCssLength(value: unknown): value is string {\n if (typeof value !== \"string\") return false;\n const v = value.trim();\n if (v === \"0\") return true;\n if (CSS_UNIT_RE.test(v)) return true;\n // CSS functions: calc(), min(), max(), clamp(), fit-content(), env(), var()\n if (/^[a-z][a-z-]*\\(/.test(v)) return true;\n return false;\n}\n\nexport function isResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): value is Partial<Record<LayoutBreakpoint, T>> {\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return false;\n return BREAKPOINTS.some((breakpoint) => breakpoint in value);\n}\n\nexport function normalizeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): Partial<Record<LayoutBreakpoint, T>> | undefined {\n if (value === undefined) return undefined;\n if (isResponsiveValue(value)) return value;\n return { initial: value };\n}\n\nexport function serializeResponsiveValue<T>(\n value: ResponsiveValue<T> | undefined,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n return BREAKPOINTS.map((breakpoint) => {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) return \"\";\n return `${breakpoint}:${String(breakpointValue)}`;\n })\n .filter(Boolean)\n .join(\"|\");\n}\n\nexport function serializeResponsiveValueIf<T>(\n value: ResponsiveValue<T> | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return undefined;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n if (!predicate(breakpointValue)) return undefined;\n }\n\n return serializeResponsiveValue(value);\n}\n\nexport function serializeValueIf<T>(\n value: T | undefined,\n predicate: (value: T) => boolean,\n): string | undefined {\n if (value === undefined || !predicate(value)) return undefined;\n return String(value);\n}\n\nexport function setResponsiveStyleVar<T>(\n styles: Record<string, string | number>,\n variable: string,\n value: ResponsiveValue<T> | undefined,\n resolve: (value: T) => string | number | undefined = (input) =>\n input as string | number | undefined,\n) {\n const normalized = normalizeResponsiveValue(value);\n if (!normalized) return;\n\n for (const breakpoint of BREAKPOINTS) {\n const breakpointValue = normalized[breakpoint];\n if (breakpointValue === undefined) continue;\n const resolved = resolve(breakpointValue);\n if (resolved === undefined || resolved === null || resolved === \"\") continue;\n styles[`--ak-${variable}-${breakpoint}`] = resolved;\n }\n}\n\nexport function resolveSpaceValue(value: string | number): string | number {\n if (typeof value === \"number\") return String(value);\n const trimmed = value.trim();\n return SPACE_TOKEN_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveContainerSizeValue(value: string): string {\n const trimmed = value.trim();\n return CONTAINER_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveSectionSizeValue(value: string): string {\n const trimmed = value.trim();\n return SECTION_SIZE_MAP[trimmed] ?? trimmed;\n}\n\nexport function resolveJustifyValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"between\") return \"space-between\";\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveAlignValue(value: string): string {\n const trimmed = value.trim();\n if (trimmed === \"start\") return \"flex-start\";\n if (trimmed === \"end\") return \"flex-end\";\n return trimmed;\n}\n\nexport function resolveInlineAlignValue(value: \"left\" | \"center\" | \"right\"): {\n marginLeft?: string;\n marginRight?: string;\n} {\n if (value === \"left\") return { marginLeft: \"0\", marginRight: \"auto\" };\n if (value === \"right\") return { marginLeft: \"auto\", marginRight: \"0\" };\n return { marginLeft: \"auto\", marginRight: \"auto\" };\n}\n\n/**\n * Merges a record of computed layout declarations with a user-supplied style\n * value. The user's declarations take precedence for conflicting keys.\n */\nexport function mergeLayoutStyles(\n layout: Record<string, string | number>,\n user: unknown,\n): string | undefined {\n const merged: Record<string, unknown> = { ...layout };\n\n if (user !== null && user !== undefined && typeof user === \"object\") {\n Object.assign(merged, user as Record<string, unknown>);\n }\n\n const mergedString = objectToCssString(merged);\n\n if (typeof user === \"string\" && user.trim()) {\n return mergedString ? `${mergedString};${user.trim()}` : user.trim();\n }\n\n return mergedString || undefined;\n}\n\nfunction camelToKebab(s: string): string {\n return s.replace(/([A-Z])/g, (c) => `-${c.toLowerCase()}`);\n}\n\nfunction objectToCssString(styles: Record<string, unknown>): string {\n return Object.entries(styles)\n .filter(([, value]) => value !== undefined && value !== null)\n .map(([key, value]) => `${camelToKebab(key)}:${String(value)}`)\n .join(\";\");\n}\n"],"mappings":"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"}
|
|
@@ -4,7 +4,6 @@ declare const CONTAINER_A11Y_CONTRACT: {
|
|
|
4
4
|
readonly slot: "data-slot";
|
|
5
5
|
readonly layout: "data-ak-layout";
|
|
6
6
|
readonly variant: "data-variant";
|
|
7
|
-
readonly fluid: "data-fluid";
|
|
8
7
|
readonly maxWidth: "data-max-width";
|
|
9
8
|
readonly padding: "data-padding";
|
|
10
9
|
readonly size: "data-size";
|
|
@@ -12,7 +12,8 @@ const CONTAINER_WIDTH_TOKENS = new Set([
|
|
|
12
12
|
"sm",
|
|
13
13
|
"md",
|
|
14
14
|
"lg",
|
|
15
|
-
"xl"
|
|
15
|
+
"xl",
|
|
16
|
+
"fluid"
|
|
16
17
|
]);
|
|
17
18
|
function isContainerWidthToken(value) {
|
|
18
19
|
return typeof value === "string" && CONTAINER_WIDTH_TOKENS.has(value.trim());
|
|
@@ -33,15 +34,15 @@ function isStaticValue(value) {
|
|
|
33
34
|
return !isResponsiveValue(value);
|
|
34
35
|
}
|
|
35
36
|
function Container(props) {
|
|
36
|
-
const { asChild, children, variant,
|
|
37
|
-
const responsiveVariant =
|
|
37
|
+
const { asChild, children, variant, maxWidth, padding, size, align = "center", ref, style: userStyle, ...rest } = props;
|
|
38
|
+
const responsiveVariant = size === void 0 && maxWidth === void 0 ? variant ?? "default" : void 0;
|
|
38
39
|
const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
|
|
39
40
|
const layoutStyle = {
|
|
40
41
|
boxSizing: "border-box",
|
|
41
42
|
width: "100%"
|
|
42
43
|
};
|
|
43
44
|
applyBoxLayoutStyles(layoutStyle, boxProps);
|
|
44
|
-
const widthValue =
|
|
45
|
+
const widthValue = maxWidth ?? size;
|
|
45
46
|
if (boxProps.maxWidth === void 0 && widthValue !== void 0 && (isResponsiveValue(widthValue) || !isContainerWidthToken(widthValue))) setResponsiveStyleVar(layoutStyle, "max-width", widthValue, (value) => typeof value === "string" && isContainerWidthToken(value) ? resolveContainerSizeValue(value) : value);
|
|
46
47
|
if (padding !== void 0 && boxProps.px === void 0 && boxProps.pl === void 0 && boxProps.pr === void 0) setResponsiveStyleVar(layoutStyle, "px", padding, resolveSpaceValue);
|
|
47
48
|
const applyAlign = (side, value) => {
|
|
@@ -60,10 +61,9 @@ function Container(props) {
|
|
|
60
61
|
"data-slot": "container",
|
|
61
62
|
"data-ak-layout": "true",
|
|
62
63
|
"data-variant": responsiveVariant,
|
|
63
|
-
"data-
|
|
64
|
-
"data-size": fluid ? void 0 : isStaticValue(size) ? serializeResponsiveValueIf(size, isContainerWidthToken) : void 0,
|
|
64
|
+
"data-size": isStaticValue(size) ? serializeResponsiveValueIf(size, isContainerWidthToken) : void 0,
|
|
65
65
|
"data-align": isStaticValue(align) ? serializeResponsiveValueIf(align, isContainerAlignToken) : void 0,
|
|
66
|
-
"data-max-width":
|
|
66
|
+
"data-max-width": isStaticValue(maxWidth) ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken) : void 0,
|
|
67
67
|
...layoutClass ? { class: layoutClass } : {}
|
|
68
68
|
});
|
|
69
69
|
if (asChild) return /* @__PURE__ */ jsx(Slot, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","names":[],"sources":["../../../src/components/container/container.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutClass,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveContainerSizeValue,\n resolveInlineAlignValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { ContainerAsChildProps, ContainerNativeProps } from \"./container.types\";\n\nconst CONTAINER_WIDTH_TOKENS = new Set([\"1\", \"2\", \"3\", \"4\", \"sm\", \"md\", \"lg\", \"xl\"]);\n\nfunction isContainerWidthToken(value: unknown): value is string {\n return typeof value === \"string\" && CONTAINER_WIDTH_TOKENS.has(value.trim());\n}\n\nfunction isContainerAlignToken(value: unknown): value is \"left\" | \"center\" | \"right\" {\n return typeof value === \"string\" && [\"left\", \"center\", \"right\"].includes(value.trim());\n}\n\nfunction hasStyleValue(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n if (value && typeof value === \"object\") {\n return Object.keys(value as Record<string, unknown>).length > 0;\n }\n\n return false;\n}\n\nfunction isStaticValue(value: unknown): boolean {\n return !isResponsiveValue(value as Record<string, unknown> | undefined);\n}\n\nexport function Container(props: ContainerNativeProps): JSX.Element;\nexport function Container(props: ContainerAsChildProps): JSX.Element;\nexport function Container(props: ContainerNativeProps | ContainerAsChildProps) {\n const {\n asChild,\n children,\n variant,\n
|
|
1
|
+
{"version":3,"file":"container.js","names":[],"sources":["../../../src/components/container/container.tsx"],"sourcesContent":["import { Slot } from \"@askrjs/askr/foundations\";\nimport { mergeProps } from \"../_internal/merge-props\";\nimport {\n applyBoxLayoutStyles,\n splitBoxLayoutProps,\n withBoxLayoutClass,\n} from \"../_internal/box-layout\";\nimport {\n isResponsiveValue,\n resolveContainerSizeValue,\n resolveInlineAlignValue,\n resolveSpaceValue,\n serializeResponsiveValueIf,\n setResponsiveStyleVar,\n} from \"../_internal/layout\";\nimport type { ContainerAsChildProps, ContainerNativeProps } from \"./container.types\";\n\nconst CONTAINER_WIDTH_TOKENS = new Set([\"1\", \"2\", \"3\", \"4\", \"sm\", \"md\", \"lg\", \"xl\", \"fluid\"]);\n\nfunction isContainerWidthToken(value: unknown): value is string {\n return typeof value === \"string\" && CONTAINER_WIDTH_TOKENS.has(value.trim());\n}\n\nfunction isContainerAlignToken(value: unknown): value is \"left\" | \"center\" | \"right\" {\n return typeof value === \"string\" && [\"left\", \"center\", \"right\"].includes(value.trim());\n}\n\nfunction hasStyleValue(value: unknown): boolean {\n if (typeof value === \"string\") return value.trim().length > 0;\n if (value && typeof value === \"object\") {\n return Object.keys(value as Record<string, unknown>).length > 0;\n }\n\n return false;\n}\n\nfunction isStaticValue(value: unknown): boolean {\n return !isResponsiveValue(value as Record<string, unknown> | undefined);\n}\n\nexport function Container(props: ContainerNativeProps): JSX.Element;\nexport function Container(props: ContainerAsChildProps): JSX.Element;\nexport function Container(props: ContainerNativeProps | ContainerAsChildProps) {\n const {\n asChild,\n children,\n variant,\n maxWidth,\n padding,\n size,\n align = \"center\",\n ref,\n style: userStyle,\n ...rest\n } = props;\n\n const responsiveVariant =\n size === undefined && maxWidth === undefined ? (variant ?? \"default\") : undefined;\n\n const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);\n const layoutStyle: Record<string, string | number> = {\n boxSizing: \"border-box\",\n width: \"100%\",\n };\n applyBoxLayoutStyles(layoutStyle, boxProps);\n\n const widthValue = maxWidth ?? size;\n const usesInlineMaxWidth =\n boxProps.maxWidth === undefined &&\n widthValue !== undefined &&\n (isResponsiveValue(widthValue) || !isContainerWidthToken(widthValue));\n\n if (usesInlineMaxWidth) {\n setResponsiveStyleVar(layoutStyle, \"max-width\", widthValue, (value) =>\n typeof value === \"string\" && isContainerWidthToken(value)\n ? resolveContainerSizeValue(value)\n : value,\n );\n }\n\n if (\n padding !== undefined &&\n boxProps.px === undefined &&\n boxProps.pl === undefined &&\n boxProps.pr === undefined\n ) {\n setResponsiveStyleVar(layoutStyle, \"px\", padding, resolveSpaceValue);\n }\n\n const applyAlign = (side: \"marginLeft\" | \"marginRight\", value: typeof align) => {\n setResponsiveStyleVar(layoutStyle, side === \"marginLeft\" ? \"ml\" : \"mr\", value, (input) => {\n const margins = resolveInlineAlignValue(input);\n return side === \"marginLeft\" ? margins.marginLeft : margins.marginRight;\n });\n };\n\n if (boxProps.ml === undefined && boxProps.mr === undefined && isResponsiveValue(align)) {\n applyAlign(\"marginLeft\", align);\n applyAlign(\"marginRight\", align);\n }\n\n const layoutClass =\n Object.keys(layoutStyle).length > 2 || hasStyleValue(userStyle)\n ? withBoxLayoutClass(layoutStyle, userStyle)\n : undefined;\n\n const finalProps = mergeProps(passthroughProps, {\n ref,\n \"data-slot\": \"container\",\n \"data-ak-layout\": \"true\",\n \"data-variant\": responsiveVariant,\n \"data-size\": isStaticValue(size)\n ? serializeResponsiveValueIf(size, isContainerWidthToken)\n : undefined,\n \"data-align\": isStaticValue(align)\n ? serializeResponsiveValueIf(align, isContainerAlignToken)\n : undefined,\n \"data-max-width\": isStaticValue(maxWidth)\n ? serializeResponsiveValueIf(maxWidth, isContainerWidthToken)\n : undefined,\n ...(layoutClass ? { class: layoutClass } : {}),\n });\n\n if (asChild) {\n return <Slot asChild {...finalProps} children={children} />;\n }\n\n return <div {...finalProps}>{children}</div>;\n}\n"],"mappings":";;;;;;AAiBA,MAAM,yBAAyB,IAAI,IAAI;CAAC;CAAK;CAAK;CAAK;CAAK;CAAM;CAAM;CAAM;CAAM;CAAQ,CAAC;AAE7F,SAAS,sBAAsB,OAAiC;CAC9D,OAAO,OAAO,UAAU,YAAY,uBAAuB,IAAI,MAAM,MAAM,CAAC;;AAG9E,SAAS,sBAAsB,OAAsD;CACnF,OAAO,OAAO,UAAU,YAAY;EAAC;EAAQ;EAAU;EAAQ,CAAC,SAAS,MAAM,MAAM,CAAC;;AAGxF,SAAS,cAAc,OAAyB;CAC9C,IAAI,OAAO,UAAU,UAAU,OAAO,MAAM,MAAM,CAAC,SAAS;CAC5D,IAAI,SAAS,OAAO,UAAU,UAC5B,OAAO,OAAO,KAAK,MAAiC,CAAC,SAAS;CAGhE,OAAO;;AAGT,SAAS,cAAc,OAAyB;CAC9C,OAAO,CAAC,kBAAkB,MAA6C;;AAKzE,SAAgB,UAAU,OAAqD;CAC7E,MAAM,EACJ,SACA,UACA,SACA,UACA,SACA,MACA,QAAQ,UACR,KACA,OAAO,WACP,GAAG,SACD;CAEJ,MAAM,oBACJ,SAAS,KAAA,KAAa,aAAa,KAAA,IAAa,WAAW,YAAa,KAAA;CAE1E,MAAM,EAAE,UAAU,MAAM,qBAAqB,oBAAoB,KAAK;CACtE,MAAM,cAA+C;EACnD,WAAW;EACX,OAAO;EACR;CACD,qBAAqB,aAAa,SAAS;CAE3C,MAAM,aAAa,YAAY;CAM/B,IAJE,SAAS,aAAa,KAAA,KACtB,eAAe,KAAA,MACd,kBAAkB,WAAW,IAAI,CAAC,sBAAsB,WAAW,GAGpE,sBAAsB,aAAa,aAAa,aAAa,UAC3D,OAAO,UAAU,YAAY,sBAAsB,MAAM,GACrD,0BAA0B,MAAM,GAChC,MACL;CAGH,IACE,YAAY,KAAA,KACZ,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,KAChB,SAAS,OAAO,KAAA,GAEhB,sBAAsB,aAAa,MAAM,SAAS,kBAAkB;CAGtE,MAAM,cAAc,MAAoC,UAAwB;EAC9E,sBAAsB,aAAa,SAAS,eAAe,OAAO,MAAM,QAAQ,UAAU;GACxF,MAAM,UAAU,wBAAwB,MAAM;GAC9C,OAAO,SAAS,eAAe,QAAQ,aAAa,QAAQ;IAC5D;;CAGJ,IAAI,SAAS,OAAO,KAAA,KAAa,SAAS,OAAO,KAAA,KAAa,kBAAkB,MAAM,EAAE;EACtF,WAAW,cAAc,MAAM;EAC/B,WAAW,eAAe,MAAM;;CAGlC,MAAM,cACJ,OAAO,KAAK,YAAY,CAAC,SAAS,KAAK,cAAc,UAAU,GAC3D,mBAAmB,aAAa,UAAU,GAC1C,KAAA;CAEN,MAAM,aAAa,WAAW,kBAAkB;EAC9C;EACA,aAAa;EACb,kBAAkB;EAClB,gBAAgB;EAChB,aAAa,cAAc,KAAK,GAC5B,2BAA2B,MAAM,sBAAsB,GACvD,KAAA;EACJ,cAAc,cAAc,MAAM,GAC9B,2BAA2B,OAAO,sBAAsB,GACxD,KAAA;EACJ,kBAAkB,cAAc,SAAS,GACrC,2BAA2B,UAAU,sBAAsB,GAC3D,KAAA;EACJ,GAAI,cAAc,EAAE,OAAO,aAAa,GAAG,EAAE;EAC9C,CAAC;CAEF,IAAI,SACF,OAAO,oBAAC,MAAD;EAAM,SAAA;EAAQ,GAAI;EAAsB;EAAY,CAAA;CAG7D,OAAO,oBAAC,OAAD;EAAK,GAAI;EAAa;EAAe,CAAA"}
|
|
@@ -5,9 +5,8 @@ import { Ref } from "@askrjs/askr/foundations/utilities";
|
|
|
5
5
|
//#region src/components/container/container.types.d.ts
|
|
6
6
|
type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "fluid";
|
|
7
7
|
type ContainerOwnProps = BoxLayoutOwnProps & {
|
|
8
|
-
/** Bootstrap-like responsive container variant. */variant?: ContainerVariant; /**
|
|
9
|
-
|
|
10
|
-
size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">; /** Horizontal alignment of the constrained container. */
|
|
8
|
+
/** Bootstrap-like responsive container variant. */variant?: ContainerVariant; /** Radix-style container size token. */
|
|
9
|
+
size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl" | "fluid">; /** Horizontal alignment of the constrained container. */
|
|
11
10
|
align?: LayoutResponsive<"left" | "center" | "right">; /** Compatibility max-width override. */
|
|
12
11
|
maxWidth?: LayoutResponsive<string>; /** Compatibility horizontal padding override. */
|
|
13
12
|
padding?: LayoutResponsive<string | number>;
|
|
@@ -797,7 +797,7 @@
|
|
|
797
797
|
display: block;
|
|
798
798
|
}
|
|
799
799
|
|
|
800
|
-
:where([data-slot="container"][data-
|
|
800
|
+
:where([data-slot="container"][data-size="initial:fluid"]), :where([data-slot="container"][data-variant="default"]), :where([data-slot="container"][data-variant="sm"]), :where([data-slot="container"][data-variant="md"]), :where([data-slot="container"][data-variant="lg"]), :where([data-slot="container"][data-variant="xl"]), :where([data-slot="container"][data-variant="xxl"]), :where([data-slot="container"][data-variant="fluid"]) {
|
|
801
801
|
--ak-container-inline-size: 100%;
|
|
802
802
|
}
|
|
803
803
|
|
|
@@ -1159,11 +1159,13 @@
|
|
|
1159
1159
|
}
|
|
1160
1160
|
|
|
1161
1161
|
:where([data-slot="shell"][data-variant="sidebar"], [data-slot="shell"][data-variant="rail"]) > :where([data-slot="shell-nav"]) {
|
|
1162
|
+
min-block-size: 100vh;
|
|
1162
1163
|
padding: var(--ak-layout-page-gutter);
|
|
1163
1164
|
background: color-mix(in srgb, var(--ak-color-surface-muted) 92%, var(--ak-color-surface));
|
|
1164
1165
|
border-inline-end: 0;
|
|
1165
1166
|
border-block-end: 1px solid var(--ak-color-border);
|
|
1166
|
-
|
|
1167
|
+
flex: 0 0 100vh;
|
|
1168
|
+
align-content: stretch;
|
|
1167
1169
|
inline-size: 100%;
|
|
1168
1170
|
min-inline-size: 0;
|
|
1169
1171
|
max-inline-size: 100%;
|
|
@@ -2162,11 +2164,17 @@
|
|
|
2162
2164
|
}
|
|
2163
2165
|
|
|
2164
2166
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.navbar-group[data-align="center"], [data-slot="navbar-group"][data-align="center"], .sidebar-group[data-align="center"], [data-slot="sidebar-group"][data-align="center"]) {
|
|
2165
|
-
justify-items:
|
|
2167
|
+
justify-items: center;
|
|
2166
2168
|
}
|
|
2167
2169
|
|
|
2168
2170
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.navbar-group[data-align="center"], [data-slot="navbar-group"][data-align="center"], .sidebar-group[data-align="center"], [data-slot="sidebar-group"][data-align="center"]) > :where(.navbar-group-label, [data-slot="navbar-group-label"], .sidebar-group-label, [data-slot="sidebar-group-label"]) {
|
|
2169
2171
|
text-align: center;
|
|
2172
|
+
inline-size: 100%;
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.navbar-group[data-align="center"], [data-slot="navbar-group"][data-align="center"], .sidebar-group[data-align="center"], [data-slot="sidebar-group"][data-align="center"]) > :where(.navbar-group-body, [data-slot="navbar-group-body"], .sidebar-group-body, [data-slot="sidebar-group-body"]) {
|
|
2176
|
+
justify-items: center;
|
|
2177
|
+
inline-size: 100%;
|
|
2170
2178
|
}
|
|
2171
2179
|
|
|
2172
2180
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.navbar-group[data-align="end"], [data-slot="navbar-group"][data-align="end"], .sidebar-group[data-align="end"], [data-slot="sidebar-group"][data-align="end"]) {
|
|
@@ -2207,6 +2215,9 @@
|
|
|
2207
2215
|
|
|
2208
2216
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.navbar-group[data-align="center"], [data-slot="navbar-group"][data-align="center"], .sidebar-group[data-align="center"], [data-slot="sidebar-group"][data-align="center"]) :where(.nav-item, .navbar-item, [data-slot="nav-item"], [data-slot="nav-link"], .sidebar-item) {
|
|
2209
2217
|
justify-content: center;
|
|
2218
|
+
justify-self: center;
|
|
2219
|
+
inline-size: auto;
|
|
2220
|
+
max-inline-size: 100%;
|
|
2210
2221
|
}
|
|
2211
2222
|
|
|
2212
2223
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"]) :where(.nav-item, .navbar-item, [data-slot="nav-item"], [data-slot="nav-link"], .sidebar-item) > :where([data-slot="icon"], svg) {
|
|
@@ -4362,12 +4373,80 @@
|
|
|
4362
4373
|
display: flex;
|
|
4363
4374
|
}
|
|
4364
4375
|
|
|
4365
|
-
[data-slot="flex"] {
|
|
4376
|
+
[data-slot="flex"], [data-slot="inline"] {
|
|
4366
4377
|
gap: var(--ak-space-md);
|
|
4367
4378
|
flex-wrap: wrap;
|
|
4368
4379
|
display: flex;
|
|
4369
4380
|
}
|
|
4370
4381
|
|
|
4382
|
+
[data-slot="flex"][data-gap="initial:1"], [data-slot="inline"][data-gap="initial:1"] {
|
|
4383
|
+
gap: var(--ak-space-1);
|
|
4384
|
+
}
|
|
4385
|
+
|
|
4386
|
+
[data-slot="flex"][data-gap="initial:2"], [data-slot="inline"][data-gap="initial:2"] {
|
|
4387
|
+
gap: var(--ak-space-2);
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
[data-slot="flex"][data-gap="initial:3"], [data-slot="inline"][data-gap="initial:3"] {
|
|
4391
|
+
gap: var(--ak-space-3);
|
|
4392
|
+
}
|
|
4393
|
+
|
|
4394
|
+
[data-slot="flex"][data-gap="initial:4"], [data-slot="inline"][data-gap="initial:4"] {
|
|
4395
|
+
gap: var(--ak-space-4);
|
|
4396
|
+
}
|
|
4397
|
+
|
|
4398
|
+
[data-slot="flex"][data-gap="initial:xs"], [data-slot="inline"][data-gap="initial:xs"] {
|
|
4399
|
+
gap: var(--ak-space-xs);
|
|
4400
|
+
}
|
|
4401
|
+
|
|
4402
|
+
[data-slot="flex"][data-gap="initial:sm"], [data-slot="inline"][data-gap="initial:sm"] {
|
|
4403
|
+
gap: var(--ak-space-sm);
|
|
4404
|
+
}
|
|
4405
|
+
|
|
4406
|
+
[data-slot="flex"][data-gap="initial:md"], [data-slot="inline"][data-gap="initial:md"] {
|
|
4407
|
+
gap: var(--ak-space-md);
|
|
4408
|
+
}
|
|
4409
|
+
|
|
4410
|
+
[data-slot="flex"][data-gap="initial:lg"], [data-slot="inline"][data-gap="initial:lg"] {
|
|
4411
|
+
gap: var(--ak-space-lg);
|
|
4412
|
+
}
|
|
4413
|
+
|
|
4414
|
+
[data-slot="flex"][data-gap="initial:xl"], [data-slot="inline"][data-gap="initial:xl"] {
|
|
4415
|
+
gap: var(--ak-space-xl);
|
|
4416
|
+
}
|
|
4417
|
+
|
|
4418
|
+
[data-slot="flex"][data-gap-x="initial:sm"], [data-slot="inline"][data-gap-x="initial:sm"] {
|
|
4419
|
+
column-gap: var(--ak-space-sm);
|
|
4420
|
+
}
|
|
4421
|
+
|
|
4422
|
+
[data-slot="flex"][data-gap-x="initial:md"], [data-slot="inline"][data-gap-x="initial:md"] {
|
|
4423
|
+
column-gap: var(--ak-space-md);
|
|
4424
|
+
}
|
|
4425
|
+
|
|
4426
|
+
[data-slot="flex"][data-gap-x="initial:lg"], [data-slot="inline"][data-gap-x="initial:lg"] {
|
|
4427
|
+
column-gap: var(--ak-space-lg);
|
|
4428
|
+
}
|
|
4429
|
+
|
|
4430
|
+
[data-slot="flex"][data-gap-y="initial:sm"], [data-slot="inline"][data-gap-y="initial:sm"] {
|
|
4431
|
+
row-gap: var(--ak-space-sm);
|
|
4432
|
+
}
|
|
4433
|
+
|
|
4434
|
+
[data-slot="flex"][data-gap-y="initial:md"], [data-slot="inline"][data-gap-y="initial:md"] {
|
|
4435
|
+
row-gap: var(--ak-space-md);
|
|
4436
|
+
}
|
|
4437
|
+
|
|
4438
|
+
[data-slot="flex"][data-gap-y="initial:lg"], [data-slot="inline"][data-gap-y="initial:lg"] {
|
|
4439
|
+
row-gap: var(--ak-space-lg);
|
|
4440
|
+
}
|
|
4441
|
+
|
|
4442
|
+
[data-slot="flex"][data-wrap="initial:nowrap"], [data-slot="inline"][data-wrap="initial:nowrap"] {
|
|
4443
|
+
flex-wrap: nowrap;
|
|
4444
|
+
}
|
|
4445
|
+
|
|
4446
|
+
[data-slot="flex"][data-wrap="initial:wrap-reverse"], [data-slot="inline"][data-wrap="initial:wrap-reverse"] {
|
|
4447
|
+
flex-wrap: wrap-reverse;
|
|
4448
|
+
}
|
|
4449
|
+
|
|
4371
4450
|
[data-slot="section"] {
|
|
4372
4451
|
display: block;
|
|
4373
4452
|
}
|
|
@@ -4512,7 +4591,7 @@
|
|
|
4512
4591
|
--ak-state-unchecked: 1;
|
|
4513
4592
|
}
|
|
4514
4593
|
|
|
4515
|
-
[data-accordion], [data-accordion-header], [data-active-item], [data-align], [data-askr-visually-hidden], [data-auto-fit], [data-avatar], [data-avatar-fallback], [data-avatar-image], [data-axis], [data-badge], [data-basis], [data-breadcrumb], [data-breadcrumb-current], [data-breadcrumb-item], [data-breadcrumb-link], [data-breadcrumb-list], [data-breadcrumb-separator], [data-centered], [data-collapse-below], [data-columns], [data-dialog-overlay], [data-dismissable-layer], [data-dropdown-label], [data-
|
|
4594
|
+
[data-accordion], [data-accordion-header], [data-active-item], [data-align], [data-askr-visually-hidden], [data-auto-fit], [data-avatar], [data-avatar-fallback], [data-avatar-image], [data-axis], [data-badge], [data-basis], [data-breadcrumb], [data-breadcrumb-current], [data-breadcrumb-item], [data-breadcrumb-link], [data-breadcrumb-list], [data-breadcrumb-separator], [data-centered], [data-collapse-below], [data-columns], [data-dialog-overlay], [data-dismissable-layer], [data-dropdown-label], [data-focus-ring], [data-focus-scope], [data-gap], [data-grow], [data-inline], [data-justify], [data-max], [data-max-width], [data-menubar], [data-menubar-label], [data-min-height], [data-min-item-width], [data-padding], [data-percentage], [data-progress], [data-progress-circle], [data-progress-circle-indicator], [data-progress-indicator], [data-required], [data-select-item-text], [data-select-label], [data-shrink], [data-side], [data-side-offset], [data-size], [data-skeleton], [data-slider], [data-slider-range], [data-slider-thumb], [data-slider-track], [data-toast], [data-toast-action], [data-toast-close], [data-toast-description], [data-toast-provider], [data-toast-title], [data-toast-viewport], [data-toggle-group], [data-value], [data-wrap] {
|
|
4516
4595
|
--ak-contract-covered: 1;
|
|
4517
4596
|
}
|
|
4518
4597
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askrjs/themes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Default theme tokens, styles, and themed layout wrappers for Askr apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"askr",
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
"prepublishOnly": "npm run build"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@askrjs/askr": "^0.0.
|
|
142
|
+
"@askrjs/askr": "^0.0.39",
|
|
143
143
|
"@askrjs/ui": "^0.0.7",
|
|
144
144
|
"@askrjs/vite": "^0.0.2",
|
|
145
145
|
"@tsdown/css": "0.22.0",
|
|
@@ -3,7 +3,6 @@ export const CONTAINER_A11Y_CONTRACT = {
|
|
|
3
3
|
slot: "data-slot" as const,
|
|
4
4
|
layout: "data-ak-layout" as const,
|
|
5
5
|
variant: "data-variant" as const,
|
|
6
|
-
fluid: "data-fluid" as const,
|
|
7
6
|
maxWidth: "data-max-width" as const,
|
|
8
7
|
padding: "data-padding" as const,
|
|
9
8
|
size: "data-size" as const,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "../_internal/layout";
|
|
16
16
|
import type { ContainerAsChildProps, ContainerNativeProps } from "./container.types";
|
|
17
17
|
|
|
18
|
-
const CONTAINER_WIDTH_TOKENS = new Set(["1", "2", "3", "4", "sm", "md", "lg", "xl"]);
|
|
18
|
+
const CONTAINER_WIDTH_TOKENS = new Set(["1", "2", "3", "4", "sm", "md", "lg", "xl", "fluid"]);
|
|
19
19
|
|
|
20
20
|
function isContainerWidthToken(value: unknown): value is string {
|
|
21
21
|
return typeof value === "string" && CONTAINER_WIDTH_TOKENS.has(value.trim());
|
|
@@ -45,7 +45,6 @@ export function Container(props: ContainerNativeProps | ContainerAsChildProps) {
|
|
|
45
45
|
asChild,
|
|
46
46
|
children,
|
|
47
47
|
variant,
|
|
48
|
-
fluid = false,
|
|
49
48
|
maxWidth,
|
|
50
49
|
padding,
|
|
51
50
|
size,
|
|
@@ -56,11 +55,7 @@ export function Container(props: ContainerNativeProps | ContainerAsChildProps) {
|
|
|
56
55
|
} = props;
|
|
57
56
|
|
|
58
57
|
const responsiveVariant =
|
|
59
|
-
|
|
60
|
-
? fluid
|
|
61
|
-
? "fluid"
|
|
62
|
-
: (variant ?? "default")
|
|
63
|
-
: undefined;
|
|
58
|
+
size === undefined && maxWidth === undefined ? (variant ?? "default") : undefined;
|
|
64
59
|
|
|
65
60
|
const { boxProps, rest: passthroughProps } = splitBoxLayoutProps(rest);
|
|
66
61
|
const layoutStyle: Record<string, string | number> = {
|
|
@@ -69,7 +64,7 @@ export function Container(props: ContainerNativeProps | ContainerAsChildProps) {
|
|
|
69
64
|
};
|
|
70
65
|
applyBoxLayoutStyles(layoutStyle, boxProps);
|
|
71
66
|
|
|
72
|
-
const widthValue =
|
|
67
|
+
const widthValue = maxWidth ?? size;
|
|
73
68
|
const usesInlineMaxWidth =
|
|
74
69
|
boxProps.maxWidth === undefined &&
|
|
75
70
|
widthValue !== undefined &&
|
|
@@ -114,20 +109,15 @@ export function Container(props: ContainerNativeProps | ContainerAsChildProps) {
|
|
|
114
109
|
"data-slot": "container",
|
|
115
110
|
"data-ak-layout": "true",
|
|
116
111
|
"data-variant": responsiveVariant,
|
|
117
|
-
"data-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
: isStaticValue(size)
|
|
121
|
-
? serializeResponsiveValueIf(size, isContainerWidthToken)
|
|
122
|
-
: undefined,
|
|
112
|
+
"data-size": isStaticValue(size)
|
|
113
|
+
? serializeResponsiveValueIf(size, isContainerWidthToken)
|
|
114
|
+
: undefined,
|
|
123
115
|
"data-align": isStaticValue(align)
|
|
124
116
|
? serializeResponsiveValueIf(align, isContainerAlignToken)
|
|
125
117
|
: undefined,
|
|
126
|
-
"data-max-width":
|
|
127
|
-
?
|
|
128
|
-
:
|
|
129
|
-
? serializeResponsiveValueIf(maxWidth, isContainerWidthToken)
|
|
130
|
-
: undefined,
|
|
118
|
+
"data-max-width": isStaticValue(maxWidth)
|
|
119
|
+
? serializeResponsiveValueIf(maxWidth, isContainerWidthToken)
|
|
120
|
+
: undefined,
|
|
131
121
|
...(layoutClass ? { class: layoutClass } : {}),
|
|
132
122
|
});
|
|
133
123
|
|
|
@@ -7,10 +7,8 @@ export type ContainerVariant = "default" | "sm" | "md" | "lg" | "xl" | "xxl" | "
|
|
|
7
7
|
export type ContainerOwnProps = BoxLayoutOwnProps & {
|
|
8
8
|
/** Bootstrap-like responsive container variant. */
|
|
9
9
|
variant?: ContainerVariant;
|
|
10
|
-
/** Makes the container span the full available width while preserving gutters. */
|
|
11
|
-
fluid?: boolean;
|
|
12
10
|
/** Radix-style container size token. */
|
|
13
|
-
size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl">;
|
|
11
|
+
size?: LayoutResponsive<"1" | "2" | "3" | "4" | "sm" | "md" | "lg" | "xl" | "fluid">;
|
|
14
12
|
/** Horizontal alignment of the constrained container. */
|
|
15
13
|
align?: LayoutResponsive<"left" | "center" | "right">;
|
|
16
14
|
/** Compatibility max-width override. */
|
|
@@ -19,6 +19,97 @@
|
|
|
19
19
|
gap: var(--ak-space-md);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
[data-slot="inline"] {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
gap: var(--ak-space-md);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-slot="flex"][data-gap="initial:1"],
|
|
29
|
+
[data-slot="inline"][data-gap="initial:1"] {
|
|
30
|
+
gap: var(--ak-space-1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-slot="flex"][data-gap="initial:2"],
|
|
34
|
+
[data-slot="inline"][data-gap="initial:2"] {
|
|
35
|
+
gap: var(--ak-space-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[data-slot="flex"][data-gap="initial:3"],
|
|
39
|
+
[data-slot="inline"][data-gap="initial:3"] {
|
|
40
|
+
gap: var(--ak-space-3);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-slot="flex"][data-gap="initial:4"],
|
|
44
|
+
[data-slot="inline"][data-gap="initial:4"] {
|
|
45
|
+
gap: var(--ak-space-4);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-slot="flex"][data-gap="initial:xs"],
|
|
49
|
+
[data-slot="inline"][data-gap="initial:xs"] {
|
|
50
|
+
gap: var(--ak-space-xs);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-slot="flex"][data-gap="initial:sm"],
|
|
54
|
+
[data-slot="inline"][data-gap="initial:sm"] {
|
|
55
|
+
gap: var(--ak-space-sm);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-slot="flex"][data-gap="initial:md"],
|
|
59
|
+
[data-slot="inline"][data-gap="initial:md"] {
|
|
60
|
+
gap: var(--ak-space-md);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot="flex"][data-gap="initial:lg"],
|
|
64
|
+
[data-slot="inline"][data-gap="initial:lg"] {
|
|
65
|
+
gap: var(--ak-space-lg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-slot="flex"][data-gap="initial:xl"],
|
|
69
|
+
[data-slot="inline"][data-gap="initial:xl"] {
|
|
70
|
+
gap: var(--ak-space-xl);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-slot="flex"][data-gap-x="initial:sm"],
|
|
74
|
+
[data-slot="inline"][data-gap-x="initial:sm"] {
|
|
75
|
+
column-gap: var(--ak-space-sm);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-slot="flex"][data-gap-x="initial:md"],
|
|
79
|
+
[data-slot="inline"][data-gap-x="initial:md"] {
|
|
80
|
+
column-gap: var(--ak-space-md);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-slot="flex"][data-gap-x="initial:lg"],
|
|
84
|
+
[data-slot="inline"][data-gap-x="initial:lg"] {
|
|
85
|
+
column-gap: var(--ak-space-lg);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-slot="flex"][data-gap-y="initial:sm"],
|
|
89
|
+
[data-slot="inline"][data-gap-y="initial:sm"] {
|
|
90
|
+
row-gap: var(--ak-space-sm);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-slot="flex"][data-gap-y="initial:md"],
|
|
94
|
+
[data-slot="inline"][data-gap-y="initial:md"] {
|
|
95
|
+
row-gap: var(--ak-space-md);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-slot="flex"][data-gap-y="initial:lg"],
|
|
99
|
+
[data-slot="inline"][data-gap-y="initial:lg"] {
|
|
100
|
+
row-gap: var(--ak-space-lg);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-slot="flex"][data-wrap="initial:nowrap"],
|
|
104
|
+
[data-slot="inline"][data-wrap="initial:nowrap"] {
|
|
105
|
+
flex-wrap: nowrap;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-slot="flex"][data-wrap="initial:wrap-reverse"],
|
|
109
|
+
[data-slot="inline"][data-wrap="initial:wrap-reverse"] {
|
|
110
|
+
flex-wrap: wrap-reverse;
|
|
111
|
+
}
|
|
112
|
+
|
|
22
113
|
[data-slot="section"] {
|
|
23
114
|
display: block;
|
|
24
115
|
}
|
|
@@ -191,7 +282,6 @@
|
|
|
191
282
|
[data-dialog-overlay],
|
|
192
283
|
[data-dismissable-layer],
|
|
193
284
|
[data-dropdown-label],
|
|
194
|
-
[data-fluid],
|
|
195
285
|
[data-focus-ring],
|
|
196
286
|
[data-focus-scope],
|
|
197
287
|
[data-gap],
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
padding-right: var(--ak-pr-initial, var(--ak-px-initial, var(--ak-layout-page-gutter)));
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
:where([data-slot="container"][data-
|
|
67
|
+
:where([data-slot="container"][data-size="initial:fluid"]) {
|
|
68
68
|
--ak-container-inline-size: 100%;
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
:where([data-slot="shell"][data-variant="sidebar"], [data-slot="shell"][data-variant="rail"])
|
|
37
37
|
> :where([data-slot="shell-nav"]) {
|
|
38
38
|
display: grid;
|
|
39
|
-
align-content:
|
|
39
|
+
align-content: stretch;
|
|
40
|
+
flex: 0 0 100vh;
|
|
41
|
+
min-block-size: 100vh;
|
|
40
42
|
padding: var(--ak-layout-page-gutter);
|
|
41
43
|
inline-size: 100%;
|
|
42
44
|
max-inline-size: 100%;
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
.sidebar-group[data-align="center"],
|
|
126
126
|
[data-slot="sidebar-group"][data-align="center"]
|
|
127
127
|
) {
|
|
128
|
-
justify-items:
|
|
128
|
+
justify-items: center;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"])
|
|
@@ -141,9 +141,27 @@
|
|
|
141
141
|
.sidebar-group-label,
|
|
142
142
|
[data-slot="sidebar-group-label"]
|
|
143
143
|
) {
|
|
144
|
+
inline-size: 100%;
|
|
144
145
|
text-align: center;
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"])
|
|
149
|
+
:where(
|
|
150
|
+
.navbar-group[data-align="center"],
|
|
151
|
+
[data-slot="navbar-group"][data-align="center"],
|
|
152
|
+
.sidebar-group[data-align="center"],
|
|
153
|
+
[data-slot="sidebar-group"][data-align="center"]
|
|
154
|
+
)
|
|
155
|
+
> :where(
|
|
156
|
+
.navbar-group-body,
|
|
157
|
+
[data-slot="navbar-group-body"],
|
|
158
|
+
.sidebar-group-body,
|
|
159
|
+
[data-slot="sidebar-group-body"]
|
|
160
|
+
) {
|
|
161
|
+
inline-size: 100%;
|
|
162
|
+
justify-items: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
147
165
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"])
|
|
148
166
|
:where(
|
|
149
167
|
.navbar-group[data-align="end"],
|
|
@@ -207,7 +225,10 @@
|
|
|
207
225
|
[data-slot="sidebar-group"][data-align="center"]
|
|
208
226
|
)
|
|
209
227
|
:where(.nav-item, .navbar-item, [data-slot="nav-item"], [data-slot="nav-link"], .sidebar-item) {
|
|
228
|
+
inline-size: auto;
|
|
229
|
+
max-inline-size: 100%;
|
|
210
230
|
justify-content: center;
|
|
231
|
+
justify-self: center;
|
|
211
232
|
}
|
|
212
233
|
|
|
213
234
|
:where(.sidebar-shell, [data-slot="sidebar-shell"], .sidebar-panel, [data-slot="sidebar-panel"])
|
|
@@ -19,6 +19,97 @@
|
|
|
19
19
|
gap: var(--ak-space-md);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
[data-slot="inline"] {
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
gap: var(--ak-space-md);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-slot="flex"][data-gap="initial:1"],
|
|
29
|
+
[data-slot="inline"][data-gap="initial:1"] {
|
|
30
|
+
gap: var(--ak-space-1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
[data-slot="flex"][data-gap="initial:2"],
|
|
34
|
+
[data-slot="inline"][data-gap="initial:2"] {
|
|
35
|
+
gap: var(--ak-space-2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
[data-slot="flex"][data-gap="initial:3"],
|
|
39
|
+
[data-slot="inline"][data-gap="initial:3"] {
|
|
40
|
+
gap: var(--ak-space-3);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[data-slot="flex"][data-gap="initial:4"],
|
|
44
|
+
[data-slot="inline"][data-gap="initial:4"] {
|
|
45
|
+
gap: var(--ak-space-4);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-slot="flex"][data-gap="initial:xs"],
|
|
49
|
+
[data-slot="inline"][data-gap="initial:xs"] {
|
|
50
|
+
gap: var(--ak-space-xs);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-slot="flex"][data-gap="initial:sm"],
|
|
54
|
+
[data-slot="inline"][data-gap="initial:sm"] {
|
|
55
|
+
gap: var(--ak-space-sm);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
[data-slot="flex"][data-gap="initial:md"],
|
|
59
|
+
[data-slot="inline"][data-gap="initial:md"] {
|
|
60
|
+
gap: var(--ak-space-md);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot="flex"][data-gap="initial:lg"],
|
|
64
|
+
[data-slot="inline"][data-gap="initial:lg"] {
|
|
65
|
+
gap: var(--ak-space-lg);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-slot="flex"][data-gap="initial:xl"],
|
|
69
|
+
[data-slot="inline"][data-gap="initial:xl"] {
|
|
70
|
+
gap: var(--ak-space-xl);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
[data-slot="flex"][data-gap-x="initial:sm"],
|
|
74
|
+
[data-slot="inline"][data-gap-x="initial:sm"] {
|
|
75
|
+
column-gap: var(--ak-space-sm);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-slot="flex"][data-gap-x="initial:md"],
|
|
79
|
+
[data-slot="inline"][data-gap-x="initial:md"] {
|
|
80
|
+
column-gap: var(--ak-space-md);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-slot="flex"][data-gap-x="initial:lg"],
|
|
84
|
+
[data-slot="inline"][data-gap-x="initial:lg"] {
|
|
85
|
+
column-gap: var(--ak-space-lg);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-slot="flex"][data-gap-y="initial:sm"],
|
|
89
|
+
[data-slot="inline"][data-gap-y="initial:sm"] {
|
|
90
|
+
row-gap: var(--ak-space-sm);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-slot="flex"][data-gap-y="initial:md"],
|
|
94
|
+
[data-slot="inline"][data-gap-y="initial:md"] {
|
|
95
|
+
row-gap: var(--ak-space-md);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-slot="flex"][data-gap-y="initial:lg"],
|
|
99
|
+
[data-slot="inline"][data-gap-y="initial:lg"] {
|
|
100
|
+
row-gap: var(--ak-space-lg);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-slot="flex"][data-wrap="initial:nowrap"],
|
|
104
|
+
[data-slot="inline"][data-wrap="initial:nowrap"] {
|
|
105
|
+
flex-wrap: nowrap;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-slot="flex"][data-wrap="initial:wrap-reverse"],
|
|
109
|
+
[data-slot="inline"][data-wrap="initial:wrap-reverse"] {
|
|
110
|
+
flex-wrap: wrap-reverse;
|
|
111
|
+
}
|
|
112
|
+
|
|
22
113
|
[data-slot="section"] {
|
|
23
114
|
display: block;
|
|
24
115
|
}
|
|
@@ -191,7 +282,6 @@
|
|
|
191
282
|
[data-dialog-overlay],
|
|
192
283
|
[data-dismissable-layer],
|
|
193
284
|
[data-dropdown-label],
|
|
194
|
-
[data-fluid],
|
|
195
285
|
[data-focus-ring],
|
|
196
286
|
[data-focus-scope],
|
|
197
287
|
[data-gap],
|
|
@@ -36,7 +36,9 @@
|
|
|
36
36
|
:where([data-slot="shell"][data-variant="sidebar"], [data-slot="shell"][data-variant="rail"])
|
|
37
37
|
> :where([data-slot="shell-nav"]) {
|
|
38
38
|
display: grid;
|
|
39
|
-
align-content:
|
|
39
|
+
align-content: stretch;
|
|
40
|
+
flex: 0 0 100vh;
|
|
41
|
+
min-block-size: 100vh;
|
|
40
42
|
padding: var(--ak-layout-page-gutter);
|
|
41
43
|
inline-size: 100%;
|
|
42
44
|
max-inline-size: 100%;
|