design-zystem 1.0.283 → 1.0.285

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/index.d.mts CHANGED
@@ -34,6 +34,8 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
34
34
  border?: string;
35
35
  /** Colored left accent bar (status/score encoding), painted over the box border. */
36
36
  borderColor?: string;
37
+ /** Colored halo around the box, for transient states (unsaved, selected, in error). */
38
+ shadowColor?: string;
37
39
  style?: CSSProperties;
38
40
  }
39
41
  declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
@@ -250,6 +252,8 @@ interface BubbleProps {
250
252
  borderRadius?: string;
251
253
  boxShadow?: string;
252
254
  width?: string;
255
+ /** Looping pulse to draw the eye to a critical bubble. Ring colour follows `backgroundColor`, content is centred on the cross axis, and the animation is dropped under `prefers-reduced-motion`. Spacing between children stays the caller's job. */
256
+ pulse?: boolean;
253
257
  style?: CSSProperties;
254
258
  onClick?: () => void;
255
259
  }
package/dist/index.d.ts CHANGED
@@ -34,6 +34,8 @@ interface BoxProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {
34
34
  border?: string;
35
35
  /** Colored left accent bar (status/score encoding), painted over the box border. */
36
36
  borderColor?: string;
37
+ /** Colored halo around the box, for transient states (unsaved, selected, in error). */
38
+ shadowColor?: string;
37
39
  style?: CSSProperties;
38
40
  }
39
41
  declare const Box: ({ children, hasShadow, ...rest }: BoxProps) => react_jsx_runtime.JSX.Element;
@@ -250,6 +252,8 @@ interface BubbleProps {
250
252
  borderRadius?: string;
251
253
  boxShadow?: string;
252
254
  width?: string;
255
+ /** Looping pulse to draw the eye to a critical bubble. Ring colour follows `backgroundColor`, content is centred on the cross axis, and the animation is dropped under `prefers-reduced-motion`. Spacing between children stays the caller's job. */
256
+ pulse?: boolean;
253
257
  style?: CSSProperties;
254
258
  onClick?: () => void;
255
259
  }
package/dist/index.js CHANGED
@@ -375,6 +375,7 @@ var shouldForwardProp2 = (prop) => ![
375
375
  "borderRadius",
376
376
  "border",
377
377
  "borderColor",
378
+ "shadowColor",
378
379
  "height"
379
380
  ].includes(prop);
380
381
  var StyledBox = import_styled_components2.default.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
@@ -388,7 +389,12 @@ var StyledBox = import_styled_components2.default.div.withConfig({ shouldForward
388
389
 
389
390
  border-radius: ${(props) => props.borderRadius || "8px"};
390
391
 
391
- box-shadow: ${(props) => props.hasShadow === false ? "none" : "0 2px 15px 0 rgba(198, 198, 198, 0.25)"};
392
+ box-shadow: ${(props) => {
393
+ const base = props.hasShadow === false ? "" : "0 2px 15px 0 rgba(198, 198, 198, 0.25)";
394
+ if (!props.shadowColor) return base || "none";
395
+ const halo = `0 0 0 4px ${colors[props.shadowColor] || props.shadowColor}`;
396
+ return base ? `${halo}, ${base}` : halo;
397
+ }};
392
398
 
393
399
  width: ${(props) => props.fullWidth ? "100%" : "auto"};
394
400
  min-width: ${(props) => props.fullWidth ? "100%" : "auto"};
@@ -1228,6 +1234,21 @@ var paddingSizes = {
1228
1234
  xl: "10px 20px",
1229
1235
  xxl: "10px 20px"
1230
1236
  };
1237
+ var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
1238
+ var pulseAnimation = import_styled_components11.keyframes`
1239
+ 0% {
1240
+ transform: scale(1);
1241
+ box-shadow: 0 0 0 0 var(--bubble-pulse-color);
1242
+ }
1243
+ 70% {
1244
+ transform: scale(1.06);
1245
+ box-shadow: 0 0 0 6px transparent;
1246
+ }
1247
+ 100% {
1248
+ transform: scale(1);
1249
+ box-shadow: 0 0 0 0 transparent;
1250
+ }
1251
+ `;
1231
1252
  var shouldForwardProp6 = (prop) => ![
1232
1253
  "color",
1233
1254
  "backgroundColor",
@@ -1237,13 +1258,14 @@ var shouldForwardProp6 = (prop) => ![
1237
1258
  "maxChars",
1238
1259
  "borderRadius",
1239
1260
  "boxShadow",
1240
- "width"
1261
+ "width",
1262
+ "pulse"
1241
1263
  ].includes(prop);
1242
1264
  var StyledBubble = import_styled_components11.default.span.withConfig({
1243
1265
  shouldForwardProp: shouldForwardProp6
1244
1266
  })`
1245
- color: ${(props) => colors[props.color] || props.color || "inherit"};
1246
- background: ${(props) => colors[props.backgroundColor] || props.backgroundColor || "transparent"};
1267
+ color: ${(props) => resolveColor2(props.color, "inherit")};
1268
+ background: ${(props) => resolveColor2(props.backgroundColor)};
1247
1269
  font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
1248
1270
  border-radius: ${(props) => props.borderRadius || "20px"};
1249
1271
  box-shadow: ${(props) => props.boxShadow || "none"};
@@ -1255,6 +1277,19 @@ var StyledBubble = import_styled_components11.default.span.withConfig({
1255
1277
  text-overflow: ellipsis;
1256
1278
  max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
1257
1279
  white-space: nowrap;
1280
+ ${(props) => props.pulse && import_styled_components11.css`
1281
+ --bubble-pulse-color: ${resolveColor2(
1282
+ props.backgroundColor,
1283
+ colors.grey_600
1284
+ )};
1285
+ display: inline-flex;
1286
+ align-items: center;
1287
+ animation: ${pulseAnimation} 2s ease-in-out infinite;
1288
+
1289
+ @media (prefers-reduced-motion: reduce) {
1290
+ animation: none;
1291
+ }
1292
+ `}
1258
1293
  `;
1259
1294
  var Bubble = (_a) => {
1260
1295
  var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
@@ -2145,7 +2180,7 @@ var Initials = import_styled_components18.default.span`
2145
2180
  line-height: 1;
2146
2181
  user-select: none;
2147
2182
  `;
2148
- var resolveColor2 = (token, fallback) => {
2183
+ var resolveColor3 = (token, fallback) => {
2149
2184
  if (!token) return fallback;
2150
2185
  return colors[token] || token;
2151
2186
  };
@@ -2161,8 +2196,8 @@ var Avatar = ({
2161
2196
  }) => {
2162
2197
  var _a, _b, _c;
2163
2198
  const [hasImageError, setHasImageError] = (0, import_react10.useState)(false);
2164
- const resolvedBackground = resolveColor2(backgroundColor, colors.grey_300);
2165
- const resolvedText = resolveColor2(textColor, colors.dark);
2199
+ const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
2200
+ const resolvedText = resolveColor3(textColor, colors.dark);
2166
2201
  const initials = getInitials(name);
2167
2202
  const sizePx = `${size}px`;
2168
2203
  const borderRadius = shape === "circle" ? "50%" : "4px";
package/dist/index.mjs CHANGED
@@ -236,6 +236,7 @@ var shouldForwardProp2 = (prop) => ![
236
236
  "borderRadius",
237
237
  "border",
238
238
  "borderColor",
239
+ "shadowColor",
239
240
  "height"
240
241
  ].includes(prop);
241
242
  var StyledBox = styled2.div.withConfig({ shouldForwardProp: shouldForwardProp2 })`
@@ -249,7 +250,12 @@ var StyledBox = styled2.div.withConfig({ shouldForwardProp: shouldForwardProp2 }
249
250
 
250
251
  border-radius: ${(props) => props.borderRadius || "8px"};
251
252
 
252
- box-shadow: ${(props) => props.hasShadow === false ? "none" : "0 2px 15px 0 rgba(198, 198, 198, 0.25)"};
253
+ box-shadow: ${(props) => {
254
+ const base = props.hasShadow === false ? "" : "0 2px 15px 0 rgba(198, 198, 198, 0.25)";
255
+ if (!props.shadowColor) return base || "none";
256
+ const halo = `0 0 0 4px ${colors[props.shadowColor] || props.shadowColor}`;
257
+ return base ? `${halo}, ${base}` : halo;
258
+ }};
253
259
 
254
260
  width: ${(props) => props.fullWidth ? "100%" : "auto"};
255
261
  min-width: ${(props) => props.fullWidth ? "100%" : "auto"};
@@ -1069,7 +1075,7 @@ var ModalConfirmation = (props) => {
1069
1075
  import { useEffect as useEffect3, useRef as useRef3, useState as useState2 } from "react";
1070
1076
 
1071
1077
  // src/Components/Bubble/Bubble.tsx
1072
- import styled11 from "styled-components";
1078
+ import styled11, { css, keyframes } from "styled-components";
1073
1079
  import { jsx as jsx14 } from "react/jsx-runtime";
1074
1080
  var textSizes3 = {
1075
1081
  xxs: ".4em",
@@ -1089,6 +1095,21 @@ var paddingSizes = {
1089
1095
  xl: "10px 20px",
1090
1096
  xxl: "10px 20px"
1091
1097
  };
1098
+ var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
1099
+ var pulseAnimation = keyframes`
1100
+ 0% {
1101
+ transform: scale(1);
1102
+ box-shadow: 0 0 0 0 var(--bubble-pulse-color);
1103
+ }
1104
+ 70% {
1105
+ transform: scale(1.06);
1106
+ box-shadow: 0 0 0 6px transparent;
1107
+ }
1108
+ 100% {
1109
+ transform: scale(1);
1110
+ box-shadow: 0 0 0 0 transparent;
1111
+ }
1112
+ `;
1092
1113
  var shouldForwardProp6 = (prop) => ![
1093
1114
  "color",
1094
1115
  "backgroundColor",
@@ -1098,13 +1119,14 @@ var shouldForwardProp6 = (prop) => ![
1098
1119
  "maxChars",
1099
1120
  "borderRadius",
1100
1121
  "boxShadow",
1101
- "width"
1122
+ "width",
1123
+ "pulse"
1102
1124
  ].includes(prop);
1103
1125
  var StyledBubble = styled11.span.withConfig({
1104
1126
  shouldForwardProp: shouldForwardProp6
1105
1127
  })`
1106
- color: ${(props) => colors[props.color] || props.color || "inherit"};
1107
- background: ${(props) => colors[props.backgroundColor] || props.backgroundColor || "transparent"};
1128
+ color: ${(props) => resolveColor2(props.color, "inherit")};
1129
+ background: ${(props) => resolveColor2(props.backgroundColor)};
1108
1130
  font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
1109
1131
  border-radius: ${(props) => props.borderRadius || "20px"};
1110
1132
  box-shadow: ${(props) => props.boxShadow || "none"};
@@ -1116,6 +1138,19 @@ var StyledBubble = styled11.span.withConfig({
1116
1138
  text-overflow: ellipsis;
1117
1139
  max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
1118
1140
  white-space: nowrap;
1141
+ ${(props) => props.pulse && css`
1142
+ --bubble-pulse-color: ${resolveColor2(
1143
+ props.backgroundColor,
1144
+ colors.grey_600
1145
+ )};
1146
+ display: inline-flex;
1147
+ align-items: center;
1148
+ animation: ${pulseAnimation} 2s ease-in-out infinite;
1149
+
1150
+ @media (prefers-reduced-motion: reduce) {
1151
+ animation: none;
1152
+ }
1153
+ `}
1119
1154
  `;
1120
1155
  var Bubble = (_a) => {
1121
1156
  var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
@@ -1508,7 +1543,7 @@ import styled14 from "styled-components";
1508
1543
 
1509
1544
  // src/Components/Toast/ToastCard.tsx
1510
1545
  import { useCallback as useCallback2, useEffect as useEffect5, useState as useState4 } from "react";
1511
- import styled13, { keyframes } from "styled-components";
1546
+ import styled13, { keyframes as keyframes2 } from "styled-components";
1512
1547
 
1513
1548
  // src/Components/Toast/toastStore.ts
1514
1549
  var DEFAULT_TIMEOUT_BY_TYPE = {
@@ -1615,15 +1650,15 @@ var TOAST = {
1615
1650
  background: colors.blue_50
1616
1651
  }
1617
1652
  };
1618
- var slideIn = keyframes`
1653
+ var slideIn = keyframes2`
1619
1654
  from { transform: translateX(16px); opacity: 0; }
1620
1655
  to { transform: translateX(0); opacity: 1; }
1621
1656
  `;
1622
- var slideOut = keyframes`
1657
+ var slideOut = keyframes2`
1623
1658
  from { transform: translateX(0); opacity: 1; }
1624
1659
  to { transform: translateX(16px); opacity: 0; }
1625
1660
  `;
1626
- var shrink = keyframes`
1661
+ var shrink = keyframes2`
1627
1662
  from { transform: scaleX(1); }
1628
1663
  to { transform: scaleX(0); }
1629
1664
  `;
@@ -2006,7 +2041,7 @@ var Initials = styled18.span`
2006
2041
  line-height: 1;
2007
2042
  user-select: none;
2008
2043
  `;
2009
- var resolveColor2 = (token, fallback) => {
2044
+ var resolveColor3 = (token, fallback) => {
2010
2045
  if (!token) return fallback;
2011
2046
  return colors[token] || token;
2012
2047
  };
@@ -2022,8 +2057,8 @@ var Avatar = ({
2022
2057
  }) => {
2023
2058
  var _a, _b, _c;
2024
2059
  const [hasImageError, setHasImageError] = useState5(false);
2025
- const resolvedBackground = resolveColor2(backgroundColor, colors.grey_300);
2026
- const resolvedText = resolveColor2(textColor, colors.dark);
2060
+ const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
2061
+ const resolvedText = resolveColor3(textColor, colors.dark);
2027
2062
  const initials = getInitials(name);
2028
2063
  const sizePx = `${size}px`;
2029
2064
  const borderRadius = shape === "circle" ? "50%" : "4px";
@@ -3738,7 +3773,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs18(Fragment4, { child
3738
3773
 
3739
3774
  // src/Components/Switch/Switch.tsx
3740
3775
  import { forwardRef as forwardRef8 } from "react";
3741
- import styled38, { css } from "styled-components";
3776
+ import styled38, { css as css2 } from "styled-components";
3742
3777
  import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
3743
3778
  var BASE = {
3744
3779
  s: { w: 36, h: 20, knob: 16, pad: 2 },
@@ -3777,7 +3812,7 @@ var Track = styled38.span`
3777
3812
 
3778
3813
  ${(p) => {
3779
3814
  const s = SIZES2[p.$size || "m"] || SIZES2.m;
3780
- return css`
3815
+ return css2`
3781
3816
  width: ${s.w}px;
3782
3817
  height: ${s.h}px;
3783
3818
  padding: ${s.pad}px;
@@ -3807,7 +3842,7 @@ var Knob = styled38.span`
3807
3842
  ${(p) => {
3808
3843
  const s = SIZES2[p.$size || "m"] || SIZES2.m;
3809
3844
  const left = p.$checked ? s.w - s.pad - s.knob : s.pad;
3810
- return css`
3845
+ return css2`
3811
3846
  width: ${s.knob}px;
3812
3847
  height: ${s.knob}px;
3813
3848
  left: ${left}px;
@@ -4752,7 +4787,7 @@ var DatePicker = (props) => {
4752
4787
 
4753
4788
  // src/Components/IconTabs/IconTabs.tsx
4754
4789
  import { useState as useState15, useEffect as useEffect13, useRef as useRef11 } from "react";
4755
- import styled42, { css as css2 } from "styled-components";
4790
+ import styled42, { css as css3 } from "styled-components";
4756
4791
  import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
4757
4792
  var TabsContainer = styled42.div`
4758
4793
  display: flex;
@@ -4784,10 +4819,10 @@ var Tab2 = styled42.div`
4784
4819
  display: flex;
4785
4820
  align-items: center;
4786
4821
  justify-content: center;
4787
- ${({ selected }) => selected && css2`
4822
+ ${({ selected }) => selected && css3`
4788
4823
  color: #fff;
4789
4824
  `}
4790
- ${({ disabled }) => disabled && css2`
4825
+ ${({ disabled }) => disabled && css3`
4791
4826
  opacity: 0.5;
4792
4827
  pointer-events: none;
4793
4828
  cursor: not-allowed;
@@ -5100,7 +5135,7 @@ var Card2 = ({
5100
5135
  );
5101
5136
 
5102
5137
  // src/Components/Banner/Banner.tsx
5103
- import styled45, { css as css3, keyframes as keyframes2 } from "styled-components";
5138
+ import styled45, { css as css4, keyframes as keyframes3 } from "styled-components";
5104
5139
  import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
5105
5140
  var PRESET_STYLES = {
5106
5141
  blue: {
@@ -5142,11 +5177,11 @@ var resolveStyle = (variant, filled) => {
5142
5177
  accent: variant
5143
5178
  };
5144
5179
  };
5145
- var shimmerSweep = keyframes2`
5180
+ var shimmerSweep = keyframes3`
5146
5181
  0% { transform: translateX(-120%) rotate(20deg); }
5147
5182
  30%, 100% { transform: translateX(220%) rotate(20deg); }
5148
5183
  `;
5149
- var shimmerStyle = css3`
5184
+ var shimmerStyle = css4`
5150
5185
  position: relative;
5151
5186
  overflow: hidden;
5152
5187
 
@@ -5764,14 +5799,14 @@ var FileUploadZone = ({
5764
5799
  };
5765
5800
 
5766
5801
  // src/Components/Spinner/Spinner.tsx
5767
- import styled48, { keyframes as keyframes3 } from "styled-components";
5802
+ import styled48, { keyframes as keyframes4 } from "styled-components";
5768
5803
  import { jsx as jsx58 } from "react/jsx-runtime";
5769
5804
  var SIZES3 = {
5770
5805
  s: 20,
5771
5806
  m: 32,
5772
5807
  l: 48
5773
5808
  };
5774
- var spin = keyframes3`
5809
+ var spin = keyframes4`
5775
5810
  0% { transform: rotate(0deg); }
5776
5811
  100% { transform: rotate(360deg); }
5777
5812
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.283",
3
+ "version": "1.0.285",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",