@nypl/design-system-react-components 1.2.0-rc → 1.2.0-rc-2
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/design-system-react-components.cjs.development.js +229 -42
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +230 -44
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/theme/components/alphabetFilter.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chakra, useStyleConfig, Icon as Icon$2, Box, Accordion as Accordion$2, AccordionPanel, AccordionItem, AccordionButton, Button as Button$2, Heading as Heading$2, Text as Text$2, useMultiStyleConfig, Flex, Breadcrumb as Breadcrumb$1, BreadcrumbItem, BreadcrumbLink, useMediaQuery, Stack, useMergeRefs, LinkBox, LinkOverlay, Checkbox as Checkbox$2, CheckboxGroup as CheckboxGroup$2, SimpleGrid as SimpleGrid$1, TableCaption, Thead, Tr, Th, Table as Table$1, Tbody, Td, useTheme, Input, Textarea, extendTheme, ChakraProvider, Radio as Radio$2, RadioGroup as RadioGroup$2, HStack, useOutsideClick, VStack, Spacer, useDisclosure, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, CircularProgress, CircularProgressLabel, Progress, Select as Select$2, Skeleton as Skeleton$1, RangeSlider, RangeSliderTrack, RangeSliderFilledTrack, RangeSliderThumb, Slider as Slider$1, SliderTrack, SliderFilledTrack, SliderThumb, Tabs as Tabs$1, Tab, TabPanel, TabList, TabPanels,
|
|
1
|
+
import { chakra, useStyleConfig, Icon as Icon$2, Box, Accordion as Accordion$2, AccordionPanel, AccordionItem, AccordionButton, Button as Button$2, Heading as Heading$2, Text as Text$2, useMultiStyleConfig, Flex, Breadcrumb as Breadcrumb$1, BreadcrumbItem, BreadcrumbLink, useMediaQuery, Stack, useMergeRefs, LinkBox, LinkOverlay, Checkbox as Checkbox$2, CheckboxGroup as CheckboxGroup$2, SimpleGrid as SimpleGrid$1, TableCaption, Thead, Tr, Th, Table as Table$1, Tbody, Td, useTheme, Input, Textarea, extendTheme, ChakraProvider, Radio as Radio$2, RadioGroup as RadioGroup$2, HStack, useOutsideClick, VStack, Spacer, useDisclosure, Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, ModalFooter, CircularProgress, CircularProgressLabel, Progress, Select as Select$2, Skeleton as Skeleton$1, RangeSlider, RangeSliderTrack, RangeSliderFilledTrack, RangeSliderThumb, Slider as Slider$1, SliderTrack, SliderFilledTrack, SliderThumb, Tabs as Tabs$1, Tab, TabPanel, TabList, TabPanels, Tooltip as Tooltip$2, Switch as Switch$1 } from '@chakra-ui/react';
|
|
2
2
|
export { Box, Center, Circle, ColorModeScript, Flex, Grid, GridItem, HStack, Spacer, Square, Stack, Tab, TabList, TabPanel, TabPanels, VStack, cookieStorageManager, localStorageManager, useColorMode, useColorModeValue } from '@chakra-ui/react';
|
|
3
3
|
import React__default, { createElement, forwardRef, useRef, useState, useEffect, Fragment, useContext } from 'react';
|
|
4
4
|
import useNativeLazyLoading from '@charlietango/use-native-lazy-loading';
|
|
@@ -2458,7 +2458,7 @@ var AlphabetFilter = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (prop
|
|
|
2458
2458
|
id: "filter-" + item.value,
|
|
2459
2459
|
isDisabled: isButtonDisabled,
|
|
2460
2460
|
key: item.value,
|
|
2461
|
-
|
|
2461
|
+
sx: buttonStyles,
|
|
2462
2462
|
onClick: function onClick(e) {
|
|
2463
2463
|
handleOnClick(e, item.value);
|
|
2464
2464
|
}
|
|
@@ -5189,7 +5189,8 @@ var AlphabetFilter$1 = {
|
|
|
5189
5189
|
}
|
|
5190
5190
|
},
|
|
5191
5191
|
_disabled: {
|
|
5192
|
-
color: "ui.gray.medium"
|
|
5192
|
+
color: "ui.gray.medium",
|
|
5193
|
+
cursor: "not-allowed"
|
|
5193
5194
|
}
|
|
5194
5195
|
}
|
|
5195
5196
|
}
|
|
@@ -9367,6 +9368,7 @@ var theme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
9367
9368
|
components: /*#__PURE__*/_extends({
|
|
9368
9369
|
Accordion: Accordion$1,
|
|
9369
9370
|
AlphabetFilter: AlphabetFilter$1,
|
|
9371
|
+
AudioPlayer: AudioPlayer$1,
|
|
9370
9372
|
Breadcrumb: Breadcrumb,
|
|
9371
9373
|
Button: Button$1,
|
|
9372
9374
|
ButtonGroup: ButtonGroup$1
|
|
@@ -9419,8 +9421,7 @@ var theme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
9419
9421
|
TextInput: TextInput$1
|
|
9420
9422
|
}, Toggle$1, {
|
|
9421
9423
|
Tooltip: Tooltip,
|
|
9422
|
-
VideoPlayer: VideoPlayer
|
|
9423
|
-
AudioPlayer: AudioPlayer$1
|
|
9424
|
+
VideoPlayer: VideoPlayer
|
|
9424
9425
|
}),
|
|
9425
9426
|
config: {
|
|
9426
9427
|
// Use `cssVarPrefix` to set the prefix used on the CSS vars produced by
|
|
@@ -15578,7 +15579,224 @@ var Tabs = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
15578
15579
|
}, React__default.createElement(Box, Object.assign({}, carouselStyle), tabs)), nextButton), panels);
|
|
15579
15580
|
})); // Tabs is also exported above so the props can display in Storybook.
|
|
15580
15581
|
|
|
15581
|
-
var _excluded$2d = ["
|
|
15582
|
+
var _excluded$2d = ["children", "className", "content", "id", "isDisabled", "shouldWrapChildren"];
|
|
15583
|
+
var Tooltip$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15584
|
+
var children = props.children,
|
|
15585
|
+
content = props.content,
|
|
15586
|
+
isDisabled = props.isDisabled,
|
|
15587
|
+
shouldWrapChildren = props.shouldWrapChildren,
|
|
15588
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2d);
|
|
15589
|
+
|
|
15590
|
+
if (typeof content !== "string") {
|
|
15591
|
+
React__default.Children.map(content, function (contentChild) {
|
|
15592
|
+
if (contentChild.type !== Icon || contentChild.type !== Image) {
|
|
15593
|
+
console.warn("NYPL Reservoir Tooltip: Pass in a string, DS Icon, or DS Image into the 'content' prop.");
|
|
15594
|
+
}
|
|
15595
|
+
});
|
|
15596
|
+
}
|
|
15597
|
+
|
|
15598
|
+
var newChildren = shouldWrapChildren ? React__default.createElement(ComponentWrapper, {
|
|
15599
|
+
width: "fit-content"
|
|
15600
|
+
}, children) : children;
|
|
15601
|
+
var styles = useMultiStyleConfig("Tooltip", {});
|
|
15602
|
+
return React__default.createElement(Tooltip$2, Object.assign({
|
|
15603
|
+
hasArrow: true,
|
|
15604
|
+
"aria-label": typeof content !== "string" ? "Tooltip" : undefined,
|
|
15605
|
+
label: content,
|
|
15606
|
+
isDisabled: isDisabled,
|
|
15607
|
+
placement: "top",
|
|
15608
|
+
openDelay: 500,
|
|
15609
|
+
ref: ref,
|
|
15610
|
+
__css: styles
|
|
15611
|
+
}, rest), newChildren);
|
|
15612
|
+
}));
|
|
15613
|
+
|
|
15614
|
+
/**
|
|
15615
|
+
* The "explore" `TagSet` variant will always display the tags passed as data.
|
|
15616
|
+
* The `label` property in the `tagSetData` prop should be set to a link-type
|
|
15617
|
+
* JSX component for linking to specific content.
|
|
15618
|
+
*/
|
|
15619
|
+
|
|
15620
|
+
var TagSetExplore$1 = /*#__PURE__*/chakra(function (props) {
|
|
15621
|
+
var id = props.id,
|
|
15622
|
+
_props$tagSetData = props.tagSetData,
|
|
15623
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData;
|
|
15624
|
+
var styles = useStyleConfig("TagSetExplore");
|
|
15625
|
+
return React__default.createElement(React__default.Fragment, null, tagSetData.map(function (tagSet, key) {
|
|
15626
|
+
if (typeof tagSet.label === "string") {
|
|
15627
|
+
console.warn("NYPL Reservoir TagSet: Explore tags require all `label` props to be React components.");
|
|
15628
|
+
}
|
|
15629
|
+
|
|
15630
|
+
return React__default.createElement(TooltipWrapper, {
|
|
15631
|
+
key: key,
|
|
15632
|
+
label: tagSet.label
|
|
15633
|
+
}, React__default.createElement(Box, {
|
|
15634
|
+
"data-testid": "explore-tags",
|
|
15635
|
+
id: "ts-explore-" + id + "-" + key,
|
|
15636
|
+
__css: styles
|
|
15637
|
+
}, tagSet.iconName ? React__default.createElement(Icon, {
|
|
15638
|
+
align: "left",
|
|
15639
|
+
"data-testid": "ts-icon",
|
|
15640
|
+
name: tagSet.iconName,
|
|
15641
|
+
size: "small"
|
|
15642
|
+
}) : null, React__default.createElement("span", null, tagSet.label)));
|
|
15643
|
+
}));
|
|
15644
|
+
});
|
|
15645
|
+
|
|
15646
|
+
/**
|
|
15647
|
+
* The "filter" `TagSet` variant will display tags that can be removed when
|
|
15648
|
+
* `isDismissible` is true and they are clicked.
|
|
15649
|
+
*/
|
|
15650
|
+
|
|
15651
|
+
var TagSetFilter$1 = /*#__PURE__*/chakra(function (props) {
|
|
15652
|
+
var id = props.id,
|
|
15653
|
+
_props$isDismissible = props.isDismissible,
|
|
15654
|
+
isDismissible = _props$isDismissible === void 0 ? false : _props$isDismissible,
|
|
15655
|
+
onClick = props.onClick,
|
|
15656
|
+
_props$tagSetData = props.tagSetData,
|
|
15657
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData;
|
|
15658
|
+
|
|
15659
|
+
var _React$useState = React__default.useState(tagSetData),
|
|
15660
|
+
filters = _React$useState[0],
|
|
15661
|
+
setFilters = _React$useState[1];
|
|
15662
|
+
|
|
15663
|
+
var styles = useMultiStyleConfig("TagSetFilter", {
|
|
15664
|
+
isDismissible: isDismissible
|
|
15665
|
+
});
|
|
15666
|
+
|
|
15667
|
+
var finalOnClick = function finalOnClick(tagLabel) {
|
|
15668
|
+
onClick && onClick(tagLabel);
|
|
15669
|
+
}; // This expects that the consuming app passes in a new set of data
|
|
15670
|
+
// whenever the current list of tags needs to be updated.
|
|
15671
|
+
|
|
15672
|
+
|
|
15673
|
+
useEffect(function () {
|
|
15674
|
+
setFilters(tagSetData);
|
|
15675
|
+
}, [tagSetData, setFilters]);
|
|
15676
|
+
return React__default.createElement(React__default.Fragment, null, filters.map(function (tagSet, key) {
|
|
15677
|
+
if (typeof tagSet.label !== "string") {
|
|
15678
|
+
console.warn("NYPL Reservoir TagSet: Filter tags require all `label` props to be strings.");
|
|
15679
|
+
}
|
|
15680
|
+
|
|
15681
|
+
if (isDismissible && tagSet.iconName) {
|
|
15682
|
+
console.warn("NYPL Reservoir TagSet: Filter tags will not render icons when `isDismissible` is set to true.");
|
|
15683
|
+
}
|
|
15684
|
+
|
|
15685
|
+
return React__default.createElement(TooltipWrapper, {
|
|
15686
|
+
key: key,
|
|
15687
|
+
label: tagSet.label
|
|
15688
|
+
}, React__default.createElement(Button, {
|
|
15689
|
+
"data-testid": "filter-tags",
|
|
15690
|
+
id: "ts-filter-" + id + "-" + key,
|
|
15691
|
+
onClick: isDismissible ? function () {
|
|
15692
|
+
return finalOnClick(tagSet.label);
|
|
15693
|
+
} : undefined,
|
|
15694
|
+
sx: styles
|
|
15695
|
+
}, !isDismissible && tagSet.iconName ? React__default.createElement(Icon, {
|
|
15696
|
+
align: "left",
|
|
15697
|
+
"data-testid": "ts-icon",
|
|
15698
|
+
name: tagSet.iconName,
|
|
15699
|
+
size: "small"
|
|
15700
|
+
}) : null, React__default.createElement("span", null, tagSet.label), isDismissible ? React__default.createElement(Icon, {
|
|
15701
|
+
"data-testid": "filter-close-icon",
|
|
15702
|
+
align: "right",
|
|
15703
|
+
name: "close",
|
|
15704
|
+
size: "small",
|
|
15705
|
+
color: "ui.gray.x-dark",
|
|
15706
|
+
width: "12px"
|
|
15707
|
+
}) : null));
|
|
15708
|
+
}), filters.length > 1 && isDismissible ? React__default.createElement(Button, {
|
|
15709
|
+
buttonType: "link",
|
|
15710
|
+
"data-testid": "filter-clear-all",
|
|
15711
|
+
id: "ts-filter-clear-all-" + id,
|
|
15712
|
+
onClick: function onClick() {
|
|
15713
|
+
return finalOnClick("clearFilters");
|
|
15714
|
+
},
|
|
15715
|
+
__css: styles.clearAll
|
|
15716
|
+
}, "Clear Filters") : null);
|
|
15717
|
+
});
|
|
15718
|
+
|
|
15719
|
+
var _excluded$2e = ["className", "id", "isDismissible", "onClick", "tagSetData", "type"];
|
|
15720
|
+
|
|
15721
|
+
function isFilterType(type) {
|
|
15722
|
+
return type === "filter";
|
|
15723
|
+
}
|
|
15724
|
+
/**
|
|
15725
|
+
* This helper component wrapper renders a DS `Tooltip` component if the text is
|
|
15726
|
+
* long or a React fragment. This assumes that the `label` prop is a rather
|
|
15727
|
+
* simple single root JSX element, such as `<Link ...>....</Link>`.
|
|
15728
|
+
*/
|
|
15729
|
+
|
|
15730
|
+
var TooltipWrapper = function TooltipWrapper(_ref) {
|
|
15731
|
+
var label = _ref.label,
|
|
15732
|
+
children = _ref.children;
|
|
15733
|
+
var maxCharLengthToShow = 20;
|
|
15734
|
+
var labelText = typeof label === "string" ? label : label.props.children;
|
|
15735
|
+
|
|
15736
|
+
if (labelText.length > maxCharLengthToShow && typeof labelText === "string") {
|
|
15737
|
+
return React__default.createElement(Tooltip$1, {
|
|
15738
|
+
content: labelText
|
|
15739
|
+
}, children);
|
|
15740
|
+
}
|
|
15741
|
+
|
|
15742
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
15743
|
+
};
|
|
15744
|
+
/**
|
|
15745
|
+
* The `TagSet` component renders a group of individual tags which have two
|
|
15746
|
+
* variants: "explore" and "filter". The "explore" tags are meant to be used for
|
|
15747
|
+
* exploratory linkable elements, whereas the "filter" tags are used to display
|
|
15748
|
+
* the filter values that were selected through another UI. Only "filter" tags
|
|
15749
|
+
* can be dismissible.
|
|
15750
|
+
*
|
|
15751
|
+
* The width of a single tag will never be greater than 200px. If necessary, a
|
|
15752
|
+
* tag’s label text will be truncated to keep a tag’s width at or below 200px.
|
|
15753
|
+
* The full label text will be automatically revealed when the tag is hovered
|
|
15754
|
+
* with a DS `Tooltip` component.
|
|
15755
|
+
*/
|
|
15756
|
+
|
|
15757
|
+
var TagSet$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15758
|
+
var className = props.className,
|
|
15759
|
+
id = props.id,
|
|
15760
|
+
_props$isDismissible = props.isDismissible,
|
|
15761
|
+
isDismissible = _props$isDismissible === void 0 ? false : _props$isDismissible,
|
|
15762
|
+
onClick = props.onClick,
|
|
15763
|
+
_props$tagSetData = props.tagSetData,
|
|
15764
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData,
|
|
15765
|
+
_props$type = props.type,
|
|
15766
|
+
type = _props$type === void 0 ? "filter" : _props$type,
|
|
15767
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2e);
|
|
15768
|
+
|
|
15769
|
+
var styles = useStyleConfig("TagSet", {});
|
|
15770
|
+
|
|
15771
|
+
if (!isFilterType(type)) {
|
|
15772
|
+
if (isDismissible) {
|
|
15773
|
+
console.warn("NYPL Reservoir TagSet: The `isDismissible` prop will be ignored when the `type` prop is set to 'explore'.");
|
|
15774
|
+
}
|
|
15775
|
+
|
|
15776
|
+
if (onClick) {
|
|
15777
|
+
console.warn("NYPL Reservoir TagSet: The `onClick` prop will be ignored when the `type` prop is set to 'explore'.");
|
|
15778
|
+
}
|
|
15779
|
+
}
|
|
15780
|
+
|
|
15781
|
+
return React__default.createElement(Flex, Object.assign({
|
|
15782
|
+
className: className,
|
|
15783
|
+
id: id,
|
|
15784
|
+
ref: ref,
|
|
15785
|
+
__css: styles
|
|
15786
|
+
}, rest), !isFilterType(type) && React__default.createElement(TagSetExplore$1, {
|
|
15787
|
+
id: id,
|
|
15788
|
+
tagSetData: tagSetData,
|
|
15789
|
+
type: type
|
|
15790
|
+
}), isFilterType(type) && React__default.createElement(TagSetFilter$1, {
|
|
15791
|
+
id: id,
|
|
15792
|
+
isDismissible: isDismissible,
|
|
15793
|
+
onClick: onClick,
|
|
15794
|
+
tagSetData: tagSetData,
|
|
15795
|
+
type: type
|
|
15796
|
+
}));
|
|
15797
|
+
}));
|
|
15798
|
+
|
|
15799
|
+
var _excluded$2f = ["aboveHeader", "breakout", "contentId", "contentBottom", "contentPrimary", "contentSidebar", "contentTop", "footer", "header", "sidebar", "renderFooterElement", "renderHeaderElement", "renderSkipNavigation"];
|
|
15582
15800
|
/**
|
|
15583
15801
|
* The main top-level parent component that wraps all template-related
|
|
15584
15802
|
* components.
|
|
@@ -15828,7 +16046,7 @@ var TemplateAppContainer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function
|
|
|
15828
16046
|
renderHeaderElement = _props$renderHeaderEl === void 0 ? true : _props$renderHeaderEl,
|
|
15829
16047
|
_props$renderSkipNavi = props.renderSkipNavigation,
|
|
15830
16048
|
renderSkipNavigation = _props$renderSkipNavi === void 0 ? false : _props$renderSkipNavi,
|
|
15831
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16049
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2f);
|
|
15832
16050
|
|
|
15833
16051
|
var aboveHeaderElem = aboveHeader && React__default.createElement(TemplateAboveHeader, null, aboveHeader);
|
|
15834
16052
|
var contentTopElem = contentTop && React__default.createElement(TemplateContentTop, null, contentTop);
|
|
@@ -15847,7 +16065,7 @@ var TemplateAppContainer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function
|
|
|
15847
16065
|
}, footer)));
|
|
15848
16066
|
}));
|
|
15849
16067
|
|
|
15850
|
-
var _excluded$
|
|
16068
|
+
var _excluded$2g = ["defaultChecked", "helperText", "id", "invalidText", "isChecked", "isDisabled", "isInvalid", "isRequired", "labelText", "name", "onChange", "size"];
|
|
15851
16069
|
var onChangeDefault = function onChangeDefault() {
|
|
15852
16070
|
return;
|
|
15853
16071
|
};
|
|
@@ -15874,7 +16092,7 @@ var Toggle$2 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
15874
16092
|
onChange = _props$onChange === void 0 ? onChangeDefault : _props$onChange,
|
|
15875
16093
|
_props$size = props.size,
|
|
15876
16094
|
size = _props$size === void 0 ? "default" : _props$size,
|
|
15877
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16095
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
15878
16096
|
|
|
15879
16097
|
var styles = useMultiStyleConfig("Toggle", {
|
|
15880
16098
|
isDisabled: isDisabled,
|
|
@@ -15923,7 +16141,7 @@ var Toggle$2 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
15923
16141
|
}), labelText)));
|
|
15924
16142
|
}));
|
|
15925
16143
|
|
|
15926
|
-
var _excluded$
|
|
16144
|
+
var _excluded$2h = ["aspectRatio", "className", "descriptionText", "embedCode", "headingText", "helperText", "id", "iframeTitle", "showHelperInvalidText", "videoId", "videoType"];
|
|
15927
16145
|
var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15928
16146
|
var aspectRatio = props.aspectRatio,
|
|
15929
16147
|
className = props.className,
|
|
@@ -15937,7 +16155,7 @@ var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
15937
16155
|
showHelperInvalidText = _props$showHelperInva === void 0 ? true : _props$showHelperInva,
|
|
15938
16156
|
videoId = props.videoId,
|
|
15939
16157
|
videoType = props.videoType,
|
|
15940
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16158
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2h);
|
|
15941
16159
|
|
|
15942
16160
|
var iframeTitleFinal = videoType === "vimeo" ? iframeTitle || "Vimeo video player" : iframeTitle || "YouTube video player";
|
|
15943
16161
|
var videoSrc = videoType === "vimeo" ? "https://player.vimeo.com/video/" + videoId + "?autoplay=0&loop=0" : "https://www.youtube.com/embed/" + videoId + "?disablekb=1&autoplay=0&fs=1&modestbranding=0";
|
|
@@ -16007,37 +16225,5 @@ var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
16007
16225
|
}, embedElement)));
|
|
16008
16226
|
}));
|
|
16009
16227
|
|
|
16010
|
-
|
|
16011
|
-
var Tooltip$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
16012
|
-
var children = props.children,
|
|
16013
|
-
content = props.content,
|
|
16014
|
-
isDisabled = props.isDisabled,
|
|
16015
|
-
shouldWrapChildren = props.shouldWrapChildren,
|
|
16016
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
16017
|
-
|
|
16018
|
-
if (typeof content !== "string") {
|
|
16019
|
-
React__default.Children.map(content, function (contentChild) {
|
|
16020
|
-
if (contentChild.type !== Icon || contentChild.type !== Image) {
|
|
16021
|
-
console.warn("NYPL Reservoir Tooltip: Pass in a string, DS Icon, or DS Image into the 'content' prop.");
|
|
16022
|
-
}
|
|
16023
|
-
});
|
|
16024
|
-
}
|
|
16025
|
-
|
|
16026
|
-
var newChildren = shouldWrapChildren ? React__default.createElement(ComponentWrapper, {
|
|
16027
|
-
width: "fit-content"
|
|
16028
|
-
}, children) : children;
|
|
16029
|
-
var styles = useMultiStyleConfig("Tooltip", {});
|
|
16030
|
-
return React__default.createElement(Tooltip$2, Object.assign({
|
|
16031
|
-
hasArrow: true,
|
|
16032
|
-
"aria-label": typeof content !== "string" ? "Tooltip" : undefined,
|
|
16033
|
-
label: content,
|
|
16034
|
-
isDisabled: isDisabled,
|
|
16035
|
-
placement: "top",
|
|
16036
|
-
openDelay: 500,
|
|
16037
|
-
ref: ref,
|
|
16038
|
-
__css: styles
|
|
16039
|
-
}, rest), newChildren);
|
|
16040
|
-
}));
|
|
16041
|
-
|
|
16042
|
-
export { Accordion, AlphabetFilter, AudioPlayer, Breadcrumbs, Button, ButtonGroup, Card, CardActions, CardContent, CardHeading, Checkbox, CheckboxGroup, ColorCard, DSProvider, DatePicker, Fieldset, Footer$1 as Footer, Form, FormField, FormRow, Header$1 as Header, Heading, HelperErrorText, Hero$1 as Hero, HorizontalRule$1 as HorizontalRule, Icon, Image, Label, Link, List$1 as List, Logo$1 as Logo, ModalTrigger, Notification$1 as Notification, Pagination$1 as Pagination, ProgressIndicator$1 as ProgressIndicator, Radio$1 as Radio, RadioGroup$1 as RadioGroup, SearchBar$1 as SearchBar, Select$1 as Select, SimpleGrid, SkeletonLoader$1 as SkeletonLoader, SkipNavigation$1 as SkipNavigation, Slider, StatusBadge$1 as StatusBadge, StructuredContent$1 as StructuredContent, Table, Tabs, Template$1 as Template, TemplateAboveHeader, TemplateAppContainer, TemplateBreakout$1 as TemplateBreakout, TemplateContent$1 as TemplateContent, TemplateContentPrimary$1 as TemplateContentPrimary, TemplateContentSidebar$1 as TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, Text, TextInput, Toggle$2 as Toggle, Tooltip$1 as Tooltip, VideoPlayer$1 as VideoPlayer, useCarouselStyles, useModal, useNYPLBreakpoints, useNYPLTheme, useWindowSize };
|
|
16228
|
+
export { Accordion, AlphabetFilter, AudioPlayer, Breadcrumbs, Button, ButtonGroup, Card, CardActions, CardContent, CardHeading, Checkbox, CheckboxGroup, ColorCard, DSProvider, DatePicker, Fieldset, Footer$1 as Footer, Form, FormField, FormRow, Header$1 as Header, Heading, HelperErrorText, Hero$1 as Hero, HorizontalRule$1 as HorizontalRule, Icon, Image, Label, Link, List$1 as List, Logo$1 as Logo, ModalTrigger, Notification$1 as Notification, Pagination$1 as Pagination, ProgressIndicator$1 as ProgressIndicator, Radio$1 as Radio, RadioGroup$1 as RadioGroup, SearchBar$1 as SearchBar, Select$1 as Select, SimpleGrid, SkeletonLoader$1 as SkeletonLoader, SkipNavigation$1 as SkipNavigation, Slider, StatusBadge$1 as StatusBadge, StructuredContent$1 as StructuredContent, Table, Tabs, TagSet$1 as TagSet, Template$1 as Template, TemplateAboveHeader, TemplateAppContainer, TemplateBreakout$1 as TemplateBreakout, TemplateContent$1 as TemplateContent, TemplateContentPrimary$1 as TemplateContentPrimary, TemplateContentSidebar$1 as TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, Text, TextInput, Toggle$2 as Toggle, Tooltip$1 as Tooltip, VideoPlayer$1 as VideoPlayer, useCarouselStyles, useModal, useNYPLBreakpoints, useNYPLTheme, useWindowSize };
|
|
16043
16229
|
//# sourceMappingURL=design-system-react-components.esm.js.map
|