@ndla/primitives 0.0.11 → 0.0.13-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 +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 -5
- 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 -5
- 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 +4 -4
- package/es/Icon.js +0 -74
- package/lib/Icon.d.ts +0 -38
- package/lib/Icon.js +0 -81
|
@@ -305,22 +305,8 @@
|
|
|
305
305
|
"left]___[value:auto",
|
|
306
306
|
"marginBlock]___[value:xsmall",
|
|
307
307
|
"borderRadius]___[value:small",
|
|
308
|
-
"boxShadow]___[value:4px 4px 0px 0px var(--shadow-color)",
|
|
309
308
|
"backgroundColor]___[value:surface.default",
|
|
310
|
-
"boxShadowColor]___[value:surface.brand.1.strong",
|
|
311
309
|
"backgroundColor]___[value:surface.brand.2.subtle",
|
|
312
|
-
"boxShadowColor]___[value:surface.brand.2.strong",
|
|
313
|
-
"display]___[value:inline-block",
|
|
314
|
-
"fill]___[value:currentcolor",
|
|
315
|
-
"verticalAlign]___[value:middle",
|
|
316
|
-
"lineHeight]___[value:1em",
|
|
317
|
-
"flexShrink]___[value:0",
|
|
318
|
-
"width]___[value:xsmall",
|
|
319
|
-
"height]___[value:xsmall",
|
|
320
|
-
"width]___[value:small",
|
|
321
|
-
"height]___[value:small",
|
|
322
|
-
"width]___[value:large",
|
|
323
|
-
"height]___[value:large",
|
|
324
310
|
"outline]___[value:1px solid",
|
|
325
311
|
"background]___[value:background.default",
|
|
326
312
|
"minHeight]___[value:xxlarge",
|
|
@@ -345,6 +331,7 @@
|
|
|
345
331
|
"float]___[value:none",
|
|
346
332
|
"width]___[value:inherit",
|
|
347
333
|
"color]___[value:text.subtle]___[cond:_disabled",
|
|
334
|
+
"display]___[value:inline-block",
|
|
348
335
|
"border]___[value:none",
|
|
349
336
|
"padding]___[value:0",
|
|
350
337
|
"margin]___[value:0",
|
|
@@ -365,7 +352,7 @@
|
|
|
365
352
|
"background]___[value:surface.errorSubtle.active]___[cond:_active",
|
|
366
353
|
"minWidth]___[value:surface.xxsmall",
|
|
367
354
|
"padding]___[value:3xsmall",
|
|
368
|
-
"boxShadow]___[value:
|
|
355
|
+
"boxShadow]___[value:small",
|
|
369
356
|
"alignItems]___[value:flex-start",
|
|
370
357
|
"gap]___[value:small",
|
|
371
358
|
"background]___[value:surface.infoSubtle",
|
|
@@ -436,10 +423,13 @@
|
|
|
436
423
|
"marginBlock]___[value:medium",
|
|
437
424
|
"marginInline]___[value:auto",
|
|
438
425
|
"borderWidth]___[value:4px",
|
|
426
|
+
"height]___[value:large",
|
|
427
|
+
"width]___[value:large",
|
|
439
428
|
"borderWidth]___[value:8px",
|
|
440
429
|
"background]___[value:surface.disabled.strong",
|
|
441
430
|
"padding]___[value:1",
|
|
442
431
|
"borderRadius]___[value:medium",
|
|
432
|
+
"flexShrink]___[value:0",
|
|
443
433
|
"background]___[value:surface.action.active]___[cond:_checked",
|
|
444
434
|
"background]___[value:icon.onAction",
|
|
445
435
|
"width]___[value:10",
|
package/dist/styles.css
CHANGED
|
@@ -520,54 +520,6 @@
|
|
|
520
520
|
border-radius: var(--radii-small);
|
|
521
521
|
}
|
|
522
522
|
|
|
523
|
-
.shadow_4px_4px_0px_0px_var\(--shadow-color\) {
|
|
524
|
-
box-shadow: 4px 4px 0px 0px var(--shadow-color);
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
.shadow-color_surface\.brand\.1\.strong {
|
|
528
|
-
--shadow-color: var(--colors-surface-brand-1-strong);
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
.shadow-color_surface\.brand\.2\.strong {
|
|
532
|
-
--shadow-color: var(--colors-surface-brand-2-strong);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.d_inline-block {
|
|
536
|
-
display: inline-block;
|
|
537
|
-
}
|
|
538
|
-
|
|
539
|
-
.fill_currentcolor {
|
|
540
|
-
fill: currentcolor;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
.v-align_middle {
|
|
544
|
-
vertical-align: middle;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
.w_xsmall {
|
|
548
|
-
width: var(--sizes-xsmall);
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
.h_xsmall {
|
|
552
|
-
height: var(--sizes-xsmall);
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
.w_small {
|
|
556
|
-
width: var(--sizes-small);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
.h_small {
|
|
560
|
-
height: var(--sizes-small);
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
.w_large {
|
|
564
|
-
width: var(--sizes-large);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.h_large {
|
|
568
|
-
height: var(--sizes-large);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
523
|
.ring_1px_solid {
|
|
572
524
|
outline: 1px solid;
|
|
573
525
|
}
|
|
@@ -608,6 +560,10 @@
|
|
|
608
560
|
width: inherit;
|
|
609
561
|
}
|
|
610
562
|
|
|
563
|
+
.d_inline-block {
|
|
564
|
+
display: inline-block;
|
|
565
|
+
}
|
|
566
|
+
|
|
611
567
|
.border_none {
|
|
612
568
|
border: none;
|
|
613
569
|
}
|
|
@@ -628,8 +584,8 @@
|
|
|
628
584
|
padding: var(--spacing-3xsmall);
|
|
629
585
|
}
|
|
630
586
|
|
|
631
|
-
.
|
|
632
|
-
box-shadow: var(--shadows-
|
|
587
|
+
.shadow_small {
|
|
588
|
+
box-shadow: var(--shadows-small);
|
|
633
589
|
}
|
|
634
590
|
|
|
635
591
|
.gap_small {
|
|
@@ -736,6 +692,14 @@
|
|
|
736
692
|
margin-inline: auto;
|
|
737
693
|
}
|
|
738
694
|
|
|
695
|
+
.h_large {
|
|
696
|
+
height: var(--sizes-large);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.w_large {
|
|
700
|
+
width: var(--sizes-large);
|
|
701
|
+
}
|
|
702
|
+
|
|
739
703
|
.bg_surface\.disabled\.strong {
|
|
740
704
|
background: var(--colors-surface-disabled-strong);
|
|
741
705
|
}
|
|
@@ -1002,14 +966,6 @@
|
|
|
1002
966
|
background-color: var(--colors-surface-brand-2-subtle);
|
|
1003
967
|
}
|
|
1004
968
|
|
|
1005
|
-
.leading_1em {
|
|
1006
|
-
line-height: 1em;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
.shrink_0 {
|
|
1010
|
-
flex-shrink: 0;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
969
|
.overflow-y_hidden {
|
|
1014
970
|
overflow-y: hidden;
|
|
1015
971
|
}
|
|
@@ -1094,6 +1050,10 @@
|
|
|
1094
1050
|
border-width: 8px;
|
|
1095
1051
|
}
|
|
1096
1052
|
|
|
1053
|
+
.shrink_0 {
|
|
1054
|
+
flex-shrink: 0;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1097
1057
|
.transition-prop_color {
|
|
1098
1058
|
--transition-prop: color;
|
|
1099
1059
|
transition-property: color;
|
package/es/ArticleLists.js
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { ark } from "@ark-ui/react";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
9
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
10
|
-
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const orderedListRecipe = cva({
|
|
11
15
|
base: {
|
|
12
16
|
listStyle: "revert",
|
|
13
17
|
listStylePosition: "inside",
|
|
@@ -53,6 +57,23 @@ export const OrderedList = styled("ol", {
|
|
|
53
57
|
}
|
|
54
58
|
}
|
|
55
59
|
});
|
|
60
|
+
const StyledOrderedList = styled(ark.ol, {}, {
|
|
61
|
+
baseComponent: true
|
|
62
|
+
});
|
|
63
|
+
export const OrderedList = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
64
|
+
let {
|
|
65
|
+
variant,
|
|
66
|
+
css: cssProp,
|
|
67
|
+
...props
|
|
68
|
+
} = _ref;
|
|
69
|
+
return /*#__PURE__*/_jsx(StyledOrderedList, {
|
|
70
|
+
css: css.raw(orderedListRecipe.raw({
|
|
71
|
+
variant
|
|
72
|
+
}), cssProp),
|
|
73
|
+
...props,
|
|
74
|
+
ref: ref
|
|
75
|
+
});
|
|
76
|
+
});
|
|
56
77
|
export const UnOrderedList = styled("ul", {
|
|
57
78
|
base: {
|
|
58
79
|
listStyle: "revert",
|
package/es/Badge.js
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
9
10
|
import { ark } from "@ark-ui/react";
|
|
10
|
-
import { cva } from "@ndla/styled-system/css";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
11
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
const badgeRecipe = cva({
|
|
13
15
|
base: {
|
|
14
16
|
paddingInline: "xsmall",
|
|
@@ -40,4 +42,20 @@ const badgeRecipe = cva({
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
|
-
|
|
45
|
+
const StyledBadge = styled(ark.div, {}, {
|
|
46
|
+
baseComponent: true
|
|
47
|
+
});
|
|
48
|
+
export const Badge = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
49
|
+
let {
|
|
50
|
+
colorTheme,
|
|
51
|
+
css: cssProp,
|
|
52
|
+
...props
|
|
53
|
+
} = _ref;
|
|
54
|
+
return /*#__PURE__*/_jsx(StyledBadge, {
|
|
55
|
+
css: css.raw(badgeRecipe.raw({
|
|
56
|
+
colorTheme
|
|
57
|
+
}), cssProp),
|
|
58
|
+
...props,
|
|
59
|
+
ref: ref
|
|
60
|
+
});
|
|
61
|
+
});
|
package/es/BlockQuote.js
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
9
10
|
import { ark } from "@ark-ui/react";
|
|
10
|
-
import { cva } from "@ndla/styled-system/css";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
11
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
const blockQuoteRecipe = cva({
|
|
13
15
|
base: {
|
|
14
16
|
borderInlineStart: "4px solid",
|
|
@@ -34,4 +36,20 @@ const blockQuoteRecipe = cva({
|
|
|
34
36
|
variant: "neutral"
|
|
35
37
|
}
|
|
36
38
|
});
|
|
37
|
-
|
|
39
|
+
const StyledBlockQuote = styled(ark.blockquote, {}, {
|
|
40
|
+
baseComponent: true
|
|
41
|
+
});
|
|
42
|
+
export const BlockQuote = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
43
|
+
let {
|
|
44
|
+
variant,
|
|
45
|
+
css: cssProp,
|
|
46
|
+
...props
|
|
47
|
+
} = _ref;
|
|
48
|
+
return /*#__PURE__*/_jsx(StyledBlockQuote, {
|
|
49
|
+
css: css.raw(blockQuoteRecipe.raw({
|
|
50
|
+
variant
|
|
51
|
+
}), cssProp),
|
|
52
|
+
...props,
|
|
53
|
+
ref: ref
|
|
54
|
+
});
|
|
55
|
+
});
|
package/es/Button.js
CHANGED
|
@@ -182,6 +182,7 @@ export const iconButtonRecipe = cva({
|
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
184
|
const StyledButton = styled(ark.button, {}, {
|
|
185
|
+
baseComponent: true,
|
|
185
186
|
defaultProps: {
|
|
186
187
|
type: "button"
|
|
187
188
|
}
|
|
@@ -204,6 +205,7 @@ export const Button = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
204
205
|
});
|
|
205
206
|
});
|
|
206
207
|
const StyledIconButton = styled(ark.button, {}, {
|
|
208
|
+
baseComponent: true,
|
|
207
209
|
defaultProps: {
|
|
208
210
|
type: "button"
|
|
209
211
|
}
|
package/es/Checkbox.js
CHANGED
package/es/Combobox.js
CHANGED
|
@@ -173,11 +173,10 @@ export const ComboboxItemGroupLabel = _ref2 => {
|
|
|
173
173
|
...props
|
|
174
174
|
} = _ref2;
|
|
175
175
|
return /*#__PURE__*/_jsx(InternalComboboxItemGroupLabel, {
|
|
176
|
-
forwardCssProp: true,
|
|
177
176
|
asChild: true,
|
|
178
177
|
children: /*#__PURE__*/_jsx(Text, {
|
|
179
178
|
asChild: true,
|
|
180
|
-
|
|
179
|
+
consumeCss: true,
|
|
181
180
|
textStyle: textStyle,
|
|
182
181
|
fontWeight: fontWeight,
|
|
183
182
|
...props,
|
|
@@ -195,13 +194,18 @@ export const ComboboxItemText = _ref3 => {
|
|
|
195
194
|
let {
|
|
196
195
|
textStyle = "label.medium",
|
|
197
196
|
fontWeight = "bold",
|
|
197
|
+
children,
|
|
198
198
|
...props
|
|
199
199
|
} = _ref3;
|
|
200
200
|
return /*#__PURE__*/_jsx(InternalComboboxItemText, {
|
|
201
|
-
forwardCssProp: true,
|
|
202
201
|
asChild: true,
|
|
203
202
|
children: /*#__PURE__*/_jsx(Text, {
|
|
204
|
-
...props
|
|
203
|
+
...props,
|
|
204
|
+
asChild: true,
|
|
205
|
+
consumeCss: true,
|
|
206
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
207
|
+
children: children
|
|
208
|
+
})
|
|
205
209
|
})
|
|
206
210
|
});
|
|
207
211
|
};
|
|
@@ -213,7 +217,6 @@ export const ComboboxLabel = _ref4 => {
|
|
|
213
217
|
...props
|
|
214
218
|
} = _ref4;
|
|
215
219
|
return /*#__PURE__*/_jsx(InternalComboboxLabel, {
|
|
216
|
-
forwardCssProp: true,
|
|
217
220
|
asChild: true,
|
|
218
221
|
children: /*#__PURE__*/_jsx(Label, {
|
|
219
222
|
textStyle: textStyle,
|
package/es/Dialog.js
CHANGED
|
@@ -280,14 +280,15 @@ const InternalDialogDescription = withContext(Dialog.Description, "description")
|
|
|
280
280
|
export const DialogDescription = _ref2 => {
|
|
281
281
|
let {
|
|
282
282
|
textStyle = "body.large",
|
|
283
|
+
children,
|
|
283
284
|
...rest
|
|
284
285
|
} = _ref2;
|
|
285
286
|
return /*#__PURE__*/_jsx(InternalDialogDescription, {
|
|
286
287
|
asChild: true,
|
|
287
|
-
forwardCssProp: true,
|
|
288
288
|
children: /*#__PURE__*/_jsx(Text, {
|
|
289
289
|
textStyle: textStyle,
|
|
290
|
-
...rest
|
|
290
|
+
...rest,
|
|
291
|
+
children: children
|
|
291
292
|
})
|
|
292
293
|
});
|
|
293
294
|
};
|
|
@@ -295,14 +296,15 @@ const InternalDialogTitle = withContext(Dialog.Title, "title");
|
|
|
295
296
|
export const DialogTitle = _ref3 => {
|
|
296
297
|
let {
|
|
297
298
|
textStyle = "title.medium",
|
|
299
|
+
children,
|
|
298
300
|
...rest
|
|
299
301
|
} = _ref3;
|
|
300
302
|
return /*#__PURE__*/_jsx(InternalDialogTitle, {
|
|
301
303
|
asChild: true,
|
|
302
|
-
forwardCssProp: true,
|
|
303
304
|
children: /*#__PURE__*/_jsx(Heading, {
|
|
304
305
|
textStyle: textStyle,
|
|
305
|
-
...rest
|
|
306
|
+
...rest,
|
|
307
|
+
children: children
|
|
306
308
|
})
|
|
307
309
|
});
|
|
308
310
|
};
|
package/es/ExpandableBox.js
CHANGED
package/es/Field.js
CHANGED
package/es/FieldErrorMessage.js
CHANGED
package/es/FieldHelper.js
CHANGED
|
@@ -11,7 +11,9 @@ import { Field } from "@ark-ui/react";
|
|
|
11
11
|
import { css } from "@ndla/styled-system/css";
|
|
12
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
const StyledFieldHelper = styled(Field.HelperText
|
|
14
|
+
const StyledFieldHelper = styled(Field.HelperText, {}, {
|
|
15
|
+
baseComponent: true
|
|
16
|
+
});
|
|
15
17
|
export const FieldHelper = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
16
18
|
let {
|
|
17
19
|
textStyle = "label.small",
|
package/es/Figure.js
CHANGED
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { ark } from "@ark-ui/react";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
9
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
10
|
-
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
+
const figureRecipe = cva({
|
|
11
15
|
base: {
|
|
12
16
|
position: "relative",
|
|
13
17
|
transitionDuration: "normal",
|
|
@@ -72,4 +76,23 @@ export const Figure = styled("figure", {
|
|
|
72
76
|
marginBlock: "xsmall"
|
|
73
77
|
}
|
|
74
78
|
}]
|
|
79
|
+
});
|
|
80
|
+
const StyledFigure = styled(ark.figure, {}, {
|
|
81
|
+
baseComponent: true
|
|
82
|
+
});
|
|
83
|
+
export const Figure = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
84
|
+
let {
|
|
85
|
+
size,
|
|
86
|
+
float,
|
|
87
|
+
css: cssProp,
|
|
88
|
+
...props
|
|
89
|
+
} = _ref;
|
|
90
|
+
return /*#__PURE__*/_jsx(StyledFigure, {
|
|
91
|
+
css: css.raw(figureRecipe.raw({
|
|
92
|
+
size,
|
|
93
|
+
float
|
|
94
|
+
}), cssProp),
|
|
95
|
+
...props,
|
|
96
|
+
ref: ref
|
|
97
|
+
});
|
|
75
98
|
});
|
package/es/FramedContent.js
CHANGED
|
@@ -6,32 +6,30 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
9
10
|
import { ark } from "@ark-ui/react";
|
|
10
|
-
import { cva } from "@ndla/styled-system/css";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
11
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
const framedContentRecipe = cva({
|
|
13
15
|
base: {
|
|
14
16
|
padding: "medium",
|
|
15
17
|
border: "1px solid",
|
|
16
|
-
borderRadius: "small"
|
|
17
|
-
boxShadow: "4px 4px 0px 0px var(--shadow-color)"
|
|
18
|
+
borderRadius: "small"
|
|
18
19
|
},
|
|
19
20
|
variants: {
|
|
20
21
|
colorTheme: {
|
|
21
22
|
neutral: {
|
|
22
23
|
backgroundColor: "surface.default",
|
|
23
|
-
borderColor: "stroke.subtle"
|
|
24
|
-
boxShadowColor: "stroke.subtle"
|
|
24
|
+
borderColor: "stroke.subtle"
|
|
25
25
|
},
|
|
26
26
|
brand1: {
|
|
27
27
|
backgroundColor: "surface.brand.1.subtle",
|
|
28
|
-
borderColor: "surface.brand.1.strong"
|
|
29
|
-
boxShadowColor: "surface.brand.1.strong"
|
|
28
|
+
borderColor: "surface.brand.1.strong"
|
|
30
29
|
},
|
|
31
30
|
brand2: {
|
|
32
31
|
backgroundColor: "surface.brand.2.subtle",
|
|
33
|
-
borderColor: "surface.brand.2.strong"
|
|
34
|
-
boxShadowColor: "surface.brand.2.strong"
|
|
32
|
+
borderColor: "surface.brand.2.strong"
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
},
|
|
@@ -39,4 +37,20 @@ const framedContentRecipe = cva({
|
|
|
39
37
|
colorTheme: "neutral"
|
|
40
38
|
}
|
|
41
39
|
});
|
|
42
|
-
|
|
40
|
+
const StyledFramedContent = styled(ark.div, {}, {
|
|
41
|
+
baseComponent: true
|
|
42
|
+
});
|
|
43
|
+
export const FramedContent = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
44
|
+
let {
|
|
45
|
+
colorTheme,
|
|
46
|
+
css: cssProp,
|
|
47
|
+
...props
|
|
48
|
+
} = _ref;
|
|
49
|
+
return /*#__PURE__*/_jsx(StyledFramedContent, {
|
|
50
|
+
css: css.raw(framedContentRecipe.raw({
|
|
51
|
+
colorTheme
|
|
52
|
+
}), cssProp),
|
|
53
|
+
...props,
|
|
54
|
+
ref: ref
|
|
55
|
+
});
|
|
56
|
+
});
|
package/es/Input.js
CHANGED
|
@@ -61,6 +61,8 @@ const StyledInputContainer = styled(ark.div, {
|
|
|
61
61
|
height: "medium"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
+
}, {
|
|
65
|
+
baseComponent: true
|
|
64
66
|
});
|
|
65
67
|
export const InputContainer = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
66
68
|
let {
|
|
@@ -102,7 +104,9 @@ const baseTextAreaCss = css.raw({
|
|
|
102
104
|
resize: "none",
|
|
103
105
|
overflowY: "hidden"
|
|
104
106
|
});
|
|
105
|
-
const StyledInput = styled(ark.input
|
|
107
|
+
const StyledInput = styled(ark.input, {}, {
|
|
108
|
+
baseComponent: true
|
|
109
|
+
});
|
|
106
110
|
export const Input = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
107
111
|
let {
|
|
108
112
|
css: cssProp,
|
|
@@ -122,7 +126,9 @@ export const FieldInput = /*#__PURE__*/forwardRef((props, ref) => /*#__PURE__*/_
|
|
|
122
126
|
ref: ref
|
|
123
127
|
})
|
|
124
128
|
}));
|
|
125
|
-
const StyledTextArea = styled(ark.textarea
|
|
129
|
+
const StyledTextArea = styled(ark.textarea, {}, {
|
|
130
|
+
baseComponent: true
|
|
131
|
+
});
|
|
126
132
|
export const TextArea = /*#__PURE__*/forwardRef((_ref3, ref) => {
|
|
127
133
|
let {
|
|
128
134
|
css: cssProp,
|
package/es/Label.js
CHANGED
|
@@ -19,6 +19,8 @@ const StyledLegend = styled(ark.legend, {
|
|
|
19
19
|
color: "text.subtle"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
+
}, {
|
|
23
|
+
baseComponent: true
|
|
22
24
|
});
|
|
23
25
|
// TODO: This is not exported for now. Let's wait and see when ark decides to release their legend and fieldset.
|
|
24
26
|
export const Legend = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
@@ -27,13 +29,15 @@ export const Legend = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
27
29
|
fontWeight = "bold",
|
|
28
30
|
css: cssProp,
|
|
29
31
|
srOnly,
|
|
32
|
+
color,
|
|
30
33
|
...rest
|
|
31
34
|
} = _ref;
|
|
32
35
|
return /*#__PURE__*/_jsx(StyledLegend, {
|
|
33
36
|
css: css.raw({
|
|
34
37
|
textStyle,
|
|
35
38
|
fontWeight,
|
|
36
|
-
srOnly
|
|
39
|
+
srOnly,
|
|
40
|
+
color
|
|
37
41
|
}, cssProp),
|
|
38
42
|
...rest,
|
|
39
43
|
ref: ref
|
|
@@ -46,6 +50,8 @@ const StyledLabel = styled(ark.label, {
|
|
|
46
50
|
color: "text.subtle"
|
|
47
51
|
}
|
|
48
52
|
}
|
|
53
|
+
}, {
|
|
54
|
+
baseComponent: true
|
|
49
55
|
});
|
|
50
56
|
export const Label = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
51
57
|
let {
|
|
@@ -53,13 +59,15 @@ export const Label = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
53
59
|
fontWeight = "bold",
|
|
54
60
|
css: cssProp,
|
|
55
61
|
srOnly,
|
|
62
|
+
color,
|
|
56
63
|
...rest
|
|
57
64
|
} = _ref2;
|
|
58
65
|
return /*#__PURE__*/_jsx(StyledLabel, {
|
|
59
66
|
css: css.raw({
|
|
60
67
|
textStyle,
|
|
61
68
|
fontWeight,
|
|
62
|
-
srOnly
|
|
69
|
+
srOnly,
|
|
70
|
+
color
|
|
63
71
|
}, cssProp),
|
|
64
72
|
...rest,
|
|
65
73
|
ref: ref
|
package/es/Menu.js
CHANGED
|
@@ -103,7 +103,7 @@ const menuRecipe = sva({
|
|
|
103
103
|
padding: "3xsmall",
|
|
104
104
|
gap: "3xsmall",
|
|
105
105
|
background: "surface.default",
|
|
106
|
-
boxShadow: "
|
|
106
|
+
boxShadow: "small",
|
|
107
107
|
borderRadius: "xsmall",
|
|
108
108
|
outline: "none",
|
|
109
109
|
zIndex: "dropdown",
|
|
@@ -153,7 +153,6 @@ export const MenuItemGroupLabel = _ref2 => {
|
|
|
153
153
|
return /*#__PURE__*/_jsx(InternalMenuItemGroupLabel, {
|
|
154
154
|
...props,
|
|
155
155
|
asChild: true,
|
|
156
|
-
forwardCssProp: true,
|
|
157
156
|
children: /*#__PURE__*/_jsx(Text, {
|
|
158
157
|
textStyle: textStyle,
|
|
159
158
|
fontWeight: fontWeight,
|
package/es/MessageBox.js
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { forwardRef } from "react";
|
|
9
10
|
import { ark } from "@ark-ui/react";
|
|
10
|
-
import { cva } from "@ndla/styled-system/css";
|
|
11
|
+
import { css, cva } from "@ndla/styled-system/css";
|
|
11
12
|
import { styled } from "@ndla/styled-system/jsx";
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
const messageBoxRecipe = cva({
|
|
13
15
|
base: {
|
|
14
16
|
display: "flex",
|
|
@@ -42,4 +44,20 @@ const messageBoxRecipe = cva({
|
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
|
-
|
|
47
|
+
const StyledMessageBox = styled(ark.div, {}, {
|
|
48
|
+
baseComponent: true
|
|
49
|
+
});
|
|
50
|
+
export const MessageBox = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
51
|
+
let {
|
|
52
|
+
variant,
|
|
53
|
+
css: cssProp,
|
|
54
|
+
...props
|
|
55
|
+
} = _ref;
|
|
56
|
+
return /*#__PURE__*/_jsx(StyledMessageBox, {
|
|
57
|
+
css: css.raw(messageBoxRecipe.raw({
|
|
58
|
+
variant
|
|
59
|
+
}), cssProp),
|
|
60
|
+
...props,
|
|
61
|
+
ref: ref
|
|
62
|
+
});
|
|
63
|
+
});
|
package/es/RadioGroup.js
CHANGED
|
@@ -103,9 +103,9 @@ export const RadioGroupItemText = _ref => {
|
|
|
103
103
|
} = _ref;
|
|
104
104
|
return /*#__PURE__*/_jsx(InternalRadioGroupItemText, {
|
|
105
105
|
asChild: true,
|
|
106
|
-
forwardCssProp: true,
|
|
107
106
|
children: /*#__PURE__*/_jsx(Text, {
|
|
108
107
|
asChild: true,
|
|
108
|
+
consumeCss: true,
|
|
109
109
|
textStyle: textStyle,
|
|
110
110
|
...props,
|
|
111
111
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -123,7 +123,6 @@ export const RadioGroupLabel = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
123
123
|
return /*#__PURE__*/_jsx(InternalRadioGroupLabel, {
|
|
124
124
|
ref: ref,
|
|
125
125
|
asChild: true,
|
|
126
|
-
forwardCssProp: true,
|
|
127
126
|
children: /*#__PURE__*/_jsx(Label, {
|
|
128
127
|
textStyle: textStyle,
|
|
129
128
|
...props
|