albinasoft-ui-package 1.1.58 → 1.1.60

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.
@@ -1,6 +1,7 @@
1
1
  /* Genel Ayarlar */
2
2
  .react-datepicker-popper {
3
3
  z-index: 5;
4
+ line-height: 0;
4
5
  }
5
6
 
6
7
  .react-datepicker__navigation-icon::before,
@@ -48,10 +49,6 @@
48
49
  height: auto;
49
50
  }
50
51
 
51
- .react-datepicker-popper {
52
- z-index: 1;
53
- line-height: 0;
54
- }
55
52
  .react-datepicker-popper .react-datepicker__triangle {
56
53
  stroke: var(--bs-border-color);
57
54
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import '../assets/css/custom-autocomplete-input.css';
3
- interface CustomAutocompleteInputProps {
3
+ export interface CustomAutocompleteInputProps {
4
4
  id?: string;
5
5
  name?: string;
6
6
  label: string;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- interface CustomButtonProps {
2
+ export interface CustomButtonProps {
3
3
  id?: string;
4
4
  label: React.ReactNode;
5
5
  name?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface CustomCheckboxProps {
2
+ export interface CustomCheckboxProps {
3
3
  id?: string;
4
4
  name?: string;
5
5
  label: string;
@@ -5,7 +5,7 @@ declare enum TimeFormat {
5
5
  M = "mm",
6
6
  HM = "HH:mm"
7
7
  }
8
- interface CustomDateTimePickerProps {
8
+ export interface CustomDateTimePickerProps {
9
9
  id?: string;
10
10
  name?: string;
11
11
  label: string;
@@ -37,7 +37,7 @@ declare enum Width {
37
37
  W75 = "75%",
38
38
  W100 = "100%"
39
39
  }
40
- interface CustomDividerProps {
40
+ export interface CustomDividerProps {
41
41
  id?: string;
42
42
  color?: Color;
43
43
  thickness?: Thickness;
@@ -7,7 +7,7 @@ declare enum InputType {
7
7
  EMAIL = "email",
8
8
  FILE = "file"
9
9
  }
10
- interface CustomInputProps {
10
+ export interface CustomInputProps {
11
11
  id?: string;
12
12
  name?: string;
13
13
  label?: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import '../assets/css/custom-autocomplete-input.css';
3
- interface CustomModalProps {
3
+ export interface CustomModalProps {
4
4
  show: boolean;
5
5
  title?: React.ReactNode;
6
6
  size?: 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface Props {
2
+ export interface CustomPhoneInputProps {
3
3
  id?: string;
4
4
  name?: string;
5
5
  label?: string;
@@ -25,5 +25,5 @@ interface Props {
25
25
  countryCodeText?: string;
26
26
  onChange: (full: string) => void;
27
27
  }
28
- declare const CustomPhoneInput: React.FC<Props>;
28
+ declare const CustomPhoneInput: React.FC<CustomPhoneInputProps>;
29
29
  export default CustomPhoneInput;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "../assets/css/custom-progress-bar.css";
3
- interface CustomProgressBarProps {
3
+ export interface CustomProgressBarProps {
4
4
  activeStep: number;
5
5
  stepLabels: string[];
6
6
  onStepClick: (step: number) => void;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- interface CustomRadioButtonOption {
2
+ export interface CustomRadioButtonOption {
3
3
  id: string;
4
4
  label: string;
5
5
  value: string;
6
6
  }
7
- interface CustomRadioButtonProps {
7
+ export interface CustomRadioButtonProps {
8
8
  id?: string;
9
9
  name?: string;
10
10
  label: string;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import 'quill/dist/quill.snow.css';
3
- interface CustomRichTextboxProps {
3
+ export interface CustomRichTextboxProps {
4
4
  id?: string;
5
5
  name?: string;
6
6
  label: string;
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
2
  import "../assets/css/custom-select.css";
3
- interface CustomSelectOption {
3
+ export interface CustomSelectOption {
4
4
  id: string;
5
5
  label: string;
6
6
  value: string;
7
7
  }
8
- interface CustomSelectProps {
8
+ export interface CustomSelectProps {
9
9
  id?: string;
10
10
  name?: string;
11
11
  label: string;
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
  import "../assets/css/custom-simple-select.css";
3
- interface Option {
3
+ export interface Option {
4
4
  value: string;
5
5
  label: string;
6
6
  }
7
- interface SimpleSelectProps {
7
+ export interface CustomSimpleSelectProps {
8
8
  id?: string;
9
9
  name?: string;
10
10
  label?: string;
@@ -17,5 +17,5 @@ interface SimpleSelectProps {
17
17
  style?: React.CSSProperties;
18
18
  onChange: (value: string) => void;
19
19
  }
20
- declare const CustomSimpleSelect: React.FC<SimpleSelectProps>;
20
+ declare const CustomSimpleSelect: React.FC<CustomSimpleSelectProps>;
21
21
  export default CustomSimpleSelect;
@@ -48,7 +48,7 @@ declare enum Color {
48
48
  DARK = "text-dark",
49
49
  LIGHT = "text-light"
50
50
  }
51
- interface CustomTextProps {
51
+ export interface CustomTextProps {
52
52
  id?: string;
53
53
  value: string;
54
54
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface CustomTextareaProps {
2
+ export interface CustomTextareaProps {
3
3
  id?: string;
4
4
  name?: string;
5
5
  label: string;
package/dist/index.d.ts CHANGED
@@ -1,24 +1,23 @@
1
- export { default as AlbinaForm } from './components/AlbinaForm';
1
+ export { default as CustomForm, ElementType } from './components/CustomForm';
2
2
  export { default as CustomAutocompleteInput } from './components/CustomAutocompleteInput';
3
3
  export { default as CustomButton } from './components/CustomButton';
4
4
  export { default as CustomCheckbox } from './components/CustomCheckbox';
5
- export { default as CustomInput, InputType } from './components/CustomInput';
5
+ export { default as CustomInput, InputType, } from './components/CustomInput';
6
6
  export { default as CustomTextarea } from './components/CustomTextarea';
7
7
  export { default as CustomPhoneInput } from './components/CustomPhoneInput';
8
8
  export { default as CustomRadioButton } from './components/CustomRadioButton';
9
9
  export { default as CustomSelect } from './components/CustomSelect';
10
10
  export { default as CustomSimpleSelect } from './components/CustomSimpleSelect';
11
- export { default as CustomTreeView, type CustomTreeViewProps, type TreeNode } from './components/CustomTreeView';
12
- export { default as CustomDateTimePicker, TimeFormat } from './components/CustomDateTimePicker';
11
+ export { default as CustomTreeView, type TreeNode, type CustomTreeViewProps, } from './components/CustomTreeView';
12
+ export { default as CustomDateTimePicker, TimeFormat, } from './components/CustomDateTimePicker';
13
13
  export { default as CustomText, TextType, TextAlign, FontSize, LineHeight, FontWeight, Color as TextColor, } from './components/CustomText';
14
- export { default as CustomDivider, Color as DividerColor, // alias to avoid collision with TextColor
15
- Alignment as DividerAlignment, Thickness as DividerThickness, Width as DividerWidth, } from './components/CustomDivider';
14
+ export { default as CustomDivider, Color as DividerColor, Alignment as DividerAlignment, Thickness as DividerThickness, Width as DividerWidth, } from './components/CustomDivider';
16
15
  export { default as CustomModal } from './components/CustomModal';
17
- export { default as CustomDatatable, type ColDef, } from './components/CustomDatatable';
16
+ export { default as CustomDatatable, type ColDef, type CustomDatatableProps, } from './components/CustomDatatable';
18
17
  export { default as CustomFileUploader, AllowedTypes, type FileUploaderTranslations, defaultTranslations, type CustomFileUploaderProps, type CustomFileUploaderHandle, } from './components/CustomFileUploader';
19
18
  export { default as CustomRichTextbox } from './components/CustomRichTextbox';
20
19
  export { default as CustomProgressBar } from './components/CustomProgressBar';
21
20
  export { default as CustomTab, AlignTabs, TabSize, type TabItem, type CustomTabProps, } from './components/CustomTab';
22
21
  export { default as CustomTimeline, DotColor, type AdditionalInfo, type TimelineElement, } from './components/CustomTimeline';
23
- export { default as CustomForm, ElementType } from './components/CustomForm';
24
- export type { Notify, noopNotify } from './types/notify';
22
+ export type { Notify } from './types/notify';
23
+ export { noopNotify } from './types/notify';
package/dist/index.js CHANGED
@@ -4,11 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  return (mod && mod.__esModule) ? mod : { "default": mod };
5
5
  };
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ElementType = exports.CustomForm = exports.DotColor = exports.CustomTimeline = exports.TabSize = exports.AlignTabs = exports.CustomTab = exports.CustomProgressBar = exports.CustomRichTextbox = exports.defaultTranslations = exports.AllowedTypes = exports.CustomFileUploader = exports.CustomDatatable = exports.CustomModal = exports.DividerWidth = exports.DividerThickness = exports.DividerAlignment = exports.DividerColor = exports.CustomDivider = exports.TextColor = exports.FontWeight = exports.LineHeight = exports.FontSize = exports.TextAlign = exports.TextType = exports.CustomText = exports.TimeFormat = exports.CustomDateTimePicker = exports.CustomTreeView = exports.CustomSimpleSelect = exports.CustomSelect = exports.CustomRadioButton = exports.CustomPhoneInput = exports.CustomTextarea = exports.InputType = exports.CustomInput = exports.CustomCheckbox = exports.CustomButton = exports.CustomAutocompleteInput = exports.AlbinaForm = void 0;
8
- // Form / Albina
9
- var AlbinaForm_1 = require("./components/AlbinaForm");
10
- Object.defineProperty(exports, "AlbinaForm", { enumerable: true, get: function () { return __importDefault(AlbinaForm_1).default; } });
11
- // Inputs
7
+ exports.noopNotify = exports.DotColor = exports.CustomTimeline = exports.TabSize = exports.AlignTabs = exports.CustomTab = exports.CustomProgressBar = exports.CustomRichTextbox = exports.defaultTranslations = exports.AllowedTypes = exports.CustomFileUploader = exports.CustomDatatable = exports.CustomModal = exports.DividerWidth = exports.DividerThickness = exports.DividerAlignment = exports.DividerColor = exports.CustomDivider = exports.TextColor = exports.FontWeight = exports.LineHeight = exports.FontSize = exports.TextAlign = exports.TextType = exports.CustomText = exports.TimeFormat = exports.CustomDateTimePicker = exports.CustomTreeView = exports.CustomSimpleSelect = exports.CustomSelect = exports.CustomRadioButton = exports.CustomPhoneInput = exports.CustomTextarea = exports.InputType = exports.CustomInput = exports.CustomCheckbox = exports.CustomButton = exports.CustomAutocompleteInput = exports.ElementType = exports.CustomForm = void 0;
8
+ // ---- Form orchestrator ----
9
+ var CustomForm_1 = require("./components/CustomForm");
10
+ Object.defineProperty(exports, "CustomForm", { enumerable: true, get: function () { return __importDefault(CustomForm_1).default; } });
11
+ Object.defineProperty(exports, "ElementType", { enumerable: true, get: function () { return CustomForm_1.ElementType; } });
12
+ // ---- Inputs ----
12
13
  var CustomAutocompleteInput_1 = require("./components/CustomAutocompleteInput");
13
14
  Object.defineProperty(exports, "CustomAutocompleteInput", { enumerable: true, get: function () { return __importDefault(CustomAutocompleteInput_1).default; } });
14
15
  var CustomButton_1 = require("./components/CustomButton");
@@ -24,18 +25,18 @@ var CustomPhoneInput_1 = require("./components/CustomPhoneInput");
24
25
  Object.defineProperty(exports, "CustomPhoneInput", { enumerable: true, get: function () { return __importDefault(CustomPhoneInput_1).default; } });
25
26
  var CustomRadioButton_1 = require("./components/CustomRadioButton");
26
27
  Object.defineProperty(exports, "CustomRadioButton", { enumerable: true, get: function () { return __importDefault(CustomRadioButton_1).default; } });
27
- // Selects / Tree
28
+ // ---- Selects / Tree ----
28
29
  var CustomSelect_1 = require("./components/CustomSelect");
29
30
  Object.defineProperty(exports, "CustomSelect", { enumerable: true, get: function () { return __importDefault(CustomSelect_1).default; } });
30
31
  var CustomSimpleSelect_1 = require("./components/CustomSimpleSelect");
31
32
  Object.defineProperty(exports, "CustomSimpleSelect", { enumerable: true, get: function () { return __importDefault(CustomSimpleSelect_1).default; } });
32
33
  var CustomTreeView_1 = require("./components/CustomTreeView");
33
34
  Object.defineProperty(exports, "CustomTreeView", { enumerable: true, get: function () { return __importDefault(CustomTreeView_1).default; } });
34
- // Date & Time
35
+ // ---- Date & Time ----
35
36
  var CustomDateTimePicker_1 = require("./components/CustomDateTimePicker");
36
37
  Object.defineProperty(exports, "CustomDateTimePicker", { enumerable: true, get: function () { return __importDefault(CustomDateTimePicker_1).default; } });
37
38
  Object.defineProperty(exports, "TimeFormat", { enumerable: true, get: function () { return CustomDateTimePicker_1.TimeFormat; } });
38
- // Layout / Text / Visual
39
+ // ---- Text / Divider / Modal ----
39
40
  var CustomText_1 = require("./components/CustomText");
40
41
  Object.defineProperty(exports, "CustomText", { enumerable: true, get: function () { return __importDefault(CustomText_1).default; } });
41
42
  Object.defineProperty(exports, "TextType", { enumerable: true, get: function () { return CustomText_1.TextType; } });
@@ -52,18 +53,18 @@ Object.defineProperty(exports, "DividerThickness", { enumerable: true, get: func
52
53
  Object.defineProperty(exports, "DividerWidth", { enumerable: true, get: function () { return CustomDivider_1.Width; } });
53
54
  var CustomModal_1 = require("./components/CustomModal");
54
55
  Object.defineProperty(exports, "CustomModal", { enumerable: true, get: function () { return __importDefault(CustomModal_1).default; } });
55
- // Data
56
+ // ---- Data / Tables ----
56
57
  var CustomDatatable_1 = require("./components/CustomDatatable");
57
58
  Object.defineProperty(exports, "CustomDatatable", { enumerable: true, get: function () { return __importDefault(CustomDatatable_1).default; } });
58
- // Files
59
+ // ---- Files ----
59
60
  var CustomFileUploader_1 = require("./components/CustomFileUploader");
60
61
  Object.defineProperty(exports, "CustomFileUploader", { enumerable: true, get: function () { return __importDefault(CustomFileUploader_1).default; } });
61
62
  Object.defineProperty(exports, "AllowedTypes", { enumerable: true, get: function () { return CustomFileUploader_1.AllowedTypes; } });
62
63
  Object.defineProperty(exports, "defaultTranslations", { enumerable: true, get: function () { return CustomFileUploader_1.defaultTranslations; } });
63
- // Rich Text
64
+ // ---- Rich Text ----
64
65
  var CustomRichTextbox_1 = require("./components/CustomRichTextbox");
65
66
  Object.defineProperty(exports, "CustomRichTextbox", { enumerable: true, get: function () { return __importDefault(CustomRichTextbox_1).default; } });
66
- // Progress / Tabs / Timeline
67
+ // ---- Progress / Tabs / Timeline ----
67
68
  var CustomProgressBar_1 = require("./components/CustomProgressBar");
68
69
  Object.defineProperty(exports, "CustomProgressBar", { enumerable: true, get: function () { return __importDefault(CustomProgressBar_1).default; } });
69
70
  var CustomTab_1 = require("./components/CustomTab");
@@ -73,7 +74,5 @@ Object.defineProperty(exports, "TabSize", { enumerable: true, get: function () {
73
74
  var CustomTimeline_1 = require("./components/CustomTimeline");
74
75
  Object.defineProperty(exports, "CustomTimeline", { enumerable: true, get: function () { return __importDefault(CustomTimeline_1).default; } });
75
76
  Object.defineProperty(exports, "DotColor", { enumerable: true, get: function () { return CustomTimeline_1.DotColor; } });
76
- // Form Orchestrator (barrel + named like before)
77
- var CustomForm_1 = require("./components/CustomForm");
78
- Object.defineProperty(exports, "CustomForm", { enumerable: true, get: function () { return __importDefault(CustomForm_1).default; } });
79
- Object.defineProperty(exports, "ElementType", { enumerable: true, get: function () { return CustomForm_1.ElementType; } });
77
+ var notify_1 = require("./types/notify");
78
+ Object.defineProperty(exports, "noopNotify", { enumerable: true, get: function () { return notify_1.noopNotify; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "albinasoft-ui-package",
3
- "version": "1.1.58",
3
+ "version": "1.1.60",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,28 +0,0 @@
1
- import React from "react";
2
- export interface AlbinaFormHandles {
3
- getFormValues: () => Record<string, any>;
4
- }
5
- export interface AlbinaFormProps {
6
- /** Başlangıç form değerleri */
7
- initialValues?: Record<string, any>;
8
- /** Form elemanları konfigürasyonu (CustomForm’un elements prop’una verilecek) */
9
- elements: any[];
10
- /** İç satırın sınıfı */
11
- innerRowCustomClass?: string;
12
- /** Onay buton etiketi */
13
- confirmLabel?: string;
14
- /** İptal buton etiketi */
15
- cancelLabel?: string;
16
- /** Onay butonu görünürlüğü */
17
- showConfirmButton?: boolean;
18
- /** İptal butonu görünürlüğü */
19
- showCancelButton?: boolean;
20
- /** Form gönderme işlemi */
21
- onSubmit: (values: Record<string, any>) => Promise<any> | void;
22
- /** İptal işlemi */
23
- onCancel?: () => void;
24
- /** Form değeri değiştiğinde çağrılacak callback */
25
- onValuesChange?: (values: Record<string, any>) => void;
26
- }
27
- declare const AlbinaForm: React.ForwardRefExoticComponent<AlbinaFormProps & React.RefAttributes<AlbinaFormHandles>>;
28
- export default AlbinaForm;
@@ -1,88 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
- if (k2 === undefined) k2 = k;
15
- var desc = Object.getOwnPropertyDescriptor(m, k);
16
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
- desc = { enumerable: true, get: function() { return m[k]; } };
18
- }
19
- Object.defineProperty(o, k2, desc);
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- var react_1 = __importStar(require("react"));
38
- var CustomForm_1 = __importStar(require("./CustomForm"));
39
- var AlbinaForm = (0, react_1.forwardRef)(function (_a, ref) {
40
- var _b = _a.initialValues, initialValues = _b === void 0 ? {} : _b, elements = _a.elements, _c = _a.innerRowCustomClass, innerRowCustomClass = _c === void 0 ? "justify-content-evenly" : _c, _d = _a.confirmLabel, confirmLabel = _d === void 0 ? "Gönder" : _d, _e = _a.cancelLabel, cancelLabel = _e === void 0 ? "İptal" : _e, _f = _a.showConfirmButton, showConfirmButton = _f === void 0 ? true : _f, _g = _a.showCancelButton, showCancelButton = _g === void 0 ? false : _g, onSubmit = _a.onSubmit, onCancel = _a.onCancel, onValuesChange = _a.onValuesChange;
41
- var _h = (0, react_1.useState)(initialValues), formValues = _h[0], setFormValues = _h[1];
42
- // Form değerleri değiştikçe dışarıya bildiriyoruz.
43
- (0, react_1.useEffect)(function () {
44
- if (onValuesChange) {
45
- onValuesChange(formValues);
46
- }
47
- }, [formValues, onValuesChange]);
48
- var handleInputChange = function (id) { return function (e) {
49
- if (e instanceof Date || e === null) {
50
- setFormValues(function (prev) {
51
- var _a;
52
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
53
- });
54
- }
55
- else if (e.target) {
56
- var _a = e.target, type_1 = _a.type, checked_1 = _a.checked, value_1 = _a.value;
57
- setFormValues(function (prev) {
58
- var _a;
59
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = type_1 === "checkbox" ? checked_1 : value_1, _a)));
60
- });
61
- }
62
- else {
63
- setFormValues(function (prev) {
64
- var _a;
65
- return (__assign(__assign({}, prev), (_a = {}, _a[id] = e, _a)));
66
- });
67
- }
68
- }; };
69
- var enhancedElements = elements.map(function (element) {
70
- if (element.id && element.type === CustomForm_1.ElementType.SELECT) {
71
- return __assign(__assign({}, element), { value: formValues[element.id] || [], onChange: handleInputChange(element.id) });
72
- }
73
- else if (element.id) {
74
- return __assign(__assign({}, element), { value: formValues[element.id] || "", onChange: handleInputChange(element.id) });
75
- }
76
- return element;
77
- });
78
- var handleFormSubmit = function (values) {
79
- onSubmit(formValues);
80
- };
81
- // Ref üzerinden dışarıya sunulacak metod
82
- var getFormValues = function () { return formValues; };
83
- (0, react_1.useImperativeHandle)(ref, function () { return ({
84
- getFormValues: getFormValues,
85
- }); });
86
- return (react_1.default.createElement(CustomForm_1.default, { elements: enhancedElements, innerRowCustomClass: innerRowCustomClass, confirmLabel: confirmLabel, cancelLabel: cancelLabel, showConfirmButton: showConfirmButton, showCancelButton: showCancelButton, onSubmit: handleFormSubmit, handleCancel: onCancel }));
87
- });
88
- exports.default = AlbinaForm;