albinasoft-ui-package 1.0.2 → 1.0.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.
Files changed (47) hide show
  1. package/dist/Button/button.d.ts +7 -0
  2. package/dist/Button/button.js +11 -0
  3. package/dist/CustomButton/CustomButton.d.ts +13 -0
  4. package/dist/CustomButton/CustomButton.js +92 -0
  5. package/dist/index.d.ts +3 -0
  6. package/dist/index.js +10 -0
  7. package/package.json +30 -44
  8. package/readme.md +10 -0
  9. package/dist/index.cjs +0 -2
  10. package/dist/index.cjs.map +0 -1
  11. package/dist/index.modern.js +0 -2
  12. package/dist/index.modern.js.map +0 -1
  13. package/dist/index.module.js +0 -2
  14. package/dist/index.module.js.map +0 -1
  15. package/dist/index.umd.js +0 -2
  16. package/dist/index.umd.js.map +0 -1
  17. package/src/assets/css/custom/components.css +0 -20
  18. package/src/assets/css/custom/layout.css +0 -89
  19. package/src/assets/css/dark.css +0 -2145
  20. package/src/assets/css/main.css +0 -26263
  21. package/src/assets/data/countryCodes.json +0 -1466
  22. package/src/assets/images/albinasoft/albinasoft_logo.ico +0 -0
  23. package/src/assets/images/albinasoft/albinasoft_logo.png +0 -0
  24. package/src/assets/images/albinasoft/albinasoft_logo.svg +0 -22
  25. package/src/assets/images/albinasoft/albinasoft_logo_blue.svg +0 -7
  26. package/src/assets/images/albinasoft/albinasoft_logo_spin.gif +0 -0
  27. package/src/assets/images/albinasoft/albinasoft_logo_white.svg +0 -1
  28. package/src/assets/images/header/top-header.png +0 -0
  29. package/src/assets/images/header/top-image.jpg +0 -0
  30. package/src/components/CustomButton.tsx +0 -74
  31. package/src/components/CustomCheckbox.tsx +0 -122
  32. package/src/components/CustomDateTimePicker.tsx +0 -127
  33. package/src/components/CustomDivider.tsx +0 -90
  34. package/src/components/CustomForm.tsx +0 -327
  35. package/src/components/CustomInput.tsx +0 -180
  36. package/src/components/CustomModal.tsx +0 -43
  37. package/src/components/CustomRadioButton.tsx +0 -119
  38. package/src/components/CustomRichTextbox.tsx +0 -123
  39. package/src/components/CustomSelect.tsx +0 -134
  40. package/src/components/CustomText.tsx +0 -199
  41. package/src/components/CustomTextarea.tsx +0 -131
  42. package/src/components/CustomUploader.tsx +0 -125
  43. package/src/components/layout/FullScreenToggle.tsx +0 -72
  44. package/src/components/layout/LoginDropdown.tsx +0 -39
  45. package/src/components/layout/ThemeToggle.tsx +0 -59
  46. package/src/index.js +0 -26
  47. package/tsconfig.json +0 -15
@@ -1,22 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
- width="108.000000pt" height="108.000000pt" viewBox="0 0 108.000000 108.000000"
6
- preserveAspectRatio="xMidYMid meet">
7
-
8
- <g transform="translate(0.000000,108.000000) scale(0.100000,-0.100000)"
9
- fill="#000000" stroke="none">
10
- <path d="M397 1045 c-138 -38 -272 -146 -332 -269 -69 -139 -80 -287 -31 -421
11
- l21 -60 290 4 c426 5 429 7 124 64 -140 27 -258 52 -262 56 -17 17 -26 136
12
- -16 211 24 171 124 315 275 398 l59 31 -40 0 c-22 -1 -62 -7 -88 -14z"/>
13
- <path d="M547 1038 c-8 -13 -72 -131 -142 -263 -70 -132 -139 -260 -152 -285
14
- -30 -54 -47 -72 180 193 117 137 167 187 182 187 44 0 167 -72 229 -134 105
15
- -105 156 -229 156 -381 l1 -80 19 35 c33 61 53 174 47 260 -17 223 -169 410
16
- -386 474 -78 23 -117 21 -134 -6z"/>
17
- <path d="M624 805 c4 -11 46 -128 92 -259 l84 -240 -31 -32 c-61 -63 -191
18
- -118 -306 -129 -111 -11 -247 26 -352 96 l-34 23 13 -25 c30 -54 135 -146 210
19
- -181 167 -80 329 -77 491 8 65 34 189 149 189 175 0 10 -336 557 -353 574 -7
20
- 7 -7 3 -3 -10z"/>
21
- </g>
22
- </svg>
@@ -1,7 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="108" height="108" viewBox="0 0 108 108">
2
- <g transform="translate(0,108) scale(0.1,-0.1)" fill="#3a57e8" stroke="none">
3
- <path d="M397 1045 c-138 -38 -272 -146 -332 -269 -69 -139 -80 -287 -31 -421 l21 -60 290 4 c426 5 429 7 124 64 -140 27 -258 52 -262 56 -17 17 -26 136 -16 211 24 171 124 315 275 398 l59 31 -40 0 c-22 -1 -62 -7 -88 -14z"/>
4
- <path d="M547 1038 c-8 -13 -72 -131 -142 -263 -70 -132 -139 -260 -152 -285 -30 -54 -47 -72 180 193 117 137 167 187 182 187 44 0 167 -72 229 -134 105 -105 156 -229 156 -381 l1 -80 19 35 c33 61 53 174 47 260 -17 223 -169 410 -386 474 -78 23 -117 21 -134 -6z"/>
5
- <path d="M624 805 c4 -11 46 -128 92 -259 l84 -240 -31 -32 c-61 -63 -191 -118 -306 -129 -111 -11 -247 26 -352 96 l-34 23 13 -25 c30 -54 135 -146 210 -181 167 -80 329 -77 491 8 65 34 189 149 189 175 0 10 -336 557 -353 574 -7 7 -7 3 -3 -10z"/>
6
- </g>
7
- </svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="108" height="108" viewBox="0 0 108 108"><g transform="translate(0,108) scale(0.1,-0.1)" fill="white" stroke="none"><path d="M397 1045 c-138 -38 -272 -146 -332 -269 -69 -139 -80 -287 -31 -421 l21 -60 290 4 c426 5 429 7 124 64 -140 27 -258 52 -262 56 -17 17 -26 136 -16 211 24 171 124 315 275 398 l59 31 -40 0 c-22 -1 -62 -7 -88 -14z"/><path d="M547 1038 c-8 -13 -72 -131 -142 -263 -70 -132 -139 -260 -152 -285 -30 -54 -47 -72 180 193 117 137 167 187 182 187 44 0 167 -72 229 -134 105 -105 156 -229 156 -381 l1 -80 19 35 c33 61 53 174 47 260 -17 223 -169 410 -386 474 -78 23 -117 21 -134 -6z"/><path d="M624 805 c4 -11 46 -128 92 -259 l84 -240 -31 -32 c-61 -63 -191 -118 -306 -129 -111 -11 -247 26 -352 96 l-34 23 13 -25 c30 -54 135 -146 210 -181 167 -80 329 -77 491 8 65 34 189 149 189 175 0 10 -336 557 -353 574 -7 7 -7 3 -3 -10z"/></g></svg>
@@ -1,74 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { OverlayTrigger, Tooltip } from 'react-bootstrap';
3
-
4
- interface CustomButtonProps {
5
- id?:string;
6
- label: React.ReactNode;
7
- name?:string;
8
- onClick: (event: React.FormEvent) => void;
9
- style?: React.CSSProperties;
10
- className?: string;
11
- tooltip?: string;
12
- disabled?: boolean;
13
- }
14
-
15
- const CustomButton: React.FC<CustomButtonProps> = ({
16
- id,
17
- name,
18
- label,
19
- onClick,
20
- style,
21
- className,
22
- tooltip,
23
- disabled}) => {
24
- const [isLoading, setIsLoading] = useState(false);
25
-
26
- const handleClick = async (event: React.FormEvent) => {
27
- setIsLoading(true);
28
- try {
29
- await onClick(event);
30
- } finally {
31
- setIsLoading(false);
32
- }
33
- };
34
-
35
- const buttonClassName = className || 'btn btn-primary';
36
-
37
- return tooltip ? (
38
- <OverlayTrigger
39
- placement="top"
40
- overlay={<Tooltip id={`tooltip-${tooltip}`}>{tooltip}</Tooltip>}
41
- >
42
- <span>
43
- <button
44
- className={buttonClassName}
45
- onClick={handleClick}
46
- disabled={isLoading || disabled}
47
- style={style}
48
- >
49
- {isLoading ? (
50
- <span className="spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
51
- ) : (
52
- label
53
- )}
54
- </button>
55
- </span>
56
- </OverlayTrigger>
57
- ) : (
58
- <button
59
- className={buttonClassName}
60
- onClick={handleClick}
61
- disabled={isLoading || disabled}
62
- style={style}
63
- >
64
- {isLoading ? (
65
- <span className="spinner spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
66
- ) : (
67
- label
68
- )}
69
- </button>
70
- );
71
- };
72
-
73
- export default CustomButton;
74
- export {};
@@ -1,122 +0,0 @@
1
- import React from 'react';
2
- import { OverlayTrigger, Tooltip } from 'react-bootstrap';
3
- import { FaExclamationTriangle, FaInfoCircle } from 'react-icons/fa';
4
-
5
- interface CustomCheckboxProps {
6
- id?: string;
7
- name?: string;
8
- label: string;
9
- value: boolean;
10
- required?: boolean;
11
- errorMessage?: string;
12
- conditionalErrorVisible?: boolean;
13
- conditionalErrorMessage?: string;
14
- tooltip?: string;
15
- description?: string | null;
16
- disabled?: boolean;
17
- className?: string;
18
- style?: React.CSSProperties;
19
- onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
20
- }
21
-
22
- const CustomCheckbox: React.FC<CustomCheckboxProps> = ({
23
- id,
24
- name,
25
- label,
26
- value,
27
- required = false,
28
- errorMessage,
29
- conditionalErrorVisible,
30
- conditionalErrorMessage,
31
- tooltip,
32
- description,
33
- disabled = false,
34
- className,
35
- style,
36
- onChange,
37
- }) => {
38
- return (
39
- <div className={className}>
40
- <div className="form-check form-group" style={style}>
41
-
42
- {tooltip ? (
43
- <OverlayTrigger
44
- placement="bottom"
45
- overlay={
46
- tooltip ? <Tooltip id={`tooltip-${id || name}`}>{tooltip}</Tooltip> : <></>
47
- }
48
- >
49
- <input
50
- id={id}
51
- name={name}
52
- type="checkbox"
53
- className="form-check-input"
54
- checked={value}
55
- disabled={disabled}
56
- onChange={onChange}
57
- required={required}
58
- />
59
- </OverlayTrigger>
60
- ) : (
61
- <input
62
- id={id}
63
- name={name}
64
- type="checkbox"
65
- className="form-check-input"
66
- checked={value}
67
- disabled={disabled}
68
- onChange={onChange}
69
- required={required}
70
- />
71
- )}
72
-
73
- <label htmlFor={id} className="form-check-label">
74
- {label}
75
- </label>
76
-
77
- {required && (
78
- <div className="invalid-feedback text-danger">
79
- <div className="description-icon">
80
- <FaExclamationTriangle />
81
- </div>
82
- <div className="description-text">
83
- <span>
84
- {errorMessage || 'Bu seçim zorunludur.'}
85
- </span>
86
- </div>
87
- </div>
88
- )}
89
-
90
- {conditionalErrorVisible && (
91
- <div className="conditional-error-message text-warning">
92
- <div className="description-icon">
93
- <FaExclamationTriangle />
94
- </div>
95
- <div className="description-text">
96
- <span>
97
- {conditionalErrorMessage}
98
- </span>
99
- </div>
100
- </div>
101
- )}
102
-
103
- {description && (
104
- <div className="form-description text-secondary">
105
- <div className="description-icon">
106
- <FaInfoCircle />
107
- </div>
108
- <div className="description-text">
109
- <span>
110
- {description}
111
- </span>
112
- </div>
113
- </div>
114
- )}
115
-
116
- </div>
117
- </div>
118
-
119
- );
120
- };
121
-
122
- export default CustomCheckbox;
@@ -1,127 +0,0 @@
1
- import React from 'react';
2
- import DatePicker from 'react-datepicker';
3
- import 'react-datepicker/dist/react-datepicker.css';
4
- import { OverlayTrigger, Tooltip } from 'react-bootstrap';
5
- import { FaExclamationTriangle, FaInfoCircle } from 'react-icons/fa';
6
-
7
- enum TimeFormat {
8
- H = 'HH',
9
- M = 'mm',
10
- HM = 'HH:mm',
11
- }
12
-
13
- interface CustomDateTimePickerProps {
14
- id?: string;
15
- name?: string;
16
- label: string;
17
- value: Date | null;
18
- placeholder?: string;
19
- required?: boolean;
20
- errorMessage?: string;
21
- conditionalErrorVisible?: boolean;
22
- conditionalErrorMessage?: string;
23
- tooltip?: string;
24
- description?: string | null;
25
- disabled?: boolean;
26
- className?: string;
27
- style?: React.CSSProperties;
28
- showTimeSelect?: boolean;
29
- showTimeSelectOnly?: boolean;
30
- timeFormat?: TimeFormat;
31
- timeIntervals?: number;
32
- onChange: (date: Date | null) => void;
33
- }
34
-
35
- const CustomDateTimePicker: React.FC<CustomDateTimePickerProps> = ({
36
- id,
37
- name,
38
- label,
39
- value,
40
- placeholder,
41
- required = false,
42
- errorMessage,
43
- conditionalErrorVisible = false,
44
- conditionalErrorMessage,
45
- tooltip,
46
- description,
47
- disabled = false,
48
- className,
49
- style,
50
- showTimeSelect,
51
- showTimeSelectOnly,
52
- timeFormat = TimeFormat.HM,
53
- timeIntervals,
54
- onChange,
55
- }) => {
56
-
57
- return (
58
- <div className={className}>
59
- <div className="form-group">
60
- <label htmlFor={id} className="form-label">
61
- {label}
62
- </label>
63
- <div className="position-relative">
64
- <OverlayTrigger
65
- placement="bottom"
66
- overlay={tooltip ? <Tooltip id={`tooltip-${id}`}>{tooltip}</Tooltip> : <></>}
67
- >
68
- <div>
69
- <DatePicker
70
- id={id}
71
- name={name}
72
- selected={value}
73
- onChange={onChange}
74
- className={`form-control ${className || ''}`}
75
- placeholderText={placeholder}
76
- disabled={disabled}
77
- required={required}
78
- showTimeSelect={showTimeSelect || false}
79
- showTimeSelectOnly={showTimeSelectOnly || false}
80
- showTimeCaption={false}
81
- timeFormat={timeFormat}
82
- dateFormat={showTimeSelectOnly ? timeFormat : showTimeSelect ? "dd.MM.yyyy HH:mm" : "dd.MM.yyyy"}
83
- timeIntervals={timeFormat == TimeFormat.H ? 60 : timeFormat == TimeFormat.M ? 1 : timeIntervals ? timeIntervals : 30}
84
- />
85
- </div>
86
- </OverlayTrigger>
87
-
88
- {required && !value && (
89
- <div className="invalid-feedback text-danger mt-2">
90
- <div className="description-icon">
91
- <FaExclamationTriangle />
92
- </div>
93
- <div className="description-text">
94
- <span>{errorMessage || 'This field is required.'}</span>
95
- </div>
96
- </div>
97
- )}
98
-
99
- {conditionalErrorVisible && (
100
- <div className="conditional-error-message text-warning mt-2">
101
- <div className="description-icon">
102
- <FaExclamationTriangle />
103
- </div>
104
- <div className="description-text">
105
- <span>{conditionalErrorMessage}</span>
106
- </div>
107
- </div>
108
- )}
109
-
110
- {description && (
111
- <div className="form-description text-secondary mt-2">
112
- <div className="description-icon">
113
- <FaInfoCircle />
114
- </div>
115
- <div className="description-text">
116
- <span>{description}</span>
117
- </div>
118
- </div>
119
- )}
120
- </div>
121
- </div>
122
- </div>
123
- );
124
- };
125
-
126
- export { CustomDateTimePicker, TimeFormat };
127
- export default CustomDateTimePicker;
@@ -1,90 +0,0 @@
1
- import React from 'react';
2
-
3
- enum Color {
4
- DEFAULT = "currentColor",
5
- PRIMARY = 'text-primary',
6
- SECONDARY = 'text-secondary',
7
- SUCCESS = 'text-success',
8
- WARNING = 'text-warning',
9
- DANGER = 'text-danger',
10
- INFO = 'text-info',
11
- DARK = 'text-dark',
12
- LIGHT = 'text-light',
13
- }
14
-
15
- enum Alignment {
16
- LEFT = 'left',
17
- CENTER = 'center',
18
- RIGHT = 'right',
19
- }
20
-
21
- enum Thickness {
22
- T1 = '1px',
23
- T2 = '2px',
24
- T3 = '3px',
25
- T4 = '4px',
26
- T5 = '5px',
27
- T6 = '6px',
28
- T8 = '8px',
29
- T10 = '10px',
30
- T12 = '12px',
31
- T16 = '16px',
32
- T24 = '24px',
33
- }
34
-
35
- enum Width {
36
- W10 = '10%',
37
- W25 = '25%',
38
- W33 = '33%',
39
- W50 = '50%',
40
- W66 = '66%',
41
- W75 = '75%',
42
- W100 = '100%',
43
- }
44
-
45
- interface CustomDividerProps {
46
- id?: string;
47
- color?: Color; // Çizginin rengi
48
- thickness?: Thickness; // Çizginin kalınlığı
49
- width?: Width; // Çizginin genişliği
50
- alignment?: Alignment; // Hizalama: 'left', 'center', 'right'
51
- className?: string; // Ekstra CSS sınıfları
52
- style?: React.CSSProperties; // Inline stiller
53
- }
54
-
55
- const CustomDivider: React.FC<CustomDividerProps> = ({
56
- id,
57
- color = Color.DEFAULT, // Varsayılan renk (gri ton)
58
- thickness = Thickness.T1, // Varsayılan kalınlık
59
- width = Width.W100, // Varsayılan genişlik
60
- alignment = Alignment.CENTER, // Varsayılan hizalama
61
- className = '',
62
- style = {},
63
- }) => {
64
-
65
- const combinedClassName = `${color} ${className}`.trim();
66
-
67
- // Hizalama stilini belirleme
68
- const alignmentStyle: React.CSSProperties = {
69
- marginLeft: alignment === 'left' ? '0' : 'auto',
70
- marginRight: alignment === 'right' ? '0' : 'auto',
71
- };
72
-
73
- return (
74
- <hr
75
- id={id || `custom-divider-${Date.now()}`}
76
- //className={`custom-divider ${className}`.trim()}
77
- className={`custom-divider ${combinedClassName}`}
78
- style={{
79
- border: 'none', // Çizginin varsayılan kenarlığını kaldır
80
- borderTop: `${thickness} solid`, // Çizgiyi oluştur
81
- width, // Genişlik uygula
82
- ...alignmentStyle, // Hizalamayı uygula
83
- ...style, // Ekstra stil
84
- }}
85
- />
86
- );
87
- };
88
-
89
- export { CustomDivider, Color, Alignment, Thickness, Width };
90
- export default CustomDivider;