design-zystem 1.0.291 → 1.0.293

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
@@ -866,8 +866,10 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
866
866
  showBaseline?: boolean;
867
867
  baselineColor?: string;
868
868
  children?: ReactNode;
869
+ size?: 'xs' | 'm';
870
+ activeColor?: string;
869
871
  }
870
- declare const Tabs: ({ value, onChange, items, variant, align, showBaseline, baselineColor, children, ...rest }: TabsProps) => react_jsx_runtime.JSX.Element;
872
+ declare const Tabs: ({ value, onChange, items, variant, align, showBaseline, baselineColor, children, size, activeColor, ...rest }: TabsProps) => react_jsx_runtime.JSX.Element;
871
873
 
872
874
  interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
873
875
  src?: string;
package/dist/index.d.ts CHANGED
@@ -866,8 +866,10 @@ interface TabsProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
866
866
  showBaseline?: boolean;
867
867
  baselineColor?: string;
868
868
  children?: ReactNode;
869
+ size?: 'xs' | 'm';
870
+ activeColor?: string;
869
871
  }
870
- declare const Tabs: ({ value, onChange, items, variant, align, showBaseline, baselineColor, children, ...rest }: TabsProps) => react_jsx_runtime.JSX.Element;
872
+ declare const Tabs: ({ value, onChange, items, variant, align, showBaseline, baselineColor, children, size, activeColor, ...rest }: TabsProps) => react_jsx_runtime.JSX.Element;
871
873
 
872
874
  interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
873
875
  src?: string;
package/dist/index.js CHANGED
@@ -3015,6 +3015,7 @@ var Input = (0, import_react12.forwardRef)((props, ref) => {
3015
3015
  Input.displayName = "Input";
3016
3016
 
3017
3017
  // src/Components/Checkbox/Checkbox.tsx
3018
+ var import_react13 = require("react");
3018
3019
  var import_styled_components21 = __toESM(require("styled-components"));
3019
3020
  var import_jsx_runtime25 = require("react/jsx-runtime");
3020
3021
  var CheckboxContainer = import_styled_components21.default.div`
@@ -3042,7 +3043,8 @@ var Checkbox = ({
3042
3043
  size = "m",
3043
3044
  variant = "blue_700"
3044
3045
  }) => {
3045
- const uniqueId = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
3046
+ const generatedId = (0, import_react13.useId)();
3047
+ const uniqueId = `checkbox-${generatedId}`;
3046
3048
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(CheckboxContainer, { children: [
3047
3049
  /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3048
3050
  StyledCheckbox,
@@ -3059,7 +3061,7 @@ var Checkbox = ({
3059
3061
  };
3060
3062
 
3061
3063
  // src/Components/Radio/Radio.tsx
3062
- var import_react13 = require("react");
3064
+ var import_react14 = require("react");
3063
3065
  var import_styled_components22 = __toESM(require("styled-components"));
3064
3066
  var import_jsx_runtime26 = require("react/jsx-runtime");
3065
3067
  var RadioContainer = import_styled_components22.default.div`
@@ -3116,7 +3118,7 @@ var Radio = ({
3116
3118
  value
3117
3119
  }) => {
3118
3120
  const color = colors[variant] || colors.blue_950;
3119
- const generatedId = (0, import_react13.useId)();
3121
+ const generatedId = (0, import_react14.useId)();
3120
3122
  const uniqueId = `radio-${generatedId}`;
3121
3123
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(StyledLabel2, { htmlFor: uniqueId, disabled, children: [
3122
3124
  /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
@@ -3136,7 +3138,7 @@ var Radio = ({
3136
3138
  };
3137
3139
 
3138
3140
  // src/Components/Accordion/Accordion.tsx
3139
- var import_react14 = require("react");
3141
+ var import_react15 = require("react");
3140
3142
  var import_styled_components23 = __toESM(require("styled-components"));
3141
3143
  var import_jsx_runtime27 = require("react/jsx-runtime");
3142
3144
  var Wrapper4 = import_styled_components23.default.div`
@@ -3197,8 +3199,8 @@ var Accordion = ({
3197
3199
  backgroundHeader = colors.white
3198
3200
  }) => {
3199
3201
  const resolvedBackgroundHeader = typeof backgroundHeader === "string" && backgroundHeader in colors ? colors[backgroundHeader] : backgroundHeader;
3200
- const [internalOpen, setInternalOpen] = (0, import_react14.useState)(defaultOpen);
3201
- const [internalOpenId, setInternalOpenId] = (0, import_react14.useState)(
3202
+ const [internalOpen, setInternalOpen] = (0, import_react15.useState)(defaultOpen);
3203
+ const [internalOpenId, setInternalOpenId] = (0, import_react15.useState)(
3202
3204
  null
3203
3205
  );
3204
3206
  const isControlled = controlledOpen !== void 0;
@@ -3213,7 +3215,7 @@ var Accordion = ({
3213
3215
  setInternalOpen((prev) => !prev);
3214
3216
  }
3215
3217
  };
3216
- const toggleItem = (0, import_react14.useCallback)(
3218
+ const toggleItem = (0, import_react15.useCallback)(
3217
3219
  (id) => {
3218
3220
  if (disabled) return;
3219
3221
  const nextId2 = activeItemId === id ? null : id;
@@ -3280,7 +3282,7 @@ var Accordion = ({
3280
3282
  };
3281
3283
 
3282
3284
  // src/Components/ColorPicker/ColorPicker.tsx
3283
- var import_react15 = require("react");
3285
+ var import_react16 = require("react");
3284
3286
  var import_styled_components24 = __toESM(require("styled-components"));
3285
3287
  var import_jsx_runtime28 = require("react/jsx-runtime");
3286
3288
  var SIZES = {
@@ -3357,7 +3359,7 @@ var TEXT_SIZE_MAP = {
3357
3359
  m: "xs",
3358
3360
  l: "s"
3359
3361
  };
3360
- var ColorPicker = (0, import_react15.forwardRef)(
3362
+ var ColorPicker = (0, import_react16.forwardRef)(
3361
3363
  ({
3362
3364
  label,
3363
3365
  value,
@@ -3366,11 +3368,11 @@ var ColorPicker = (0, import_react15.forwardRef)(
3366
3368
  disabled = false,
3367
3369
  size = "m"
3368
3370
  }, ref) => {
3369
- const innerRef = (0, import_react15.useRef)(null);
3370
- const [internalColor, setInternalColor] = (0, import_react15.useState)(defaultValue);
3371
+ const innerRef = (0, import_react16.useRef)(null);
3372
+ const [internalColor, setInternalColor] = (0, import_react16.useState)(defaultValue);
3371
3373
  const currentColor = value !== void 0 ? value : internalColor;
3372
3374
  const dims = SIZES[size];
3373
- (0, import_react15.useEffect)(() => {
3375
+ (0, import_react16.useEffect)(() => {
3374
3376
  if (!ref) return;
3375
3377
  if (typeof ref === "function") {
3376
3378
  ref(innerRef.current);
@@ -3416,7 +3418,7 @@ var ColorPicker = (0, import_react15.forwardRef)(
3416
3418
  ColorPicker.displayName = "ColorPicker";
3417
3419
 
3418
3420
  // src/Components/SliderInput/SliderInput.tsx
3419
- var import_react16 = require("react");
3421
+ var import_react17 = require("react");
3420
3422
  var import_styled_components25 = __toESM(require("styled-components"));
3421
3423
  var import_jsx_runtime29 = require("react/jsx-runtime");
3422
3424
  var Container3 = import_styled_components25.default.label`
@@ -3498,7 +3500,7 @@ var MinMaxRow = import_styled_components25.default.span`
3498
3500
  justify-content: space-between;
3499
3501
  align-items: center;
3500
3502
  `;
3501
- var SliderInput = (0, import_react16.forwardRef)(
3503
+ var SliderInput = (0, import_react17.forwardRef)(
3502
3504
  ({
3503
3505
  value,
3504
3506
  onChange,
@@ -3633,7 +3635,7 @@ var ListItem = (props) => {
3633
3635
  };
3634
3636
 
3635
3637
  // src/Components/Table/Table.tsx
3636
- var import_react17 = require("react");
3638
+ var import_react18 = require("react");
3637
3639
  var import_styled_components28 = __toESM(require("styled-components"));
3638
3640
  var import_jsx_runtime32 = require("react/jsx-runtime");
3639
3641
  var shouldForwardPropTable = (prop) => ![
@@ -3669,7 +3671,7 @@ var StyledContainer3 = import_styled_components28.default.div.withConfig({
3669
3671
  border: 1.4px solid ${colors.grey_200};
3670
3672
  box-shadow: ${(props) => props.hasShadow ? "0 2px 12px 0 rgba(198, 198, 198, 0.25)" : "none"};
3671
3673
  `;
3672
- var Table = (0, import_react17.forwardRef)((props, ref) => {
3674
+ var Table = (0, import_react18.forwardRef)((props, ref) => {
3673
3675
  const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
3674
3676
  const safeChildren = children;
3675
3677
  return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledContainer3, __spreadProps(__spreadValues({}, otherProps), { ref, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(StyledTable, __spreadProps(__spreadValues({}, otherProps), { children: safeChildren })) }));
@@ -3699,7 +3701,7 @@ var TableHeader = (props) => {
3699
3701
  };
3700
3702
 
3701
3703
  // src/Components/Table/TableBody/TableBody.tsx
3702
- var import_react18 = require("react");
3704
+ var import_react19 = require("react");
3703
3705
  var import_styled_components30 = __toESM(require("styled-components"));
3704
3706
  var import_jsx_runtime34 = require("react/jsx-runtime");
3705
3707
  var shouldForwardPropTableBody = (prop) => !["backgroundColor", "useEvenBackground", "fixedHeight", "color"].includes(
@@ -3718,7 +3720,7 @@ var StyledTableBody = import_styled_components30.default.div.withConfig({
3718
3720
  background-color: ${(props) => props.useEvenBackground ? "#f2f2f2" : ""};
3719
3721
  }
3720
3722
  `;
3721
- var TableBody = (0, import_react18.forwardRef)(
3723
+ var TableBody = (0, import_react19.forwardRef)(
3722
3724
  (props, ref) => {
3723
3725
  const _a = props, { children } = _a, otherProps = __objRest(_a, ["children"]);
3724
3726
  const safeChildren = children;
@@ -3793,7 +3795,7 @@ var TableCell = (props) => {
3793
3795
  };
3794
3796
 
3795
3797
  // src/Components/Table/TableHeaderCell/TableHeaderCell.tsx
3796
- var import_react19 = require("react");
3798
+ var import_react20 = require("react");
3797
3799
  var import_styled_components33 = __toESM(require("styled-components"));
3798
3800
  var import_jsx_runtime37 = require("react/jsx-runtime");
3799
3801
  var shouldForwardPropTableHeaderCell = (prop) => ![
@@ -3837,7 +3839,7 @@ var SortArrow = import_styled_components33.default.span`
3837
3839
  `;
3838
3840
  var TableHeaderCell = (props) => {
3839
3841
  const _a = props, { children, useSort, isSort, sortOrder } = _a, otherProps = __objRest(_a, ["children", "useSort", "isSort", "sortOrder"]);
3840
- const [hovered, setHovered] = (0, import_react19.useState)(false);
3842
+ const [hovered, setHovered] = (0, import_react20.useState)(false);
3841
3843
  const showArrow = useSort && (isSort || hovered);
3842
3844
  const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
3843
3845
  const arrowOpacity = isSort ? 1 : 0.35;
@@ -3985,7 +3987,7 @@ var SkeletonRow = ({ columns = 9 }) => /* @__PURE__ */ (0, import_jsx_runtime42.
3985
3987
  ] });
3986
3988
 
3987
3989
  // src/Components/Switch/Switch.tsx
3988
- var import_react20 = require("react");
3990
+ var import_react21 = require("react");
3989
3991
  var import_styled_components38 = __toESM(require("styled-components"));
3990
3992
  var import_jsx_runtime43 = require("react/jsx-runtime");
3991
3993
  var BASE = {
@@ -4066,7 +4068,7 @@ var Knob = import_styled_components38.default.span`
4066
4068
  transform: translateY(-50%) scale(0.96);
4067
4069
  }
4068
4070
  `;
4069
- var Switch = (0, import_react20.forwardRef)(
4071
+ var Switch = (0, import_react21.forwardRef)(
4070
4072
  (_a, ref) => {
4071
4073
  var _b = _a, {
4072
4074
  checked,
@@ -4122,7 +4124,7 @@ var CardSkeleton = () => {
4122
4124
  };
4123
4125
 
4124
4126
  // src/Components/Options/Options.tsx
4125
- var import_react21 = require("react");
4127
+ var import_react22 = require("react");
4126
4128
  var import_jsx_runtime45 = require("react/jsx-runtime");
4127
4129
  var Options = ({
4128
4130
  icon,
@@ -4132,8 +4134,8 @@ var Options = ({
4132
4134
  onChange,
4133
4135
  disabled = false
4134
4136
  }) => {
4135
- const [state, setState] = (0, import_react21.useState)(0);
4136
- (0, import_react21.useEffect)(() => {
4137
+ const [state, setState] = (0, import_react22.useState)(0);
4138
+ (0, import_react22.useEffect)(() => {
4137
4139
  if (defaultId) {
4138
4140
  const defaultIndex = options.findIndex(
4139
4141
  (option) => option.id === defaultId
@@ -4191,7 +4193,7 @@ var Options = ({
4191
4193
  };
4192
4194
 
4193
4195
  // src/Components/Stepper/Stepper.tsx
4194
- var import_react22 = require("react");
4196
+ var import_react23 = require("react");
4195
4197
  var import_styled_components39 = __toESM(require("styled-components"));
4196
4198
  var import_jsx_runtime46 = require("react/jsx-runtime");
4197
4199
  var Wrapper5 = import_styled_components39.default.nav`
@@ -4230,7 +4232,7 @@ var Stepper = ({
4230
4232
  return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Wrapper5, { "aria-label": "progression", className, children: Array.from({ length: numberOfSteps }, (_, i) => {
4231
4233
  const isActive = i === current;
4232
4234
  const isCompleted = i < current;
4233
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react22.Fragment, { children: [
4235
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_react23.Fragment, { children: [
4234
4236
  /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4235
4237
  Circle,
4236
4238
  {
@@ -4247,16 +4249,29 @@ var Stepper = ({
4247
4249
  };
4248
4250
 
4249
4251
  // src/Components/Tabs/Tabs.tsx
4250
- var import_react23 = require("react");
4252
+ var import_react24 = require("react");
4251
4253
  var import_styled_components40 = __toESM(require("styled-components"));
4252
4254
  var import_jsx_runtime47 = require("react/jsx-runtime");
4253
4255
  var TOKENS = {
4254
4256
  fontFamily: '"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif'
4255
4257
  };
4256
- var shouldForwardTabs = (p) => !["align", "showBaseline", "baselineColor", "variant", "fullWidth"].includes(
4257
- p
4258
- );
4259
- var shouldForwardTab = (p) => !["$active", "$disabled", "$variant", "$fullWidth"].includes(p);
4258
+ var shouldForwardTabs = (p) => ![
4259
+ "align",
4260
+ "showBaseline",
4261
+ "baselineColor",
4262
+ "variant",
4263
+ "fullWidth",
4264
+ "size",
4265
+ "activeColor"
4266
+ ].includes(p);
4267
+ var shouldForwardTab = (p) => ![
4268
+ "$active",
4269
+ "$disabled",
4270
+ "$variant",
4271
+ "$fullWidth",
4272
+ "$size",
4273
+ "$activeColor"
4274
+ ].includes(p);
4260
4275
  var TabsRoot = import_styled_components40.default.div.withConfig({
4261
4276
  shouldForwardProp: shouldForwardTabs
4262
4277
  })`
@@ -4285,11 +4300,20 @@ var TabsList = import_styled_components40.default.div.withConfig({
4285
4300
  })`
4286
4301
  display: flex;
4287
4302
  align-items: center;
4288
- gap: ${(p) => p.variant === "pills" ? "0" : "24px"};
4303
+ gap: ${(p) => {
4304
+ if (p.variant !== "pills") return "24px";
4305
+ return p.size === "xs" ? "4px" : "0";
4306
+ }};
4289
4307
  min-height: ${(p) => p.variant === "pills" ? "auto" : "48px"};
4290
- padding: ${(p) => p.variant === "pills" ? "4px" : "12px 0"};
4308
+ padding: ${(p) => {
4309
+ if (p.variant !== "pills") return "12px 0";
4310
+ return p.size === "xs" ? "6px 8px" : "4px";
4311
+ }};
4291
4312
  background: ${(p) => p.variant === "pills" ? colors.grey_200 : "transparent"};
4292
- border-radius: ${(p) => p.variant === "pills" ? "8px" : "0"};
4313
+ border-radius: ${(p) => {
4314
+ if (p.variant !== "pills") return "0";
4315
+ return p.size === "xs" ? "6px" : "8px";
4316
+ }};
4293
4317
  width: ${(p) => p.fullWidth ? "100%" : "auto"};
4294
4318
  justify-content: ${(p) => p.align === "center" ? "center" : p.align === "end" ? "flex-end" : p.align === "between" ? "space-between" : "flex-start"};
4295
4319
  `;
@@ -4306,27 +4330,40 @@ var TabButton = import_styled_components40.default.button.withConfig({
4306
4330
  if (p.$variant !== "pills") return "transparent";
4307
4331
  return p.$active ? colors.white : "transparent";
4308
4332
  }};
4309
- padding: ${(p) => p.$variant === "pills" ? "8px 16px" : "0"};
4333
+ padding: ${(p) => {
4334
+ if (p.$variant !== "pills") return "0";
4335
+ if (p.$size === "xs") return p.$active ? "4px 12px" : "4px 8px";
4336
+ return "8px 16px";
4337
+ }};
4310
4338
  margin: 0;
4311
4339
  border-radius: ${(p) => p.$variant === "pills" ? "6px" : "0"};
4312
4340
  flex: ${(p) => p.$variant === "pills" && p.$fullWidth ? "1" : "initial"};
4313
4341
  position: relative;
4314
4342
  cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
4315
4343
  color: ${(p) => {
4316
- if (p.$variant === "pills") return colors.dark;
4344
+ if (p.$variant === "pills") {
4345
+ if (p.$active && p.$activeColor) return p.$activeColor;
4346
+ return colors.dark;
4347
+ }
4317
4348
  return p.$active ? colors.blue_700 : colors.grey_400;
4318
4349
  }};
4319
4350
  font-family: ${TOKENS.fontFamily};
4320
- font-size: ${(p) => p.$variant === "pills" ? "14px" : "16px"};
4351
+ font-size: ${(p) => {
4352
+ if (p.$variant === "pills") return p.$size === "xs" ? "12px" : "14px";
4353
+ return "16px";
4354
+ }};
4321
4355
  font-weight: ${(p) => {
4322
- if (p.$variant === "pills") return p.$active ? 700 : 500;
4356
+ if (p.$variant === "pills") {
4357
+ if (p.$active) return 700;
4358
+ return p.$size === "xs" ? 600 : 500;
4359
+ }
4323
4360
  return p.$active ? 700 : 600;
4324
4361
  }};
4325
4362
  line-height: 1.2;
4326
4363
  white-space: nowrap;
4327
4364
  outline: none;
4328
4365
  text-align: center;
4329
- box-shadow: none;
4366
+ box-shadow: ${(p) => p.$variant === "pills" && p.$size === "xs" && p.$active ? "0px 2px 7.5px rgba(198, 198, 198, 0.25)" : "none"};
4330
4367
  transition:
4331
4368
  background-color 150ms ease,
4332
4369
  color 150ms ease;
@@ -4368,7 +4405,9 @@ var Tab = (_a) => {
4368
4405
  onClick,
4369
4406
  innerRef,
4370
4407
  variant = "line",
4371
- fullWidth = false
4408
+ fullWidth = false,
4409
+ size = "m",
4410
+ activeColor
4372
4411
  } = _b, rest = __objRest(_b, [
4373
4412
  "id",
4374
4413
  "children",
@@ -4377,7 +4416,9 @@ var Tab = (_a) => {
4377
4416
  "onClick",
4378
4417
  "innerRef",
4379
4418
  "variant",
4380
- "fullWidth"
4419
+ "fullWidth",
4420
+ "size",
4421
+ "activeColor"
4381
4422
  ]);
4382
4423
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4383
4424
  TabButton,
@@ -4392,6 +4433,8 @@ var Tab = (_a) => {
4392
4433
  $disabled: disabled,
4393
4434
  $variant: variant,
4394
4435
  $fullWidth: fullWidth,
4436
+ $size: size,
4437
+ $activeColor: activeColor,
4395
4438
  onClick: disabled ? void 0 : onClick
4396
4439
  }, rest), {
4397
4440
  children
@@ -4407,7 +4450,9 @@ var Tabs = (_a) => {
4407
4450
  align = "start",
4408
4451
  showBaseline = true,
4409
4452
  baselineColor = colors.grey_300,
4410
- children
4453
+ children,
4454
+ size,
4455
+ activeColor
4411
4456
  } = _b, rest = __objRest(_b, [
4412
4457
  "value",
4413
4458
  "onChange",
@@ -4416,15 +4461,17 @@ var Tabs = (_a) => {
4416
4461
  "align",
4417
4462
  "showBaseline",
4418
4463
  "baselineColor",
4419
- "children"
4464
+ "children",
4465
+ "size",
4466
+ "activeColor"
4420
4467
  ]);
4421
- const rootRef = (0, import_react23.useRef)(null);
4422
- const refsMap = (0, import_react23.useRef)(/* @__PURE__ */ new Map());
4423
- const [bar, setBar] = (0, import_react23.useState)({ left: 0, width: 0 });
4468
+ const rootRef = (0, import_react24.useRef)(null);
4469
+ const refsMap = (0, import_react24.useRef)(/* @__PURE__ */ new Map());
4470
+ const [bar, setBar] = (0, import_react24.useState)({ left: 0, width: 0 });
4424
4471
  const setTabRef = (id) => (el) => {
4425
4472
  if (el) refsMap.current.set(id, el);
4426
4473
  };
4427
- const updateBar = (0, import_react23.useCallback)(() => {
4474
+ const updateBar = (0, import_react24.useCallback)(() => {
4428
4475
  const root = rootRef.current;
4429
4476
  const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
4430
4477
  if (!root || !activeEl) return;
@@ -4432,7 +4479,7 @@ var Tabs = (_a) => {
4432
4479
  const box = activeEl.getBoundingClientRect();
4433
4480
  setBar({ left: box.left - rootBox.left, width: box.width });
4434
4481
  }, [value]);
4435
- (0, import_react23.useEffect)(() => {
4482
+ (0, import_react24.useEffect)(() => {
4436
4483
  updateBar();
4437
4484
  const ro = new ResizeObserver(updateBar);
4438
4485
  const activeEl = value !== void 0 ? refsMap.current.get(value) : void 0;
@@ -4440,14 +4487,14 @@ var Tabs = (_a) => {
4440
4487
  if (activeEl) ro.observe(activeEl);
4441
4488
  return () => ro.disconnect();
4442
4489
  }, [value, updateBar]);
4443
- const handleSelect = (0, import_react23.useCallback)(
4490
+ const handleSelect = (0, import_react24.useCallback)(
4444
4491
  (id) => {
4445
4492
  if (id !== value && onChange) onChange(id);
4446
4493
  },
4447
4494
  [onChange, value]
4448
4495
  );
4449
4496
  const isPillsFullWidth = variant === "pills" && align === "start";
4450
- const rendered = (0, import_react23.useMemo)(() => {
4497
+ const rendered = (0, import_react24.useMemo)(() => {
4451
4498
  if (items && items.length) {
4452
4499
  return items.map((it) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4453
4500
  Tab,
@@ -4459,6 +4506,8 @@ var Tabs = (_a) => {
4459
4506
  fullWidth: isPillsFullWidth,
4460
4507
  onClick: () => handleSelect(it.id),
4461
4508
  innerRef: setTabRef(it.id),
4509
+ size,
4510
+ activeColor,
4462
4511
  children: [
4463
4512
  it.label,
4464
4513
  it.dot && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabDot, { $color: it.dotColor }),
@@ -4477,20 +4526,31 @@ var Tabs = (_a) => {
4477
4526
  it.id
4478
4527
  ));
4479
4528
  }
4480
- return import_react23.Children.map(children, (child) => {
4529
+ return import_react24.Children.map(children, (child) => {
4481
4530
  var _a2;
4482
- if (!(0, import_react23.isValidElement)(child)) return child;
4531
+ if (!(0, import_react24.isValidElement)(child)) return child;
4483
4532
  const id = (_a2 = child.props.id) != null ? _a2 : child.key;
4484
4533
  const active = id === value;
4485
- return (0, import_react23.cloneElement)(child, {
4534
+ return (0, import_react24.cloneElement)(child, {
4486
4535
  active,
4487
4536
  variant,
4488
4537
  fullWidth: isPillsFullWidth,
4489
4538
  onClick: () => handleSelect(id),
4490
- innerRef: setTabRef(id)
4539
+ innerRef: setTabRef(id),
4540
+ size,
4541
+ activeColor
4491
4542
  });
4492
4543
  });
4493
- }, [items, children, value, variant, isPillsFullWidth, handleSelect]);
4544
+ }, [
4545
+ items,
4546
+ children,
4547
+ value,
4548
+ variant,
4549
+ isPillsFullWidth,
4550
+ handleSelect,
4551
+ size,
4552
+ activeColor
4553
+ ]);
4494
4554
  return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
4495
4555
  TabsRoot,
4496
4556
  __spreadProps(__spreadValues({
@@ -4502,7 +4562,16 @@ var Tabs = (_a) => {
4502
4562
  variant
4503
4563
  }, rest), {
4504
4564
  children: [
4505
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(TabsList, { align, variant, fullWidth: isPillsFullWidth, children: rendered }),
4565
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4566
+ TabsList,
4567
+ {
4568
+ align,
4569
+ variant,
4570
+ fullWidth: isPillsFullWidth,
4571
+ size,
4572
+ children: rendered
4573
+ }
4574
+ ),
4506
4575
  variant === "line" && showBaseline && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ActiveBar, { style: { left: bar.left, width: bar.width } })
4507
4576
  ]
4508
4577
  })
@@ -4510,7 +4579,7 @@ var Tabs = (_a) => {
4510
4579
  };
4511
4580
 
4512
4581
  // src/Components/MultiSelect/MultiSelect.tsx
4513
- var import_react24 = require("react");
4582
+ var import_react25 = require("react");
4514
4583
  var import_styled_components41 = __toESM(require("styled-components"));
4515
4584
  var import_jsx_runtime48 = require("react/jsx-runtime");
4516
4585
  var Container5 = import_styled_components41.default.div`
@@ -4553,8 +4622,8 @@ var MultiSelect = ({
4553
4622
  width,
4554
4623
  align = "left"
4555
4624
  }) => {
4556
- const [isOpen, setIsOpen] = (0, import_react24.useState)(false);
4557
- const dropdownRef = (0, import_react24.useRef)(null);
4625
+ const [isOpen, setIsOpen] = (0, import_react25.useState)(false);
4626
+ const dropdownRef = (0, import_react25.useRef)(null);
4558
4627
  const toggleOption = (value) => {
4559
4628
  if (!onChange) return;
4560
4629
  if (selectedValues.includes(value)) {
@@ -4564,7 +4633,7 @@ var MultiSelect = ({
4564
4633
  onChange([...selectedValues, value]);
4565
4634
  }
4566
4635
  };
4567
- (0, import_react24.useEffect)(() => {
4636
+ (0, import_react25.useEffect)(() => {
4568
4637
  const handleClickOutside = (e) => {
4569
4638
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
4570
4639
  setIsOpen(false);
@@ -4606,7 +4675,7 @@ var MultiSelect = ({
4606
4675
  };
4607
4676
 
4608
4677
  // src/Components/DatePicker/DatePicker.tsx
4609
- var import_react25 = require("react");
4678
+ var import_react26 = require("react");
4610
4679
  var import_jsx_runtime49 = require("react/jsx-runtime");
4611
4680
  var LOCALE_MAP = {
4612
4681
  fr: "fr-FR",
@@ -4677,28 +4746,28 @@ var DatePicker = (props) => {
4677
4746
  const resolvedLocale = resolveLocale(locale);
4678
4747
  const monthNames = getMonthNames(resolvedLocale);
4679
4748
  const dayNames = getDayNames(resolvedLocale);
4680
- const [isOpen, setIsOpen] = (0, import_react25.useState)(defaultOpen);
4681
- const [currentMonth, setCurrentMonth] = (0, import_react25.useState)(/* @__PURE__ */ new Date());
4682
- const [isSelectingEnd, setIsSelectingEnd] = (0, import_react25.useState)(false);
4683
- const [singleDate, setSingleDate] = (0, import_react25.useState)(
4749
+ const [isOpen, setIsOpen] = (0, import_react26.useState)(defaultOpen);
4750
+ const [currentMonth, setCurrentMonth] = (0, import_react26.useState)(/* @__PURE__ */ new Date());
4751
+ const [isSelectingEnd, setIsSelectingEnd] = (0, import_react26.useState)(false);
4752
+ const [singleDate, setSingleDate] = (0, import_react26.useState)(
4684
4753
  isSingle ? (_a = props.value) != null ? _a : null : null
4685
4754
  );
4686
- const [startDate, setStartDate] = (0, import_react25.useState)(
4755
+ const [startDate, setStartDate] = (0, import_react26.useState)(
4687
4756
  !isSingle ? (_c = (_b = props.value) == null ? void 0 : _b.start) != null ? _c : null : null
4688
4757
  );
4689
- const [endDate, setEndDate] = (0, import_react25.useState)(
4758
+ const [endDate, setEndDate] = (0, import_react26.useState)(
4690
4759
  !isSingle ? (_e = (_d = props.value) == null ? void 0 : _d.end) != null ? _e : null : null
4691
4760
  );
4692
- const ref = (0, import_react25.useRef)(null);
4761
+ const ref = (0, import_react26.useRef)(null);
4693
4762
  const singleValueMs = isSingle ? (_f = props.value) == null ? void 0 : _f.getTime() : void 0;
4694
4763
  const rangeStartMs = !isSingle ? (_h = (_g = props.value) == null ? void 0 : _g.start) == null ? void 0 : _h.getTime() : void 0;
4695
4764
  const rangeEndMs = !isSingle ? (_j = (_i = props.value) == null ? void 0 : _i.end) == null ? void 0 : _j.getTime() : void 0;
4696
- (0, import_react25.useEffect)(() => {
4765
+ (0, import_react26.useEffect)(() => {
4697
4766
  if (!isSingle) return;
4698
4767
  const v = props.value;
4699
4768
  if (v !== void 0) setSingleDate(v);
4700
4769
  }, [singleValueMs]);
4701
- (0, import_react25.useEffect)(() => {
4770
+ (0, import_react26.useEffect)(() => {
4702
4771
  var _a2, _b2;
4703
4772
  if (isSingle) return;
4704
4773
  const v = props.value;
@@ -4706,7 +4775,7 @@ var DatePicker = (props) => {
4706
4775
  setStartDate((_a2 = v == null ? void 0 : v.start) != null ? _a2 : null);
4707
4776
  setEndDate((_b2 = v == null ? void 0 : v.end) != null ? _b2 : null);
4708
4777
  }, [rangeStartMs, rangeEndMs]);
4709
- (0, import_react25.useEffect)(() => {
4778
+ (0, import_react26.useEffect)(() => {
4710
4779
  const handleClickOutside = (e) => {
4711
4780
  if (ref.current && !ref.current.contains(e.target)) {
4712
4781
  setIsOpen(false);
@@ -4990,7 +5059,7 @@ var DatePicker = (props) => {
4990
5059
  };
4991
5060
 
4992
5061
  // src/Components/IconTabs/IconTabs.tsx
4993
- var import_react26 = require("react");
5062
+ var import_react27 = require("react");
4994
5063
  var import_styled_components42 = __toESM(require("styled-components"));
4995
5064
  var import_jsx_runtime50 = require("react/jsx-runtime");
4996
5065
  var TabsContainer = import_styled_components42.default.div`
@@ -5052,10 +5121,10 @@ var IconTabs = ({
5052
5121
  defaultTabIndex = 0
5053
5122
  }) => {
5054
5123
  var _a;
5055
- const [selectedTab, setSelectedTab] = (0, import_react26.useState)(defaultTabIndex);
5056
- const sliderRef = (0, import_react26.useRef)(null);
5057
- const tabRefs = (0, import_react26.useRef)([]);
5058
- (0, import_react26.useEffect)(() => {
5124
+ const [selectedTab, setSelectedTab] = (0, import_react27.useState)(defaultTabIndex);
5125
+ const sliderRef = (0, import_react27.useRef)(null);
5126
+ const tabRefs = (0, import_react27.useRef)([]);
5127
+ (0, import_react27.useEffect)(() => {
5059
5128
  if (defaultTabIndex >= 0 && defaultTabIndex !== selectedTab) {
5060
5129
  setSelectedTab(defaultTabIndex);
5061
5130
  }
@@ -5066,7 +5135,7 @@ var IconTabs = ({
5066
5135
  onTabChange(index);
5067
5136
  }
5068
5137
  };
5069
- (0, import_react26.useEffect)(() => {
5138
+ (0, import_react27.useEffect)(() => {
5070
5139
  if (sliderRef.current && tabRefs.current[selectedTab]) {
5071
5140
  const selectedTabRect = tabRefs.current[selectedTab].getBoundingClientRect();
5072
5141
  const parentRect = tabRefs.current[selectedTab].parentElement.getBoundingClientRect();
@@ -5105,7 +5174,7 @@ var IconTabs = ({
5105
5174
  };
5106
5175
 
5107
5176
  // src/Components/Popover/Popover.tsx
5108
- var import_react27 = require("react");
5177
+ var import_react28 = require("react");
5109
5178
  var import_react_dom3 = require("react-dom");
5110
5179
  var import_styled_components43 = __toESM(require("styled-components"));
5111
5180
  var import_jsx_runtime51 = require("react/jsx-runtime");
@@ -5151,15 +5220,15 @@ var Popover = ({
5151
5220
  align = "right",
5152
5221
  fullWidth = false
5153
5222
  }) => {
5154
- const [open, setOpen] = (0, import_react27.useState)(false);
5155
- const ref = (0, import_react27.useRef)(null);
5156
- const menuRef = (0, import_react27.useRef)(null);
5157
- const [menuPosition, setMenuPosition] = (0, import_react27.useState)({
5223
+ const [open, setOpen] = (0, import_react28.useState)(false);
5224
+ const ref = (0, import_react28.useRef)(null);
5225
+ const menuRef = (0, import_react28.useRef)(null);
5226
+ const [menuPosition, setMenuPosition] = (0, import_react28.useState)({
5158
5227
  mode: "default",
5159
5228
  top: 0,
5160
5229
  left: 0
5161
5230
  });
5162
- const updatePosition = (0, import_react27.useCallback)(() => {
5231
+ const updatePosition = (0, import_react28.useCallback)(() => {
5163
5232
  var _a;
5164
5233
  if (!ref.current) return;
5165
5234
  if (anchorRef == null ? void 0 : anchorRef.current) {
@@ -5188,7 +5257,7 @@ var Popover = ({
5188
5257
  });
5189
5258
  }
5190
5259
  }, [items.length, anchorRef, offsetY, align]);
5191
- (0, import_react27.useEffect)(() => {
5260
+ (0, import_react28.useEffect)(() => {
5192
5261
  const handleClickOutside = (event) => {
5193
5262
  var _a, _b;
5194
5263
  const isInTrigger = (_a = ref.current) == null ? void 0 : _a.contains(event.target);
@@ -5516,7 +5585,7 @@ var Banner = ({
5516
5585
  };
5517
5586
 
5518
5587
  // src/Components/Tooltip/Tooltip.tsx
5519
- var import_react28 = require("react");
5588
+ var import_react29 = require("react");
5520
5589
  var import_styled_components46 = __toESM(require("styled-components"));
5521
5590
  var import_jsx_runtime55 = require("react/jsx-runtime");
5522
5591
  var StyledTooltipWrapper = import_styled_components46.default.div`
@@ -5620,7 +5689,7 @@ var Tooltip = ({
5620
5689
  direction = "top",
5621
5690
  children
5622
5691
  }) => {
5623
- const [isVisible, setIsVisible] = (0, import_react28.useState)(false);
5692
+ const [isVisible, setIsVisible] = (0, import_react29.useState)(false);
5624
5693
  const handleMouseEnter = () => setIsVisible(true);
5625
5694
  const handleMouseLeave = () => setIsVisible(false);
5626
5695
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
@@ -5647,7 +5716,7 @@ var Tooltip = ({
5647
5716
  };
5648
5717
 
5649
5718
  // src/Components/Pagination/Pagination.tsx
5650
- var import_react29 = require("react");
5719
+ var import_react30 = require("react");
5651
5720
  var import_jsx_runtime56 = require("react/jsx-runtime");
5652
5721
  var getPageNumbers = (current, total) => {
5653
5722
  if (total <= 5) {
@@ -5671,7 +5740,7 @@ var Pagination = ({
5671
5740
  summaryLabel
5672
5741
  }) => {
5673
5742
  const totalPages = Math.max(1, Math.ceil(totalItems / itemsPerPage));
5674
- const pages = (0, import_react29.useMemo)(
5743
+ const pages = (0, import_react30.useMemo)(
5675
5744
  () => getPageNumbers(currentPage, totalPages),
5676
5745
  [currentPage, totalPages]
5677
5746
  );
@@ -5725,7 +5794,7 @@ var Pagination = ({
5725
5794
  };
5726
5795
 
5727
5796
  // src/Components/FileUploadZone/FileUploadZone.tsx
5728
- var import_react30 = require("react");
5797
+ var import_react31 = require("react");
5729
5798
  var import_styled_components47 = __toESM(require("styled-components"));
5730
5799
  var import_jsx_runtime57 = require("react/jsx-runtime");
5731
5800
  var ACCEPT_MAP = {
@@ -5812,19 +5881,19 @@ var FileUploadZone = ({
5812
5881
  icon = "cloud-arrow-up",
5813
5882
  showFileName = false
5814
5883
  }) => {
5815
- const [isDragging, setIsDragging] = (0, import_react30.useState)(false);
5816
- const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react30.useState)(
5884
+ const [isDragging, setIsDragging] = (0, import_react31.useState)(false);
5885
+ const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react31.useState)(
5817
5886
  null
5818
5887
  );
5819
- const [fileType, setFileType] = (0, import_react30.useState)(null);
5820
- const [fileName, setFileName] = (0, import_react30.useState)(null);
5821
- const [inlineError, setInlineError] = (0, import_react30.useState)(null);
5822
- const inputRef = (0, import_react30.useRef)(null);
5888
+ const [fileType, setFileType] = (0, import_react31.useState)(null);
5889
+ const [fileName, setFileName] = (0, import_react31.useState)(null);
5890
+ const [inlineError, setInlineError] = (0, import_react31.useState)(null);
5891
+ const inputRef = (0, import_react31.useRef)(null);
5823
5892
  const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
5824
5893
  const mimeTypes = getMimeTypes(resolvedAccept);
5825
5894
  const acceptString = mimeTypes.join(",");
5826
5895
  const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
5827
- const emitError = (0, import_react30.useCallback)(
5896
+ const emitError = (0, import_react31.useCallback)(
5828
5897
  (message) => {
5829
5898
  if (onError) {
5830
5899
  onError(message);
@@ -5834,7 +5903,7 @@ var FileUploadZone = ({
5834
5903
  },
5835
5904
  [onError]
5836
5905
  );
5837
- const validateFile = (0, import_react30.useCallback)(
5906
+ const validateFile = (0, import_react31.useCallback)(
5838
5907
  (file) => {
5839
5908
  if (!mimeTypes.includes(file.type)) {
5840
5909
  return { ok: false, error: "Format de fichier non accept\xE9." };
@@ -5849,7 +5918,7 @@ var FileUploadZone = ({
5849
5918
  },
5850
5919
  [mimeTypes, maxSizeMB]
5851
5920
  );
5852
- const processFile = (0, import_react30.useCallback)(
5921
+ const processFile = (0, import_react31.useCallback)(
5853
5922
  (file) => {
5854
5923
  setInlineError(null);
5855
5924
  const result = validateFile(file);
@@ -5867,7 +5936,7 @@ var FileUploadZone = ({
5867
5936
  },
5868
5937
  [validateFile, onSave, showPreview, emitError]
5869
5938
  );
5870
- const processFiles = (0, import_react30.useCallback)(
5939
+ const processFiles = (0, import_react31.useCallback)(
5871
5940
  (files) => {
5872
5941
  setInlineError(null);
5873
5942
  for (const file of files) {
@@ -6635,6 +6704,8 @@ var formatDate = (dateString, type = "date", language = "en") => {
6635
6704
  }
6636
6705
  case "longDate":
6637
6706
  return format({ day: "numeric", month: "long", year: "numeric" });
6707
+ case "monthYear":
6708
+ return format({ month: "long", year: "numeric" });
6638
6709
  default:
6639
6710
  return format({ day: "2-digit", month: "2-digit", year: "numeric" });
6640
6711
  }
package/dist/index.mjs CHANGED
@@ -2882,6 +2882,7 @@ var Input = forwardRef3((props, ref) => {
2882
2882
  Input.displayName = "Input";
2883
2883
 
2884
2884
  // src/Components/Checkbox/Checkbox.tsx
2885
+ import { useId } from "react";
2885
2886
  import styled21 from "styled-components";
2886
2887
  import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
2887
2888
  var CheckboxContainer = styled21.div`
@@ -2909,7 +2910,8 @@ var Checkbox = ({
2909
2910
  size = "m",
2910
2911
  variant = "blue_700"
2911
2912
  }) => {
2912
- const uniqueId = `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2913
+ const generatedId = useId();
2914
+ const uniqueId = `checkbox-${generatedId}`;
2913
2915
  return /* @__PURE__ */ jsxs12(CheckboxContainer, { children: [
2914
2916
  /* @__PURE__ */ jsx25(
2915
2917
  StyledCheckbox,
@@ -2926,7 +2928,7 @@ var Checkbox = ({
2926
2928
  };
2927
2929
 
2928
2930
  // src/Components/Radio/Radio.tsx
2929
- import { useId } from "react";
2931
+ import { useId as useId2 } from "react";
2930
2932
  import styled22 from "styled-components";
2931
2933
  import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2932
2934
  var RadioContainer = styled22.div`
@@ -2983,7 +2985,7 @@ var Radio = ({
2983
2985
  value
2984
2986
  }) => {
2985
2987
  const color = colors[variant] || colors.blue_950;
2986
- const generatedId = useId();
2988
+ const generatedId = useId2();
2987
2989
  const uniqueId = `radio-${generatedId}`;
2988
2990
  return /* @__PURE__ */ jsx26(RadioContainer, { children: /* @__PURE__ */ jsxs13(StyledLabel2, { htmlFor: uniqueId, disabled, children: [
2989
2991
  /* @__PURE__ */ jsx26(
@@ -4129,10 +4131,23 @@ import { jsx as jsx47, jsxs as jsxs22 } from "react/jsx-runtime";
4129
4131
  var TOKENS = {
4130
4132
  fontFamily: '"Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif'
4131
4133
  };
4132
- var shouldForwardTabs = (p) => !["align", "showBaseline", "baselineColor", "variant", "fullWidth"].includes(
4133
- p
4134
- );
4135
- var shouldForwardTab = (p) => !["$active", "$disabled", "$variant", "$fullWidth"].includes(p);
4134
+ var shouldForwardTabs = (p) => ![
4135
+ "align",
4136
+ "showBaseline",
4137
+ "baselineColor",
4138
+ "variant",
4139
+ "fullWidth",
4140
+ "size",
4141
+ "activeColor"
4142
+ ].includes(p);
4143
+ var shouldForwardTab = (p) => ![
4144
+ "$active",
4145
+ "$disabled",
4146
+ "$variant",
4147
+ "$fullWidth",
4148
+ "$size",
4149
+ "$activeColor"
4150
+ ].includes(p);
4136
4151
  var TabsRoot = styled40.div.withConfig({
4137
4152
  shouldForwardProp: shouldForwardTabs
4138
4153
  })`
@@ -4161,11 +4176,20 @@ var TabsList = styled40.div.withConfig({
4161
4176
  })`
4162
4177
  display: flex;
4163
4178
  align-items: center;
4164
- gap: ${(p) => p.variant === "pills" ? "0" : "24px"};
4179
+ gap: ${(p) => {
4180
+ if (p.variant !== "pills") return "24px";
4181
+ return p.size === "xs" ? "4px" : "0";
4182
+ }};
4165
4183
  min-height: ${(p) => p.variant === "pills" ? "auto" : "48px"};
4166
- padding: ${(p) => p.variant === "pills" ? "4px" : "12px 0"};
4184
+ padding: ${(p) => {
4185
+ if (p.variant !== "pills") return "12px 0";
4186
+ return p.size === "xs" ? "6px 8px" : "4px";
4187
+ }};
4167
4188
  background: ${(p) => p.variant === "pills" ? colors.grey_200 : "transparent"};
4168
- border-radius: ${(p) => p.variant === "pills" ? "8px" : "0"};
4189
+ border-radius: ${(p) => {
4190
+ if (p.variant !== "pills") return "0";
4191
+ return p.size === "xs" ? "6px" : "8px";
4192
+ }};
4169
4193
  width: ${(p) => p.fullWidth ? "100%" : "auto"};
4170
4194
  justify-content: ${(p) => p.align === "center" ? "center" : p.align === "end" ? "flex-end" : p.align === "between" ? "space-between" : "flex-start"};
4171
4195
  `;
@@ -4182,27 +4206,40 @@ var TabButton = styled40.button.withConfig({
4182
4206
  if (p.$variant !== "pills") return "transparent";
4183
4207
  return p.$active ? colors.white : "transparent";
4184
4208
  }};
4185
- padding: ${(p) => p.$variant === "pills" ? "8px 16px" : "0"};
4209
+ padding: ${(p) => {
4210
+ if (p.$variant !== "pills") return "0";
4211
+ if (p.$size === "xs") return p.$active ? "4px 12px" : "4px 8px";
4212
+ return "8px 16px";
4213
+ }};
4186
4214
  margin: 0;
4187
4215
  border-radius: ${(p) => p.$variant === "pills" ? "6px" : "0"};
4188
4216
  flex: ${(p) => p.$variant === "pills" && p.$fullWidth ? "1" : "initial"};
4189
4217
  position: relative;
4190
4218
  cursor: ${(p) => p.$disabled ? "not-allowed" : "pointer"};
4191
4219
  color: ${(p) => {
4192
- if (p.$variant === "pills") return colors.dark;
4220
+ if (p.$variant === "pills") {
4221
+ if (p.$active && p.$activeColor) return p.$activeColor;
4222
+ return colors.dark;
4223
+ }
4193
4224
  return p.$active ? colors.blue_700 : colors.grey_400;
4194
4225
  }};
4195
4226
  font-family: ${TOKENS.fontFamily};
4196
- font-size: ${(p) => p.$variant === "pills" ? "14px" : "16px"};
4227
+ font-size: ${(p) => {
4228
+ if (p.$variant === "pills") return p.$size === "xs" ? "12px" : "14px";
4229
+ return "16px";
4230
+ }};
4197
4231
  font-weight: ${(p) => {
4198
- if (p.$variant === "pills") return p.$active ? 700 : 500;
4232
+ if (p.$variant === "pills") {
4233
+ if (p.$active) return 700;
4234
+ return p.$size === "xs" ? 600 : 500;
4235
+ }
4199
4236
  return p.$active ? 700 : 600;
4200
4237
  }};
4201
4238
  line-height: 1.2;
4202
4239
  white-space: nowrap;
4203
4240
  outline: none;
4204
4241
  text-align: center;
4205
- box-shadow: none;
4242
+ box-shadow: ${(p) => p.$variant === "pills" && p.$size === "xs" && p.$active ? "0px 2px 7.5px rgba(198, 198, 198, 0.25)" : "none"};
4206
4243
  transition:
4207
4244
  background-color 150ms ease,
4208
4245
  color 150ms ease;
@@ -4244,7 +4281,9 @@ var Tab = (_a) => {
4244
4281
  onClick,
4245
4282
  innerRef,
4246
4283
  variant = "line",
4247
- fullWidth = false
4284
+ fullWidth = false,
4285
+ size = "m",
4286
+ activeColor
4248
4287
  } = _b, rest = __objRest(_b, [
4249
4288
  "id",
4250
4289
  "children",
@@ -4253,7 +4292,9 @@ var Tab = (_a) => {
4253
4292
  "onClick",
4254
4293
  "innerRef",
4255
4294
  "variant",
4256
- "fullWidth"
4295
+ "fullWidth",
4296
+ "size",
4297
+ "activeColor"
4257
4298
  ]);
4258
4299
  return /* @__PURE__ */ jsx47(
4259
4300
  TabButton,
@@ -4268,6 +4309,8 @@ var Tab = (_a) => {
4268
4309
  $disabled: disabled,
4269
4310
  $variant: variant,
4270
4311
  $fullWidth: fullWidth,
4312
+ $size: size,
4313
+ $activeColor: activeColor,
4271
4314
  onClick: disabled ? void 0 : onClick
4272
4315
  }, rest), {
4273
4316
  children
@@ -4283,7 +4326,9 @@ var Tabs = (_a) => {
4283
4326
  align = "start",
4284
4327
  showBaseline = true,
4285
4328
  baselineColor = colors.grey_300,
4286
- children
4329
+ children,
4330
+ size,
4331
+ activeColor
4287
4332
  } = _b, rest = __objRest(_b, [
4288
4333
  "value",
4289
4334
  "onChange",
@@ -4292,7 +4337,9 @@ var Tabs = (_a) => {
4292
4337
  "align",
4293
4338
  "showBaseline",
4294
4339
  "baselineColor",
4295
- "children"
4340
+ "children",
4341
+ "size",
4342
+ "activeColor"
4296
4343
  ]);
4297
4344
  const rootRef = useRef8(null);
4298
4345
  const refsMap = useRef8(/* @__PURE__ */ new Map());
@@ -4335,6 +4382,8 @@ var Tabs = (_a) => {
4335
4382
  fullWidth: isPillsFullWidth,
4336
4383
  onClick: () => handleSelect(it.id),
4337
4384
  innerRef: setTabRef(it.id),
4385
+ size,
4386
+ activeColor,
4338
4387
  children: [
4339
4388
  it.label,
4340
4389
  it.dot && /* @__PURE__ */ jsx47(TabDot, { $color: it.dotColor }),
@@ -4363,10 +4412,21 @@ var Tabs = (_a) => {
4363
4412
  variant,
4364
4413
  fullWidth: isPillsFullWidth,
4365
4414
  onClick: () => handleSelect(id),
4366
- innerRef: setTabRef(id)
4415
+ innerRef: setTabRef(id),
4416
+ size,
4417
+ activeColor
4367
4418
  });
4368
4419
  });
4369
- }, [items, children, value, variant, isPillsFullWidth, handleSelect]);
4420
+ }, [
4421
+ items,
4422
+ children,
4423
+ value,
4424
+ variant,
4425
+ isPillsFullWidth,
4426
+ handleSelect,
4427
+ size,
4428
+ activeColor
4429
+ ]);
4370
4430
  return /* @__PURE__ */ jsxs22(
4371
4431
  TabsRoot,
4372
4432
  __spreadProps(__spreadValues({
@@ -4378,7 +4438,16 @@ var Tabs = (_a) => {
4378
4438
  variant
4379
4439
  }, rest), {
4380
4440
  children: [
4381
- /* @__PURE__ */ jsx47(TabsList, { align, variant, fullWidth: isPillsFullWidth, children: rendered }),
4441
+ /* @__PURE__ */ jsx47(
4442
+ TabsList,
4443
+ {
4444
+ align,
4445
+ variant,
4446
+ fullWidth: isPillsFullWidth,
4447
+ size,
4448
+ children: rendered
4449
+ }
4450
+ ),
4382
4451
  variant === "line" && showBaseline && /* @__PURE__ */ jsx47(ActiveBar, { style: { left: bar.left, width: bar.width } })
4383
4452
  ]
4384
4453
  })
@@ -6516,6 +6585,8 @@ var formatDate = (dateString, type = "date", language = "en") => {
6516
6585
  }
6517
6586
  case "longDate":
6518
6587
  return format({ day: "numeric", month: "long", year: "numeric" });
6588
+ case "monthYear":
6589
+ return format({ month: "long", year: "numeric" });
6519
6590
  default:
6520
6591
  return format({ day: "2-digit", month: "2-digit", year: "numeric" });
6521
6592
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.291",
3
+ "version": "1.0.293",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",