@northlight/ui 2.20.0 → 2.21.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/es/northlight.d.ts +84 -31
- package/dist/es/northlight.js +105 -75
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +104 -74
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +4 -4
package/dist/es/northlight.d.ts
CHANGED
|
@@ -420,23 +420,24 @@ declare const AvatarGroup: ({ children, max, spacing, ...rest }: AvatarGroupProp
|
|
|
420
420
|
*
|
|
421
421
|
* @example
|
|
422
422
|
* (?
|
|
423
|
-
*
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
423
|
+
* +
|
|
424
|
+
* const colors = ["gray", "mediatoolBlue", "blue", "red", "green",
|
|
425
|
+
* "orange", "yellow", "teal", "purple", "pink"]
|
|
426
|
+
* const variants = ["solid", "outline", "subtle"]
|
|
427
|
+
* const Example = () => {
|
|
428
|
+
* return <Stack>
|
|
429
|
+
* { colors.map((color) => (
|
|
430
|
+
* <HStack spacing={ 4 }>
|
|
431
|
+
* {
|
|
432
|
+
* variants.map((variant) => (
|
|
433
|
+
* <Badge colorScheme={color} variant={variant}>{variant} Badge</Badge>
|
|
434
|
+
* ))
|
|
435
|
+
* }
|
|
436
|
+
* </HStack>
|
|
437
|
+
* ))}
|
|
438
|
+
* </Stack>
|
|
439
|
+
* }
|
|
440
|
+
* render(<Example/>)
|
|
440
441
|
* ?)
|
|
441
442
|
*/
|
|
442
443
|
declare const Badge: (props: BadgeProps & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -1597,7 +1598,7 @@ declare const DropZone: ({ sx, name, children, ...rest }: DropZoneProps) => JSX.
|
|
|
1597
1598
|
|
|
1598
1599
|
SortableContainer is a wrapper for a <Sortable /> with a sortable item
|
|
1599
1600
|
* */
|
|
1600
|
-
declare function MultiSort<itemKeys extends string | number | symbol>({ items
|
|
1601
|
+
declare function MultiSort<itemKeys extends string | number | symbol>({ items, onChange, children, collisionDetection, sensors, }: MultiSortProps<itemKeys>): JSX.Element;
|
|
1601
1602
|
|
|
1602
1603
|
/**
|
|
1603
1604
|
* Util component to render sortable items under sortable context
|
|
@@ -1681,7 +1682,7 @@ interface HeadingProps extends HeadingProps$1 {
|
|
|
1681
1682
|
* <H1>Heading 1</H1>
|
|
1682
1683
|
* ?)
|
|
1683
1684
|
*/
|
|
1684
|
-
declare const H1: (
|
|
1685
|
+
declare const H1: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1685
1686
|
|
|
1686
1687
|
/**
|
|
1687
1688
|
* @see {@link https://northlight.dev/reference/h2}
|
|
@@ -1691,7 +1692,7 @@ declare const H1: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
|
|
|
1691
1692
|
* ?)
|
|
1692
1693
|
*
|
|
1693
1694
|
*/
|
|
1694
|
-
declare const H2: (
|
|
1695
|
+
declare const H2: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1695
1696
|
|
|
1696
1697
|
/**
|
|
1697
1698
|
* @see {@link https://northlight.dev/reference/h3}
|
|
@@ -1700,7 +1701,7 @@ declare const H2: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
|
|
|
1700
1701
|
* <H3>Heading 3</H3>
|
|
1701
1702
|
* ?)
|
|
1702
1703
|
*/
|
|
1703
|
-
declare const H3: (
|
|
1704
|
+
declare const H3: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1704
1705
|
|
|
1705
1706
|
/**
|
|
1706
1707
|
* @see {@link https://northlight.dev/reference/h4}
|
|
@@ -1709,7 +1710,7 @@ declare const H3: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
|
|
|
1709
1710
|
* <H4>Heading 4</H4>
|
|
1710
1711
|
* ?)
|
|
1711
1712
|
*/
|
|
1712
|
-
declare const H4: (
|
|
1713
|
+
declare const H4: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1713
1714
|
|
|
1714
1715
|
/**
|
|
1715
1716
|
* @see {@link https://northlight.dev/reference/h5}
|
|
@@ -1718,7 +1719,7 @@ declare const H4: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
|
|
|
1718
1719
|
* <H5>Heading 5</H5>
|
|
1719
1720
|
* ?)
|
|
1720
1721
|
*/
|
|
1721
|
-
declare const H5: (
|
|
1722
|
+
declare const H5: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1722
1723
|
|
|
1723
1724
|
/**
|
|
1724
1725
|
* @see {@link https://northlight.dev/reference/h6}
|
|
@@ -1727,7 +1728,7 @@ declare const H5: ({ children, sx, ...rest }: HeadingProps) => JSX.Element;
|
|
|
1727
1728
|
* <H6>Heading 6</H6>
|
|
1728
1729
|
* ?)
|
|
1729
1730
|
*/
|
|
1730
|
-
declare const H6: (
|
|
1731
|
+
declare const H6: (props: HeadingProps & React__default.RefAttributes<HTMLHeadingElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
1731
1732
|
|
|
1732
1733
|
interface PProps extends TextProps {
|
|
1733
1734
|
variant?: '14' | '16';
|
|
@@ -3022,22 +3023,74 @@ interface TagGroupProps extends StackProps {
|
|
|
3022
3023
|
}
|
|
3023
3024
|
|
|
3024
3025
|
/**
|
|
3026
|
+
* Tag component is used for items that need to be labeled,
|
|
3027
|
+
* categorized, or organized using keywords that describe them.
|
|
3025
3028
|
* @see TagGroup
|
|
3026
3029
|
* @see {@link https://northlight.dev/reference/tag}
|
|
3027
3030
|
*
|
|
3028
3031
|
* @example
|
|
3029
|
-
* (?
|
|
3032
|
+
* (?
|
|
3033
|
+
* <Tag>Hello</Tag>
|
|
3034
|
+
* ?)
|
|
3030
3035
|
*
|
|
3031
3036
|
* @example
|
|
3032
3037
|
* (?
|
|
3033
|
-
*
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3038
|
+
* +
|
|
3039
|
+
* const colors = ["mediatoolBlue", "blue", "gray", "red", "green",
|
|
3040
|
+
* "orange", "yellow", "teal", "purple", "pink"]
|
|
3041
|
+
* const variants = ["solid", "subtle"]
|
|
3042
|
+
* const Example = () => {
|
|
3043
|
+
* return <Stack>
|
|
3044
|
+
* { colors.map((color) => (
|
|
3045
|
+
* <HStack spacing={ 4 }>
|
|
3046
|
+
* {
|
|
3047
|
+
* variants.map((variant) => (
|
|
3048
|
+
* <HStack spacing={ 4 }>
|
|
3049
|
+
* <Tag size="sm" variant={variant} colorScheme={color}>
|
|
3050
|
+
* <TagLeftIcon size="xs">
|
|
3051
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3052
|
+
* </TagLeftIcon>
|
|
3053
|
+
* <TagLabel>
|
|
3054
|
+
* Hello
|
|
3055
|
+
* </TagLabel>
|
|
3056
|
+
* <TagRightIcon size="xs">
|
|
3057
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3058
|
+
* </TagRightIcon>
|
|
3059
|
+
* </Tag>
|
|
3060
|
+
* <Tag size="md" variant={variant} colorScheme={color}>
|
|
3061
|
+
* <TagLeftIcon size="md">
|
|
3062
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3063
|
+
* </TagLeftIcon>
|
|
3064
|
+
* <TagLabel>
|
|
3065
|
+
* Hello
|
|
3066
|
+
* </TagLabel>
|
|
3067
|
+
* <TagRightIcon size="md">
|
|
3068
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3069
|
+
* </TagRightIcon>
|
|
3070
|
+
* </Tag>
|
|
3071
|
+
* <Tag size="lg" variant={variant} colorScheme={color}>
|
|
3072
|
+
* <TagLeftIcon size="lg">
|
|
3073
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3074
|
+
* </TagLeftIcon>
|
|
3075
|
+
* <TagLabel>
|
|
3076
|
+
* Hello
|
|
3077
|
+
* </TagLabel>
|
|
3078
|
+
* <TagRightIcon size="lg">
|
|
3079
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3080
|
+
* </TagRightIcon>
|
|
3081
|
+
* </Tag>
|
|
3082
|
+
* </HStack>
|
|
3083
|
+
* ))
|
|
3084
|
+
* }
|
|
3085
|
+
* </HStack>
|
|
3086
|
+
* ))
|
|
3087
|
+
* }
|
|
3088
|
+
* </Stack>
|
|
3089
|
+
* }
|
|
3090
|
+
* render(<Example/>)
|
|
3039
3091
|
* ?)
|
|
3040
3092
|
*
|
|
3093
|
+
*
|
|
3041
3094
|
*/
|
|
3042
3095
|
declare const Tag: (props: TagProps & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
3043
3096
|
|
package/dist/es/northlight.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$
|
|
1
|
+
import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$2, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, Flex, IconButton as IconButton$1, Popover as Popover$1, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, keyframes, extendTheme, Table as Table$2, Thead, Tbody, Tr, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Tooltip as Tooltip$2, Circle, Center, Fade as Fade$1, ScaleFade as ScaleFade$1, Slide as Slide$1, Collapse as Collapse$1, Portal, CloseButton as CloseButton$1, Radio as Radio$2, RadioGroup as RadioGroup$1, Tag as Tag$2, TagLabel, TagRightIcon, useEditableControls, useEditableState, Editable, InputLeftElement, Input as Input$1, EditablePreview, EditableInput, Modal as Modal$2, ModalOverlay, ModalContent, ModalCloseButton, ModalBody as ModalBody$1, ModalHeader, Slider, SliderTrack, SliderFilledTrack, SliderThumb, ModalFooter, VStack, Progress, Image as Image$1, ChakraProvider, Menu as Menu$2, NumberInputStepper as NumberInputStepper$1, Divider, NumberIncrementStepper, NumberDecrementStepper, NumberInput as NumberInput$2, NumberInputField as NumberInputField$1, PinInput as PinInput$2, Switch as Switch$2, TabPanel as TabPanel$1, Tabs as Tabs$2, Textarea as Textarea$2, useToast as useToast$1, TagLeftIcon, AlertTitle, AlertDescription, Tab, TabList, useClipboard, Grid, GridItem } from '@chakra-ui/react';
|
|
2
2
|
export { AbsoluteCenter, AccordionIcon, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, Box, BreadcrumbItem as Breadcrumb, BreadcrumbLink, BreadcrumbSeparator, Breadcrumb as Breadcrumbs, ButtonGroup, Card, CardBody, CardFooter, CardHeader, Center, Modal as ChakraModal, CheckboxGroup, Circle, CircularProgress, CircularProgressLabel, CloseButton, Code, Container, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Hide, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, LinkOverlay, List, ListIcon, ListItem, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RangeSlider, RangeSliderFilledTrack, RangeSliderMark, RangeSliderThumb, RangeSliderTrack, Show, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, keyframes, useBoolean, useBreakpoint, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useEditable, useEditableControls, useEditableState, useInterval, useMediaQuery, useMergeRefs, useNumberInput, useOutsideClick, usePrefersReducedMotion, useRadio, useRadioGroup, useTab, useTabs, useTheme, useToken } from '@chakra-ui/react';
|
|
3
3
|
import React, { useState, useEffect, useRef, isValidElement, cloneElement, Children, createContext, useContext, forwardRef as forwardRef$1, useImperativeHandle, memo, useMemo, useCallback } from 'react';
|
|
4
4
|
import { CreatableSelect, chakraComponents, AsyncSelect, Select as Select$3 } from 'chakra-react-select';
|
|
@@ -1027,7 +1027,7 @@ var __objRest$1A = (source, exclude) => {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return target;
|
|
1029
1029
|
};
|
|
1030
|
-
const H1$1 = (_a) => {
|
|
1030
|
+
const H1$1 = forwardRef$1((_a, ref) => {
|
|
1031
1031
|
var _b = _a, {
|
|
1032
1032
|
children,
|
|
1033
1033
|
sx = {}
|
|
@@ -1040,11 +1040,12 @@ const H1$1 = (_a) => {
|
|
|
1040
1040
|
Heading,
|
|
1041
1041
|
__spreadValues$23({
|
|
1042
1042
|
as: "h1",
|
|
1043
|
-
sx: styles
|
|
1043
|
+
sx: styles,
|
|
1044
|
+
ref
|
|
1044
1045
|
}, rest),
|
|
1045
1046
|
children
|
|
1046
1047
|
);
|
|
1047
|
-
};
|
|
1048
|
+
});
|
|
1048
1049
|
|
|
1049
1050
|
var __defProp$22 = Object.defineProperty;
|
|
1050
1051
|
var __getOwnPropSymbols$22 = Object.getOwnPropertySymbols;
|
|
@@ -1074,7 +1075,7 @@ var __objRest$1z = (source, exclude) => {
|
|
|
1074
1075
|
}
|
|
1075
1076
|
return target;
|
|
1076
1077
|
};
|
|
1077
|
-
const H2$1 = (_a) => {
|
|
1078
|
+
const H2$1 = forwardRef$1((_a, ref) => {
|
|
1078
1079
|
var _b = _a, {
|
|
1079
1080
|
children,
|
|
1080
1081
|
sx = {}
|
|
@@ -1087,11 +1088,12 @@ const H2$1 = (_a) => {
|
|
|
1087
1088
|
Heading,
|
|
1088
1089
|
__spreadValues$22({
|
|
1089
1090
|
as: "h2",
|
|
1090
|
-
sx: styles
|
|
1091
|
+
sx: styles,
|
|
1092
|
+
ref
|
|
1091
1093
|
}, rest),
|
|
1092
1094
|
children
|
|
1093
1095
|
);
|
|
1094
|
-
};
|
|
1096
|
+
});
|
|
1095
1097
|
|
|
1096
1098
|
var __defProp$21 = Object.defineProperty;
|
|
1097
1099
|
var __getOwnPropSymbols$21 = Object.getOwnPropertySymbols;
|
|
@@ -1121,7 +1123,7 @@ var __objRest$1y = (source, exclude) => {
|
|
|
1121
1123
|
}
|
|
1122
1124
|
return target;
|
|
1123
1125
|
};
|
|
1124
|
-
const H3$1 = (_a) => {
|
|
1126
|
+
const H3$1 = forwardRef$1((_a, ref) => {
|
|
1125
1127
|
var _b = _a, {
|
|
1126
1128
|
children,
|
|
1127
1129
|
sx = {}
|
|
@@ -1134,11 +1136,12 @@ const H3$1 = (_a) => {
|
|
|
1134
1136
|
Heading,
|
|
1135
1137
|
__spreadValues$21({
|
|
1136
1138
|
as: "h3",
|
|
1137
|
-
sx: styles
|
|
1139
|
+
sx: styles,
|
|
1140
|
+
ref
|
|
1138
1141
|
}, rest),
|
|
1139
1142
|
children
|
|
1140
1143
|
);
|
|
1141
|
-
};
|
|
1144
|
+
});
|
|
1142
1145
|
|
|
1143
1146
|
var __defProp$20 = Object.defineProperty;
|
|
1144
1147
|
var __getOwnPropSymbols$20 = Object.getOwnPropertySymbols;
|
|
@@ -1168,7 +1171,7 @@ var __objRest$1x = (source, exclude) => {
|
|
|
1168
1171
|
}
|
|
1169
1172
|
return target;
|
|
1170
1173
|
};
|
|
1171
|
-
const H4$1 = (_a) => {
|
|
1174
|
+
const H4$1 = forwardRef$1((_a, ref) => {
|
|
1172
1175
|
var _b = _a, {
|
|
1173
1176
|
children,
|
|
1174
1177
|
sx = {}
|
|
@@ -1181,11 +1184,12 @@ const H4$1 = (_a) => {
|
|
|
1181
1184
|
Heading,
|
|
1182
1185
|
__spreadValues$20({
|
|
1183
1186
|
as: "h4",
|
|
1184
|
-
sx: styles
|
|
1187
|
+
sx: styles,
|
|
1188
|
+
ref
|
|
1185
1189
|
}, rest),
|
|
1186
1190
|
children
|
|
1187
1191
|
);
|
|
1188
|
-
};
|
|
1192
|
+
});
|
|
1189
1193
|
|
|
1190
1194
|
var __defProp$1$ = Object.defineProperty;
|
|
1191
1195
|
var __getOwnPropSymbols$1$ = Object.getOwnPropertySymbols;
|
|
@@ -1215,7 +1219,7 @@ var __objRest$1w = (source, exclude) => {
|
|
|
1215
1219
|
}
|
|
1216
1220
|
return target;
|
|
1217
1221
|
};
|
|
1218
|
-
const H5$1 = (_a) => {
|
|
1222
|
+
const H5$1 = forwardRef$1((_a, ref) => {
|
|
1219
1223
|
var _b = _a, {
|
|
1220
1224
|
children,
|
|
1221
1225
|
sx = {}
|
|
@@ -1228,11 +1232,12 @@ const H5$1 = (_a) => {
|
|
|
1228
1232
|
Heading,
|
|
1229
1233
|
__spreadValues$1$({
|
|
1230
1234
|
as: "h5",
|
|
1231
|
-
sx: styles
|
|
1235
|
+
sx: styles,
|
|
1236
|
+
ref
|
|
1232
1237
|
}, rest),
|
|
1233
1238
|
children
|
|
1234
1239
|
);
|
|
1235
|
-
};
|
|
1240
|
+
});
|
|
1236
1241
|
|
|
1237
1242
|
var __defProp$1_ = Object.defineProperty;
|
|
1238
1243
|
var __getOwnPropSymbols$1_ = Object.getOwnPropertySymbols;
|
|
@@ -1262,7 +1267,7 @@ var __objRest$1v = (source, exclude) => {
|
|
|
1262
1267
|
}
|
|
1263
1268
|
return target;
|
|
1264
1269
|
};
|
|
1265
|
-
const H6$1 = (_a) => {
|
|
1270
|
+
const H6$1 = forwardRef$1((_a, ref) => {
|
|
1266
1271
|
var _b = _a, {
|
|
1267
1272
|
children,
|
|
1268
1273
|
sx = {}
|
|
@@ -1275,11 +1280,12 @@ const H6$1 = (_a) => {
|
|
|
1275
1280
|
Heading,
|
|
1276
1281
|
__spreadValues$1_({
|
|
1277
1282
|
as: "h6",
|
|
1278
|
-
sx: styles
|
|
1283
|
+
sx: styles,
|
|
1284
|
+
ref
|
|
1279
1285
|
}, rest),
|
|
1280
1286
|
children
|
|
1281
1287
|
);
|
|
1282
|
-
};
|
|
1288
|
+
});
|
|
1283
1289
|
|
|
1284
1290
|
var __defProp$1Z = Object.defineProperty;
|
|
1285
1291
|
var __getOwnPropSymbols$1Z = Object.getOwnPropertySymbols;
|
|
@@ -1784,7 +1790,7 @@ var __spreadValues$1Q = (a, b) => {
|
|
|
1784
1790
|
}
|
|
1785
1791
|
return a;
|
|
1786
1792
|
};
|
|
1787
|
-
const Badge = forwardRef$1((props, ref) => /* @__PURE__ */ React.createElement(Badge$
|
|
1793
|
+
const Badge$1 = forwardRef$1((props, ref) => /* @__PURE__ */ React.createElement(Badge$2, __spreadValues$1Q({ ref }, props)));
|
|
1788
1794
|
|
|
1789
1795
|
var __defProp$1P = Object.defineProperty;
|
|
1790
1796
|
var __getOwnPropSymbols$1P = Object.getOwnPropertySymbols;
|
|
@@ -3062,6 +3068,7 @@ const Button = {
|
|
|
3062
3068
|
variants: {
|
|
3063
3069
|
default: ({ theme: { colors: color } }) => ({
|
|
3064
3070
|
bgColor: color.background.button.default,
|
|
3071
|
+
color: color.text.button.default,
|
|
3065
3072
|
_hover: {
|
|
3066
3073
|
bgColor: color.background.button["default-hover"]
|
|
3067
3074
|
},
|
|
@@ -3084,6 +3091,7 @@ const Button = {
|
|
|
3084
3091
|
}),
|
|
3085
3092
|
success: ({ theme: { colors: color } }) => ({
|
|
3086
3093
|
bgColor: color.background.button.success,
|
|
3094
|
+
color: color.text.button.success,
|
|
3087
3095
|
_hover: {
|
|
3088
3096
|
bg: color.background.button["success-hover"],
|
|
3089
3097
|
_disabled: {
|
|
@@ -3136,6 +3144,15 @@ const Button = {
|
|
|
3136
3144
|
bgColor: color.background.button["link-active"]
|
|
3137
3145
|
}
|
|
3138
3146
|
}),
|
|
3147
|
+
outline: ({ theme: { colors: color } }) => ({
|
|
3148
|
+
color: color.text.default,
|
|
3149
|
+
_hover: {
|
|
3150
|
+
bg: color.background.button["ghost-hover"]
|
|
3151
|
+
},
|
|
3152
|
+
_active: {
|
|
3153
|
+
bg: color.background.button["ghost-active"]
|
|
3154
|
+
}
|
|
3155
|
+
}),
|
|
3139
3156
|
ghost: ({ theme: { colors: color } }) => ({
|
|
3140
3157
|
color: color.text.default,
|
|
3141
3158
|
bgColor: color.background.button.ghost,
|
|
@@ -3892,16 +3909,16 @@ const Tag$1 = {
|
|
|
3892
3909
|
}
|
|
3893
3910
|
},
|
|
3894
3911
|
variants: {
|
|
3895
|
-
solid: ({
|
|
3912
|
+
solid: ({ theme: { colors }, colorScheme }) => ({
|
|
3896
3913
|
container: {
|
|
3897
|
-
bgColor:
|
|
3898
|
-
color:
|
|
3914
|
+
bgColor: colors[colorScheme] && colors[colorScheme][500] ? colors[colorScheme][500] : colorScheme,
|
|
3915
|
+
color: colorScheme === "yellow" ? "mono.black" : "mono.white"
|
|
3899
3916
|
}
|
|
3900
3917
|
}),
|
|
3901
|
-
subtle: () => ({
|
|
3918
|
+
subtle: ({ theme: { colors }, colorScheme }) => ({
|
|
3902
3919
|
container: {
|
|
3903
|
-
bgColor:
|
|
3904
|
-
color: "
|
|
3920
|
+
bgColor: colors[colorScheme] && colors[colorScheme][100] ? colors[colorScheme][100] : colorScheme,
|
|
3921
|
+
color: "mono.black"
|
|
3905
3922
|
}
|
|
3906
3923
|
}),
|
|
3907
3924
|
ai: {
|
|
@@ -5647,10 +5664,39 @@ const Menu$1 = {
|
|
|
5647
5664
|
}
|
|
5648
5665
|
};
|
|
5649
5666
|
|
|
5667
|
+
const Badge = {
|
|
5668
|
+
baseStyle: ({ colorScheme, theme: { colors } }) => {
|
|
5669
|
+
const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][100] : colors[colorScheme] && colors[colorScheme][100];
|
|
5670
|
+
const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][800] : colors[colorScheme] && colors[colorScheme][800];
|
|
5671
|
+
return {
|
|
5672
|
+
bgColor,
|
|
5673
|
+
color: textColor
|
|
5674
|
+
};
|
|
5675
|
+
},
|
|
5676
|
+
variants: {
|
|
5677
|
+
solid: ({ colorScheme, theme: { colors } }) => {
|
|
5678
|
+
const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][500];
|
|
5679
|
+
const textColor = colorScheme === "yellow" ? "mono.black" : "mono.white";
|
|
5680
|
+
return {
|
|
5681
|
+
bgColor,
|
|
5682
|
+
color: textColor
|
|
5683
|
+
};
|
|
5684
|
+
},
|
|
5685
|
+
outline: ({ colorScheme, theme: { colors } }) => {
|
|
5686
|
+
const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][700];
|
|
5687
|
+
return {
|
|
5688
|
+
bgColor: "mono.transparent",
|
|
5689
|
+
color: textColor
|
|
5690
|
+
};
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
};
|
|
5694
|
+
|
|
5650
5695
|
var components = /*#__PURE__*/Object.freeze({
|
|
5651
5696
|
__proto__: null,
|
|
5652
5697
|
Alert: Alert,
|
|
5653
5698
|
Avatar: Avatar,
|
|
5699
|
+
Badge: Badge,
|
|
5654
5700
|
Blinker: Blinker,
|
|
5655
5701
|
Blockquote: Blockquote,
|
|
5656
5702
|
Breadcrumb: Breadcrumb,
|
|
@@ -8736,15 +8782,12 @@ var __objRest$K = (source, exclude) => {
|
|
|
8736
8782
|
};
|
|
8737
8783
|
function getComponents() {
|
|
8738
8784
|
return {
|
|
8785
|
+
Menu: (props) => /* @__PURE__ */ React.createElement(Box, { "data-testid": "select-menu-wrapper-test-id" }, /* @__PURE__ */ React.createElement(chakraComponents.Menu, __spreadValues$W({}, props), props.children)),
|
|
8739
8786
|
DropdownIndicator: (props) => props.selectProps.icon ? /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(Icon$1, { as: props.selectProps.icon })) : /* @__PURE__ */ React.createElement(chakraComponents.DropdownIndicator, __spreadValues$W({}, props)),
|
|
8740
8787
|
Option: (props) => props.selectProps.customOption ? /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$W({}, props), props.selectProps.customOption(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.Option, __spreadValues$W({}, props)),
|
|
8741
8788
|
MultiValueContainer: (props) => props.selectProps.customTag ? /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props), props.selectProps.customTag(props.data)) : /* @__PURE__ */ React.createElement(chakraComponents.MultiValueContainer, __spreadValues$W({}, props)),
|
|
8742
8789
|
Control: (_a) => {
|
|
8743
|
-
var _b = _a, {
|
|
8744
|
-
children
|
|
8745
|
-
} = _b, props = __objRest$K(_b, [
|
|
8746
|
-
"children"
|
|
8747
|
-
]);
|
|
8790
|
+
var _b = _a, { children } = _b, props = __objRest$K(_b, ["children"]);
|
|
8748
8791
|
return props.selectProps.leftComponent ? /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$W({}, props), /* @__PURE__ */ React.createElement(HStack, { w: "full", pl: "2" }, props.selectProps.leftComponent, /* @__PURE__ */ React.createElement(HStack, { w: "full", justify: "space-between" }, children))) : /* @__PURE__ */ React.createElement(chakraComponents.Control, __spreadValues$W({}, props), children);
|
|
8749
8792
|
}
|
|
8750
8793
|
};
|
|
@@ -9490,25 +9533,18 @@ var __spreadValues$J = (a, b) => {
|
|
|
9490
9533
|
};
|
|
9491
9534
|
var __spreadProps$7 = (a, b) => __defProps$7(a, __getOwnPropDescs$7(b));
|
|
9492
9535
|
function MultiSort({
|
|
9493
|
-
items
|
|
9536
|
+
items,
|
|
9494
9537
|
onChange = () => {
|
|
9495
9538
|
},
|
|
9496
9539
|
children,
|
|
9497
9540
|
collisionDetection,
|
|
9498
9541
|
sensors
|
|
9499
9542
|
}) {
|
|
9500
|
-
const [items, setItems] = useState(sortableItems);
|
|
9501
9543
|
const [activeItem, setActiveItem] = useState(null);
|
|
9502
9544
|
const moveBetweenContainers = (activeContainerName, activeIndex, overContainerName, overIndex, item) => __spreadProps$7(__spreadValues$J({}, items), {
|
|
9503
9545
|
[activeContainerName]: remove(activeIndex, 1, items[activeContainerName]),
|
|
9504
9546
|
[overContainerName]: insert(overIndex, item, items[overContainerName])
|
|
9505
9547
|
});
|
|
9506
|
-
useEffect(() => {
|
|
9507
|
-
onChange(items);
|
|
9508
|
-
}, [items]);
|
|
9509
|
-
useEffect(() => {
|
|
9510
|
-
setItems(sortableItems);
|
|
9511
|
-
}, [sortableItems]);
|
|
9512
9548
|
const customSensors = useSensors(
|
|
9513
9549
|
useSensor(PointerSensor),
|
|
9514
9550
|
useSensor(KeyboardSensor, {
|
|
@@ -9535,46 +9571,40 @@ function MultiSort({
|
|
|
9535
9571
|
const handleDragOver = (e) => {
|
|
9536
9572
|
const { activeContainerName, overContainerName, id, overId } = getContainers(e);
|
|
9537
9573
|
if (!(!activeContainerName || !overContainerName || activeContainerName === overContainerName)) {
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
);
|
|
9548
|
-
});
|
|
9574
|
+
const activeIndex = indexOf(id, items[activeContainerName]);
|
|
9575
|
+
const overIndex = indexOf(overId, items[overContainerName]);
|
|
9576
|
+
onChange(moveBetweenContainers(
|
|
9577
|
+
activeContainerName,
|
|
9578
|
+
activeIndex,
|
|
9579
|
+
overContainerName,
|
|
9580
|
+
overIndex,
|
|
9581
|
+
id
|
|
9582
|
+
));
|
|
9549
9583
|
}
|
|
9550
9584
|
};
|
|
9551
9585
|
const handleDragEnd = (e) => {
|
|
9552
9586
|
const { activeContainerName, overContainerName, id, overId, active } = getContainers(e);
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
[overContainerName]: arrayMove(
|
|
9562
|
-
prev[overContainerName],
|
|
9563
|
-
activeIndex,
|
|
9564
|
-
overIndex
|
|
9565
|
-
)
|
|
9566
|
-
});
|
|
9567
|
-
} else {
|
|
9568
|
-
newItems = moveBetweenContainers(
|
|
9569
|
-
activeContainerName,
|
|
9587
|
+
if (!activeContainerName || !overContainerName)
|
|
9588
|
+
return;
|
|
9589
|
+
const activeIndex = indexOf(id, items[activeContainerName]);
|
|
9590
|
+
const overIndex = indexOf(overId, items[overContainerName]);
|
|
9591
|
+
if (activeContainerName === overContainerName) {
|
|
9592
|
+
onChange(__spreadProps$7(__spreadValues$J({}, items), {
|
|
9593
|
+
[overContainerName]: arrayMove(
|
|
9594
|
+
items[overContainerName],
|
|
9570
9595
|
activeIndex,
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9596
|
+
overIndex
|
|
9597
|
+
)
|
|
9598
|
+
}));
|
|
9599
|
+
} else {
|
|
9600
|
+
onChange(moveBetweenContainers(
|
|
9601
|
+
activeContainerName,
|
|
9602
|
+
activeIndex,
|
|
9603
|
+
overContainerName,
|
|
9604
|
+
overIndex,
|
|
9605
|
+
active == null ? void 0 : active.id
|
|
9606
|
+
));
|
|
9607
|
+
}
|
|
9578
9608
|
};
|
|
9579
9609
|
return /* @__PURE__ */ React.createElement(
|
|
9580
9610
|
DragAndDrop,
|
|
@@ -13400,5 +13430,5 @@ const StepStack = (_a) => {
|
|
|
13400
13430
|
));
|
|
13401
13431
|
};
|
|
13402
13432
|
|
|
13403
|
-
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText, Fade, FastGrid, FastList, Field, FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, FormattedNumberInputField, H1$1 as H1, H2$1 as H2, H3$1 as H3, H4$1 as H4, H5$1 as H5, H6$1 as H6, Icon$1 as Icon, IconButton, IntentButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Menu, Modal, ModalBase, ModalBody, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumVal$1 as NumVal, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, Popover, ProgressBar, Radio, RadioGroup, RadioGroupField, ResizeHandle, ScaleFade, SearchBar, SearchBarField, Select, SelectField, Slide, SlideFade, Small$1 as Small, Sortable, SortableContainer, SortableItem, SortableList, Spinner$1 as Spinner, SplitPane, StatusBlock, StatusPin, Step, StepList, StepPanel, StepStack, Steps, Switch, SwitchField, TabPanel, Table, Tabs, Tag, TagGroup, TagsInput, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, Tooltip, addAlpha, advancedParseFloat, clamp, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useResizeWidth, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
13433
|
+
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge$1 as Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText, Fade, FastGrid, FastList, Field, FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, FormattedNumberInputField, H1$1 as H1, H2$1 as H2, H3$1 as H3, H4$1 as H4, H5$1 as H5, H6$1 as H6, Icon$1 as Icon, IconButton, IntentButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Menu, Modal, ModalBase, ModalBody, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumVal$1 as NumVal, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, Popover, ProgressBar, Radio, RadioGroup, RadioGroupField, ResizeHandle, ScaleFade, SearchBar, SearchBarField, Select, SelectField, Slide, SlideFade, Small$1 as Small, Sortable, SortableContainer, SortableItem, SortableList, Spinner$1 as Spinner, SplitPane, StatusBlock, StatusPin, Step, StepList, StepPanel, StepStack, Steps, Switch, SwitchField, TabPanel, Table, Tabs, Tag, TagGroup, TagsInput, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, Tooltip, addAlpha, advancedParseFloat, clamp, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useResizeWidth, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
13404
13434
|
//# sourceMappingURL=northlight.js.map
|