@ctlyst.id/internal-ui 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/index.d.ts +1 -0
- package/dist/config/theme/components/badge.d.ts +3 -0
- package/dist/config/theme/components/index.d.ts +1 -0
- package/dist/internal-ui.cjs.development.js +95 -5
- package/dist/internal-ui.cjs.development.js.map +1 -1
- package/dist/internal-ui.cjs.production.min.js +9 -9
- package/dist/internal-ui.cjs.production.min.js.map +1 -1
- package/dist/internal-ui.esm.js +97 -8
- package/dist/internal-ui.esm.js.map +1 -1
- package/package.json +3 -3
package/dist/internal-ui.esm.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, forwardRef, useStyleConfig, Button as Button$2, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, defineStyle, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1,
|
1
|
+
import { Badge as Badge$2, useToken, Box, Text, useColorModeValue, Breadcrumb, BreadcrumbItem, BreadcrumbLink, forwardRef, useStyleConfig, Button as Button$2, Card, Checkbox as Checkbox$1, FormControl, FormLabel as FormLabel$1, FormHelperText, FormErrorMessage, CheckboxGroup, Stack, Flex, Spinner, Table, Thead, Tr, Th, Tbody, Td, InputGroup, Input as Input$1, InputRightAddon, InputRightElement, theme as theme$1, defineStyle, Textarea as Textarea$1, Image, useDisclosure, Popover as Popover$1, HStack, VStack, PopoverTrigger, Avatar, PopoverContent, PopoverArrow, PopoverBody, useColorMode as useColorMode$1, Container, Grid, Wrap, ModalBody as ModalBody$1, ModalCloseButton as ModalCloseButton$1, ModalFooter as ModalFooter$1, ModalHeader as ModalHeader$1, createIcon, Icon, Portal, Link, VisuallyHidden, Select as Select$1, Radio as Radio$1, RadioGroup, useMultiStyleConfig, omitThemingProps, useCheckbox, chakra, useTab, TabList as TabList$1, TabPanel as TabPanel$1, Heading, createMultiStyleConfigHelpers as createMultiStyleConfigHelpers$1, defineStyleConfig as defineStyleConfig$1, extendTheme } from '@chakra-ui/react';
|
2
2
|
export { AlertDialog, ModalBody as AlertDialogBody, ModalCloseButton as AlertDialogCloseButton, AlertDialogContent, ModalFooter as AlertDialogFooter, ModalHeader as AlertDialogHeader, ModalOverlay as AlertDialogOverlay, Drawer, ModalBody as DrawerBody, ModalCloseButton as DrawerCloseButton, DrawerContent, ModalFooter as DrawerFooter, ModalHeader as DrawerHeader, ModalOverlay as DrawerOverlay, Modal, ModalContent, ModalContextProvider, ModalFocusScope, ModalOverlay, TabIndicator, TabPanels, Tabs, TabsDescendantsProvider, TabsProvider, useDrawerContext, useModal, useModalContext, useModalStyles, useTab, useTabIndicator, useTabList, useTabPanel, useTabPanels, useTabs, useTabsContext, useTabsDescendant, useTabsDescendants, useTabsDescendantsContext, useTabsStyles } from '@chakra-ui/react';
|
3
3
|
import React__default, { createElement, forwardRef as forwardRef$1, useRef, useEffect, useState, useMemo, Fragment, useCallback, createContext, useContext } from 'react';
|
4
4
|
import { FiChevronsRight, FiHome, FiCalendar, FiX, FiPower, FiMoon, FiSun, FiShoppingBag, FiShoppingCart, FiRepeat, FiBox, FiLayers, FiDollarSign, FiUsers, FiRotateCcw, FiSettings, FiLayout, FiGift, FiChevronDown } from 'react-icons/fi';
|
@@ -21,6 +21,27 @@ import { createMultiStyleConfigHelpers, cssVar, defineStyleConfig, defineStyle a
|
|
21
21
|
import { transparentize, mode, calc, cssVar as cssVar$1 } from '@chakra-ui/theme-tools';
|
22
22
|
import axios from 'axios';
|
23
23
|
|
24
|
+
const Badge = props => {
|
25
|
+
const {
|
26
|
+
children,
|
27
|
+
pill,
|
28
|
+
...rest
|
29
|
+
} = props;
|
30
|
+
return /*#__PURE__*/React__default.createElement(Badge$2, Object.assign({
|
31
|
+
borderRadius: pill ? 10 : 4,
|
32
|
+
variant: "primary-solid",
|
33
|
+
padding: "0 8px",
|
34
|
+
height: "18px",
|
35
|
+
display: "flex",
|
36
|
+
alignItems: "center",
|
37
|
+
justifyContent: "space-between",
|
38
|
+
textTransform: "none"
|
39
|
+
}, rest), children);
|
40
|
+
};
|
41
|
+
Badge.defaultProps = {
|
42
|
+
pill: false
|
43
|
+
};
|
44
|
+
|
24
45
|
/* eslint-disable react-hooks/rules-of-hooks */
|
25
46
|
const BreadCrumb = props => {
|
26
47
|
const {
|
@@ -2082,7 +2103,7 @@ const XMSLogo = () => /*#__PURE__*/React__default.createElement(Image, {
|
|
2082
2103
|
src: useColorModeValue('https://assets.voila.id/xms/logo-xms.jpg', 'https://assets.voila.id/xms/logo-xms-dark.png')
|
2083
2104
|
});
|
2084
2105
|
const VoilaLogo = () => /*#__PURE__*/React__default.createElement(Image, {
|
2085
|
-
src: "https://
|
2106
|
+
src: "https://assets.voila.id/xms/logo-voila-black.png?v=1",
|
2086
2107
|
filter: useColorModeValue('none', 'invert(1)'),
|
2087
2108
|
maxW: 24
|
2088
2109
|
});
|
@@ -2198,7 +2219,7 @@ const Version = ({
|
|
2198
2219
|
version,
|
2199
2220
|
environment,
|
2200
2221
|
onOpenModalRelease
|
2201
|
-
}) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge, {
|
2222
|
+
}) => /*#__PURE__*/createElement(Fragment, null, version && /*#__PURE__*/createElement(Badge$2, {
|
2202
2223
|
"data-test-id": "dzl3esjhCphobaaIXpiUE",
|
2203
2224
|
bg: useColorModeValue('primary.500', 'rgba(124, 124, 124, 0.12)'),
|
2204
2225
|
color: useColorModeValue('white', 'secondary.400'),
|
@@ -3238,6 +3259,72 @@ const alertTheme = /*#__PURE__*/defineMultiStyleConfig({
|
|
3238
3259
|
}
|
3239
3260
|
});
|
3240
3261
|
|
3262
|
+
const Badge$1 = {
|
3263
|
+
baseStyle: {
|
3264
|
+
display: 'inline-block',
|
3265
|
+
fontSize: 10,
|
3266
|
+
fontWeight: 600,
|
3267
|
+
lineHeight: '1.25',
|
3268
|
+
textTransform: 'none',
|
3269
|
+
px: 2,
|
3270
|
+
py: '0.5'
|
3271
|
+
},
|
3272
|
+
variants: {
|
3273
|
+
'primary-solid': {
|
3274
|
+
bg: 'primary.500',
|
3275
|
+
color: 'white'
|
3276
|
+
},
|
3277
|
+
'success-solid': {
|
3278
|
+
bg: 'success.500',
|
3279
|
+
color: 'white'
|
3280
|
+
},
|
3281
|
+
'info-solid': {
|
3282
|
+
bg: 'info.500',
|
3283
|
+
color: 'white'
|
3284
|
+
},
|
3285
|
+
'warning-solid': {
|
3286
|
+
bg: 'warning.500',
|
3287
|
+
color: 'white'
|
3288
|
+
},
|
3289
|
+
'danger-solid': {
|
3290
|
+
bg: 'danger.500',
|
3291
|
+
color: 'white'
|
3292
|
+
},
|
3293
|
+
'neutral-solid': {
|
3294
|
+
bg: 'neutral.600',
|
3295
|
+
color: 'white'
|
3296
|
+
},
|
3297
|
+
'primary-light': {
|
3298
|
+
bg: 'primary.50',
|
3299
|
+
color: 'primary.500'
|
3300
|
+
},
|
3301
|
+
'success-light': {
|
3302
|
+
bg: 'success.50',
|
3303
|
+
color: 'success.500'
|
3304
|
+
},
|
3305
|
+
'info-light': {
|
3306
|
+
bg: 'info.50',
|
3307
|
+
color: 'info.500'
|
3308
|
+
},
|
3309
|
+
'warning-light': {
|
3310
|
+
bg: 'warning.50',
|
3311
|
+
color: 'warning.500'
|
3312
|
+
},
|
3313
|
+
'danger-light': {
|
3314
|
+
bg: 'danger.50',
|
3315
|
+
color: 'danger.500'
|
3316
|
+
},
|
3317
|
+
'neutral-light': {
|
3318
|
+
bg: 'neutral.100',
|
3319
|
+
color: 'neutral.600'
|
3320
|
+
}
|
3321
|
+
},
|
3322
|
+
// The default size and variant values
|
3323
|
+
defaultProps: {
|
3324
|
+
variant: 'primary-solid'
|
3325
|
+
}
|
3326
|
+
};
|
3327
|
+
|
3241
3328
|
// You can also use the more specific type for
|
3242
3329
|
// a single part component: ComponentSingleStyleConfig
|
3243
3330
|
const Button$1 = /*#__PURE__*/defineStyleConfig({
|
@@ -3300,14 +3387,15 @@ const Button$1 = /*#__PURE__*/defineStyleConfig({
|
|
3300
3387
|
variant
|
3301
3388
|
} = props;
|
3302
3389
|
const base = {
|
3303
|
-
fontSize: 'text.
|
3304
|
-
h:
|
3390
|
+
fontSize: 'text.sm',
|
3391
|
+
h: '26px',
|
3392
|
+
lineHeight: 4,
|
3305
3393
|
px: 2,
|
3306
3394
|
py: '5px'
|
3307
3395
|
};
|
3308
3396
|
const icon = {
|
3309
|
-
h:
|
3310
|
-
w:
|
3397
|
+
h: '26px',
|
3398
|
+
w: '26px',
|
3311
3399
|
p: 0
|
3312
3400
|
};
|
3313
3401
|
return variant === 'icon' ? icon : base;
|
@@ -4136,6 +4224,7 @@ const Textarea = /*#__PURE__*/defineStyleConfig$1({
|
|
4136
4224
|
var components = {
|
4137
4225
|
__proto__: null,
|
4138
4226
|
Alert: alertTheme,
|
4227
|
+
Badge: Badge$1,
|
4139
4228
|
Button: Button$1,
|
4140
4229
|
Card: CardStyle,
|
4141
4230
|
Checkbox: Checkbox,
|
@@ -4207,5 +4296,5 @@ const Provider = ({
|
|
4207
4296
|
};
|
4208
4297
|
Provider.displayName = 'Provider';
|
4209
4298
|
|
4210
|
-
export { Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useInternalUI };
|
4299
|
+
export { Badge, Box, BreadCrumb, Button, CardCustom as Card, CheckboxComponent as Checkbox, CheckboxGroupComponent as CheckboxGroup, Container, DataTable, DatePickerMonth, Datepicker, Field, Flex, Grid, Header, InputField, Loader, Navigation as MainMenu, ModalBody, ModalCloseButton, ModalFooter, ModalHeader, MultiDatePickerMonth, Pagination, PaginationDetail, PaginationFilter, Provider, ProviderContext, RadioComponent as Radio, RadioGroupComponent as RadioGroup, Select, SelectAsync, SelectAsyncCreatable, SelectCreatable, Stack, Switch, Tab, TabList, TabPanel, Text, TextareaField, Uploader, Wrap, foundations, theme, useInternalUI };
|
4211
4300
|
//# sourceMappingURL=internal-ui.esm.js.map
|