@ndla/primitives 0.0.4 → 0.0.6

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.
@@ -124,7 +124,8 @@
124
124
  "paddingBlock]___[value:3xsmall",
125
125
  "lineHeight]___[value:1",
126
126
  "minHeight]___[value:unset",
127
- "height]___[value:fit-content",
127
+ "height]___[value:xxlarge",
128
+ "width]___[value:xxlarge",
128
129
  "marginInline]___[value:0]___[cond:& svg",
129
130
  "marginBlock]___[value:0]___[cond:& svg",
130
131
  "width]___[value:medium]___[cond:& svg",
@@ -390,8 +391,6 @@
390
391
  "marginInline]___[value:auto",
391
392
  "borderWidth]___[value:4px",
392
393
  "borderWidth]___[value:8px",
393
- "height]___[value:xxlarge",
394
- "width]___[value:xxlarge",
395
394
  "background]___[value:surface.disabled.strong",
396
395
  "padding]___[value:1",
397
396
  "borderRadius]___[value:medium",
package/dist/styles.css CHANGED
@@ -263,8 +263,12 @@
263
263
  min-height: unset;
264
264
  }
265
265
 
266
- .h_fit-content {
267
- height: fit-content;
266
+ .h_xxlarge {
267
+ height: var(--sizes-xxlarge);
268
+ }
269
+
270
+ .w_xxlarge {
271
+ width: var(--sizes-xxlarge);
268
272
  }
269
273
 
270
274
  .select_none {
@@ -700,14 +704,6 @@
700
704
  margin-inline: auto;
701
705
  }
702
706
 
703
- .h_xxlarge {
704
- height: var(--sizes-xxlarge);
705
- }
706
-
707
- .w_xxlarge {
708
- width: var(--sizes-xxlarge);
709
- }
710
-
711
707
  .bg_surface\.disabled\.strong {
712
708
  background: var(--colors-surface-disabled-strong);
713
709
  }
package/es/Button.js CHANGED
@@ -165,7 +165,8 @@ export const iconButtonRecipe = cva({
165
165
  base: {
166
166
  lineHeight: "1",
167
167
  minHeight: "unset",
168
- height: "fit-content",
168
+ height: "xxlarge",
169
+ width: "xxlarge",
169
170
  "& svg": {
170
171
  marginInline: "0",
171
172
  marginBlock: "0",
package/es/Checkbox.js CHANGED
@@ -28,6 +28,11 @@ const checkboxRecipe = sva({
28
28
  }
29
29
  }
30
30
  },
31
+ group: {
32
+ display: "flex",
33
+ gap: "xxsmall",
34
+ flexDirection: "column"
35
+ },
31
36
  control: {
32
37
  display: "flex",
33
38
  alignItems: "center",
@@ -224,4 +229,5 @@ export const CheckboxLabel = _ref => {
224
229
  });
225
230
  };
226
231
  export const CheckboxControl = withContext(Checkbox.Control, "control");
232
+ export const CheckboxGroup = withProvider(Checkbox.Group, "group");
227
233
  export const CheckboxHiddenInput = Checkbox.HiddenInput;
package/lib/Button.js CHANGED
@@ -171,7 +171,8 @@ const iconButtonRecipe = exports.iconButtonRecipe = (0, _css.cva)({
171
171
  base: {
172
172
  lineHeight: "1",
173
173
  minHeight: "unset",
174
- height: "fit-content",
174
+ height: "xxlarge",
175
+ width: "xxlarge",
175
176
  "& svg": {
176
177
  marginInline: "0",
177
178
  marginBlock: "0",
package/lib/Checkbox.d.ts CHANGED
@@ -178,5 +178,8 @@ export declare const CheckboxLabel: ({ textStyle, children, ...props }: Checkbox
178
178
  export declare const CheckboxControl: import("react").ForwardRefExoticComponent<{
179
179
  forwardCssProp?: boolean | undefined;
180
180
  } & import("@ndla/styled-system/types").WithCss & Checkbox.ControlProps & import("react").RefAttributes<HTMLDivElement>>;
181
+ export declare const CheckboxGroup: import("react").ForwardRefExoticComponent<{
182
+ forwardCssProp?: boolean | undefined;
183
+ } & import("@ndla/styled-system/types").WithCss & Checkbox.GroupProps & import("react").RefAttributes<HTMLDivElement>>;
181
184
  export declare const CheckboxHiddenInput: import("react").ForwardRefExoticComponent<Checkbox.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
182
185
  export {};
package/lib/Checkbox.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CheckboxRoot = exports.CheckboxLabel = exports.CheckboxIndicator = exports.CheckboxHiddenInput = exports.CheckboxControl = void 0;
6
+ exports.CheckboxRoot = exports.CheckboxLabel = exports.CheckboxIndicator = exports.CheckboxHiddenInput = exports.CheckboxGroup = exports.CheckboxControl = void 0;
7
7
  var _anatomy = require("@ark-ui/anatomy");
8
8
  var _react = require("@ark-ui/react");
9
9
  var _css = require("@ndla/styled-system/css");
@@ -34,6 +34,11 @@ const checkboxRecipe = (0, _css.sva)({
34
34
  }
35
35
  }
36
36
  },
37
+ group: {
38
+ display: "flex",
39
+ gap: "xxsmall",
40
+ flexDirection: "column"
41
+ },
37
42
  control: {
38
43
  display: "flex",
39
44
  alignItems: "center",
@@ -231,4 +236,5 @@ const CheckboxLabel = _ref => {
231
236
  };
232
237
  exports.CheckboxLabel = CheckboxLabel;
233
238
  const CheckboxControl = exports.CheckboxControl = withContext(_react.Checkbox.Control, "control");
239
+ const CheckboxGroup = exports.CheckboxGroup = withProvider(_react.Checkbox.Group, "group");
234
240
  const CheckboxHiddenInput = exports.CheckboxHiddenInput = _react.Checkbox.HiddenInput;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/primitives",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Primitive components for NDLA",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "8f0469f768ed618830dea90b36b92b0d4bb20639"
47
+ "gitHead": "4110ea1c6d36be95a99f4c1b47f8cf3b5c4ccb8b"
48
48
  }