@nypl/design-system-react-components 1.2.0-rc → 1.2.0-rc-3
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/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/design-system-react-components.cjs.development.js +264 -61
- 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 +265 -63
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/index.d.ts +3 -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
|
}
|
|
@@ -2508,33 +2508,49 @@ var AudioPlayer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props,
|
|
|
2508
2508
|
id = props.id,
|
|
2509
2509
|
_props$iframeTitle = props.iframeTitle,
|
|
2510
2510
|
iframeTitle = _props$iframeTitle === void 0 ? null : _props$iframeTitle,
|
|
2511
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$Z);
|
|
2511
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$Z);
|
|
2512
2512
|
|
|
2513
|
+
var _useState = useState(false),
|
|
2514
|
+
invalidEmbed = _useState[0],
|
|
2515
|
+
setInvalidEmbed = _useState[1];
|
|
2513
2516
|
|
|
2514
|
-
var
|
|
2517
|
+
var _useState2 = useState(undefined),
|
|
2518
|
+
iframeDoc = _useState2[0],
|
|
2519
|
+
setIframeDoc = _useState2[1];
|
|
2520
|
+
/**
|
|
2521
|
+
* Main hooks to check the embedCode structure.
|
|
2522
|
+
*/
|
|
2515
2523
|
|
|
2516
|
-
var isInvalidEmbed = !embedCode || !iframeDoc || !isValidEmbedCode(iframeDoc);
|
|
2517
|
-
var errorMessage = "<strong>Error: </strong>This audio player has not been configured properly. Please contact the site administrator.";
|
|
2518
2524
|
|
|
2519
|
-
function
|
|
2520
|
-
|
|
2525
|
+
useEffect(function () {
|
|
2526
|
+
// The root iframe object generated from the embedCode.
|
|
2527
|
+
var iframe = parseIframeEmbedCode(embedCode); // when no embedCode or it was a broken code.
|
|
2521
2528
|
|
|
2522
|
-
|
|
2523
|
-
} // Only set the iframe title if it doesn't already have it in the iframe.
|
|
2529
|
+
var isInvalidEmbed = !embedCode || !iframe || !isValidEmbedCode(audioType, iframe); // Only set the iframe title if it doesn't already have it in the iframe.
|
|
2524
2530
|
|
|
2531
|
+
if (iframe && !iframe.title) {
|
|
2532
|
+
iframe.title = iframeTitle ? iframeTitle : "Embedded audio player";
|
|
2533
|
+
}
|
|
2525
2534
|
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2535
|
+
var isThirdPartyService = !!thirdPartyServices.find(function (service) {
|
|
2536
|
+
return service === audioType;
|
|
2537
|
+
});
|
|
2538
|
+
var isThirdPartyWithoutCode = isThirdPartyService && !embedCode;
|
|
2529
2539
|
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2540
|
+
if (isThirdPartyWithoutCode) {
|
|
2541
|
+
console.warn("NYPL Reservoir AudioPlayer: The `embedCode` prop is required when using a 3rd party streaming service.");
|
|
2542
|
+
isInvalidEmbed = true;
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
setInvalidEmbed(isInvalidEmbed);
|
|
2546
|
+
setIframeDoc(iframe);
|
|
2547
|
+
}, [embedCode, audioType, iframeTitle]);
|
|
2548
|
+
var errorMessage = "<strong>Error: </strong>This audio player has not been configured properly. Please contact the site administrator.";
|
|
2549
|
+
|
|
2550
|
+
function isValidEmbedCode(audioType, doc) {
|
|
2551
|
+
var _doc$src;
|
|
2534
2552
|
|
|
2535
|
-
|
|
2536
|
-
console.warn("NYPL Reservoir AudioPlayer: The `embedCode` prop is required when using a 3rd party streaming service.");
|
|
2537
|
-
isInvalidEmbed = true;
|
|
2553
|
+
return audioType !== "file" && (doc == null ? void 0 : (_doc$src = doc.src) == null ? void 0 : _doc$src.includes(audioType + ".com"));
|
|
2538
2554
|
}
|
|
2539
2555
|
|
|
2540
2556
|
var styles = useMultiStyleConfig("AudioPlayer", {});
|
|
@@ -2561,7 +2577,7 @@ var AudioPlayer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props,
|
|
|
2561
2577
|
"data-testid": "audio-player-component",
|
|
2562
2578
|
ref: ref,
|
|
2563
2579
|
__css: styles
|
|
2564
|
-
}, rest),
|
|
2580
|
+
}, rest), invalidEmbed ? React__default.createElement(Box, {
|
|
2565
2581
|
dangerouslySetInnerHTML: {
|
|
2566
2582
|
__html: errorMessage
|
|
2567
2583
|
},
|
|
@@ -5189,7 +5205,8 @@ var AlphabetFilter$1 = {
|
|
|
5189
5205
|
}
|
|
5190
5206
|
},
|
|
5191
5207
|
_disabled: {
|
|
5192
|
-
color: "ui.gray.medium"
|
|
5208
|
+
color: "ui.gray.medium",
|
|
5209
|
+
cursor: "not-allowed"
|
|
5193
5210
|
}
|
|
5194
5211
|
}
|
|
5195
5212
|
}
|
|
@@ -9367,6 +9384,7 @@ var theme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
9367
9384
|
components: /*#__PURE__*/_extends({
|
|
9368
9385
|
Accordion: Accordion$1,
|
|
9369
9386
|
AlphabetFilter: AlphabetFilter$1,
|
|
9387
|
+
AudioPlayer: AudioPlayer$1,
|
|
9370
9388
|
Breadcrumb: Breadcrumb,
|
|
9371
9389
|
Button: Button$1,
|
|
9372
9390
|
ButtonGroup: ButtonGroup$1
|
|
@@ -9419,8 +9437,7 @@ var theme = /*#__PURE__*/extendTheme( /*#__PURE__*/_extends({
|
|
|
9419
9437
|
TextInput: TextInput$1
|
|
9420
9438
|
}, Toggle$1, {
|
|
9421
9439
|
Tooltip: Tooltip,
|
|
9422
|
-
VideoPlayer: VideoPlayer
|
|
9423
|
-
AudioPlayer: AudioPlayer$1
|
|
9440
|
+
VideoPlayer: VideoPlayer
|
|
9424
9441
|
}),
|
|
9425
9442
|
config: {
|
|
9426
9443
|
// Use `cssVarPrefix` to set the prefix used on the CSS vars produced by
|
|
@@ -15578,7 +15595,224 @@ var Tabs = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
15578
15595
|
}, React__default.createElement(Box, Object.assign({}, carouselStyle), tabs)), nextButton), panels);
|
|
15579
15596
|
})); // Tabs is also exported above so the props can display in Storybook.
|
|
15580
15597
|
|
|
15581
|
-
var _excluded$2d = ["
|
|
15598
|
+
var _excluded$2d = ["children", "className", "content", "id", "isDisabled", "shouldWrapChildren"];
|
|
15599
|
+
var Tooltip$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15600
|
+
var children = props.children,
|
|
15601
|
+
content = props.content,
|
|
15602
|
+
isDisabled = props.isDisabled,
|
|
15603
|
+
shouldWrapChildren = props.shouldWrapChildren,
|
|
15604
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2d);
|
|
15605
|
+
|
|
15606
|
+
if (typeof content !== "string" && typeof content !== "number") {
|
|
15607
|
+
React__default.Children.map(content, function (contentChild) {
|
|
15608
|
+
if (contentChild.type !== Icon || contentChild.type !== Image) {
|
|
15609
|
+
console.warn("NYPL Reservoir Tooltip: Pass in a string, number, DS Icon, or DS Image into the 'content' prop.");
|
|
15610
|
+
}
|
|
15611
|
+
});
|
|
15612
|
+
}
|
|
15613
|
+
|
|
15614
|
+
var newChildren = shouldWrapChildren ? React__default.createElement(ComponentWrapper, {
|
|
15615
|
+
width: "fit-content"
|
|
15616
|
+
}, children) : children;
|
|
15617
|
+
var styles = useMultiStyleConfig("Tooltip", {});
|
|
15618
|
+
return React__default.createElement(Tooltip$2, Object.assign({
|
|
15619
|
+
hasArrow: true,
|
|
15620
|
+
"aria-label": typeof content !== "string" ? "Tooltip" : undefined,
|
|
15621
|
+
label: content,
|
|
15622
|
+
isDisabled: isDisabled,
|
|
15623
|
+
placement: "top",
|
|
15624
|
+
openDelay: 500,
|
|
15625
|
+
ref: ref,
|
|
15626
|
+
__css: styles
|
|
15627
|
+
}, rest), newChildren);
|
|
15628
|
+
}));
|
|
15629
|
+
|
|
15630
|
+
/**
|
|
15631
|
+
* The "explore" `TagSet` variant will always display the tags passed as data.
|
|
15632
|
+
* The `label` property in the `tagSetData` prop should be set to a link-type
|
|
15633
|
+
* JSX component for linking to specific content.
|
|
15634
|
+
*/
|
|
15635
|
+
|
|
15636
|
+
var TagSetExplore$1 = /*#__PURE__*/chakra(function (props) {
|
|
15637
|
+
var id = props.id,
|
|
15638
|
+
_props$tagSetData = props.tagSetData,
|
|
15639
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData;
|
|
15640
|
+
var styles = useStyleConfig("TagSetExplore");
|
|
15641
|
+
return React__default.createElement(React__default.Fragment, null, tagSetData.map(function (tagSet, key) {
|
|
15642
|
+
if (typeof tagSet.label === "string") {
|
|
15643
|
+
console.warn("NYPL Reservoir TagSet: Explore tags require all `label` props to be React components.");
|
|
15644
|
+
}
|
|
15645
|
+
|
|
15646
|
+
return React__default.createElement(TooltipWrapper, {
|
|
15647
|
+
key: key,
|
|
15648
|
+
label: tagSet.label
|
|
15649
|
+
}, React__default.createElement(Box, {
|
|
15650
|
+
"data-testid": "explore-tags",
|
|
15651
|
+
id: "ts-explore-" + id + "-" + key,
|
|
15652
|
+
__css: styles
|
|
15653
|
+
}, tagSet.iconName ? React__default.createElement(Icon, {
|
|
15654
|
+
align: "left",
|
|
15655
|
+
"data-testid": "ts-icon",
|
|
15656
|
+
name: tagSet.iconName,
|
|
15657
|
+
size: "small"
|
|
15658
|
+
}) : null, React__default.createElement("span", null, tagSet.label)));
|
|
15659
|
+
}));
|
|
15660
|
+
});
|
|
15661
|
+
|
|
15662
|
+
/**
|
|
15663
|
+
* The "filter" `TagSet` variant will display tags that can be removed when
|
|
15664
|
+
* `isDismissible` is true and they are clicked.
|
|
15665
|
+
*/
|
|
15666
|
+
|
|
15667
|
+
var TagSetFilter$1 = /*#__PURE__*/chakra(function (props) {
|
|
15668
|
+
var id = props.id,
|
|
15669
|
+
_props$isDismissible = props.isDismissible,
|
|
15670
|
+
isDismissible = _props$isDismissible === void 0 ? false : _props$isDismissible,
|
|
15671
|
+
onClick = props.onClick,
|
|
15672
|
+
_props$tagSetData = props.tagSetData,
|
|
15673
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData;
|
|
15674
|
+
|
|
15675
|
+
var _React$useState = React__default.useState(tagSetData),
|
|
15676
|
+
filters = _React$useState[0],
|
|
15677
|
+
setFilters = _React$useState[1];
|
|
15678
|
+
|
|
15679
|
+
var styles = useMultiStyleConfig("TagSetFilter", {
|
|
15680
|
+
isDismissible: isDismissible
|
|
15681
|
+
});
|
|
15682
|
+
|
|
15683
|
+
var finalOnClick = function finalOnClick(tagLabel) {
|
|
15684
|
+
onClick && onClick(tagLabel);
|
|
15685
|
+
}; // This expects that the consuming app passes in a new set of data
|
|
15686
|
+
// whenever the current list of tags needs to be updated.
|
|
15687
|
+
|
|
15688
|
+
|
|
15689
|
+
useEffect(function () {
|
|
15690
|
+
setFilters(tagSetData);
|
|
15691
|
+
}, [tagSetData, setFilters]);
|
|
15692
|
+
return React__default.createElement(React__default.Fragment, null, filters.map(function (tagSet, key) {
|
|
15693
|
+
if (typeof tagSet.label !== "string") {
|
|
15694
|
+
console.warn("NYPL Reservoir TagSet: Filter tags require all `label` props to be strings.");
|
|
15695
|
+
}
|
|
15696
|
+
|
|
15697
|
+
if (isDismissible && tagSet.iconName) {
|
|
15698
|
+
console.warn("NYPL Reservoir TagSet: Filter tags will not render icons when `isDismissible` is set to true.");
|
|
15699
|
+
}
|
|
15700
|
+
|
|
15701
|
+
return React__default.createElement(TooltipWrapper, {
|
|
15702
|
+
key: key,
|
|
15703
|
+
label: tagSet.label
|
|
15704
|
+
}, React__default.createElement(Button, {
|
|
15705
|
+
"data-testid": "filter-tags",
|
|
15706
|
+
id: "ts-filter-" + id + "-" + key,
|
|
15707
|
+
onClick: isDismissible ? function () {
|
|
15708
|
+
return finalOnClick(tagSet.label);
|
|
15709
|
+
} : undefined,
|
|
15710
|
+
sx: styles
|
|
15711
|
+
}, !isDismissible && tagSet.iconName ? React__default.createElement(Icon, {
|
|
15712
|
+
align: "left",
|
|
15713
|
+
"data-testid": "ts-icon",
|
|
15714
|
+
name: tagSet.iconName,
|
|
15715
|
+
size: "small"
|
|
15716
|
+
}) : null, React__default.createElement("span", null, tagSet.label), isDismissible ? React__default.createElement(Icon, {
|
|
15717
|
+
"data-testid": "filter-close-icon",
|
|
15718
|
+
align: "right",
|
|
15719
|
+
name: "close",
|
|
15720
|
+
size: "small",
|
|
15721
|
+
color: "ui.gray.x-dark",
|
|
15722
|
+
width: "12px"
|
|
15723
|
+
}) : null));
|
|
15724
|
+
}), filters.length > 1 && isDismissible ? React__default.createElement(Button, {
|
|
15725
|
+
buttonType: "link",
|
|
15726
|
+
"data-testid": "filter-clear-all",
|
|
15727
|
+
id: "ts-filter-clear-all-" + id,
|
|
15728
|
+
onClick: function onClick() {
|
|
15729
|
+
return finalOnClick("clearFilters");
|
|
15730
|
+
},
|
|
15731
|
+
__css: styles.clearAll
|
|
15732
|
+
}, "Clear Filters") : null);
|
|
15733
|
+
});
|
|
15734
|
+
|
|
15735
|
+
var _excluded$2e = ["className", "id", "isDismissible", "onClick", "tagSetData", "type"];
|
|
15736
|
+
|
|
15737
|
+
function isFilterType(type) {
|
|
15738
|
+
return type === "filter";
|
|
15739
|
+
}
|
|
15740
|
+
/**
|
|
15741
|
+
* This helper component wrapper renders a DS `Tooltip` component if the text is
|
|
15742
|
+
* long or a React fragment. This assumes that the `label` prop is a rather
|
|
15743
|
+
* simple single root JSX element, such as `<Link ...>....</Link>`.
|
|
15744
|
+
*/
|
|
15745
|
+
|
|
15746
|
+
var TooltipWrapper = function TooltipWrapper(_ref) {
|
|
15747
|
+
var label = _ref.label,
|
|
15748
|
+
children = _ref.children;
|
|
15749
|
+
var maxCharLengthToShow = 20;
|
|
15750
|
+
var labelText = typeof label === "string" ? label : label.props.children;
|
|
15751
|
+
|
|
15752
|
+
if (labelText.length > maxCharLengthToShow && typeof labelText === "string") {
|
|
15753
|
+
return React__default.createElement(Tooltip$1, {
|
|
15754
|
+
content: labelText
|
|
15755
|
+
}, children);
|
|
15756
|
+
}
|
|
15757
|
+
|
|
15758
|
+
return React__default.createElement(React__default.Fragment, null, children);
|
|
15759
|
+
};
|
|
15760
|
+
/**
|
|
15761
|
+
* The `TagSet` component renders a group of individual tags which have two
|
|
15762
|
+
* variants: "explore" and "filter". The "explore" tags are meant to be used for
|
|
15763
|
+
* exploratory linkable elements, whereas the "filter" tags are used to display
|
|
15764
|
+
* the filter values that were selected through another UI. Only "filter" tags
|
|
15765
|
+
* can be dismissible.
|
|
15766
|
+
*
|
|
15767
|
+
* The width of a single tag will never be greater than 200px. If necessary, a
|
|
15768
|
+
* tag’s label text will be truncated to keep a tag’s width at or below 200px.
|
|
15769
|
+
* The full label text will be automatically revealed when the tag is hovered
|
|
15770
|
+
* with a DS `Tooltip` component.
|
|
15771
|
+
*/
|
|
15772
|
+
|
|
15773
|
+
var TagSet$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15774
|
+
var className = props.className,
|
|
15775
|
+
id = props.id,
|
|
15776
|
+
_props$isDismissible = props.isDismissible,
|
|
15777
|
+
isDismissible = _props$isDismissible === void 0 ? false : _props$isDismissible,
|
|
15778
|
+
onClick = props.onClick,
|
|
15779
|
+
_props$tagSetData = props.tagSetData,
|
|
15780
|
+
tagSetData = _props$tagSetData === void 0 ? [] : _props$tagSetData,
|
|
15781
|
+
_props$type = props.type,
|
|
15782
|
+
type = _props$type === void 0 ? "filter" : _props$type,
|
|
15783
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2e);
|
|
15784
|
+
|
|
15785
|
+
var styles = useStyleConfig("TagSet", {});
|
|
15786
|
+
|
|
15787
|
+
if (!isFilterType(type)) {
|
|
15788
|
+
if (isDismissible) {
|
|
15789
|
+
console.warn("NYPL Reservoir TagSet: The `isDismissible` prop will be ignored when the `type` prop is set to 'explore'.");
|
|
15790
|
+
}
|
|
15791
|
+
|
|
15792
|
+
if (onClick) {
|
|
15793
|
+
console.warn("NYPL Reservoir TagSet: The `onClick` prop will be ignored when the `type` prop is set to 'explore'.");
|
|
15794
|
+
}
|
|
15795
|
+
}
|
|
15796
|
+
|
|
15797
|
+
return React__default.createElement(Flex, Object.assign({
|
|
15798
|
+
className: className,
|
|
15799
|
+
id: id,
|
|
15800
|
+
ref: ref,
|
|
15801
|
+
__css: styles
|
|
15802
|
+
}, rest), !isFilterType(type) && React__default.createElement(TagSetExplore$1, {
|
|
15803
|
+
id: id,
|
|
15804
|
+
tagSetData: tagSetData,
|
|
15805
|
+
type: type
|
|
15806
|
+
}), isFilterType(type) && React__default.createElement(TagSetFilter$1, {
|
|
15807
|
+
id: id,
|
|
15808
|
+
isDismissible: isDismissible,
|
|
15809
|
+
onClick: onClick,
|
|
15810
|
+
tagSetData: tagSetData,
|
|
15811
|
+
type: type
|
|
15812
|
+
}));
|
|
15813
|
+
}));
|
|
15814
|
+
|
|
15815
|
+
var _excluded$2f = ["aboveHeader", "breakout", "contentId", "contentBottom", "contentPrimary", "contentSidebar", "contentTop", "footer", "header", "sidebar", "renderFooterElement", "renderHeaderElement", "renderSkipNavigation"];
|
|
15582
15816
|
/**
|
|
15583
15817
|
* The main top-level parent component that wraps all template-related
|
|
15584
15818
|
* components.
|
|
@@ -15828,7 +16062,7 @@ var TemplateAppContainer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function
|
|
|
15828
16062
|
renderHeaderElement = _props$renderHeaderEl === void 0 ? true : _props$renderHeaderEl,
|
|
15829
16063
|
_props$renderSkipNavi = props.renderSkipNavigation,
|
|
15830
16064
|
renderSkipNavigation = _props$renderSkipNavi === void 0 ? false : _props$renderSkipNavi,
|
|
15831
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16065
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2f);
|
|
15832
16066
|
|
|
15833
16067
|
var aboveHeaderElem = aboveHeader && React__default.createElement(TemplateAboveHeader, null, aboveHeader);
|
|
15834
16068
|
var contentTopElem = contentTop && React__default.createElement(TemplateContentTop, null, contentTop);
|
|
@@ -15847,7 +16081,7 @@ var TemplateAppContainer = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function
|
|
|
15847
16081
|
}, footer)));
|
|
15848
16082
|
}));
|
|
15849
16083
|
|
|
15850
|
-
var _excluded$
|
|
16084
|
+
var _excluded$2g = ["defaultChecked", "helperText", "id", "invalidText", "isChecked", "isDisabled", "isInvalid", "isRequired", "labelText", "name", "onChange", "size"];
|
|
15851
16085
|
var onChangeDefault = function onChangeDefault() {
|
|
15852
16086
|
return;
|
|
15853
16087
|
};
|
|
@@ -15874,7 +16108,7 @@ var Toggle$2 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
15874
16108
|
onChange = _props$onChange === void 0 ? onChangeDefault : _props$onChange,
|
|
15875
16109
|
_props$size = props.size,
|
|
15876
16110
|
size = _props$size === void 0 ? "default" : _props$size,
|
|
15877
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16111
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2g);
|
|
15878
16112
|
|
|
15879
16113
|
var styles = useMultiStyleConfig("Toggle", {
|
|
15880
16114
|
isDisabled: isDisabled,
|
|
@@ -15923,7 +16157,7 @@ var Toggle$2 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref
|
|
|
15923
16157
|
}), labelText)));
|
|
15924
16158
|
}));
|
|
15925
16159
|
|
|
15926
|
-
var _excluded$
|
|
16160
|
+
var _excluded$2h = ["aspectRatio", "className", "descriptionText", "embedCode", "headingText", "helperText", "id", "iframeTitle", "showHelperInvalidText", "videoId", "videoType"];
|
|
15927
16161
|
var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
15928
16162
|
var aspectRatio = props.aspectRatio,
|
|
15929
16163
|
className = props.className,
|
|
@@ -15937,7 +16171,7 @@ var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
15937
16171
|
showHelperInvalidText = _props$showHelperInva === void 0 ? true : _props$showHelperInva,
|
|
15938
16172
|
videoId = props.videoId,
|
|
15939
16173
|
videoType = props.videoType,
|
|
15940
|
-
rest = _objectWithoutPropertiesLoose(props, _excluded$
|
|
16174
|
+
rest = _objectWithoutPropertiesLoose(props, _excluded$2h);
|
|
15941
16175
|
|
|
15942
16176
|
var iframeTitleFinal = videoType === "vimeo" ? iframeTitle || "Vimeo video player" : iframeTitle || "YouTube video player";
|
|
15943
16177
|
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 +16241,5 @@ var VideoPlayer$1 = /*#__PURE__*/chakra( /*#__PURE__*/forwardRef(function (props
|
|
|
16007
16241
|
}, embedElement)));
|
|
16008
16242
|
}));
|
|
16009
16243
|
|
|
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 };
|
|
16244
|
+
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
16245
|
//# sourceMappingURL=design-system-react-components.esm.js.map
|