@ndla/primitives 0.0.17 → 0.0.19

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 (55) hide show
  1. package/dist/panda.buildinfo.json +52 -19
  2. package/dist/styles.css +166 -32
  3. package/es/Accordion.js +58 -30
  4. package/es/ArticleLists.js +70 -18
  5. package/es/Button.js +1 -1
  6. package/es/Card/Card.js +77 -0
  7. package/es/Checkbox.js +12 -4
  8. package/es/Combobox.js +33 -10
  9. package/es/Dialog.js +9 -3
  10. package/es/Menu.js +21 -7
  11. package/es/Pagination.js +15 -5
  12. package/es/Popover.js +30 -10
  13. package/es/RadioGroup.js +12 -4
  14. package/es/Select.js +39 -12
  15. package/es/Slider.js +15 -5
  16. package/es/Switch.js +9 -3
  17. package/es/Tabs.js +28 -14
  18. package/es/TagsInput.js +27 -9
  19. package/es/Toast.js +9 -3
  20. package/es/Tooltip.js +15 -5
  21. package/es/createStyleContext.js +4 -10
  22. package/es/index.js +4 -3
  23. package/lib/Accordion.d.ts +41 -2
  24. package/lib/Accordion.js +58 -30
  25. package/lib/ArticleLists.d.ts +56 -11
  26. package/lib/ArticleLists.js +69 -17
  27. package/lib/Badge.d.ts +1 -0
  28. package/lib/Button.d.ts +1 -1
  29. package/lib/Button.js +1 -1
  30. package/lib/Card/Card.d.ts +19 -0
  31. package/lib/Card/Card.js +83 -0
  32. package/lib/Checkbox.js +12 -4
  33. package/lib/Combobox.d.ts +49 -13
  34. package/lib/Combobox.js +34 -11
  35. package/lib/Dialog.js +9 -3
  36. package/lib/Menu.js +21 -7
  37. package/lib/Pagination.d.ts +6 -2
  38. package/lib/Pagination.js +15 -5
  39. package/lib/Popover.js +30 -10
  40. package/lib/RadioGroup.js +12 -4
  41. package/lib/Select.d.ts +3 -0
  42. package/lib/Select.js +40 -13
  43. package/lib/Slider.js +15 -5
  44. package/lib/Switch.js +9 -3
  45. package/lib/Tabs.d.ts +12 -7
  46. package/lib/Tabs.js +27 -13
  47. package/lib/TagsInput.d.ts +15 -2
  48. package/lib/TagsInput.js +27 -9
  49. package/lib/Toast.js +9 -3
  50. package/lib/Tooltip.js +15 -5
  51. package/lib/createStyleContext.d.ts +5 -2
  52. package/lib/createStyleContext.js +4 -10
  53. package/lib/index.d.ts +7 -6
  54. package/lib/index.js +49 -0
  55. package/package.json +3 -3
@@ -9,23 +9,23 @@
9
9
  "justifyContent]___[value:space-between",
10
10
  "background]___[value:surface.default",
11
11
  "cursor]___[value:pointer",
12
- "paddingInline]___[value:medium",
13
- "paddingBlock]___[value:medium",
14
- "boxShadowColor]___[value:stroke.subtle",
15
- "boxShadow]___[value:inset 0 0 0 1px var(--shadow-color)",
16
- "borderRadius]___[value:xsmall",
17
12
  "transitionDuration]___[value:fast",
18
13
  "transitionTimingFunction]___[value:default",
19
14
  "transitionProperty]___[value:background, border-color, border, border-radius",
20
- "width]___[value:100%",
21
15
  "transitionProperty]___[value:background, border-color, border, border-radius]___[cond:_closed",
22
16
  "cursor]___[value:not-allowed]___[cond:_disabled",
23
- "background]___[value:surface..disabled.subtle]___[cond:_disabled",
17
+ "background]___[value:surface.disabled.subtle]___[cond:_disabled",
24
18
  "boxShadowColor]___[value:stroke.disabled]___[cond:_disabled",
25
19
  "color]___[value:text.disabled]___[cond:_disabled",
26
20
  "background]___[value:surface.disabled.subtle]___[cond:_disabled<___>_hover",
27
21
  "boxShadowColor]___[value:stroke.disabled]___[cond:_disabled<___>_hover",
28
22
  "color]___[value:text.disabled]___[cond:_disabled<___>_hover",
23
+ "paddingInline]___[value:medium",
24
+ "paddingBlock]___[value:medium",
25
+ "width]___[value:100%",
26
+ "borderRadius]___[value:xsmall",
27
+ "boxShadowColor]___[value:stroke.subtle",
28
+ "boxShadow]___[value:inset 0 0 0 1px var(--shadow-color)",
29
29
  "background]___[value:surface.actionSubtle.hover]___[cond:_hover",
30
30
  "boxShadowColor]___[value:stroke.hover]___[cond:_hover",
31
31
  "backgroundColor]___[value:surface.actionSubtle.active]___[cond:_open",
@@ -43,22 +43,41 @@
43
43
  "transitionProperty]___[value:padding-bottom",
44
44
  "paddingBlock]___[value:xsmall",
45
45
  "paddingInline]___[value:small",
46
+ "animation]___[value:collapse-in]___[cond:_open",
47
+ "animation]___[value:collapse-out]___[cond:_closed",
46
48
  "borderBottomRadius]___[value:xsmall",
47
49
  "borderWidth]___[value:0 1px 1px",
48
50
  "borderStyle]___[value:solid",
49
51
  "borderColor]___[value:stroke.default",
50
- "animation]___[value:collapse-in]___[cond:_open",
51
- "animation]___[value:collapse-out]___[cond:_closed",
52
+ "marginBlock]___[value:small]___[cond:& li",
53
+ "counterReset]___[value:level1",
54
+ "counterReset]___[value:level1 var(--start, 0)]___[cond:&[data-count='true']",
55
+ "marginInline]___[value:small",
56
+ "counterIncrement]___[value:level1]___[cond:& > li",
57
+ "content]___[value:counter(level1, decimal) '. ']___[cond:& > li<___>_marker",
58
+ "marginInlineStart]___[value:xlarge]___[cond:& > li<___>& > ol:not([data-variant='letters'])",
59
+ "counterReset]___[value:level2]___[cond:& > li<___>& > ol:not([data-variant='letters'])",
60
+ "counterReset]___[value:level2 var(--start, 0)]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>&[data-count='true']",
61
+ "counterIncrement]___[value:level2]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li",
62
+ "content]___[value:counter(level1, decimal) '.' counter(level2, decimal) '. ']___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>_marker",
63
+ "marginInlineStart]___[value:xxlarge]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])",
64
+ "counterReset]___[value:level3]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])",
65
+ "counterReset]___[value:level3 var(--start, 0)]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>&[data-count='true']",
66
+ "counterIncrement]___[value:level3]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > li",
67
+ "content]___[value:counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '. ']___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>_marker",
68
+ "counterReset]___[value:level4]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > ol:not([data-variant='letters'])",
69
+ "counterReset]___[value:level4 var(--start, 0)]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > ol:not([data-variant='letters'])<___>&[data-count='true']",
70
+ "counterIncrement]___[value:level4]___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > ol:not([data-variant='letters'])<___>& > li",
71
+ "content]___[value:counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '.' counter(level4, decimal) '. ']___[cond:& > li<___>& > ol:not([data-variant='letters'])<___>& > li<___>& > ol:not([data-variant='letters'])<___>& > ol:not([data-variant='letters'])<___>& > li<___>_marker",
72
+ "paddingInlineStart]___[value:small",
73
+ "content]___[value:counter(level1, upper-alpha) '. ']___[cond:& > li<___>_marker",
74
+ "content]___[value:counter(level1, lower-alpha) '. ']___[cond:& > li<___>& > ol[data-variant='letters'] > li<___>_marker",
75
+ "content]___[value:counter(level1, lower-roman) '. ']___[cond:& > li<___>& > ol[data-variant='letters'] > li<___>& > ol[data-variant='letters'] > li<___>_marker",
52
76
  "listStyle]___[value:revert",
53
77
  "listStylePosition]___[value:inside",
54
- "paddingInlineStart]___[value:small",
55
- "marginBlock]___[value:small]___[cond:& li",
56
- "content]___[value:counters(list-item, '.') '. ']___[cond:& > li<___>_marker",
57
- "content]___[value:counter(list-item, numeric) '. ']___[cond:& ol[data-variant='numbers'] > li<___>_marker",
58
- "content]___[value:counter(list-item, upper-alpha) '. ']___[cond:& li<___>_marker",
59
- "content]___[value:counter(list-item, lower-alpha) '. ']___[cond:& li<___>& > ol > li<___>_marker",
60
- "content]___[value:counter(list-item, lower-roman) '. ']___[cond:& li<___>& > ol > li<___>& li<___>_marker",
78
+ "paddingInlineStart]___[value:medium",
61
79
  "color]___[value:icon.strong]___[cond:& li<___>_marker",
80
+ "display]___[value:inline]___[cond:& li > *:not(ol, ul, li)",
62
81
  "fontWeight]___[value:bold]___[cond:& dt",
63
82
  "marginInlineStart]___[value:medium]___[cond:& dd",
64
83
  "paddingInline]___[value:xsmall",
@@ -303,7 +322,6 @@
303
322
  "left]___[value:auto",
304
323
  "marginBlock]___[value:xsmall",
305
324
  "paddingInlineEnd]___[value:medium",
306
- "paddingInlineStart]___[value:medium",
307
325
  "paddingInlineStart]___[value:0",
308
326
  "paddingInlineEnd]___[value:0",
309
327
  "borderRadius]___[value:small",
@@ -479,7 +497,6 @@
479
497
  "textAlign]___[value:right]___[cond:& td, & th<___>&[data-align='right']",
480
498
  "flexDirection]___[value:column]___[cond:_horizontal",
481
499
  "flexDirection]___[value:row]___[cond:_vertical",
482
- "overflow]___[value:auto",
483
500
  "marginBlockEnd]___[value:-1px]___[cond:_horizontal",
484
501
  "marginInlineEnd]___[value:-1px]___[cond:_vertical",
485
502
  "transitionProperty]___[value:color, background, border-color",
@@ -507,6 +524,20 @@
507
524
  "paddingBlockStart]___[value:xsmall]___[cond:_horizontal",
508
525
  "paddingInlineStart]___[value:xsmall]___[cond:_vertical",
509
526
  "boxShadow]___[value:0 0 0 3px var(--shadow-color)]___[cond:_focusVisible",
527
+ "outline]___[value:3px solid",
528
+ "outlineColor]___[value:stroke.default",
529
+ "outlineOffset]___[value:-3px",
530
+ "height]___[value:var(--height)]___[cond:_peerFocusVisible",
531
+ "width]___[value:var(--width)]___[cond:_peerFocusVisible",
532
+ "borderTopRadius]___[value:xsmall]___[cond:_peerFocusVisible<___>_horizontal",
533
+ "borderRightRadius]___[value:xsmall]___[cond:_peerFocusVisible<___>_vertical",
534
+ "top]___[value:calc(var(--top) + var(--height) - 6px)]___[cond:_horizontal",
535
+ "top]___[value:var(--top)]___[cond:_horizontal<___>_peerFocusVisible",
536
+ "height]___[value:3]___[cond:_horizontal",
537
+ "width]___[value:var(--width)]___[cond:_horizontal",
538
+ "height]___[value:var(--height)]___[cond:_vertical",
539
+ "left]___[value:0]___[cond:_vertical",
540
+ "width]___[value:3]___[cond:_vertical",
510
541
  "width]___[value:full",
511
542
  "gap]___[value:1",
512
543
  "paddingInlineEnd]___[value:3xsmall",
@@ -543,7 +574,9 @@
543
574
  "right]___[value:xxsmall",
544
575
  "paddingInline]___[value:xxsmall",
545
576
  "--arrow-size]___[value:spacing.xxsmall",
546
- "--arrow-background]___[value:colors.surface.action"
577
+ "--arrow-background]___[value:colors.surface.action",
578
+ "height]___[value:200px",
579
+ "objectFit]___[value:cover"
547
580
  ],
548
581
  "recipes": {}
549
582
  }
package/dist/styles.css CHANGED
@@ -109,20 +109,20 @@
109
109
  padding-block: var(--spacing-medium);
110
110
  }
111
111
 
112
- .bx-sh-c_stroke\.subtle {
113
- --shadow-color: var(--colors-stroke-subtle);
114
- }
115
-
116
- .bx-sh_inset_0_0_0_1px_var\(--shadow-color\) {
117
- box-shadow: inset 0 0 0 1px var(--shadow-color);
112
+ .w_100\% {
113
+ width: 100%;
118
114
  }
119
115
 
120
116
  .bdr_xsmall {
121
117
  border-radius: var(--radii-xsmall);
122
118
  }
123
119
 
124
- .w_100\% {
125
- width: 100%;
120
+ .bx-sh-c_stroke\.subtle {
121
+ --shadow-color: var(--colors-stroke-subtle);
122
+ }
123
+
124
+ .bx-sh_inset_0_0_0_1px_var\(--shadow-color\) {
125
+ box-shadow: inset 0 0 0 1px var(--shadow-color);
126
126
  }
127
127
 
128
128
  .c_icon\.strong {
@@ -150,14 +150,26 @@
150
150
  border-bottom-right-radius: var(--radii-xsmall);
151
151
  }
152
152
 
153
- .li-s_revert {
154
- list-style: revert;
153
+ .counter-reset_level1 {
154
+ counter-reset: level1;
155
+ }
156
+
157
+ .mx_small {
158
+ margin-inline: var(--spacing-small);
155
159
  }
156
160
 
157
161
  .ps_small {
158
162
  padding-inline-start: var(--spacing-small);
159
163
  }
160
164
 
165
+ .li-s_revert {
166
+ list-style: revert;
167
+ }
168
+
169
+ .ps_medium {
170
+ padding-inline-start: var(--spacing-medium);
171
+ }
172
+
161
173
  .px_xsmall {
162
174
  padding-inline: var(--spacing-xsmall);
163
175
  }
@@ -520,10 +532,6 @@
520
532
  padding-inline-end: var(--spacing-medium);
521
533
  }
522
534
 
523
- .ps_medium {
524
- padding-inline-start: var(--spacing-medium);
525
- }
526
-
527
535
  .ps_0 {
528
536
  padding-inline-start: 0;
529
537
  }
@@ -748,14 +756,18 @@
748
756
  table-layout: fixed;
749
757
  }
750
758
 
751
- .ov_auto {
752
- overflow: auto;
753
- }
754
-
755
759
  .white-space_nowrap {
756
760
  white-space: nowrap;
757
761
  }
758
762
 
763
+ .ring_3px_solid {
764
+ outline: 3px solid;
765
+ }
766
+
767
+ .ring-o_-3px {
768
+ outline-offset: -3px;
769
+ }
770
+
759
771
  .w_full {
760
772
  width: full;
761
773
  }
@@ -832,6 +844,14 @@
832
844
  --arrow-background: var(--colors-surface-action);
833
845
  }
834
846
 
847
+ .h_200px {
848
+ height: 200px;
849
+ }
850
+
851
+ .obj-f_cover {
852
+ object-fit: cover;
853
+ }
854
+
835
855
  .flex-d_column {
836
856
  flex-direction: column;
837
857
  }
@@ -1092,6 +1112,10 @@
1092
1112
  border-width: 1px;
1093
1113
  }
1094
1114
 
1115
+ .ring-c_stroke\.default {
1116
+ outline-color: var(--colors-stroke-default);
1117
+ }
1118
+
1095
1119
  .ring-c_transparent {
1096
1120
  outline-color: transparent;
1097
1121
  }
@@ -1131,8 +1155,8 @@
1131
1155
  cursor: not-allowed;
1132
1156
  }
1133
1157
 
1134
- .disabled\:bg_surface\.\.disabled\.subtle:is(:disabled, [disabled], [data-disabled]) {
1135
- background: surface..disabled.subtle;
1158
+ .disabled\:bg_surface\.disabled\.subtle:is(:disabled, [disabled], [data-disabled]) {
1159
+ background: var(--colors-surface-disabled-subtle);
1136
1160
  }
1137
1161
 
1138
1162
  .disabled\:bx-sh-c_stroke\.disabled:is(:disabled, [disabled], [data-disabled]) {
@@ -1168,6 +1192,18 @@
1168
1192
  margin-block: var(--spacing-small);
1169
1193
  }
1170
1194
 
1195
+ .\[\&\[data-count\=\'true\'\]\]\:counter-reset_level1_var\(--start\,_0\)[data-count='true'] {
1196
+ counter-reset: level1 var(--start, 0);
1197
+ }
1198
+
1199
+ .\[\&_\>_li\]\:counter-increment_level1 > li {
1200
+ counter-increment: level1;
1201
+ }
1202
+
1203
+ .\[\&_li_\>_\*\:not\(ol\,_ul\,_li\)\]\:d_inline li > *:not(ol, ul, li) {
1204
+ display: inline;
1205
+ }
1206
+
1171
1207
  .\[\&_dd\]\:ms_medium dd {
1172
1208
  margin-inline-start: var(--spacing-medium);
1173
1209
  }
@@ -1489,6 +1525,22 @@
1489
1525
  padding-inline-start: var(--spacing-xsmall);
1490
1526
  }
1491
1527
 
1528
+ .horizontal\:h_3[data-orientation=horizontal] {
1529
+ height: var(--sizes-3);
1530
+ }
1531
+
1532
+ .horizontal\:w_var\(--width\)[data-orientation=horizontal] {
1533
+ width: var(--width);
1534
+ }
1535
+
1536
+ .vertical\:h_var\(--height\)[data-orientation=vertical] {
1537
+ height: var(--height);
1538
+ }
1539
+
1540
+ .vertical\:w_3[data-orientation=vertical] {
1541
+ width: var(--sizes-3);
1542
+ }
1543
+
1492
1544
  .highlighted\:ring-o_-1px[data-highlighted] {
1493
1545
  outline-offset: -1px;
1494
1546
  }
@@ -1629,6 +1681,14 @@
1629
1681
  border-color: var(--colors-stroke-subtle);
1630
1682
  }
1631
1683
 
1684
+ .horizontal\:top_calc\(var\(--top\)_\+_var\(--height\)_-_6px\)[data-orientation=horizontal] {
1685
+ top: calc(var(--top) + var(--height) - 6px);
1686
+ }
1687
+
1688
+ .vertical\:left_0[data-orientation=vertical] {
1689
+ left: 0;
1690
+ }
1691
+
1632
1692
  .highlighted\:bg-c_surface\.actionSubtle\.hover[data-highlighted] {
1633
1693
  background-color: var(--colors-surface-action-subtle-hover);
1634
1694
  }
@@ -1743,6 +1803,14 @@
1743
1803
  box-shadow: 0 0 0 3px var(--shadow-color);
1744
1804
  }
1745
1805
 
1806
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:h_var\(--height\) {
1807
+ height: var(--height);
1808
+ }
1809
+
1810
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:w_var\(--width\) {
1811
+ width: var(--width);
1812
+ }
1813
+
1746
1814
  .focus\:ring-c_stroke\.default:is(:focus, [data-focus]) {
1747
1815
  outline-color: var(--colors-stroke-default);
1748
1816
  }
@@ -1903,6 +1971,14 @@
1903
1971
  color: var(--colors-text-disabled);
1904
1972
  }
1905
1973
 
1974
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:ms_xlarge > li > ol:not([data-variant='letters']) {
1975
+ margin-inline-start: var(--spacing-xlarge);
1976
+ }
1977
+
1978
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:counter-reset_level2 > li > ol:not([data-variant='letters']) {
1979
+ counter-reset: level2;
1980
+ }
1981
+
1906
1982
  .\[\&_li\]\:marker\:c_icon\.strong li::marker {
1907
1983
  color: var(--colors-icon-strong);
1908
1984
  }
@@ -2047,20 +2123,26 @@
2047
2123
  color: var(--colors-text-subtle);
2048
2124
  }
2049
2125
 
2050
- .highlighted\:\[\&_svg\]\:c_stroke\.hover[data-highlighted] svg {
2051
- color: var(--colors-stroke-hover);
2126
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:horizontal\:bdr-t_xsmall[data-orientation=horizontal] {
2127
+ border-top-left-radius: var(--radii-xsmall);
2128
+ border-top-right-radius: var(--radii-xsmall);
2129
+ }
2130
+
2131
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .peerFocusVisible\:vertical\:bdr-r_xsmall[data-orientation=vertical] {
2132
+ border-top-right-radius: var(--radii-xsmall);
2133
+ border-bottom-right-radius: var(--radii-xsmall);
2052
2134
  }
2053
2135
 
2054
- .\[\&_\>_li\]\:marker\:content_counters\(list-item\,_\'\.\'\)_\'\._\' > li::marker {
2055
- content: counters(list-item, '.') '. ';
2136
+ .highlighted\:\[\&_svg\]\:c_stroke\.hover[data-highlighted] svg {
2137
+ color: var(--colors-stroke-hover);
2056
2138
  }
2057
2139
 
2058
- .\[\&_ol\[data-variant\=\'numbers\'\]_\>_li\]\:marker\:content_counter\(list-item\,_numeric\)_\'\._\' ol[data-variant='numbers'] > li::marker {
2059
- content: counter(list-item, numeric) '. ';
2140
+ .\[\&_\>_li\]\:marker\:content_counter\(level1\,_decimal\)_\'\._\' > li::marker {
2141
+ content: counter(level1, decimal) '. ';
2060
2142
  }
2061
2143
 
2062
- .\[\&_li\]\:marker\:content_counter\(list-item\,_upper-alpha\)_\'\._\' li::marker {
2063
- content: counter(list-item, upper-alpha) '. ';
2144
+ .\[\&_\>_li\]\:marker\:content_counter\(level1\,_upper-alpha\)_\'\._\' > li::marker {
2145
+ content: counter(level1, upper-alpha) '. ';
2064
2146
  }
2065
2147
 
2066
2148
  .disabled\:hover\:bd-c_stroke\.disabled:is(:disabled, [disabled], [data-disabled]):is(:hover, [data-hover]) {
@@ -2119,6 +2201,10 @@
2119
2201
  border-right-color: transparent;
2120
2202
  }
2121
2203
 
2204
+ .peer:is(:focus-visible, [data-focus-visible]) ~ .horizontal\:peerFocusVisible\:top_var\(--top\)[data-orientation=horizontal] {
2205
+ top: var(--top);
2206
+ }
2207
+
2122
2208
  .focusWithin\:hover\:ring-c_stroke\.default:focus-within:is(:hover, [data-hover]) {
2123
2209
  outline-color: var(--colors-stroke-default);
2124
2210
  }
@@ -2147,6 +2233,14 @@
2147
2233
  border-color: var(--colors-stroke-default);
2148
2234
  }
2149
2235
 
2236
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&\[data-count\=\'true\'\]\]\:counter-reset_level2_var\(--start\,_0\) > li > ol:not([data-variant='letters'])[data-count='true'] {
2237
+ counter-reset: level2 var(--start, 0);
2238
+ }
2239
+
2240
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:counter-increment_level2 > li > ol:not([data-variant='letters']) > li {
2241
+ counter-increment: level2;
2242
+ }
2243
+
2150
2244
  .disabled\:checked\:hover\:c_text\.disabled:is(:disabled, [disabled], [data-disabled]):is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):is(:hover, [data-hover]) {
2151
2245
  color: var(--colors-text-disabled);
2152
2246
  }
@@ -2163,8 +2257,8 @@
2163
2257
  transform: translateX(120%);
2164
2258
  }
2165
2259
 
2166
- .\[\&_li\]\:\[\&_\>_ol_\>_li\]\:marker\:content_counter\(list-item\,_lower-alpha\)_\'\._\' li > ol > li::marker {
2167
- content: counter(list-item, lower-alpha) '. ';
2260
+ .\[\&_\>_li\]\:\[\&_\>_ol\[data-variant\=\'letters\'\]_\>_li\]\:marker\:content_counter\(level1\,_lower-alpha\)_\'\._\' > li > ol[data-variant='letters'] > li::marker {
2261
+ content: counter(level1, lower-alpha) '. ';
2168
2262
  }
2169
2263
 
2170
2264
  .disabled\:checked\:hover\:bd-c_stroke\.disabled:is(:disabled, [disabled], [data-disabled]):is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]):is(:hover, [data-hover]) {
@@ -2183,8 +2277,48 @@
2183
2277
  outline-color: var(--colors-stroke-error);
2184
2278
  }
2185
2279
 
2186
- .\[\&_li\]\:\[\&_\>_ol_\>_li\]\:\[\&_li\]\:marker\:content_counter\(list-item\,_lower-roman\)_\'\._\' li > ol > li li::marker {
2187
- content: counter(list-item, lower-roman) '. ';
2280
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:ms_xxlarge > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) {
2281
+ margin-inline-start: var(--spacing-xxlarge);
2282
+ }
2283
+
2284
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:counter-reset_level3 > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) {
2285
+ counter-reset: level3;
2286
+ }
2287
+
2288
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:marker\:content_counter\(level1\,_decimal\)_\'\.\'_counter\(level2\,_decimal\)_\'\._\' > li > ol:not([data-variant='letters']) > li::marker {
2289
+ content: counter(level1, decimal) '.' counter(level2, decimal) '. ';
2290
+ }
2291
+
2292
+ .\[\&_\>_li\]\:\[\&_\>_ol\[data-variant\=\'letters\'\]_\>_li\]\:\[\&_\>_ol\[data-variant\=\'letters\'\]_\>_li\]\:marker\:content_counter\(level1\,_lower-roman\)_\'\._\' > li > ol[data-variant='letters'] > li > ol[data-variant='letters'] > li::marker {
2293
+ content: counter(level1, lower-roman) '. ';
2294
+ }
2295
+
2296
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&\[data-count\=\'true\'\]\]\:counter-reset_level3_var\(--start\,_0\) > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters'])[data-count='true'] {
2297
+ counter-reset: level3 var(--start, 0);
2298
+ }
2299
+
2300
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:counter-increment_level3 > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > li {
2301
+ counter-increment: level3;
2302
+ }
2303
+
2304
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:counter-reset_level4 > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > ol:not([data-variant='letters']) {
2305
+ counter-reset: level4;
2306
+ }
2307
+
2308
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&\[data-count\=\'true\'\]\]\:counter-reset_level4_var\(--start\,_0\) > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > ol:not([data-variant='letters'])[data-count='true'] {
2309
+ counter-reset: level4 var(--start, 0);
2310
+ }
2311
+
2312
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:counter-increment_level4 > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > ol:not([data-variant='letters']) > li {
2313
+ counter-increment: level4;
2314
+ }
2315
+
2316
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:marker\:content_counter\(level1\,_decimal\)_\'\.\'_counter\(level2\,_decimal\)_\'\.\'_counter\(level3\,_decimal\)_\'\._\' > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > li::marker {
2317
+ content: counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '. ';
2318
+ }
2319
+
2320
+ .\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_ol\:not\(\[data-variant\=\'letters\'\]\)\]\:\[\&_\>_li\]\:marker\:content_counter\(level1\,_decimal\)_\'\.\'_counter\(level2\,_decimal\)_\'\.\'_counter\(level3\,_decimal\)_\'\.\'_counter\(level4\,_decimal\)_\'\._\' > li > ol:not([data-variant='letters']) > li > ol:not([data-variant='letters']) > ol:not([data-variant='letters']) > li::marker {
2321
+ content: counter(level1, decimal) '.' counter(level2, decimal) '.' counter(level3, decimal) '.' counter(level4, decimal) '. ';
2188
2322
  }
2189
2323
 
2190
2324
  @media screen and (min-width: 37.5625rem) {
package/es/Accordion.js CHANGED
@@ -23,21 +23,15 @@ const accordionRecipe = sva({
23
23
  justifyContent: "space-between",
24
24
  background: "surface.default",
25
25
  cursor: "pointer",
26
- paddingInline: "medium",
27
- paddingBlock: "medium",
28
- boxShadowColor: "stroke.subtle",
29
- boxShadow: "inset 0 0 0 1px var(--shadow-color)",
30
- borderRadius: "xsmall",
31
26
  transitionDuration: "fast",
32
27
  transitionTimingFunction: "default",
33
28
  transitionProperty: "background, border-color, border, border-radius",
34
- width: "100%",
35
29
  _closed: {
36
30
  transitionProperty: "background, border-color, border, border-radius"
37
31
  },
38
32
  _disabled: {
39
33
  cursor: "not-allowed",
40
- background: "surface..disabled.subtle",
34
+ background: "surface.disabled.subtle",
41
35
  boxShadowColor: "stroke.disabled",
42
36
  color: "text.disabled",
43
37
  _hover: {
@@ -45,20 +39,6 @@ const accordionRecipe = sva({
45
39
  boxShadowColor: "stroke.disabled",
46
40
  color: "text.disabled"
47
41
  }
48
- },
49
- _hover: {
50
- background: "surface.actionSubtle.hover",
51
- boxShadowColor: "stroke.hover"
52
- },
53
- _open: {
54
- backgroundColor: "surface.actionSubtle.active",
55
- boxShadowColor: "stroke.default",
56
- borderBottomRadius: "sharp"
57
- },
58
- _focusVisible: {
59
- outline: "none",
60
- boxShadowColor: "stroke.default",
61
- boxShadow: "inset 0 0 0 2px var(--shadow-color)"
62
42
  }
63
43
  },
64
44
  itemIndicator: {
@@ -73,21 +53,59 @@ const accordionRecipe = sva({
73
53
  },
74
54
  itemContent: {
75
55
  overflow: "hidden",
56
+ // TODO: Is this needed?
76
57
  transitionProperty: "padding-bottom",
77
58
  transitionDuration: "normal",
78
59
  transitionTimingFunction: "default",
79
60
  paddingBlock: "xsmall",
80
61
  paddingInline: "small",
81
- borderBottomRadius: "xsmall",
82
- borderWidth: "0 1px 1px",
83
- borderStyle: "solid",
84
- borderColor: "stroke.default",
85
62
  _open: {
86
63
  animation: "collapse-in"
87
64
  },
88
65
  _closed: {
89
66
  animation: "collapse-out"
90
67
  }
68
+ },
69
+ item: {
70
+ width: "100%"
71
+ }
72
+ },
73
+ defaultVariants: {
74
+ variant: "bordered"
75
+ },
76
+ variants: {
77
+ variant: {
78
+ clean: {},
79
+ bordered: {
80
+ itemTrigger: {
81
+ paddingInline: "medium",
82
+ paddingBlock: "medium",
83
+ width: "100%",
84
+ borderRadius: "xsmall",
85
+ boxShadowColor: "stroke.subtle",
86
+ boxShadow: "inset 0 0 0 1px var(--shadow-color)",
87
+ _hover: {
88
+ background: "surface.actionSubtle.hover",
89
+ boxShadowColor: "stroke.hover"
90
+ },
91
+ _open: {
92
+ backgroundColor: "surface.actionSubtle.active",
93
+ boxShadowColor: "stroke.default",
94
+ borderBottomRadius: "sharp"
95
+ },
96
+ _focusVisible: {
97
+ outline: "none",
98
+ boxShadowColor: "stroke.default",
99
+ boxShadow: "inset 0 0 0 2px var(--shadow-color)"
100
+ }
101
+ },
102
+ itemContent: {
103
+ borderBottomRadius: "xsmall",
104
+ borderWidth: "0 1px 1px",
105
+ borderStyle: "solid",
106
+ borderColor: "stroke.default"
107
+ }
108
+ }
91
109
  }
92
110
  }
93
111
  });
@@ -95,8 +113,18 @@ const {
95
113
  withProvider,
96
114
  withContext
97
115
  } = createStyleContext(accordionRecipe);
98
- export const AccordionRoot = withProvider(Accordion.Root, "root");
99
- export const AccordionItemContent = withContext(Accordion.ItemContent, "itemContent");
100
- export const AccordionItemIndicator = withContext(Accordion.ItemIndicator, "itemIndicator");
101
- export const AccordionItem = withContext(Accordion.Item, "item");
102
- export const AccordionItemTrigger = withContext(Accordion.ItemTrigger, "itemTrigger");
116
+ export const AccordionRoot = withProvider(Accordion.Root, "root", {
117
+ baseComponent: true
118
+ });
119
+ export const AccordionItemContent = withContext(Accordion.ItemContent, "itemContent", {
120
+ baseComponent: true
121
+ });
122
+ export const AccordionItemIndicator = withContext(Accordion.ItemIndicator, "itemIndicator", {
123
+ baseComponent: true
124
+ });
125
+ export const AccordionItem = withContext(Accordion.Item, "item", {
126
+ baseComponent: true
127
+ });
128
+ export const AccordionItemTrigger = withContext(Accordion.ItemTrigger, "itemTrigger", {
129
+ baseComponent: true
130
+ });