@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
package/lib/Icon.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.iconRecipe = exports.Icon = void 0;
|
|
7
|
-
var _css = require("@ndla/styled-system/css");
|
|
8
|
-
var _jsx2 = require("@ndla/styled-system/jsx");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* Copyright (c) 2024-present, NDLA.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const iconRecipe = exports.iconRecipe = (0, _css.cva)({
|
|
19
|
-
base: {
|
|
20
|
-
display: "inline-block",
|
|
21
|
-
fill: "currentcolor",
|
|
22
|
-
verticalAlign: "middle",
|
|
23
|
-
lineHeight: "1em",
|
|
24
|
-
flexShrink: "0"
|
|
25
|
-
},
|
|
26
|
-
defaultVariants: {
|
|
27
|
-
size: "medium"
|
|
28
|
-
},
|
|
29
|
-
variants: {
|
|
30
|
-
size: {
|
|
31
|
-
xsmall: {
|
|
32
|
-
width: "xsmall",
|
|
33
|
-
height: "xsmall"
|
|
34
|
-
},
|
|
35
|
-
small: {
|
|
36
|
-
width: "small",
|
|
37
|
-
height: "small"
|
|
38
|
-
},
|
|
39
|
-
medium: {
|
|
40
|
-
width: "medium",
|
|
41
|
-
height: "medium"
|
|
42
|
-
},
|
|
43
|
-
large: {
|
|
44
|
-
width: "large",
|
|
45
|
-
height: "large"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
const StyledSvg = (0, _jsx2.styled)("svg");
|
|
51
|
-
|
|
52
|
-
// TODO: Move this component over to ndla/icons
|
|
53
|
-
const Icon = _ref => {
|
|
54
|
-
let {
|
|
55
|
-
children,
|
|
56
|
-
size,
|
|
57
|
-
role,
|
|
58
|
-
title,
|
|
59
|
-
description,
|
|
60
|
-
width,
|
|
61
|
-
height,
|
|
62
|
-
css: cssProp,
|
|
63
|
-
"aria-hidden": ariaHidden = true,
|
|
64
|
-
...props
|
|
65
|
-
} = _ref;
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(StyledSvg, {
|
|
67
|
-
"data-icon": "",
|
|
68
|
-
"aria-hidden": ariaHidden,
|
|
69
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
70
|
-
css: _css.css.raw(iconRecipe.raw({
|
|
71
|
-
size
|
|
72
|
-
}), cssProp),
|
|
73
|
-
...props,
|
|
74
|
-
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
|
|
75
|
-
children: title
|
|
76
|
-
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)("desc", {
|
|
77
|
-
children: description
|
|
78
|
-
}), children]
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
exports.Icon = Icon;
|