design-zystem 1.0.283 → 1.0.284

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
@@ -250,6 +250,8 @@ interface BubbleProps {
250
250
  borderRadius?: string;
251
251
  boxShadow?: string;
252
252
  width?: string;
253
+ /** 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. */
254
+ pulse?: boolean;
253
255
  style?: CSSProperties;
254
256
  onClick?: () => void;
255
257
  }
package/dist/index.d.ts CHANGED
@@ -250,6 +250,8 @@ interface BubbleProps {
250
250
  borderRadius?: string;
251
251
  boxShadow?: string;
252
252
  width?: string;
253
+ /** 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. */
254
+ pulse?: boolean;
253
255
  style?: CSSProperties;
254
256
  onClick?: () => void;
255
257
  }
package/dist/index.js CHANGED
@@ -1228,6 +1228,21 @@ var paddingSizes = {
1228
1228
  xl: "10px 20px",
1229
1229
  xxl: "10px 20px"
1230
1230
  };
1231
+ var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
1232
+ var pulseAnimation = import_styled_components11.keyframes`
1233
+ 0% {
1234
+ transform: scale(1);
1235
+ box-shadow: 0 0 0 0 var(--bubble-pulse-color);
1236
+ }
1237
+ 70% {
1238
+ transform: scale(1.06);
1239
+ box-shadow: 0 0 0 6px transparent;
1240
+ }
1241
+ 100% {
1242
+ transform: scale(1);
1243
+ box-shadow: 0 0 0 0 transparent;
1244
+ }
1245
+ `;
1231
1246
  var shouldForwardProp6 = (prop) => ![
1232
1247
  "color",
1233
1248
  "backgroundColor",
@@ -1237,13 +1252,14 @@ var shouldForwardProp6 = (prop) => ![
1237
1252
  "maxChars",
1238
1253
  "borderRadius",
1239
1254
  "boxShadow",
1240
- "width"
1255
+ "width",
1256
+ "pulse"
1241
1257
  ].includes(prop);
1242
1258
  var StyledBubble = import_styled_components11.default.span.withConfig({
1243
1259
  shouldForwardProp: shouldForwardProp6
1244
1260
  })`
1245
- color: ${(props) => colors[props.color] || props.color || "inherit"};
1246
- background: ${(props) => colors[props.backgroundColor] || props.backgroundColor || "transparent"};
1261
+ color: ${(props) => resolveColor2(props.color, "inherit")};
1262
+ background: ${(props) => resolveColor2(props.backgroundColor)};
1247
1263
  font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
1248
1264
  border-radius: ${(props) => props.borderRadius || "20px"};
1249
1265
  box-shadow: ${(props) => props.boxShadow || "none"};
@@ -1255,6 +1271,19 @@ var StyledBubble = import_styled_components11.default.span.withConfig({
1255
1271
  text-overflow: ellipsis;
1256
1272
  max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
1257
1273
  white-space: nowrap;
1274
+ ${(props) => props.pulse && import_styled_components11.css`
1275
+ --bubble-pulse-color: ${resolveColor2(
1276
+ props.backgroundColor,
1277
+ colors.grey_600
1278
+ )};
1279
+ display: inline-flex;
1280
+ align-items: center;
1281
+ animation: ${pulseAnimation} 2s ease-in-out infinite;
1282
+
1283
+ @media (prefers-reduced-motion: reduce) {
1284
+ animation: none;
1285
+ }
1286
+ `}
1258
1287
  `;
1259
1288
  var Bubble = (_a) => {
1260
1289
  var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
@@ -2145,7 +2174,7 @@ var Initials = import_styled_components18.default.span`
2145
2174
  line-height: 1;
2146
2175
  user-select: none;
2147
2176
  `;
2148
- var resolveColor2 = (token, fallback) => {
2177
+ var resolveColor3 = (token, fallback) => {
2149
2178
  if (!token) return fallback;
2150
2179
  return colors[token] || token;
2151
2180
  };
@@ -2161,8 +2190,8 @@ var Avatar = ({
2161
2190
  }) => {
2162
2191
  var _a, _b, _c;
2163
2192
  const [hasImageError, setHasImageError] = (0, import_react10.useState)(false);
2164
- const resolvedBackground = resolveColor2(backgroundColor, colors.grey_300);
2165
- const resolvedText = resolveColor2(textColor, colors.dark);
2193
+ const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
2194
+ const resolvedText = resolveColor3(textColor, colors.dark);
2166
2195
  const initials = getInitials(name);
2167
2196
  const sizePx = `${size}px`;
2168
2197
  const borderRadius = shape === "circle" ? "50%" : "4px";
package/dist/index.mjs CHANGED
@@ -1069,7 +1069,7 @@ var ModalConfirmation = (props) => {
1069
1069
  import { useEffect as useEffect3, useRef as useRef3, useState as useState2 } from "react";
1070
1070
 
1071
1071
  // src/Components/Bubble/Bubble.tsx
1072
- import styled11 from "styled-components";
1072
+ import styled11, { css, keyframes } from "styled-components";
1073
1073
  import { jsx as jsx14 } from "react/jsx-runtime";
1074
1074
  var textSizes3 = {
1075
1075
  xxs: ".4em",
@@ -1089,6 +1089,21 @@ var paddingSizes = {
1089
1089
  xl: "10px 20px",
1090
1090
  xxl: "10px 20px"
1091
1091
  };
1092
+ var resolveColor2 = (value, fallback = "transparent") => colors[value] || value || fallback;
1093
+ var pulseAnimation = keyframes`
1094
+ 0% {
1095
+ transform: scale(1);
1096
+ box-shadow: 0 0 0 0 var(--bubble-pulse-color);
1097
+ }
1098
+ 70% {
1099
+ transform: scale(1.06);
1100
+ box-shadow: 0 0 0 6px transparent;
1101
+ }
1102
+ 100% {
1103
+ transform: scale(1);
1104
+ box-shadow: 0 0 0 0 transparent;
1105
+ }
1106
+ `;
1092
1107
  var shouldForwardProp6 = (prop) => ![
1093
1108
  "color",
1094
1109
  "backgroundColor",
@@ -1098,13 +1113,14 @@ var shouldForwardProp6 = (prop) => ![
1098
1113
  "maxChars",
1099
1114
  "borderRadius",
1100
1115
  "boxShadow",
1101
- "width"
1116
+ "width",
1117
+ "pulse"
1102
1118
  ].includes(prop);
1103
1119
  var StyledBubble = styled11.span.withConfig({
1104
1120
  shouldForwardProp: shouldForwardProp6
1105
1121
  })`
1106
- color: ${(props) => colors[props.color] || props.color || "inherit"};
1107
- background: ${(props) => colors[props.backgroundColor] || props.backgroundColor || "transparent"};
1122
+ color: ${(props) => resolveColor2(props.color, "inherit")};
1123
+ background: ${(props) => resolveColor2(props.backgroundColor)};
1108
1124
  font-size: ${(props) => textSizes3[props.size] || props.size || "1em"};
1109
1125
  border-radius: ${(props) => props.borderRadius || "20px"};
1110
1126
  box-shadow: ${(props) => props.boxShadow || "none"};
@@ -1116,6 +1132,19 @@ var StyledBubble = styled11.span.withConfig({
1116
1132
  text-overflow: ellipsis;
1117
1133
  max-width: ${(props) => props.maxChars ? `${props.maxChars}ch` : "none"};
1118
1134
  white-space: nowrap;
1135
+ ${(props) => props.pulse && css`
1136
+ --bubble-pulse-color: ${resolveColor2(
1137
+ props.backgroundColor,
1138
+ colors.grey_600
1139
+ )};
1140
+ display: inline-flex;
1141
+ align-items: center;
1142
+ animation: ${pulseAnimation} 2s ease-in-out infinite;
1143
+
1144
+ @media (prefers-reduced-motion: reduce) {
1145
+ animation: none;
1146
+ }
1147
+ `}
1119
1148
  `;
1120
1149
  var Bubble = (_a) => {
1121
1150
  var _b = _a, { children } = _b, otherProps = __objRest(_b, ["children"]);
@@ -1508,7 +1537,7 @@ import styled14 from "styled-components";
1508
1537
 
1509
1538
  // src/Components/Toast/ToastCard.tsx
1510
1539
  import { useCallback as useCallback2, useEffect as useEffect5, useState as useState4 } from "react";
1511
- import styled13, { keyframes } from "styled-components";
1540
+ import styled13, { keyframes as keyframes2 } from "styled-components";
1512
1541
 
1513
1542
  // src/Components/Toast/toastStore.ts
1514
1543
  var DEFAULT_TIMEOUT_BY_TYPE = {
@@ -1615,15 +1644,15 @@ var TOAST = {
1615
1644
  background: colors.blue_50
1616
1645
  }
1617
1646
  };
1618
- var slideIn = keyframes`
1647
+ var slideIn = keyframes2`
1619
1648
  from { transform: translateX(16px); opacity: 0; }
1620
1649
  to { transform: translateX(0); opacity: 1; }
1621
1650
  `;
1622
- var slideOut = keyframes`
1651
+ var slideOut = keyframes2`
1623
1652
  from { transform: translateX(0); opacity: 1; }
1624
1653
  to { transform: translateX(16px); opacity: 0; }
1625
1654
  `;
1626
- var shrink = keyframes`
1655
+ var shrink = keyframes2`
1627
1656
  from { transform: scaleX(1); }
1628
1657
  to { transform: scaleX(0); }
1629
1658
  `;
@@ -2006,7 +2035,7 @@ var Initials = styled18.span`
2006
2035
  line-height: 1;
2007
2036
  user-select: none;
2008
2037
  `;
2009
- var resolveColor2 = (token, fallback) => {
2038
+ var resolveColor3 = (token, fallback) => {
2010
2039
  if (!token) return fallback;
2011
2040
  return colors[token] || token;
2012
2041
  };
@@ -2022,8 +2051,8 @@ var Avatar = ({
2022
2051
  }) => {
2023
2052
  var _a, _b, _c;
2024
2053
  const [hasImageError, setHasImageError] = useState5(false);
2025
- const resolvedBackground = resolveColor2(backgroundColor, colors.grey_300);
2026
- const resolvedText = resolveColor2(textColor, colors.dark);
2054
+ const resolvedBackground = resolveColor3(backgroundColor, colors.grey_300);
2055
+ const resolvedText = resolveColor3(textColor, colors.dark);
2027
2056
  const initials = getInitials(name);
2028
2057
  const sizePx = `${size}px`;
2029
2058
  const borderRadius = shape === "circle" ? "50%" : "4px";
@@ -3738,7 +3767,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ jsxs18(Fragment4, { child
3738
3767
 
3739
3768
  // src/Components/Switch/Switch.tsx
3740
3769
  import { forwardRef as forwardRef8 } from "react";
3741
- import styled38, { css } from "styled-components";
3770
+ import styled38, { css as css2 } from "styled-components";
3742
3771
  import { jsx as jsx43, jsxs as jsxs19 } from "react/jsx-runtime";
3743
3772
  var BASE = {
3744
3773
  s: { w: 36, h: 20, knob: 16, pad: 2 },
@@ -3777,7 +3806,7 @@ var Track = styled38.span`
3777
3806
 
3778
3807
  ${(p) => {
3779
3808
  const s = SIZES2[p.$size || "m"] || SIZES2.m;
3780
- return css`
3809
+ return css2`
3781
3810
  width: ${s.w}px;
3782
3811
  height: ${s.h}px;
3783
3812
  padding: ${s.pad}px;
@@ -3807,7 +3836,7 @@ var Knob = styled38.span`
3807
3836
  ${(p) => {
3808
3837
  const s = SIZES2[p.$size || "m"] || SIZES2.m;
3809
3838
  const left = p.$checked ? s.w - s.pad - s.knob : s.pad;
3810
- return css`
3839
+ return css2`
3811
3840
  width: ${s.knob}px;
3812
3841
  height: ${s.knob}px;
3813
3842
  left: ${left}px;
@@ -4752,7 +4781,7 @@ var DatePicker = (props) => {
4752
4781
 
4753
4782
  // src/Components/IconTabs/IconTabs.tsx
4754
4783
  import { useState as useState15, useEffect as useEffect13, useRef as useRef11 } from "react";
4755
- import styled42, { css as css2 } from "styled-components";
4784
+ import styled42, { css as css3 } from "styled-components";
4756
4785
  import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
4757
4786
  var TabsContainer = styled42.div`
4758
4787
  display: flex;
@@ -4784,10 +4813,10 @@ var Tab2 = styled42.div`
4784
4813
  display: flex;
4785
4814
  align-items: center;
4786
4815
  justify-content: center;
4787
- ${({ selected }) => selected && css2`
4816
+ ${({ selected }) => selected && css3`
4788
4817
  color: #fff;
4789
4818
  `}
4790
- ${({ disabled }) => disabled && css2`
4819
+ ${({ disabled }) => disabled && css3`
4791
4820
  opacity: 0.5;
4792
4821
  pointer-events: none;
4793
4822
  cursor: not-allowed;
@@ -5100,7 +5129,7 @@ var Card2 = ({
5100
5129
  );
5101
5130
 
5102
5131
  // src/Components/Banner/Banner.tsx
5103
- import styled45, { css as css3, keyframes as keyframes2 } from "styled-components";
5132
+ import styled45, { css as css4, keyframes as keyframes3 } from "styled-components";
5104
5133
  import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs28 } from "react/jsx-runtime";
5105
5134
  var PRESET_STYLES = {
5106
5135
  blue: {
@@ -5142,11 +5171,11 @@ var resolveStyle = (variant, filled) => {
5142
5171
  accent: variant
5143
5172
  };
5144
5173
  };
5145
- var shimmerSweep = keyframes2`
5174
+ var shimmerSweep = keyframes3`
5146
5175
  0% { transform: translateX(-120%) rotate(20deg); }
5147
5176
  30%, 100% { transform: translateX(220%) rotate(20deg); }
5148
5177
  `;
5149
- var shimmerStyle = css3`
5178
+ var shimmerStyle = css4`
5150
5179
  position: relative;
5151
5180
  overflow: hidden;
5152
5181
 
@@ -5764,14 +5793,14 @@ var FileUploadZone = ({
5764
5793
  };
5765
5794
 
5766
5795
  // src/Components/Spinner/Spinner.tsx
5767
- import styled48, { keyframes as keyframes3 } from "styled-components";
5796
+ import styled48, { keyframes as keyframes4 } from "styled-components";
5768
5797
  import { jsx as jsx58 } from "react/jsx-runtime";
5769
5798
  var SIZES3 = {
5770
5799
  s: 20,
5771
5800
  m: 32,
5772
5801
  l: 48
5773
5802
  };
5774
- var spin = keyframes3`
5803
+ var spin = keyframes4`
5775
5804
  0% { transform: rotate(0deg); }
5776
5805
  100% { transform: rotate(360deg); }
5777
5806
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.283",
3
+ "version": "1.0.284",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",