@ndla/primitives 0.0.7 → 0.0.8

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.
@@ -439,11 +439,31 @@
439
439
  "textAlign]___[value:center]___[cond:& td, & th<___>&[data-align='center']",
440
440
  "textAlign]___[value:left]___[cond:& td, & th<___>&[data-align='left']",
441
441
  "textAlign]___[value:right]___[cond:& td, & th<___>&[data-align='right']",
442
- "flexDirection]___[value:column]___[cond:_horizontal",
443
- "flexDirection]___[value:row]___[cond:_vertical",
442
+ "paddingBlockStart]___[value:xsmall]___[cond:_horizontal",
443
+ "paddingInlineStart]___[value:xsmall]___[cond:_vertical",
444
+ "boxShadow]___[value:0 0 0 3px var(--shadow-color)]___[cond:_focusVisible",
445
+ "borderWidth]___[value:1px",
446
+ "padding]___[value:xsmall",
447
+ "outlineOffset]___[value:-3px]___[cond:_focusVisible",
448
+ "outlineColor]___[value:stroke.default]___[cond:_focusVisible",
444
449
  "overflow]___[value:auto",
445
450
  "marginBlockEnd]___[value:-1px]___[cond:_horizontal",
446
451
  "marginInlineEnd]___[value:-1px]___[cond:_vertical",
452
+ "flexDirection]___[value:column]___[cond:_horizontal",
453
+ "flexDirection]___[value:row]___[cond:_vertical",
454
+ "outline]___[value:4px solid",
455
+ "outlineColor]___[value:stroke.default",
456
+ "outlineOffset]___[value:-4px",
457
+ "height]___[value:var(--height)]___[cond:_peerFocusVisible",
458
+ "width]___[value:var(--width)]___[cond:_peerFocusVisible",
459
+ "borderTopRadius]___[value:xsmall]___[cond:_peerFocusVisible<___>_horizontal",
460
+ "borderRightRadius]___[value:xsmall]___[cond:_peerFocusVisible<___>_vertical",
461
+ "bottom]___[value:0]___[cond:_horizontal",
462
+ "height]___[value:2]___[cond:_horizontal",
463
+ "width]___[value:var(--width)]___[cond:_horizontal",
464
+ "height]___[value:var(--height)]___[cond:_vertical",
465
+ "left]___[value:0]___[cond:_vertical",
466
+ "width]___[value:2]___[cond:_vertical",
447
467
  "transitionProperty]___[value:color, background, border-color",
448
468
  "whiteSpace]___[value:nowrap",
449
469
  "color]___[value:text.strong]___[cond:_selected",
@@ -456,7 +476,6 @@
456
476
  "justifyContent]___[value:flex-start]___[cond:_vertical",
457
477
  "borderRadius]___[value:unset]___[cond:_focusVisible",
458
478
  "borderColor]___[value:transparent",
459
- "borderWidth]___[value:1px",
460
479
  "borderTopRadius]___[value:xsmall]___[cond:_horizontal",
461
480
  "borderTopLeftRadius]___[value:xsmall]___[cond:_vertical",
462
481
  "borderBottomLeftRadius]___[value:xsmall]___[cond:_vertical",
@@ -464,12 +483,6 @@
464
483
  "borderColor]___[value:stroke.subtle]___[cond:_selected",
465
484
  "borderBottomColor]___[value:transparent]___[cond:_selected<___>_horizontal",
466
485
  "borderRightColor]___[value:transparent]___[cond:_selected<___>_vertical",
467
- "outlineOffset]___[value:-3px]___[cond:_focusVisible",
468
- "outlineColor]___[value:stroke.default]___[cond:_focusVisible",
469
- "paddingBlockStart]___[value:xsmall]___[cond:_horizontal",
470
- "paddingInlineStart]___[value:xsmall]___[cond:_vertical",
471
- "boxShadow]___[value:0 0 0 3px var(--shadow-color)]___[cond:_focusVisible",
472
- "padding]___[value:xsmall",
473
486
  "textStyle]___[value:body.medium",
474
487
  "textStyle]___[value:heading.medium",
475
488
  "boxShadow]___[value:medium",
package/dist/styles.css CHANGED
@@ -736,16 +736,24 @@
736
736
  table-layout: fixed;
737
737
  }
738
738
 
739
+ .p_xsmall {
740
+ padding: var(--spacing-xsmall);
741
+ }
742
+
739
743
  .overflow_auto {
740
744
  overflow: auto;
741
745
  }
742
746
 
743
- .white-space_nowrap {
744
- white-space: nowrap;
747
+ .ring_4px_solid {
748
+ outline: 4px solid;
745
749
  }
746
750
 
747
- .p_xsmall {
748
- padding: var(--spacing-xsmall);
751
+ .ring-offset_-4px {
752
+ outline-offset: -4px;
753
+ }
754
+
755
+ .white-space_nowrap {
756
+ white-space: nowrap;
749
757
  }
750
758
 
751
759
  .shadow_medium {
@@ -1041,6 +1049,14 @@
1041
1049
  overflow-x: auto;
1042
1050
  }
1043
1051
 
1052
+ .border-w_1px {
1053
+ border-width: 1px;
1054
+ }
1055
+
1056
+ .ring-color_stroke\.default {
1057
+ outline-color: var(--colors-stroke-default);
1058
+ }
1059
+
1044
1060
  .transition-prop_color\,_background\,_border-color {
1045
1061
  --transition-prop: color, background, border-color;
1046
1062
  transition-property: color, background, border-color;
@@ -1050,10 +1066,6 @@
1050
1066
  border-color: transparent;
1051
1067
  }
1052
1068
 
1053
- .border-w_1px {
1054
- border-width: 1px;
1055
- }
1056
-
1057
1069
  .duration_slow {
1058
1070
  --transition-duration: var(--durations-slow);
1059
1071
  transition-duration: var(--durations-slow);
@@ -1369,6 +1381,14 @@
1369
1381
  padding-block: var(--spacing-3xsmall);
1370
1382
  }
1371
1383
 
1384
+ .horizontal\:pt_xsmall[data-orientation=horizontal] {
1385
+ padding-block-start: var(--spacing-xsmall);
1386
+ }
1387
+
1388
+ .vertical\:ps_xsmall[data-orientation=vertical] {
1389
+ padding-inline-start: var(--spacing-xsmall);
1390
+ }
1391
+
1372
1392
  .horizontal\:mb_-1px[data-orientation=horizontal] {
1373
1393
  margin-block-end: -1px;
1374
1394
  }
@@ -1377,6 +1397,22 @@
1377
1397
  margin-inline-end: -1px;
1378
1398
  }
1379
1399
 
1400
+ .horizontal\:h_2[data-orientation=horizontal] {
1401
+ height: var(--sizes-2);
1402
+ }
1403
+
1404
+ .horizontal\:w_var\(--width\)[data-orientation=horizontal] {
1405
+ width: var(--width);
1406
+ }
1407
+
1408
+ .vertical\:h_var\(--height\)[data-orientation=vertical] {
1409
+ height: var(--height);
1410
+ }
1411
+
1412
+ .vertical\:w_2[data-orientation=vertical] {
1413
+ width: var(--sizes-2);
1414
+ }
1415
+
1380
1416
  .selected\:text_text\.strong:is([aria-selected=true], [data-selected]) {
1381
1417
  color: var(--colors-text-strong);
1382
1418
  }
@@ -1398,14 +1434,6 @@
1398
1434
  background: var(--colors-surface-default);
1399
1435
  }
1400
1436
 
1401
- .horizontal\:pt_xsmall[data-orientation=horizontal] {
1402
- padding-block-start: var(--spacing-xsmall);
1403
- }
1404
-
1405
- .vertical\:ps_xsmall[data-orientation=vertical] {
1406
- padding-inline-start: var(--spacing-xsmall);
1407
- }
1408
-
1409
1437
  .closed\:transition-prop_background\,_border-color\,_border\,_border-radius:is([closed], [data-closed], [data-state="closed"]) {
1410
1438
  --transition-prop: background, border-color, border, border-radius;
1411
1439
  transition-property: background, border-color, border, border-radius;
@@ -1499,6 +1527,14 @@
1499
1527
  flex-direction: row;
1500
1528
  }
1501
1529
 
1530
+ .horizontal\:bottom_0[data-orientation=horizontal] {
1531
+ bottom: 0;
1532
+ }
1533
+
1534
+ .vertical\:left_0[data-orientation=vertical] {
1535
+ left: 0;
1536
+ }
1537
+
1502
1538
  .disabled\:border_stroke\.default:is(:disabled, [disabled], [data-disabled]) {
1503
1539
  border-color: var(--colors-stroke-default);
1504
1540
  }
@@ -1605,16 +1641,24 @@
1605
1641
  outline-offset: 0px;
1606
1642
  }
1607
1643
 
1608
- .focusVisible\:rounded_unset:is(:focus-visible, [data-focus-visible]) {
1609
- border-radius: unset;
1644
+ .focusVisible\:shadow_0_0_0_3px_var\(--shadow-color\):is(:focus-visible, [data-focus-visible]) {
1645
+ box-shadow: 0 0 0 3px var(--shadow-color);
1610
1646
  }
1611
1647
 
1612
1648
  .focusVisible\:ring-offset_-3px:is(:focus-visible, [data-focus-visible]) {
1613
1649
  outline-offset: -3px;
1614
1650
  }
1615
1651
 
1616
- .focusVisible\:shadow_0_0_0_3px_var\(--shadow-color\):is(:focus-visible, [data-focus-visible]) {
1617
- box-shadow: 0 0 0 3px var(--shadow-color);
1652
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:h_var\(--height\) {
1653
+ height: var(--height);
1654
+ }
1655
+
1656
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:w_var\(--width\) {
1657
+ width: var(--width);
1658
+ }
1659
+
1660
+ .focusVisible\:rounded_unset:is(:focus-visible, [data-focus-visible]) {
1661
+ border-radius: unset;
1618
1662
  }
1619
1663
 
1620
1664
  .focus\:ring-color_stroke\.default:is(:focus, [data-focus]) {
@@ -1869,6 +1913,16 @@
1869
1913
  text-align: right;
1870
1914
  }
1871
1915
 
1916
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:horizontal\:rounded-t_xsmall[data-orientation=horizontal] {
1917
+ border-top-left-radius: var(--radii-xsmall);
1918
+ border-top-right-radius: var(--radii-xsmall);
1919
+ }
1920
+
1921
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:vertical\:rounded-r_xsmall[data-orientation=vertical] {
1922
+ border-top-right-radius: var(--radii-xsmall);
1923
+ border-bottom-right-radius: var(--radii-xsmall);
1924
+ }
1925
+
1872
1926
  .disabled\:hover\:text_text\.subtle:is(:disabled, [disabled], [data-disabled]):is(:hover, [data-hover]) {
1873
1927
  color: var(--colors-text-subtle);
1874
1928
  }
package/es/Tabs.js CHANGED
@@ -6,13 +6,13 @@
6
6
  *
7
7
  */
8
8
 
9
- import { tabsAnatomy } from "@ark-ui/anatomy";
10
9
  import { Tabs } from "@ark-ui/react";
11
10
  import { cx, sva } from "@ndla/styled-system/css";
12
11
  import { createStyleContext } from "./createStyleContext";
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
13
  const tabsRecipe = sva({
15
- slots: tabsAnatomy.keys(),
14
+ // TODO: anatomy keys do not work here.
15
+ slots: ["content", "list", "root", "indicator", "trigger"],
16
16
  base: {
17
17
  root: {
18
18
  position: "relative",
package/lib/Tabs.js CHANGED
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.TabsTrigger = exports.TabsRoot = exports.TabsList = exports.TabsIndicator = exports.TabsContent = void 0;
7
- var _anatomy = require("@ark-ui/anatomy");
8
7
  var _react = require("@ark-ui/react");
9
8
  var _css = require("@ndla/styled-system/css");
10
9
  var _createStyleContext = require("./createStyleContext");
@@ -18,7 +17,8 @@ var _jsxRuntime = require("react/jsx-runtime");
18
17
  */
19
18
 
20
19
  const tabsRecipe = (0, _css.sva)({
21
- slots: _anatomy.tabsAnatomy.keys(),
20
+ // TODO: anatomy keys do not work here.
21
+ slots: ["content", "list", "root", "indicator", "trigger"],
22
22
  base: {
23
23
  root: {
24
24
  position: "relative",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/primitives",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "Primitive components for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -34,7 +34,7 @@
34
34
  "@ndla/util": "^4.0.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@ndla/preset-panda": "^0.0.4",
37
+ "@ndla/preset-panda": "^0.0.5",
38
38
  "@pandacss/dev": "^0.40.1"
39
39
  },
40
40
  "peerDependencies": {
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "4d43efa927c3f403d61a252efd8f06647073c076"
47
+ "gitHead": "dd4b2b6ce225256191f8245096e5514a80588a57"
48
48
  }