kewti_components 0.0.4 → 0.0.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.
package/README.md CHANGED
@@ -1,21 +1,62 @@
1
- # React + TypeScript + Vite + shadcn/ui
2
-
3
- This is a template for a new Vite project with React, TypeScript, and shadcn/ui.
4
-
5
- ## Adding components
6
-
7
- To add components to your app, run the following command:
8
-
9
- ```bash
10
- npx shadcn@latest add button
11
- ```
12
-
13
- This will place the ui components in the `src/components` directory.
14
-
15
- ## Using components
16
-
17
- To use the components in your app, import them as follows:
18
-
19
- ```tsx
20
- import { Button } from "@/components/ui/button"
21
- ```
1
+ # Kewti Components
2
+
3
+ A modern React component library focused on delivering high-quality, reusable components with built-in support for Ethiopian contexts (such as calendars, locations, and typography).
4
+
5
+ ## Installation
6
+
7
+ Install the package via npm:
8
+
9
+ ```bash
10
+ npm install kewti_components
11
+ ```
12
+
13
+ Make sure you have `react` and `react-dom` installed, as they are required peer dependencies.
14
+
15
+ ## Usage
16
+
17
+ Import components directly into your React application.
18
+
19
+ ```tsx
20
+ import { useState } from "react";
21
+ import { KewtiInput, EthiopianCalendar } from "kewti_components";
22
+
23
+ export default function App() {
24
+ const [value, setValue] = useState("");
25
+
26
+ return (
27
+ <div className="p-4">
28
+ <KewtiInput variant="input" setUserInput={setValue} />
29
+ <EthiopianCalendar />
30
+ </div>
31
+ );
32
+ }
33
+ ```
34
+
35
+ ## Available Components
36
+
37
+ - **Kewti Input**: Clean, interactive text input components.
38
+ - **Kewti Map**: Responsive interactive maps built with Leaflet.
39
+ - **Transaction Validator**: Comprehensive UI for validating banking transactions.
40
+ - **Ethiopian Calendar**: Calendar component displaying both Gregorian and Ethiopian dates.
41
+ - **Ethiopian Date Picker**: Date picker designed for the Ethiopian calendar system.
42
+ - **Location Selector**: Cascading dropdown selector for Ethiopian regions, zones, and woredas.
43
+ - **Password Input**: Secure password input field with visibility toggle and strength indicators.
44
+ - **Kewti Fonts**: Utility component for applying custom Ethiopian fonts (`geez_digital`, `bela_hidase`).
45
+
46
+ ## Development
47
+
48
+ To view the components in action and explore their APIs, you can run the local documentation site:
49
+
50
+ ```bash
51
+ npm run dev
52
+ ```
53
+
54
+ To build the library for production:
55
+
56
+ ```bash
57
+ npm run build
58
+ ```
59
+
60
+ ## License
61
+
62
+ MIT
Binary file
@@ -0,0 +1,13 @@
1
+ Font: AbnetZethion
2
+ Designer: John Hudson and Geraldine Wade
3
+ Source: Font.et
4
+ ----------------------------------------
5
+ License Information:
6
+ Unknown License
7
+
8
+
9
+
10
+ No specific license information provided. Please check with the designer.
11
+
12
+ ----------------------------------------
13
+ Downloaded from Font.et
@@ -0,0 +1,13 @@
1
+ Font: Bela Hidase ExtBd
2
+ Designer: Abel Daniel
3
+ Source: Font.et
4
+ ----------------------------------------
5
+ License Information:
6
+ Unknown License
7
+
8
+
9
+
10
+ No specific license information provided. Please check with the designer.
11
+
12
+ ----------------------------------------
13
+ Downloaded from Font.et
@@ -0,0 +1,13 @@
1
+ Font: Geez Digital
2
+ Designer: Yikunoamlak Ayalew
3
+ Source: Font.et
4
+ ----------------------------------------
5
+ License Information:
6
+ Unknown License
7
+
8
+
9
+
10
+ No specific license information provided. Please check with the designer.
11
+
12
+ ----------------------------------------
13
+ Downloaded from Font.et
@@ -0,0 +1,3 @@
1
+ export default function KewtiDocumentation({ onBack }: {
2
+ onBack?: () => void;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ type FontName = "geez_digital" | "bela_hidase";
3
+ interface KewtiFontsProps {
4
+ font: FontName;
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ children: React.ReactNode;
8
+ }
9
+ export declare function KewtiFonts({ font, className, style, children, }: KewtiFontsProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ interface KewtiMascotProps {
3
+ /** Extra wrapper classes */
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ /** Whether the mascot should appear focused (scaled up) */
7
+ focused?: boolean;
8
+ }
9
+ export default function KewtiMascot({ className, style, focused }: KewtiMascotProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- export declare function KewtiLocationSelector({ setAddress }: {
2
+ export declare function KewtiLocationSelector({ setAddress, }: {
3
3
  setAddress?: React.Dispatch<React.SetStateAction<string[]>>;
4
4
  }): import("react/jsx-runtime").JSX.Element;
package/dist/kewti.es.js CHANGED
@@ -22860,14 +22860,17 @@ async function _B(A, e) {
22860
22860
  console.log(`Attempting to fetch Telebirr receipt from primary source: ${t}`);
22861
22861
  const q = await yA.get(t, { timeout: 3e4 });
22862
22862
  console.log(`Received response with status: ${q.status}`);
22863
- const n = Fr(q.data);
22864
- return console.log("Extracted data from HTML:", n), console.log(`Successfully extracted Telebirr data for reference: ${A}`, {
22865
- receiptNo: n.receiptNo,
22866
- payerName: n.payerName,
22867
- transactionStatus: n.transactionStatus,
22868
- settledAmount: n.settledAmount,
22869
- serviceFee: n.serviceFee
22870
- }), n;
22863
+ const n = q.data?.html;
22864
+ if (typeof n != "string")
22865
+ return console.log("Invalid HTML payload:", q.data), null;
22866
+ const r = Fr(n);
22867
+ return console.log("Extracted data from HTML:", r), console.log(`Successfully extracted Telebirr data for reference: ${A}`, {
22868
+ receiptNo: r.receiptNo,
22869
+ payerName: r.payerName,
22870
+ transactionStatus: r.transactionStatus,
22871
+ settledAmount: r.settledAmount,
22872
+ serviceFee: r.serviceFee
22873
+ }), r;
22871
22874
  } catch (q) {
22872
22875
  const n = q instanceof Error ? q.message : "Unknown error", r = q instanceof Error ? q.stack : void 0, s = q, a = s.response ? {
22873
22876
  status: s.response.status,
@@ -22935,7 +22938,7 @@ async function $B(A, e) {
22935
22938
  }
22936
22939
  }
22937
22940
  async function zu(A) {
22938
- const e = "/api/telebirr/receipt/", q = "".split(",").map((r) => r.trim()).filter((r) => r.length > 0), n = !1;
22941
+ const e = "http://localhost:3001/api/telebirr/receipt/", q = "".split(",").map((r) => r.trim()).filter((r) => r.length > 0), n = !1;
22939
22942
  {
22940
22943
  console.log(`Attempting primary verification for: ${A}`);
22941
22944
  const r = await _B(A, e);