@inntechcorp/it-design 3.1.24 → 4.0.0-beta.1
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/ACCESSIBILITY.md +517 -0
- package/README.md +88 -11
- package/dist/accordion/index.d.ts +2 -2
- package/dist/accordion/item/styled.d.ts +2 -2
- package/dist/accordion/styled.d.ts +1 -0
- package/dist/accordion/submenu/styled.d.ts +5 -5
- package/dist/alert/Description.d.ts +7 -0
- package/dist/alert/Title.d.ts +7 -0
- package/dist/alert/alert.style.error.d.ts +1 -1
- package/dist/alert/alert.style.info.d.ts +1 -1
- package/dist/alert/alert.style.neutral.d.ts +4 -0
- package/dist/alert/alert.style.success.d.ts +1 -1
- package/dist/alert/alert.style.warning.d.ts +1 -1
- package/dist/alert/index.d.ts +4 -2
- package/dist/alert/styled.d.ts +4 -8
- package/dist/alink/index.d.ts +2 -10
- package/dist/alink/styled.d.ts +1 -1
- package/dist/back-top/styled.d.ts +2 -2
- package/dist/button/button.style.default.d.ts +1 -1
- package/dist/button/button.style.filled.d.ts +1 -1
- package/dist/button/button.style.ghost.d.ts +1 -1
- package/dist/button/button.style.icon.d.ts +2 -2
- package/dist/button/button.style.link.d.ts +1 -1
- package/dist/button/button.style.outline.d.ts +1 -1
- package/dist/button/button.style.size.d.ts +4 -1
- package/dist/button/button.style.solid.d.ts +1 -1
- package/dist/button/index.d.ts +10 -2
- package/dist/button/styled.d.ts +3 -12
- package/dist/calendar/day/Day.d.ts +2 -2
- package/dist/calendar/day/styled.d.ts +1 -1
- package/dist/calendar/header/styled.d.ts +6 -6
- package/dist/calendar/index.d.ts +11 -3
- package/dist/calendar/styled.d.ts +6 -6
- package/dist/card/Card.d.ts +9 -0
- package/dist/card/CardAction.d.ts +7 -0
- package/dist/card/CardContent.d.ts +7 -0
- package/dist/card/CardDescription.d.ts +7 -0
- package/dist/card/CardFooter.d.ts +8 -0
- package/dist/card/CardHeader.d.ts +8 -0
- package/dist/card/CardTabs.d.ts +7 -0
- package/dist/card/CardTitle.d.ts +7 -0
- package/dist/card/index.d.ts +8 -3
- package/dist/card/styles.d.ts +9 -9
- package/dist/checkbox/group/index.d.ts +1 -1
- package/dist/checkbox/group/styled.d.ts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/styled.d.ts +6 -5
- package/dist/context/ITDContext.d.ts +3 -2
- package/dist/context/ITDThemeProvider.d.ts +8 -0
- package/dist/context/styled.d.ts +1 -1
- package/dist/datepicker/index.d.ts +2 -2
- package/dist/datepicker/styled.d.ts +5 -5
- package/dist/enums/enum.d.ts +138 -8
- package/dist/flex/index.d.ts +1 -1
- package/dist/flex/styled.d.ts +2 -2
- package/dist/floating/Arrow.d.ts +17 -0
- package/dist/floating/FloatingContent.d.ts +60 -0
- package/dist/floating/mergeTriggerProps.d.ts +8 -0
- package/dist/form/context/FormContext.d.ts +5 -2
- package/dist/form/context/FormStore.d.ts +6 -3
- package/dist/form/control/Control.d.ts +1 -1
- package/dist/form/control/styled.d.ts +1 -1
- package/dist/form/group/Group.d.ts +1 -1
- package/dist/form/group/styled.d.ts +1 -1
- package/dist/form/index.d.ts +5 -5
- package/dist/form/item/Item.d.ts +2 -3
- package/dist/form/validation/Validator.d.ts +2 -3
- package/dist/form/wrapper/FormWrapper.d.ts +2 -2
- package/dist/helpers/binary/GetTypeByFileType.d.ts +2 -2
- package/dist/helpers/country/GetCountryCodeByCurrencyCode.d.ts +1 -1
- package/dist/helpers/country/GetCountryCodeByLanguage.d.ts +1 -1
- package/dist/helpers/css/FindSelector.d.ts +10 -0
- package/dist/helpers/currency/ConvertCurrency.d.ts +1 -1
- package/dist/helpers/currency/GetCurrencyFormat.d.ts +9 -0
- package/dist/helpers/currency/GetCurrencySymbol.d.ts +1 -1
- package/dist/helpers/datetime/FormatTime.d.ts +1 -1
- package/dist/helpers/datetime/dayjsSetup.d.ts +1 -1
- package/dist/helpers/index.d.ts +36 -32
- package/dist/helpers/locale/getLocaleDateByString.d.ts +1 -0
- package/dist/helpers/svg/styles.d.ts +1 -1
- package/dist/helpers/theme/Color.d.ts +19 -0
- package/dist/helpers/theme/GenerateColorScale.d.ts +16 -0
- package/dist/helpers/theme/cssVariables.d.ts +30 -0
- package/dist/helpers/theme/dark.d.ts +3 -0
- package/dist/helpers/theme/index.d.ts +9 -0
- package/dist/helpers/theme/light.d.ts +3 -0
- package/dist/helpers/theme/themes.d.ts +5 -0
- package/dist/helpers/theme/tokens.d.ts +392 -0
- package/dist/hooks/index.d.ts +15 -15
- package/dist/hooks/useAddExternalCSS.d.ts +4 -5
- package/dist/hooks/useAvoidCollision.d.ts +6 -1
- package/dist/hooks/useComponentSize.d.ts +1 -1
- package/dist/hooks/useConnectionStatus.d.ts +1 -1
- package/dist/hooks/useFloatingPosition.d.ts +63 -0
- package/dist/hooks/useFloatingTrigger.d.ts +64 -0
- package/dist/hooks/useFocusTrap.d.ts +36 -0
- package/dist/hooks/useOnClickOutside.d.ts +1 -1
- package/dist/hooks/useSingleQuery.d.ts +1 -1
- package/dist/hovercard/HoverCard.d.ts +12 -0
- package/dist/hovercard/HoverCardContent.d.ts +22 -0
- package/dist/hovercard/HoverCardTrigger.d.ts +17 -0
- package/dist/hovercard/hoverCardContext.d.ts +7 -0
- package/dist/hovercard/index.d.ts +4 -0
- package/dist/html/header/H1.d.ts +1 -1
- package/dist/html/header/H2.d.ts +1 -1
- package/dist/html/header/H3.d.ts +1 -1
- package/dist/html/header/H4.d.ts +1 -1
- package/dist/html/header/index.d.ts +4 -4
- package/dist/html/header/styled.d.ts +4 -4
- package/dist/icons/index.d.ts +11 -14
- package/dist/image/index.d.ts +1 -2
- package/dist/image/styled.d.ts +5 -2
- package/dist/index.cjs.js +2695 -2580
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +168 -1787
- package/dist/index.es.js +22339 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.iife.js +5728 -0
- package/dist/index.iife.js.map +1 -0
- package/dist/index.umd.js +5728 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/input/index.d.ts +29 -2
- package/dist/input/style.settings.d.ts +9 -0
- package/dist/input/styled.d.ts +16 -18
- package/dist/label/index.d.ts +6 -0
- package/dist/label/style.settings.d.ts +9 -0
- package/dist/label/styled.d.ts +27 -0
- package/dist/link/index.d.ts +1 -10
- package/dist/locales/en/{calendar.json → calendar.json.d.ts} +4 -2
- package/dist/locales/en/{itd.json → itd.json.d.ts} +35 -20
- package/dist/locales/{calendar.json → tr/calendar.json.d.ts} +4 -2
- package/dist/locales/{itd.json → tr/itd.json.d.ts} +35 -21
- package/dist/logger/index.d.ts +9 -0
- package/dist/modal/container/ModalContainer.d.ts +4 -4
- package/dist/modal/container/styled.d.ts +2 -2
- package/dist/modal/context/ModalContext.d.ts +23 -14
- package/dist/modal/index.d.ts +7 -22
- package/dist/modal/modal/Modal.d.ts +2 -2
- package/dist/modal/modal/styled.d.ts +11 -11
- package/dist/notification/container/Container.d.ts +5 -0
- package/dist/notification/container/styled.d.ts +1 -0
- package/dist/notification/context/NotificationsContext.d.ts +2 -2
- package/dist/notification/index.d.ts +1 -1
- package/dist/notification/item/Item.d.ts +12 -0
- package/dist/notification/item/styled.d.ts +1166 -0
- package/dist/popover/Popover.d.ts +42 -0
- package/dist/popover/PopoverContent.d.ts +34 -0
- package/dist/popover/PopoverTrigger.d.ts +26 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/primitives/Slot.d.ts +36 -0
- package/dist/progress/styled.d.ts +1 -1
- package/dist/radio/button/RadioButton.d.ts +2 -2
- package/dist/radio/button/styled.d.ts +8 -9
- package/dist/radio/group/Group.d.ts +3 -3
- package/dist/radio/group/styled.d.ts +1 -1
- package/dist/radio/index.d.ts +2 -2
- package/dist/reportWebVitals.d.ts +2 -0
- package/dist/result/index.d.ts +2 -2
- package/dist/result/styled.d.ts +9 -9
- package/dist/select/dropdown/Dropdown.d.ts +20 -0
- package/dist/select/dropdown/styled.d.ts +14 -0
- package/dist/select/index.d.ts +1 -1
- package/dist/select/option/Option.d.ts +14 -6
- package/dist/select/option/styled.d.ts +4 -4
- package/dist/select/selector/Selector.d.ts +3 -0
- package/dist/select/selector/selectorinput/SelectorInput.d.ts +6 -0
- package/dist/select/selector/selectorinput/styled.d.ts +2 -0
- package/dist/select/selector/styled.d.ts +16 -0
- package/dist/select/style.settings.d.ts +83 -26
- package/dist/select/styled.d.ts +5 -3
- package/dist/setupTests.d.ts +1 -0
- package/dist/spin/styled.d.ts +4 -4
- package/dist/status/styled.d.ts +1 -1
- package/dist/stories/Accordion.d.ts +0 -1
- package/dist/stories/Accordion.stories.d.ts +3 -3
- package/dist/stories/Alert.stories.d.ts +18 -4
- package/dist/stories/AlertComposition.d.ts +2 -0
- package/dist/stories/AlertComposition.stories.d.ts +17 -0
- package/dist/stories/Button.d.ts +0 -1
- package/dist/stories/Button.stories.d.ts +16 -4
- package/dist/stories/Card.stories.d.ts +3 -2
- package/dist/stories/Checkbox.stories.d.ts +3 -3
- package/dist/stories/CheckboxGroup.stories.d.ts +3 -3
- package/dist/stories/CheckboxGroupControl.stories.d.ts +3 -3
- package/dist/stories/ColorScale.d.ts +10 -0
- package/dist/stories/ColorScale.stories.d.ts +24 -0
- package/dist/stories/ColorScaleCompare.d.ts +8 -0
- package/dist/stories/ColorScaleCompare.stories.d.ts +47 -0
- package/dist/stories/DatePicker.d.ts +0 -1
- package/dist/stories/DatePicker.stories.d.ts +3 -3
- package/dist/stories/Form.d.ts +1 -1
- package/dist/stories/Form.stories.d.ts +13 -3
- package/dist/stories/Header.d.ts +0 -1
- package/dist/stories/Header.stories.d.ts +5 -5
- package/dist/stories/HoverCard.d.ts +2 -0
- package/dist/stories/HoverCard.stories.d.ts +18 -0
- package/dist/stories/Input.d.ts +0 -1
- package/dist/stories/Input.stories.d.ts +86 -4
- package/dist/stories/ModalManager.d.ts +0 -1
- package/dist/stories/ModalManager.stories.d.ts +2 -2
- package/dist/stories/Page.d.ts +0 -1
- package/dist/stories/Page.stories.d.ts +2 -2
- package/dist/stories/Popover.d.ts +2 -0
- package/dist/stories/Popover.stories.d.ts +40 -0
- package/dist/stories/Progress.stories.d.ts +3 -3
- package/dist/stories/RadioGroup.stories.d.ts +3 -3
- package/dist/stories/Result.stories.d.ts +3 -3
- package/dist/stories/Select.d.ts +0 -1
- package/dist/stories/Select.stories.d.ts +16 -6
- package/dist/stories/Status.stories.d.ts +3 -3
- package/dist/stories/Switch.stories.d.ts +12 -5
- package/dist/stories/Table.stories.d.ts +2 -2
- package/dist/stories/Tabs.stories.d.ts +4 -10
- package/dist/stories/TextArea.d.ts +0 -1
- package/dist/stories/TextArea.stories.d.ts +11 -4
- package/dist/stories/Tooltip.d.ts +1 -0
- package/dist/stories/Tooltip.stories.d.ts +35 -0
- package/dist/stories/Upload.stories.d.ts +3 -8
- package/dist/stories/root/index.d.ts +1 -2
- package/dist/stories/select.styled.d.ts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/styled.d.ts +4 -4
- package/dist/table/index.d.ts +2 -2
- package/dist/table/styled.d.ts +5 -5
- package/dist/tabs/index.d.ts +2 -2
- package/dist/tabs/styles.d.ts +4 -9
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/styled.d.ts +6 -8
- package/dist/tinyscrollbar/index.d.ts +1 -2
- package/dist/tinyscrollbar/scroll.styled.d.ts +1 -1
- package/dist/tinyscrollbar/styled.d.ts +1 -1
- package/dist/tooltip/Tooltip.d.ts +12 -0
- package/dist/tooltip/TooltipContent.d.ts +15 -0
- package/dist/tooltip/TooltipTrigger.d.ts +19 -0
- package/dist/tooltip/index.d.ts +4 -0
- package/dist/tooltip/tooltipContext.d.ts +7 -0
- package/dist/types/AccordionItemProps.d.ts +1 -1
- package/dist/types/AccordionProps.d.ts +1 -1
- package/dist/types/AccordionSubMenuProps.d.ts +1 -1
- package/dist/types/AlertProps.d.ts +6 -6
- package/dist/types/ButtonProps.d.ts +13 -31
- package/dist/types/CalendarProps.d.ts +4 -5
- package/dist/types/CardProps.d.ts +7 -3
- package/dist/types/CheckboxProps.d.ts +7 -3
- package/dist/types/DatePickerProps.d.ts +8 -7
- package/dist/types/FlexProps.d.ts +2 -2
- package/dist/types/FormProps.d.ts +10 -8
- package/dist/types/ITDProps.d.ts +4 -2
- package/dist/types/InputProps.d.ts +12 -18
- package/dist/types/LabelProps.d.ts +7 -0
- package/dist/types/ModalProps.d.ts +2 -2
- package/dist/types/PopoverProps.d.ts +10 -0
- package/dist/types/RadioProps.d.ts +3 -4
- package/dist/types/ResultProps.d.ts +2 -1
- package/dist/types/SelectProps.d.ts +22 -16
- package/dist/types/SingleQueryProps.d.ts +1 -1
- package/dist/types/StatusProps.d.ts +2 -2
- package/dist/types/SwitchProps.d.ts +4 -1
- package/dist/types/TableProps.d.ts +3 -2
- package/dist/types/TabsProps.d.ts +1 -2
- package/dist/types/TextAreaProps.d.ts +3 -3
- package/dist/types/Theme.d.ts +103 -0
- package/dist/types/UploadProps.d.ts +3 -40
- package/dist/upload/index.d.ts +2 -2
- package/dist/upload/styled.d.ts +11 -45
- package/dist/utils/CommonStyledComponents.d.ts +18 -0
- package/dist/utils/ErrorAnnouncement.d.ts +25 -0
- package/dist/utils/GetButtonSizeSlug.d.ts +6 -0
- package/dist/utils/GetIconSizeBySize.d.ts +1 -1
- package/dist/utils/GetSizeBySizeSlug.d.ts +2 -2
- package/dist/utils/GetSizeSlugBySize.d.ts +5 -2
- package/dist/utils/InlineSVGCached.d.ts +1 -1
- package/dist/utils/index.d.ts +6 -4
- package/package.json +87 -64
- package/dist/button/button.style.SVG.d.ts +0 -4
- package/dist/button/button.style.circle.d.ts +0 -4
- package/dist/button/button.style.strecth.d.ts +0 -4
- package/dist/cropper/index.d.ts +0 -44
- package/dist/global.css +0 -146
- package/dist/icons/FileDocument.d.ts +0 -6
- package/dist/icons/FileExcel.d.ts +0 -5
- package/dist/icons/FilePdf.d.ts +0 -5
- package/dist/index.d.mts +0 -716
- package/dist/index.esm.js +0 -5612
- package/dist/locales/tr/calendar.json +0 -30
- package/dist/locales/tr/itd.json +0 -325
- package/dist/select/menu/Menu.d.ts +0 -14
- package/dist/select/menu/styled.d.ts +0 -8
- package/dist/select/toggle/Toggle.d.ts +0 -3
- package/dist/select/toggle/label/floating/FloatingLabel.d.ts +0 -12
- package/dist/select/toggle/label/floating/styled.d.ts +0 -8
- package/dist/select/toggle/label/single/SingleLabel.d.ts +0 -18
- package/dist/select/toggle/label/single/styled.d.ts +0 -2
- package/dist/select/toggle/styled.d.ts +0 -24
- package/dist/stories/ButtonIcon.d.ts +0 -2
package/dist/input/index.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEvent, FocusEvent } from 'react';
|
|
2
|
+
import { ITDImperativeFuncProps } from '../index';
|
|
2
3
|
/**
|
|
3
4
|
* https://github.com/sanniassin/react-input-mask
|
|
4
5
|
* http://sanniassin.github.io/react-input-mask/demo.html
|
|
5
6
|
* https://dev.to/adrianbdesigns/let-s-create-a-floating-label-input-with-html-and-css-only-4mo8
|
|
6
7
|
*/
|
|
7
|
-
declare const Input: import(
|
|
8
|
+
declare const Input: import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "children" | "prefix" | "onFocus" | "onBlur" | "onChange" | "onKeyDown"> & {
|
|
9
|
+
type?: import('../types/InputProps').InputType;
|
|
10
|
+
size?: import('../index').ITDSize;
|
|
11
|
+
variant?: import('../types/InputProps').InputVariant;
|
|
12
|
+
prefix?: import('../types/ChildrenProps').ChildrenProps;
|
|
13
|
+
suffix?: import('../types/ChildrenProps').ChildrenProps;
|
|
14
|
+
addonBefore?: import('../types/ChildrenProps').ChildrenProps;
|
|
15
|
+
addonAfter?: import('../types/ChildrenProps').ChildrenProps;
|
|
16
|
+
locked?: import('../types/ChildrenProps').ChildrenProps | boolean;
|
|
17
|
+
minValue?: number;
|
|
18
|
+
maxValue?: number;
|
|
19
|
+
keepFocus?: boolean;
|
|
20
|
+
mask?: null | string;
|
|
21
|
+
allowEmptyFormatting?: null | boolean;
|
|
22
|
+
allowLeadingZeros?: boolean;
|
|
23
|
+
decimalSeparator?: string;
|
|
24
|
+
thousandSeparator?: string;
|
|
25
|
+
decimalScale?: number;
|
|
26
|
+
focusRef?: null | import('react').MutableRefObject<HTMLDivElement>;
|
|
27
|
+
onChange?: ((value: string | number) => void) | null;
|
|
28
|
+
onUpdate?: ((value: string | number, update: boolean, validation: boolean) => void) | null;
|
|
29
|
+
onFocus?: ((event: FocusEvent<HTMLInputElement>) => void) | null;
|
|
30
|
+
onBlur?: ((event: FocusEvent<HTMLInputElement>) => void) | null;
|
|
31
|
+
onPressEnter?: ((event: KeyboardEvent) => void) | null;
|
|
32
|
+
onKeyDown?: ((event: KeyboardEvent) => void) | null;
|
|
33
|
+
children?: import('../types/ChildrenProps').ChildrenProps;
|
|
34
|
+
} & import('react').RefAttributes<ITDImperativeFuncProps>>;
|
|
8
35
|
export default Input;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentSizesSlug } from '../enums/enum';
|
|
2
|
+
export type InputSizeToken = {
|
|
3
|
+
height: string;
|
|
4
|
+
paddingX: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
fontWeight: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getInputSizeBySize: (slug: ComponentSizesSlug) => InputSizeToken;
|
package/dist/input/styled.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
declare const
|
|
1
|
+
import { ErrorTooltip, ErrorBorder } from '../utils/CommonStyledComponents';
|
|
2
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
4
|
$hasPrefix: boolean;
|
|
4
5
|
$hasSuffix: boolean;
|
|
5
6
|
$hasError: boolean;
|
|
6
7
|
}>> & string;
|
|
7
|
-
declare const Middle: import(
|
|
8
|
-
declare const IconsWrapper: import(
|
|
9
|
-
declare const Prefix: import(
|
|
10
|
-
declare const Suffix: import(
|
|
11
|
-
declare const Locked: import(
|
|
12
|
-
declare const AddonBefore: import(
|
|
13
|
-
declare const AddonAfter: import(
|
|
14
|
-
declare const LockIconWrapper: import(
|
|
8
|
+
declare const Middle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
declare const IconsWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
declare const Prefix: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
declare const Suffix: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
declare const Locked: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
declare const AddonBefore: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
14
|
+
declare const AddonAfter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
15
|
+
declare const LockIconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<{
|
|
15
16
|
className: any;
|
|
16
17
|
height: any;
|
|
17
18
|
width: any;
|
|
@@ -19,11 +20,8 @@ declare const LockIconWrapper: import("styled-components/dist/types.js").IStyled
|
|
|
19
20
|
className: any;
|
|
20
21
|
height: any;
|
|
21
22
|
width: any;
|
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element, keyof import(
|
|
23
|
-
declare const
|
|
24
|
-
declare const
|
|
25
|
-
declare const
|
|
26
|
-
|
|
27
|
-
declare const Warning: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
28
|
-
declare const Failed: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components").FastOmit<import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
29
|
-
export { Wrapper, Middle, Content, Prefix, Suffix, Locked, AddonBefore, AddonAfter, IconsWrapper, LockIconWrapper, ErrorTooltip, ErrorBorder, HiddenVisually, Success, Warning, Failed };
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
24
|
+
declare const Success: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
25
|
+
declare const Warning: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
26
|
+
declare const Failed: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
27
|
+
export { Wrapper, Middle, Content, Prefix, Suffix, Locked, AddonBefore, AddonAfter, IconsWrapper, LockIconWrapper, ErrorTooltip, ErrorBorder, Success, Warning, Failed };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentSizesSlug } from '../enums/enum';
|
|
2
|
+
export type InputSizeToken = {
|
|
3
|
+
height: string;
|
|
4
|
+
paddingX: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
lineHeight: string;
|
|
7
|
+
fontWeight: number;
|
|
8
|
+
};
|
|
9
|
+
export declare const getInputSizeBySize: (slug: ComponentSizesSlug) => InputSizeToken;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ErrorTooltip, ErrorBorder } from '../utils/CommonStyledComponents';
|
|
2
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
4
|
+
$hasPrefix: boolean;
|
|
5
|
+
$hasSuffix: boolean;
|
|
6
|
+
$hasError: boolean;
|
|
7
|
+
}>> & string;
|
|
8
|
+
declare const Middle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
declare const IconsWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
10
|
+
declare const Prefix: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
11
|
+
declare const Suffix: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
12
|
+
declare const Locked: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
13
|
+
declare const AddonBefore: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
14
|
+
declare const AddonAfter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
15
|
+
declare const LockIconWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<{
|
|
16
|
+
className: any;
|
|
17
|
+
height: any;
|
|
18
|
+
width: any;
|
|
19
|
+
}, never>> & string & Omit<({ className, height, width }: {
|
|
20
|
+
className: any;
|
|
21
|
+
height: any;
|
|
22
|
+
width: any;
|
|
23
|
+
}) => import("react/jsx-runtime").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
24
|
+
declare const Success: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
25
|
+
declare const Warning: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
26
|
+
declare const Failed: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>, never>> & string;
|
|
27
|
+
export { Wrapper, Middle, Content, Prefix, Suffix, Locked, AddonBefore, AddonAfter, IconsWrapper, LockIconWrapper, ErrorTooltip, ErrorBorder, Success, Warning, Failed };
|
package/dist/link/index.d.ts
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export interface LinkProps {
|
|
3
|
-
href: string;
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
activeClass?: string;
|
|
7
|
-
target?: string;
|
|
8
|
-
preventClick?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Link: import("react").NamedExoticComponent<LinkProps>;
|
|
11
1
|
export default Link;
|
|
2
|
+
declare function Link(props: any): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
1
|
+
declare const _default: {
|
|
2
2
|
"success": "Success",
|
|
3
3
|
"error": "Error",
|
|
4
4
|
"table": {
|
|
@@ -17,6 +17,19 @@
|
|
|
17
17
|
"birthday": "Birthday",
|
|
18
18
|
"multipleSelection": "Selected ({{- count}})"
|
|
19
19
|
},
|
|
20
|
+
"texts": {
|
|
21
|
+
"enabledNotifications": "Enable Notifications",
|
|
22
|
+
"create": "Create",
|
|
23
|
+
"read": "Read",
|
|
24
|
+
"update": "Update",
|
|
25
|
+
"delete": "Delete",
|
|
26
|
+
"selectAll": "Select All",
|
|
27
|
+
"termsAndConditions": "I have read and accepted the <a href='/terms-and-conditions'>terms and conditions</a>",
|
|
28
|
+
"campaignTitle": "Sign Up and Get 10% Off",
|
|
29
|
+
"campaignDescription": "It's our first time here? Register and get 10% off your first order.",
|
|
30
|
+
"formTitle": "Sign Up",
|
|
31
|
+
"formDescription": "By registering, you can shop faster and easier."
|
|
32
|
+
},
|
|
20
33
|
"options": {
|
|
21
34
|
"all": "All",
|
|
22
35
|
"male": "Male",
|
|
@@ -24,11 +37,6 @@
|
|
|
24
37
|
"languages": {
|
|
25
38
|
"turkish": "Turkish",
|
|
26
39
|
"english": "English"
|
|
27
|
-
},
|
|
28
|
-
"currencies": {
|
|
29
|
-
"TRY": "Turkish Lira",
|
|
30
|
-
"EUR": "Euro",
|
|
31
|
-
"USD": "Dollar"
|
|
32
40
|
}
|
|
33
41
|
},
|
|
34
42
|
"buttons": {
|
|
@@ -49,8 +57,7 @@
|
|
|
49
57
|
"adminUsernameRule": "Only English letters and digits. No symbols (-_. vs) and no space is allowed",
|
|
50
58
|
"invalidURL": "Invalid URL",
|
|
51
59
|
"fieldMustBeDifferent": "This field must be different from: {{- fields}}",
|
|
52
|
-
"forbiddenWords": "You cannot use this word in this field."
|
|
53
|
-
"multipleOf": "The value must be a multiple of {{- value}}"
|
|
60
|
+
"forbiddenWords": "You cannot use this word in this field."
|
|
54
61
|
},
|
|
55
62
|
"uploader": {
|
|
56
63
|
"header": "Drag and drop an file",
|
|
@@ -70,14 +77,7 @@
|
|
|
70
77
|
"removeFile": "Remove File",
|
|
71
78
|
"areYouSureToDeleteThisFile": "Are you sure to delete this file?",
|
|
72
79
|
"yes": "Yes",
|
|
73
|
-
"no": "No"
|
|
74
|
-
"cropImage": "Crop Image",
|
|
75
|
-
"crop": "Crop",
|
|
76
|
-
"cancel": "Cancel",
|
|
77
|
-
"width": "width",
|
|
78
|
-
"height": "height",
|
|
79
|
-
"imageTooSmall": "Image Too Small",
|
|
80
|
-
"imageTooSmallMessage": "Minimum required size is {{required}}. Your image is {{actual}}."
|
|
80
|
+
"no": "No"
|
|
81
81
|
},
|
|
82
82
|
"results": {
|
|
83
83
|
"authentication": {
|
|
@@ -89,7 +89,22 @@
|
|
|
89
89
|
"currencies": {
|
|
90
90
|
"TRY": "Turkish Lira",
|
|
91
91
|
"EUR": "Euro",
|
|
92
|
-
"USD": "Dollar"
|
|
92
|
+
"USD": "Dollar",
|
|
93
|
+
"GBP": "British Pound",
|
|
94
|
+
"JPY": "Japanese Yen",
|
|
95
|
+
"CHF": "Swiss Franc",
|
|
96
|
+
"CAD": "Canadian Dollar",
|
|
97
|
+
"AUD": "Australian Dollar",
|
|
98
|
+
"NZD": "New Zealand Dollar",
|
|
99
|
+
"RUB": "Russian Ruble",
|
|
100
|
+
"INR": "Indian Rupee",
|
|
101
|
+
"BRL": "Brazilian Real",
|
|
102
|
+
"MXN": "Mexican Peso",
|
|
103
|
+
"ARS": "Argentine Peso",
|
|
104
|
+
"CLP": "Chilean Peso",
|
|
105
|
+
"COP": "Colombian Peso",
|
|
106
|
+
"PEN": "Peruvian Sol",
|
|
107
|
+
"ZAR": "South African Rand"
|
|
93
108
|
},
|
|
94
109
|
"countries": {
|
|
95
110
|
"af": "Afghanistan",
|
|
@@ -317,8 +332,8 @@
|
|
|
317
332
|
],
|
|
318
333
|
"firstDay": 0,
|
|
319
334
|
"format": "MM/DD/YYYY"
|
|
320
|
-
},
|
|
321
|
-
"tabs": {
|
|
322
|
-
"more": "More"
|
|
323
335
|
}
|
|
324
336
|
}
|
|
337
|
+
;
|
|
338
|
+
|
|
339
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
1
|
+
declare const _default: {
|
|
2
2
|
"success": "Başarılı",
|
|
3
3
|
"error": "Hata",
|
|
4
4
|
"table": {
|
|
@@ -17,6 +17,19 @@
|
|
|
17
17
|
"birthday": "Doğum Tarihi",
|
|
18
18
|
"multipleSelection": "Seçili ({{- count}})"
|
|
19
19
|
},
|
|
20
|
+
"texts": {
|
|
21
|
+
"enabledNotifications": "Bildirimleri Aç",
|
|
22
|
+
"create": "Oluştur",
|
|
23
|
+
"read": "Oku",
|
|
24
|
+
"update": "Güncelle",
|
|
25
|
+
"delete": "Sil",
|
|
26
|
+
"selectAll": "Hepsini Seç",
|
|
27
|
+
"termsAndConditions": "<a href='/terms-and-conditions'>Kullanım Koşulları</a>'nı okudum ve kabul ediyorum.",
|
|
28
|
+
"campaignTitle": "Kayıt Ol ve %10 İndirim Al",
|
|
29
|
+
"campaignDescription": "İlk defa mı geliyorsunuz? Kayıt olun ve ilk siparişinizde %10 indirim alın.",
|
|
30
|
+
"formTitle": "Üye Ol",
|
|
31
|
+
"formDescription": "Üye olarak daha hızlı ve kolay alışveriş yapabilirsiniz."
|
|
32
|
+
},
|
|
20
33
|
"options": {
|
|
21
34
|
"all": "Hepsi",
|
|
22
35
|
"male": "Erkek",
|
|
@@ -24,11 +37,6 @@
|
|
|
24
37
|
"languages": {
|
|
25
38
|
"turkish": "Türkçe",
|
|
26
39
|
"english": "İngilizce"
|
|
27
|
-
},
|
|
28
|
-
"currencies": {
|
|
29
|
-
"TRY": "Türk Lirası",
|
|
30
|
-
"EUR": "Euro",
|
|
31
|
-
"USD": "Dolar"
|
|
32
40
|
}
|
|
33
41
|
},
|
|
34
42
|
"buttons": {
|
|
@@ -50,8 +58,7 @@
|
|
|
50
58
|
"adminUsernameRule": "Sadece ingilizce harflerden ve rakamlardan oluşmalıdır. Semboller (-_. vs) ve boşluk karakteri kullanılamaz.",
|
|
51
59
|
"invalidURL": "Geçersiz URL",
|
|
52
60
|
"fieldMustBeDifferent": "Bu alan şunlarla aynı olmamalıdır: {{- fields}}",
|
|
53
|
-
"forbiddenWords": "Bu alan içerisinde bu kelimeyi kullanamazsınız."
|
|
54
|
-
"multipleOf": "Değer {{- value}}'in katı olmalıdır."
|
|
61
|
+
"forbiddenWords": "Bu alan içerisinde bu kelimeyi kullanamazsınız."
|
|
55
62
|
},
|
|
56
63
|
"uploader": {
|
|
57
64
|
"header": "Bir resmi sürükleyip bırakın",
|
|
@@ -71,14 +78,7 @@
|
|
|
71
78
|
"removeFile": "Dosya Silme",
|
|
72
79
|
"areYouSureToDeleteThisFile": "Bu dosyayı silmek istediğinize emin misiniz?",
|
|
73
80
|
"yes": "Evet",
|
|
74
|
-
"no": "Hayır"
|
|
75
|
-
"cropImage": "Görseli Kırp",
|
|
76
|
-
"crop": "Kırp",
|
|
77
|
-
"cancel": "İptal",
|
|
78
|
-
"width": "genişlik",
|
|
79
|
-
"height": "yükseklik",
|
|
80
|
-
"imageTooSmall": "Görsel Çok Küçük",
|
|
81
|
-
"imageTooSmallMessage": "Minimum gerekli boyut {{required}}. Görseliniz {{actual}}."
|
|
81
|
+
"no": "Hayır"
|
|
82
82
|
},
|
|
83
83
|
"results": {
|
|
84
84
|
"authentication": {
|
|
@@ -90,7 +90,22 @@
|
|
|
90
90
|
"currencies": {
|
|
91
91
|
"TRY": "Türk Lirası",
|
|
92
92
|
"EUR": "Euro",
|
|
93
|
-
"USD": "Dolar"
|
|
93
|
+
"USD": "Dolar",
|
|
94
|
+
"GBP": "İngiliz Sterlini",
|
|
95
|
+
"JPY": "Japon Yeni",
|
|
96
|
+
"CHF": "İsviçre Frangı",
|
|
97
|
+
"CAD": "Kanada Doları",
|
|
98
|
+
"AUD": "Avustralya Doları",
|
|
99
|
+
"NZD": "Yeni Zelanda Doları",
|
|
100
|
+
"RUB": "Rus Rublesi",
|
|
101
|
+
"INR": "Hindistan Rupisi",
|
|
102
|
+
"BRL": "Brezilya Reali",
|
|
103
|
+
"MXN": "Meksika Pesosu",
|
|
104
|
+
"ARS": "Arjantin Pesosu",
|
|
105
|
+
"CLP": "Şili Pesosu",
|
|
106
|
+
"COP": "Kolombya Pesosu",
|
|
107
|
+
"PEN": "Peru Solü",
|
|
108
|
+
"ZAR": "Güney Afrika Randı"
|
|
94
109
|
},
|
|
95
110
|
"countries": {
|
|
96
111
|
"af": "Afganistan",
|
|
@@ -318,8 +333,7 @@
|
|
|
318
333
|
],
|
|
319
334
|
"firstDay": 1,
|
|
320
335
|
"format": "DD/MM/YYYY"
|
|
321
|
-
},
|
|
322
|
-
"tabs": {
|
|
323
|
-
"more": "Diğer"
|
|
324
336
|
}
|
|
325
|
-
}
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export default ConsoleLog;
|
|
2
|
+
declare namespace ConsoleLog {
|
|
3
|
+
export { single };
|
|
4
|
+
export { double };
|
|
5
|
+
export { table };
|
|
6
|
+
}
|
|
7
|
+
declare function single(message: any, type?: string): void;
|
|
8
|
+
declare function double(title: any, message: any, type?: string): void;
|
|
9
|
+
declare function table(data: any): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactPortal } from
|
|
2
|
-
import { ModalProps } from
|
|
3
|
-
import { ModalState } from
|
|
4
|
-
import { ModalContainerProps } from
|
|
1
|
+
import { ReactPortal } from 'react';
|
|
2
|
+
import { ModalProps } from '../../types/ModalProps';
|
|
3
|
+
import { ModalState } from '../../enums/enum';
|
|
4
|
+
import { ModalContainerProps } from '../context/ModalContext';
|
|
5
5
|
type ContainerExtraProps = {
|
|
6
6
|
/**
|
|
7
7
|
* All modals shown or to be shown.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const Wrapper: import(
|
|
2
|
-
declare const Overlay: import(
|
|
1
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
declare const Overlay: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$show: boolean;
|
|
4
4
|
}>> & string;
|
|
5
5
|
export { Wrapper, Overlay };
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { ModalState } from
|
|
2
|
-
import { ModalProps } from
|
|
3
|
-
export type
|
|
1
|
+
import { ModalState } from '../../enums/enum';
|
|
2
|
+
import { ModalProps } from '../../types/ModalProps';
|
|
3
|
+
export type ModalContextType = {
|
|
4
4
|
/**
|
|
5
5
|
* Opens a new modal with the provided information of the modal to be opened.
|
|
6
|
+
*
|
|
6
7
|
* @param data Contains the desired parameters for opening a new modal `ModalProps`.
|
|
8
|
+
* @returns
|
|
7
9
|
*/
|
|
8
10
|
showModal: (data: ModalProps) => void;
|
|
9
11
|
/**
|
|
10
12
|
* Dismisses the currently open modal with the ID of the modal to be hidden.
|
|
13
|
+
*
|
|
11
14
|
* @param id ID of the modal to be hide.
|
|
15
|
+
* @returns
|
|
12
16
|
*/
|
|
13
17
|
hideModal: (id: string) => void;
|
|
14
18
|
/**
|
|
15
19
|
* Dismisses the currently open modal with the ID of the modal to be closed.
|
|
20
|
+
*
|
|
16
21
|
* @param id ID of the modal to be dismissed.
|
|
22
|
+
* @returns
|
|
17
23
|
*/
|
|
18
24
|
removeModal: (id: string) => void;
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
26
|
+
*
|
|
27
|
+
* @returns
|
|
21
28
|
*/
|
|
22
29
|
removeAllModals: () => void;
|
|
23
|
-
};
|
|
24
|
-
export type ModalStateContextType = {
|
|
25
30
|
/**
|
|
26
31
|
* Triggered whenever any event related to modals occurs.
|
|
27
32
|
*/
|
|
@@ -31,38 +36,42 @@ export type ModalStateContextType = {
|
|
|
31
36
|
};
|
|
32
37
|
/**
|
|
33
38
|
* Returns whether a modal is visible or not.
|
|
39
|
+
*
|
|
34
40
|
* @param id The visibility information of the desired modal with its ID.
|
|
41
|
+
* @returns
|
|
35
42
|
*/
|
|
36
43
|
isVisible: (id: string) => boolean;
|
|
37
44
|
};
|
|
38
|
-
export type ModalContextType = ModalActionsContextType & ModalStateContextType;
|
|
39
45
|
export type ModalContainerProps = {
|
|
40
46
|
/**
|
|
41
47
|
* Called when another modal is requested to be shown from within a modal.
|
|
48
|
+
*
|
|
42
49
|
* @param data Contains the desired parameters for opening a new modal `ModalProps`.
|
|
50
|
+
* @returns
|
|
43
51
|
*/
|
|
44
52
|
onShowModal: (data: ModalProps) => void;
|
|
45
53
|
/**
|
|
46
54
|
* Called when it's requested to hide an open modal.
|
|
55
|
+
*
|
|
47
56
|
* @param id ID of the modal to be hide.
|
|
57
|
+
* @returns
|
|
48
58
|
*/
|
|
49
59
|
onHideModal: (id: string) => void;
|
|
50
60
|
/**
|
|
51
61
|
* Called when it's requested to dismiss an open modal.
|
|
62
|
+
*
|
|
52
63
|
* @param id ID of the modal to be dismissed.
|
|
64
|
+
* @returns
|
|
53
65
|
*/
|
|
54
66
|
onRemoveModal: (id: string) => void;
|
|
55
67
|
/**
|
|
56
68
|
* Called on any event related to modals.
|
|
69
|
+
*
|
|
57
70
|
* @param event The modal event that occurred.
|
|
58
|
-
* @param id
|
|
71
|
+
* @param id The ID of the modal.
|
|
72
|
+
* @returns
|
|
59
73
|
*/
|
|
60
74
|
onModalEvent: (event: ModalState, id: string) => void;
|
|
61
75
|
};
|
|
62
|
-
|
|
63
|
-
declare const ModalActionsContext: import("react").Context<ModalActionsContextType>;
|
|
64
|
-
/** State context - dynamic, only subscribe if needed */
|
|
65
|
-
declare const ModalStateContext: import("react").Context<ModalStateContextType>;
|
|
66
|
-
declare const ModalContext: import("react").Context<ModalContextType>;
|
|
67
|
-
export { ModalActionsContext, ModalStateContext };
|
|
76
|
+
declare const ModalContext: import('react').Context<ModalContextType>;
|
|
68
77
|
export default ModalContext;
|
package/dist/modal/index.d.ts
CHANGED
|
@@ -1,29 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModalContextType } from '../context/ModalContext';
|
|
2
2
|
export declare const ModalProvider: ({ children }: {
|
|
3
|
-
children:
|
|
3
|
+
children: any;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
/**
|
|
6
|
-
* Use
|
|
7
|
-
*
|
|
8
|
-
* @returns showModal, hideModal, removeModal, removeAllModals
|
|
6
|
+
* Use Modal hook.
|
|
7
|
+
* @returns
|
|
9
8
|
*/
|
|
10
|
-
declare const useModal: () =>
|
|
11
|
-
/**
|
|
12
|
-
* Use modal state (dynamic - will rerender on modal events)
|
|
13
|
-
* Only use this if you need to react to modal state changes.
|
|
14
|
-
* @returns modalEvent, isVisible
|
|
15
|
-
*/
|
|
16
|
-
declare const useModalState: () => ModalStateContextType;
|
|
17
|
-
/**
|
|
18
|
-
* Use both modal actions and state (legacy - will rerender on modal events)
|
|
19
|
-
* @deprecated Use useModal() for actions and useModalState() for state separately
|
|
20
|
-
* @returns All modal context values
|
|
21
|
-
*/
|
|
22
|
-
declare const useModalFull: () => ModalContextType;
|
|
9
|
+
declare const useModal: () => ModalContextType;
|
|
23
10
|
declare const ModalManager: {
|
|
24
|
-
useModal: () =>
|
|
25
|
-
useModalState: () => ModalStateContextType;
|
|
26
|
-
useModalFull: () => ModalContextType;
|
|
11
|
+
useModal: () => ModalContextType;
|
|
27
12
|
};
|
|
28
|
-
export { useModal
|
|
13
|
+
export { useModal };
|
|
29
14
|
export default ModalManager;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ModalState } from 'enums/enum';
|
|
3
|
-
import { ModalProps } from 'types/ModalProps';
|
|
2
|
+
import { ModalState } from '../../enums/enum';
|
|
3
|
+
import { ModalProps } from '../../types/ModalProps';
|
|
4
4
|
import { ModalContainerProps } from '../context/ModalContext';
|
|
5
5
|
type ModalExtraProps = {
|
|
6
6
|
isActive: boolean;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
declare const Wrapper: import(
|
|
2
|
-
declare const ModalInnerWrapper: import(
|
|
1
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
declare const ModalInnerWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$padding?: string;
|
|
4
4
|
}>> & string;
|
|
5
|
-
declare const ModalBody: import(
|
|
5
|
+
declare const ModalBody: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
6
6
|
$width: string;
|
|
7
7
|
}>> & string;
|
|
8
|
-
declare const ModalContent: import(
|
|
9
|
-
declare const ModalInnerContentBefore: import(
|
|
8
|
+
declare const ModalContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
9
|
+
declare const ModalInnerContentBefore: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
10
|
$padding?: string;
|
|
11
11
|
}>> & string;
|
|
12
|
-
declare const ModalInnerContentAfter: import(
|
|
12
|
+
declare const ModalInnerContentAfter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
13
13
|
$padding?: string;
|
|
14
14
|
}>> & string;
|
|
15
|
-
declare const ModalInnerContent: import(
|
|
15
|
+
declare const ModalInnerContent: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
16
16
|
$padding?: string;
|
|
17
17
|
}>> & string;
|
|
18
|
-
declare const ModalHeader: import(
|
|
19
|
-
declare const ModalFooter: import(
|
|
20
|
-
declare const CloseButton: import(
|
|
21
|
-
declare const ModalContainer: import(
|
|
18
|
+
declare const ModalHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
19
|
+
declare const ModalFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
20
|
+
declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
21
|
+
declare const ModalContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
22
|
export { Wrapper, ModalInnerWrapper, ModalBody, ModalContent, ModalInnerContent, ModalInnerContentBefore, ModalInnerContentAfter, ModalHeader, ModalFooter, CloseButton, ModalContainer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|