@ndlib/component-library 0.0.8 → 0.0.14

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.
Files changed (134) hide show
  1. package/README.md +101 -0
  2. package/dist/FontLoader.d.ts +1 -0
  3. package/dist/FontLoader.js +4 -0
  4. package/dist/components/composites/Card/Card.stories.d.ts +9 -0
  5. package/dist/components/composites/Card/Card.stories.js +77 -0
  6. package/dist/components/composites/Card/Card.test.d.ts +1 -0
  7. package/dist/components/composites/Card/Card.test.js +29 -0
  8. package/dist/components/composites/Card/index.d.ts +22 -0
  9. package/dist/components/composites/Card/index.js +71 -0
  10. package/dist/components/elements/Alerts/Alert.stories.d.ts +9 -0
  11. package/dist/components/elements/Alerts/Alert.stories.js +41 -0
  12. package/dist/components/elements/Alerts/Alerts.stories.d.ts +6 -0
  13. package/dist/components/elements/Alerts/Alerts.stories.js +12 -0
  14. package/dist/components/elements/Alerts/Alerts.test.d.ts +1 -0
  15. package/dist/components/elements/Alerts/Alerts.test.js +62 -0
  16. package/dist/components/elements/Alerts/index.d.ts +15 -0
  17. package/dist/components/elements/Alerts/index.js +63 -0
  18. package/dist/components/elements/BrandingBar/BrandingBar.stories.d.ts +6 -0
  19. package/dist/components/elements/BrandingBar/BrandingBar.stories.js +11 -0
  20. package/dist/components/elements/BrandingBar/index.d.ts +1 -0
  21. package/dist/components/elements/BrandingBar/index.js +52 -0
  22. package/dist/components/elements/Button/Button.stories.d.ts +4 -0
  23. package/dist/components/elements/Button/Button.stories.js +42 -9
  24. package/dist/components/elements/Button/Button.test.js +11 -2
  25. package/dist/components/elements/Button/index.d.ts +16 -11
  26. package/dist/components/elements/Button/index.js +84 -34
  27. package/dist/components/elements/Fields/Checkbox/Checkbox.stories.d.ts +6 -0
  28. package/dist/components/elements/Fields/Checkbox/Checkbox.stories.js +17 -0
  29. package/dist/components/elements/Fields/Checkbox/index.d.ts +9 -0
  30. package/dist/components/elements/Fields/Checkbox/index.js +22 -0
  31. package/dist/components/elements/Fields/CheckboxGroup/CheckboxGroup.stories.d.ts +6 -0
  32. package/dist/components/elements/Fields/CheckboxGroup/CheckboxGroup.stories.js +23 -0
  33. package/dist/components/elements/Fields/CheckboxGroup/index.d.ts +14 -0
  34. package/dist/components/elements/Fields/CheckboxGroup/index.js +35 -0
  35. package/dist/components/elements/Fields/Radio/Radio.stories.d.ts +6 -0
  36. package/dist/components/elements/Fields/Radio/Radio.stories.js +17 -0
  37. package/dist/components/elements/Fields/Radio/index.d.ts +9 -0
  38. package/dist/components/elements/Fields/Radio/index.js +22 -0
  39. package/dist/components/elements/Fields/RadioGroup/RadioGroup.stories.d.ts +6 -0
  40. package/dist/components/elements/Fields/RadioGroup/RadioGroup.stories.js +23 -0
  41. package/dist/components/elements/Fields/RadioGroup/index.d.ts +14 -0
  42. package/dist/components/elements/Fields/RadioGroup/index.js +28 -0
  43. package/dist/components/elements/Fields/Select/Select.stories.d.ts +6 -0
  44. package/dist/components/elements/Fields/Select/Select.stories.js +32 -0
  45. package/dist/components/elements/Fields/Select/index.d.ts +16 -0
  46. package/dist/components/elements/Fields/Select/index.js +136 -0
  47. package/dist/components/elements/Fields/TextInput/TextInput.stories.d.ts +6 -0
  48. package/dist/components/elements/Fields/TextInput/TextInput.stories.js +25 -0
  49. package/dist/components/elements/Fields/TextInput/index.d.ts +17 -0
  50. package/dist/components/elements/Fields/TextInput/index.js +60 -0
  51. package/dist/components/elements/Fields/option.d.ts +15 -0
  52. package/dist/components/elements/Fields/option.js +3 -0
  53. package/dist/components/elements/Group/index.js +3 -3
  54. package/dist/components/elements/Icon/Icon.stories.d.ts +7 -0
  55. package/dist/components/elements/Icon/Icon.stories.js +29 -0
  56. package/dist/components/elements/Icon/Icon.test.d.ts +1 -0
  57. package/dist/components/elements/Icon/Icon.test.js +26 -0
  58. package/dist/components/elements/Icon/index.d.ts +11 -0
  59. package/dist/components/elements/Icon/index.js +25 -0
  60. package/dist/components/elements/Link/Link.stories.js +3 -3
  61. package/dist/components/elements/Link/Link.test.js +13 -13
  62. package/dist/components/elements/Link/index.d.ts +2 -2
  63. package/dist/components/elements/Link/index.js +4 -4
  64. package/dist/components/elements/List/List.stories.d.ts +9 -0
  65. package/dist/components/elements/List/List.stories.js +31 -0
  66. package/dist/components/elements/List/List.test.d.ts +1 -0
  67. package/dist/components/elements/List/List.test.js +24 -0
  68. package/dist/components/elements/List/index.d.ts +21 -0
  69. package/dist/components/elements/List/index.js +75 -0
  70. package/dist/components/elements/ListBox/Listbox.stories.d.ts +6 -0
  71. package/dist/components/elements/ListBox/Listbox.stories.js +17 -0
  72. package/dist/components/elements/ListBox/index.d.ts +32 -0
  73. package/dist/components/elements/ListBox/index.js +50 -0
  74. package/dist/components/elements/Markdown/Markdown.stories.d.ts +6 -0
  75. package/dist/components/elements/Markdown/Markdown.stories.js +53 -0
  76. package/dist/components/elements/Markdown/Markdown.test.d.ts +1 -0
  77. package/dist/components/elements/Markdown/Markdown.test.js +58 -0
  78. package/dist/components/elements/Markdown/index.d.ts +7 -0
  79. package/dist/components/elements/Markdown/index.js +50 -0
  80. package/dist/components/elements/layout/Box.d.ts +1 -1
  81. package/dist/components/elements/layout/Box.stories.js +1 -1
  82. package/dist/components/elements/layout/Column.d.ts +2 -2
  83. package/dist/components/elements/layout/Column.js +2 -2
  84. package/dist/components/elements/layout/Flex.stories.js +2 -2
  85. package/dist/components/elements/layout/Flex.test.js +2 -2
  86. package/dist/components/elements/layout/Row.d.ts +2 -2
  87. package/dist/components/elements/layout/Row.js +1 -1
  88. package/dist/components/elements/text/Heading/Heading.stories.js +10 -11
  89. package/dist/components/elements/text/Heading/Heading.test.js +1 -1
  90. package/dist/components/elements/text/Heading/index.d.ts +6 -4
  91. package/dist/components/elements/text/Heading/index.js +19 -13
  92. package/dist/components/elements/text/Inline/Inline.stories.d.ts +6 -0
  93. package/dist/components/elements/text/Inline/Inline.stories.js +13 -0
  94. package/dist/components/elements/text/Inline/index.d.ts +7 -0
  95. package/dist/components/elements/text/Inline/index.js +21 -0
  96. package/dist/components/elements/text/Label/Label.stories.js +3 -3
  97. package/dist/components/elements/text/Label/Label.test.js +2 -2
  98. package/dist/components/elements/text/Label/index.d.ts +3 -3
  99. package/dist/components/elements/text/Label/index.js +4 -4
  100. package/dist/components/elements/text/Paragraph/Paragraph.stories.js +2 -2
  101. package/dist/components/elements/text/Paragraph/Paragraph.test.js +1 -1
  102. package/dist/components/elements/text/Paragraph/index.d.ts +2 -2
  103. package/dist/components/elements/text/Paragraph/index.js +2 -2
  104. package/dist/components/providers/alerts.d.ts +41 -0
  105. package/dist/components/providers/alerts.js +133 -0
  106. package/dist/components/providers/componentConfig.d.ts +3 -3
  107. package/dist/components/providers/componentConfig.js +5 -4
  108. package/dist/components/providers/env.d.ts +1 -1
  109. package/dist/components/providers/env.js +3 -3
  110. package/dist/components/providers/theme.js +1 -1
  111. package/dist/components/providers/ui.d.ts +7 -3
  112. package/dist/components/providers/ui.js +8 -6
  113. package/dist/index.d.ts +6 -1
  114. package/dist/index.js +6 -1
  115. package/dist/theme/Color.stories.js +18 -2
  116. package/dist/theme/Typography.stories.d.ts +6 -0
  117. package/dist/theme/Typography.stories.js +43 -0
  118. package/dist/theme/colors.d.ts +12 -1
  119. package/dist/theme/colors.js +22 -0
  120. package/dist/theme/custom.d.ts +3 -0
  121. package/dist/theme/custom.js +5 -0
  122. package/dist/theme/index.d.ts +139 -4
  123. package/dist/theme/index.js +18 -12
  124. package/dist/theme/typography.d.ts +47 -6
  125. package/dist/theme/typography.js +74 -36
  126. package/dist/utils/hooks/useStorage.d.ts +14 -0
  127. package/dist/utils/hooks/useStorage.js +31 -0
  128. package/dist/utils/hooks/useUniqueHtmlId.d.ts +1 -0
  129. package/dist/utils/hooks/useUniqueHtmlId.js +7 -0
  130. package/dist/utils/misc.d.ts +7 -0
  131. package/dist/utils/misc.js +13 -1
  132. package/dist/utils/test.js +3 -1
  133. package/global.css +4 -9
  134. package/package.json +21 -13
package/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # Hesburgh Component Library
2
+
3
+ This is the repo for The Hesburgh Component Library, a set of React components that escapsulate the
4
+ design patterns used by the Hesburgh Library IT department.
5
+
6
+ ## Using the library
7
+ ### Installation
8
+ To install the library in your project, run
9
+ ```
10
+ yarn install @ndlib/component-library
11
+ ```
12
+
13
+ ### Setup
14
+
15
+ #### UiProvider
16
+ In order for styles to be applied correctly, the `UiProvider` component must be included at the top of your project.
17
+
18
+ ```tsx
19
+ <UiProvider>
20
+ <App>
21
+ </UiProvider>
22
+ ```
23
+
24
+ For frameworks that split application code by pages, it is recommended to add this provider at the root level rather than
25
+ at the page level. In Gatsby, this can be done using the [wrapRootElement](https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#wrapRootElement) browser API.
26
+
27
+ ```tsx
28
+ exports.wrapRootElement = ({ element }) => {
29
+ return (
30
+ <UiProvider>
31
+ {element}
32
+ </UiProvider>
33
+ )
34
+ }
35
+ ```
36
+
37
+ #### Configuring Link
38
+ By default, the `Link` component in this library will use a native HTML `<a>` component in its implementation. This behavior can be overriden
39
+ by setting the `link.internalLink` and/or `link.externalLink` property on the `components` prop of the `UiProvider` component. If a custom component
40
+ is provided, the custom component will be rendered by when the <Link /> component is used. It will receive the same props the <Link> receives, as well as an
41
+ `sx` object with default link styles from the theme and any custom styles provided.
42
+
43
+ Note that the `theme-ui` jsx transform is needed in order to convert the `sx` prop into a stylesheet definition.
44
+
45
+ ```tsx
46
+ /** @jsxImportSource theme-ui */
47
+ import { Link } from 'gatsby'
48
+
49
+ const CustomInternalLink = ({ sx, ...rest}) => ()
50
+ return <Link sx={sx} {...rest} />
51
+ )
52
+
53
+ const WrappedApp = () => {
54
+ <UiProvider components={{
55
+ link: {
56
+ internalLink: CustomInternalLink
57
+ }
58
+ }}>
59
+ <App />
60
+ </UiProvider>
61
+ }
62
+ ```
63
+
64
+ ## Running locally
65
+ Dependencies must be installed before storybook can be started. Dependencies can be installed with: `yarn install`.
66
+
67
+ To build and deploy your storybook locally for development, run `yarn start`
68
+
69
+ ## Deploying Storybook
70
+ Whenever a commit is added to the main branch, the contents of the `/docs` folder will be deployed to our Github pages site.
71
+
72
+ To build a new version of the storybook to be deployed, run `yarn build-storybook`. Our storybook build uses [vite](https://vitejs.dev/).
73
+
74
+ ## Running tests
75
+ Tests are run using [vitest](https://vitest.dev/), a test-runner built for vite that is similar to jest. Test suite can be run with: `yarn test`
76
+
77
+ ## Linting
78
+ Changes should be linted before commits. Run our linter with `yarn lint`. Failed linting will block builds and deploys. Our lint process uses `eslint` and `prettier`.
79
+ Running `yarn lint:fix` will fix any issues that can be automatically fixed.
80
+
81
+ ## Building for npm
82
+ The build process for the npm module for this library uses `tsc`. ESM exports are used to better support tree-shaking. When adding new code to this library,
83
+ be careful to ensure than importing the module do not cause side-effects. In other words, don't execute any process or do any state management outside
84
+ of exported properties or functions because this code might be removed by tree-shaker. See examples below:
85
+
86
+ ### Wrong
87
+ ```jsx
88
+ // This code may get removed by tree-shaker
89
+ setTimeout(() => {
90
+ console.log('hello world')
91
+ })
92
+ ```
93
+
94
+ ### Right
95
+ ```jsx
96
+ export const myFunction = () => {
97
+ setTimeout(() => {
98
+ console.log('hello world')
99
+ })
100
+ }
101
+ ```
@@ -0,0 +1 @@
1
+ export declare const FontLoader: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export const FontLoader = () => {
3
+ return (_jsx("link", { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=Libre+Franklin|Libre+Franklin:wght@700|Sumana" }));
4
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Card } from '.';
3
+ declare const meta: Meta<typeof Card>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Card>;
6
+ export declare const Default: Story;
7
+ export declare const Horizontal: Story;
8
+ export declare const DateCards: Story;
9
+ export declare const Clickable: Story;
@@ -0,0 +1,77 @@
1
+ import { createElement as _createElement } from "react";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import AccessTime from '@mui/icons-material/AccessTimeFilled';
4
+ import CalendarIcon from '@mui/icons-material/CalendarMonth';
5
+ import { CARD_LAYOUT, CARD_SIZE, Card } from '.';
6
+ import { COLOR, Column, LABEL_SIZE, Label, Paragraph } from '../../..';
7
+ import { Icon } from '../../elements/Icon';
8
+ const meta = {
9
+ title: 'Composites/Card',
10
+ component: Card,
11
+ tags: ['autodocs'],
12
+ };
13
+ export default meta;
14
+ const basicCards = [
15
+ {
16
+ headline: 'Exhibit — Printing the Nation: A Century of Irish Book Arts',
17
+ image: 'https://images.ctfassets.net/cfblb1f7i85j/7aCd5Sm86JdtQepGBKDUfy/dcb4d97dd3a1d3ee810e8bcaa82dc715/Spring_Exhibit_2023-Rep.jpg?w=296',
18
+ size: CARD_SIZE.SM,
19
+ },
20
+ {
21
+ headline: 'One Book, One Michiana Digital Exhibit — Papers Alight: Contextualizing Mike Curato’s Flamer',
22
+ image: 'https://images.ctfassets.net/cfblb1f7i85j/2sGpdDbNkl6MPnlem6wq1R/995c786624613b5ff07228e481996385/One.Book.2023-Rep.png?w=296',
23
+ size: CARD_SIZE.SM,
24
+ },
25
+ ];
26
+ const dateCards = [
27
+ {
28
+ displayDate: new Date().toISOString(),
29
+ headline: 'Exhibit — Printing the Nation: A Century of Irish Book Arts',
30
+ size: CARD_SIZE.SM,
31
+ },
32
+ {
33
+ displayDate: new Date().toISOString(),
34
+ headline: 'One Book, One Michiana Digital Exhibit — Papers Alight: Contextualizing Mike Curato’s Flamer',
35
+ size: CARD_SIZE.SM,
36
+ },
37
+ ];
38
+ const horizontalCards = [
39
+ {
40
+ headline: 'Exhibit — Printing the Nation: A Century of Irish Book Arts',
41
+ image: 'https://images.ctfassets.net/cfblb1f7i85j/7aCd5Sm86JdtQepGBKDUfy/dcb4d97dd3a1d3ee810e8bcaa82dc715/Spring_Exhibit_2023-Rep.jpg?w=296',
42
+ size: CARD_SIZE.SM,
43
+ body: (_jsxs(_Fragment, { children: [_jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
44
+ display: 'flex',
45
+ } }, { children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
46
+ display: 'flex',
47
+ } }, { children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(Paragraph, { children: "This exhibit demonstrates the art and craft of the Irish book since 1900." })] })),
48
+ },
49
+ {
50
+ headline: 'One Book, One Michiana Digital Exhibit — Papers Alight: Contextualizing Mike Curato’s Flamer',
51
+ image: 'https://images.ctfassets.net/cfblb1f7i85j/2sGpdDbNkl6MPnlem6wq1R/995c786624613b5ff07228e481996385/One.Book.2023-Rep.png?w=296',
52
+ size: CARD_SIZE.SM,
53
+ body: (_jsxs(_Fragment, { children: [_jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
54
+ display: 'flex',
55
+ } }, { children: [_jsx(Icon, { icon: CalendarIcon, sx: { mr: 1 } }), "Monday, February 6 \u2013 Monday, July 31, 2023"] })), _jsxs(Label, Object.assign({ color: COLOR.PRIMARY, size: LABEL_SIZE.SM, sx: {
56
+ display: 'flex',
57
+ } }, { children: [_jsx(Icon, { icon: AccessTime, sx: { mr: 1 } }), "M-F: 9:30am \u2013 4:30pm"] })), _jsx(Paragraph, { children: "This online exhibition displays rare materials from Hesburgh Libraries collections that place Mike Curato\u2019s teen graphic novel into a historical and social context." })] })),
58
+ },
59
+ ];
60
+ export const Default = {
61
+ render: () => (_jsx(Column, { children: basicCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { key: i })))) })),
62
+ args: {},
63
+ };
64
+ export const Horizontal = {
65
+ render: () => (_jsx(Column, { children: horizontalCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { key: i, layout: CARD_LAYOUT.HORIZONTAL })))) })),
66
+ args: {},
67
+ };
68
+ export const DateCards = {
69
+ render: () => (_jsx(Column, { children: dateCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { key: i, layout: CARD_LAYOUT.HORIZONTAL, sx: { height: '120px' } })))) })),
70
+ args: {},
71
+ };
72
+ export const Clickable = {
73
+ render: () => (_jsx(Column, { children: basicCards.map((props, i) => (_createElement(Card, Object.assign({}, props, { onClick: () => {
74
+ alert('Card clicked');
75
+ }, key: i })))) })),
76
+ args: {},
77
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { fireEvent } from '@testing-library/react';
3
+ import { vi } from 'vitest';
4
+ import { render } from '../../../utils/test';
5
+ import { Card } from '.';
6
+ import { KEY_CODES } from '../../../utils/misc';
7
+ const MOCK_HEADLINE = 'MOCK HEADLINE';
8
+ const MOCK_BODY = 'MOCK BODY';
9
+ describe('Card', () => {
10
+ const mockClickHandler = vi.fn();
11
+ afterEach(() => {
12
+ vi.resetAllMocks();
13
+ });
14
+ it('renders contents', () => {
15
+ const { getByText } = render(_jsx(Card, { headline: MOCK_HEADLINE, body: MOCK_BODY }));
16
+ expect(getByText(MOCK_HEADLINE)).toBeDefined();
17
+ expect(getByText(MOCK_BODY)).toBeDefined();
18
+ });
19
+ it('fires handler when clicked', () => {
20
+ const { getByRole } = render(_jsx(Card, { headline: MOCK_HEADLINE, onClick: mockClickHandler }));
21
+ const card = getByRole('button');
22
+ fireEvent.click(card);
23
+ expect(mockClickHandler).toBeCalledTimes(1);
24
+ fireEvent.keyDown(card, {
25
+ key: KEY_CODES.ENTER,
26
+ });
27
+ expect(mockClickHandler).toBeCalledTimes(2);
28
+ });
29
+ });
@@ -0,0 +1,22 @@
1
+ import { StyledElementProps } from '../../../theme';
2
+ import React from 'react';
3
+ export declare enum CARD_LAYOUT {
4
+ VERTICAL = "vertical",
5
+ HORIZONTAL = "horizontal"
6
+ }
7
+ export declare enum CARD_SIZE {
8
+ SM = "SM",
9
+ MD = "MD",
10
+ LG = "LG"
11
+ }
12
+ type CardProps = StyledElementProps<HTMLDivElement, {
13
+ headline: string;
14
+ body?: React.ReactNode;
15
+ image?: string;
16
+ layout?: CARD_LAYOUT;
17
+ size?: CARD_SIZE;
18
+ displayDate?: string;
19
+ onClick?: () => void;
20
+ }>;
21
+ export declare const Card: React.FC<CardProps>;
22
+ export {};
@@ -0,0 +1,71 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Heading } from '../../elements/text/Heading';
3
+ import { GROUP_TYPE, Group } from '../../elements/Group';
4
+ import { Box } from '../../elements/layout/Box';
5
+ import { Column, FONT, FONT_SIZE, Row, TYPOGRAPHY_TYPE } from '../../..';
6
+ import { COLOR } from '../../../theme/colors';
7
+ import React from 'react';
8
+ import { KEY_CODES } from '../../../utils/misc';
9
+ export var CARD_LAYOUT;
10
+ (function (CARD_LAYOUT) {
11
+ CARD_LAYOUT["VERTICAL"] = "vertical";
12
+ CARD_LAYOUT["HORIZONTAL"] = "horizontal";
13
+ })(CARD_LAYOUT || (CARD_LAYOUT = {}));
14
+ export var CARD_SIZE;
15
+ (function (CARD_SIZE) {
16
+ CARD_SIZE["SM"] = "SM";
17
+ CARD_SIZE["MD"] = "MD";
18
+ CARD_SIZE["LG"] = "LG";
19
+ })(CARD_SIZE || (CARD_SIZE = {}));
20
+ const MONTH_LABELS = [
21
+ 'JAN',
22
+ 'FEB',
23
+ 'MAR',
24
+ 'APR',
25
+ 'MAY',
26
+ 'JUN',
27
+ 'JUL',
28
+ 'AUG',
29
+ 'SEP',
30
+ 'OCT',
31
+ 'NOV',
32
+ 'DEC',
33
+ ];
34
+ const DateDisplay = ({ date: dateString }) => {
35
+ const date = React.useMemo(() => {
36
+ return new Date(dateString);
37
+ }, [dateString]);
38
+ return (_jsxs(Column, Object.assign({ sx: {
39
+ alignItems: 'center',
40
+ justifyContent: 'center',
41
+ p: 3,
42
+ fontFamily: FONT.BRANDED2,
43
+ backgroundColor: COLOR.ND_GOLD,
44
+ } }, { children: [_jsx(Box, Object.assign({ sx: {
45
+ fontSize: FONT_SIZE.LG,
46
+ } }, { children: date.getDate() })), _jsx(Box, Object.assign({ sx: {
47
+ fontSize: FONT_SIZE.MD,
48
+ mt: 1,
49
+ } }, { children: MONTH_LABELS[date.getMonth()] }))] })));
50
+ };
51
+ export const Card = ({ size, displayDate, headline, body, image, layout, onClick, sx, }) => {
52
+ const contentPaddingX = size === CARD_SIZE.SM ? 4 : 5;
53
+ const bodyTopMargin = size === CARD_SIZE.SM ? 2 : 3;
54
+ const isVertical = !layout || layout === CARD_LAYOUT.VERTICAL;
55
+ const contentPaddingY = isVertical ? contentPaddingX : 2;
56
+ const typography = size === CARD_SIZE.SM
57
+ ? TYPOGRAPHY_TYPE.HEADLINE_SMALL
58
+ : TYPOGRAPHY_TYPE.HEADLINE_MEDIUM;
59
+ return (_jsxs(Group, Object.assign({ type: GROUP_TYPE.GROUP, role: onClick ? 'button' : 'group', onClick: onClick, onKeyDown: (e) => {
60
+ if (onClick && e.key === KEY_CODES.ENTER) {
61
+ onClick();
62
+ }
63
+ }, tabIndex: onClick ? 0 : undefined, sx: Object.assign({ width: isVertical ? '400px' : '100%', height: isVertical ? '350px' : '220px', borderBottom: 'solid 2px', borderColor: COLOR.TRANSPARENT, cursor: onClick ? 'pointer' : undefined, display: 'flex', flexDirection: layout === CARD_LAYOUT.HORIZONTAL ? 'row' : 'column', alignItems: 'flex-start', ':hover,:focus': {
64
+ transform: 'scale(1.01)',
65
+ borderColor: COLOR.ND_SKY_BLUE_DARK,
66
+ backgroundColor: COLOR.ND_SKY_BLUE,
67
+ } }, sx) }, { children: [image && (_jsx("img", { src: image, style: {
68
+ width: isVertical ? '100%' : 'auto',
69
+ height: isVertical ? 'auto' : '100%',
70
+ } })), displayDate && _jsx(DateDisplay, { date: displayDate }), _jsx(Row, Object.assign({ sx: { px: contentPaddingX, py: contentPaddingY } }, { children: _jsxs(Column, Object.assign({ justify: "center" }, { children: [_jsx(Heading, Object.assign({ typography: typography, sx: { textAlign: 'justify' } }, { children: headline })), body && _jsx(Box, Object.assign({ sx: { mt: bodyTopMargin } }, { children: body }))] })) }))] })));
71
+ };
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Alert } from '.';
3
+ declare const meta: Meta<typeof Alert>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Alert>;
6
+ export declare const Default: Story;
7
+ export declare const InformationalAlert: Story;
8
+ export declare const YellowAlert: Story;
9
+ export declare const WarningAlert: Story;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Alert } from '.';
3
+ import { ALERT_TYPE } from '../../providers/alerts';
4
+ const meta = {
5
+ title: 'Elements/Alert',
6
+ component: Alert,
7
+ tags: ['autodocs'],
8
+ };
9
+ export default meta;
10
+ export const Default = {
11
+ render: (args) => _jsx(Alert, Object.assign({}, args)),
12
+ args: {
13
+ title: 'Informational Alert',
14
+ type: ALERT_TYPE.INFORMATIONAL,
15
+ description: 'This is an informational alert',
16
+ },
17
+ };
18
+ export const InformationalAlert = {
19
+ render: (args) => _jsx(Alert, Object.assign({}, args)),
20
+ args: {
21
+ title: 'Informational Alert',
22
+ type: ALERT_TYPE.INFORMATIONAL,
23
+ description: 'This is an informational alert',
24
+ },
25
+ };
26
+ export const YellowAlert = {
27
+ render: (args) => _jsx(Alert, Object.assign({}, args)),
28
+ args: {
29
+ title: 'Informational - Yellow Alert',
30
+ type: ALERT_TYPE.INFORMATIONAL_YELLOW,
31
+ description: 'This is an informational yellow alert',
32
+ },
33
+ };
34
+ export const WarningAlert = {
35
+ render: (args) => _jsx(Alert, Object.assign({}, args)),
36
+ args: {
37
+ title: 'Warning Alert',
38
+ type: ALERT_TYPE.WARNING,
39
+ description: 'This is a warning alert',
40
+ },
41
+ };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { Alerts } from '.';
3
+ declare const meta: Meta<typeof Alerts>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Alerts>;
6
+ export declare const Default: Story;
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Alerts } from '.';
3
+ import { AlertsProvider } from '../../providers/alerts';
4
+ const meta = {
5
+ title: 'Elements/Alerts',
6
+ component: Alerts,
7
+ tags: ['autodocs'],
8
+ };
9
+ export default meta;
10
+ export const Default = {
11
+ render: () => (_jsx(AlertsProvider, Object.assign({ startTime: new Date('2022-01-01').toISOString(), endTime: new Date('2022-01-01').toISOString(), endpoint: "http://localhost:1337/graphql" }, { children: _jsx(Alerts, {}) }))),
12
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,62 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ // import { fireEvent } from '@testing-library/react'
12
+ import { vi } from 'vitest';
13
+ import { render } from '../../../utils/test';
14
+ import { useAlerts } from '../../providers/alerts';
15
+ import { Alerts } from '.';
16
+ import { useState } from 'react';
17
+ vi.mock('../../providers/alerts', () => __awaiter(void 0, void 0, void 0, function* () {
18
+ const actual = yield vi.importActual('../../providers/alerts');
19
+ return Object.assign(Object.assign({}, actual), { useAlerts: vi.fn() });
20
+ }));
21
+ const MOCK_ALERTS = [
22
+ {
23
+ uuid: 'bcb7a31c-4d67-45fa-9ad8-314fac1eace6',
24
+ domains: ['library'],
25
+ startTime: '2020-09-06T04:00:00.000Z',
26
+ endTime: '2020-09-09T04:00:00.000Z',
27
+ title: 'Aleph API down due to DNS problem',
28
+ description: 'Test 1',
29
+ type: 'Warning',
30
+ global: true,
31
+ },
32
+ {
33
+ uuid: 'bcb7a31c-4d67-45fa-9ad8-314fac1eace6',
34
+ domains: ['library'],
35
+ startTime: '2020-09-06T04:00:00.000Z',
36
+ endTime: '2020-09-09T04:00:00.000Z',
37
+ title: 'Aleph API down due to DNS problem',
38
+ description: '__bold__ [Test 2 Link](https://onesearch.library.nd.edu/)',
39
+ type: 'Warning',
40
+ global: true,
41
+ },
42
+ ];
43
+ describe('Alerts', () => {
44
+ const mockUseAlerts = useAlerts;
45
+ beforeEach(() => {
46
+ mockUseAlerts.mockImplementation(() => {
47
+ const [alerts, setAlerts] = useState(MOCK_ALERTS);
48
+ const dismiss = (uuid) => {
49
+ setAlerts(alerts.filter((alert) => alert.uuid !== uuid));
50
+ };
51
+ return { alerts, dismiss };
52
+ });
53
+ });
54
+ afterEach(() => {
55
+ vi.resetAllMocks();
56
+ });
57
+ it('renders alert content', () => {
58
+ const { getByText, getByRole } = render(_jsx(Alerts, {}));
59
+ expect(getByText('Test 1')).toBeInTheDocument();
60
+ expect(getByRole('link')).toBeInTheDocument();
61
+ });
62
+ });
@@ -0,0 +1,15 @@
1
+ /** @jsxImportSource theme-ui */
2
+ import React from 'react';
3
+ import { ALERT_TYPE } from '../../providers/alerts';
4
+ import { StyledElementProps } from '../../../theme';
5
+ type AlertsProps = StyledElementProps<HTMLDivElement, {
6
+ pageAlerts?: string[];
7
+ }>;
8
+ export declare const Alerts: React.FC<AlertsProps>;
9
+ type AlertProps = StyledElementProps<HTMLDivElement, {
10
+ type: ALERT_TYPE;
11
+ description: string;
12
+ dismiss: () => void;
13
+ }>;
14
+ export declare const Alert: React.FC<AlertProps>;
15
+ export {};
@@ -0,0 +1,63 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
13
+ import WarningIcon from '@mui/icons-material/Warning';
14
+ import InfoIcon from '@mui/icons-material/Info';
15
+ import { COLOR } from '../../../theme/colors';
16
+ import { Markdown } from '../Markdown';
17
+ import { Row } from '../layout/Row';
18
+ import { Icon } from '../Icon';
19
+ import { FONT_SIZE } from '../../../theme/typography';
20
+ import { useAlerts, ALERT_TYPE } from '../../providers/alerts';
21
+ import { useTheme } from '../../../theme';
22
+ import { BUTTON_TYPE, Button } from '../Button';
23
+ export const Alerts = (_a) => {
24
+ var { pageAlerts } = _a, rest = __rest(_a, ["pageAlerts"]);
25
+ const { alerts, dismiss } = useAlerts(pageAlerts);
26
+ return (_jsx("div", Object.assign({}, rest, { children: alerts.map((alert, i) => {
27
+ const { type, description } = alert;
28
+ return (_jsx(Alert, { type: type, description: description, css: {
29
+ marginTop: i ? '4px' : 0,
30
+ }, dismiss: () => {
31
+ dismiss(alert.uuid);
32
+ } }, i));
33
+ }) })));
34
+ };
35
+ export const Alert = (_a) => {
36
+ var { type = ALERT_TYPE.INFORMATIONAL, description = '', dismiss } = _a, rest = __rest(_a, ["type", "description", "dismiss"]);
37
+ const theme = useTheme();
38
+ const style = {
39
+ backgroundColor: COLOR.ALERT_INFORMATIONAL_BG,
40
+ boxShadow: theme.boxShadow.NORMAL,
41
+ border: '2px solid',
42
+ borderRadius: '4px',
43
+ borderColor: COLOR.ALERT_INFORMATIONAL_BORDER,
44
+ m: 0,
45
+ p: '1rem',
46
+ };
47
+ if (type === ALERT_TYPE.INFORMATIONAL_YELLOW) {
48
+ style.backgroundColor = COLOR.ALERT_INFORMATIONAL_YELLOW_BG;
49
+ style.borderColor = COLOR.ALERT_INFORMATIONAL_YELLOW_BORDER;
50
+ }
51
+ else if (type === ALERT_TYPE.WARNING) {
52
+ style.backgroundColor = COLOR.ALERT_WARNING_BG;
53
+ style.borderColor = COLOR.ALERT_WARNING_BORDER;
54
+ }
55
+ const icon = {
56
+ [ALERT_TYPE.WARNING]: WarningIcon,
57
+ [ALERT_TYPE.INFORMATIONAL_YELLOW]: InfoIcon,
58
+ [ALERT_TYPE.INFORMATIONAL]: InfoIcon,
59
+ }[type];
60
+ return (_jsxs(Row, Object.assign({ sx: Object.assign({}, style) }, rest, { children: [icon && _jsx(Icon, { icon: icon, sx: { mr: 4 }, size: FONT_SIZE.LG }), _jsx(Markdown, { content: description, sx: { mt: 1, flexGrow: 1 } }), _jsx(Button, Object.assign({ type: BUTTON_TYPE.TEXT, onClick: dismiss, sx: { ml: 4 } }, { children: "Dismiss" }))] })));
61
+ };
62
+ const myHeaders = new Headers();
63
+ myHeaders.append('Content-Type', 'application/json');
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { BrandingBar } from '.';
3
+ declare const meta: Meta<typeof BrandingBar>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof BrandingBar>;
6
+ export declare const Default: Story;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { BrandingBar } from '.';
3
+ const meta = {
4
+ title: 'Elements/BrandingBar',
5
+ component: BrandingBar,
6
+ tags: ['autodocs'],
7
+ };
8
+ export default meta;
9
+ export const Default = {
10
+ render: () => _jsx(BrandingBar, {}),
11
+ };
@@ -0,0 +1 @@
1
+ export declare const BrandingBar: () => import("@theme-ui/core").ThemeUIJSX.Element;
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "theme-ui/jsx-runtime";
2
+ import { COLOR } from '../../../theme/colors';
3
+ const ProvostImage = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcYAAABkBAMAAADu741LAAAABGdBTUEAALGPC/xhBQAAABJQTFRFgJWu////////////AAAA////Uq//MQAAAAV0Uk5TFYlGxgATjWZIAAAFmklEQVR42u2YyZKjOBBAvYh7YZt7FaB7uQx3EPhuwPr/X+lMbUgCh909HTMTjuQEJJLy5Sqx6d//2hAjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRIjMRLjX76+PoPH5uv9GIvjFDxn03/D2OSfvzsuz9lL34mxr0v/RTf+gZa7/GWhyM1ywir4iYzbWsqzVaS4qOtH6aPvz2oI3p3MRzhCnpl774mii5/6Y/Dielv7LMUpDkar9Og94BKw2vSh7/daH1y1XAhRM1DsRxtzMpqNG3x9zgs5mDl3tQShVNYWGd7XKrqaYjbEXg55Xkv99CUlTCSrVcTmwqJ04KsfHkHR2uoADxf3AHPUE66mjbjLpPxQ2vywhRA0lmNusuEKaqFq8r7Br+DrTH5bJeQdKHREdXKAcXpMI6WNAnUn7MRqBX5fZWyH+E1Wrn6YyaqprQ5gPnionEIndISZqZUS4dppTdgnoJkRJd+oKGq2Aafc1NCJeYzCY+wvWuAYufZy5jO264zLyJTsESOGh2MEbQdr0Un5y5gUTI033W1NqCtarbUsNWMHjJmSm6GWsfcZjyGjdWjnMza39XT0I7NF7w/9Q8YWVbKMnTSe6rRFjWFRWM0Tx0I1iOuI7zWjuG8a7XtY5OYz9h5jHzK2ZnVReowPrqCmgmX7dnzMKOwKyOiAuQ5ax6x5TMjHQhdrNqlU77Aac4ujGHOPsWXh+ESGvkDGZompmksQmRjz13vflEFpf8ZoTNha4RWXb6Z1YS3HFUbrqutsp7sLTyVMypCRy3HBKBbpWFxGKPRSNx614HFKT9BLxAUzf3s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AAElFTkSuQmCC';
4
+ const UniversityLogo = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlcAAABkCAMAAACclOWcAAAABGdBTUEAALGPC/xhBQAAADNQTFRF////////////////////////////////////////////////////////////AAAA////FbWC9gAAABB0Uk5TcI+vUM8w358gYO8Qf0C/AK6MYRQAAAmFSURBVHja7ZzrlqyqDoVVFOVavv/TbgFFLlGxu/qMM/ae80+v0hJD+AghWqv7QND31cEFELiCwBUEriAIXEHgCgJXEASuIHAFgSsIAlcQuILAFQSBKwhcQeAKgsAVBK4gcAVB4AoCVxC4giBwBYErCFxBELiCwBUEriAIXEHgCgJXEASuIHAFgSsIAlcQuPq/09R1C7wArr5MlR36VQKsfyFXyhjzPLCi/Ar7BgyT3JzVr/rnDRgz/c+s/Zl71de4WuyuwX3U+4fzTuHzvH8cwsc+mcPp5cEtxyH2SZqMvhI2k0iM0Xrej2pB+VaMqxOfk2N9fjcvK/N7jGscz6OD1sRrh0afS+cVQ8Sr3WiV36G03XrbVyvKsbux9iP00b++m+r4mam/sf307KDFdPm1sW5jqRtn1cj1uSWTi1dsdt2VwezFd3825yWml+48OxIMHr8bTNkv789Lls67kO8OXLqtgZmp84rBnR6dAVtjKSMz9xdaj09f+l9tzQ7GiO1LJk15eBiuZLw3e/z4uOObtj9nd7TvDtfq+DCLNq6GMNwLlXV5E3bXBxcm/vC3dT1lxt+Qs/zyG2s/nT8s/dHVlvc2ffBXuJxf274MfG/Hytj7OsZIqo19gDNPlA5fRDTf3UCEdZCfTvGf5mKm+XYPSxZ/War88nhoTByXt6hcg8HverXVhduZZcwa2KnbsPKX89wCb1/qqGUdPTXrPkQiHanP4jw7REsaqdpau4lry3p26cqF4Ua+Z+LTbK3rtVt6lftbx8oxnA3X367BMTgYx6hkxHec86lYNieB5Ri+EkB2mP9Rg7PIcWWjcT4slxmE7/E5ylm0+FSXn0M9xQ9SlTM0NlKsF3Y/4wdKV2NndoN0ZV/exyk/PmSntTu+7P9sXARdG+zmrH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PNvKyBw1aTJv+mDcAWuvp1ZWdZJZFfg6rty9aEB/yEDuPq2FgOqwBUEriBwBUHgCgJXELiCIHAFgSsIXEEQuILAFQSuIAhcQeAKAlcQBK4gcAWBKwgCVxC4gsAVBIErCFxB4AqCwBUEriBwBYEruAACVxC4gsAVBIErCFxB/0n9A/6wliZWAPp5AAAAAElFTkSuQmCC';
5
+ const sharedLinkStyle = {
6
+ backgroundSize: 'cover',
7
+ backgroundRepeat: 'no-repeat',
8
+ display: 'block',
9
+ height: '50px',
10
+ lineHeight: '50px',
11
+ overflow: 'hidden',
12
+ textIndent: '-9999px',
13
+ };
14
+ const universityLogo = Object.assign(Object.assign({}, sharedLinkStyle), { backgroundImage: `url(${UniversityLogo})`, margin: '0 auto', position: 'relative', width: '300px', '@media screen and (min-width: 800px)': {
15
+ left: '12px',
16
+ margin: '0',
17
+ position: 'absolute',
18
+ }, '@media screen and (min-width: 1212px)': {
19
+ left: '0',
20
+ } });
21
+ const provostLogo = Object.assign(Object.assign({}, sharedLinkStyle), { backgroundImage: `url(${ProvostImage})`, display: 'none', '@media screen and (min-width: 800px)': {
22
+ display: 'block',
23
+ position: 'absolute',
24
+ right: '12px',
25
+ width: '227px',
26
+ }, '@media screen and (min-width: 1212px)': {
27
+ right: '0',
28
+ } });
29
+ export const BrandingBar = () => {
30
+ return (_jsx("hgroup", Object.assign({ sx: {
31
+ backgroundColor: COLOR.ND_PROVOST_BLUE,
32
+ height: '50px',
33
+ display: 'block',
34
+ a: {
35
+ color: COLOR.TEXT_ON_PRIMARY,
36
+ textDecoration: 'none',
37
+ },
38
+ } }, { children: _jsx("div", Object.assign({ sx: {
39
+ display: 'block',
40
+ margin: '0 auto',
41
+ maxWidth: '1200px',
42
+ padding: '0',
43
+ position: 'relative',
44
+ } }, { children: _jsxs("nav", Object.assign({ "aria-label": "University of Notre Dame", sx: {
45
+ boxSizing: 'border-box',
46
+ display: 'block',
47
+ height: '50px',
48
+ position: 'relative',
49
+ overflow: 'hidden',
50
+ width: '100%',
51
+ } }, { children: [_jsxs("a", Object.assign({ sx: universityLogo, href: "http://nd.edu" }, { children: ["University ", _jsx("i", { children: "of" }), " Notre Dame"] })), _jsxs("a", Object.assign({ sx: provostLogo, href: "http://provost.nd.edu" }, { children: ["Office ", _jsx("i", { children: "of the" }), " Provost"] }))] })) })) })));
52
+ };
@@ -5,4 +5,8 @@ export default meta;
5
5
  type Story = StoryObj<typeof Button>;
6
6
  export declare const Default: Story;
7
7
  export declare const CustomColor: Story;
8
+ export declare const OutlineButton: Story;
8
9
  export declare const TextButton: Story;
10
+ export declare const IconButton: Story;
11
+ export declare const LeftIcon: Story;
12
+ export declare const RightIcon: Story;