@ndlib/component-library 1.0.45 → 1.0.46
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/composites/Card/Card.stories.js +7 -7
- package/dist/components/composites/Card/Card.test.js +1 -1
- package/dist/components/composites/Card/index.js +10 -10
- package/dist/components/composites/CardV2/CardV2.stories.js +14 -14
- package/dist/components/composites/CardV2/CardV2.test.js +1 -1
- package/dist/components/composites/CardV2/index.js +11 -11
- package/dist/components/composites/DragDropList/DragDrop.test.js +1 -1
- package/dist/components/composites/DragDropList/DragDropList.stories.d.ts +2 -3
- package/dist/components/composites/DragDropList/DragDropList.stories.js +2 -2
- package/dist/components/composites/DragDropList/index.d.ts +1 -2
- package/dist/components/composites/DragDropList/index.js +5 -5
- package/dist/components/composites/DropdownLinks/DropdownLinks.stories.js +3 -3
- package/dist/components/composites/DropdownLinks/DropdownLinks.test.js +1 -1
- package/dist/components/composites/DropdownLinks/index.js +2 -2
- package/dist/components/composites/DropdownLinksV2/DropdownLinksV2.stories.js +3 -3
- package/dist/components/composites/DropdownLinksV2/index.js +2 -2
- package/dist/components/composites/EmptyState/EmptyState.stories.js +1 -1
- package/dist/components/composites/EmptyState/index.js +2 -2
- package/dist/components/composites/Modal/Modal.stories.js +2 -2
- package/dist/components/composites/Modal/Modal.test.js +4 -4
- package/dist/components/composites/Modal/index.js +5 -5
- package/dist/components/composites/ModalV2/ModalV2.stories.js +2 -2
- package/dist/components/composites/ModalV2/ModalV2.test.js +4 -4
- package/dist/components/composites/ModalV2/index.js +5 -5
- package/dist/components/composites/NavMenu/demo.js +1 -1
- package/dist/components/composites/NavMenu/index.js +6 -6
- package/dist/components/composites/NavMenuV2/demoV2.js +2 -2
- package/dist/components/composites/NavMenuV2/index.js +3 -3
- package/dist/components/composites/Seo/SeoDataDisplay/index.js +1 -1
- package/dist/components/composites/Seo/index.js +1 -1
- package/dist/components/composites/SnackBar/examples.js +7 -7
- package/dist/components/composites/SnackBar/index.js +4 -4
- package/dist/components/composites/StructuredData/index.d.ts +0 -1
- package/dist/components/composites/StructuredData/index.js +1 -1
- package/dist/components/elements/Alerts/Alerts.stories.js +2 -2
- package/dist/components/elements/Alerts/index.js +2 -2
- package/dist/components/elements/AlertsV2/AlertsV2.stories.js +2 -2
- package/dist/components/elements/AlertsV2/index.js +1 -1
- package/dist/components/elements/ArrowLink/ArrowLink.stories.js +1 -1
- package/dist/components/elements/ArrowLink/ArrowLink.test.js +5 -5
- package/dist/components/elements/ArrowLink/index.d.ts +0 -1
- package/dist/components/elements/ArrowLink/index.js +3 -3
- package/dist/components/elements/ArrowLinkV2/ArrowLinkV2.stories.js +1 -1
- package/dist/components/elements/ArrowLinkV2/index.d.ts +0 -1
- package/dist/components/elements/ArrowLinkV2/index.js +1 -1
- package/dist/components/elements/AutoComplete/AutoComplete.stories.js +1 -1
- package/dist/components/elements/BoxV2/BoxV2.stories.js +1 -1
- package/dist/components/elements/BoxV2/index.d.ts +2 -2
- package/dist/components/elements/BrandingBar/index.d.ts +0 -1
- package/dist/components/elements/BrandingBar/index.js +4 -4
- package/dist/components/elements/BrandingBarV2/index.js +1 -1
- package/dist/components/elements/Button/Button.stories.js +9 -9
- package/dist/components/elements/Button/Button.test.js +1 -1
- package/dist/components/elements/Button/index.d.ts +14 -14
- package/dist/components/elements/Button/index.js +4 -4
- package/dist/components/elements/ButtonV2/ButtonV2.stories.js +9 -9
- package/dist/components/elements/ButtonV2/ButtonV2.test.js +1 -1
- package/dist/components/elements/ButtonV2/index.d.ts +15 -15
- package/dist/components/elements/ButtonV2/index.js +2 -2
- package/dist/components/elements/CheckboxGroup/index.js +2 -2
- package/dist/components/elements/CheckboxGroupV2/index.js +2 -2
- package/dist/components/elements/ColumnV2/index.d.ts +2 -2
- package/dist/components/elements/ColumnV2/index.js +1 -1
- package/dist/components/elements/ConsentBanner/ConsentBanner.stories.js +1 -1
- package/dist/components/elements/ConsentBanner/index.js +4 -4
- package/dist/components/elements/DatePicker/DatePicker.stories.js +3 -3
- package/dist/components/elements/DatePicker/index.d.ts +3 -3
- package/dist/components/elements/DatePickerV2/DatePickerV2.stories.js +3 -3
- package/dist/components/elements/DatePickerV2/index.d.ts +3 -3
- package/dist/components/elements/Dropdown/Dropdown.stories.js +3 -3
- package/dist/components/elements/Dropdown/index.js +2 -2
- package/dist/components/elements/DropdownV2/DropdownV2.stories.js +3 -3
- package/dist/components/elements/DropdownV2/index.js +2 -2
- package/dist/components/elements/Group/index.js +1 -1
- package/dist/components/elements/GroupV2/index.js +1 -1
- package/dist/components/elements/Heading/Heading.stories.js +3 -3
- package/dist/components/elements/Heading/Heading.test.js +2 -2
- package/dist/components/elements/HeadingV2/HeadingV2.stories.js +3 -3
- package/dist/components/elements/HeadingV2/HeadingV2.test.js +2 -2
- package/dist/components/elements/Icon/Icon.stories.js +1 -1
- package/dist/components/elements/IconV2/IconV2.stories.js +1 -1
- package/dist/components/elements/Label/Label.stories.js +1 -1
- package/dist/components/elements/Label/Label.test.js +5 -5
- package/dist/components/elements/LabelV2/LabelV2.stories.js +1 -1
- package/dist/components/elements/LabelV2/LabelV2.test.js +5 -5
- package/dist/components/elements/Link/Link.stories.js +1 -1
- package/dist/components/elements/Link/Link.test.js +7 -7
- package/dist/components/elements/List/List.stories.js +5 -5
- package/dist/components/elements/List/List.test.js +2 -2
- package/dist/components/elements/List/index.js +5 -5
- package/dist/components/elements/ListBox/index.d.ts +2 -17
- package/dist/components/elements/ListBox/index.js +3 -3
- package/dist/components/elements/ListBoxV2/index.d.ts +2 -18
- package/dist/components/elements/ListBoxV2/index.js +2 -2
- package/dist/components/elements/ListV2/ListV2.stories.js +5 -5
- package/dist/components/elements/ListV2/index.js +5 -5
- package/dist/components/elements/Markdown/index.d.ts +0 -1
- package/dist/components/elements/Markdown/index.js +2 -2
- package/dist/components/elements/MarkdownV2/index.d.ts +0 -1
- package/dist/components/elements/MarkdownV2/index.js +2 -2
- package/dist/components/elements/MonthPicker/MonthPicker.stories.js +2 -2
- package/dist/components/elements/MonthPickerV2/MonthPickerV2.stories.js +2 -2
- package/dist/components/elements/Paragraph/Paragraph.stories.js +2 -2
- package/dist/components/elements/ParagraphV2/ParagraphV2.stories.js +2 -2
- package/dist/components/elements/Pill/Pill.stories.js +3 -3
- package/dist/components/elements/Pill/index.d.ts +6 -6
- package/dist/components/elements/Pill/index.js +2 -2
- package/dist/components/elements/PillV2/PillV2.stories.js +3 -3
- package/dist/components/elements/PillV2/index.d.ts +6 -6
- package/dist/components/elements/PillV2/index.js +1 -1
- package/dist/components/elements/RadioGroup/index.js +2 -2
- package/dist/components/elements/RadioGroupV2/index.js +2 -2
- package/dist/components/elements/RawHtml/index.d.ts +0 -1
- package/dist/components/elements/ReadMore/ReadMore.stories.js +4 -4
- package/dist/components/elements/ReadMore/index.js +3 -3
- package/dist/components/elements/ReadMoreV2/ReadMoreV2.stories.js +4 -4
- package/dist/components/elements/ReadMoreV2/index.js +3 -3
- package/dist/components/elements/RowV2/index.d.ts +4 -4
- package/dist/components/elements/RowV2/index.js +1 -1
- package/dist/components/elements/Select/Select.stories.js +3 -3
- package/dist/components/elements/Select/index.js +7 -7
- package/dist/components/elements/SelectV2/SelectV2.stories.js +3 -3
- package/dist/components/elements/SelectV2/index.js +4 -4
- package/dist/components/elements/Spinner/Spinner.stories.js +1 -1
- package/dist/components/elements/Spinner/index.d.ts +0 -1
- package/dist/components/elements/SpinnerV2/SpinnerV2.stories.js +1 -1
- package/dist/components/elements/SpinnerV2/index.d.ts +0 -1
- package/dist/components/elements/TabList/example.js +2 -2
- package/dist/components/elements/TabList/index.js +2 -2
- package/dist/components/elements/TabListV2/example.js +2 -2
- package/dist/components/elements/TabListV2/index.js +2 -2
- package/dist/components/elements/Table/Table.stories.js +18 -18
- package/dist/components/elements/Table/Table.test.js +1 -1
- package/dist/components/elements/Table/index.d.ts +0 -1
- package/dist/components/elements/Table/index.js +8 -8
- package/dist/components/elements/TextInput/TextInput.stories.js +4 -4
- package/dist/components/elements/TextInput/TextInput.test.js +2 -2
- package/dist/components/elements/TextInput/index.d.ts +10 -10
- package/dist/components/elements/TextInput/index.js +7 -7
- package/dist/components/elements/TextInputV2/TextInputV2.stories.js +4 -4
- package/dist/components/elements/TextInputV2/TextInputV2.test.js +1 -1
- package/dist/components/elements/TextInputV2/index.d.ts +11 -11
- package/dist/components/elements/TextInputV2/index.js +4 -4
- package/dist/components/elements/layout/Box.d.ts +2 -2
- package/dist/components/elements/layout/Box.stories.js +1 -1
- package/dist/components/elements/layout/Column.d.ts +2 -2
- package/dist/components/elements/layout/Column.js +1 -1
- package/dist/components/elements/layout/Flex.stories.js +4 -4
- package/dist/components/elements/layout/Flex.test.js +2 -2
- package/dist/components/elements/layout/Row.d.ts +3 -3
- package/dist/components/elements/layout/Row.js +1 -1
- package/dist/components/elements/option.d.ts +0 -1
- package/dist/components/providers/alerts.js +1 -1
- package/dist/components/providers/componentConfig.js +1 -1
- package/dist/components/providers/componentConfigV2.js +1 -1
- package/dist/components/providers/dialogs.js +2 -2
- package/dist/components/providers/env.js +2 -2
- package/dist/components/providers/media.js +2 -2
- package/dist/components/providers/mediaV2.js +2 -2
- package/dist/components/providers/menu.js +1 -1
- package/dist/components/providers/snackBar.d.ts +0 -1
- package/dist/components/providers/snackBar.js +2 -2
- package/dist/components/providers/ui.js +1 -1
- package/dist/components/providers/uiV2.js +1 -1
- package/dist/components/providers/uniqueIds.js +1 -1
- package/dist/theme/Color.stories.js +1 -1
- package/dist/theme/Typography.stories.js +1 -1
- package/dist/theme/colors.d.ts +2 -2
- package/dist/theme/colors.js +4 -2
- package/dist/theme/css-variables.css +2 -2
- package/dist/theme/index.d.ts +7 -90
- package/dist/theme/index.js +2 -2
- package/dist/theme/typography.d.ts +1 -1
- package/dist/utils/test.js +2 -2
- package/package.json +5 -5
|
@@ -11,7 +11,7 @@ vi.mock('../../../providers/uniqueIds', () => ({
|
|
|
11
11
|
describe('TextInput Component', () => {
|
|
12
12
|
const setup = (props = {}) => {
|
|
13
13
|
const initialProps = Object.assign({ value: '', onChange: vi.fn(), onChangeRaw: vi.fn(), size: INPUT_SIZE.MD }, props);
|
|
14
|
-
return render(_jsx(ThemeProvider,
|
|
14
|
+
return render(_jsx(ThemeProvider, { theme: theme, children: _jsx(TextInput, Object.assign({}, initialProps)) }));
|
|
15
15
|
};
|
|
16
16
|
it('renders with the correct initial value', () => {
|
|
17
17
|
setup({ value: 'Initial value' });
|
|
@@ -34,7 +34,7 @@ describe('TextInput Component', () => {
|
|
|
34
34
|
expect(value).toBe('New value');
|
|
35
35
|
});
|
|
36
36
|
it('renders the left icon if provided', () => {
|
|
37
|
-
const MockIcon = () => _jsx("span",
|
|
37
|
+
const MockIcon = () => _jsx("span", { "data-testid": "mock-icon", children: "Icon" });
|
|
38
38
|
setup({ leftIcon: MockIcon });
|
|
39
39
|
expect(screen.getByTestId('mock-icon')).toBeInTheDocument();
|
|
40
40
|
});
|
|
@@ -28,18 +28,18 @@ export type TextInputProps = StyledElementProps<HTMLInputElement, {
|
|
|
28
28
|
onChangeRaw?: (e: string | React.ChangeEvent) => void;
|
|
29
29
|
}, string>;
|
|
30
30
|
export declare const TextInput: React.ForwardRefExoticComponent<{
|
|
31
|
-
sx?: import("../../../theme").StylesProp
|
|
31
|
+
sx?: import("../../../theme").StylesProp;
|
|
32
32
|
children?: string | undefined;
|
|
33
33
|
} & Omit<React.HTMLAttributes<HTMLInputElement>, "children" | "onChange"> & {
|
|
34
|
-
size?: INPUT_SIZE
|
|
35
|
-
leftIcon?: React.FC<any
|
|
36
|
-
inline?: boolean
|
|
37
|
-
inverted?: boolean
|
|
38
|
-
label?: string
|
|
39
|
-
disabled?: boolean
|
|
34
|
+
size?: INPUT_SIZE;
|
|
35
|
+
leftIcon?: React.FC<any>;
|
|
36
|
+
inline?: boolean;
|
|
37
|
+
inverted?: boolean;
|
|
38
|
+
label?: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
40
|
value: string;
|
|
41
|
-
onChange?: (
|
|
42
|
-
onChangeRaw?: (
|
|
41
|
+
onChange?: (value: string) => void;
|
|
42
|
+
onChangeRaw?: (e: string | React.ChangeEvent) => void;
|
|
43
43
|
} & {
|
|
44
|
-
htmlFor?: string
|
|
44
|
+
htmlFor?: string;
|
|
45
45
|
} & React.RefAttributes<any>>;
|
|
@@ -65,8 +65,8 @@ export const TextInput = React.forwardRef((_a, ref) => {
|
|
|
65
65
|
: {
|
|
66
66
|
boxShadow: inverted ? BOX_SHADOW.INVERTED : BOX_SHADOW.NORMAL,
|
|
67
67
|
};
|
|
68
|
-
return (_jsxs("div",
|
|
69
|
-
display, px: paddingX, backgroundColor: inverted ? COLOR.DARK_GRAY : COLOR.WHITE, borderRadius: '4px', flexDirection: 'row', position: 'relative', alignItems: 'center', ':hover': focusStyles, ':focus': focusStyles }, typographyStyles), sx)
|
|
68
|
+
return (_jsxs("div", { ref: ref, onClick: onClick, id: id, sx: Object.assign(Object.assign({ height,
|
|
69
|
+
display, px: paddingX, backgroundColor: inverted ? COLOR.DARK_GRAY : COLOR.WHITE, borderRadius: '4px', flexDirection: 'row', position: 'relative', alignItems: 'center', ':hover': focusStyles, ':focus': focusStyles }, typographyStyles), sx), children: [_jsx("fieldset", { sx: {
|
|
70
70
|
textAlign: 'left',
|
|
71
71
|
position: 'absolute',
|
|
72
72
|
inset: '-4px 0px 0px 0px',
|
|
@@ -80,7 +80,7 @@ export const TextInput = React.forwardRef((_a, ref) => {
|
|
|
80
80
|
minWidth: '0%',
|
|
81
81
|
borderColor: inverted ? COLOR.GRAY : COLOR.LIGHT_GRAY,
|
|
82
82
|
zIndex: Z_INDEX.ELEVATED,
|
|
83
|
-
}
|
|
83
|
+
}, children: _jsx("legend", { style: {
|
|
84
84
|
width: 'auto',
|
|
85
85
|
float: 'unset',
|
|
86
86
|
overflow: 'hidden',
|
|
@@ -91,13 +91,13 @@ export const TextInput = React.forwardRef((_a, ref) => {
|
|
|
91
91
|
fontSize: '0.75em',
|
|
92
92
|
visibility: 'hidden',
|
|
93
93
|
whiteSpace: 'nowrap',
|
|
94
|
-
}
|
|
94
|
+
}, children: label && (_jsx(Label, { standalone: true, "aria-hidden": "true", sx: {
|
|
95
95
|
px: 1,
|
|
96
96
|
position: 'relative',
|
|
97
97
|
display: 'inline-flex',
|
|
98
98
|
opacity: '0',
|
|
99
99
|
visibility: 'hidden',
|
|
100
|
-
}, typography: labelTypographyMap[size]
|
|
100
|
+
}, typography: labelTypographyMap[size], children: label })) }) }), leftIcon && (_jsx(Icon, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
|
|
101
101
|
mr: 2,
|
|
102
102
|
fontSize: getIconSize(typographyStyles.fontSize),
|
|
103
103
|
} })), _jsx("input", Object.assign({ value: value, onChange: (event) => {
|
|
@@ -107,7 +107,7 @@ export const TextInput = React.forwardRef((_a, ref) => {
|
|
|
107
107
|
color: inverted ? COLOR.LIGHT_GRAY : COLOR.GRAY,
|
|
108
108
|
}, ':focus': {
|
|
109
109
|
outline: 'none',
|
|
110
|
-
} }), disabled: disabled }, rest)), label && (_jsx(Label,
|
|
110
|
+
} }), disabled: disabled }, rest)), label && (_jsx(Label, { htmlFor: id, typography: labelTypographyMap[size], sx: {
|
|
111
111
|
position: 'absolute',
|
|
112
112
|
color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.ND_PROVOST_BLUE,
|
|
113
113
|
left: '0.5rem',
|
|
@@ -115,5 +115,5 @@ export const TextInput = React.forwardRef((_a, ref) => {
|
|
|
115
115
|
zIndex: (_b = theme.zIndex) === null || _b === void 0 ? void 0 : _b.ELEVATED,
|
|
116
116
|
px: 1,
|
|
117
117
|
top: labelOffsetMap[size],
|
|
118
|
-
}
|
|
118
|
+
}, children: label }))] }));
|
|
119
119
|
});
|
|
@@ -24,14 +24,14 @@ const StatefulInput = (props) => {
|
|
|
24
24
|
return _jsx(TextInputV2, Object.assign({ value: value, onChange: setValue }, props));
|
|
25
25
|
};
|
|
26
26
|
export const Default = {
|
|
27
|
-
render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2,
|
|
27
|
+
render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
|
|
28
28
|
};
|
|
29
29
|
export const WithLabel = {
|
|
30
|
-
render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2,
|
|
30
|
+
render: () => (_jsx(ColumnV2, { children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, children: size.label }), _jsx(StatefulInput, { size: size.size, leftIcon: SearchIcon, label: "Search", placeholder: "Placeholder", sx: { mt: 2 } })] }, i))) })),
|
|
31
31
|
};
|
|
32
32
|
export const Inverted = {
|
|
33
|
-
render: () => (_jsx(ColumnV2,
|
|
33
|
+
render: () => (_jsx(ColumnV2, { sx: { backgroundColor: COLOR.BLACK, p: 2 }, children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE }, children: size.label }), _jsx(StatefulInput, { inverted: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) })),
|
|
34
34
|
};
|
|
35
35
|
export const Disabled = {
|
|
36
|
-
render: () => (_jsx(ColumnV2,
|
|
36
|
+
render: () => (_jsx(ColumnV2, { sx: { p: 2 }, children: sizes.map((size, i) => (_jsxs(GroupV2, { children: [_jsx(HeadingV2, { size: HEADINGV2_SIZE.MD, sx: { color: COLOR.WHITE }, children: size.label }), _jsx(StatefulInput, { disabled: true, size: size.size, leftIcon: SearchIcon, placeholder: "Placeholder", label: "Search", sx: { mt: 2 } })] }, i))) })),
|
|
37
37
|
};
|
|
@@ -32,7 +32,7 @@ describe('TextInputV2 Component', () => {
|
|
|
32
32
|
expect(value).toBe('New value');
|
|
33
33
|
});
|
|
34
34
|
it('renders the left icon if provided', () => {
|
|
35
|
-
const MockIcon = () => _jsx("span",
|
|
35
|
+
const MockIcon = () => _jsx("span", { "data-testid": "mock-icon", children: "Icon" });
|
|
36
36
|
setup({ leftIcon: MockIcon });
|
|
37
37
|
expect(screen.getByTestId('mock-icon')).toBeInTheDocument();
|
|
38
38
|
});
|
|
@@ -29,19 +29,19 @@ export type TextInputV2Props = StyledElementPropsV2<HTMLInputElement, {
|
|
|
29
29
|
className?: string;
|
|
30
30
|
}, string>;
|
|
31
31
|
export declare const TextInputV2: React.ForwardRefExoticComponent<{
|
|
32
|
-
sx?: import("../../../theme").StylesPropV2
|
|
32
|
+
sx?: import("../../../theme").StylesPropV2;
|
|
33
33
|
children?: string | undefined;
|
|
34
34
|
} & Omit<React.HTMLAttributes<HTMLInputElement>, "children" | "onChange"> & {
|
|
35
|
-
size?: INPUTV2_SIZE
|
|
36
|
-
leftIcon?: React.FC<any
|
|
37
|
-
inline?: boolean
|
|
38
|
-
inverted?: boolean
|
|
39
|
-
label?: string
|
|
40
|
-
disabled?: boolean
|
|
35
|
+
size?: INPUTV2_SIZE;
|
|
36
|
+
leftIcon?: React.FC<any>;
|
|
37
|
+
inline?: boolean;
|
|
38
|
+
inverted?: boolean;
|
|
39
|
+
label?: string;
|
|
40
|
+
disabled?: boolean;
|
|
41
41
|
value: string;
|
|
42
|
-
onChange?: (
|
|
43
|
-
onChangeRaw?: (
|
|
44
|
-
className?: string
|
|
42
|
+
onChange?: (value: string) => void;
|
|
43
|
+
onChangeRaw?: (e: string | React.ChangeEvent) => void;
|
|
44
|
+
className?: string;
|
|
45
45
|
} & {
|
|
46
|
-
htmlFor?: string
|
|
46
|
+
htmlFor?: string;
|
|
47
47
|
} & React.RefAttributes<any>>;
|
|
@@ -74,19 +74,19 @@ export const TextInputV2 = React.forwardRef((_a, ref) => {
|
|
|
74
74
|
const appliedHoverStyles = isHovered ? focusStyles : {};
|
|
75
75
|
const appliedFocusStyles = isFocused ? focusStyles : {};
|
|
76
76
|
return (_jsxs("div", Object.assign({}, anchorElementProps, { ref: ref, onClick: onClick, id: id, className: clsx(`${typeSafeStyles.wrapper} ${inverted ? typeSafeStyles.inverted : ''}`, className), style: Object.assign(Object.assign(Object.assign({ height,
|
|
77
|
-
display, paddingLeft: paddingX, paddingRight: paddingX }, appliedHoverStyles), appliedFocusStyles), processedStyles)
|
|
77
|
+
display, paddingLeft: paddingX, paddingRight: paddingX }, appliedHoverStyles), appliedFocusStyles), processedStyles), children: [_jsx("fieldset", { className: `${typeSafeStyles.fieldset} ${inverted ? typeSafeStyles.inverted : ''}`, children: _jsx("legend", { className: typeSafeStyles.legend, children: label && (_jsx(LabelV2, { standalone: true, "aria-hidden": "true", sx: {
|
|
78
78
|
px: 1,
|
|
79
79
|
position: 'relative',
|
|
80
80
|
display: 'inline-flex',
|
|
81
81
|
opacity: '0',
|
|
82
82
|
visibility: 'hidden',
|
|
83
|
-
}, typography: labelTypographyMapV2[size]
|
|
83
|
+
}, typography: labelTypographyMapV2[size], children: label })) }) }), leftIcon && (_jsx(IconV2, { icon: leftIcon, color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.TEXT, sx: {
|
|
84
84
|
mr: 2,
|
|
85
85
|
fontSize: getIconSize(typographyStyles.fontSize),
|
|
86
86
|
} })), _jsx("input", Object.assign({ value: value, onChange: (event) => {
|
|
87
87
|
onChange && onChange(event.target.value);
|
|
88
88
|
onChangeRaw && onChangeRaw(event.target.value);
|
|
89
|
-
}, className: `${typeSafeStyles.input} ${inverted ? typeSafeStyles.inverted : ''}`, style: Object.assign({}, processSx(Object.assign({}, typographyStyles))), disabled: disabled }, rest)), label && (_jsx(LabelV2,
|
|
89
|
+
}, className: `${typeSafeStyles.input} ${inverted ? typeSafeStyles.inverted : ''}`, style: Object.assign({}, processSx(Object.assign({}, typographyStyles))), disabled: disabled }, rest)), label && (_jsx(LabelV2, { htmlFor: id, typography: labelTypographyMapV2[size], sx: {
|
|
90
90
|
position: 'absolute',
|
|
91
91
|
color: inverted ? COLOR.EXTRA_LIGHT_GRAY : COLOR.ND_PROVOST_BLUE,
|
|
92
92
|
left: '0.5rem',
|
|
@@ -94,5 +94,5 @@ export const TextInputV2 = React.forwardRef((_a, ref) => {
|
|
|
94
94
|
zIndex: Z_INDEX.ELEVATED,
|
|
95
95
|
px: 1,
|
|
96
96
|
top: labelOffsetMapV2[size],
|
|
97
|
-
}
|
|
97
|
+
}, children: label }))] })));
|
|
98
98
|
});
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { StyledElementProps } from '../../../theme';
|
|
3
3
|
export type BoxProps = StyledElementProps<HTMLDivElement>;
|
|
4
4
|
export declare const Box: React.ForwardRefExoticComponent<{
|
|
5
|
-
sx?: import("../../../theme").StylesProp
|
|
5
|
+
sx?: import("../../../theme").StylesProp;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & object & {
|
|
8
|
-
htmlFor?: string
|
|
8
|
+
htmlFor?: string;
|
|
9
9
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -10,5 +10,5 @@ const meta = {
|
|
|
10
10
|
};
|
|
11
11
|
export default meta;
|
|
12
12
|
export const Box = {
|
|
13
|
-
render: () => (_jsx(BoxComponent,
|
|
13
|
+
render: () => (_jsx(BoxComponent, { sx: { p: 1, bg: COLOR.PRIMARY }, children: _jsx(BoxComponent, { sx: { p: 1, bg: COLOR.SECONDARY } }) })),
|
|
14
14
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FlexHelperProps } from './Row';
|
|
3
3
|
export declare const Column: React.ForwardRefExoticComponent<{
|
|
4
|
-
sx?: import("../../../theme").StylesProp
|
|
4
|
+
sx?: import("../../../theme").StylesProp;
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & FlexHelperProps & {
|
|
7
|
-
htmlFor?: string
|
|
7
|
+
htmlFor?: string;
|
|
8
8
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -15,5 +15,5 @@ import { convertFlexHelperProps } from './Row';
|
|
|
15
15
|
export const Column = React.forwardRef((_a, ref) => {
|
|
16
16
|
var { sx, children } = _a, rest = __rest(_a, ["sx", "children"]);
|
|
17
17
|
const flexStyles = convertFlexHelperProps(rest);
|
|
18
|
-
return (_jsx("div", Object.assign({ ref: ref }, rest, { sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { display: 'flex', flexDirection: 'column' })
|
|
18
|
+
return (_jsx("div", Object.assign({ ref: ref }, rest, { sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { display: 'flex', flexDirection: 'column' }), children: children })));
|
|
19
19
|
});
|
|
@@ -12,17 +12,17 @@ const meta = {
|
|
|
12
12
|
};
|
|
13
13
|
export default meta;
|
|
14
14
|
export const Columns = {
|
|
15
|
-
render: () => (_jsxs(Row,
|
|
15
|
+
render: () => (_jsxs(Row, { justify: "space-between", children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] })),
|
|
16
16
|
};
|
|
17
17
|
export const Rows = {
|
|
18
18
|
render: () => (_jsxs(Column, { children: [_jsx(Row, { children: _jsx(Paragraph, { children: "Row 1" }) }), _jsx(Row, { children: _jsx(Paragraph, { children: "Row 2" }) }), _jsx(Row, { children: _jsx(Paragraph, { children: "Row 3" }) })] })),
|
|
19
19
|
};
|
|
20
20
|
export const ResponsiveRow = {
|
|
21
|
-
render: () => (_jsxs(Row,
|
|
21
|
+
render: () => (_jsxs(Row, { justify: "space-between", breakpoint: 0, children: [_jsx(Column, { children: _jsx(Paragraph, { children: "Column 1" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 2" }) }), _jsx(Column, { children: _jsx(Paragraph, { children: "Column 3" }) })] })),
|
|
22
22
|
};
|
|
23
23
|
export const FlexHelpers = {
|
|
24
|
-
render: () => (_jsxs(Row,
|
|
24
|
+
render: () => (_jsxs(Row, { justify: "space-between", children: [_jsx(Column, { align: "flex-end", grow: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY }, children: _jsx(Row, { children: _jsx(Paragraph, { children: "Right-aligned" }) }) }), _jsx(Column, { grow: 1, children: _jsx(Paragraph, { children: "Growing Column...................................................." }) }), _jsx(Column, { shrink: 1, sx: { bg: COLOR.PRIMARY, color: COLOR.TEXT_ON_PRIMARY }, children: _jsx(Paragraph, { children: "Shrinking Column" }) })] })),
|
|
25
25
|
};
|
|
26
26
|
export const Centered = {
|
|
27
|
-
render: () => (_jsx(Row,
|
|
27
|
+
render: () => (_jsx(Row, { centered: true, sx: { width: '100%', height: '100px', border: 'solid black 1px' }, children: _jsx(Paragraph, { children: "Hello World" }) })),
|
|
28
28
|
};
|
|
@@ -8,7 +8,7 @@ describe('Row', () => {
|
|
|
8
8
|
expect(getByText('Foo')).toBeInTheDocument();
|
|
9
9
|
});
|
|
10
10
|
it('converts helper props to styles', () => {
|
|
11
|
-
const { getByText } = render(_jsx(Row,
|
|
11
|
+
const { getByText } = render(_jsx(Row, { grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start", children: "Foo" }));
|
|
12
12
|
const rendered = getByText('Foo');
|
|
13
13
|
expect(rendered).toHaveStyle('flex-grow: 1');
|
|
14
14
|
expect(rendered).toHaveStyle('flex-shrink: 1');
|
|
@@ -23,7 +23,7 @@ describe('Column', () => {
|
|
|
23
23
|
expect(getByText('Foo')).toBeInTheDocument();
|
|
24
24
|
});
|
|
25
25
|
it('converts helper props to styles', () => {
|
|
26
|
-
const { getByText } = render(_jsx(Column,
|
|
26
|
+
const { getByText } = render(_jsx(Column, { grow: 1, shrink: 1, basis: "100px", align: "baseline", justify: "flex-start", children: "Foo" }));
|
|
27
27
|
const rendered = getByText('Foo');
|
|
28
28
|
expect(rendered).toHaveStyle('flex-grow: 1');
|
|
29
29
|
expect(rendered).toHaveStyle('flex-shrink: 1');
|
|
@@ -11,10 +11,10 @@ export type FlexHelperProps = {
|
|
|
11
11
|
centered?: boolean;
|
|
12
12
|
};
|
|
13
13
|
export declare const Row: React.ForwardRefExoticComponent<{
|
|
14
|
-
sx?: import("../../../theme").StylesProp
|
|
14
|
+
sx?: import("../../../theme").StylesProp;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "onChange"> & FlexHelperProps & {
|
|
17
|
-
breakpoint?: number
|
|
17
|
+
breakpoint?: number;
|
|
18
18
|
} & {
|
|
19
|
-
htmlFor?: string
|
|
19
|
+
htmlFor?: string;
|
|
20
20
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -48,5 +48,5 @@ export const Row = React.forwardRef((_a, ref) => {
|
|
|
48
48
|
}
|
|
49
49
|
flexDirection.push('row');
|
|
50
50
|
}
|
|
51
|
-
return (_jsx("div", Object.assign({}, rest, { ref: ref, sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { flexDirection, display: 'flex' })
|
|
51
|
+
return (_jsx("div", Object.assign({}, rest, { ref: ref, sx: Object.assign(Object.assign(Object.assign({}, flexStyles), sx), { flexDirection, display: 'flex' }), children: children })));
|
|
52
52
|
});
|
|
@@ -113,7 +113,7 @@ export const AlertsProvider = ({ domain = ALERT_DOMAIN.LIBRARY, endpoint, startT
|
|
|
113
113
|
const filteredAlerts = alerts
|
|
114
114
|
.filter((alert) => !dismissedAlerts.includes(alert.id))
|
|
115
115
|
.filter((alert) => { var _a; return (_a = alert === null || alert === void 0 ? void 0 : alert.domains) === null || _a === void 0 ? void 0 : _a.includes(domain); });
|
|
116
|
-
return (_jsx(AlertsContext.Provider,
|
|
116
|
+
return (_jsx(AlertsContext.Provider, { value: { alerts: filteredAlerts, dismiss }, children: children }));
|
|
117
117
|
};
|
|
118
118
|
export const useAlerts = (pageAlerts = []) => {
|
|
119
119
|
const { alerts: allAlerts, dismiss } = React.useContext(AlertsContext);
|
|
@@ -33,5 +33,5 @@ export const ComponentConfigContext = createContext(defaultComponentConfig);
|
|
|
33
33
|
export const useComponentConfig = () => useContext(ComponentConfigContext);
|
|
34
34
|
export const ComponentConfigProvider = ({ config: configParam, children }) => {
|
|
35
35
|
const config = useMemo(() => (Object.assign(Object.assign(Object.assign({}, defaultComponentConfig), configParam), { link: Object.assign(Object.assign({}, defaultComponentConfig.link), configParam.link) })), []);
|
|
36
|
-
return (_jsx(ComponentConfigContext.Provider,
|
|
36
|
+
return (_jsx(ComponentConfigContext.Provider, { value: config, children: children }));
|
|
37
37
|
};
|
|
@@ -33,5 +33,5 @@ export const ComponentConfigContextV2 = createContext(defaultComponentConfig);
|
|
|
33
33
|
export const useComponentConfigV2 = () => useContext(ComponentConfigContextV2);
|
|
34
34
|
export const ComponentConfigProviderV2 = ({ config: configParam, children }) => {
|
|
35
35
|
const config = useMemo(() => (Object.assign(Object.assign(Object.assign({}, defaultComponentConfig), configParam), { link: Object.assign(Object.assign({}, defaultComponentConfig.link), configParam.link) })), []);
|
|
36
|
-
return (_jsx(ComponentConfigContextV2.Provider,
|
|
36
|
+
return (_jsx(ComponentConfigContextV2.Provider, { value: config, children: children }));
|
|
37
37
|
};
|
|
@@ -13,11 +13,11 @@ export const DialogsProvider = ({ children }) => {
|
|
|
13
13
|
const close = (key) => {
|
|
14
14
|
setDialogs(Object.assign(Object.assign({}, dialogs), { [key]: { isOpen: false } }));
|
|
15
15
|
};
|
|
16
|
-
return (_jsx(DialogContext.Provider,
|
|
16
|
+
return (_jsx(DialogContext.Provider, { value: {
|
|
17
17
|
dialogs,
|
|
18
18
|
open,
|
|
19
19
|
close,
|
|
20
|
-
}
|
|
20
|
+
}, children: children }));
|
|
21
21
|
};
|
|
22
22
|
export const useDialog = (id) => {
|
|
23
23
|
const dialogs = React.useContext(DialogContext);
|
|
@@ -17,8 +17,8 @@ export const EnvironmentProvider = ({ env, children }) => {
|
|
|
17
17
|
else {
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
return (_jsx(EnvironmentContext.Provider,
|
|
20
|
+
return (_jsx(EnvironmentContext.Provider, { value: {
|
|
21
21
|
env,
|
|
22
22
|
flagInDevelopment,
|
|
23
|
-
}
|
|
23
|
+
}, children: children }));
|
|
24
24
|
};
|
|
@@ -40,9 +40,9 @@ export const MediaSizeProvider = ({ useHydrationPatch, ssrBreakpoint: ssrBreakpo
|
|
|
40
40
|
window.removeEventListener('resize', rerenderOnResize);
|
|
41
41
|
};
|
|
42
42
|
}, []);
|
|
43
|
-
return (_jsx(MediaContext.Provider,
|
|
43
|
+
return (_jsx(MediaContext.Provider, { value: {
|
|
44
44
|
breakpoint,
|
|
45
45
|
screenSize,
|
|
46
|
-
}
|
|
46
|
+
}, children: children }));
|
|
47
47
|
};
|
|
48
48
|
export const useMediaQuery = () => useContext(MediaContext);
|
|
@@ -40,9 +40,9 @@ export const MediaSizeProviderV2 = ({ useHydrationPatch, ssrBreakpoint: ssrBreak
|
|
|
40
40
|
window.removeEventListener('resize', rerenderOnResize);
|
|
41
41
|
};
|
|
42
42
|
}, []);
|
|
43
|
-
return (_jsx(MediaContextV2.Provider,
|
|
43
|
+
return (_jsx(MediaContextV2.Provider, { value: {
|
|
44
44
|
breakpoint,
|
|
45
45
|
screenSize,
|
|
46
|
-
}
|
|
46
|
+
}, children: children }));
|
|
47
47
|
};
|
|
48
48
|
export const useMediaQueryV2 = () => useContext(MediaContextV2);
|
|
@@ -300,5 +300,5 @@ export const MenuProvider = ({ menu, children, }) => {
|
|
|
300
300
|
getMenuProps,
|
|
301
301
|
getMenuItemProps,
|
|
302
302
|
};
|
|
303
|
-
return (_jsx(MenuContext.Provider,
|
|
303
|
+
return (_jsx(MenuContext.Provider, { value: contextValue, children: typeof children === 'function' ? children(contextValue) : children }));
|
|
304
304
|
};
|
|
@@ -41,12 +41,12 @@ export const SnackBarProvider = ({ children, }) => {
|
|
|
41
41
|
removeMessageTimeouts.current.forEach((timeout) => clearTimeout(timeout));
|
|
42
42
|
};
|
|
43
43
|
}, []);
|
|
44
|
-
return (_jsx(SnackBarContext.Provider,
|
|
44
|
+
return (_jsx(SnackBarContext.Provider, { value: {
|
|
45
45
|
messages,
|
|
46
46
|
removeMessage,
|
|
47
47
|
previousMessageCount: previousMessageCount.current,
|
|
48
48
|
addMessage,
|
|
49
|
-
}
|
|
49
|
+
}, children: children }));
|
|
50
50
|
};
|
|
51
51
|
export const useSnackBar = () => {
|
|
52
52
|
return useContext(SnackBarContext);
|
|
@@ -11,6 +11,6 @@ import StructuredData from '../composites/StructuredData';
|
|
|
11
11
|
import { SnackBarProvider } from './snackBar';
|
|
12
12
|
import { UniqueIdProvider } from './uniqueIds';
|
|
13
13
|
export const UiProvider = ({ structuredData, env, components, alertsConfig, children, includeTheme = true, loadFonts, loadGlobalStyles, useHydrationPatch, ssrBreakpoint, }) => {
|
|
14
|
-
const core = (_jsxs(EnvironmentProvider,
|
|
14
|
+
const core = (_jsxs(EnvironmentProvider, { env: env, children: [_jsx(MediaSizeProvider, { ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch, children: _jsx(ComponentConfigProvider, { config: components || {}, children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) }) }), loadGlobalStyles && _jsx(GlobalStyles, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] }));
|
|
15
15
|
return includeTheme ? _jsx(ThemeProvider, { children: core }) : core;
|
|
16
16
|
};
|
|
@@ -11,6 +11,6 @@ import StructuredData from '../composites/StructuredData';
|
|
|
11
11
|
import { SnackBarProvider } from './snackBar';
|
|
12
12
|
import { UniqueIdProvider } from './uniqueIds';
|
|
13
13
|
export const UiProviderV2 = ({ structuredData, env, components, alertsConfig, children, includeTheme = true, loadFonts, loadGlobalStyles, useHydrationPatch, ssrBreakpoint, }) => {
|
|
14
|
-
const core = (_jsxs(EnvironmentProvider,
|
|
14
|
+
const core = (_jsxs(EnvironmentProvider, { env: env, children: [_jsx(MediaSizeProviderV2, { ssrBreakpoint: ssrBreakpoint, useHydrationPatch: useHydrationPatch, children: _jsx(ComponentConfigProviderV2, { config: components || {}, children: _jsx(UniqueIdProvider, { children: _jsx(SnackBarProvider, { children: _jsx(DialogsProvider, { children: _jsx(AlertsProvider, Object.assign({}, alertsConfig, { children: children })) }) }) }) }) }), loadGlobalStyles && _jsx(GlobalStylesV2, {}), loadFonts && _jsx(FontLoader, {}), structuredData && _jsx(StructuredData, Object.assign({}, structuredData))] }));
|
|
15
15
|
return includeTheme ? _jsx(ThemeProviderV2, { children: core }) : core;
|
|
16
16
|
};
|
|
@@ -3,7 +3,7 @@ import { createContext, useContext, useMemo, useRef } from 'react';
|
|
|
3
3
|
const UniqueIdContext = createContext({});
|
|
4
4
|
export const UniqueIdProvider = ({ children, }) => {
|
|
5
5
|
const countIndexRef = useRef({});
|
|
6
|
-
return (_jsx(UniqueIdContext.Provider,
|
|
6
|
+
return (_jsx(UniqueIdContext.Provider, { value: countIndexRef.current, children: children }));
|
|
7
7
|
};
|
|
8
8
|
export const useUniqueId = (prefix) => {
|
|
9
9
|
const countIndex = useContext(UniqueIdContext);
|
|
@@ -70,5 +70,5 @@ const colors = [
|
|
|
70
70
|
{ color: COLOR.ALERT_WARNING_BORDER, label: 'ALERT_WARNING_BORDER' },
|
|
71
71
|
];
|
|
72
72
|
export const Default = {
|
|
73
|
-
render: () => (_jsx(Row,
|
|
73
|
+
render: () => (_jsx(Row, { sx: { flexWrap: 'wrap' }, children: colors.map((color) => (_jsxs(Group, { type: GROUP_TYPE.GROUP, sx: { mr: 3, mt: 0, flexBasis: '100px' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: color.label }), _jsx(ColorSquare, { color: color.color })] }, color.label))) })),
|
|
74
74
|
};
|
|
@@ -41,6 +41,6 @@ const randomElement = (arr) => {
|
|
|
41
41
|
export const Default = {
|
|
42
42
|
render: () => (_jsx(Group, { children: types.map((t) => {
|
|
43
43
|
const style = getTypographyStyles(t.type);
|
|
44
|
-
return (_jsxs(Group,
|
|
44
|
+
return (_jsxs(Group, { sx: { mb: '1rem' }, children: [_jsx(Label, { size: LABEL_SIZE.SM, children: t.label }), _jsx(Box, { sx: { p: 3, boxShadow: '0px 0px 8px 1px #dddddd' }, children: _jsx("div", { sx: style, children: randomElement(pangrams) }) })] }));
|
|
45
45
|
}) })),
|
|
46
46
|
};
|
package/dist/theme/colors.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare enum COLOR {
|
|
|
18
18
|
LIGHT_GRAY = "lightGray",
|
|
19
19
|
EXTRA_LIGHT_GRAY = "extraLightGray",
|
|
20
20
|
EXTRA_EXTRA_LIGHT_GRAY = "extraExtraLightGray",
|
|
21
|
-
SUCCESS = "
|
|
21
|
+
SUCCESS = "success",
|
|
22
22
|
ND_BLUE = "ndBlue",
|
|
23
23
|
ND_BLUE_DARK = "ndBlueDark",
|
|
24
24
|
ND_BLUE_LIGHT = "ndBlueLight",
|
|
@@ -53,7 +53,7 @@ export declare enum COLOR {
|
|
|
53
53
|
ALERT_WARNING_BG = "alertWarningBg",
|
|
54
54
|
ALERT_WARNING_BORDER = "alertWarningBorder",
|
|
55
55
|
ALERT_SUCCESS_BG = "alertSuccessBg",
|
|
56
|
-
ALERT_SUCCESS_BORDER = "
|
|
56
|
+
ALERT_SUCCESS_BORDER = "alertSuccessBorder"
|
|
57
57
|
}
|
|
58
58
|
export declare const colors: {
|
|
59
59
|
[key in COLOR]: string;
|
package/dist/theme/colors.js
CHANGED
|
@@ -19,7 +19,7 @@ export var COLOR;
|
|
|
19
19
|
COLOR["LIGHT_GRAY"] = "lightGray";
|
|
20
20
|
COLOR["EXTRA_LIGHT_GRAY"] = "extraLightGray";
|
|
21
21
|
COLOR["EXTRA_EXTRA_LIGHT_GRAY"] = "extraExtraLightGray";
|
|
22
|
-
COLOR["SUCCESS"] = "
|
|
22
|
+
COLOR["SUCCESS"] = "success";
|
|
23
23
|
COLOR["ND_BLUE"] = "ndBlue";
|
|
24
24
|
COLOR["ND_BLUE_DARK"] = "ndBlueDark";
|
|
25
25
|
COLOR["ND_BLUE_LIGHT"] = "ndBlueLight";
|
|
@@ -54,7 +54,7 @@ export var COLOR;
|
|
|
54
54
|
COLOR["ALERT_WARNING_BG"] = "alertWarningBg";
|
|
55
55
|
COLOR["ALERT_WARNING_BORDER"] = "alertWarningBorder";
|
|
56
56
|
COLOR["ALERT_SUCCESS_BG"] = "alertSuccessBg";
|
|
57
|
-
COLOR["ALERT_SUCCESS_BORDER"] = "
|
|
57
|
+
COLOR["ALERT_SUCCESS_BORDER"] = "alertSuccessBorder";
|
|
58
58
|
})(COLOR || (COLOR = {}));
|
|
59
59
|
export const colors = {
|
|
60
60
|
[COLOR.TEXT]: '#333333',
|
|
@@ -76,6 +76,7 @@ export const colors = {
|
|
|
76
76
|
[COLOR.LIGHT_GRAY]: '#d2d2d2',
|
|
77
77
|
[COLOR.EXTRA_LIGHT_GRAY]: '#e2e2e2',
|
|
78
78
|
[COLOR.EXTRA_EXTRA_LIGHT_GRAY]: '#f2f2f2',
|
|
79
|
+
[COLOR.SUCCESS]: '#00823E',
|
|
79
80
|
[COLOR.ND_GOLD]: '#ae9142',
|
|
80
81
|
[COLOR.ND_GOLD_LIGHT]: '#d39f10',
|
|
81
82
|
[COLOR.ND_GOLD_DARK]: '#8c7535',
|
|
@@ -110,4 +111,5 @@ export const colors = {
|
|
|
110
111
|
[COLOR.ALERT_WARNING_BG]: '#fc7279',
|
|
111
112
|
[COLOR.ALERT_WARNING_BORDER]: '#ad5458',
|
|
112
113
|
[COLOR.ALERT_SUCCESS_BG]: '#edffea',
|
|
114
|
+
[COLOR.ALERT_SUCCESS_BORDER]: '#00823E',
|
|
113
115
|
};
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
--lightGray: #d2d2d2;
|
|
19
19
|
--extraLightGray: #e2e2e2;
|
|
20
20
|
--extraExtraLightGray: #f2f2f2;
|
|
21
|
-
--
|
|
21
|
+
--success: #00823E;
|
|
22
22
|
--ndBlue: #0c2340;
|
|
23
23
|
--ndBlueDark: #081629;
|
|
24
24
|
--ndBlueLight: #143865;
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
--alertWarningBg: #fc7279;
|
|
54
54
|
--alertWarningBorder: #ad5458;
|
|
55
55
|
--alertSuccessBg: #edffea;
|
|
56
|
-
--
|
|
56
|
+
--alertSuccessBorder: #00823E;
|
|
57
57
|
}
|