@wix/site-ui 1.20.0 → 1.21.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.
@@ -43,14 +43,18 @@
43
43
  pointer-events: none;
44
44
  }
45
45
 
46
+ .trigger-cbcjp2[data-disabled] .title-Akf754, .trigger-cbcjp2[data-disabled] .subtitle-wfobjk {
47
+ color: var(--wst-system-disabled-color, #939393);
48
+ }
49
+
46
50
  .small-ECItLE .trigger-cbcjp2 {
47
- gap: 8px;
51
+ gap: 12px;
48
52
  padding-block: 12px;
49
53
  padding-inline: 0;
50
54
  }
51
55
 
52
56
  .large-FlJRwV .trigger-cbcjp2 {
53
- gap: 12px;
57
+ gap: 32px;
54
58
  padding-block: 24px;
55
59
  padding-inline: 0;
56
60
  }
@@ -63,6 +67,33 @@
63
67
  padding-inline: 24px;
64
68
  }
65
69
 
70
+ .title-Akf754 {
71
+ flex-direction: column;
72
+ flex: 1;
73
+ gap: 4px;
74
+ min-width: 0;
75
+ display: flex;
76
+ }
77
+
78
+ .subtitle-wfobjk {
79
+ font: var(--wst-paragraph-3-font);
80
+ color: var(--wst-shade-3-color);
81
+ }
82
+
83
+ .suffix-O091QK {
84
+ flex-shrink: 0;
85
+ align-items: center;
86
+ display: flex;
87
+ }
88
+
89
+ .small-ECItLE .suffix-O091QK {
90
+ gap: 8px;
91
+ }
92
+
93
+ .large-FlJRwV .suffix-O091QK {
94
+ gap: 12px;
95
+ }
96
+
66
97
  .arrow-yZ7Nq2 {
67
98
  flex-shrink: 0;
68
99
  transition: transform .2s;
@@ -24,6 +24,15 @@ export declare const Accordion: {
24
24
  Arrow: React_2.ForwardRefExoticComponent<ChevronDownProps & {
25
25
  className?: string | undefined;
26
26
  } & React_2.RefAttributes<SVGSVGElement>>;
27
+ Title: React_2.ForwardRefExoticComponent<Omit<Omit<TypographyProps, "variant">, "className"> & {
28
+ className?: string | undefined;
29
+ } & React_2.RefAttributes<HTMLElement>>;
30
+ Subtitle: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLSpanElement>, "className"> & {
31
+ className?: string | undefined;
32
+ } & React_2.RefAttributes<HTMLSpanElement>>;
33
+ Suffix: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLSpanElement>, "className"> & {
34
+ className?: string | undefined;
35
+ } & React_2.RefAttributes<HTMLSpanElement>>;
27
36
  };
28
37
 
29
38
  export declare const AccordionSize: {
@@ -43,6 +52,13 @@ declare function Root<Value = any>({ className, size, variant, ...props }: WithS
43
52
 
44
53
  declare type Size = (typeof AccordionSize)[keyof typeof AccordionSize];
45
54
 
55
+ declare interface TypographyProps extends React_2.HTMLAttributes<HTMLElement> {
56
+ variant?: TypographyVariant;
57
+ render?: React_2.ReactElement;
58
+ }
59
+
60
+ declare type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p1' | 'p2' | 'p3';
61
+
46
62
  declare type Variant = (typeof AccordionVariant)[keyof typeof AccordionVariant];
47
63
 
48
64
  declare type WithStringClassName<P> = Omit<P, 'className'> & {
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Accordion } from "@base-ui/react/accordion";
3
3
  import { ChevronDown } from "@wix/wix-ui-icons-common";
4
4
  import clsx from "clsx";
5
+ import { Typography } from "../Typography/index.js";
5
6
  import * as __rspack_external_react from "react";
6
7
  const Accordion_module = {
7
8
  root: "root-jseiNO",
@@ -10,8 +11,11 @@ const Accordion_module = {
10
11
  box: "box-IGlTAZ",
11
12
  header: "header-YZESJq",
12
13
  trigger: "trigger-cbcjp2",
14
+ title: "title-Akf754",
15
+ subtitle: "subtitle-wfobjk",
13
16
  small: "small-ECItLE",
14
17
  large: "large-FlJRwV",
18
+ suffix: "suffix-O091QK",
15
19
  arrow: "arrow-yZ7Nq2",
16
20
  panel: "panel-Gp0XFK"
17
21
  };
@@ -54,12 +58,32 @@ const Arrow = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...
54
58
  "aria-hidden": "true",
55
59
  ...props
56
60
  }));
61
+ const Title = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Typography, {
62
+ ref: ref,
63
+ variant: "p2",
64
+ render: /*#__PURE__*/ jsx("span", {}),
65
+ className: clsx(Accordion_module.title, className),
66
+ ...props
67
+ }));
68
+ const Subtitle = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
69
+ ref: ref,
70
+ className: clsx(Accordion_module.subtitle, className),
71
+ ...props
72
+ }));
73
+ const Suffix = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx("span", {
74
+ ref: ref,
75
+ className: clsx(Accordion_module.suffix, className),
76
+ ...props
77
+ }));
57
78
  const Accordion_Accordion = {
58
79
  Item: Item,
59
80
  Header: Header,
60
81
  Trigger: Trigger,
61
82
  Panel: Panel,
62
83
  Root: Root,
63
- Arrow: Arrow
84
+ Arrow: Arrow,
85
+ Title: Title,
86
+ Subtitle: Subtitle,
87
+ Suffix: Suffix
64
88
  };
65
89
  export { AccordionSize, AccordionVariant, Accordion_Accordion as Accordion };
package/dist/index.d.ts CHANGED
@@ -245,6 +245,15 @@ export declare const Accordion: {
245
245
  Arrow: React_2.ForwardRefExoticComponent<ChevronDownProps & {
246
246
  className?: string | undefined;
247
247
  } & React_2.RefAttributes<SVGSVGElement>>;
248
+ Title: React_2.ForwardRefExoticComponent<Omit<Omit<TypographyProps, "variant">, "className"> & {
249
+ className?: string | undefined;
250
+ } & React_2.RefAttributes<HTMLElement>>;
251
+ Subtitle: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLSpanElement>, "className"> & {
252
+ className?: string | undefined;
253
+ } & React_2.RefAttributes<HTMLSpanElement>>;
254
+ Suffix: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLSpanElement>, "className"> & {
255
+ className?: string | undefined;
256
+ } & React_2.RefAttributes<HTMLSpanElement>>;
248
257
  };
249
258
 
250
259
  export declare const AccordionSize: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-ui",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Pure UI components for the Wix site builder",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -78,5 +78,5 @@
78
78
  "registry": "https://registry.npmjs.org/",
79
79
  "access": "public"
80
80
  },
81
- "falconPackageHash": "b2b7a8518aee6afaa0290fba74856876f2786c40325b333c0b16cf14"
81
+ "falconPackageHash": "a45e916c77f07bd74194aeb6f8facffce3c66221d508c95fc8a9a8b2"
82
82
  }