@itcase/ui 1.2.28 → 1.2.30
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/{Badge-CrhdvxY6.js → Badge-BZYBmgBK.js} +4 -7
- package/dist/{Badge-2JkquAEb.js → Badge-TyPbVqR_.js} +4 -7
- package/dist/{Button-COsywjkv.js → Button-BcOsYgoT.js} +5 -4
- package/dist/{Button-C0M-Ap20.js → Button-avhviao1.js} +6 -5
- package/dist/{DropdownItem-D0dOP4NL.js → DropdownItem-CFkRx8LX.js} +2 -2
- package/dist/{DropdownItem-D52wxY6I.js → DropdownItem-toApJyeB.js} +1 -1
- package/dist/{Group-B2oTJg0t.js → Group-BiN0haVp.js} +2 -1
- package/dist/{Group-CVUfaHaS.js → Group-Dc70Z4_7.js} +2 -1
- package/dist/{Icon-CkynFJm4.js → Icon-B2BwTQnP.js} +3 -2
- package/dist/{Icon-CliIEdbp.js → Icon-ClsRaxDk.js} +4 -3
- package/dist/{Input-BSpFMsrf.js → Input-BaicBuyd.js} +4 -4
- package/dist/{Input-UkM-ag48.js → Input-DbzsXvEf.js} +4 -4
- package/dist/{Label-ukXod6pv.js → Label-BfotYOmD.js} +7 -6
- package/dist/{Label-BPP0om7_.js → Label-fp2Bus_T.js} +7 -6
- package/dist/{Link-CeQuavin.js → Link-CzC1kU5C.js} +1 -1
- package/dist/{Loader-CJ8ZCdwy.js → Loader-CU_5Ydmy.js} +4 -3
- package/dist/{Loader-fA11tUEJ.js → Loader-Ck59IXGG.js} +4 -3
- package/dist/{MenuItem-BL6WBNjL.js → MenuItem-BEYVY0Vf.js} +8 -7
- package/dist/{MenuItem-B5ypY7Uo.js → MenuItem-BJ3uGKCH.js} +7 -6
- package/dist/{Text-_YhyTsQ1.js → Text-CC0xnhmx.js} +4 -3
- package/dist/{Text-CG3xPG27.js → Text-kxGZButz.js} +4 -3
- package/dist/{Title-CqwqEtm7.js → Title-CQ_Fr1hO.js} +4 -3
- package/dist/{Title-B-N0qkn3.js → Title-Ze_OL1Co.js} +4 -3
- package/dist/{Tooltip-DsTCGS6h.js → Tooltip-PrwacZFC.js} +5 -4
- package/dist/{Tooltip-B2vv4OAX.js → Tooltip-ccRCMYQM.js} +5 -4
- package/dist/appearance/Badge.js +44 -0
- package/dist/appearance/Button.js +53 -0
- package/dist/appearance/Checkbox.js +21 -0
- package/dist/appearance/Chips.js +40 -0
- package/dist/appearance/Choice.js +15 -0
- package/dist/appearance/DatePicker.js +5 -0
- package/dist/appearance/Group.js +11 -0
- package/dist/appearance/Icon.js +12 -0
- package/dist/appearance/Input.js +56 -0
- package/dist/appearance/InputPassword.js +55 -0
- package/dist/appearance/Label.js +54 -0
- package/dist/appearance/Loader.js +28 -0
- package/dist/appearance/MenuItem.js +10 -0
- package/dist/appearance/Notification.js +34 -0
- package/dist/appearance/Radio.js +20 -0
- package/dist/appearance/Response.js +92 -0
- package/dist/appearance/Search.js +11 -0
- package/dist/appearance/Segmented.js +14 -0
- package/dist/appearance/Select.js +24 -0
- package/dist/appearance/Tab.js +118 -0
- package/dist/appearance/Text.js +8 -0
- package/dist/appearance/Textarea.js +56 -0
- package/dist/appearance/Title.js +7 -0
- package/dist/appearance/Tooltip.js +19 -0
- package/dist/cjs/appearance/Badge.js +46 -0
- package/dist/cjs/appearance/Button.js +55 -0
- package/dist/cjs/appearance/Checkbox.js +24 -0
- package/dist/cjs/appearance/Chips.js +42 -0
- package/dist/cjs/appearance/Choice.js +17 -0
- package/dist/cjs/appearance/DatePicker.js +7 -0
- package/dist/cjs/appearance/Group.js +13 -0
- package/dist/cjs/appearance/Icon.js +14 -0
- package/dist/cjs/appearance/Input.js +59 -0
- package/dist/cjs/appearance/InputPassword.js +58 -0
- package/dist/cjs/appearance/Label.js +56 -0
- package/dist/cjs/appearance/Loader.js +30 -0
- package/dist/cjs/appearance/MenuItem.js +12 -0
- package/dist/cjs/appearance/Notification.js +36 -0
- package/dist/cjs/appearance/Radio.js +23 -0
- package/dist/cjs/appearance/Response.js +94 -0
- package/dist/cjs/appearance/Search.js +13 -0
- package/dist/cjs/appearance/Segmented.js +16 -0
- package/dist/cjs/appearance/Select.js +26 -0
- package/dist/cjs/appearance/Tab.js +120 -0
- package/dist/cjs/appearance/Text.js +10 -0
- package/dist/cjs/appearance/Textarea.js +59 -0
- package/dist/cjs/appearance/Title.js +9 -0
- package/dist/cjs/appearance/Tooltip.js +21 -0
- package/dist/cjs/components/Accordion.js +8 -4
- package/dist/cjs/components/Avatar.js +8 -4
- package/dist/cjs/components/Badge.js +4 -2
- package/dist/cjs/components/Breadcrumbs.js +8 -4
- package/dist/cjs/components/Button.js +12 -6
- package/dist/cjs/components/Card.js +2 -1
- package/dist/cjs/components/Cell.js +10 -5
- package/dist/cjs/components/Checkbox.js +8 -7
- package/dist/cjs/components/Chips.js +5 -4
- package/dist/cjs/components/Choice.js +13 -8
- package/dist/cjs/components/Code.js +1 -1
- package/dist/cjs/components/ContextMenu.js +8 -4
- package/dist/cjs/components/CookiesWarning.js +14 -7
- package/dist/cjs/components/DadataHintField.js +2 -1
- package/dist/cjs/components/DatePicker.js +37 -1057
- package/dist/cjs/components/Dropdown.js +3 -2
- package/dist/cjs/components/Group.js +2 -1
- package/dist/cjs/components/Icon.js +8 -4
- package/dist/cjs/components/Input.js +2 -1
- package/dist/cjs/components/InputPassword.js +12 -6
- package/dist/cjs/components/Label.js +8 -4
- package/dist/cjs/components/LanguageSelector.js +8 -4
- package/dist/cjs/components/Loader.js +4 -2
- package/dist/cjs/components/Menu.js +4 -2
- package/dist/cjs/components/MenuItem.js +4 -2
- package/dist/cjs/components/Modal.js +4 -2
- package/dist/cjs/components/Notification.js +12 -9
- package/dist/cjs/components/Pagination.js +9 -5
- package/dist/cjs/components/Panel.js +4 -2
- package/dist/cjs/components/Radio.js +11 -8
- package/dist/cjs/components/Response.js +18 -11
- package/dist/cjs/components/Search.js +12 -7
- package/dist/cjs/components/Segmented.js +16 -10
- package/dist/cjs/components/Select.js +14 -7
- package/dist/cjs/components/SiteMenu.js +8 -4
- package/dist/cjs/components/Swiper.js +2 -1
- package/dist/cjs/components/Tab.js +11 -8
- package/dist/cjs/components/Text.js +2 -1
- package/dist/cjs/components/Textarea.js +9 -7
- package/dist/cjs/components/Tile.js +6 -3
- package/dist/cjs/components/Title.js +2 -1
- package/dist/cjs/components/Tooltip.js +6 -3
- package/dist/cjs/components/Video.js +4 -4
- package/dist/cjs/hooks.js +1 -0
- package/dist/components/Accordion.js +10 -6
- package/dist/components/Avatar.js +10 -6
- package/dist/components/Badge.js +4 -2
- package/dist/components/Breadcrumbs.js +10 -6
- package/dist/components/Button.js +14 -8
- package/dist/components/Card.js +2 -1
- package/dist/components/Cell.js +12 -7
- package/dist/components/Checkbox.js +8 -7
- package/dist/components/Chips.js +5 -4
- package/dist/components/Choice.js +15 -10
- package/dist/components/Code.js +2 -2
- package/dist/components/ContextMenu.js +10 -6
- package/dist/components/CookiesWarning.js +16 -9
- package/dist/components/DadataHintField.js +3 -2
- package/dist/components/DatePicker.js +39 -1060
- package/dist/components/Dropdown.js +5 -4
- package/dist/components/Group.js +2 -1
- package/dist/components/Icon.js +10 -6
- package/dist/components/Input.js +2 -1
- package/dist/components/InputPassword.js +14 -8
- package/dist/components/Label.js +8 -4
- package/dist/components/LanguageSelector.js +10 -6
- package/dist/components/Link.js +2 -2
- package/dist/components/List.js +2 -2
- package/dist/components/Loader.js +4 -2
- package/dist/components/Logo.js +2 -2
- package/dist/components/Menu.js +6 -4
- package/dist/components/MenuItem.js +6 -4
- package/dist/components/Modal.js +4 -2
- package/dist/components/Notification.js +13 -10
- package/dist/components/Pagination.js +11 -7
- package/dist/components/Panel.js +4 -2
- package/dist/components/Radio.js +11 -8
- package/dist/components/Response.js +20 -13
- package/dist/components/ScrollOnDrag.js +1 -1
- package/dist/components/Search.js +14 -9
- package/dist/components/Segmented.js +16 -10
- package/dist/components/Select.js +16 -9
- package/dist/components/SiteMenu.js +10 -6
- package/dist/components/Swiper.js +2 -1
- package/dist/components/Tab.js +13 -10
- package/dist/components/Text.js +2 -1
- package/dist/components/Textarea.js +9 -7
- package/dist/components/Tile.js +6 -3
- package/dist/components/Title.js +2 -1
- package/dist/components/Tooltip.js +6 -3
- package/dist/components/Video.js +4 -4
- package/dist/context/Notifications.js +1 -1
- package/dist/css/components/Badge/Badge.css +0 -16
- package/dist/css/components/Badge/Badge.tokens.css +20 -0
- package/dist/css/components/Pagination/Pagination.css +1 -1
- package/dist/css/components/Segmented/Segmented.css +1 -1
- package/dist/hooks.js +1 -1
- package/dist/stories/Appearance.stories.js +2 -2
- package/dist/stories/Badge.stories.js +1 -1
- package/dist/stories/Button.stories.js +2 -2
- package/dist/stories/Checkbox.stories.js +1 -1
- package/dist/stories/Chips.stories.js +1 -1
- package/dist/stories/Group.stories.js +2 -3
- package/dist/stories/Icon.stories.js +2 -2
- package/dist/stories/Input.stories.js +1 -1
- package/dist/stories/InputPassword.stories.js +2 -2
- package/dist/stories/Label.stories.js +1 -1
- package/dist/stories/Loader.stories.js +1 -1
- package/dist/stories/MenuItem.stories.js +1 -1
- package/dist/stories/ModalConfirm.stories.js +1 -3
- package/dist/stories/ModalDefault.stories.js +1 -3
- package/dist/stories/Notification.stories.js +3 -3
- package/dist/stories/Radio.stories.js +1 -1
- package/dist/stories/SearchInput.stories.js +2 -2
- package/dist/stories/Size.stories.js +2 -3
- package/dist/stories/State.stories.js +2 -4
- package/dist/stories/Textarea.stories.js +1 -1
- package/dist/stories/Tile.stories.js +2 -3
- package/dist/stories/Tooltip.stories.js +1 -1
- package/dist/stories/appearance.mdx +63 -1
- package/dist/stories/settings.mdx +3 -0
- package/dist/{tslib.es6-5FtW-kfi.js → tslib.es6-w7hdJ3oZ.js} +1 -1
- package/dist/types/appearance/Badge/index.d.ts +2 -0
- package/dist/types/appearance/Button/index.d.ts +2 -0
- package/dist/types/appearance/Checkbox/index.d.ts +3 -0
- package/dist/types/appearance/Chips/index.d.ts +2 -0
- package/dist/types/appearance/Choice/index.d.ts +2 -0
- package/dist/types/appearance/DatePicker/index.d.ts +2 -0
- package/dist/types/appearance/Group/index.d.ts +2 -0
- package/dist/types/appearance/Icon/index.d.ts +2 -0
- package/dist/types/appearance/Input/index.d.ts +3 -0
- package/dist/types/appearance/InputPassword/index.d.ts +3 -0
- package/dist/types/appearance/Label/index.d.ts +2 -0
- package/dist/types/appearance/Loader/index.d.ts +2 -0
- package/dist/types/appearance/MenuItem/index.d.ts +2 -0
- package/dist/types/appearance/Notification/index.d.ts +2 -0
- package/dist/types/appearance/Radio/index.d.ts +3 -0
- package/dist/types/appearance/Response/index.d.ts +2 -0
- package/dist/types/appearance/Search/index.d.ts +2 -0
- package/dist/types/appearance/Segmented/index.d.ts +2 -0
- package/dist/types/appearance/Select/index.d.ts +2 -0
- package/dist/types/appearance/Tab/index.d.ts +2 -0
- package/dist/types/appearance/Text/index.d.ts +2 -0
- package/dist/types/appearance/Textarea/index.d.ts +3 -0
- package/dist/types/appearance/Title/index.d.ts +2 -0
- package/dist/types/appearance/Tooltip/index.d.ts +2 -0
- package/dist/types/components/Badge/Badge.appearance.d.ts +2 -0
- package/dist/types/components/Badge/Badge.d.ts +0 -6
- package/dist/types/components/DatePicker/DatePicker.d.ts +2 -1
- package/dist/types/components/DatePicker/DatePicker.interface.d.ts +10 -1
- package/dist/types/components/DatePicker/index.d.ts +1 -1
- package/dist/types/components/Group/Group.interface.d.ts +1 -1
- package/dist/types/components/MenuItem/MenuItem.d.ts +2 -2
- package/dist/types/components/Text/Text.interface.d.ts +2 -2
- package/dist/types/components/Title/Title.interface.d.ts +2 -2
- package/dist/types/types/componentProps/appearanceKeys.d.ts +1 -1
- package/package.json +26 -22
- package/dist/cjs/components.js +0 -3
- package/dist/components.js +0 -1
- /package/dist/stories/{mixins_animation.mdx → mixin_animation.mdx} +0 -0
- /package/dist/stories/{mixins_dark-light.mdx → mixin_dark-light.mdx} +0 -0
- /package/dist/stories/{mixins_elevation.mdx → mixin_elevation.mdx} +0 -0
- /package/dist/stories/{mixins_fill-gradient.mdx → mixin_fill-gradient.mdx} +0 -0
- /package/dist/stories/{mixins_typography.mdx → mixin_typography.mdx} +0 -0
- /package/dist/stories/{mixins_utils.mdx → mixin_utils.mdx} +0 -0
|
@@ -1,11 +1,9 @@
|
|
|
1
|
+
import { buttonAppearance } from '../../../appearance/Button'
|
|
1
2
|
import { Button, buttonConfig } from '../../Button'
|
|
2
|
-
import buttonAppearance from '../../Button/appearance.json'
|
|
3
3
|
import { Group } from '../../Group'
|
|
4
4
|
import { Title } from '../../Title'
|
|
5
5
|
import { Modal } from '../Modal'
|
|
6
6
|
|
|
7
|
-
import { icon24 } from 'src/icons'
|
|
8
|
-
|
|
9
7
|
buttonConfig.setAppearance(buttonAppearance)
|
|
10
8
|
|
|
11
9
|
export default {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { buttonAppearance } from '../../../appearance/Button'
|
|
1
2
|
import { Button, buttonConfig } from '../../Button'
|
|
2
|
-
import buttonAppearance from '../../Button/appearance.json'
|
|
3
3
|
import { Modal } from '../Modal'
|
|
4
4
|
|
|
5
|
-
import { icon24 } from 'src/icons'
|
|
6
|
-
|
|
7
5
|
buttonConfig.setAppearance(buttonAppearance)
|
|
8
6
|
|
|
9
7
|
export default {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
import { buttonAppearance } from '../../../appearance/Button'
|
|
2
|
+
import { notificationItemAppearance } from '../../../appearance/Notification'
|
|
1
3
|
import { textSizeProps, titleSizeProps } from '../../../constants'
|
|
2
4
|
import { Button, buttonConfig } from '../../Button'
|
|
3
|
-
import buttonAppearance from '../../Button/appearance.json'
|
|
4
5
|
import { Icon } from '../../Icon'
|
|
5
|
-
import notificationAppearance from '../appearance.json'
|
|
6
6
|
import { NotificationItem, notificationItemConfig } from '../NotificationItem'
|
|
7
7
|
|
|
8
8
|
buttonConfig.setAppearance(buttonAppearance)
|
|
9
|
-
notificationItemConfig.setAppearance(
|
|
9
|
+
notificationItemConfig.setAppearance(notificationItemAppearance)
|
|
10
10
|
|
|
11
11
|
export default {
|
|
12
12
|
argTypes: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SearchInput, searchInputConfig } from '@itcase/ui/components/Search'
|
|
2
2
|
|
|
3
|
+
import { searchAppearance } from '../../../appearance/Search'
|
|
3
4
|
import {
|
|
4
5
|
borderColorHoverProps,
|
|
5
6
|
borderColorProps,
|
|
@@ -8,9 +9,8 @@ import {
|
|
|
8
9
|
textColorProps,
|
|
9
10
|
textSizeProps,
|
|
10
11
|
} from '../../../constants'
|
|
11
|
-
import searchInputAppearance from '../appearance.json'
|
|
12
12
|
|
|
13
|
-
searchInputConfig.setAppearance(
|
|
13
|
+
searchInputConfig.setAppearance(searchAppearance)
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
argTypes: {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import { badgeAppearance } from '../../../appearance/Badge'
|
|
2
|
+
import { tabAppearance } from '../../../appearance/Tab'
|
|
1
3
|
import { badgeConfig } from '../../Badge'
|
|
2
|
-
import badgeAppearance from '../../Badge/appearance.json'
|
|
3
|
-
import tabAppearance from '../appearance.json'
|
|
4
4
|
import { Tab, tabConfig } from '../Tab'
|
|
5
5
|
import { argTypes } from './args'
|
|
6
6
|
|
|
7
7
|
badgeConfig.setAppearance(badgeAppearance)
|
|
8
|
-
|
|
9
8
|
tabConfig.setAppearance(tabAppearance)
|
|
10
9
|
|
|
11
10
|
export default {
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { badgeAppearance } from '../../../appearance/Badge'
|
|
2
|
+
import { tabAppearance } from '../../../appearance/Tab'
|
|
2
3
|
import { badgeConfig } from '../../Badge'
|
|
3
|
-
import badgeAppearance from '../../Badge/appearance.json'
|
|
4
|
-
import tabAppearance from '../appearance.json'
|
|
5
4
|
import { Tab, tabConfig } from '../Tab'
|
|
6
5
|
import { argTypes } from './args'
|
|
7
6
|
|
|
8
7
|
badgeConfig.setAppearance(badgeAppearance)
|
|
9
|
-
|
|
10
8
|
tabConfig.setAppearance(tabAppearance)
|
|
11
9
|
|
|
12
10
|
export default {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { textareaState } from '../../../appearance/Textarea'
|
|
1
2
|
import { borderColorProps, sizeProps, textColorProps, textSizeProps } from '../../../constants'
|
|
2
|
-
import textareaState from '../state.json'
|
|
3
3
|
import { Textarea, textareaConfig } from '../Textarea'
|
|
4
4
|
|
|
5
5
|
textareaConfig.setState(textareaState)
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { badgeAppearance } from '../../../appearance/Badge'
|
|
2
|
+
import { buttonAppearance } from '../../../appearance/Button'
|
|
1
3
|
import {
|
|
2
4
|
alignDirectionProps,
|
|
3
5
|
alignProps,
|
|
@@ -18,13 +20,10 @@ import {
|
|
|
18
20
|
} from '../../../constants'
|
|
19
21
|
import { icon24 } from '../../../icons'
|
|
20
22
|
import { badgeConfig } from '../../Badge'
|
|
21
|
-
import badgeAppearance from '../../Badge/appearance.json'
|
|
22
23
|
import { Button, buttonConfig } from '../../Button'
|
|
23
|
-
import buttonAppearance from '../../Button/appearance.json'
|
|
24
24
|
import { Tile } from '../Tile'
|
|
25
25
|
|
|
26
26
|
badgeConfig.setAppearance(badgeAppearance)
|
|
27
|
-
|
|
28
27
|
buttonConfig.setAppearance(buttonAppearance)
|
|
29
28
|
|
|
30
29
|
export default {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { tooltipAppearance } from '../../../appearance/Tooltip'
|
|
1
2
|
import {
|
|
2
3
|
alignDirectionProps,
|
|
3
4
|
alignmentProps,
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
titleSizeProps,
|
|
13
14
|
widthProps,
|
|
14
15
|
} from '../../../constants'
|
|
15
|
-
import tooltipAppearance from '../appearance.json'
|
|
16
16
|
import { Tooltip, tooltipConfig } from '../Tooltip'
|
|
17
17
|
|
|
18
18
|
tooltipConfig.setAppearance(tooltipAppearance)
|
|
@@ -2,4 +2,66 @@ import { Meta } from '@storybook/blocks'
|
|
|
2
2
|
|
|
3
3
|
<Meta title="Appearance / Overview" />
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Appearance
|
|
6
|
+
|
|
7
|
+
`Appearance` - это заранее прописанные стили (по сути пропсы с указанными значениями) для более быстрого применения в коде.
|
|
8
|
+
|
|
9
|
+
Для того чтобы добавить возможность использовать `Appearance` для компонента необходимо:
|
|
10
|
+
|
|
11
|
+
- добавить `appearance` в пропсы компонента
|
|
12
|
+
`const { appearance, children, className, textColor, textSize, value } = props`
|
|
13
|
+
|
|
14
|
+
- а также конфиг:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
const badgeConfig: IBadgeConfig = {
|
|
18
|
+
appearance: badgeAppearance,
|
|
19
|
+
setAppearance: (newComponent) => {
|
|
20
|
+
badgeConfig.appearance = newComponent
|
|
21
|
+
},
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
- записать в переменную сокращенное название для дальнейшего использования в коде компонента:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
const appearanceConfig =
|
|
29
|
+
appearance && badgeConfig.appearance && badgeConfig.appearance[appearance]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- использовать для пропсов:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
fillClass ||
|
|
36
|
+
(appearanceConfig?.fill &&
|
|
37
|
+
`fill_${appearanceConfig.fill}`?.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
38
|
+
|
|
39
|
+
fillHoverClass ||
|
|
40
|
+
(appearanceConfig?.fillHover &&
|
|
41
|
+
`fill_hover_${appearanceConfig.fillHover}`?.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
42
|
+
|
|
43
|
+
textColor={textColor || appearanceConfig?.textColor}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- описать варианты `Appearance` необходимо в `src/appearance/Badge/index.ts`
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
import { badgeAppearanceType } from '../../components/Badge/Badge.interface'
|
|
50
|
+
|
|
51
|
+
export const badgeAppearance: badgeAppearanceType = {
|
|
52
|
+
surfacePrimary: {
|
|
53
|
+
fill: 'surfacePrimary',
|
|
54
|
+
fillHover: 'surfacePrimaryHover',
|
|
55
|
+
textColor: 'surfaceTextPrimary',
|
|
56
|
+
},
|
|
57
|
+
surfaceSecondary: {
|
|
58
|
+
fill: 'surfaceSecondary',
|
|
59
|
+
fillHover: 'surfaceSecondaryHover',
|
|
60
|
+
textColor: 'surfaceTextPrimary',
|
|
61
|
+
}
|
|
62
|
+
...
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
- в коде на проекте использовать:
|
|
67
|
+
`<Badge appearance="surfacePrimary" ..../>`
|
|
@@ -53,4 +53,4 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
53
53
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
export {
|
|
56
|
+
export { __rest as _, __assign as a, __spreadArray as b };
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import { IBadgeConfig, IBadgeProps } from './Badge.interface';
|
|
2
2
|
declare const badgeConfig: IBadgeConfig;
|
|
3
3
|
declare function Badge(props: IBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare namespace Badge {
|
|
5
|
-
var defaultProps: {
|
|
6
|
-
size: string;
|
|
7
|
-
shape: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
4
|
export { Badge, badgeConfig };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { IDatePickerInputProps } from './DatePicker.interface';
|
|
2
|
+
declare const datePickerConfig: IDatePickerConfig;
|
|
2
3
|
declare function DatePickerInput(props: IDatePickerInputProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export { DatePickerInput };
|
|
4
|
+
export { DatePickerInput, datePickerConfig };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DatePickerProps } from 'react-datepicker';
|
|
3
|
+
import { tAppearanceKeysDefault } from 'types/componentProps/appearanceKeys';
|
|
3
4
|
import { iconFillSizePropsType, iconSizePropsType, tFillHoverProps, tFillProps, tItemColorProps, tShapeProps, tSizeProps, tTextColorHoverProps, tTextColorProps, tTextSizeProps, tTextWeightProps } from '../../types';
|
|
4
5
|
import { iInputProps } from '../Input/Input.interface';
|
|
5
6
|
interface IDatePickerProps extends DatePickerProps {
|
|
@@ -37,7 +38,15 @@ interface IDatePickerProps extends DatePickerProps {
|
|
|
37
38
|
isClearable?: boolean;
|
|
38
39
|
isStartDefaultNull?: boolean;
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
+
type appearanceKeysType = {} & tAppearanceKeysDefault;
|
|
42
|
+
export type datePickerAppearanceType = {
|
|
43
|
+
[key in appearanceKeysType]?: IDatePickerInputProps;
|
|
44
|
+
};
|
|
45
|
+
export interface IDatePickerConfig {
|
|
46
|
+
appearance: datePickerAppearanceType | undefined;
|
|
47
|
+
setAppearance: (newComponent: datePickerAppearanceType) => void;
|
|
48
|
+
}
|
|
49
|
+
export interface IDatePickerInputProps extends IDatePickerProps {
|
|
41
50
|
className?: string;
|
|
42
51
|
clearIcon?: any;
|
|
43
52
|
clearIconFill?: tFillProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { DatePickerInput } from './DatePicker';
|
|
1
|
+
export { DatePickerInput, datePickerConfig } from './DatePicker';
|
|
@@ -12,7 +12,7 @@ interface ThemeColor {
|
|
|
12
12
|
labelTextColor?: tTextColorProps;
|
|
13
13
|
}
|
|
14
14
|
type appearanceKeysType = {} & tAppearanceKeysDefault;
|
|
15
|
-
type tAppearance = {
|
|
15
|
+
export type tAppearance = {
|
|
16
16
|
[key in appearanceKeysType]: ThemeColor;
|
|
17
17
|
};
|
|
18
18
|
export interface IGroupConfig {
|
|
@@ -3,9 +3,9 @@ declare const menuItemConfig: IMenuItemConfig;
|
|
|
3
3
|
declare function MenuItem(props: IMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace MenuItem {
|
|
5
5
|
var defaultProps: {
|
|
6
|
-
size: string;
|
|
7
|
-
LinkComponent: string;
|
|
8
6
|
direction: string;
|
|
7
|
+
LinkComponent: string;
|
|
8
|
+
size: string;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export { MenuItem, menuItemConfig };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
import type { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
|
-
import type { tTextAlignProps, tTextColorActiveProps, tTextColorHoverProps,
|
|
3
|
+
import type { tSizeProps, tTextAlignProps, tTextColorActiveProps, tTextColorHoverProps, tTextColorProps, tTextGradientProps, tTextSizeProps, tTextStyleProps, tTextWeightProps, tTextWrapProps, tWidthProps, typePropsType } from '../../types';
|
|
4
4
|
import type { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
|
|
5
5
|
interface iTextThemeColor {
|
|
6
6
|
size?: tSizeProps;
|
|
@@ -9,7 +9,7 @@ interface iTextThemeColor {
|
|
|
9
9
|
textColorGradient?: tTextGradientProps;
|
|
10
10
|
textColorHover?: tTextColorHoverProps;
|
|
11
11
|
}
|
|
12
|
-
type tAppearance = {
|
|
12
|
+
export type tAppearance = {
|
|
13
13
|
[key in tAppearanceKeysDefault]: iTextThemeColor;
|
|
14
14
|
};
|
|
15
15
|
interface iTextConfig {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ElementType, ReactNode } from 'react';
|
|
2
2
|
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
|
-
import { tFillProps, tTextAlignProps, tTextColorActiveProps, tTextColorHoverProps, tTextColorProps, tTextGradientProps, tTextStyleProps, tTextWeightProps, tTextWrapProps
|
|
3
|
+
import { svgFillPropsType, tFillProps, titleSizePropsType, tTextAlignProps, tTextColorActiveProps, tTextColorHoverProps, tTextColorProps, tTextGradientProps, tTextStyleProps, tTextWeightProps, tTextWrapProps } from '../../types';
|
|
4
4
|
import { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
|
|
5
5
|
interface ITitleThemeColor {
|
|
6
6
|
fill?: tFillProps;
|
|
@@ -20,7 +20,7 @@ interface ITitleThemeColor {
|
|
|
20
20
|
svgFillHover?: svgFillPropsType;
|
|
21
21
|
}
|
|
22
22
|
type appearanceKeysType = tAppearanceKeysDefault & {};
|
|
23
|
-
type tAppearance = {
|
|
23
|
+
export type tAppearance = {
|
|
24
24
|
[key in appearanceKeysType]: ITitleThemeColor;
|
|
25
25
|
};
|
|
26
26
|
export interface ITitleConfig {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type tAppearanceKeysDefault = 'accent' | 'accentSecondary' | 'any' | 'dev' | 'disabled' | 'error' | 'fail' | 'gradientPrimary' | 'l' | 'm' | 'primary' | 's' | 'secondary' | 'success' | 'surface' | 'surfaceDisabled' | 'surfacePrimary' | 'surfaceQuaternary' | 'surfaceSecondary' | 'surfaceTertiary' | 'warning' | 'xl' | 'xs';
|
|
1
|
+
export type tAppearanceKeysDefault = 'accent' | 'accentSecondary' | 'any' | 'default' | 'dev' | 'disabled' | 'error' | 'fail' | 'gradientPrimary' | 'l' | 'm' | 'primary' | 's' | 'secondary' | 'success' | 'surface' | 'surfaceDisabled' | 'surfacePrimary' | 'surfaceQuaternary' | 'surfaceSecondary' | 'surfaceTertiary' | 'warning' | 'xl' | 'xs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.30",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -37,6 +37,10 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"exports": {
|
|
40
|
+
"./appearance/*": {
|
|
41
|
+
"import": "./dist/appearance/*.js",
|
|
42
|
+
"require": "./dist/cjs/appearance/*.js"
|
|
43
|
+
},
|
|
40
44
|
"./types/components/*/*.interface": {
|
|
41
45
|
"import": "./dist/types/components/*/*.interface.d.ts",
|
|
42
46
|
"types": "./dist/types/components/*/*.interface.d.ts"
|
|
@@ -93,11 +97,11 @@
|
|
|
93
97
|
"registry": "https://registry.npmjs.org/"
|
|
94
98
|
},
|
|
95
99
|
"dependencies": {
|
|
96
|
-
"@itcase/common": "^1.2.
|
|
100
|
+
"@itcase/common": "^1.2.16",
|
|
97
101
|
"clsx": "^2.1.1",
|
|
102
|
+
"date-fns": "^4.1.0",
|
|
98
103
|
"js-cookie": "^3.0.5",
|
|
99
104
|
"lodash": "^4.17.21",
|
|
100
|
-
"luxon": "^3.5.0",
|
|
101
105
|
"prop-types": "^15.8.1",
|
|
102
106
|
"rc-slider": "^11.1.7",
|
|
103
107
|
"react": "^18.3.1",
|
|
@@ -114,7 +118,7 @@
|
|
|
114
118
|
"react-scroll": "^1.9.0",
|
|
115
119
|
"react-scrollbars-custom": "^4.1.1",
|
|
116
120
|
"react-select": "^5.8.3",
|
|
117
|
-
"swiper": "^11.1.
|
|
121
|
+
"swiper": "^11.1.15",
|
|
118
122
|
"uuid": "^11.0.3"
|
|
119
123
|
},
|
|
120
124
|
"devDependencies": {
|
|
@@ -124,9 +128,9 @@
|
|
|
124
128
|
"@babel/preset-env": "^7.26.0",
|
|
125
129
|
"@babel/preset-react": "^7.25.9",
|
|
126
130
|
"@chromatic-com/storybook": "^3.2.2",
|
|
127
|
-
"@commitlint/cli": "^19.
|
|
128
|
-
"@commitlint/config-conventional": "^19.
|
|
129
|
-
"@itcase/lint": "^1.0.
|
|
131
|
+
"@commitlint/cli": "^19.6.0",
|
|
132
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
133
|
+
"@itcase/lint": "^1.0.18",
|
|
130
134
|
"@lehoczky/postcss-fluid": "^1.0.3",
|
|
131
135
|
"@rollup/plugin-babel": "^6.0.4",
|
|
132
136
|
"@rollup/plugin-commonjs": "^28.0.1",
|
|
@@ -137,17 +141,17 @@
|
|
|
137
141
|
"@semantic-release/changelog": "^6.0.3",
|
|
138
142
|
"@semantic-release/git": "^10.0.1",
|
|
139
143
|
"@semantic-release/release-notes-generator": "14.0.1",
|
|
140
|
-
"@storybook/addon-essentials": "^8.4.
|
|
141
|
-
"@storybook/addon-interactions": "^8.4.
|
|
142
|
-
"@storybook/addon-links": "^8.4.
|
|
143
|
-
"@storybook/addon-onboarding": "^8.4.
|
|
144
|
+
"@storybook/addon-essentials": "^8.4.5",
|
|
145
|
+
"@storybook/addon-interactions": "^8.4.5",
|
|
146
|
+
"@storybook/addon-links": "^8.4.5",
|
|
147
|
+
"@storybook/addon-onboarding": "^8.4.5",
|
|
144
148
|
"@storybook/addon-styling-webpack": "^1.0.1",
|
|
145
|
-
"@storybook/addon-themes": "^8.4.
|
|
149
|
+
"@storybook/addon-themes": "^8.4.5",
|
|
146
150
|
"@storybook/addon-webpack5-compiler-swc": "^1.0.5",
|
|
147
|
-
"@storybook/blocks": "^8.4.
|
|
148
|
-
"@storybook/react": "^8.4.
|
|
149
|
-
"@storybook/react-webpack5": "^8.4.
|
|
150
|
-
"@storybook/test": "^8.4.
|
|
151
|
+
"@storybook/blocks": "^8.4.5",
|
|
152
|
+
"@storybook/react": "^8.4.5",
|
|
153
|
+
"@storybook/react-webpack5": "^8.4.5",
|
|
154
|
+
"@storybook/test": "^8.4.5",
|
|
151
155
|
"@types/js-cookie": "^3.0.6",
|
|
152
156
|
"@types/lodash": "^4.17.13",
|
|
153
157
|
"@types/react": "^18",
|
|
@@ -161,10 +165,10 @@
|
|
|
161
165
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
162
166
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
163
167
|
"eslint": "9.15.0",
|
|
164
|
-
"eslint-plugin-storybook": "^0.11.
|
|
165
|
-
"husky": "^9.1.
|
|
168
|
+
"eslint-plugin-storybook": "^0.11.1",
|
|
169
|
+
"husky": "^9.1.7",
|
|
166
170
|
"lint-staged": "^15.2.10",
|
|
167
|
-
"npm": "^10.9.
|
|
171
|
+
"npm": "^10.9.1",
|
|
168
172
|
"postcss": "^8.4.49",
|
|
169
173
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
170
174
|
"postcss-cli": "^11.0.0",
|
|
@@ -187,15 +191,15 @@
|
|
|
187
191
|
"postcss-pxtorem": "^6.1.0",
|
|
188
192
|
"postcss-sort-media-queries": "^5.2.0",
|
|
189
193
|
"prettier": "^3.3.3",
|
|
190
|
-
"rollup": "^4.27.
|
|
194
|
+
"rollup": "^4.27.3",
|
|
191
195
|
"rollup-plugin-copy": "^3.5.0",
|
|
192
196
|
"rollup-plugin-dts": "^6.1.1",
|
|
193
197
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
194
198
|
"rollup-preserve-directives": "^1.1.2",
|
|
195
199
|
"semantic-release": "^24.2.0",
|
|
196
|
-
"storybook": "^8.4.
|
|
200
|
+
"storybook": "^8.4.5",
|
|
197
201
|
"stylelint": "^16.10.0",
|
|
198
202
|
"typescript": "^5.6.3"
|
|
199
203
|
},
|
|
200
|
-
"packageManager": "pnpm@
|
|
204
|
+
"packageManager": "pnpm@9.14.2"
|
|
201
205
|
}
|
package/dist/cjs/components.js
DELETED
package/dist/components.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|