academe-kit 0.1.2 → 0.1.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "academe-kit",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "A React component library with Tailwind CSS and Storybook",
6
6
  "main": "dist/index.js",
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
- variant?: 'primary' | 'secondary' | 'outline';
4
- size?: 'sm' | 'md' | 'lg';
5
- children: React.ReactNode;
6
- }
7
- export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,2 +0,0 @@
1
- export { Button } from './Button';
2
- export type { ButtonProps } from './Button';
@@ -1,7 +0,0 @@
1
- type ProtectedAppProps = {
2
- children: React.ReactElement;
3
- requiredClientRoles?: string[];
4
- unauthorizedMessage?: string;
5
- };
6
- export declare const ProtectedApp: React.FC<ProtectedAppProps>;
7
- export {};
@@ -1,6 +0,0 @@
1
- type ProtectedRouterProps = {
2
- children: React.ReactElement;
3
- requiredClientRoles: string[];
4
- };
5
- export declare const ProtectedComponent: React.FC<ProtectedRouterProps>;
6
- export {};
@@ -1,7 +0,0 @@
1
- type ProtectedRouterProps = {
2
- children: React.ReactElement;
3
- requiredClientRoles?: string[];
4
- unauthorizedMessage?: string;
5
- };
6
- export declare const ProtectedRouter: React.FC<ProtectedRouterProps>;
7
- export {};
@@ -1,2 +0,0 @@
1
- declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
2
- export { Spinner };
@@ -1,8 +0,0 @@
1
- import { SecurityContextType, AcademeKeycloakContextProps } from "./types";
2
- export declare const AcademeAuthProvider: React.FC<AcademeKeycloakContextProps>;
3
- declare global {
4
- interface Window {
5
- accessToken?: string;
6
- }
7
- }
8
- export declare const useAcademeAuth: () => SecurityContextType;
@@ -1,27 +0,0 @@
1
- import { KeycloakLoginOptions, KeycloakPromise } from 'keycloak-js';
2
- export type AcademeKeycloakContextProps = {
3
- realm: string;
4
- hubUrl: string;
5
- clientId: string;
6
- keycloakUrl: string;
7
- children: React.ReactElement;
8
- };
9
- export type SecurityProviderProps = {
10
- hubUrl: string;
11
- children: React.ReactElement;
12
- };
13
- export type KeycloakUser = {
14
- name: string;
15
- lastName: string;
16
- email: string;
17
- };
18
- export type SecurityContextType = {
19
- isInitialized: boolean;
20
- isAuthenticated: () => boolean;
21
- signOut: () => void | null;
22
- redirectToHub: (errorMessage: string) => void | null;
23
- goToLogin: (options?: KeycloakLoginOptions | undefined) => KeycloakPromise<void, void> | null;
24
- getUser: () => KeycloakUser;
25
- hasRealmRole: (role: string) => boolean;
26
- hasClientRole: (role: string, resource?: string) => boolean;
27
- };
@@ -1,2 +0,0 @@
1
- import { type ClassValue } from "clsx";
2
- export declare function cn(...inputs: ClassValue[]): string;