@ndla/primitives 0.0.12 → 0.0.13
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 +5 -15
- package/dist/styles.css +18 -58
- package/es/ArticleLists.js +22 -1
- package/es/Badge.js +20 -2
- package/es/BlockQuote.js +20 -2
- package/es/Button.js +2 -0
- package/es/Checkbox.js +0 -1
- package/es/Combobox.js +8 -4
- package/es/Dialog.js +6 -4
- package/es/ExpandableBox.js +2 -0
- package/es/Field.js +2 -0
- package/es/FieldErrorMessage.js +2 -0
- package/es/FieldHelper.js +3 -1
- package/es/Figure.js +24 -1
- package/es/FramedContent.js +24 -10
- package/es/Input.js +8 -2
- package/es/Label.js +10 -2
- package/es/Menu.js +1 -2
- package/es/MessageBox.js +20 -2
- package/es/RadioGroup.js +1 -2
- package/es/Select.js +1 -2
- package/es/Skeleton.js +2 -0
- package/es/Slider.js +0 -1
- package/es/Spinner.js +20 -2
- package/es/Switch.js +2 -2
- package/es/Table.js +2 -0
- package/es/TagsInput.js +0 -1
- package/es/Text.js +6 -2
- package/es/Toast.js +2 -2
- package/es/createStyleContext.js +10 -3
- package/lib/Accordion.d.ts +4 -4
- package/lib/ArticleLists.d.ts +40 -4
- package/lib/ArticleLists.js +25 -4
- package/lib/Badge.d.ts +4 -4
- package/lib/Badge.js +21 -3
- package/lib/BlockQuote.d.ts +4 -4
- package/lib/BlockQuote.js +21 -3
- package/lib/Button.d.ts +2 -2
- package/lib/Button.js +2 -0
- package/lib/Checkbox.d.ts +4 -4
- package/lib/Checkbox.js +0 -1
- package/lib/Combobox.d.ts +2 -2
- package/lib/Combobox.js +8 -4
- package/lib/Dialog.d.ts +7 -7
- package/lib/Dialog.js +6 -4
- package/lib/ExpandableBox.js +2 -0
- package/lib/Field.js +2 -0
- package/lib/FieldErrorMessage.d.ts +1 -1
- package/lib/FieldErrorMessage.js +2 -0
- package/lib/FieldHelper.d.ts +1 -1
- package/lib/FieldHelper.js +3 -1
- package/lib/Figure.d.ts +57 -2
- package/lib/Figure.js +25 -2
- package/lib/FramedContent.d.ts +4 -7
- package/lib/FramedContent.js +25 -11
- package/lib/Input.d.ts +1 -1
- package/lib/Input.js +8 -2
- package/lib/Label.d.ts +3 -3
- package/lib/Label.js +10 -2
- package/lib/Menu.d.ts +7 -7
- package/lib/Menu.js +1 -2
- package/lib/MessageBox.d.ts +4 -4
- package/lib/MessageBox.js +21 -3
- package/lib/Pagination.d.ts +5 -5
- package/lib/Popover.d.ts +10 -10
- package/lib/RadioGroup.d.ts +5 -5
- package/lib/RadioGroup.js +1 -2
- package/lib/Select.d.ts +13 -13
- package/lib/Select.js +1 -2
- package/lib/Skeleton.js +2 -0
- package/lib/Slider.d.ts +5 -5
- package/lib/Slider.js +0 -1
- package/lib/Spinner.d.ts +5 -5
- package/lib/Spinner.js +21 -3
- package/lib/Switch.d.ts +3 -3
- package/lib/Switch.js +2 -2
- package/lib/Table.js +2 -0
- package/lib/Tabs.d.ts +4 -4
- package/lib/TagsInput.d.ts +10 -10
- package/lib/TagsInput.js +0 -1
- package/lib/Text.d.ts +2 -2
- package/lib/Text.js +6 -2
- package/lib/Toast.d.ts +2 -2
- package/lib/Toast.js +2 -2
- package/lib/Tooltip.d.ts +6 -6
- package/lib/createStyleContext.d.ts +6 -6
- package/lib/createStyleContext.js +9 -2
- package/package.json +5 -5
- package/es/Icon.js +0 -74
- package/lib/Icon.d.ts +0 -38
- package/lib/Icon.js +0 -81
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { TextProps } from "./Text";
|
|
9
9
|
export declare const FieldErrorMessage: import("react").ForwardRefExoticComponent<TextProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
10
|
-
|
|
10
|
+
consumeCss?: boolean | undefined;
|
|
11
11
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
package/lib/FieldErrorMessage.js
CHANGED
|
@@ -23,6 +23,8 @@ const StyledErrorText = (0, _jsx2.styled)(_react2.Field.ErrorText, {
|
|
|
23
23
|
whiteSpace: "pre-line",
|
|
24
24
|
justifyContent: "center"
|
|
25
25
|
}
|
|
26
|
+
}, {
|
|
27
|
+
baseComponent: true
|
|
26
28
|
});
|
|
27
29
|
const FieldErrorMessage = exports.FieldErrorMessage = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
28
30
|
let {
|
package/lib/FieldHelper.d.ts
CHANGED
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { TextProps } from "./Text";
|
|
9
9
|
export declare const FieldHelper: import("react").ForwardRefExoticComponent<TextProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
10
|
-
|
|
10
|
+
consumeCss?: boolean | undefined;
|
|
11
11
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
package/lib/FieldHelper.js
CHANGED
|
@@ -17,7 +17,9 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
17
17
|
*
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const StyledFieldHelper = (0, _jsx2.styled)(_react2.Field.HelperText
|
|
20
|
+
const StyledFieldHelper = (0, _jsx2.styled)(_react2.Field.HelperText, {}, {
|
|
21
|
+
baseComponent: true
|
|
22
|
+
});
|
|
21
23
|
const FieldHelper = exports.FieldHelper = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
22
24
|
let {
|
|
23
25
|
textStyle = "label.small",
|
package/lib/Figure.d.ts
CHANGED
|
@@ -5,7 +5,62 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
import { HTMLArkProps } from "@ark-ui/react";
|
|
9
|
+
import { RecipeVariantProps } from "@ndla/styled-system/css";
|
|
10
|
+
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
11
|
+
declare const figureRecipe: import("@ndla/styled-system/types").RecipeRuntimeFn<{
|
|
12
|
+
size: {
|
|
13
|
+
full: {
|
|
14
|
+
width: "100%";
|
|
15
|
+
};
|
|
16
|
+
medium: {
|
|
17
|
+
tablet: {
|
|
18
|
+
width: "50%";
|
|
19
|
+
};
|
|
20
|
+
desktop: {
|
|
21
|
+
width: "65%";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
small: {
|
|
25
|
+
tablet: {
|
|
26
|
+
width: "35%";
|
|
27
|
+
};
|
|
28
|
+
desktop: {
|
|
29
|
+
width: "50%";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
xsmall: {
|
|
33
|
+
tablet: {
|
|
34
|
+
width: "25%";
|
|
35
|
+
};
|
|
36
|
+
desktop: {
|
|
37
|
+
width: "35%";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
float: {
|
|
42
|
+
left: {
|
|
43
|
+
tablet: {
|
|
44
|
+
float: "left";
|
|
45
|
+
clear: "left";
|
|
46
|
+
paddingInlineEnd: "medium";
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
right: {
|
|
50
|
+
tablet: {
|
|
51
|
+
float: "right";
|
|
52
|
+
clear: "right";
|
|
53
|
+
paddingInlineStart: "medium";
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}>;
|
|
58
|
+
export type FigureVariantProps = RecipeVariantProps<typeof figureRecipe>;
|
|
59
|
+
export type FigureProps = HTMLArkProps<"figure"> & JsxStyleProps & FigureVariantProps;
|
|
60
|
+
export declare const Figure: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
61
|
+
consumeCss?: boolean | undefined;
|
|
62
|
+
} & import("@ndla/styled-system/types").WithCss & {
|
|
9
63
|
size?: "small" | "xsmall" | "medium" | "full" | undefined;
|
|
10
64
|
float?: "left" | "right" | undefined;
|
|
11
|
-
}
|
|
65
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
66
|
+
export {};
|
package/lib/Figure.js
CHANGED
|
@@ -4,7 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.Figure = void 0;
|
|
7
|
-
var
|
|
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");
|
|
8
12
|
/**
|
|
9
13
|
* Copyright (c) 2024-present, NDLA.
|
|
10
14
|
*
|
|
@@ -13,7 +17,7 @@ var _jsx = require("@ndla/styled-system/jsx");
|
|
|
13
17
|
*
|
|
14
18
|
*/
|
|
15
19
|
|
|
16
|
-
const
|
|
20
|
+
const figureRecipe = (0, _css.cva)({
|
|
17
21
|
base: {
|
|
18
22
|
position: "relative",
|
|
19
23
|
transitionDuration: "normal",
|
|
@@ -78,4 +82,23 @@ const Figure = exports.Figure = (0, _jsx.styled)("figure", {
|
|
|
78
82
|
marginBlock: "xsmall"
|
|
79
83
|
}
|
|
80
84
|
}]
|
|
85
|
+
});
|
|
86
|
+
const StyledFigure = (0, _jsx2.styled)(_react2.ark.figure, {}, {
|
|
87
|
+
baseComponent: true
|
|
88
|
+
});
|
|
89
|
+
const Figure = exports.Figure = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
90
|
+
let {
|
|
91
|
+
size,
|
|
92
|
+
float,
|
|
93
|
+
css: cssProp,
|
|
94
|
+
...props
|
|
95
|
+
} = _ref;
|
|
96
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledFigure, {
|
|
97
|
+
css: _css.css.raw(figureRecipe.raw({
|
|
98
|
+
size,
|
|
99
|
+
float
|
|
100
|
+
}), cssProp),
|
|
101
|
+
...props,
|
|
102
|
+
ref: ref
|
|
103
|
+
});
|
|
81
104
|
});
|
package/lib/FramedContent.d.ts
CHANGED
|
@@ -12,25 +12,22 @@ declare const framedContentRecipe: import("@ndla/styled-system/types").RecipeRun
|
|
|
12
12
|
neutral: {
|
|
13
13
|
backgroundColor: "surface.default";
|
|
14
14
|
borderColor: "stroke.subtle";
|
|
15
|
-
boxShadowColor: "stroke.subtle";
|
|
16
15
|
};
|
|
17
16
|
brand1: {
|
|
18
17
|
backgroundColor: "surface.brand.1.subtle";
|
|
19
18
|
borderColor: "surface.brand.1.strong";
|
|
20
|
-
boxShadowColor: "surface.brand.1.strong";
|
|
21
19
|
};
|
|
22
20
|
brand2: {
|
|
23
21
|
backgroundColor: "surface.brand.2.subtle";
|
|
24
22
|
borderColor: "surface.brand.2.strong";
|
|
25
|
-
boxShadowColor: "surface.brand.2.strong";
|
|
26
23
|
};
|
|
27
24
|
};
|
|
28
25
|
}>;
|
|
29
26
|
export type FramedContentVariantProps = RecipeVariantProps<typeof framedContentRecipe>;
|
|
30
27
|
export type FramedContentProps = HTMLArkProps<"div"> & JsxStyleProps & FramedContentVariantProps;
|
|
31
|
-
export declare const FramedContent: import("
|
|
32
|
-
|
|
33
|
-
} & import("@
|
|
28
|
+
export declare const FramedContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
29
|
+
consumeCss?: boolean | undefined;
|
|
30
|
+
} & import("@ndla/styled-system/types").WithCss & {
|
|
34
31
|
colorTheme?: "neutral" | "brand1" | "brand2" | undefined;
|
|
35
|
-
}
|
|
32
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
33
|
export {};
|
package/lib/FramedContent.js
CHANGED
|
@@ -4,9 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.FramedContent = void 0;
|
|
7
|
-
var _react = require("
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@ark-ui/react");
|
|
8
9
|
var _css = require("@ndla/styled-system/css");
|
|
9
|
-
var
|
|
10
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
12
|
/**
|
|
11
13
|
* Copyright (c) 2024-present, NDLA.
|
|
12
14
|
*
|
|
@@ -19,25 +21,21 @@ const framedContentRecipe = (0, _css.cva)({
|
|
|
19
21
|
base: {
|
|
20
22
|
padding: "medium",
|
|
21
23
|
border: "1px solid",
|
|
22
|
-
borderRadius: "small"
|
|
23
|
-
boxShadow: "4px 4px 0px 0px var(--shadow-color)"
|
|
24
|
+
borderRadius: "small"
|
|
24
25
|
},
|
|
25
26
|
variants: {
|
|
26
27
|
colorTheme: {
|
|
27
28
|
neutral: {
|
|
28
29
|
backgroundColor: "surface.default",
|
|
29
|
-
borderColor: "stroke.subtle"
|
|
30
|
-
boxShadowColor: "stroke.subtle"
|
|
30
|
+
borderColor: "stroke.subtle"
|
|
31
31
|
},
|
|
32
32
|
brand1: {
|
|
33
33
|
backgroundColor: "surface.brand.1.subtle",
|
|
34
|
-
borderColor: "surface.brand.1.strong"
|
|
35
|
-
boxShadowColor: "surface.brand.1.strong"
|
|
34
|
+
borderColor: "surface.brand.1.strong"
|
|
36
35
|
},
|
|
37
36
|
brand2: {
|
|
38
37
|
backgroundColor: "surface.brand.2.subtle",
|
|
39
|
-
borderColor: "surface.brand.2.strong"
|
|
40
|
-
boxShadowColor: "surface.brand.2.strong"
|
|
38
|
+
borderColor: "surface.brand.2.strong"
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
},
|
|
@@ -45,4 +43,20 @@ const framedContentRecipe = (0, _css.cva)({
|
|
|
45
43
|
colorTheme: "neutral"
|
|
46
44
|
}
|
|
47
45
|
});
|
|
48
|
-
const
|
|
46
|
+
const StyledFramedContent = (0, _jsx2.styled)(_react2.ark.div, {}, {
|
|
47
|
+
baseComponent: true
|
|
48
|
+
});
|
|
49
|
+
const FramedContent = exports.FramedContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
50
|
+
let {
|
|
51
|
+
colorTheme,
|
|
52
|
+
css: cssProp,
|
|
53
|
+
...props
|
|
54
|
+
} = _ref;
|
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledFramedContent, {
|
|
56
|
+
css: _css.css.raw(framedContentRecipe.raw({
|
|
57
|
+
colorTheme
|
|
58
|
+
}), cssProp),
|
|
59
|
+
...props,
|
|
60
|
+
ref: ref
|
|
61
|
+
});
|
|
62
|
+
});
|
package/lib/Input.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { HTMLArkProps } from "@ark-ui/react";
|
|
9
9
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
10
|
export declare const InputContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
11
|
-
|
|
11
|
+
consumeCss?: boolean | undefined;
|
|
12
12
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export interface InputProps extends HTMLArkProps<"input">, JsxStyleProps {
|
|
14
14
|
}
|
package/lib/Input.js
CHANGED
|
@@ -67,6 +67,8 @@ const StyledInputContainer = (0, _jsx2.styled)(_react2.ark.div, {
|
|
|
67
67
|
height: "medium"
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
}, {
|
|
71
|
+
baseComponent: true
|
|
70
72
|
});
|
|
71
73
|
const InputContainer = exports.InputContainer = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
72
74
|
let {
|
|
@@ -108,7 +110,9 @@ const baseTextAreaCss = _css.css.raw({
|
|
|
108
110
|
resize: "none",
|
|
109
111
|
overflowY: "hidden"
|
|
110
112
|
});
|
|
111
|
-
const StyledInput = (0, _jsx2.styled)(_react2.ark.input
|
|
113
|
+
const StyledInput = (0, _jsx2.styled)(_react2.ark.input, {}, {
|
|
114
|
+
baseComponent: true
|
|
115
|
+
});
|
|
112
116
|
const Input = exports.Input = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
|
|
113
117
|
let {
|
|
114
118
|
css: cssProp,
|
|
@@ -128,7 +132,9 @@ const FieldInput = exports.FieldInput = /*#__PURE__*/(0, _react.forwardRef)((pro
|
|
|
128
132
|
ref: ref
|
|
129
133
|
})
|
|
130
134
|
}));
|
|
131
|
-
const StyledTextArea = (0, _jsx2.styled)(_react2.ark.textarea
|
|
135
|
+
const StyledTextArea = (0, _jsx2.styled)(_react2.ark.textarea, {}, {
|
|
136
|
+
baseComponent: true
|
|
137
|
+
});
|
|
132
138
|
const TextArea = exports.TextArea = /*#__PURE__*/(0, _react.forwardRef)((_ref3, ref) => {
|
|
133
139
|
let {
|
|
134
140
|
css: cssProp,
|
package/lib/Label.d.ts
CHANGED
|
@@ -10,13 +10,13 @@ import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
|
10
10
|
import { TextProps } from "./Text";
|
|
11
11
|
export type LegendProps = HTMLArkProps<"legend"> & JsxStyleProps & TextProps;
|
|
12
12
|
export declare const Legend: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
13
|
-
|
|
13
|
+
consumeCss?: boolean | undefined;
|
|
14
14
|
} & import("@ndla/styled-system/types").WithCss & TextProps & import("react").RefAttributes<HTMLLegendElement>>;
|
|
15
15
|
export type LabelProps = HTMLArkProps<"label"> & TextProps & JsxStyleProps;
|
|
16
16
|
export declare const Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & TextProps & {
|
|
17
|
-
|
|
17
|
+
consumeCss?: boolean | undefined;
|
|
18
18
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLLabelElement>>;
|
|
19
19
|
export declare const FieldLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & TextProps & {
|
|
20
|
-
|
|
20
|
+
consumeCss?: boolean | undefined;
|
|
21
21
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLLabelElement>>;
|
|
22
22
|
export declare const Fieldset: import("@ndla/styled-system/jsx").StyledComponent<"fieldset", {}>;
|
package/lib/Label.js
CHANGED
|
@@ -25,6 +25,8 @@ const StyledLegend = (0, _jsx2.styled)(_react2.ark.legend, {
|
|
|
25
25
|
color: "text.subtle"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
}, {
|
|
29
|
+
baseComponent: true
|
|
28
30
|
});
|
|
29
31
|
// TODO: This is not exported for now. Let's wait and see when ark decides to release their legend and fieldset.
|
|
30
32
|
const Legend = exports.Legend = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
@@ -33,13 +35,15 @@ const Legend = exports.Legend = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref)
|
|
|
33
35
|
fontWeight = "bold",
|
|
34
36
|
css: cssProp,
|
|
35
37
|
srOnly,
|
|
38
|
+
color,
|
|
36
39
|
...rest
|
|
37
40
|
} = _ref;
|
|
38
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledLegend, {
|
|
39
42
|
css: _css.css.raw({
|
|
40
43
|
textStyle,
|
|
41
44
|
fontWeight,
|
|
42
|
-
srOnly
|
|
45
|
+
srOnly,
|
|
46
|
+
color
|
|
43
47
|
}, cssProp),
|
|
44
48
|
...rest,
|
|
45
49
|
ref: ref
|
|
@@ -52,6 +56,8 @@ const StyledLabel = (0, _jsx2.styled)(_react2.ark.label, {
|
|
|
52
56
|
color: "text.subtle"
|
|
53
57
|
}
|
|
54
58
|
}
|
|
59
|
+
}, {
|
|
60
|
+
baseComponent: true
|
|
55
61
|
});
|
|
56
62
|
const Label = exports.Label = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) => {
|
|
57
63
|
let {
|
|
@@ -59,13 +65,15 @@ const Label = exports.Label = /*#__PURE__*/(0, _react.forwardRef)((_ref2, ref) =
|
|
|
59
65
|
fontWeight = "bold",
|
|
60
66
|
css: cssProp,
|
|
61
67
|
srOnly,
|
|
68
|
+
color,
|
|
62
69
|
...rest
|
|
63
70
|
} = _ref2;
|
|
64
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledLabel, {
|
|
65
72
|
css: _css.css.raw({
|
|
66
73
|
textStyle,
|
|
67
74
|
fontWeight,
|
|
68
|
-
srOnly
|
|
75
|
+
srOnly,
|
|
76
|
+
color
|
|
69
77
|
}, cssProp),
|
|
70
78
|
...rest,
|
|
71
79
|
ref: ref
|
package/lib/Menu.d.ts
CHANGED
|
@@ -49,31 +49,31 @@ declare const itemCva: import("@ndla/styled-system/types").RecipeRuntimeFn<{
|
|
|
49
49
|
export type MenuRootProps = Menu.RootProps;
|
|
50
50
|
export declare const MenuRoot: ({ lazyMount, unmountOnExit, ...props }: MenuRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
51
51
|
export declare const MenuContent: import("react").ForwardRefExoticComponent<{
|
|
52
|
-
|
|
52
|
+
consumeCss?: boolean | undefined;
|
|
53
53
|
} & import("@ndla/styled-system/types").WithCss & Menu.ContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
54
54
|
export declare const MenuItemGroupLabel: ({ textStyle, fontWeight, children, ...props }: Menu.ItemGroupLabelProps & JsxStyleProps & TextProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
export declare const MenuItemGroup: import("react").ForwardRefExoticComponent<{
|
|
56
|
-
|
|
56
|
+
consumeCss?: boolean | undefined;
|
|
57
57
|
} & import("@ndla/styled-system/types").WithCss & Menu.ItemGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
58
58
|
export type MenuItemVariantProps = RecipeVariantProps<typeof itemCva>;
|
|
59
59
|
export type MenuItemProps = Menu.ItemProps & JsxStyleProps & MenuItemVariantProps;
|
|
60
60
|
export declare const MenuItem: import("react").ForwardRefExoticComponent<Menu.ItemProps & {
|
|
61
|
-
|
|
61
|
+
consumeCss?: boolean | undefined;
|
|
62
62
|
} & import("@ndla/styled-system/types").WithCss & {
|
|
63
63
|
variant?: "action" | "destructive" | undefined;
|
|
64
64
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
65
65
|
export declare const MenuPositioner: import("react").ForwardRefExoticComponent<{
|
|
66
|
-
|
|
66
|
+
consumeCss?: boolean | undefined;
|
|
67
67
|
} & import("@ndla/styled-system/types").WithCss & Menu.PositionerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
68
68
|
export declare const MenuTriggerItem: import("react").ForwardRefExoticComponent<Menu.TriggerItemProps & {
|
|
69
|
-
|
|
69
|
+
consumeCss?: boolean | undefined;
|
|
70
70
|
} & import("@ndla/styled-system/types").WithCss & {
|
|
71
71
|
variant?: "action" | "destructive" | undefined;
|
|
72
72
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
73
73
|
export declare const MenuTrigger: import("react").ForwardRefExoticComponent<{
|
|
74
|
-
|
|
74
|
+
consumeCss?: boolean | undefined;
|
|
75
75
|
} & import("@ndla/styled-system/types").WithCss & Menu.TriggerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
76
76
|
export declare const MenuSeparator: import("react").ForwardRefExoticComponent<{
|
|
77
|
-
|
|
77
|
+
consumeCss?: boolean | undefined;
|
|
78
78
|
} & import("@ndla/styled-system/types").WithCss & Menu.SeparatorProps & import("react").RefAttributes<HTMLHRElement>>;
|
|
79
79
|
export {};
|
package/lib/Menu.js
CHANGED
|
@@ -109,7 +109,7 @@ const menuRecipe = (0, _css.sva)({
|
|
|
109
109
|
padding: "3xsmall",
|
|
110
110
|
gap: "3xsmall",
|
|
111
111
|
background: "surface.default",
|
|
112
|
-
boxShadow: "
|
|
112
|
+
boxShadow: "small",
|
|
113
113
|
borderRadius: "xsmall",
|
|
114
114
|
outline: "none",
|
|
115
115
|
zIndex: "dropdown",
|
|
@@ -160,7 +160,6 @@ const MenuItemGroupLabel = _ref2 => {
|
|
|
160
160
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalMenuItemGroupLabel, {
|
|
161
161
|
...props,
|
|
162
162
|
asChild: true,
|
|
163
|
-
forwardCssProp: true,
|
|
164
163
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
165
164
|
textStyle: textStyle,
|
|
166
165
|
fontWeight: fontWeight,
|
package/lib/MessageBox.d.ts
CHANGED
|
@@ -29,9 +29,9 @@ declare const messageBoxRecipe: import("@ndla/styled-system/types").RecipeRuntim
|
|
|
29
29
|
}>;
|
|
30
30
|
export type MessageBoxVariantProps = RecipeVariantProps<typeof messageBoxRecipe>;
|
|
31
31
|
export type MessageBoxProps = HTMLArkProps<"div"> & JsxStyleProps & MessageBoxVariantProps;
|
|
32
|
-
export declare const MessageBox: import("
|
|
33
|
-
|
|
34
|
-
} & import("@
|
|
32
|
+
export declare const MessageBox: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react").PolymorphicProps & {
|
|
33
|
+
consumeCss?: boolean | undefined;
|
|
34
|
+
} & import("@ndla/styled-system/types").WithCss & {
|
|
35
35
|
variant?: "error" | "success" | "info" | "warning" | undefined;
|
|
36
|
-
}
|
|
36
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
37
37
|
export {};
|
package/lib/MessageBox.js
CHANGED
|
@@ -4,9 +4,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.MessageBox = void 0;
|
|
7
|
-
var _react = require("
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _react2 = require("@ark-ui/react");
|
|
8
9
|
var _css = require("@ndla/styled-system/css");
|
|
9
|
-
var
|
|
10
|
+
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
12
|
/**
|
|
11
13
|
* Copyright (c) 2024-present, NDLA.
|
|
12
14
|
*
|
|
@@ -48,4 +50,20 @@ const messageBoxRecipe = (0, _css.cva)({
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
|
-
const
|
|
53
|
+
const StyledMessageBox = (0, _jsx2.styled)(_react2.ark.div, {}, {
|
|
54
|
+
baseComponent: true
|
|
55
|
+
});
|
|
56
|
+
const MessageBox = exports.MessageBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
57
|
+
let {
|
|
58
|
+
variant,
|
|
59
|
+
css: cssProp,
|
|
60
|
+
...props
|
|
61
|
+
} = _ref;
|
|
62
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StyledMessageBox, {
|
|
63
|
+
css: _css.css.raw(messageBoxRecipe.raw({
|
|
64
|
+
variant
|
|
65
|
+
}), cssProp),
|
|
66
|
+
...props,
|
|
67
|
+
ref: ref
|
|
68
|
+
});
|
|
69
|
+
});
|
package/lib/Pagination.d.ts
CHANGED
|
@@ -9,17 +9,17 @@ import { Pagination } from "@ark-ui/react";
|
|
|
9
9
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
10
|
export type PaginationRootProps = JsxStyleProps & Pagination.RootProps;
|
|
11
11
|
export declare const PaginationRoot: import("react").ForwardRefExoticComponent<{
|
|
12
|
-
|
|
12
|
+
consumeCss?: boolean | undefined;
|
|
13
13
|
} & import("@ndla/styled-system/types").WithCss & Pagination.RootProps & import("react").RefAttributes<HTMLElement>>;
|
|
14
14
|
export declare const PaginationItem: import("react").ForwardRefExoticComponent<{
|
|
15
|
-
|
|
15
|
+
consumeCss?: boolean | undefined;
|
|
16
16
|
} & import("@ndla/styled-system/types").WithCss & Pagination.ItemProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
17
17
|
export declare const PaginationEllipsis: import("react").ForwardRefExoticComponent<{
|
|
18
|
-
|
|
18
|
+
consumeCss?: boolean | undefined;
|
|
19
19
|
} & import("@ndla/styled-system/types").WithCss & Pagination.EllipsisProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
20
|
export declare const PaginationPrevTrigger: import("react").ForwardRefExoticComponent<{
|
|
21
|
-
|
|
21
|
+
consumeCss?: boolean | undefined;
|
|
22
22
|
} & import("@ndla/styled-system/types").WithCss & Pagination.PrevTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
23
23
|
export declare const PaginationNextTrigger: import("react").ForwardRefExoticComponent<{
|
|
24
|
-
|
|
24
|
+
consumeCss?: boolean | undefined;
|
|
25
25
|
} & import("@ndla/styled-system/types").WithCss & Pagination.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
package/lib/Popover.d.ts
CHANGED
|
@@ -10,34 +10,34 @@ import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
|
10
10
|
export type PopoverRootProps = Popover.RootProps;
|
|
11
11
|
export declare const PopoverRoot: ({ lazyMount, unmountOnExit, ...props }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const PopoverAnchor: import("react").ForwardRefExoticComponent<Popover.AnchorProps & {
|
|
13
|
-
|
|
13
|
+
consumeCss?: boolean | undefined;
|
|
14
14
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
15
|
export declare const PopoverArrowStandalone: import("react").ForwardRefExoticComponent<Popover.ArrowProps & {
|
|
16
|
-
|
|
16
|
+
consumeCss?: boolean | undefined;
|
|
17
17
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
18
|
export declare const PopoverArrow: (props: Popover.ArrowTipProps & JsxStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
export declare const PopoverArrowTip: import("react").ForwardRefExoticComponent<Popover.ArrowTipProps & {
|
|
20
|
-
|
|
20
|
+
consumeCss?: boolean | undefined;
|
|
21
21
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export declare const PopoverCloseTrigger: import("react").ForwardRefExoticComponent<Popover.CloseTriggerProps & {
|
|
23
|
-
|
|
23
|
+
consumeCss?: boolean | undefined;
|
|
24
24
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLButtonElement>>;
|
|
25
25
|
export declare const PopoverContentStandalone: import("react").ForwardRefExoticComponent<Popover.ContentProps & {
|
|
26
|
-
|
|
26
|
+
consumeCss?: boolean | undefined;
|
|
27
27
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
28
|
export declare const PopoverContent: (props: Popover.ContentProps & JsxStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export declare const PopoverDescription: import("react").ForwardRefExoticComponent<Popover.DescriptionProps & {
|
|
30
|
-
|
|
30
|
+
consumeCss?: boolean | undefined;
|
|
31
31
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
32
|
export declare const PopoverIndicator: import("react").ForwardRefExoticComponent<Popover.IndicatorProps & {
|
|
33
|
-
|
|
33
|
+
consumeCss?: boolean | undefined;
|
|
34
34
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
35
|
export declare const PopoverPositioner: import("react").ForwardRefExoticComponent<Popover.PositionerProps & {
|
|
36
|
-
|
|
36
|
+
consumeCss?: boolean | undefined;
|
|
37
37
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
38
|
export declare const PopoverTitle: import("react").ForwardRefExoticComponent<Popover.TitleProps & {
|
|
39
|
-
|
|
39
|
+
consumeCss?: boolean | undefined;
|
|
40
40
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
41
|
export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<Popover.TriggerProps & {
|
|
42
|
-
|
|
42
|
+
consumeCss?: boolean | undefined;
|
|
43
43
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLButtonElement>>;
|
package/lib/RadioGroup.d.ts
CHANGED
|
@@ -12,19 +12,19 @@ export interface RadioGroupRootProps extends RadioGroup.RootProps, JsxStyleProps
|
|
|
12
12
|
}
|
|
13
13
|
export declare const RadioGroupRoot: import("react").ForwardRefExoticComponent<RadioGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
14
|
export declare const RadioGroupIndicator: import("react").ForwardRefExoticComponent<RadioGroup.IndicatorProps & {
|
|
15
|
-
|
|
15
|
+
consumeCss?: boolean | undefined;
|
|
16
16
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export declare const RadioGroupItemControl: import("react").ForwardRefExoticComponent<RadioGroup.ItemControlProps & {
|
|
18
|
-
|
|
18
|
+
consumeCss?: boolean | undefined;
|
|
19
19
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
20
|
export declare const RadioGroupItem: import("react").ForwardRefExoticComponent<RadioGroup.ItemProps & {
|
|
21
|
-
|
|
21
|
+
consumeCss?: boolean | undefined;
|
|
22
22
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLLabelElement>>;
|
|
23
23
|
export declare const RadioGroupItemText: ({ textStyle, children, ...props }: RadioGroup.ItemTextProps & TextProps & JsxStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export declare const InternalRadioGroupLabel: import("react").ForwardRefExoticComponent<RadioGroup.LabelProps & {
|
|
25
|
-
|
|
25
|
+
consumeCss?: boolean | undefined;
|
|
26
26
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLLabelElement>>;
|
|
27
27
|
export declare const RadioGroupLabel: import("react").ForwardRefExoticComponent<RadioGroup.LabelProps & TextProps & {
|
|
28
|
-
|
|
28
|
+
consumeCss?: boolean | undefined;
|
|
29
29
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLLabelElement>>;
|
|
30
30
|
export declare const RadioGroupItemHiddenInput: import("react").ForwardRefExoticComponent<RadioGroup.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
package/lib/RadioGroup.js
CHANGED
|
@@ -109,9 +109,9 @@ const RadioGroupItemText = _ref => {
|
|
|
109
109
|
} = _ref;
|
|
110
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalRadioGroupItemText, {
|
|
111
111
|
asChild: true,
|
|
112
|
-
forwardCssProp: true,
|
|
113
112
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Text, {
|
|
114
113
|
asChild: true,
|
|
114
|
+
consumeCss: true,
|
|
115
115
|
textStyle: textStyle,
|
|
116
116
|
...props,
|
|
117
117
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
@@ -130,7 +130,6 @@ const RadioGroupLabel = exports.RadioGroupLabel = /*#__PURE__*/(0, _react.forwar
|
|
|
130
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalRadioGroupLabel, {
|
|
131
131
|
ref: ref,
|
|
132
132
|
asChild: true,
|
|
133
|
-
forwardCssProp: true,
|
|
134
133
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Label.Label, {
|
|
135
134
|
textStyle: textStyle,
|
|
136
135
|
...props
|