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 +62 -21
- package/dist/fonts/Abinet_3038426dc8.ttf +0 -0
- package/dist/fonts/Bela_Hidase_Extra_Bold_9020959aee.ttf +0 -0
- package/dist/fonts/Font.et - AbnetZethion - John Hudson and Geraldine Wade/Font.et - AbnetZethion - John Hudson and Geraldine Wade/license.txt +13 -0
- package/dist/fonts/Font.et - Bela Hidase ExtBd - Abel Daniel/Font.et - Bela Hidase ExtBd - Abel Daniel/license.txt +13 -0
- package/dist/fonts/Font.et - Geez Digital - Yikunoamlak Ayalew/Font.et - Geez Digital - Yikunoamlak Ayalew/license.txt +13 -0
- package/dist/fonts/Geez_Digital_V1_5be0497d4c.ttf +0 -0
- package/dist/kewti-documentation/component.d.ts +3 -0
- package/dist/kewti-fonts/component.d.ts +10 -0
- package/dist/kewti-mascot/component.d.ts +10 -0
- package/dist/kewti-regions/component.d.ts +1 -1
- package/dist/kewti.es.js +12 -9
- package/dist/kewti.umd.js +1 -1
- package/dist/kewti_components.css +1 -1
- package/package.json +4 -2
- package/dist/kewtiPage/KewtiPage.d.ts +0 -1
package/README.md
CHANGED
|
@@ -1,21 +1,62 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
##
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```tsx
|
|
20
|
-
import {
|
|
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
|
|
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
|
|
Binary file
|
|
@@ -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 =
|
|
22864
|
-
|
|
22865
|
-
|
|
22866
|
-
|
|
22867
|
-
|
|
22868
|
-
|
|
22869
|
-
|
|
22870
|
-
|
|
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);
|