@ndla/primitives 1.0.47-alpha.0 → 1.0.49-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 +1 -0
- package/dist/styles.css +4 -0
- package/es/Popover.js +18 -1
- package/es/Select.js +3 -0
- package/lib/FieldErrorMessage.d.ts +3 -0
- package/lib/FieldHelper.d.ts +3 -0
- package/lib/Popover.d.ts +2 -3
- package/lib/Popover.js +19 -1
- package/lib/Select.js +3 -0
- package/lib/index.d.ts +2 -0
- package/package.json +2 -2
|
@@ -474,6 +474,7 @@
|
|
|
474
474
|
"background]___[value:surface.disabled]___[cond:_disabled<___>_selected",
|
|
475
475
|
"color]___[value:icon.default",
|
|
476
476
|
"width]___[value:surface.small",
|
|
477
|
+
"textAlign]___[value:start",
|
|
477
478
|
"animation]___[value:skeleton-pulse",
|
|
478
479
|
"backgroundColor]___[value:surface.disabled",
|
|
479
480
|
"backgroundClip]___[value:padding-box",
|
package/dist/styles.css
CHANGED
package/es/Popover.js
CHANGED
|
@@ -10,6 +10,7 @@ import { forwardRef } from "react";
|
|
|
10
10
|
import { Popover, popoverAnatomy } from "@ark-ui/react";
|
|
11
11
|
import { sva } from "@ndla/styled-system/css";
|
|
12
12
|
import { createStyleContext } from "./createStyleContext";
|
|
13
|
+
import { Heading } from "./Text";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
const popoverRecipe = sva({
|
|
15
16
|
slots: popoverAnatomy.keys(),
|
|
@@ -98,9 +99,25 @@ export const PopoverIndicator = withContext(Popover.Indicator, "indicator", {
|
|
|
98
99
|
export const PopoverPositioner = withContext(Popover.Positioner, "positioner", {
|
|
99
100
|
baseComponent: true
|
|
100
101
|
});
|
|
101
|
-
|
|
102
|
+
const InternalPopoverTitle = withContext(Popover.Title, "title", {
|
|
102
103
|
baseComponent: true
|
|
103
104
|
});
|
|
105
|
+
export const PopoverTitle = _ref2 => {
|
|
106
|
+
let {
|
|
107
|
+
textStyle = "title.medium",
|
|
108
|
+
children,
|
|
109
|
+
...rest
|
|
110
|
+
} = _ref2;
|
|
111
|
+
return /*#__PURE__*/_jsx(Heading, {
|
|
112
|
+
textStyle: textStyle,
|
|
113
|
+
...rest,
|
|
114
|
+
asChild: true,
|
|
115
|
+
consumeCss: true,
|
|
116
|
+
children: /*#__PURE__*/_jsx(InternalPopoverTitle, {
|
|
117
|
+
children: children
|
|
118
|
+
})
|
|
119
|
+
});
|
|
120
|
+
};
|
|
104
121
|
export const PopoverTrigger = withContext(Popover.Trigger, "trigger", {
|
|
105
122
|
baseComponent: true
|
|
106
123
|
});
|
package/es/Select.js
CHANGED
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { Field, Fieldset } from "@ark-ui/react";
|
|
9
|
+
import type { JsxStyleProps } from "@ndla/styled-system/types";
|
|
9
10
|
import type { TextProps } from "./Text";
|
|
11
|
+
export type FieldErrorMessageProps = Field.ErrorTextProps & TextProps & JsxStyleProps;
|
|
10
12
|
export declare const FieldErrorMessage: import("react").ForwardRefExoticComponent<Field.ErrorTextProps & TextProps & {
|
|
11
13
|
consumeCss?: boolean | undefined;
|
|
12
14
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
export type FieldsetErrorTextProps = Fieldset.ErrorTextProps & TextProps & JsxStyleProps;
|
|
13
16
|
export declare const FieldsetErrorText: import("react").ForwardRefExoticComponent<Fieldset.ErrorTextProps & TextProps & {
|
|
14
17
|
consumeCss?: boolean | undefined;
|
|
15
18
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
package/lib/FieldHelper.d.ts
CHANGED
|
@@ -6,10 +6,13 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
import { Field, Fieldset } from "@ark-ui/react";
|
|
9
|
+
import type { JsxStyleProps } from "@ndla/styled-system/types";
|
|
9
10
|
import type { TextProps } from "./Text";
|
|
11
|
+
export type FieldHelperProps = Field.HelperTextProps & TextProps & JsxStyleProps;
|
|
10
12
|
export declare const FieldHelper: import("react").ForwardRefExoticComponent<Field.HelperTextProps & TextProps & {
|
|
11
13
|
consumeCss?: boolean | undefined;
|
|
12
14
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
export type FieldsetHelperProps = Fieldset.HelperTextProps & TextProps & JsxStyleProps;
|
|
13
16
|
export declare const FieldsetHelper: import("react").ForwardRefExoticComponent<Fieldset.HelperTextProps & TextProps & {
|
|
14
17
|
consumeCss?: boolean | undefined;
|
|
15
18
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLSpanElement>>;
|
package/lib/Popover.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Popover } from "@ark-ui/react";
|
|
9
9
|
import { JsxStyleProps } from "@ndla/styled-system/types";
|
|
10
|
+
import { TextProps } from "./Text";
|
|
10
11
|
export type PopoverRootProps = Popover.RootProps;
|
|
11
12
|
export declare const PopoverRoot: ({ lazyMount, unmountOnExit, ...props }: PopoverRootProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const PopoverAnchor: import("react").ForwardRefExoticComponent<Popover.AnchorProps & {
|
|
@@ -37,9 +38,7 @@ export declare const PopoverIndicator: import("react").ForwardRefExoticComponent
|
|
|
37
38
|
export declare const PopoverPositioner: import("react").ForwardRefExoticComponent<Popover.PositionerProps & {
|
|
38
39
|
consumeCss?: boolean | undefined;
|
|
39
40
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
|
-
export declare const PopoverTitle: import("react").
|
|
41
|
-
consumeCss?: boolean | undefined;
|
|
42
|
-
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
export declare const PopoverTitle: ({ textStyle, children, ...rest }: Popover.TitleProps & TextProps & JsxStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
43
42
|
export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<Popover.TriggerProps & {
|
|
44
43
|
consumeCss?: boolean | undefined;
|
|
45
44
|
} & import("@ndla/styled-system/types").WithCss & import("react").RefAttributes<HTMLButtonElement>>;
|
package/lib/Popover.js
CHANGED
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _react2 = require("@ark-ui/react");
|
|
9
9
|
var _css = require("@ndla/styled-system/css");
|
|
10
10
|
var _createStyleContext = require("./createStyleContext");
|
|
11
|
+
var _Text = require("./Text");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
/**
|
|
13
14
|
* Copyright (c) 2024-present, NDLA.
|
|
@@ -106,9 +107,26 @@ const PopoverIndicator = exports.PopoverIndicator = withContext(_react2.Popover.
|
|
|
106
107
|
const PopoverPositioner = exports.PopoverPositioner = withContext(_react2.Popover.Positioner, "positioner", {
|
|
107
108
|
baseComponent: true
|
|
108
109
|
});
|
|
109
|
-
const
|
|
110
|
+
const InternalPopoverTitle = withContext(_react2.Popover.Title, "title", {
|
|
110
111
|
baseComponent: true
|
|
111
112
|
});
|
|
113
|
+
const PopoverTitle = _ref2 => {
|
|
114
|
+
let {
|
|
115
|
+
textStyle = "title.medium",
|
|
116
|
+
children,
|
|
117
|
+
...rest
|
|
118
|
+
} = _ref2;
|
|
119
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.Heading, {
|
|
120
|
+
textStyle: textStyle,
|
|
121
|
+
...rest,
|
|
122
|
+
asChild: true,
|
|
123
|
+
consumeCss: true,
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(InternalPopoverTitle, {
|
|
125
|
+
children: children
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
};
|
|
129
|
+
exports.PopoverTitle = PopoverTitle;
|
|
112
130
|
const PopoverTrigger = exports.PopoverTrigger = withContext(_react2.Popover.Trigger, "trigger", {
|
|
113
131
|
baseComponent: true
|
|
114
132
|
});
|
package/lib/Select.js
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -29,7 +29,9 @@ export type { ExpandableBoxProps, ExpandableBoxSummaryProps } from "./Expandable
|
|
|
29
29
|
export { ExpandableBox, ExpandableBoxSummary } from "./ExpandableBox";
|
|
30
30
|
export { ErrorMessageRoot, ErrorMessageContent, ErrorMessageActions, ErrorMessageDescription, ErrorMessageTitle, } from "./ErrorMessage/ErrorMessage";
|
|
31
31
|
export { FieldRoot, FieldsetRoot } from "./Field";
|
|
32
|
+
export type { FieldErrorMessageProps, FieldsetErrorTextProps } from "./FieldErrorMessage";
|
|
32
33
|
export { FieldErrorMessage, FieldsetErrorText } from "./FieldErrorMessage";
|
|
34
|
+
export type { FieldHelperProps, FieldsetHelperProps } from "./FieldHelper";
|
|
33
35
|
export { FieldHelper, FieldsetHelper } from "./FieldHelper";
|
|
34
36
|
export type { FigureSize, FigureVariantProps, FigureProps, FigureFloat } from "./Figure";
|
|
35
37
|
export { Figure } from "./Figure";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/primitives",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49-alpha.0",
|
|
4
4
|
"description": "Primitive components for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "0ec600c8cfd44b20eb2197c45e02e68832f160f9"
|
|
47
47
|
}
|