@wix/site-ui 1.107.0 → 1.109.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.
package/dist/8685.css CHANGED
@@ -11,7 +11,7 @@
11
11
  transparent);
12
12
  background-color: var(--wst-primary-background-color, #fff);
13
13
  vertical-align: middle;
14
- border-radius: 0;
14
+ border-radius: 4px;
15
15
  margin: 0;
16
16
  padding-block: 8px;
17
17
  padding-inline: 12px;
@@ -33,6 +33,11 @@
33
33
  color: var(--wst-shade-3-color, #767676);
34
34
  }
35
35
 
36
+ .descriptionEnd-O3mOtW {
37
+ text-align: end;
38
+ align-self: flex-end;
39
+ }
40
+
36
41
  .control-fRhDZ8 {
37
42
  width: 100%;
38
43
  }
@@ -61,6 +66,15 @@
61
66
  padding-block: 24px 6px;
62
67
  }
63
68
 
69
+ .root-ECdHfF:has(.labelFloating-io8BLN) .group-XazO1A {
70
+ align-items: end;
71
+ padding-block: 0;
72
+ }
73
+
74
+ .root-ECdHfF:has(.labelFloating-io8BLN) .adornment-Z1N0NF {
75
+ padding-block-end: 6px;
76
+ }
77
+
64
78
  .labelFloating-io8BLN {
65
79
  z-index: 2;
66
80
  color: var(--wst-shade-3-color, #767676);
@@ -73,7 +87,7 @@
73
87
  transform: translateY(-50%);
74
88
  }
75
89
 
76
- .labelFloating-io8BLN[data-filled], .labelFloating-io8BLN[data-focused] {
90
+ .labelFloating-io8BLN[data-filled], .labelFloating-io8BLN[data-focused], .root-ECdHfF:has(.control-fRhDZ8[placeholder]:not([placeholder=""])) .labelFloating-io8BLN, .root-ECdHfF:has(.labelFloating-io8BLN):has(.adornment-Z1N0NF) .labelFloating-io8BLN {
77
91
  font-size: 12px;
78
92
  inset-block-start: 8px;
79
93
  transform: translateY(0);
@@ -83,3 +97,78 @@
83
97
  width: 100%;
84
98
  }
85
99
 
100
+ div.group-XazO1A {
101
+ align-items: center;
102
+ gap: 8px;
103
+ display: flex;
104
+ }
105
+
106
+ .group-XazO1A:focus-within {
107
+ border-color: var(--wst-system-line-1-color, #000);
108
+ }
109
+
110
+ .group-XazO1A:has(.control-fRhDZ8:focus) {
111
+ box-shadow: 0 0 0 2px var(--wst-links-and-actions-color, #116dff);
112
+ }
113
+
114
+ .group-XazO1A:has(.control-fRhDZ8[aria-invalid="true"]) {
115
+ border-color: color-mix(in srgb,
116
+ var(--wst-system-error-color, #df3131) 60%,
117
+ transparent);
118
+ }
119
+
120
+ .group-XazO1A:has(.control-fRhDZ8[aria-invalid="true"]):hover, .group-XazO1A:has(.control-fRhDZ8[aria-invalid="true"]):focus-within {
121
+ border-color: var(--wst-system-error-color, #df3131);
122
+ }
123
+
124
+ .group-XazO1A:has(.control-fRhDZ8[data-valid]) {
125
+ border-color: color-mix(in srgb,
126
+ var(--wst-system-success-color, #008250) 60%,
127
+ transparent);
128
+ }
129
+
130
+ .group-XazO1A:has(.control-fRhDZ8:disabled) {
131
+ cursor: not-allowed;
132
+ }
133
+
134
+ .group-XazO1A:has(.control-fRhDZ8:disabled):hover {
135
+ border-color: color-mix(in srgb,
136
+ var(--wst-system-line-1-color, #000) 60%,
137
+ transparent);
138
+ }
139
+
140
+ .group-XazO1A:has(.control-fRhDZ8:disabled) .adornment-Z1N0NF {
141
+ color: var(--wst-system-disabled-color, #939393);
142
+ }
143
+
144
+ .group-XazO1A.groupLine-vlna4V {
145
+ border-width: 0;
146
+ border-block-end-width: var(--wst-system-line-1-width, 1px);
147
+ border-radius: 0;
148
+ padding-inline: 0;
149
+ }
150
+
151
+ .group-XazO1A .control-fRhDZ8 {
152
+ background-color: #0000;
153
+ border: 0;
154
+ flex: auto;
155
+ width: auto;
156
+ min-width: 0;
157
+ padding-block: 0;
158
+ padding-inline: 0;
159
+ }
160
+
161
+ .adornment-Z1N0NF {
162
+ font: var(--wst-paragraph-2-font);
163
+ color: var(--wst-shade-3-color, #767676);
164
+ flex-shrink: 0;
165
+ align-items: center;
166
+ display: inline-flex;
167
+ }
168
+
169
+ .adornment-Z1N0NF > svg {
170
+ width: 20px;
171
+ height: 20px;
172
+ display: block;
173
+ }
174
+
@@ -110,6 +110,8 @@ declare type ControlVariant = 'box' | 'line';
110
110
 
111
111
  declare const decrementPress: "decrement-press";
112
112
 
113
+ declare type DescriptionAlign = 'start' | 'end';
114
+
113
115
  declare const disabled: "disabled";
114
116
 
115
117
  declare const drag: "drag";
@@ -133,12 +135,17 @@ export declare const Field: {
133
135
  } & React_2.RefAttributes<HTMLDivElement>>;
134
136
  Description: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldDescriptionProps_2, "ref"> & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "className"> & {
135
137
  className?: string | undefined;
136
- } & React_2.RefAttributes<HTMLParagraphElement>>;
137
- Control: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
138
- className?: string | undefined;
139
138
  } & {
139
+ /** Horizontal alignment of the text. */
140
+ align?: DescriptionAlign | undefined;
141
+ } & React_2.RefAttributes<HTMLParagraphElement>>;
142
+ Control: React_2.ForwardRefExoticComponent<Omit<WithStringClassName<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">>, "prefix" | "suffix"> & {
140
143
  /** `line` swaps the boxed border for a single bottom border. */
141
144
  variant?: ControlVariant | undefined;
145
+ /** Content shown inside the field before the input. */
146
+ prefix?: React_2.ReactNode;
147
+ /** Content shown inside the field after the input. */
148
+ suffix?: React_2.ReactNode;
142
149
  } & React_2.RefAttributes<HTMLElement>>;
143
150
  Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldItemProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
144
151
  className?: string | undefined;
@@ -682,4 +689,8 @@ declare type WithBaseUIEvent<T> = { [K in keyof T]: WithPreventBaseUIHandler<T[K
682
689
 
683
690
  declare type WithPreventBaseUIHandler<T> = T extends ((event: infer E) => any) ? E extends React_2.SyntheticEvent<Element, Event> ? (event: BaseUIEvent<E>) => ReturnType<T> : T : T extends undefined ? undefined : T;
684
691
 
692
+ declare type WithStringClassName<P> = Omit<P, 'className'> & {
693
+ className?: string;
694
+ };
695
+
685
696
  export { }
@@ -675,10 +675,14 @@ const Field_module = {
675
675
  label: "label-YSWZBs",
676
676
  error: "error-BUDKWp",
677
677
  description: "description-IVviYU",
678
+ descriptionEnd: "descriptionEnd-O3mOtW",
678
679
  control: "control-fRhDZ8",
679
680
  controlLine: "controlLine-cAw0CF",
680
681
  labelFloating: "labelFloating-io8BLN",
681
- item: "item-kQeHOQ"
682
+ group: "group-XazO1A",
683
+ adornment: "adornment-Z1N0NF",
684
+ item: "item-kQeHOQ",
685
+ groupLine: "groupLine-vlna4V"
682
686
  };
683
687
  const Root = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldRoot_FieldRoot, {
684
688
  ref: ref,
@@ -706,9 +710,11 @@ const Error = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...
706
710
  }),
707
711
  ...props
708
712
  }));
709
- const Description = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldDescription_FieldDescription, {
713
+ const Description = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, align = 'start', ...props }, ref)=>/*#__PURE__*/ jsx(FieldDescription_FieldDescription, {
710
714
  ref: ref,
711
- className: clsx(Field_module.description, className),
715
+ className: clsx(Field_module.description, {
716
+ [Field_module.descriptionEnd]: 'end' === align
717
+ }, className),
712
718
  ...props
713
719
  }));
714
720
  const TEXT_INPUT_TYPES = new Set([
@@ -725,16 +731,41 @@ const TEXT_INPUT_TYPES = new Set([
725
731
  'week',
726
732
  'time'
727
733
  ]);
728
- const Control = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, type = 'text', variant = 'box', ...props }, ref)=>/*#__PURE__*/ jsx(FieldControl_FieldControl, {
734
+ const hasAdornment = (node)=>null != node && 'boolean' != typeof node;
735
+ const Control = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, type = 'text', variant = 'box', prefix, suffix, ...props }, ref)=>{
736
+ const showPrefix = hasAdornment(prefix);
737
+ const showSuffix = hasAdornment(suffix);
738
+ const adorned = showPrefix || showSuffix;
739
+ const control = /*#__PURE__*/ jsx(FieldControl_FieldControl, {
729
740
  ref: ref,
730
741
  type: type,
731
742
  className: clsx({
732
743
  [Input_module.root]: TEXT_INPUT_TYPES.has(type)
733
744
  }, Field_module.control, {
734
745
  [Field_module.controlLine]: 'line' === variant
746
+ }, {
747
+ 'has-custom-focus': adorned
735
748
  }, className),
736
749
  ...props
737
- }));
750
+ });
751
+ if (!adorned) return control;
752
+ return /*#__PURE__*/ jsxs("div", {
753
+ className: clsx(Input_module.root, Field_module.group, {
754
+ [Field_module.groupLine]: 'line' === variant
755
+ }),
756
+ children: [
757
+ showPrefix && /*#__PURE__*/ jsx("span", {
758
+ className: Field_module.adornment,
759
+ children: prefix
760
+ }),
761
+ control,
762
+ showSuffix && /*#__PURE__*/ jsx("span", {
763
+ className: Field_module.adornment,
764
+ children: suffix
765
+ })
766
+ ]
767
+ });
768
+ });
738
769
  const Item = /*#__PURE__*/ __rspack_external_react.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(FieldItem_FieldItem, {
739
770
  ref: ref,
740
771
  className: clsx(Field_module.item, className),
@@ -1,3 +1,4 @@
1
+ import { DescriptionAlign } from '../Field/Field';
1
2
  import { FieldControlProps } from '@base-ui/react/field';
2
3
  import { FieldDescriptionProps } from '../Field';
3
4
  import { FieldDescriptionProps as FieldDescriptionProps_2 } from '@base-ui/react/field';
@@ -54,6 +55,8 @@ declare type ComponentRenderFn<Props, State> = (props: Props, state: State) => R
54
55
 
55
56
  declare type ControlVariant = 'box' | 'line';
56
57
 
58
+ declare type DescriptionAlign_2 = 'start' | 'end';
59
+
57
60
  declare const Field: {
58
61
  Root: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldRootProps_3, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
59
62
  className?: string | undefined;
@@ -69,12 +72,17 @@ declare const Field: {
69
72
  } & React_2.RefAttributes<HTMLDivElement>>;
70
73
  Description: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldDescriptionProps_2, "ref"> & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "className"> & {
71
74
  className?: string | undefined;
72
- } & React_2.RefAttributes<HTMLParagraphElement>>;
73
- Control: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldControlProps, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
74
- className?: string | undefined;
75
75
  } & {
76
+ /** Horizontal alignment of the text. */
77
+ align?: DescriptionAlign_2 | undefined;
78
+ } & React_2.RefAttributes<HTMLParagraphElement>>;
79
+ Control: React_2.ForwardRefExoticComponent<Omit<WithStringClassName<Omit<Omit<FieldControlProps, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">>, "prefix" | "suffix"> & {
76
80
  /** `line` swaps the boxed border for a single bottom border. */
77
81
  variant?: ControlVariant | undefined;
82
+ /** Content shown inside the field before the input. */
83
+ prefix?: React_2.ReactNode;
84
+ /** Content shown inside the field after the input. */
85
+ suffix?: React_2.ReactNode;
78
86
  } & React_2.RefAttributes<HTMLElement>>;
79
87
  Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldItemProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
80
88
  className?: string | undefined;
@@ -185,6 +193,8 @@ export declare const RadioField: React_2.ForwardRefExoticComponent<Omit<Omit<Omi
185
193
  /** Props forwarded to the `Field.Description`. */
186
194
  descriptionProps?: Omit<Omit<Omit<Omit<Omit<FieldDescriptionProps, "ref"> & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "className"> & {
187
195
  className?: string | undefined;
196
+ } & {
197
+ align?: DescriptionAlign | undefined;
188
198
  } & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "children"> | undefined;
189
199
  /** Props forwarded to the `Field.Error`. */
190
200
  errorProps?: Omit<Omit<Omit<Omit<Omit<FieldErrorProps, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
package/dist/index.d.ts CHANGED
@@ -73,6 +73,7 @@ import { ContextMenuRadioItemIndicatorProps as ContextMenuRadioItemIndicatorProp
73
73
  import { ContextMenuRadioItemProps as ContextMenuRadioItemProps_2 } from '@base-ui/react/context-menu';
74
74
  import { ContextMenuSubmenuTriggerProps as ContextMenuSubmenuTriggerProps_2 } from '@base-ui/react/context-menu';
75
75
  import { ContextMenuTriggerProps as ContextMenuTriggerProps_2 } from '@base-ui/react/context-menu';
76
+ import { DescriptionAlign as DescriptionAlign_2 } from '../Field/Field';
76
77
  import { DialogBackdropProps as DialogBackdropProps_2 } from '@base-ui/react/dialog';
77
78
  import { DialogCloseProps as DialogCloseProps_2 } from '@base-ui/react/dialog';
78
79
  import { DialogDescriptionProps as DialogDescriptionProps_2 } from '@base-ui/react/dialog';
@@ -3103,6 +3104,8 @@ declare const DEFAULT_SIZE: {
3103
3104
 
3104
3105
  declare function Description({ className, ...props }: WithStringClassName<Drawer_2.Description.Props>): JSX_2.Element;
3105
3106
 
3107
+ declare type DescriptionAlign = 'start' | 'end';
3108
+
3106
3109
  export declare const Dialog: {
3107
3110
  Backdrop: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<DialogBackdropProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
3108
3111
  className?: string | undefined;
@@ -4197,12 +4200,17 @@ export declare const Field: {
4197
4200
  } & React_2.RefAttributes<HTMLDivElement>>;
4198
4201
  Description: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldDescriptionProps_2, "ref"> & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "className"> & {
4199
4202
  className?: string | undefined;
4200
- } & React_2.RefAttributes<HTMLParagraphElement>>;
4201
- Control: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">, "className"> & {
4202
- className?: string | undefined;
4203
4203
  } & {
4204
+ /** Horizontal alignment of the text. */
4205
+ align?: DescriptionAlign | undefined;
4206
+ } & React_2.RefAttributes<HTMLParagraphElement>>;
4207
+ Control: React_2.ForwardRefExoticComponent<Omit<WithStringClassName<Omit<Omit<FieldControlProps_2, "ref"> & React_2.RefAttributes<HTMLElement>, "ref">>, "prefix" | "suffix"> & {
4204
4208
  /** `line` swaps the boxed border for a single bottom border. */
4205
4209
  variant?: ControlVariant | undefined;
4210
+ /** Content shown inside the field before the input. */
4211
+ prefix?: React_2.ReactNode;
4212
+ /** Content shown inside the field after the input. */
4213
+ suffix?: React_2.ReactNode;
4206
4214
  } & React_2.RefAttributes<HTMLElement>>;
4207
4215
  Item: React_2.ForwardRefExoticComponent<Omit<Omit<Omit<FieldItemProps_2, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
4208
4216
  className?: string | undefined;
@@ -8350,6 +8358,8 @@ export declare const RadioField: React_2.ForwardRefExoticComponent<Omit<Omit<Omi
8350
8358
  /** Props forwarded to the `Field.Description`. */
8351
8359
  descriptionProps?: Omit<Omit<Omit<Omit<Omit<FieldDescriptionProps_3, "ref"> & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "className"> & {
8352
8360
  className?: string | undefined;
8361
+ } & {
8362
+ align?: DescriptionAlign_2 | undefined;
8353
8363
  } & React_2.RefAttributes<HTMLParagraphElement>, "ref">, "children"> | undefined;
8354
8364
  /** Props forwarded to the `Field.Error`. */
8355
8365
  errorProps?: Omit<Omit<Omit<Omit<Omit<FieldErrorProps_3, "ref"> & React_2.RefAttributes<HTMLDivElement>, "ref">, "className"> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-ui",
3
- "version": "1.107.0",
3
+ "version": "1.109.0",
4
4
  "description": "Pure UI components for the Wix site builder",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -95,5 +95,5 @@
95
95
  "registry": "https://registry.npmjs.org/",
96
96
  "access": "public"
97
97
  },
98
- "falconPackageHash": "65a32ebe441a030aa575584abf914e7d8ab9707c45d7485eda73b47d"
98
+ "falconPackageHash": "5921866bf296b91546f45790116e4a0e544eb65d57c1c94ad19e9f2e"
99
99
  }