@ndla/primitives 1.0.14-alpha.0 → 1.0.16-alpha.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/dist/panda.buildinfo.json +16 -1
- package/dist/styles.css +62 -0
- package/es/Hero.js +1 -2
- package/es/Layout/PageContent.js +104 -0
- package/es/index.js +1 -0
- package/lib/Combobox.d.ts +1 -1
- package/lib/Dialog.d.ts +2 -2
- package/lib/Hero.d.ts +1 -1
- package/lib/Hero.js +1 -2
- package/lib/Layout/PageContent.d.ts +55 -0
- package/lib/Layout/PageContent.js +110 -0
- package/lib/Tabs.d.ts +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +13 -0
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "0.
|
|
2
|
+
"schemaVersion": "0.45.2",
|
|
3
3
|
"styles": {
|
|
4
4
|
"atomic": [
|
|
5
5
|
"display]___[value:flex",
|
|
@@ -617,6 +617,21 @@
|
|
|
617
617
|
"--arrow-size]___[value:spacing.xxsmall",
|
|
618
618
|
"--arrow-background]___[value:colors.surface.action",
|
|
619
619
|
"height]___[value:200px",
|
|
620
|
+
"transitionDuration]___[value:default",
|
|
621
|
+
"gridColumnGap]___[value:var(--gutter, 0)",
|
|
622
|
+
"gridTemplateColumns]___[value:1fr min(var(--size), calc(100% - (var(--gutter, 0) * 2))) 1fr",
|
|
623
|
+
"gridColumnStart]___[value:2]___[cond:& > *",
|
|
624
|
+
"gridColumnEnd]___[value:2]___[cond:& > *",
|
|
625
|
+
"--size]___[value:sizes.surface.contentMax",
|
|
626
|
+
"--size]___[value:sizes.surface.articleMax",
|
|
627
|
+
"--size]___[value:sizes.surface.pageMax",
|
|
628
|
+
"--gutter]___[value:0px",
|
|
629
|
+
"--gutter]___[value:spacing.medium]___[cond:mobileWide",
|
|
630
|
+
"--gutter]___[value:spacing.medium]___[cond:tablet",
|
|
631
|
+
"--gutter]___[value:spacing.small",
|
|
632
|
+
"width]___[value:100%]___[cond:& ",
|
|
633
|
+
"gridColumnStart]___[value:1]___[cond:& ",
|
|
634
|
+
"gridColumnEnd]___[value:-1]___[cond:& ",
|
|
620
635
|
"minHeight]___[value:3xlarge",
|
|
621
636
|
"borderBlockWidth]___[value:1px",
|
|
622
637
|
"borderInlineColor]___[value:transparent",
|
package/dist/styles.css
CHANGED
|
@@ -913,6 +913,26 @@
|
|
|
913
913
|
height: 200px;
|
|
914
914
|
}
|
|
915
915
|
|
|
916
|
+
.\--size_sizes\.surface\.contentMax {
|
|
917
|
+
--size: var(--sizes-surface-content-max);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.\--size_sizes\.surface\.articleMax {
|
|
921
|
+
--size: var(--sizes-surface-article-max);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
.\--size_sizes\.surface\.pageMax {
|
|
925
|
+
--size: var(--sizes-surface-page-max);
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
.\--gutter_0px {
|
|
929
|
+
--gutter: 0px;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.\--gutter_spacing\.small {
|
|
933
|
+
--gutter: var(--spacing-small);
|
|
934
|
+
}
|
|
935
|
+
|
|
916
936
|
.min-h_3xlarge {
|
|
917
937
|
min-height: var(--sizes-3xlarge);
|
|
918
938
|
}
|
|
@@ -1309,6 +1329,19 @@
|
|
|
1309
1329
|
right: var(--spacing-xxsmall);
|
|
1310
1330
|
}
|
|
1311
1331
|
|
|
1332
|
+
.trs-dur_default {
|
|
1333
|
+
--transition-duration: default;
|
|
1334
|
+
transition-duration: default;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.grid-cg_var\(--gutter\,_0\) {
|
|
1338
|
+
grid-column-gap: var(--gutter, 0);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
.grid-tc_1fr_min\(var\(--size\)\,_calc\(100\%_-_\(var\(--gutter\,_0\)_\*_2\)\)\)_1fr {
|
|
1342
|
+
grid-template-columns: 1fr min(var(--size), calc(100% - (var(--gutter, 0) * 2))) 1fr;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1312
1345
|
.trs-prop_background-color\,_border-color\,_color {
|
|
1313
1346
|
--transition-prop: background-color, border-color, color;
|
|
1314
1347
|
transition-property: background-color, border-color, color;
|
|
@@ -1742,6 +1775,10 @@
|
|
|
1742
1775
|
display: inline-block;
|
|
1743
1776
|
}
|
|
1744
1777
|
|
|
1778
|
+
.\[\&\]\:w_100\% {
|
|
1779
|
+
width: 100%;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1745
1782
|
.highlighted\:bg_var\(--background-hover\)[data-highlighted] {
|
|
1746
1783
|
background: var(--background-hover);
|
|
1747
1784
|
}
|
|
@@ -1910,6 +1947,22 @@
|
|
|
1910
1947
|
outline-color: var(--colors-stroke-hover);
|
|
1911
1948
|
}
|
|
1912
1949
|
|
|
1950
|
+
.\[\&_\>_\*\]\:grid-cs_2 > * {
|
|
1951
|
+
grid-column-start: 2;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
.\[\&_\>_\*\]\:grid-ce_2 > * {
|
|
1955
|
+
grid-column-end: 2;
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
.\[\&\]\:grid-cs_1 {
|
|
1959
|
+
grid-column-start: 1;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
.\[\&\]\:grid-ce_-1 {
|
|
1963
|
+
grid-column-end: -1;
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1913
1966
|
.\[\&\[aria-current\=\"true\"\]\,_\&\[aria-current\=\"page\"\]\]\:bd-bs-c_transparent[aria-current="true"],.\[\&\[aria-current\=\"true\"\]\,_\&\[aria-current\=\"page\"\]\]\:bd-bs-c_transparent[aria-current="page"] {
|
|
1914
1967
|
border-block-start-color: transparent;
|
|
1915
1968
|
}
|
|
@@ -2630,6 +2683,12 @@
|
|
|
2630
2683
|
content: counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '.' counter(level4, decimal) '. ';
|
|
2631
2684
|
}
|
|
2632
2685
|
|
|
2686
|
+
@media screen and (min-width: 29.75rem) {
|
|
2687
|
+
.mobileWide\:--gutter_spacing\.medium {
|
|
2688
|
+
--gutter: var(--spacing-medium);
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2633
2692
|
@media screen and (min-width: 37.5625rem) {
|
|
2634
2693
|
.tablet\:bdr_small {
|
|
2635
2694
|
border-radius: var(--radii-small);
|
|
@@ -2660,6 +2719,9 @@
|
|
|
2660
2719
|
}
|
|
2661
2720
|
.tablet\:pbs_xxlarge {
|
|
2662
2721
|
padding-block-start: var(--spacing-xxlarge);
|
|
2722
|
+
}
|
|
2723
|
+
.tablet\:--gutter_spacing\.medium {
|
|
2724
|
+
--gutter: var(--spacing-medium);
|
|
2663
2725
|
}
|
|
2664
2726
|
}
|
|
2665
2727
|
|
package/es/Hero.js
CHANGED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { ark } from "@ark-ui/react";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
12
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
// TODO: Rename this component
|
|
15
|
+
|
|
16
|
+
const pageRecipe = cva({
|
|
17
|
+
base: {
|
|
18
|
+
display: "grid",
|
|
19
|
+
transitionProperty: "all",
|
|
20
|
+
transitionDuration: "default",
|
|
21
|
+
transitionTimingFunction: "default",
|
|
22
|
+
/**
|
|
23
|
+
* var(--size) is the max width of the content
|
|
24
|
+
* calc(100% - (var(--gutter, 0) * 2)) is the max width of the page, minus the gutters (inline padding without being actual padding).
|
|
25
|
+
* In effect, this will center the content on the page, and constrain it to either the content width or the page width, whichever is smaller.
|
|
26
|
+
*/
|
|
27
|
+
gridColumnGap: "var(--gutter, 0)",
|
|
28
|
+
gridTemplateColumns: "1fr min(var(--size), calc(100% - (var(--gutter, 0) * 2))) 1fr",
|
|
29
|
+
"& > *": {
|
|
30
|
+
gridColumnStart: "2",
|
|
31
|
+
gridColumnEnd: "2"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
variant: "page",
|
|
36
|
+
gutters: "always"
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
content: {
|
|
41
|
+
"--size": "sizes.surface.contentMax"
|
|
42
|
+
},
|
|
43
|
+
article: {
|
|
44
|
+
"--size": "sizes.surface.articleMax"
|
|
45
|
+
},
|
|
46
|
+
page: {
|
|
47
|
+
"--size": "sizes.surface.pageMax"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
gutters: {
|
|
51
|
+
never: {
|
|
52
|
+
"--gutter": "0px"
|
|
53
|
+
},
|
|
54
|
+
mobileUp: {
|
|
55
|
+
"--gutter": "0px",
|
|
56
|
+
mobileWide: {
|
|
57
|
+
"--gutter": "spacing.medium"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
tabletUp: {
|
|
61
|
+
"--gutter": "0px",
|
|
62
|
+
tablet: {
|
|
63
|
+
"--gutter": "spacing.medium"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
always: {
|
|
67
|
+
"--gutter": "spacing.small",
|
|
68
|
+
tablet: {
|
|
69
|
+
"--gutter": "spacing.medium"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
const StyledPageContent = styled(ark.div, {}, {
|
|
76
|
+
baseComponent: true
|
|
77
|
+
});
|
|
78
|
+
export const PageContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
79
|
+
let {
|
|
80
|
+
variant,
|
|
81
|
+
gutters,
|
|
82
|
+
css: cssProp,
|
|
83
|
+
...props
|
|
84
|
+
} = _ref;
|
|
85
|
+
return /*#__PURE__*/_jsx(StyledPageContent, {
|
|
86
|
+
css: css.raw(pageRecipe.raw({
|
|
87
|
+
variant,
|
|
88
|
+
gutters
|
|
89
|
+
}), cssProp),
|
|
90
|
+
ref: ref,
|
|
91
|
+
...props
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
export const BleedPageContent = styled(ark.div, {
|
|
95
|
+
base: {
|
|
96
|
+
"& ": {
|
|
97
|
+
width: "100%",
|
|
98
|
+
gridColumnStart: "1",
|
|
99
|
+
gridColumnEnd: "-1"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
baseComponent: true
|
|
104
|
+
});
|
package/es/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { Picture, Img, Image, makeSrcQueryString, getSrcSet } from "./Image";
|
|
|
26
26
|
export { Input, FieldInput, InputContainer, TextArea, FieldTextArea } from "./Input";
|
|
27
27
|
export { Label, FieldLabel, Legend, FieldsetLegend } from "./Label";
|
|
28
28
|
export { ListItemRoot, ListItemHeading, ListItemContent, ListItemImage } from "./ListItem/ListItem";
|
|
29
|
+
export { PageContent, BleedPageContent } from "./Layout/PageContent";
|
|
29
30
|
export { MenuRoot, MenuContent, MenuItemGroupLabel, MenuItemGroup, MenuItem, MenuPositioner, MenuTriggerItem, MenuTrigger, MenuSeparator, MenuItemText } from "./Menu";
|
|
30
31
|
export { MessageBox } from "./MessageBox";
|
|
31
32
|
export { NdlaLogoEn, NdlaLogoNb, NdlaLogoText } from "./NdlaLogo";
|
package/lib/Combobox.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { Combobox } from "@ark-ui/react";
|
|
9
9
|
import { JsxStyleProps, RecipeVariantProps } from "@ndla/styled-system/types";
|
|
10
10
|
import { TextProps } from "./Text";
|
|
11
|
-
declare const comboboxRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"input" | "label" | "
|
|
11
|
+
declare const comboboxRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"input" | "label" | "content" | "list" | "root" | "item" | "itemIndicator" | "control" | "clearTrigger" | "itemGroup" | "itemGroupLabel" | "itemText" | "positioner" | "trigger", {
|
|
12
12
|
variant: {
|
|
13
13
|
simple: {
|
|
14
14
|
item: {
|
package/lib/Dialog.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { Dialog } from "@ark-ui/react";
|
|
|
9
9
|
import { RecipeVariantProps } from "@ndla/styled-system/css";
|
|
10
10
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
11
11
|
import { TextProps } from "./Text";
|
|
12
|
-
declare const dialogRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"title" | "
|
|
12
|
+
declare const dialogRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"title" | "content" | "description" | "positioner" | "trigger" | "backdrop" | "closeTrigger", {
|
|
13
13
|
variant: {
|
|
14
14
|
drawer: {
|
|
15
15
|
content: {
|
|
@@ -96,7 +96,7 @@ export type DialogVariantProps = RecipeVariantProps<typeof dialogRecipe>;
|
|
|
96
96
|
export type DialogRootProps = Dialog.RootProps & DialogVariantProps;
|
|
97
97
|
export declare const InternalDialogRoot: (props: Dialog.RootProps & {
|
|
98
98
|
variant?: "dialog" | "drawer" | undefined;
|
|
99
|
-
position?: "center" | "
|
|
99
|
+
position?: "center" | "bottom" | "left" | "right" | "top" | undefined;
|
|
100
100
|
size?: "small" | "xsmall" | "medium" | "large" | "full" | undefined;
|
|
101
101
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
102
102
|
export declare const DialogRoot: ({ lazyMount, unmountOnExit, ...props }: DialogRootProps) => import("react/jsx-runtime").JSX.Element;
|
package/lib/Hero.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { type HTMLArkProps } from "@ark-ui/react";
|
|
9
9
|
import { type RecipeVariantProps } from "@ndla/styled-system/css";
|
|
10
10
|
import { type JsxStyleProps } from "@ndla/styled-system/types";
|
|
11
|
-
declare const heroRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"
|
|
11
|
+
declare const heroRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"background" | "content" | "root", {
|
|
12
12
|
absolute: {
|
|
13
13
|
true: {
|
|
14
14
|
background: {
|
package/lib/Hero.js
CHANGED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
import { RecipeVariantProps } from "@ndla/styled-system/types";
|
|
9
|
+
declare const pageRecipe: import("@ndla/styled-system/types").RecipeRuntimeFn<{
|
|
10
|
+
variant: {
|
|
11
|
+
content: {
|
|
12
|
+
"--size": "sizes.surface.contentMax";
|
|
13
|
+
};
|
|
14
|
+
article: {
|
|
15
|
+
"--size": "sizes.surface.articleMax";
|
|
16
|
+
};
|
|
17
|
+
page: {
|
|
18
|
+
"--size": "sizes.surface.pageMax";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
gutters: {
|
|
22
|
+
never: {
|
|
23
|
+
"--gutter": "0px";
|
|
24
|
+
};
|
|
25
|
+
mobileUp: {
|
|
26
|
+
"--gutter": "0px";
|
|
27
|
+
mobileWide: {
|
|
28
|
+
"--gutter": "spacing.medium";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
tabletUp: {
|
|
32
|
+
"--gutter": "0px";
|
|
33
|
+
tablet: {
|
|
34
|
+
"--gutter": "spacing.medium";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
always: {
|
|
38
|
+
"--gutter": "spacing.small";
|
|
39
|
+
tablet: {
|
|
40
|
+
"--gutter": "spacing.medium";
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}>;
|
|
45
|
+
export type PageContentVariantProps = RecipeVariantProps<typeof pageRecipe>;
|
|
46
|
+
export declare const PageContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
47
|
+
variant?: "article" | "page" | "content" | undefined;
|
|
48
|
+
gutters?: "always" | "never" | "mobileUp" | "tabletUp" | undefined;
|
|
49
|
+
} & {
|
|
50
|
+
consumeCss?: boolean | undefined;
|
|
51
|
+
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
export declare const BleedPageContent: import("@ndla/styled-system/types").StyledComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
53
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
54
|
+
} & import("@ark-ui/react").PolymorphicProps>, {}>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PageContent = exports.BleedPageContent = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@ark-ui/react");
|
|
9
|
+
var _css = require("@ndla/styled-system/css");
|
|
10
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
/**
|
|
13
|
+
* Copyright (c) 2024-present, NDLA.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
// TODO: Rename this component
|
|
21
|
+
|
|
22
|
+
const pageRecipe = (0, _css.cva)({
|
|
23
|
+
base: {
|
|
24
|
+
display: "grid",
|
|
25
|
+
transitionProperty: "all",
|
|
26
|
+
transitionDuration: "default",
|
|
27
|
+
transitionTimingFunction: "default",
|
|
28
|
+
/**
|
|
29
|
+
* var(--size) is the max width of the content
|
|
30
|
+
* calc(100% - (var(--gutter, 0) * 2)) is the max width of the page, minus the gutters (inline padding without being actual padding).
|
|
31
|
+
* In effect, this will center the content on the page, and constrain it to either the content width or the page width, whichever is smaller.
|
|
32
|
+
*/
|
|
33
|
+
gridColumnGap: "var(--gutter, 0)",
|
|
34
|
+
gridTemplateColumns: "1fr min(var(--size), calc(100% - (var(--gutter, 0) * 2))) 1fr",
|
|
35
|
+
"& > *": {
|
|
36
|
+
gridColumnStart: "2",
|
|
37
|
+
gridColumnEnd: "2"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "page",
|
|
42
|
+
gutters: "always"
|
|
43
|
+
},
|
|
44
|
+
variants: {
|
|
45
|
+
variant: {
|
|
46
|
+
content: {
|
|
47
|
+
"--size": "sizes.surface.contentMax"
|
|
48
|
+
},
|
|
49
|
+
article: {
|
|
50
|
+
"--size": "sizes.surface.articleMax"
|
|
51
|
+
},
|
|
52
|
+
page: {
|
|
53
|
+
"--size": "sizes.surface.pageMax"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
gutters: {
|
|
57
|
+
never: {
|
|
58
|
+
"--gutter": "0px"
|
|
59
|
+
},
|
|
60
|
+
mobileUp: {
|
|
61
|
+
"--gutter": "0px",
|
|
62
|
+
mobileWide: {
|
|
63
|
+
"--gutter": "spacing.medium"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
tabletUp: {
|
|
67
|
+
"--gutter": "0px",
|
|
68
|
+
tablet: {
|
|
69
|
+
"--gutter": "spacing.medium"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
always: {
|
|
73
|
+
"--gutter": "spacing.small",
|
|
74
|
+
tablet: {
|
|
75
|
+
"--gutter": "spacing.medium"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const StyledPageContent = (0, _jsx2.styled)(_react2.ark.div, {}, {
|
|
82
|
+
baseComponent: true
|
|
83
|
+
});
|
|
84
|
+
const PageContent = exports.PageContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
85
|
+
let {
|
|
86
|
+
variant,
|
|
87
|
+
gutters,
|
|
88
|
+
css: cssProp,
|
|
89
|
+
...props
|
|
90
|
+
} = _ref;
|
|
91
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledPageContent, {
|
|
92
|
+
css: _css.css.raw(pageRecipe.raw({
|
|
93
|
+
variant,
|
|
94
|
+
gutters
|
|
95
|
+
}), cssProp),
|
|
96
|
+
ref: ref,
|
|
97
|
+
...props
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
const BleedPageContent = exports.BleedPageContent = (0, _jsx2.styled)(_react2.ark.div, {
|
|
101
|
+
base: {
|
|
102
|
+
"& ": {
|
|
103
|
+
width: "100%",
|
|
104
|
+
gridColumnStart: "1",
|
|
105
|
+
gridColumnEnd: "-1"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
baseComponent: true
|
|
110
|
+
});
|
package/lib/Tabs.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { Tabs } from "@ark-ui/react";
|
|
9
9
|
import { RecipeVariantProps } from "@ndla/styled-system/css";
|
|
10
10
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
11
|
-
declare const tabsRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"
|
|
11
|
+
declare const tabsRecipe: import("@ndla/styled-system/types").SlotRecipeRuntimeFn<"content" | "list" | "root" | "indicator" | "trigger", {
|
|
12
12
|
variant: {
|
|
13
13
|
line: {
|
|
14
14
|
trigger: {
|
package/lib/index.d.ts
CHANGED
|
@@ -40,6 +40,8 @@ export type { LabelProps, LegendProps, FieldsetLegendProps } from "./Label";
|
|
|
40
40
|
export { Label, FieldLabel, Legend, FieldsetLegend } from "./Label";
|
|
41
41
|
export type { ListItemVariantProps, ListItemProps } from "./ListItem/ListItem";
|
|
42
42
|
export { ListItemRoot, ListItemHeading, ListItemContent, ListItemImage } from "./ListItem/ListItem";
|
|
43
|
+
export type { PageContentVariantProps } from "./Layout/PageContent";
|
|
44
|
+
export { PageContent, BleedPageContent } from "./Layout/PageContent";
|
|
43
45
|
export type { MenuRootProps, MenuItemVariantProps, MenuItemProps } from "./Menu";
|
|
44
46
|
export { MenuRoot, MenuContent, MenuItemGroupLabel, MenuItemGroup, MenuItem, MenuPositioner, MenuTriggerItem, MenuTrigger, MenuSeparator, MenuItemText, } from "./Menu";
|
|
45
47
|
export type { MessageBoxVariantProps, MessageBoxProps } from "./MessageBox";
|
package/lib/index.js
CHANGED
|
@@ -39,6 +39,12 @@ Object.defineProperty(exports, "Badge", {
|
|
|
39
39
|
return _Badge.Badge;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
+
Object.defineProperty(exports, "BleedPageContent", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _PageContent.BleedPageContent;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
42
48
|
Object.defineProperty(exports, "BlockQuote", {
|
|
43
49
|
enumerable: true,
|
|
44
50
|
get: function () {
|
|
@@ -531,6 +537,12 @@ Object.defineProperty(exports, "OrderedList", {
|
|
|
531
537
|
return _ArticleLists.OrderedList;
|
|
532
538
|
}
|
|
533
539
|
});
|
|
540
|
+
Object.defineProperty(exports, "PageContent", {
|
|
541
|
+
enumerable: true,
|
|
542
|
+
get: function () {
|
|
543
|
+
return _PageContent.PageContent;
|
|
544
|
+
}
|
|
545
|
+
});
|
|
534
546
|
Object.defineProperty(exports, "PaginationContext", {
|
|
535
547
|
enumerable: true,
|
|
536
548
|
get: function () {
|
|
@@ -1181,6 +1193,7 @@ var _Image = require("./Image");
|
|
|
1181
1193
|
var _Input = require("./Input");
|
|
1182
1194
|
var _Label = require("./Label");
|
|
1183
1195
|
var _ListItem = require("./ListItem/ListItem");
|
|
1196
|
+
var _PageContent = require("./Layout/PageContent");
|
|
1184
1197
|
var _Menu = require("./Menu");
|
|
1185
1198
|
var _MessageBox = require("./MessageBox");
|
|
1186
1199
|
var _NdlaLogo = require("./NdlaLogo");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/primitives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16-alpha.0",
|
|
4
4
|
"description": "Primitive components for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@ark-ui/react": "^3.9.0",
|
|
32
|
-
"@ndla/styled-system": "^0.0.
|
|
32
|
+
"@ndla/styled-system": "^0.0.14",
|
|
33
33
|
"@ndla/util": "^4.1.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@ndla/preset-panda": "^0.0.
|
|
37
|
-
"@pandacss/dev": "^0.
|
|
36
|
+
"@ndla/preset-panda": "^0.0.22",
|
|
37
|
+
"@pandacss/dev": "^0.45.2"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">= 18",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "a8a6f11eab7a7a254fff6fb062289dc413035d81"
|
|
47
47
|
}
|