@ndla/primitives 1.0.107-alpha.0 → 1.0.108-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.
@@ -110,6 +110,7 @@
110
110
  "backgroundColor]___[value:surface.brand.3.subtle",
111
111
  "borderColor]___[value:surface.brand.3.strong",
112
112
  "backgroundColor]___[value:surface.infoSubtle",
113
+ "borderColor]___[value:stroke.info",
113
114
  "backgroundColor]___[value:surface.dangerSubtle",
114
115
  "borderColor]___[value:surface.danger",
115
116
  "backgroundColor]___[value:surface.successSubtle",
package/dist/styles.css CHANGED
@@ -433,6 +433,10 @@
433
433
  border-color: var(--colors-surface-brand-3-strong);
434
434
  }
435
435
 
436
+ .bd-c_stroke\.info {
437
+ border-color: var(--colors-stroke-info);
438
+ }
439
+
436
440
  .bd-c_surface\.danger {
437
441
  border-color: var(--colors-surface-danger);
438
442
  }
package/es/Badge.mjs CHANGED
@@ -37,7 +37,7 @@ const badgeRecipe = cva({
37
37
  },
38
38
  neutral: {
39
39
  backgroundColor: "surface.infoSubtle",
40
- borderColor: "stroke.default"
40
+ borderColor: "stroke.info"
41
41
  },
42
42
  danger: {
43
43
  backgroundColor: "surface.dangerSubtle",
package/es/Badge.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.mjs","names":[],"sources":["../src/Badge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.default\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;AAcA,MAAM,cAAc,IAAI;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,cAAc,OAAO,IAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,QAAQ,YAAwC,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG,SAAS,QACzG,oBAAC;CAAY,KAAK,IAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CAClG"}
1
+ {"version":3,"file":"Badge.mjs","names":[],"sources":["../src/Badge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.info\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;AAcA,MAAM,cAAc,IAAI;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,cAAc,OAAO,IAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,QAAQ,YAAwC,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG,SAAS,QACzG,oBAAC;CAAY,KAAK,IAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CAClG"}
package/lib/Badge.d.ts CHANGED
@@ -32,7 +32,7 @@ declare const badgeRecipe: import("@ndla/styled-system/types").RecipeRuntimeFn<{
32
32
  };
33
33
  neutral: {
34
34
  backgroundColor: "surface.infoSubtle";
35
- borderColor: "stroke.default";
35
+ borderColor: "stroke.info";
36
36
  };
37
37
  danger: {
38
38
  backgroundColor: "surface.dangerSubtle";
package/lib/Badge.js CHANGED
@@ -43,7 +43,7 @@ const badgeRecipe = (0, __ndla_styled_system_css.cva)({
43
43
  },
44
44
  neutral: {
45
45
  backgroundColor: "surface.infoSubtle",
46
- borderColor: "stroke.default"
46
+ borderColor: "stroke.info"
47
47
  },
48
48
  danger: {
49
49
  backgroundColor: "surface.dangerSubtle",
package/lib/Badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":["ark","css"],"sources":["../src/Badge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.default\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,gDAAkB;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,mDAAqBA,mBAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,+BAAgD,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG,SAAS,QACzG,2CAAC;CAAY,KAAKC,6BAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CAClG"}
1
+ {"version":3,"file":"Badge.js","names":["ark","css"],"sources":["../src/Badge.tsx"],"sourcesContent":["/**\n * Copyright (c) 2024-present, NDLA.\n *\n * This source code is licensed under the GPLv3 license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport { forwardRef } from \"react\";\nimport { type HTMLArkProps, ark } from \"@ark-ui/react\";\nimport { type RecipeVariantProps, css, cva } from \"@ndla/styled-system/css\";\nimport { styled } from \"@ndla/styled-system/jsx\";\nimport type { StyledProps } from \"@ndla/styled-system/types\";\n\nconst badgeRecipe = cva({\n base: {\n paddingInline: \"xsmall\",\n borderRadius: \"xsmall\",\n border: \"1px solid\",\n width: \"fit-content\",\n color: \"text.default\",\n },\n defaultVariants: {\n colorTheme: \"neutral\",\n size: \"medium\",\n },\n variants: {\n size: {\n small: {\n textStyle: \"label.small\",\n },\n medium: {\n textStyle: \"label.medium\",\n },\n },\n colorTheme: {\n brand1: {\n backgroundColor: \"surface.brand.1.moderate\",\n borderColor: \"surface.brand.1.strong\",\n },\n brand2: {\n backgroundColor: \"surface.brand.2.moderate\",\n borderColor: \"surface.brand.2.strong\",\n },\n brand3: {\n backgroundColor: \"surface.brand.3.subtle\",\n borderColor: \"surface.brand.3.strong\",\n },\n neutral: {\n backgroundColor: \"surface.infoSubtle\",\n borderColor: \"stroke.info\",\n },\n danger: {\n backgroundColor: \"surface.dangerSubtle\",\n borderColor: \"surface.danger\",\n },\n success: {\n backgroundColor: \"surface.successSubtle\",\n borderColor: \"surface.success\",\n },\n warning: {\n backgroundColor: \"surface.warningSubtle\",\n borderColor: \"surface.warning\",\n },\n },\n },\n});\n\nexport type BadgeVariantProps = NonNullable<RecipeVariantProps<typeof badgeRecipe>>;\n\nexport type BadgeVariant = NonNullable<BadgeVariantProps>[\"colorTheme\"];\n\nexport interface BadgeProps extends StyledProps, HTMLArkProps<\"div\">, BadgeVariantProps {}\n\nconst StyledBadge = styled(ark.div, {}, { baseComponent: true });\n\nexport const Badge = forwardRef<HTMLDivElement, BadgeProps>(({ colorTheme, size, css: cssProp, ...props }, ref) => (\n <StyledBadge css={css.raw(badgeRecipe.raw({ colorTheme, size }), cssProp)} {...props} ref={ref} />\n));\n"],"mappings":";;;;;;;;;;;;;AAcA,MAAM,gDAAkB;CACtB,MAAM;EACJ,eAAe;EACf,cAAc;EACd,QAAQ;EACR,OAAO;EACP,OAAO;EACR;CACD,iBAAiB;EACf,YAAY;EACZ,MAAM;EACP;CACD,UAAU;EACR,MAAM;GACJ,OAAO,EACL,WAAW,eACZ;GACD,QAAQ,EACN,WAAW,gBACZ;GACF;EACD,YAAY;GACV,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,QAAQ;IACN,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACD,SAAS;IACP,iBAAiB;IACjB,aAAa;IACd;GACF;EACF;CACF,CAAC;AAQF,MAAM,mDAAqBA,mBAAI,KAAK,EAAE,EAAE,EAAE,eAAe,MAAM,CAAC;AAEhE,MAAa,+BAAgD,EAAE,YAAY,MAAM,KAAK,QAAS,GAAG,SAAS,QACzG,2CAAC;CAAY,KAAKC,6BAAI,IAAI,YAAY,IAAI;EAAE;EAAY;EAAM,CAAC,EAAE,QAAQ;CAAE,GAAI;CAAY;EAAO,CAClG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ndla/primitives",
3
3
  "type": "module",
4
- "version": "1.0.107-alpha.0",
4
+ "version": "1.0.108-alpha.0",
5
5
  "description": "Primitive components for NDLA.",
6
6
  "license": "GPL-3.0",
7
7
  "exports": {
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "309cd80387937f245a48b3ffdae75e06995eb5ae"
50
+ "gitHead": "f1af586f4915ff8e7283214ea6173274d82b8357"
51
51
  }