forstok-ui-lib 4.1.0 → 5.0.0
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/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/button/{button.tsx → index.tsx} +1 -1
- package/src/components/checkbox/{checkbox.tsx → index.tsx} +2 -2
- package/src/components/dropdown/{dropdown.tsx → index.tsx} +3 -3
- package/src/components/dropdown/{dropdown.styles.ts → styles.ts} +1 -1
- package/src/components/icon/{icon.tsx → index.tsx} +2 -2
- package/src/components/index.ts +16 -16
- package/src/components/input/{input.tsx → index.tsx} +1 -1
- package/src/components/label/{label.tsx → index.tsx} +1 -1
- package/src/components/link/{link.tsx → index.tsx} +1 -1
- package/src/components/loading/{loading.tsx → index.tsx} +1 -1
- package/src/components/loading/{loading.styles.ts → styles.ts} +1 -1
- package/src/components/message/{message.tsx → index.tsx} +3 -3
- package/src/components/message/{message_question.tsx → question.tsx} +4 -4
- package/src/components/popup/{popup.tsx → index.tsx} +4 -4
- package/src/components/popup/{popup.typed.ts → typed.ts} +2 -2
- package/src/components/text/{text.tsx → index.tsx} +1 -1
- package/src/typeds/shares.typed.ts +3 -3
- /package/src/components/button/{button.styles.ts → styles.ts} +0 -0
- /package/src/components/checkbox/{checkbox.styles.ts → styles.ts} +0 -0
- /package/src/components/dropdown/{dropdown.typed.ts → typed.ts} +0 -0
- /package/src/components/icon/{icon.styles.ts → styles.ts} +0 -0
- /package/src/components/input/{input.styles.ts → styles.ts} +0 -0
- /package/src/components/label/{label.styles.ts → styles.ts} +0 -0
- /package/src/components/link/{link.styles.ts → styles.ts} +0 -0
- /package/src/components/message/{message.styles.ts → styles.ts} +0 -0
- /package/src/components/message/{message.typed.ts → typed.ts} +0 -0
- /package/src/components/popup/{popup.styles.ts → styles.ts} +0 -0
- /package/src/components/portal/{react_portal.tsx → index.tsx} +0 -0
- /package/src/components/text/{text.styles.ts → styles.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, ReactNode, RefObject } from 'react' ;
|
|
2
|
-
import { ButtonContainer, IndicatorsArrowIconSvg } from './
|
|
2
|
+
import { ButtonContainer, IndicatorsArrowIconSvg } from './styles';
|
|
3
3
|
|
|
4
4
|
type TButton = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
5
|
children?: ReactNode
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useRef, useEffect, useState, type PropsWithChildren, type InputHTMLAttributes, type ChangeEvent } from 'react';
|
|
2
|
-
import InputComponent from '../input
|
|
3
|
-
import { CheckboxContainer, CheckmarkContainer } from './
|
|
2
|
+
import InputComponent from '../input';
|
|
3
|
+
import { CheckboxContainer, CheckmarkContainer } from './styles';
|
|
4
4
|
import type { TState } from '../../typeds/base.typed';
|
|
5
5
|
|
|
6
6
|
type TInput = InputHTMLAttributes<HTMLInputElement> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useRef, isValidElement } from 'react';
|
|
2
|
-
import ReactPortalComponent from '../portal
|
|
3
|
-
import { DropDownContainer, DropDownTitle, DropDownSubTitle, DropDownWrapper, DropDownOverlayWrapper, DropDownControl, DropDownBody, DropDownAction, DropdownControlWrapper, DropdownPortalContainer } from './
|
|
2
|
+
import ReactPortalComponent from '../portal';
|
|
3
|
+
import { DropDownContainer, DropDownTitle, DropDownSubTitle, DropDownWrapper, DropDownOverlayWrapper, DropDownControl, DropDownBody, DropDownAction, DropdownControlWrapper, DropdownPortalContainer } from './styles';
|
|
4
4
|
import type { TMouseEvent } from '../../typeds/base.typed';
|
|
5
|
-
import type { TDropdown } from './
|
|
5
|
+
import type { TDropdown } from './typed';
|
|
6
6
|
|
|
7
7
|
const DropDownComponent = ({ children, title, subTitle, $externalWidth, $externalMinWidth, $internalWidth, $area, $openPosition, $placement, $top, onClick, $alias, type, portalId, $bottom, ...props }: TDropdown) => {
|
|
8
8
|
const buttonRef = useRef<HTMLElement>(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { dropBase } from '../../assets/stylesheets/bases.styles';
|
|
3
|
-
import type { TDropdown } from './
|
|
3
|
+
import type { TDropdown } from './typed';
|
|
4
4
|
|
|
5
5
|
type TDropdownChild = Pick<TDropdown, '$internalWidth' | '$openPosition' | '$placement' | '$bottom' | '$top'>
|
|
6
6
|
type TDropdownParent = Pick<TDropdown, '$openPosition' | '$placement' | '$bottom' | '$top' | '$alias' | '$externalWidth' | '$externalMinWidth' | '$area'>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import LoadingComponent from '../loading
|
|
3
|
-
import { IconContainer } from './
|
|
2
|
+
import LoadingComponent from '../loading';
|
|
3
|
+
import { IconContainer } from './styles';
|
|
4
4
|
|
|
5
5
|
type TIcon = HTMLAttributes<HTMLElement> & {
|
|
6
6
|
$mode?: string
|
package/src/components/index.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export { default as TextComponent } from './text
|
|
2
|
-
export { default as LinkComponent } from './link
|
|
3
|
-
export { default as InputComponent } from './input
|
|
4
|
-
export { default as CheckboxComponent } from './checkbox
|
|
5
|
-
export { default as ButtonComponent } from './button
|
|
6
|
-
export { default as LabelComponent } from './label
|
|
7
|
-
export { default as IconComponent } from './icon
|
|
8
|
-
export { default as LoadingComponent } from './loading
|
|
9
|
-
export { default as DropdownComponent } from './dropdown
|
|
10
|
-
export { default as MessageComponent } from './message
|
|
11
|
-
export { default as MessageQuestionComponent } from './message/
|
|
12
|
-
export { default as PopupComponent } from './popup
|
|
13
|
-
export { default as ReactPortalComponent } from './portal
|
|
1
|
+
export { default as TextComponent } from './text';
|
|
2
|
+
export { default as LinkComponent } from './link';
|
|
3
|
+
export { default as InputComponent } from './input';
|
|
4
|
+
export { default as CheckboxComponent } from './checkbox';
|
|
5
|
+
export { default as ButtonComponent } from './button';
|
|
6
|
+
export { default as LabelComponent } from './label';
|
|
7
|
+
export { default as IconComponent } from './icon';
|
|
8
|
+
export { default as LoadingComponent } from './loading';
|
|
9
|
+
export { default as DropdownComponent } from './dropdown';
|
|
10
|
+
export { default as MessageComponent } from './message';
|
|
11
|
+
export { default as MessageQuestionComponent } from './message/question';
|
|
12
|
+
export { default as PopupComponent } from './popup';
|
|
13
|
+
export { default as ReactPortalComponent } from './portal';
|
|
14
14
|
|
|
15
|
-
export * from './dropdown/
|
|
16
|
-
export * from './message/
|
|
17
|
-
export * from './popup/
|
|
15
|
+
export * from './dropdown/typed';
|
|
16
|
+
export * from './message/typed';
|
|
17
|
+
export * from './popup/typed';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, type InputHTMLAttributes, type ChangeEvent, type FocusEvent, type KeyboardEvent, type ClipboardEvent } from 'react';
|
|
2
|
-
import { InputContainer } from './
|
|
2
|
+
import { InputContainer } from './styles';
|
|
3
3
|
import type { TEnterEvent, TKeyboadEvent, TState } from '../../typeds/base.typed';
|
|
4
4
|
|
|
5
5
|
type TInput = InputHTMLAttributes<HTMLInputElement> & {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, ReactNode, MouseEvent, HTMLAttributes } from 'react';
|
|
2
|
-
import { AnchorLinkContainer, ElLinkContainer } from './
|
|
2
|
+
import { AnchorLinkContainer, ElLinkContainer } from './styles';
|
|
3
3
|
|
|
4
4
|
type TLinkBase = {
|
|
5
5
|
children: ReactNode
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
|
-
import { LoadingContainer, LoadingParentContainer } from './
|
|
2
|
+
import { LoadingContainer, LoadingParentContainer } from './styles';
|
|
3
3
|
|
|
4
4
|
export type TLoading = HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
$mode?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useCallback, useEffect } from 'react';
|
|
2
2
|
import { useStateWithCallbackLazy } from 'use-state-with-callback';
|
|
3
|
-
import ButtonComponent from '../button
|
|
4
|
-
import { Message, MessageOverlay, MessageContainer, MessageWrapper, MessageContent } from './
|
|
5
|
-
import type { TMessage } from './
|
|
3
|
+
import ButtonComponent from '../button';
|
|
4
|
+
import { Message, MessageOverlay, MessageContainer, MessageWrapper, MessageContent } from './styles';
|
|
5
|
+
import type { TMessage } from './typed';
|
|
6
6
|
|
|
7
7
|
const MessageComponent = ({ timer=500, $type, message, callback }: TMessage) => {
|
|
8
8
|
const [isOpen, setOpen] = useStateWithCallbackLazy<boolean>(false);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useCallback, useEffect } from 'react';
|
|
2
2
|
import { htmlToText } from 'html-to-text';
|
|
3
3
|
import { useStateWithCallbackLazy } from 'use-state-with-callback';
|
|
4
|
-
import ButtonComponent from '../button
|
|
5
|
-
import TextComponent from '../text
|
|
6
|
-
import { Message, MessageOverlay, MessageContainer, MessageWrapper, MessageContent } from './
|
|
7
|
-
import type { TMessageQuestion } from './
|
|
4
|
+
import ButtonComponent from '../button';
|
|
5
|
+
import TextComponent from '../text';
|
|
6
|
+
import { Message, MessageOverlay, MessageContainer, MessageWrapper, MessageContent } from './styles'
|
|
7
|
+
import type { TMessageQuestion } from './typed'
|
|
8
8
|
|
|
9
9
|
const MessageQuestionComponent = ({ $type, title, subtitle, callback, buttonSubmit, cancelCallback }: TMessageQuestion) => {
|
|
10
10
|
const [isOpen, setOpen] = useStateWithCallbackLazy<boolean>(false);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode, isValidElement, useEffect, useRef, useCallback } from 'react';
|
|
2
2
|
import { useStateWithCallbackLazy } from 'use-state-with-callback';
|
|
3
|
-
import ButtonComponent from '../button
|
|
4
|
-
import IconComponent from '../icon
|
|
5
|
-
import { PopupPanel, PopupOverlay, PopupContainer, PopupWrapper, PopupHeaderWrapper, PopupHeader, PopupBody, PopupFooter, PopupQuestionWrapper } from './
|
|
6
|
-
import type { TPopup } from './
|
|
3
|
+
import ButtonComponent from '../button';
|
|
4
|
+
import IconComponent from '../icon';
|
|
5
|
+
import { PopupPanel, PopupOverlay, PopupContainer, PopupWrapper, PopupHeaderWrapper, PopupHeader, PopupBody, PopupFooter, PopupQuestionWrapper } from './styles';
|
|
6
|
+
import type { TPopup } from './typed';
|
|
7
7
|
|
|
8
8
|
type TPopupOtherProp = {
|
|
9
9
|
children: ReactNode[]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MouseEvent } from 'react'
|
|
2
2
|
|
|
3
|
-
import type { TMessageFunction } from '../message/
|
|
3
|
+
import type { TMessageFunction } from '../message/typed'
|
|
4
4
|
|
|
5
5
|
export type TPopupOpenFunction = (e: MouseEvent, el?: string) => void
|
|
6
6
|
|
|
@@ -21,7 +21,7 @@ export type TPopupFunctionGroup = {
|
|
|
21
21
|
|
|
22
22
|
export type TPopupContainer = {
|
|
23
23
|
isOpen: boolean
|
|
24
|
-
} & Required<TPopupFunctionParam> &
|
|
24
|
+
} & Required<TPopupFunctionParam> & TPopupFunctionGroup
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
export type TPopup = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TObject } from './base.typed';
|
|
2
|
-
import { TCloseDropdownFunction } from '../components/dropdown/
|
|
3
|
-
import { TMessageFunction, TMessageQuestionFunction } from '../components/message/
|
|
4
|
-
import { TPopupFunction, TPopupOpenFunction } from '../components/popup/
|
|
2
|
+
import { TCloseDropdownFunction } from '../components/dropdown/typed';
|
|
3
|
+
import { TMessageFunction, TMessageQuestionFunction } from '../components/message/typed';
|
|
4
|
+
import { TPopupFunction, TPopupOpenFunction } from '../components/popup/typed';
|
|
5
5
|
|
|
6
6
|
export type TUser = {
|
|
7
7
|
profile_id: number,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|