@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.
Files changed (91) hide show
  1. package/dist/panda.buildinfo.json +5 -15
  2. package/dist/styles.css +18 -58
  3. package/es/ArticleLists.js +22 -1
  4. package/es/Badge.js +20 -2
  5. package/es/BlockQuote.js +20 -2
  6. package/es/Button.js +2 -0
  7. package/es/Checkbox.js +0 -1
  8. package/es/Combobox.js +8 -4
  9. package/es/Dialog.js +6 -4
  10. package/es/ExpandableBox.js +2 -0
  11. package/es/Field.js +2 -0
  12. package/es/FieldErrorMessage.js +2 -0
  13. package/es/FieldHelper.js +3 -1
  14. package/es/Figure.js +24 -1
  15. package/es/FramedContent.js +24 -10
  16. package/es/Input.js +8 -2
  17. package/es/Label.js +10 -2
  18. package/es/Menu.js +1 -2
  19. package/es/MessageBox.js +20 -2
  20. package/es/RadioGroup.js +1 -2
  21. package/es/Select.js +1 -2
  22. package/es/Skeleton.js +2 -0
  23. package/es/Slider.js +0 -1
  24. package/es/Spinner.js +20 -2
  25. package/es/Switch.js +2 -2
  26. package/es/Table.js +2 -0
  27. package/es/TagsInput.js +0 -1
  28. package/es/Text.js +6 -2
  29. package/es/Toast.js +2 -2
  30. package/es/createStyleContext.js +10 -3
  31. package/lib/Accordion.d.ts +4 -4
  32. package/lib/ArticleLists.d.ts +40 -4
  33. package/lib/ArticleLists.js +25 -4
  34. package/lib/Badge.d.ts +4 -4
  35. package/lib/Badge.js +21 -3
  36. package/lib/BlockQuote.d.ts +4 -4
  37. package/lib/BlockQuote.js +21 -3
  38. package/lib/Button.d.ts +2 -2
  39. package/lib/Button.js +2 -0
  40. package/lib/Checkbox.d.ts +4 -4
  41. package/lib/Checkbox.js +0 -1
  42. package/lib/Combobox.d.ts +2 -2
  43. package/lib/Combobox.js +8 -4
  44. package/lib/Dialog.d.ts +7 -7
  45. package/lib/Dialog.js +6 -4
  46. package/lib/ExpandableBox.js +2 -0
  47. package/lib/Field.js +2 -0
  48. package/lib/FieldErrorMessage.d.ts +1 -1
  49. package/lib/FieldErrorMessage.js +2 -0
  50. package/lib/FieldHelper.d.ts +1 -1
  51. package/lib/FieldHelper.js +3 -1
  52. package/lib/Figure.d.ts +57 -2
  53. package/lib/Figure.js +25 -2
  54. package/lib/FramedContent.d.ts +4 -7
  55. package/lib/FramedContent.js +25 -11
  56. package/lib/Input.d.ts +1 -1
  57. package/lib/Input.js +8 -2
  58. package/lib/Label.d.ts +3 -3
  59. package/lib/Label.js +10 -2
  60. package/lib/Menu.d.ts +7 -7
  61. package/lib/Menu.js +1 -2
  62. package/lib/MessageBox.d.ts +4 -4
  63. package/lib/MessageBox.js +21 -3
  64. package/lib/Pagination.d.ts +5 -5
  65. package/lib/Popover.d.ts +10 -10
  66. package/lib/RadioGroup.d.ts +5 -5
  67. package/lib/RadioGroup.js +1 -2
  68. package/lib/Select.d.ts +13 -13
  69. package/lib/Select.js +1 -2
  70. package/lib/Skeleton.js +2 -0
  71. package/lib/Slider.d.ts +5 -5
  72. package/lib/Slider.js +0 -1
  73. package/lib/Spinner.d.ts +5 -5
  74. package/lib/Spinner.js +21 -3
  75. package/lib/Switch.d.ts +3 -3
  76. package/lib/Switch.js +2 -2
  77. package/lib/Table.js +2 -0
  78. package/lib/Tabs.d.ts +4 -4
  79. package/lib/TagsInput.d.ts +10 -10
  80. package/lib/TagsInput.js +0 -1
  81. package/lib/Text.d.ts +2 -2
  82. package/lib/Text.js +6 -2
  83. package/lib/Toast.d.ts +2 -2
  84. package/lib/Toast.js +2 -2
  85. package/lib/Tooltip.d.ts +6 -6
  86. package/lib/createStyleContext.d.ts +6 -6
  87. package/lib/createStyleContext.js +9 -2
  88. package/package.json +5 -5
  89. package/es/Icon.js +0 -74
  90. package/lib/Icon.d.ts +0 -38
  91. 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;