@omnibase/shadcn 0.1.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.
package/dist/index.css ADDED
@@ -0,0 +1,119 @@
1
+ @import "tailwindcss";
2
+
3
+ @custom-variant dark (&:is(.dark *));
4
+
5
+ @theme inline {
6
+ --radius-sm: calc(var(--radius) - 4px);
7
+ --radius-md: calc(var(--radius) - 2px);
8
+ --radius-lg: var(--radius);
9
+ --radius-xl: calc(var(--radius) + 4px);
10
+ --color-background: var(--background);
11
+ --color-foreground: var(--foreground);
12
+ --color-card: var(--card);
13
+ --color-card-foreground: var(--card-foreground);
14
+ --color-popover: var(--popover);
15
+ --color-popover-foreground: var(--popover-foreground);
16
+ --color-primary: var(--primary);
17
+ --color-primary-foreground: var(--primary-foreground);
18
+ --color-secondary: var(--secondary);
19
+ --color-secondary-foreground: var(--secondary-foreground);
20
+ --color-muted: var(--muted);
21
+ --color-muted-foreground: var(--muted-foreground);
22
+ --color-accent: var(--accent);
23
+ --color-accent-foreground: var(--accent-foreground);
24
+ --color-destructive: var(--destructive);
25
+ --color-border: var(--border);
26
+ --color-input: var(--input);
27
+ --color-ring: var(--ring);
28
+ --color-chart-1: var(--chart-1);
29
+ --color-chart-2: var(--chart-2);
30
+ --color-chart-3: var(--chart-3);
31
+ --color-chart-4: var(--chart-4);
32
+ --color-chart-5: var(--chart-5);
33
+ --color-sidebar: var(--sidebar);
34
+ --color-sidebar-foreground: var(--sidebar-foreground);
35
+ --color-sidebar-primary: var(--sidebar-primary);
36
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
37
+ --color-sidebar-accent: var(--sidebar-accent);
38
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
39
+ --color-sidebar-border: var(--sidebar-border);
40
+ --color-sidebar-ring: var(--sidebar-ring);
41
+ }
42
+
43
+ :root {
44
+ --radius: 0.625rem;
45
+ --background: oklch(1 0 0);
46
+ --foreground: oklch(0.145 0 0);
47
+ --card: oklch(1 0 0);
48
+ --card-foreground: oklch(0.145 0 0);
49
+ --popover: oklch(1 0 0);
50
+ --popover-foreground: oklch(0.145 0 0);
51
+ --primary: oklch(0.205 0 0);
52
+ --primary-foreground: oklch(0.985 0 0);
53
+ --secondary: oklch(0.97 0 0);
54
+ --secondary-foreground: oklch(0.205 0 0);
55
+ --muted: oklch(0.97 0 0);
56
+ --muted-foreground: oklch(0.556 0 0);
57
+ --accent: oklch(0.97 0 0);
58
+ --accent-foreground: oklch(0.205 0 0);
59
+ --destructive: oklch(0.577 0.245 27.325);
60
+ --border: oklch(0.922 0 0);
61
+ --input: oklch(0.922 0 0);
62
+ --ring: oklch(0.708 0 0);
63
+ --chart-1: oklch(0.646 0.222 41.116);
64
+ --chart-2: oklch(0.6 0.118 184.704);
65
+ --chart-3: oklch(0.398 0.07 227.392);
66
+ --chart-4: oklch(0.828 0.189 84.429);
67
+ --chart-5: oklch(0.769 0.188 70.08);
68
+ --sidebar: oklch(0.985 0 0);
69
+ --sidebar-foreground: oklch(0.145 0 0);
70
+ --sidebar-primary: oklch(0.205 0 0);
71
+ --sidebar-primary-foreground: oklch(0.985 0 0);
72
+ --sidebar-accent: oklch(0.97 0 0);
73
+ --sidebar-accent-foreground: oklch(0.205 0 0);
74
+ --sidebar-border: oklch(0.922 0 0);
75
+ --sidebar-ring: oklch(0.708 0 0);
76
+ }
77
+
78
+ .dark {
79
+ --background: oklch(0.145 0 0);
80
+ --foreground: oklch(0.985 0 0);
81
+ --card: oklch(0.205 0 0);
82
+ --card-foreground: oklch(0.985 0 0);
83
+ --popover: oklch(0.205 0 0);
84
+ --popover-foreground: oklch(0.985 0 0);
85
+ --primary: oklch(0.922 0 0);
86
+ --primary-foreground: oklch(0.205 0 0);
87
+ --secondary: oklch(0.269 0 0);
88
+ --secondary-foreground: oklch(0.985 0 0);
89
+ --muted: oklch(0.269 0 0);
90
+ --muted-foreground: oklch(0.708 0 0);
91
+ --accent: oklch(0.269 0 0);
92
+ --accent-foreground: oklch(0.985 0 0);
93
+ --destructive: oklch(0.704 0.191 22.216);
94
+ --border: oklch(1 0 0 / 10%);
95
+ --input: oklch(1 0 0 / 15%);
96
+ --ring: oklch(0.556 0 0);
97
+ --chart-1: oklch(0.488 0.243 264.376);
98
+ --chart-2: oklch(0.696 0.17 162.48);
99
+ --chart-3: oklch(0.769 0.188 70.08);
100
+ --chart-4: oklch(0.627 0.265 303.9);
101
+ --chart-5: oklch(0.645 0.246 16.439);
102
+ --sidebar: oklch(0.205 0 0);
103
+ --sidebar-foreground: oklch(0.985 0 0);
104
+ --sidebar-primary: oklch(0.488 0.243 264.376);
105
+ --sidebar-primary-foreground: oklch(0.985 0 0);
106
+ --sidebar-accent: oklch(0.269 0 0);
107
+ --sidebar-accent-foreground: oklch(0.985 0 0);
108
+ --sidebar-border: oklch(1 0 0 / 10%);
109
+ --sidebar-ring: oklch(0.556 0 0);
110
+ }
111
+
112
+ @layer base {
113
+ * {
114
+ @apply border-border outline-ring/50;
115
+ }
116
+ body {
117
+ @apply bg-background text-foreground;
118
+ }
119
+ }
@@ -0,0 +1,52 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow } from '@ory/client-fetch';
3
+ import { Tenant } from '@omnibase/core-js/tenants';
4
+ import { Product } from '@omnibase/core-js/stripe';
5
+
6
+ type FlowType = LoginFlow | RegistrationFlow | RecoveryFlow | VerificationFlow;
7
+ type CustomFormProps = {
8
+ flow: FlowType;
9
+ Header?: React.ReactNode;
10
+ };
11
+ declare function CustomFlowForm({ flow, Header }: CustomFormProps): react_jsx_runtime.JSX.Element;
12
+
13
+ interface SwitchActiveTenantProps {
14
+ /** Array of tenants available to the user */
15
+ tenants: Tenant[];
16
+ /** Currently active tenant ID */
17
+ currentTenantId?: string;
18
+ /** Custom form action to handle tenant switching */
19
+ formAction?: (formData: FormData) => void | Promise<void>;
20
+ /** Placeholder text when no tenant is selected */
21
+ placeholder?: string;
22
+ /** Additional CSS classes */
23
+ className?: string;
24
+ /** Callback fired when tenant selection changes */
25
+ onTenantChange?: (tenantId: string) => void;
26
+ }
27
+ /**
28
+ * SwitchActiveTenant Component
29
+ *
30
+ * A dropdown component that allows users to switch between different tenants.
31
+ * When a tenant is selected, it triggers a form action with the tenant_id in form data.
32
+ *
33
+ * @param tenants - Array of available tenants
34
+ * @param currentTenantId - Currently active tenant ID
35
+ * @param formAction - Custom form action handler
36
+ * @param placeholder - Placeholder text for the select
37
+ * @param className - Additional CSS classes
38
+ * @param onTenantChange - Callback for tenant changes
39
+ */
40
+ declare function SwitchActiveTenant({ tenants, currentTenantId, formAction, placeholder, className, onTenantChange, }: SwitchActiveTenantProps): react_jsx_runtime.JSX.Element;
41
+
42
+ interface PricingTableProps {
43
+ products: Product[];
44
+ selectedPriceId?: string;
45
+ onPriceSelect?: (priceId: string, productId: string) => void;
46
+ className?: string;
47
+ showPricingToggle?: boolean;
48
+ defaultInterval?: "month" | "year";
49
+ }
50
+ declare function PricingTable({ products, selectedPriceId, onPriceSelect, className, showPricingToggle, defaultInterval, }: PricingTableProps): react_jsx_runtime.JSX.Element;
51
+
52
+ export { CustomFlowForm, type CustomFormProps, type FlowType, PricingTable, type PricingTableProps, SwitchActiveTenant, type SwitchActiveTenantProps };
@@ -0,0 +1,52 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow } from '@ory/client-fetch';
3
+ import { Tenant } from '@omnibase/core-js/tenants';
4
+ import { Product } from '@omnibase/core-js/stripe';
5
+
6
+ type FlowType = LoginFlow | RegistrationFlow | RecoveryFlow | VerificationFlow;
7
+ type CustomFormProps = {
8
+ flow: FlowType;
9
+ Header?: React.ReactNode;
10
+ };
11
+ declare function CustomFlowForm({ flow, Header }: CustomFormProps): react_jsx_runtime.JSX.Element;
12
+
13
+ interface SwitchActiveTenantProps {
14
+ /** Array of tenants available to the user */
15
+ tenants: Tenant[];
16
+ /** Currently active tenant ID */
17
+ currentTenantId?: string;
18
+ /** Custom form action to handle tenant switching */
19
+ formAction?: (formData: FormData) => void | Promise<void>;
20
+ /** Placeholder text when no tenant is selected */
21
+ placeholder?: string;
22
+ /** Additional CSS classes */
23
+ className?: string;
24
+ /** Callback fired when tenant selection changes */
25
+ onTenantChange?: (tenantId: string) => void;
26
+ }
27
+ /**
28
+ * SwitchActiveTenant Component
29
+ *
30
+ * A dropdown component that allows users to switch between different tenants.
31
+ * When a tenant is selected, it triggers a form action with the tenant_id in form data.
32
+ *
33
+ * @param tenants - Array of available tenants
34
+ * @param currentTenantId - Currently active tenant ID
35
+ * @param formAction - Custom form action handler
36
+ * @param placeholder - Placeholder text for the select
37
+ * @param className - Additional CSS classes
38
+ * @param onTenantChange - Callback for tenant changes
39
+ */
40
+ declare function SwitchActiveTenant({ tenants, currentTenantId, formAction, placeholder, className, onTenantChange, }: SwitchActiveTenantProps): react_jsx_runtime.JSX.Element;
41
+
42
+ interface PricingTableProps {
43
+ products: Product[];
44
+ selectedPriceId?: string;
45
+ onPriceSelect?: (priceId: string, productId: string) => void;
46
+ className?: string;
47
+ showPricingToggle?: boolean;
48
+ defaultInterval?: "month" | "year";
49
+ }
50
+ declare function PricingTable({ products, selectedPriceId, onPriceSelect, className, showPricingToggle, defaultInterval, }: PricingTableProps): react_jsx_runtime.JSX.Element;
51
+
52
+ export { CustomFlowForm, type CustomFormProps, type FlowType, PricingTable, type PricingTableProps, SwitchActiveTenant, type SwitchActiveTenantProps };