@wavv/ui 2.2.8 → 2.3.0

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.
@@ -1,5 +1,5 @@
1
1
  import { type CheckboxProps } from 'react-aria-components';
2
- import type { Margin, ThemeProp } from './types';
2
+ import type { FlexPosition, Margin, ThemeProp } from './types';
3
3
  type Props = {
4
4
  /** Id of the input element */
5
5
  id?: string;
@@ -17,15 +17,18 @@ type Props = {
17
17
  partial?: boolean;
18
18
  /** Sets the gap between the label and the checkbox */
19
19
  gap?: number;
20
+ /** Sets the flex alignment of the checkbox container */
21
+ align?: FlexPosition;
20
22
  onChange?: CheckboxProps['onChange'];
21
23
  className?: CheckboxProps['className'];
22
24
  style?: CheckboxProps['style'];
23
25
  } & Margin & Omit<CheckboxProps, 'value' | 'isDisabled' | 'isReadOnly' | 'isSelected' | 'isIndeterminate'>;
24
- declare const Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
26
+ declare const Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, align, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
25
27
  export declare const ControlContainer: import("@emotion/styled").StyledComponent<CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & {
26
28
  theme?: import("@emotion/react").Theme;
27
29
  } & {
28
30
  labelRight?: boolean;
29
31
  gap?: number;
32
+ align?: FlexPosition;
30
33
  } & Margin & ThemeProp, {}, {}>;
31
34
  export default Checkbox;
@@ -5,13 +5,15 @@ import icons_Checkbox from "../assets/icons/Checkbox.js";
5
5
  import CheckboxOff from "../assets/icons/CheckboxOff.js";
6
6
  import CheckboxPartial from "../assets/icons/CheckboxPartial.js";
7
7
  import { ControlLabel } from "./FormControl.js";
8
+ import getFlexPosition from "./helpers/getFlexPosition.js";
8
9
  import { marginProps } from "./helpers/styledProps.js";
9
10
  import Icon from "./Icon/index.js";
10
- const Checkbox_Checkbox = ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props })=>{
11
+ const Checkbox_Checkbox = ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, align, ...props })=>{
11
12
  const labelRight = 'right' === labelPosition;
12
13
  const isControlled = 'boolean' == typeof checked;
13
14
  return /*#__PURE__*/ jsx(ControlContainer, {
14
15
  labelRight: labelRight,
16
+ align: align,
15
17
  ...isControlled ? {
16
18
  isSelected: checked
17
19
  } : {},
@@ -43,11 +45,11 @@ const Checkbox_Checkbox = ({ label, labelPosition, checked, partial, disabled, r
43
45
  }
44
46
  });
45
47
  };
46
- const ControlContainer = styled(Checkbox)(({ theme: { accent, formControl }, labelRight, isDisabled, gap = 8 })=>({
48
+ const ControlContainer = styled(Checkbox)(({ theme: { accent, formControl }, labelRight, isDisabled, gap = 8, align })=>({
47
49
  display: 'inline-flex',
48
50
  flexDirection: labelRight ? 'row-reverse' : 'row',
49
51
  justifyContent: labelRight ? 'flex-end' : 'flex-start',
50
- alignItems: 'center',
52
+ alignItems: getFlexPosition(align) || 'center',
51
53
  gap,
52
54
  position: 'relative',
53
55
  cursor: isDisabled ? 'not-allowed' : void 0,
@@ -34,7 +34,7 @@ declare const Form: {
34
34
  className?: import("react-aria-components").SwitchProps["className"];
35
35
  style?: import("react-aria-components").SwitchProps["style"];
36
36
  } & Margin & Omit<import("react-aria-components").SwitchProps, "isDisabled" | "isSelected">) => import("react/jsx-runtime").JSX.Element;
37
- Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, ...props }: {
37
+ Checkbox: ({ label, labelPosition, checked, partial, disabled, readOnly, onChange, align, ...props }: {
38
38
  id?: string;
39
39
  label?: string;
40
40
  labelPosition?: "left" | "right";
@@ -43,6 +43,7 @@ declare const Form: {
43
43
  checked?: boolean;
44
44
  partial?: boolean;
45
45
  gap?: number;
46
+ align?: import("./types").FlexPosition;
46
47
  onChange?: import("react-aria-components").CheckboxProps["onChange"];
47
48
  className?: import("react-aria-components").CheckboxProps["className"];
48
49
  style?: import("react-aria-components").CheckboxProps["style"];
@@ -19,8 +19,8 @@ const baseStyles = ({ theme: { input, accent }, backgroundColor, borderRadius, b
19
19
  outlineOffset: -1,
20
20
  transition: 'background-color 0.2s',
21
21
  '&:focus-within': {
22
- backgroundColor: backgroundColor || textOnly || isDisabled || isInvalid ? void 0 : input.background.focused,
23
- outline: `${accent} solid 1px`
22
+ backgroundColor: backgroundColor || textOnly || isDisabled ? void 0 : input.background.focused,
23
+ outline: isInvalid ? void 0 : `1px solid ${accent}`
24
24
  },
25
25
  '&:hover:not(:focus-within)': {
26
26
  backgroundColor: isDisabled || isReadOnly || textOnly || backgroundColor ? void 0 : input.background.hover,
@@ -33,16 +33,16 @@ const disabledStyles = ({ theme: { input }, isDisabled })=>({
33
33
  backgroundColor: isDisabled ? input.background.disabled : void 0,
34
34
  pointerEvents: isDisabled ? 'none' : void 0
35
35
  });
36
- const invalidStyles = ({ theme: { input }, isInvalid })=>({
37
- backgroundColor: isInvalid ? input.background.invalid : void 0,
36
+ const invalidStyles = ({ theme: { color }, isInvalid })=>({
37
+ outline: isInvalid ? `1px solid ${color.error}` : void 0,
38
38
  '&:hover:not(:focus-within)': {
39
- backgroundColor: isInvalid ? input.background.invalidHover : void 0
39
+ outline: isInvalid ? `1px solid ${color.error}` : void 0
40
40
  },
41
41
  '&[data-invalid]': {
42
- backgroundColor: input.background.invalid
42
+ outline: `1px solid ${color.error}`
43
43
  },
44
44
  '&:hover:not(:focus-within)&[data-invalid]': {
45
- backgroundColor: input.background.invalidHover
45
+ outline: `1px solid ${color.error}`
46
46
  }
47
47
  });
48
48
  const readOnlyStyles = ({ isReadOnly })=>({
@@ -1,3 +1,4 @@
1
+ import getFlexPosition from "../helpers/getFlexPosition.js";
1
2
  import isPropAllowed from "../helpers/isPropAllowed.js";
2
3
  const preventProps = {
3
4
  shouldForwardProp: (prop)=>isPropAllowed(prop, [
@@ -38,12 +39,9 @@ const baseStyles = ({ theme: { optionItem, scale4 }, color, accented, selected,
38
39
  }
39
40
  };
40
41
  };
41
- const positionStyles = ({ contentPosition })=>{
42
- const position = 'start' === contentPosition || 'end' === contentPosition ? `flex-${contentPosition}` : contentPosition;
43
- return {
44
- justifyContent: position
45
- };
46
- };
42
+ const positionStyles = ({ contentPosition })=>({
43
+ justifyContent: getFlexPosition(contentPosition)
44
+ });
47
45
  const listItemStyles = [
48
46
  baseStyles,
49
47
  positionStyles
@@ -2,6 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
3
  import react, { cloneElement, useState } from "react";
4
4
  import react_keyed_flatten_children from "react-keyed-flatten-children";
5
+ import getFlexPosition from "./helpers/getFlexPosition.js";
5
6
  import { paddingProps } from "./helpers/styledProps.js";
6
7
  import Icon from "./Icon/index.js";
7
8
  const Menu = ({ vertical, backgroundColor, children, ...rest })=>{
@@ -138,12 +139,9 @@ const MenuItem = styled.button({
138
139
  outline: `${accent} solid 1px`,
139
140
  outlineOffset: -1
140
141
  }
141
- }), ({ contentPosition })=>{
142
- const position = 'start' === contentPosition || 'end' === contentPosition ? `flex-${contentPosition}` : contentPosition;
143
- return {
144
- justifyContent: position
145
- };
146
- });
142
+ }), ({ contentPosition })=>({
143
+ justifyContent: getFlexPosition(contentPosition)
144
+ }));
147
145
  const MenuGroup = styled.div(({ theme, backgroundColor })=>({
148
146
  display: 'flex',
149
147
  flexDirection: 'column',
@@ -1,4 +1,4 @@
1
- import { type CSSProperties, type ReactNode, type RefObject } from 'react';
1
+ import type { CSSProperties, ReactNode, RefObject } from 'react';
2
2
  import { type HeadingProps } from 'react-aria-components';
3
3
  import type { Attributes } from './typeDefs/elementTypes';
4
4
  import type { FlexPosition, Height, Margin, MaxWidthHeight, MinWidthHeight, Padding, PositionType, WidthHeight } from './types';
@@ -23,8 +23,6 @@ type ModalProps = {
23
23
  borderRadius?: number | string;
24
24
  /** Overrides the overflow of the modal container */
25
25
  overflow?: CSSProperties['overflow'];
26
- /** Styles the Modal as an actionable toast */
27
- small?: boolean;
28
26
  /** Removes the overlay background, and allows the modal to be positioned anywhere on the page */
29
27
  noOverlay?: boolean;
30
28
  /** Prevents the modal from being interacted with */
@@ -55,7 +53,7 @@ type ModalProps = {
55
53
  'aria-label'?: string;
56
54
  } & WidthHeight & MaxWidthHeight & MinWidthHeight & Padding & DivAttributes;
57
55
  declare const Modal: {
58
- ({ children, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayBlur, overlayColor, backgroundColor, small, noOverlay, inert, drawer, drawerDirection, scopeRef, centerX, centerY, position, top, bottom, right, left, zIndex, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
56
+ ({ children, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayBlur, overlayColor, backgroundColor, noOverlay, inert, drawer, drawerDirection, scopeRef, centerX, centerY, position, top, bottom, right, left, zIndex, ...props }: ModalProps): import("react/jsx-runtime").JSX.Element;
59
57
  Header: {
60
58
  ({ children, ...props }: HeaderProps): import("react/jsx-runtime").JSX.Element;
61
59
  displayName: string;
@@ -88,7 +86,6 @@ type BodyProps = {
88
86
  type FooterProps = {
89
87
  children: ReactNode;
90
88
  justify?: FlexPosition;
91
- inline?: boolean;
92
89
  gap?: number | string;
93
90
  } & Margin & DivAttributes;
94
91
  export default Modal;
@@ -1,20 +1,12 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { keyframes } from "@emotion/react";
3
3
  import styled from "@emotion/styled";
4
- import { cloneElement } from "react";
5
4
  import { Dialog, Heading, Modal, ModalOverlay } from "react-aria-components";
6
- import react_keyed_flatten_children from "react-keyed-flatten-children";
7
5
  import { marginProps, maxWidthHeightProps, minWidthHeightProps, paddingProps } from "./helpers/styledProps.js";
8
6
  import Icon from "./Icon/index.js";
9
7
  import PortalScope from "./PortalScope.js";
10
- const Modal_Modal = ({ children, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayBlur = true, overlayColor, backgroundColor, small, noOverlay, inert, drawer, drawerDirection = 'right', scopeRef, centerX, centerY, position, top, bottom, right, left, zIndex, ...props })=>{
8
+ const Modal_Modal = ({ children, visible, width, height, onClose, closeIcon, preventOverlayClose, overlayBlur = true, overlayColor, backgroundColor, noOverlay, inert, drawer, drawerDirection = 'right', scopeRef, centerX, centerY, position, top, bottom, right, left, zIndex, ...props })=>{
11
9
  const { 'aria-label': ariaLabel, ...rest } = props;
12
- const modalContent = react_keyed_flatten_children(children).map((child)=>{
13
- if (child) return /*#__PURE__*/ cloneElement(child, {
14
- inline: small
15
- });
16
- return null;
17
- });
18
10
  const handleOpenChange = (open)=>{
19
11
  if (!open) onClose();
20
12
  };
@@ -49,7 +41,6 @@ const Modal_Modal = ({ children, visible, width, height, onClose, closeIcon, pre
49
41
  width: width,
50
42
  height: height,
51
43
  backgroundColor: backgroundColor,
52
- small: small,
53
44
  noOverlay: noOverlay,
54
45
  drawer: drawer,
55
46
  drawerDirection: drawerDirection,
@@ -57,9 +48,8 @@ const Modal_Modal = ({ children, visible, width, height, onClose, closeIcon, pre
57
48
  centerY: centerY,
58
49
  ...rest,
59
50
  children: [
60
- modalContent,
51
+ children,
61
52
  closeIcon && /*#__PURE__*/ jsx(Close, {
62
- inline: small,
63
53
  children: /*#__PURE__*/ jsx(Icon, {
64
54
  name: "close",
65
55
  onClick: onClose,
@@ -108,7 +98,7 @@ const Footer = ({ children, ...props })=>/*#__PURE__*/ jsx(ModalFooter, {
108
98
  ...props,
109
99
  children: children
110
100
  });
111
- const ModalFooter = styled.div(({ justify = 'end', inline, gap })=>{
101
+ const ModalFooter = styled.div(({ justify = 'end', gap })=>{
112
102
  const justifyOptions = {
113
103
  start: 'flex-start',
114
104
  end: 'flex-end',
@@ -120,21 +110,20 @@ const ModalFooter = styled.div(({ justify = 'end', inline, gap })=>{
120
110
  display: 'flex',
121
111
  alignItems: 'center',
122
112
  justifyContent: justify ? justifyOptions[justify] : void 0,
123
- marginTop: inline ? void 0 : 8,
113
+ marginTop: 8,
124
114
  gap
125
115
  };
126
116
  }, marginProps);
127
- const ModalContainer = styled.div(({ theme, width, height, backgroundColor, small, borderRadius, overflow, drawer, drawerDirection })=>({
117
+ const ModalContainer = styled.div(({ theme, width, height, backgroundColor, borderRadius, overflow, drawer, drawerDirection })=>({
128
118
  display: 'flex',
129
- flexDirection: small ? 'row' : 'column',
130
- alignItems: small ? 'center' : void 0,
119
+ flexDirection: 'column',
131
120
  backgroundColor: backgroundColor || theme.modal.background,
132
121
  color: theme.scale10,
133
122
  boxShadow: drawer ? 'left' === drawerDirection ? '8px 0 20px rgba(0, 0, 0, 0.2)' : '-8px 0 20px rgba(0, 0, 0, 0.2)' : theme.elevation3,
134
123
  width: width || 'max-content',
135
124
  height: drawer ? height || '100%' : height || 'max-content',
136
125
  borderRadius: drawer ? 0 : borderRadius || theme.size.sm,
137
- padding: small ? theme.size.md : theme.size.lg,
126
+ padding: theme.size.lg,
138
127
  overflow: overflow || 'hidden'
139
128
  }), ({ noOverlay, drawer })=>!noOverlay && !drawer && {
140
129
  position: 'absolute',
@@ -157,14 +146,11 @@ const ModalContainer = styled.div(({ theme, width, height, backgroundColor, smal
157
146
  const Close = styled.div({
158
147
  display: 'flex',
159
148
  justifyContent: 'center',
160
- alignItems: 'center'
161
- }, ({ inline })=>inline ? {
162
- marginLeft: 16
163
- } : {
164
- position: 'absolute',
165
- top: 8,
166
- right: 8
167
- });
149
+ alignItems: 'center',
150
+ position: 'absolute',
151
+ top: 8,
152
+ right: 8
153
+ });
168
154
  const Overlay = styled(ModalOverlay)(({ color, blur, noOverlay, centerX, centerY, position, top, bottom, right, left, zIndex, width, height })=>({
169
155
  position: position || 'fixed',
170
156
  top: top || (left || bottom || right ? void 0 : 0),
@@ -1,4 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
+ import getFlexPosition from "../helpers/getFlexPosition.js";
2
3
  import isPropAllowed from "../helpers/isPropAllowed.js";
3
4
  const contentPreventProps = {
4
5
  shouldForwardProp: (prop)=>isPropAllowed(prop, [
@@ -40,12 +41,9 @@ const Item = styled('div', contentPreventProps)({
40
41
  cursor: 'inherit'
41
42
  }
42
43
  };
43
- }, ({ contentPosition })=>{
44
- const position = 'start' === contentPosition || 'end' === contentPosition ? `flex-${contentPosition}` : contentPosition;
45
- return {
46
- justifyContent: position
47
- };
48
- }, ({ theme, section })=>section && {
44
+ }, ({ contentPosition })=>({
45
+ justifyContent: getFlexPosition(contentPosition)
46
+ }), ({ theme, section })=>section && {
49
47
  backgroundColor: theme.scale0,
50
48
  padding: '0 16px',
51
49
  color: theme.scale6,
@@ -1,12 +1,9 @@
1
+ import getFlexPosition from "../helpers/getFlexPosition.js";
1
2
  import { paddingProps } from "../helpers/styledProps.js";
2
- const getPosition = (position)=>{
3
- if (!position) return;
4
- return 'start' === position || 'end' === position ? `flex-${position}` : position;
5
- };
6
3
  const baseStyles = ({ direction, justify, align = 'center', gap = 8 })=>({
7
4
  display: 'flex',
8
- justifyContent: getPosition(justify),
9
- alignItems: getPosition(align),
5
+ justifyContent: getFlexPosition(justify),
6
+ alignItems: getFlexPosition(align),
10
7
  flexDirection: direction,
11
8
  width: '100%',
12
9
  height: '100%',
@@ -0,0 +1,3 @@
1
+ import type { FlexPosition } from '../types';
2
+ declare const getFlexPosition: (position?: FlexPosition) => string | undefined;
3
+ export default getFlexPosition;
@@ -0,0 +1,6 @@
1
+ const getFlexPosition = (position)=>{
2
+ if (!position) return;
3
+ return 'start' === position || 'end' === position ? `flex-${position}` : position;
4
+ };
5
+ const helpers_getFlexPosition = getFlexPosition;
6
+ export { helpers_getFlexPosition as default };
@@ -115,6 +115,123 @@
115
115
  --color-background5: #596A74;
116
116
  }
117
117
 
118
+ .mono {
119
+ --color-logo1: #0074F4;
120
+ --color-logo2: #00A9E2;
121
+ --color-logo3: #67C728;
122
+ --color-brand: #0074F4;
123
+ --color-brandShade1: #0068DC;
124
+ --color-brandShade2: #005DC3;
125
+ --color-brandDark: #4C9EF7;
126
+ --color-brandDarkShade1: #5EA8F8;
127
+ --color-brandTint0: rgba(0,116,244,0.05);
128
+ --color-brandTint1: rgba(0,116,244,0.1);
129
+ --color-brandTint2: rgba(0,116,244,0.2);
130
+ --color-brandTint3: rgba(0,116,244,0.3);
131
+ --color-brandTint4: rgba(0,116,244,0.4);
132
+ --color-brandBackground0: #121212;
133
+ --color-brandBackground1: #1e1e1e;
134
+ --color-brandBackground2: #292929;
135
+ --color-brandBackground3: #3a3a3a;
136
+ --color-brandBackground4: #4b4b4b;
137
+ --color-brandBackground5: #5c5c5c;
138
+ --color-error: #FF6068;
139
+ --color-errorShade1: #E6565E;
140
+ --color-errorShade2: #CC4D53;
141
+ --color-errorTint0: rgba(255,96,104,0.05);
142
+ --color-errorTint1: rgba(255,96,104,0.1);
143
+ --color-errorTint2: rgba(255,96,104,0.2);
144
+ --color-errorTint3: rgba(255,96,104,0.3);
145
+ --color-errorTint4: rgba(255,96,104,0.4);
146
+ --color-warning: #FF9900;
147
+ --color-warningShade1: #E68A00;
148
+ --color-warningShade2: #CC7A00;
149
+ --color-warningTint0: rgba(255,153,0,0.05);
150
+ --color-warningTint1: rgba(255,153,0,0.1);
151
+ --color-warningTint2: rgba(255,153,0,0.2);
152
+ --color-warningTint3: rgba(255,153,0,0.3);
153
+ --color-warningTint4: rgba(255,153,0,0.4);
154
+ --color-alert: #F0BB00;
155
+ --color-alertShade1: #E4B200;
156
+ --color-alertShade2: #C09600;
157
+ --color-alertTint0: rgba(240,187,0,0.05);
158
+ --color-alertTint1: rgba(240,187,0,0.1);
159
+ --color-alertTint2: rgba(240,187,0,0.2);
160
+ --color-alertTint3: rgba(240,187,0,0.3);
161
+ --color-alertTint4: rgba(240,187,0,0.4);
162
+ --color-success: #00E284;
163
+ --color-successShade1: #00AF3B;
164
+ --color-successShade2: #009B35;
165
+ --color-successTint0: rgba(0,226,132,0.05);
166
+ --color-successTint1: rgba(0,226,132,0.1);
167
+ --color-successTint2: rgba(0,226,132,0.2);
168
+ --color-successTint3: rgba(0,226,132,0.3);
169
+ --color-successTint4: rgba(0,226,132,0.4);
170
+ --color-grayscale0: rgba(18,18,18,0.05);
171
+ --color-grayscale1: rgba(18,18,18,0.1);
172
+ --color-grayscale2: rgba(18,18,18,0.2);
173
+ --color-grayscale3: rgba(18,18,18,0.3);
174
+ --color-grayscale4: rgba(18,18,18,0.4);
175
+ --color-grayscale5: rgba(18,18,18,0.5);
176
+ --color-grayscale6: rgba(18,18,18,0.6);
177
+ --color-grayscale7: rgba(18,18,18,0.7);
178
+ --color-grayscale8: rgba(18,18,18,0.8);
179
+ --color-grayscale9: rgba(18,18,18,0.9);
180
+ --color-grayscale10: #121212;
181
+ --color-contrast0: rgba(255,255,255,0.05);
182
+ --color-contrast1: rgba(255,255,255,0.1);
183
+ --color-contrast2: rgba(255,255,255,0.2);
184
+ --color-contrast3: rgba(255,255,255,0.3);
185
+ --color-contrast4: rgba(255,255,255,0.4);
186
+ --color-contrast5: rgba(255,255,255,0.5);
187
+ --color-contrast6: rgba(255,255,255,0.6);
188
+ --color-contrast7: rgba(255,255,255,0.7);
189
+ --color-contrast8: rgba(255,255,255,0.8);
190
+ --color-contrast9: rgba(255,255,255,0.9);
191
+ --color-contrast10: #FFFFFF;
192
+ --color-scale0: rgba(18,18,18,0.05);
193
+ --color-scale1: rgba(18,18,18,0.1);
194
+ --color-scale2: rgba(18,18,18,0.2);
195
+ --color-scale3: rgba(18,18,18,0.3);
196
+ --color-scale4: rgba(18,18,18,0.4);
197
+ --color-scale5: rgba(18,18,18,0.5);
198
+ --color-scale6: rgba(18,18,18,0.6);
199
+ --color-scale7: rgba(18,18,18,0.7);
200
+ --color-scale8: rgba(18,18,18,0.8);
201
+ --color-scale9: rgba(18,18,18,0.9);
202
+ --color-scale10: #121212;
203
+ --color-accent: #0074F4;
204
+ --color-accentShade: #0068DC;
205
+ --color-background0: #FFFFFF;
206
+ --color-background1: #F2F3F4;
207
+ --color-background2: #E6E9EB;
208
+ --color-background3: #CCD2D6;
209
+ --color-background4: #B3BCC2;
210
+ --color-background5: #99A5AD;
211
+ }
212
+
213
+ .mono.dark {
214
+ --color-scale0: rgba(255,255,255,0.05);
215
+ --color-scale1: rgba(255,255,255,0.1);
216
+ --color-scale2: rgba(255,255,255,0.2);
217
+ --color-scale3: rgba(255,255,255,0.3);
218
+ --color-scale4: rgba(255,255,255,0.4);
219
+ --color-scale5: rgba(255,255,255,0.5);
220
+ --color-scale6: rgba(255,255,255,0.6);
221
+ --color-scale7: rgba(255,255,255,0.7);
222
+ --color-scale8: rgba(255,255,255,0.8);
223
+ --color-scale9: rgba(255,255,255,0.9);
224
+ --color-scale10: #FFFFFF;
225
+ --color-accent: #4C9EF7;
226
+ --color-accentShade: #5EA8F8;
227
+ --color-background0: #121212;
228
+ --color-background1: #1e1e1e;
229
+ --color-background2: #292929;
230
+ --color-background3: #3a3a3a;
231
+ --color-background4: #4b4b4b;
232
+ --color-background5: #5c5c5c;
233
+ }
234
+
118
235
  @utility head-1 {
119
236
  font-size: 28px;
120
237
  font-weight: 500;
@@ -2,14 +2,17 @@ import type { ITheme } from './ThemeTypes';
2
2
  type Theme = {
3
3
  light: ITheme;
4
4
  dark: ITheme;
5
+ monoDark: ITheme;
6
+ monoLight: ITheme;
5
7
  };
6
8
  declare const theme: Theme;
7
9
  export default theme;
8
10
  export type { ButtonState, ITheme, ThemeProp } from './ThemeTypes';
9
- export type ThemeClasses = 'light' | 'dark';
11
+ export type ThemeClasses = 'light' | 'dark' | 'mono';
12
+ export type ThemeOptionId = 'light' | 'dark' | 'monoDark' | 'monoLight';
10
13
  export declare const themeClasses: ThemeClasses[];
11
14
  export type ThemeOption = {
12
- id: 'light' | 'dark';
15
+ id: ThemeOptionId;
13
16
  value: string;
14
17
  classes: ThemeClasses[];
15
18
  };
@@ -1,13 +1,18 @@
1
1
  import dark from "./core/dark/dark.js";
2
2
  import light from "./core/light/light.js";
3
+ import dark_dark from "./mono/dark/dark.js";
4
+ import light_light from "./mono/light/light.js";
3
5
  const theme = {
4
6
  light: light,
5
- dark: dark
7
+ dark: dark,
8
+ monoDark: dark_dark,
9
+ monoLight: light_light
6
10
  };
7
11
  const lib_theme = theme;
8
12
  const themeClasses = [
9
13
  'light',
10
- 'dark'
14
+ 'dark',
15
+ 'mono'
11
16
  ];
12
17
  const themeOptions = [
13
18
  {
@@ -23,6 +28,22 @@ const themeOptions = [
23
28
  classes: [
24
29
  'dark'
25
30
  ]
31
+ },
32
+ {
33
+ id: 'monoDark',
34
+ value: 'Mono Dark',
35
+ classes: [
36
+ 'mono',
37
+ 'dark'
38
+ ]
39
+ },
40
+ {
41
+ id: 'monoLight',
42
+ value: 'Mono Light',
43
+ classes: [
44
+ 'mono',
45
+ 'light'
46
+ ]
26
47
  }
27
48
  ];
28
49
  export { lib_theme as default, themeClasses, themeOptions };
@@ -0,0 +1,224 @@
1
+ declare const colors: {
2
+ logo1: string;
3
+ logo2: string;
4
+ logo3: string;
5
+ brand: string;
6
+ brandShade1: string;
7
+ brandShade2: string;
8
+ brandDark: string;
9
+ brandDarkShade1: string;
10
+ brandTint0: string;
11
+ brandTint1: string;
12
+ brandTint2: string;
13
+ brandTint3: string;
14
+ brandTint4: string;
15
+ brandBackground0: string;
16
+ brandBackground1: string;
17
+ brandBackground2: string;
18
+ brandBackground3: string;
19
+ brandBackground4: string;
20
+ brandBackground5: string;
21
+ error: string;
22
+ errorShade1: string;
23
+ errorShade2: string;
24
+ errorTint0: string;
25
+ errorTint1: string;
26
+ errorTint2: string;
27
+ errorTint3: string;
28
+ errorTint4: string;
29
+ warning: string;
30
+ warningShade1: string;
31
+ warningShade2: string;
32
+ warningTint0: string;
33
+ warningTint1: string;
34
+ warningTint2: string;
35
+ warningTint3: string;
36
+ warningTint4: string;
37
+ alert: string;
38
+ alertShade1: string;
39
+ alertShade2: string;
40
+ alertTint0: string;
41
+ alertTint1: string;
42
+ alertTint2: string;
43
+ alertTint3: string;
44
+ alertTint4: string;
45
+ success: string;
46
+ successShade1: string;
47
+ successShade2: string;
48
+ successTint0: string;
49
+ successTint1: string;
50
+ successTint2: string;
51
+ successTint3: string;
52
+ successTint4: string;
53
+ grayscale0: string;
54
+ grayscale1: string;
55
+ grayscale2: string;
56
+ grayscale3: string;
57
+ grayscale4: string;
58
+ grayscale5: string;
59
+ grayscale6: string;
60
+ grayscale7: string;
61
+ grayscale8: string;
62
+ grayscale9: string;
63
+ grayscale10: string;
64
+ contrast0: string;
65
+ contrast1: string;
66
+ contrast2: string;
67
+ contrast3: string;
68
+ contrast4: string;
69
+ contrast5: string;
70
+ contrast6: string;
71
+ contrast7: string;
72
+ contrast8: string;
73
+ contrast9: string;
74
+ contrast10: string;
75
+ };
76
+ export default colors;
77
+ export interface IColors {
78
+ /** #0074F4 */
79
+ logo1: string;
80
+ /** #00A9E2 */
81
+ logo2: string;
82
+ /** #67C728 */
83
+ logo3: string;
84
+ /** #0074F4 */
85
+ brand: string;
86
+ /** #0068DC */
87
+ brandShade1: string;
88
+ /** #005DC3 */
89
+ brandShade2: string;
90
+ /** #4C9EF7 */
91
+ brandDark: string;
92
+ /** #5EA8F8 */
93
+ brandDarkShade1: string;
94
+ /** 5% of #0074F4 */
95
+ brandTint0: string;
96
+ /** 10% of #0074F4 */
97
+ brandTint1: string;
98
+ /** 20% of #0074F4 */
99
+ brandTint2: string;
100
+ /** 30% of #0074F4 */
101
+ brandTint3: string;
102
+ /** 40% of #0074F4 */
103
+ brandTint4: string;
104
+ /** #001828 */
105
+ brandBackground0: string;
106
+ /** #0D2433 */
107
+ brandBackground1: string;
108
+ /** #192F3D */
109
+ brandBackground2: string;
110
+ /** #334653 */
111
+ brandBackground3: string;
112
+ /** #475964 */
113
+ brandBackground4: string;
114
+ /** #596A74 */
115
+ brandBackground5: string;
116
+ /** #FF6068 */
117
+ error: string;
118
+ /** #E6565E */
119
+ errorShade1: string;
120
+ /** #CC4D53 */
121
+ errorShade2: string;
122
+ /** 5% of #FF6068 */
123
+ errorTint0: string;
124
+ /** 10% of #FF6068 */
125
+ errorTint1: string;
126
+ /** 20% of #FF6068 */
127
+ errorTint2: string;
128
+ /** 30% of #FF6068 */
129
+ errorTint3: string;
130
+ /** 40% of #FF6068 */
131
+ errorTint4: string;
132
+ /** #FF9900 */
133
+ warning: string;
134
+ /** #E68A00 */
135
+ warningShade1: string;
136
+ /** #CC7A00 */
137
+ warningShade2: string;
138
+ /** 5% of #FF9900 */
139
+ warningTint0: string;
140
+ /** 10% of #FF9900 */
141
+ warningTint1: string;
142
+ /** 20% of #FF9900 */
143
+ warningTint2: string;
144
+ /** 30% of #FF9900 */
145
+ warningTint3: string;
146
+ /** 40% of #FF9900 */
147
+ warningTint4: string;
148
+ /** #F0BB00 */
149
+ alert: string;
150
+ /** #E4B200 */
151
+ alertShade1: string;
152
+ /** #C09600 */
153
+ alertShade2: string;
154
+ /** 5% of #F0BB00 */
155
+ alertTint0: string;
156
+ /** 10% of #F0BB00 */
157
+ alertTint1: string;
158
+ /** 20% of #F0BB00 */
159
+ alertTint2: string;
160
+ /** 30% of #F0BB00 */
161
+ alertTint3: string;
162
+ /** 40% of #F0BB00 */
163
+ alertTint4: string;
164
+ /** #00C242 */
165
+ success: string;
166
+ /** #00AF3B */
167
+ successShade1: string;
168
+ /** #009B35 */
169
+ successShade2: string;
170
+ /** 5% of #00C242 */
171
+ successTint0: string;
172
+ /** 10% of #00C242 */ successTint1: string;
173
+ /** 20% of #00C242 */
174
+ successTint2: string;
175
+ /** 30% of #00C242 */
176
+ successTint3: string;
177
+ /** 40% of #00C242 */
178
+ successTint4: string;
179
+ /** 5% of #001D32 */
180
+ grayscale0: string;
181
+ /** 10% of #001D32 */
182
+ grayscale1: string;
183
+ /** 20% of #001D32 */
184
+ grayscale2: string;
185
+ /** 30% of #001D32 */
186
+ grayscale3: string;
187
+ /** 40% of #001D32 */
188
+ grayscale4: string;
189
+ /** 50% of #001D32 */
190
+ grayscale5: string;
191
+ /** 60% of #001D32 */
192
+ grayscale6: string;
193
+ /** 70% of #001D32 */
194
+ grayscale7: string;
195
+ /** 80% of #001D32 */
196
+ grayscale8: string;
197
+ /** 90% of #001D32 */
198
+ grayscale9: string;
199
+ /** #001D32 */
200
+ grayscale10: string;
201
+ /** 5% of #FFFFFF */
202
+ contrast0: string;
203
+ /** 10% of #FFFFFF */
204
+ contrast1: string;
205
+ /** 20% of #FFFFFF */
206
+ contrast2: string;
207
+ /** 30% of #FFFFFF */
208
+ contrast3: string;
209
+ /** 40% of #FFFFFF */
210
+ contrast4: string;
211
+ /** 50% of #FFFFFF */
212
+ contrast5: string;
213
+ /** 60% of #FFFFFF */
214
+ contrast6: string;
215
+ /** 70% of #FFFFFF */
216
+ contrast7: string;
217
+ /** 80% of #FFFFFF */
218
+ contrast8: string;
219
+ /** 90% of #FFFFFF */
220
+ contrast9: string;
221
+ /** #FFFFFF */
222
+ contrast10: string;
223
+ }
224
+ export type ColorNames = keyof typeof colors;
@@ -1,59 +1,58 @@
1
1
  import { transparentize } from "polished";
2
- const brand = '#40E0D0';
3
- const brandDark = '#FF00A8';
4
- const error = '#FF3366';
5
- const warning = '#FFD23F';
6
- const alertColor = '#FFFF66';
7
- const success = '#0ECD9D';
8
- const grayVal = '#2B003E';
9
- const white = '#FFFDF2';
2
+ const brand = '#0074F4';
3
+ const error = '#FF6068';
4
+ const warning = '#FF9900';
5
+ const alertColor = '#F0BB00';
6
+ const success = '#00E284';
7
+ const grayVal = '#121212';
8
+ const white = '#FFFFFF';
10
9
  const colors = {
11
10
  logo1: brand,
12
- logo2: brandDark,
13
- logo3: '#8A2BE2',
11
+ logo2: '#00A9E2',
12
+ logo3: '#67C728',
14
13
  brand,
15
- brandShade1: '#E00096',
16
- brandShade2: '#C00084',
17
- brandDark,
18
- brandDarkShade1: '#36C7B8',
14
+ brandShade1: '#0068DC',
15
+ brandShade2: '#005DC3',
16
+ brandDark: '#4C9EF7',
17
+ brandDarkShade1: '#5EA8F8',
19
18
  brandTint0: transparentize(0.95, brand),
20
19
  brandTint1: transparentize(0.9, brand),
21
20
  brandTint2: transparentize(0.8, brand),
22
21
  brandTint3: transparentize(0.7, brand),
23
22
  brandTint4: transparentize(0.6, brand),
24
- brandBackground0: '#2C073B',
25
- brandBackground1: '#360948',
26
- brandBackground2: '#400A55',
27
- brandBackground3: '#4A0C62',
28
- brandBackground4: '#540D6E',
29
- brandBackground5: '#6F3386',
23
+ brandBackground0: '#121212',
24
+ brandBackground1: '#1e1e1e',
25
+ brandBackground2: '#292929',
26
+ brandBackground3: '#3a3a3a',
27
+ brandBackground4: '#4b4b4b',
28
+ brandBackground5: '#5c5c5c',
30
29
  error,
31
- errorShade1: '#E02E5C',
32
- errorShade2: '#C92852',
30
+ errorShade1: '#E6565E',
31
+ errorShade2: '#CC4D53',
33
32
  errorTint0: transparentize(0.95, error),
34
33
  errorTint1: transparentize(0.9, error),
35
34
  errorTint2: transparentize(0.8, error),
36
35
  errorTint3: transparentize(0.7, error),
37
36
  errorTint4: transparentize(0.6, error),
38
37
  warning,
39
- warningShade1: '#E6AF00',
40
- warningShade2: '#CC9B00',
38
+ warningShade1: '#E68A00',
39
+ warningShade2: '#CC7A00',
41
40
  warningTint0: transparentize(0.95, warning),
42
41
  warningTint1: transparentize(0.9, warning),
43
42
  warningTint2: transparentize(0.8, warning),
44
43
  warningTint3: transparentize(0.7, warning),
45
44
  warningTint4: transparentize(0.6, warning),
46
45
  alert: alertColor,
47
- alertShade1: '#E6E652',
48
- alertShade2: '#CCCC48',
46
+ alertShade1: '#E4B200',
47
+ alertShade2: '#C09600',
49
48
  alertTint0: transparentize(0.95, alertColor),
50
49
  alertTint1: transparentize(0.9, alertColor),
51
50
  alertTint2: transparentize(0.8, alertColor),
52
51
  alertTint3: transparentize(0.7, alertColor),
53
52
  alertTint4: transparentize(0.6, alertColor),
54
53
  success,
55
- successShade1: '#33E512',
56
- successShade2: '#2CCF10',
54
+ successShade1: '#00AF3B',
55
+ successShade2: '#009B35',
57
56
  successTint0: transparentize(0.95, success),
58
57
  successTint1: transparentize(0.9, success),
59
58
  successTint2: transparentize(0.8, success),
@@ -82,5 +81,5 @@ const colors = {
82
81
  contrast9: transparentize(0.1, white),
83
82
  contrast10: white
84
83
  };
85
- const eighties_colors = colors;
86
- export { eighties_colors as default };
84
+ const mono_colors = colors;
85
+ export { mono_colors as default };
@@ -446,7 +446,7 @@ const dark = {
446
446
  }
447
447
  },
448
448
  menu: {
449
- background: colors.brandBackground2
449
+ background: darkScale.background1
450
450
  },
451
451
  menuItem: {
452
452
  borderColor: colors.brand,
@@ -524,11 +524,11 @@ const dark = {
524
524
  toast: {
525
525
  color: darkScale.scale10,
526
526
  background: {
527
- default: '#24002E',
528
- info: '#002E3A',
529
- success: '#003A21',
530
- warning: '#2E2600',
531
- error: '#2E0011'
527
+ default: '#0D2433',
528
+ info: '#002A51',
529
+ success: '#003A2D',
530
+ warning: '#333220',
531
+ error: '#332635'
532
532
  },
533
533
  border: {
534
534
  default: darkScale.scale8,
@@ -445,7 +445,7 @@ const light = {
445
445
  }
446
446
  },
447
447
  menu: {
448
- background: white
448
+ background: lightScale.background1
449
449
  },
450
450
  menuItem: {
451
451
  borderColor: colors.brand,
@@ -523,11 +523,11 @@ const light = {
523
523
  toast: {
524
524
  color: lightScale.scale10,
525
525
  background: {
526
- default: '#FFE6F5',
527
- info: '#E0F9FF',
528
- success: '#E4FFE0',
529
- warning: '#FFF5CC',
530
- error: '#FFD6E0'
526
+ default: '#F2F3F4',
527
+ info: '#CCE3FD',
528
+ success: '#CCF3D9',
529
+ warning: '#FFEBCC',
530
+ error: '#FFDFE1'
531
531
  },
532
532
  border: {
533
533
  default: lightScale.scale8,
@@ -24,12 +24,12 @@ const lightScale = {
24
24
  scale10,
25
25
  accent: colors.brand,
26
26
  accentShade: colors.brandShade1,
27
- background0: '#FFFDF2',
28
- background1: '#F0EEE3',
29
- background2: '#E1E5DC',
30
- background3: '#D2D8CF',
31
- background4: '#C3CBC2',
32
- background5: '#B4BEB5'
27
+ background0: '#FFFFFF',
28
+ background1: '#F2F3F4',
29
+ background2: '#E6E9EB',
30
+ background3: '#CCD2D6',
31
+ background4: '#B3BCC2',
32
+ background5: '#99A5AD'
33
33
  };
34
34
  const light_lightScale = lightScale;
35
35
  export { light_lightScale as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.2.8",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -1,76 +0,0 @@
1
- declare const colors: {
2
- logo1: string;
3
- logo2: string;
4
- logo3: string;
5
- brand: string;
6
- brandShade1: string;
7
- brandShade2: string;
8
- brandDark: string;
9
- brandDarkShade1: string;
10
- brandTint0: string;
11
- brandTint1: string;
12
- brandTint2: string;
13
- brandTint3: string;
14
- brandTint4: string;
15
- brandBackground0: string;
16
- brandBackground1: string;
17
- brandBackground2: string;
18
- brandBackground3: string;
19
- brandBackground4: string;
20
- brandBackground5: string;
21
- error: string;
22
- errorShade1: string;
23
- errorShade2: string;
24
- errorTint0: string;
25
- errorTint1: string;
26
- errorTint2: string;
27
- errorTint3: string;
28
- errorTint4: string;
29
- warning: string;
30
- warningShade1: string;
31
- warningShade2: string;
32
- warningTint0: string;
33
- warningTint1: string;
34
- warningTint2: string;
35
- warningTint3: string;
36
- warningTint4: string;
37
- alert: string;
38
- alertShade1: string;
39
- alertShade2: string;
40
- alertTint0: string;
41
- alertTint1: string;
42
- alertTint2: string;
43
- alertTint3: string;
44
- alertTint4: string;
45
- success: string;
46
- successShade1: string;
47
- successShade2: string;
48
- successTint0: string;
49
- successTint1: string;
50
- successTint2: string;
51
- successTint3: string;
52
- successTint4: string;
53
- grayscale0: string;
54
- grayscale1: string;
55
- grayscale2: string;
56
- grayscale3: string;
57
- grayscale4: string;
58
- grayscale5: string;
59
- grayscale6: string;
60
- grayscale7: string;
61
- grayscale8: string;
62
- grayscale9: string;
63
- grayscale10: string;
64
- contrast0: string;
65
- contrast1: string;
66
- contrast2: string;
67
- contrast3: string;
68
- contrast4: string;
69
- contrast5: string;
70
- contrast6: string;
71
- contrast7: string;
72
- contrast8: string;
73
- contrast9: string;
74
- contrast10: string;
75
- };
76
- export default colors;
File without changes
File without changes