@bccampus/ui-components 0.9.5 → 0.9.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.
@@ -44,7 +44,8 @@ const buttonVariants = cva(
44
44
  );
45
45
  function Button({ className, variant, size, block, icon, asChild = false, ...props }) {
46
46
  const Comp = asChild ? Slot : "button";
47
- return /* @__PURE__ */ jsx(Comp, { "data-slot": "button", className: cn(buttonVariants({ size, block, variant, icon }), className), ...props });
47
+ const dataSlot = icon ? "button-icon" : `${variant ?? "default"}`;
48
+ return /* @__PURE__ */ jsx(Comp, { "data-slot": dataSlot, className: cn(buttonVariants({ size, block, variant, icon }), className), ...props });
48
49
  }
49
50
  export {
50
51
  Button,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bccampus/ui-components",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "BCcampus React components",
5
5
  "type": "module",
6
6
  "exports": {
@@ -54,8 +54,8 @@ export interface ButtonProps extends React.ComponentProps<"button">, ButtonVaria
54
54
 
55
55
  export function Button({ className, variant, size, block, icon, asChild = false, ...props }: ButtonProps) {
56
56
  const Comp = asChild ? Slot : "button";
57
-
57
+ const dataSlot = icon ? "button-icon" : `${variant ?? "default"}`;
58
58
  return (
59
- <Comp data-slot="button" className={cn(buttonVariants({ size, block, variant, icon }), className)} {...props} />
59
+ <Comp data-slot={dataSlot} className={cn(buttonVariants({ size, block, variant, icon }), className)} {...props} />
60
60
  );
61
61
  }
@@ -66,17 +66,6 @@
66
66
  a {
67
67
  @apply underline underline-offset-4 rounded-xs;
68
68
 
69
- &[href^="http"]::after,
70
- &.external::after {
71
- @apply bg-current inline-block w-3.5 h-3.5 ml-1 mr-1;
72
-
73
- content: "";
74
- mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWV4dGVybmFsLWxpbmstaWNvbiBsdWNpZGUtZXh0ZXJuYWwtbGluayI+PHBhdGggZD0iTTE1IDNoNnY2Ii8+PHBhdGggZD0iTTEwIDE0IDIxIDMiLz48cGF0aCBkPSJNMTggMTN2NmEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMlY4YTIgMiAwIDAgMSAyLTJoNiIvPjwvc3ZnPg==");
75
- mask-position: bottom center;
76
- mask-repeat: no-repeat;
77
- mask-size: contain;
78
- }
79
-
80
69
  &:hover,
81
70
  &:focus-visible {
82
71
  @apply outline-ring outline-offset-2 outline-solid outline-2;
@@ -91,6 +80,17 @@
91
80
  }
92
81
  }
93
82
 
83
+ a:not([data-slot="button-icon"], .no-external)[href^="http"]::after,
84
+ .external::after {
85
+ @apply bg-current inline-block w-4 h-4 ml-1 mr-1 -mb-0.75;
86
+
87
+ content: "";
88
+ mask: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWV4dGVybmFsLWxpbmstaWNvbiBsdWNpZGUtZXh0ZXJuYWwtbGluayI+PHBhdGggZD0iTTE1IDNoNnY2Ii8+PHBhdGggZD0iTTEwIDE0IDIxIDMiLz48cGF0aCBkPSJNMTggMTN2NmEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMlY4YTIgMiAwIDAgMSAyLTJoNiIvPjwvc3ZnPg==");
89
+ mask-position: bottom center;
90
+ mask-repeat: no-repeat;
91
+ mask-size: contain;
92
+ }
93
+
94
94
  .bcc-typography {
95
95
  blockquote {
96
96
  @apply text-primary font-sans-accent mx-4 my-6;