@ndlib/component-library 1.0.41 → 1.0.43

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 (78) hide show
  1. package/dist/components/composites/NavMenu2/NavMenuV2.stories.d.ts +6 -0
  2. package/dist/components/composites/NavMenu2/NavMenuV2.stories.js +14 -0
  3. package/dist/components/composites/NavMenu2/demoV2.d.ts +1 -0
  4. package/dist/components/composites/NavMenu2/demoV2.js +189 -0
  5. package/dist/components/composites/NavMenu2/index.d.ts +5 -0
  6. package/dist/components/composites/NavMenu2/index.js +56 -0
  7. package/dist/components/composites/NavMenuV2/NavMenuV2.module.css +24 -0
  8. package/dist/components/elements/AlertsV2/AlertV2.stories.d.ts +10 -0
  9. package/dist/components/elements/AlertsV2/AlertV2.stories.js +51 -0
  10. package/dist/components/elements/AlertsV2/AlertsV2.module.css +49 -0
  11. package/dist/components/elements/AlertsV2/AlertsV2.stories.d.ts +7 -0
  12. package/dist/components/elements/AlertsV2/AlertsV2.stories.js +17 -0
  13. package/dist/components/elements/AlertsV2/index.d.ts +15 -0
  14. package/dist/components/elements/AlertsV2/index.js +50 -0
  15. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.module.css +47 -0
  16. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.d.ts +6 -0
  17. package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +14 -0
  18. package/dist/components/elements/ArrowLinkV2/index.d.ts +7 -0
  19. package/dist/components/elements/ArrowLinkV2/index.js +21 -0
  20. package/dist/components/elements/BlockQuoteV2/BlockQuoteV2.module.css +6 -0
  21. package/dist/components/elements/BlockQuoteV2/index.d.ts +4 -0
  22. package/dist/components/elements/BlockQuoteV2/index.js +21 -0
  23. package/dist/components/elements/BrandingBarV2/BrandingBarV2.module.css +68 -0
  24. package/dist/components/elements/BrandingBarV2/BrandingBarV2.stories.d.ts +6 -0
  25. package/dist/components/elements/BrandingBarV2/BrandingBarV2.stories.js +13 -0
  26. package/dist/components/elements/BrandingBarV2/index.d.ts +2 -0
  27. package/dist/components/elements/BrandingBarV2/index.js +10 -0
  28. package/dist/components/elements/CaptionV2/index.d.ts +2 -0
  29. package/dist/components/elements/CaptionV2/index.js +22 -0
  30. package/dist/components/elements/DatePickerV2/DatePickerV2.stories.d.ts +8 -0
  31. package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +53 -0
  32. package/dist/components/elements/DatePickerV2/index.d.ts +23 -0
  33. package/dist/components/elements/DatePickerV2/index.js +57 -0
  34. package/dist/components/elements/DropdownV2/DropdownV2.stories.d.ts +8 -0
  35. package/dist/components/elements/DropdownV2/DropdownV2.stories.js +26 -0
  36. package/dist/components/elements/DropdownV2/index.d.ts +26 -0
  37. package/dist/components/elements/DropdownV2/index.js +81 -0
  38. package/dist/components/elements/InlineV2/InlineV2.stories.d.ts +6 -0
  39. package/dist/components/elements/InlineV2/InlineV2.stories.js +14 -0
  40. package/dist/components/elements/InlineV2/index.d.ts +6 -0
  41. package/dist/components/elements/InlineV2/index.js +23 -0
  42. package/dist/components/elements/ListV2/ListV2.stories.d.ts +10 -0
  43. package/dist/components/elements/ListV2/ListV2.stories.js +39 -0
  44. package/dist/components/elements/ListV2/index.d.ts +27 -0
  45. package/dist/components/elements/ListV2/index.js +102 -0
  46. package/dist/components/elements/MarkdownV2/MarkdownV2.module.css +39 -0
  47. package/dist/components/elements/MarkdownV2/MarkdownV2.stories.d.ts +10 -0
  48. package/dist/components/elements/MarkdownV2/MarkdownV2.stories.js +130 -0
  49. package/dist/components/elements/MarkdownV2/index.d.ts +11 -0
  50. package/dist/components/elements/MarkdownV2/index.js +123 -0
  51. package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.d.ts +7 -0
  52. package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +33 -0
  53. package/dist/components/elements/MonthPickerV2/index.d.ts +14 -0
  54. package/dist/components/elements/MonthPickerV2/index.js +26 -0
  55. package/dist/components/elements/PillV2/PillV2.module.css +29 -0
  56. package/dist/components/elements/PillV2/PillV2.stories.d.ts +8 -0
  57. package/dist/components/elements/PillV2/PillV2.stories.js +42 -0
  58. package/dist/components/elements/PillV2/index.d.ts +21 -0
  59. package/dist/components/elements/PillV2/index.js +79 -0
  60. package/dist/components/elements/RadioGroupV2/RadioGroupV2.stories.d.ts +7 -0
  61. package/dist/components/elements/RadioGroupV2/RadioGroupV2.stories.js +28 -0
  62. package/dist/components/elements/RadioGroupV2/index.d.ts +16 -0
  63. package/dist/components/elements/RadioGroupV2/index.js +27 -0
  64. package/dist/components/elements/RadioV2/RadioV2.module.css +17 -0
  65. package/dist/components/elements/RadioV2/RadioV2.stories.d.ts +6 -0
  66. package/dist/components/elements/RadioV2/RadioV2.stories.js +19 -0
  67. package/dist/components/elements/RadioV2/index.d.ts +8 -0
  68. package/dist/components/elements/RadioV2/index.js +23 -0
  69. package/dist/components/elements/TabListV2/TabListV2.module.css +21 -0
  70. package/dist/components/elements/TabListV2/TabListV2.stories.d.ts +6 -0
  71. package/dist/components/elements/TabListV2/TabListV2.stories.js +14 -0
  72. package/dist/components/elements/TabListV2/example.d.ts +7 -0
  73. package/dist/components/elements/TabListV2/example.js +36 -0
  74. package/dist/components/elements/TabListV2/index.d.ts +10 -0
  75. package/dist/components/elements/TabListV2/index.js +31 -0
  76. package/dist/index.d.ts +13 -0
  77. package/dist/index.js +13 -0
  78. package/package.json +1 -1
@@ -0,0 +1,79 @@
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 "react/jsx-runtime";
13
+ import React from 'react';
14
+ import { COLOR, colors } from '../../../theme/colors';
15
+ import { TYPOGRAPHY_TYPE, getTypographyStyles } from '../../../theme/typography';
16
+ import { IconV2 } from '../IconV2';
17
+ import { processSx } from '../../../utils/processSx';
18
+ import * as styles from './PillV2.module.css';
19
+ import clsx from 'clsx';
20
+ const typeSafeStyles = styles;
21
+ export var PILLV2_SIZE;
22
+ (function (PILLV2_SIZE) {
23
+ PILLV2_SIZE["SM"] = "sm";
24
+ PILLV2_SIZE["LG"] = "lg";
25
+ })(PILLV2_SIZE || (PILLV2_SIZE = {}));
26
+ const typographyMap = {
27
+ [PILLV2_SIZE.SM]: TYPOGRAPHY_TYPE.PARAGRAPH_XSMALL,
28
+ [PILLV2_SIZE.LG]: TYPOGRAPHY_TYPE.PARAGRAPH_SMALL,
29
+ };
30
+ const defaultPaddingX = {
31
+ [PILLV2_SIZE.SM]: '0.5rem',
32
+ [PILLV2_SIZE.LG]: '0.75rem',
33
+ };
34
+ const defaultHeight = {
35
+ [PILLV2_SIZE.SM]: '1.75rem',
36
+ [PILLV2_SIZE.LG]: '2rem',
37
+ };
38
+ const iconMargin = {
39
+ [PILLV2_SIZE.SM]: '0.25rem',
40
+ [PILLV2_SIZE.LG]: '0.25rem',
41
+ };
42
+ export var PILLV2_TYPE;
43
+ (function (PILLV2_TYPE) {
44
+ PILLV2_TYPE["DEFAULT"] = "default";
45
+ PILLV2_TYPE["OUTLINE"] = "outline";
46
+ })(PILLV2_TYPE || (PILLV2_TYPE = {}));
47
+ export const PillV2 = React.forwardRef((_a, ref) => {
48
+ var { size: sizeParam, type: typeParam, color, icon, children, sx, onClick } = _a, rest = __rest(_a, ["size", "type", "color", "icon", "children", "sx", "onClick"]);
49
+ const clickable = onClick !== undefined;
50
+ let bg = COLOR.PRIMARY;
51
+ let textColor = COLOR.TEXT;
52
+ let borderColor = COLOR.TRANSPARENT;
53
+ const cursor = clickable ? 'pointer' : 'default';
54
+ const type = typeParam || PILLV2_TYPE.DEFAULT;
55
+ const size = sizeParam || PILLV2_SIZE.SM;
56
+ const paddingX = defaultPaddingX[size];
57
+ const height = defaultHeight[size];
58
+ if (type === PILLV2_TYPE.DEFAULT) {
59
+ bg = color || COLOR.PRIMARY;
60
+ textColor =
61
+ bg === COLOR.PRIMARY
62
+ ? COLOR.TEXT_ON_PRIMARY
63
+ : bg === COLOR.SECONDARY
64
+ ? COLOR.TEXT_ON_SECONDARY
65
+ : COLOR.TEXT;
66
+ }
67
+ if (type === PILLV2_TYPE.OUTLINE) {
68
+ bg = COLOR.BACKGROUND;
69
+ textColor = color || COLOR.PRIMARY;
70
+ borderColor = textColor;
71
+ }
72
+ const typography = typographyMap[size];
73
+ const typographyStyles = getTypographyStyles(typography);
74
+ const body = children;
75
+ const processedSx = processSx(Object.assign(Object.assign({}, typographyStyles), sx));
76
+ return (_jsxs("button", Object.assign({ ref: ref, tabIndex: onClick ? 0 : -1, onClick: onClick, className: clsx(typeSafeStyles.pillButton, {
77
+ [typeSafeStyles.clickable]: clickable,
78
+ }), style: Object.assign(Object.assign({}, processedSx), { cursor, backgroundColor: colors[bg], color: colors[textColor], paddingLeft: paddingX, paddingRight: paddingX, height: height, borderColor: colors[borderColor] }) }, rest, { children: [icon && (_jsx(IconV2, { icon: icon, size: typographyStyles.fontSize, sx: { mr: iconMargin[size] }, color: textColor })), _jsx("div", Object.assign({ className: typeSafeStyles.pillContent }, { children: body }))] })));
79
+ });
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { RadioGroupV2 } from '.';
3
+ declare const meta: Meta<typeof RadioGroupV2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof RadioGroupV2>;
6
+ export declare const Default: Story;
7
+ export declare const Disabled: Story;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RadioGroupV2 } from '.';
3
+ import { useState } from 'react';
4
+ import { RowV2 } from '../RowV2';
5
+ import { UIVersion2 } from '../../../utils/decorators/UIVersion2';
6
+ const meta = {
7
+ title: 'Elements/Fields/RadioGroupV2',
8
+ component: RadioGroupV2,
9
+ tags: ['autodocs'],
10
+ decorators: [UIVersion2],
11
+ };
12
+ export default meta;
13
+ const options = [
14
+ { value: 'orange', label: 'Orange' },
15
+ { value: 'apple', label: 'Apple' },
16
+ { value: 'strawberry', label: 'Strawberry' },
17
+ { value: 'pineapple', label: 'Pineapple' },
18
+ ];
19
+ const StatefulRadioGroup = (props) => {
20
+ const [checked, setChecked] = useState(new Set());
21
+ return (_jsx(RadioGroupV2, Object.assign({}, props, { checked: checked, options: props.options || options, onChange: setChecked })));
22
+ };
23
+ export const Default = {
24
+ render: () => (_jsx(RowV2, { children: _jsx(StatefulRadioGroup, {}) })),
25
+ };
26
+ export const Disabled = {
27
+ render: () => (_jsx(RowV2, { children: _jsx(StatefulRadioGroup, { options: options.map((option, i) => (Object.assign(Object.assign({}, option), { disabled: i === 1 ? true : false }))) }) })),
28
+ };
@@ -0,0 +1,16 @@
1
+ import { StyledElementPropsV2, StylesPropV2 } from '../../../theme';
2
+ import { Key } from '../option';
3
+ type Option<K extends Key = string> = {
4
+ value: K;
5
+ label: string;
6
+ disabled?: boolean;
7
+ };
8
+ export type RadioGroupV2Props<K extends Key = string> = StyledElementPropsV2<HTMLDivElement, {
9
+ onChange: (value: K) => void;
10
+ options: Option<K>[];
11
+ columnStyles?: StylesPropV2;
12
+ rowStyles?: StylesPropV2;
13
+ checked?: K;
14
+ }, string>;
15
+ export declare function RadioGroupV2<K extends Key = string>({ options, checked, onChange, columnStyles, rowStyles, ...rest }: RadioGroupV2Props<K>): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,27 @@
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 "react/jsx-runtime";
13
+ import { RowV2 } from '../RowV2';
14
+ import { LabelV2 } from '../LabelV2';
15
+ import { GroupV2, GROUPV2_TYPE } from '../GroupV2';
16
+ import { ColumnV2 } from '../ColumnV2';
17
+ import { TYPOGRAPHY_TYPE, getTypographyStyles } from '../../../theme/typography';
18
+ import { RadioV2 } from '../RadioV2';
19
+ export function RadioGroupV2(_a) {
20
+ var { options, checked, onChange, columnStyles, rowStyles } = _a, rest = __rest(_a, ["options", "checked", "onChange", "columnStyles", "rowStyles"]);
21
+ return (_jsx(ColumnV2, Object.assign({}, rest, { sx: columnStyles }, { children: options.map((option) => (_jsx(GroupV2, Object.assign({ type: GROUPV2_TYPE.RAW }, { children: ({ labelTargetId }) => (_jsxs(RowV2, Object.assign({ sx: Object.assign({ mb: 2, alignItems: 'center' }, rowStyles) }, { children: [_jsx(RadioV2, { onChange: () => {
22
+ onChange(option.value);
23
+ }, checked: checked === option.value, id: labelTargetId, sx: {
24
+ mr: 2,
25
+ flexShrink: 0,
26
+ }, disabled: option.disabled }), _jsx(LabelV2, Object.assign({ htmlFor: labelTargetId, sx: Object.assign({ cursor: option.disabled ? 'not-allowed' : 'pointer' }, getTypographyStyles(TYPOGRAPHY_TYPE.PARAGRAPH_MEDIUM)) }, { children: option.label }))] }))) }), option.value))) })));
27
+ }
@@ -0,0 +1,17 @@
1
+ .radio {
2
+ margin: 0px;
3
+ height: 1.25rem;
4
+ width: 1.25rem;
5
+ }
6
+
7
+ .radio:not(:disabled) {
8
+ cursor: pointer;
9
+ }
10
+
11
+ .radio:disabled {
12
+ cursor: not-allowed;
13
+ }
14
+
15
+ .radio:not(:disabled):hover {
16
+ box-shadow: 0 0 8px #dfdfdf;
17
+ }
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { RadioV2 } from './index';
3
+ declare const meta: Meta<typeof RadioV2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof RadioV2>;
6
+ export declare const Default: Story;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RadioV2 } from './index';
3
+ import { useState } from 'react';
4
+ import { RowV2 } from '../RowV2';
5
+ import { UIVersion2 } from '../../../utils/decorators/UIVersion2';
6
+ const meta = {
7
+ title: 'Elements/Fields/RadioV2',
8
+ component: RadioV2,
9
+ tags: ['autodocs'],
10
+ decorators: [UIVersion2],
11
+ };
12
+ export default meta;
13
+ const StatefulRadio = (props) => {
14
+ const [checked, setChecked] = useState(false);
15
+ return _jsx(RadioV2, Object.assign({}, props, { checked: checked, onChange: setChecked }));
16
+ };
17
+ export const Default = {
18
+ render: () => (_jsx(RowV2, { children: _jsx(StatefulRadio, {}) })),
19
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { StyledElementPropsV2 } from '../../../theme';
3
+ export type RadioV2Props = StyledElementPropsV2<HTMLInputElement, {
4
+ checked: boolean;
5
+ onChange: (value: boolean) => void;
6
+ disabled?: boolean;
7
+ }, string>;
8
+ export declare const RadioV2: React.FC<RadioV2Props>;
@@ -0,0 +1,23 @@
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 } from "react/jsx-runtime";
13
+ import { processSx } from '../../../utils/processSx';
14
+ import * as styles from './RadioV2.module.css';
15
+ import clsx from 'clsx';
16
+ const typeSafeStyles = styles;
17
+ export const RadioV2 = (_a) => {
18
+ var { checked, onChange, disabled, sx, className } = _a, rest = __rest(_a, ["checked", "onChange", "disabled", "sx", "className"]);
19
+ const processedSx = processSx(sx);
20
+ return (_jsx("input", Object.assign({ type: "radio", onChange: (e) => {
21
+ onChange(e.target.checked);
22
+ }, checked: checked, disabled: disabled, className: clsx(typeSafeStyles.radio, className), style: processedSx }, rest)));
23
+ };
@@ -0,0 +1,21 @@
1
+ .tabBtn {
2
+ height: 3.25rem;
3
+ box-sizing: border-box;
4
+ padding-left: 1rem;
5
+ padding-right: 1rem;
6
+ background: var(--white);
7
+ border: none;
8
+ cursor: pointer;
9
+ }
10
+
11
+ .tabLabelSelected {
12
+ transform: scale(1.1);
13
+ }
14
+
15
+ .tabLabelSelected:hover {
16
+ transform: scale(1.1);
17
+ }
18
+
19
+ .tabLabelUnselected:hover {
20
+ transform: scale(1.05);
21
+ }
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { TabListV2 } from './index';
3
+ declare const meta: Meta<typeof TabListV2>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof TabListV2>;
6
+ export declare const Default: Story;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { TabListV2 } from './index';
3
+ import { ExampleTabsV2 } from './example';
4
+ import { UIVersion2 } from '../../../utils/decorators/UIVersion2';
5
+ const meta = {
6
+ title: 'Elements/TabListV2',
7
+ component: TabListV2,
8
+ tags: ['autodocs'],
9
+ decorators: [UIVersion2],
10
+ };
11
+ export default meta;
12
+ export const Default = {
13
+ render: () => _jsx(ExampleTabsV2, {}),
14
+ };
@@ -0,0 +1,7 @@
1
+ type Item = {
2
+ id: string;
3
+ label: string;
4
+ };
5
+ export declare const items: Item[];
6
+ export declare const ExampleTabsV2: () => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,36 @@
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ import React from 'react';
3
+ import { TabListV2, TabV2 } from '.';
4
+ export const items = [
5
+ {
6
+ id: '1',
7
+ label: 'Items & Requests',
8
+ },
9
+ {
10
+ id: '2',
11
+ label: 'Courses',
12
+ },
13
+ {
14
+ id: '3',
15
+ label: 'Checkout',
16
+ },
17
+ {
18
+ id: '4',
19
+ label: 'History',
20
+ },
21
+ {
22
+ id: '5',
23
+ label: 'Preferences',
24
+ },
25
+ {
26
+ id: '6',
27
+ label: 'Reservations',
28
+ },
29
+ ];
30
+ const StateManager = ({ children }) => {
31
+ const [selected, setSelected] = React.useState('1');
32
+ return _jsx(_Fragment, { children: children({ selected, setSelected }) });
33
+ };
34
+ export const ExampleTabsV2 = () => (_jsx(StateManager, { children: ({ selected, setSelected }) => (_jsx(TabListV2, { children: items.map((item) => (_jsx(TabV2, Object.assign({ onClick: () => {
35
+ setSelected(item.id);
36
+ }, selected: selected === item.id }, { children: item.label }), item.id))) })) }));
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { StyledElementPropsV2 } from '../../../theme';
3
+ type TabListV2Props = StyledElementPropsV2<HTMLDivElement>;
4
+ export declare const TabListV2: React.FC<TabListV2Props>;
5
+ type TabV2Props = StyledElementPropsV2<HTMLButtonElement, {
6
+ selected?: boolean;
7
+ children: string;
8
+ }>;
9
+ export declare const TabV2: React.FC<TabV2Props>;
10
+ export {};
@@ -0,0 +1,31 @@
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 } from "react/jsx-runtime";
13
+ import { useUniqueId } from '../../providers/uniqueIds';
14
+ import { TYPOGRAPHY_TYPE, getTypographyStyles } from '../../../theme/typography';
15
+ import { processSx } from '../../../utils/processSx';
16
+ import * as styles from './TabListV2.module.css';
17
+ const typeSafeStyles = styles;
18
+ export const TabListV2 = (_a) => {
19
+ var { children, sx } = _a, props = __rest(_a, ["children", "sx"]);
20
+ const processedSx = processSx(sx);
21
+ return (_jsx("div", Object.assign({ role: "tablist", style: Object.assign({ flexDirection: 'row' }, processedSx) }, props, { children: children })));
22
+ };
23
+ export const TabV2 = (_a) => {
24
+ var { selected, children, sx } = _a, rest = __rest(_a, ["selected", "children", "sx"]);
25
+ const typographyStyles = getTypographyStyles(TYPOGRAPHY_TYPE.CONDENSED_TEXT_LARGE);
26
+ const processedSx = processSx(Object.assign(Object.assign({}, sx), typographyStyles));
27
+ const labelId = useUniqueId('tab-label');
28
+ return (_jsx("button", Object.assign({ role: "tab", className: typeSafeStyles.tabBtn, style: Object.assign({ color: selected ? 'var(--darkGray)' : 'var(--gray)', borderBottom: selected ? 'solid 3px' : 'solid 1px', borderColor: selected ? 'var(--ndBlueBright)' : 'var(--lightGray)' }, processedSx), "aria-labelledby": labelId, "aria-selected": selected ? 'true' : 'false' }, rest, { children: _jsx("div", Object.assign({ id: labelId, className: selected
29
+ ? typeSafeStyles.tabLabelSelected
30
+ : typeSafeStyles.tabLabelUnselected }, { children: children })) })));
31
+ };
package/dist/index.d.ts CHANGED
@@ -5,8 +5,11 @@ export { COLOR, colors } from './theme/colors';
5
5
  export { TYPOGRAPHY_TYPE, FONT, FONT_SIZE, FONT_WEIGHT, LINE_HEIGHT, } from './theme/typography';
6
6
  export { GlobalStyles } from './theme/GlobalStyles';
7
7
  export { Alert, Alerts } from './components/elements/Alerts';
8
+ export { AlertV2, AlertsV2 } from './components/elements/AlertsV2';
8
9
  export { ArrowLink } from './components/elements/ArrowLink';
10
+ export { ArrowLinkV2 } from './components/elements/ArrowLinkV2';
9
11
  export { BrandingBar } from './components/elements/BrandingBar';
12
+ export { BrandingBarV2 } from './components/elements/BrandingBarV2';
10
13
  export { Button, BUTTON_SIZE, BUTTON_TYPE, LinkButton, } from './components/elements/Button';
11
14
  export { ButtonV2, BUTTONV2_SIZE, BUTTONV2_TYPE, LinkButtonV2, } from './components/elements/ButtonV2';
12
15
  export { Heading, HEADING_SIZE } from './components/elements/Heading';
@@ -18,6 +21,7 @@ export { ParagraphV2, PARAGRAPHV2_SIZE, } from './components/elements/ParagraphV
18
21
  export { Group, useGroup, GROUP_TYPE } from './components/elements/Group';
19
22
  export { GroupV2, useGroupV2, GROUPV2_TYPE, } from './components/elements/GroupV2';
20
23
  export { Markdown } from './components/elements/Markdown';
24
+ export { MarkdownV2 } from './components/elements/MarkdownV2';
21
25
  export { Box } from './components/elements/layout/Box';
22
26
  export { BoxV2 } from './components/elements/BoxV2';
23
27
  export { Column } from './components/elements/layout/Column';
@@ -30,31 +34,40 @@ export { INPUTV2_SIZE, TextInputV2 } from './components/elements/TextInputV2';
30
34
  export { Select } from './components/elements/Select';
31
35
  export { SelectV2 } from './components/elements/SelectV2';
32
36
  export { DatePicker } from './components/elements/DatePicker';
37
+ export { DatePickerV2 } from './components/elements/DatePickerV2';
33
38
  export { MonthPicker } from './components/elements/MonthPicker';
39
+ export { MonthPickerV2 } from './components/elements/MonthPickerV2';
34
40
  export { Checkbox } from './components/elements/Checkbox';
35
41
  export { CheckboxV2 } from './components/elements/CheckboxV2';
36
42
  export { CheckboxGroup } from './components/elements/CheckboxGroup';
37
43
  export { CheckboxGroupV2 } from './components/elements/CheckboxGroupV2';
38
44
  export { ConsentBanner } from './components/elements/ConsentBanner';
39
45
  export { Radio } from './components/elements/Radio';
46
+ export { RadioV2 } from './components/elements/RadioV2';
40
47
  export { RadioGroup } from './components/elements/RadioGroup';
48
+ export { RadioGroupV2 } from './components/elements/RadioGroupV2';
41
49
  export { List, ListItem, LIST_SIZE } from './components/elements/List';
50
+ export { ListV2, ListItemV2, LISTV2_SIZE } from './components/elements/ListV2';
42
51
  export { ReadMore } from './components/elements/ReadMore';
43
52
  export { ReadMoreV2 } from './components/elements/ReadMoreV2';
44
53
  export { Icon } from './components/elements/Icon';
45
54
  export { IconV2 } from './components/elements/IconV2';
46
55
  export { Dropdown } from './components/elements/Dropdown';
56
+ export { DropdownV2 } from './components/elements/DropdownV2';
47
57
  export { Spinner, SPINNER_SIZE } from './components/elements/Spinner';
48
58
  export { SpinnerV2, SPINNERV2_SIZE } from './components/elements/SpinnerV2';
49
59
  export { Pill, PILL_SIZE, PILL_TYPE } from './components/elements/Pill';
60
+ export { PillV2, PILLV2_SIZE, PILLV2_TYPE } from './components/elements/PillV2';
50
61
  export { Table, TableColumn } from './components/elements/Table';
51
62
  export { TabList, Tab } from './components/elements/TabList';
63
+ export { TabListV2, TabV2 } from './components/elements/TabListV2';
52
64
  export { RawHtml } from './components/elements/RawHtml';
53
65
  export { ListBoxV2 } from './components/elements/ListBoxV2';
54
66
  export { Card, CARD_SIZE, CARD_LAYOUT } from './components/composites/Card';
55
67
  export { CardV2, CARDV2_SIZE, CARDV2_LAYOUT, } from './components/composites/CardV2';
56
68
  export { SnackBar } from './components/composites/SnackBar';
57
69
  export { NavMenu } from './components/composites/NavMenu';
70
+ export { NavMenuV2 } from './components/composites/NavMenu2';
58
71
  export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
59
72
  export { DropdownLinks } from './components/composites/DropdownLinks';
60
73
  export { Modal } from './components/composites/Modal';
package/dist/index.js CHANGED
@@ -4,8 +4,11 @@ export { COLOR, colors } from './theme/colors';
4
4
  export { TYPOGRAPHY_TYPE, FONT, FONT_SIZE, FONT_WEIGHT, LINE_HEIGHT, } from './theme/typography';
5
5
  export { GlobalStyles } from './theme/GlobalStyles';
6
6
  export { Alert, Alerts } from './components/elements/Alerts';
7
+ export { AlertV2, AlertsV2 } from './components/elements/AlertsV2';
7
8
  export { ArrowLink } from './components/elements/ArrowLink';
9
+ export { ArrowLinkV2 } from './components/elements/ArrowLinkV2';
8
10
  export { BrandingBar } from './components/elements/BrandingBar';
11
+ export { BrandingBarV2 } from './components/elements/BrandingBarV2';
9
12
  export { Button, BUTTON_SIZE, BUTTON_TYPE, LinkButton, } from './components/elements/Button';
10
13
  export { ButtonV2, BUTTONV2_SIZE, BUTTONV2_TYPE, LinkButtonV2, } from './components/elements/ButtonV2';
11
14
  export { Heading, HEADING_SIZE } from './components/elements/Heading';
@@ -17,6 +20,7 @@ export { ParagraphV2, PARAGRAPHV2_SIZE, } from './components/elements/ParagraphV
17
20
  export { Group, useGroup, GROUP_TYPE } from './components/elements/Group';
18
21
  export { GroupV2, useGroupV2, GROUPV2_TYPE, } from './components/elements/GroupV2';
19
22
  export { Markdown } from './components/elements/Markdown';
23
+ export { MarkdownV2 } from './components/elements/MarkdownV2';
20
24
  export { Box } from './components/elements/layout/Box';
21
25
  export { BoxV2 } from './components/elements/BoxV2';
22
26
  export { Column } from './components/elements/layout/Column';
@@ -29,31 +33,40 @@ export { INPUTV2_SIZE, TextInputV2 } from './components/elements/TextInputV2';
29
33
  export { Select } from './components/elements/Select';
30
34
  export { SelectV2 } from './components/elements/SelectV2';
31
35
  export { DatePicker } from './components/elements/DatePicker';
36
+ export { DatePickerV2 } from './components/elements/DatePickerV2';
32
37
  export { MonthPicker } from './components/elements/MonthPicker';
38
+ export { MonthPickerV2 } from './components/elements/MonthPickerV2';
33
39
  export { Checkbox } from './components/elements/Checkbox';
34
40
  export { CheckboxV2 } from './components/elements/CheckboxV2';
35
41
  export { CheckboxGroup } from './components/elements/CheckboxGroup';
36
42
  export { CheckboxGroupV2 } from './components/elements/CheckboxGroupV2';
37
43
  export { ConsentBanner } from './components/elements/ConsentBanner';
38
44
  export { Radio } from './components/elements/Radio';
45
+ export { RadioV2 } from './components/elements/RadioV2';
39
46
  export { RadioGroup } from './components/elements/RadioGroup';
47
+ export { RadioGroupV2 } from './components/elements/RadioGroupV2';
40
48
  export { List, ListItem, LIST_SIZE } from './components/elements/List';
49
+ export { ListV2, ListItemV2, LISTV2_SIZE } from './components/elements/ListV2';
41
50
  export { ReadMore } from './components/elements/ReadMore';
42
51
  export { ReadMoreV2 } from './components/elements/ReadMoreV2';
43
52
  export { Icon } from './components/elements/Icon';
44
53
  export { IconV2 } from './components/elements/IconV2';
45
54
  export { Dropdown } from './components/elements/Dropdown';
55
+ export { DropdownV2 } from './components/elements/DropdownV2';
46
56
  export { Spinner, SPINNER_SIZE } from './components/elements/Spinner';
47
57
  export { SpinnerV2, SPINNERV2_SIZE } from './components/elements/SpinnerV2';
48
58
  export { Pill, PILL_SIZE, PILL_TYPE } from './components/elements/Pill';
59
+ export { PillV2, PILLV2_SIZE, PILLV2_TYPE } from './components/elements/PillV2';
49
60
  export { Table, TableColumn } from './components/elements/Table';
50
61
  export { TabList, Tab } from './components/elements/TabList';
62
+ export { TabListV2, TabV2 } from './components/elements/TabListV2';
51
63
  export { RawHtml } from './components/elements/RawHtml';
52
64
  export { ListBoxV2 } from './components/elements/ListBoxV2';
53
65
  export { Card, CARD_SIZE, CARD_LAYOUT } from './components/composites/Card';
54
66
  export { CardV2, CARDV2_SIZE, CARDV2_LAYOUT, } from './components/composites/CardV2';
55
67
  export { SnackBar } from './components/composites/SnackBar';
56
68
  export { NavMenu } from './components/composites/NavMenu';
69
+ export { NavMenuV2 } from './components/composites/NavMenu2';
57
70
  export { EmptyState, EMPTY_STATE_SIZE, } from './components/composites/EmptyState';
58
71
  export { DropdownLinks } from './components/composites/DropdownLinks';
59
72
  export { Modal } from './components/composites/Modal';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndlib/component-library",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [