@hobenakicoffee/libraries 1.11.0 → 1.13.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/README.md +25 -4
- package/package.json +84 -9
- package/src/App.tsx +28 -0
- package/src/components/turnstile-captcha.tsx +47 -0
- package/src/components/ui/alert-dialog.tsx +196 -0
- package/src/components/ui/alert.tsx +76 -0
- package/src/components/ui/avatar.tsx +110 -0
- package/src/components/ui/badge.tsx +49 -0
- package/src/components/ui/breadcrumb.tsx +122 -0
- package/src/components/ui/button-group.tsx +82 -0
- package/src/components/ui/button.tsx +77 -0
- package/src/components/ui/calendar.tsx +235 -0
- package/src/components/ui/card.tsx +100 -0
- package/src/components/ui/chart.tsx +364 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/dialog.tsx +162 -0
- package/src/components/ui/drawer.tsx +126 -0
- package/src/components/ui/dropdown-menu.tsx +267 -0
- package/src/components/ui/empty-minimal.tsx +20 -0
- package/src/components/ui/empty.tsx +101 -0
- package/src/components/ui/field.tsx +235 -0
- package/src/components/ui/input-group.tsx +170 -0
- package/src/components/ui/input-otp.tsx +84 -0
- package/src/components/ui/input.tsx +37 -0
- package/src/components/ui/item.tsx +196 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/popover.tsx +87 -0
- package/src/components/ui/radio-group.tsx +47 -0
- package/src/components/ui/select.tsx +205 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/sheet.tsx +141 -0
- package/src/components/ui/sidebar.tsx +699 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/sonner.tsx +74 -0
- package/src/components/ui/spinner.tsx +18 -0
- package/src/components/ui/table.tsx +114 -0
- package/src/components/ui/tabs.tsx +88 -0
- package/src/components/ui/textarea.tsx +35 -0
- package/src/components/ui/toggle-group.tsx +91 -0
- package/src/components/ui/toggle.tsx +44 -0
- package/src/components/ui/tooltip.tsx +59 -0
- package/src/constants/common.test.ts +1 -1
- package/src/constants/legal.test.ts +1 -1
- package/src/constants/payment.test.ts +9 -9
- package/src/constants/platforms.test.ts +1 -1
- package/src/constants/services.test.ts +1 -1
- package/src/hooks/use-mobile.ts +19 -0
- package/src/index.css +135 -0
- package/src/lib/utils.ts +6 -0
- package/src/main.tsx +16 -0
- package/src/moderation/datasets/bn.ts +708 -708
- package/src/moderation/normalizer.test.ts +1 -1
- package/src/moderation/normalizer.ts +16 -16
- package/src/moderation/profanity-service.test.ts +3 -3
- package/src/providers/theme-provider.tsx +73 -0
- package/src/types/supabase.ts +751 -647
- package/src/utils/check-moderation.test.ts +12 -12
- package/src/utils/format-number.test.ts +1 -1
- package/src/utils/format-plain-text.test.ts +1 -1
- package/src/utils/get-social-handle.test.ts +3 -3
- package/src/utils/get-social-link.test.ts +9 -9
- package/src/utils/get-social-link.ts +5 -3
- package/src/utils/get-user-name-initials.test.ts +1 -1
- package/src/utils/get-user-name-initials.ts +4 -4
- package/src/utils/get-user-page-link.ts +1 -1
- package/src/utils/index.ts +5 -5
- package/src/utils/open-to-new-window.ts +3 -1
- package/src/utils/post-to-facebook.test.ts +1 -1
- package/src/utils/post-to-facebook.ts +9 -3
- package/src/utils/post-to-instagram.test.ts +1 -1
- package/src/utils/post-to-linkedin.test.ts +1 -1
- package/src/utils/post-to-linkedin.ts +9 -3
- package/src/utils/post-to-x.test.ts +1 -1
- package/src/utils/post-to-x.ts +12 -4
- package/src/utils/to-human-readable.ts +6 -2
- package/src/utils/validate-phone-number.test.ts +1 -1
package/src/index.css
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "tw-animate-css";
|
|
3
|
+
@import "shadcn/tailwind.css";
|
|
4
|
+
@import "@fontsource-variable/noto-sans-bengali";
|
|
5
|
+
|
|
6
|
+
@custom-variant dark (&:is(.dark *));
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--background: oklch(1 0 0);
|
|
10
|
+
--foreground: oklch(0.145 0 0);
|
|
11
|
+
--card: oklch(1 0 0);
|
|
12
|
+
--card-foreground: oklch(0.145 0 0);
|
|
13
|
+
--popover: oklch(1 0 0);
|
|
14
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
15
|
+
--primary: oklch(0.5671 0.1168 3.54);
|
|
16
|
+
--primary-foreground: oklch(98.978% 0.00663 339.475);
|
|
17
|
+
--secondary: oklch(96.715% 0.00011 271.152);
|
|
18
|
+
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
19
|
+
--muted: oklch(0.97 0 0);
|
|
20
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
21
|
+
--accent: oklch(0.97 0 0);
|
|
22
|
+
--accent-foreground: oklch(0.205 0 0);
|
|
23
|
+
--destructive: oklch(0.58 0.22 27);
|
|
24
|
+
--success: oklch(0.627 0.173 142.459);
|
|
25
|
+
--border: oklch(0.922 0 0);
|
|
26
|
+
--input: oklch(0.922 0 0);
|
|
27
|
+
--ring: oklch(0.5671 0.1168 3.54);
|
|
28
|
+
--chart-1: oklch(80.306% 0.07833 0.456);
|
|
29
|
+
--chart-2: oklch(69.926% 0.11062 2.516);
|
|
30
|
+
--chart-3: oklch(65.055% 0.15935 5.085);
|
|
31
|
+
--chart-4: oklch(59.471% 0.16024 5.382);
|
|
32
|
+
--chart-5: oklch(51.268% 0.15904 7.545);
|
|
33
|
+
--radius: 0.625rem;
|
|
34
|
+
--sidebar: oklch(1 0 0);
|
|
35
|
+
--sidebar-foreground: oklch(0.145 0 0);
|
|
36
|
+
--sidebar-primary: oklch(0.5671 0.1168 3.54);
|
|
37
|
+
--sidebar-primary-foreground: oklch(98.978% 0.00663 339.475);
|
|
38
|
+
--sidebar-accent: oklch(0.145 0 0);
|
|
39
|
+
--sidebar-accent-foreground: oklch(1 0 0);
|
|
40
|
+
--sidebar-border: oklch(0.922 0 0);
|
|
41
|
+
--sidebar-ring: oklch(0.9 0 0);
|
|
42
|
+
--info: oklch(54.6% 0.245 262.881);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.dark {
|
|
46
|
+
--background: oklch(0.145 0 0);
|
|
47
|
+
--foreground: oklch(0.985 0 0);
|
|
48
|
+
--card: oklch(0.205 0 0);
|
|
49
|
+
--card-foreground: oklch(0.985 0 0);
|
|
50
|
+
--popover: oklch(0.205 0 0);
|
|
51
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
52
|
+
--primary: oklch(53.826% 0.14998 6.408);
|
|
53
|
+
--primary-foreground: oklch(97.057% 0.01244 358.249);
|
|
54
|
+
--secondary: oklch(0.274 0.006 286.033);
|
|
55
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
56
|
+
--muted: oklch(0.269 0 0);
|
|
57
|
+
--muted-foreground: oklch(0.708 0 0);
|
|
58
|
+
--accent: oklch(0.371 0 0);
|
|
59
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
60
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
61
|
+
--success: oklch(0.718 0.208 138.659);
|
|
62
|
+
--border: oklch(1 0 0 / 10%);
|
|
63
|
+
--input: oklch(1 0 0 / 15%);
|
|
64
|
+
--ring: oklch(60.445% 0.19057 7.78);
|
|
65
|
+
--chart-1: oklch(80.306% 0.07833 0.456);
|
|
66
|
+
--chart-2: oklch(69.926% 0.11062 2.516);
|
|
67
|
+
--chart-3: oklch(65.055% 0.15935 5.085);
|
|
68
|
+
--chart-4: oklch(59.471% 0.16024 5.382);
|
|
69
|
+
--chart-5: oklch(51.268% 0.15904 7.545);
|
|
70
|
+
--sidebar: oklch(0.205 0 0);
|
|
71
|
+
--sidebar-foreground: oklch(0.985 0 0);
|
|
72
|
+
--sidebar-primary: oklch(53.826% 0.14998 6.408);
|
|
73
|
+
--sidebar-primary-foreground: oklch(97.057% 0.01244 358.249);
|
|
74
|
+
--sidebar-accent: oklch(0.985 0 0);
|
|
75
|
+
--sidebar-accent-foreground: oklch(0.205 0 0);
|
|
76
|
+
--sidebar-border: oklch(1 0 0 / 10%);
|
|
77
|
+
--sidebar-ring: oklch(0.556 0 0);
|
|
78
|
+
--info: oklch(54.6% 0.245 262.881);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@theme inline {
|
|
82
|
+
--font-sans: "Noto Sans Bengali Variable", sans-serif;
|
|
83
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
84
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
85
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
86
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
87
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
88
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
89
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
90
|
+
--color-sidebar: var(--sidebar);
|
|
91
|
+
--color-chart-5: var(--chart-5);
|
|
92
|
+
--color-chart-4: var(--chart-4);
|
|
93
|
+
--color-chart-3: var(--chart-3);
|
|
94
|
+
--color-chart-2: var(--chart-2);
|
|
95
|
+
--color-chart-1: var(--chart-1);
|
|
96
|
+
--color-ring: var(--ring);
|
|
97
|
+
--color-input: var(--input);
|
|
98
|
+
--color-border: var(--border);
|
|
99
|
+
--color-destructive: var(--destructive);
|
|
100
|
+
--color-info: var(--info);
|
|
101
|
+
--color-success: var(--success);
|
|
102
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
103
|
+
--color-accent: var(--accent);
|
|
104
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
105
|
+
--color-muted: var(--muted);
|
|
106
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
107
|
+
--color-secondary: var(--secondary);
|
|
108
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
109
|
+
--color-primary: var(--primary);
|
|
110
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
111
|
+
--color-popover: var(--popover);
|
|
112
|
+
--color-card-foreground: var(--card-foreground);
|
|
113
|
+
--color-card: var(--card);
|
|
114
|
+
--color-foreground: var(--foreground);
|
|
115
|
+
--color-background: var(--background);
|
|
116
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
117
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
118
|
+
--radius-lg: var(--radius);
|
|
119
|
+
--radius-xl: calc(var(--radius) + 4px);
|
|
120
|
+
--radius-2xl: calc(var(--radius) + 8px);
|
|
121
|
+
--radius-3xl: calc(var(--radius) + 12px);
|
|
122
|
+
--radius-4xl: calc(var(--radius) + 16px);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@layer base {
|
|
126
|
+
* {
|
|
127
|
+
@apply border-border outline-ring/50;
|
|
128
|
+
}
|
|
129
|
+
body {
|
|
130
|
+
@apply font-sans bg-background text-foreground selection:bg-primary selection:text-primary-foreground h-full;
|
|
131
|
+
}
|
|
132
|
+
html {
|
|
133
|
+
@apply font-sans scroll-pt-20 scroll-smooth h-full;
|
|
134
|
+
}
|
|
135
|
+
}
|
package/src/lib/utils.ts
ADDED
package/src/main.tsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDOM from "react-dom/client";
|
|
4
|
+
import App from "./App";
|
|
5
|
+
|
|
6
|
+
const rootElement = document.getElementById("root");
|
|
7
|
+
if (!rootElement) {
|
|
8
|
+
throw new Error("Could not find root element to mount to");
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const root = ReactDOM.createRoot(rootElement);
|
|
12
|
+
root.render(
|
|
13
|
+
<React.StrictMode>
|
|
14
|
+
<App />
|
|
15
|
+
</React.StrictMode>
|
|
16
|
+
);
|