@wix/site-ui 1.88.0 → 1.90.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.
@@ -38,8 +38,8 @@
38
38
 
39
39
  .trigger-UPubf5[data-variant="box"], .trigger-UPubf5[data-variant="line"] {
40
40
  justify-content: space-between;
41
- width: 220px;
42
- min-width: 220px;
41
+ width: 100%;
42
+ min-width: 88px;
43
43
  padding-inline: 12px;
44
44
  }
45
45
 
@@ -50,6 +50,7 @@
50
50
  var(--wst-system-line-1-color, #000) 60%,
51
51
  transparent);
52
52
  background-color: var(--wst-primary-background-color, #fff);
53
+ border-radius: 4px;
53
54
  }
54
55
 
55
56
  .trigger-UPubf5[data-variant="line"] {
@@ -121,7 +122,7 @@
121
122
  transform: none;
122
123
  }
123
124
 
124
- .trigger-UPubf5 > span {
125
+ .trigger-UPubf5 > span:not(.value-fKND1Z) {
125
126
  white-space: nowrap;
126
127
  flex-shrink: 0;
127
128
  }
@@ -147,7 +148,7 @@
147
148
  }
148
149
 
149
150
  .value-fKND1Z {
150
- text-overflow: ellipsis;
151
+ text-overflow: clip;
151
152
  white-space: nowrap;
152
153
  flex: auto;
153
154
  min-width: 0;
@@ -167,18 +168,14 @@
167
168
 
168
169
  .popup-BEvbSY {
169
170
  background-color: var(--wst-primary-background-color, #fff);
170
- min-width: max(var(--anchor-width), 220px);
171
+ min-width: max(var(--anchor-width), 88px);
171
172
  box-sizing: border-box;
172
173
  border: 0;
173
- max-width: 320px;
174
+ border-radius: 4px;
174
175
  overflow: hidden;
175
176
  box-shadow: 0 4px 8px #0000001f, 0 0 4px #0000001a;
176
177
  }
177
178
 
178
- .popup-BEvbSY[data-variant="box"], .popup-BEvbSY[data-variant="line"] {
179
- min-width: max(var(--anchor-width), 220px);
180
- }
181
-
182
179
  .popup-BEvbSY[data-outer-border] {
183
180
  border-width: var(--wst-system-line-1-width, 1px);
184
181
  border-style: solid;
@@ -187,43 +184,6 @@
187
184
  transparent);
188
185
  }
189
186
 
190
- .popupDynamicWidth-XmkrCB {
191
- width: max-content;
192
- }
193
-
194
- .narrowTrigger-sSpJ7t {
195
- justify-content: space-between;
196
- width: 200px;
197
- }
198
-
199
- .narrowTrigger-sSpJ7t .value-fKND1Z {
200
- flex-shrink: 1;
201
- flex-basis: 0;
202
- }
203
-
204
- .blockTrigger-FJvDrq {
205
- justify-content: space-between;
206
- width: 320px;
207
- }
208
-
209
- .exampleStack-urnxUp {
210
- flex-direction: column;
211
- gap: 10px;
212
- display: flex;
213
- }
214
-
215
- .counter-vIhcIf {
216
- min-width: 20px;
217
- height: 20px;
218
- font: var(--wst-paragraph-3-font);
219
- color: var(--wst-paragraph-2-color, #000);
220
- background-color: color-mix(in srgb,
221
- var(--wst-base-2-color, #000) 8%,
222
- transparent);
223
- border-radius: 10px;
224
- padding-inline: 6px;
225
- }
226
-
227
187
  .list-fTpwcL {
228
188
  flex-direction: column;
229
189
  max-height: 300px;
@@ -305,7 +265,6 @@ body .item-SBIvtk.item-SBIvtk.item-SBIvtk.item-SBIvtk:focus, body .item-SBIvtk.i
305
265
 
306
266
  .itemDescription-MNvNbs {
307
267
  font: var(--wst-paragraph-3-font);
308
- color: var(--wst-shade-3-color, #767676);
309
268
  text-overflow: ellipsis;
310
269
  overflow: hidden;
311
270
  }
@@ -323,6 +282,11 @@ body .item-SBIvtk.item-SBIvtk.item-SBIvtk.item-SBIvtk:focus, body .item-SBIvtk.i
323
282
  height: 20px;
324
283
  }
325
284
 
285
+ .itemIcon-ASIDFq svg {
286
+ width: 100%;
287
+ height: 100%;
288
+ }
289
+
326
290
  .itemIndicator-qlxJA4 {
327
291
  width: 16px;
328
292
  height: 16px;
@@ -368,7 +332,16 @@ body .item-SBIvtk.item-SBIvtk.item-SBIvtk.item-SBIvtk:focus, body .item-SBIvtk.i
368
332
  .error-rsn7w1 {
369
333
  font: var(--wst-paragraph-3-font);
370
334
  color: var(--wst-system-error-color, #df3131);
335
+ align-items: center;
336
+ gap: 4px;
371
337
  margin: 4px 0 0;
338
+ display: flex;
339
+ }
340
+
341
+ .error-rsn7w1 svg {
342
+ flex-shrink: 0;
343
+ width: 1lh;
344
+ height: 1lh;
372
345
  }
373
346
 
374
347
  .description-WHObss {
@@ -1813,11 +1813,6 @@ const Select_module = {
1813
1813
  backdrop: "backdrop-kGw5mZ",
1814
1814
  positioner: "positioner-rz27gX",
1815
1815
  popup: "popup-BEvbSY",
1816
- popupDynamicWidth: "popupDynamicWidth-XmkrCB",
1817
- narrowTrigger: "narrowTrigger-sSpJ7t",
1818
- blockTrigger: "blockTrigger-FJvDrq",
1819
- exampleStack: "exampleStack-urnxUp",
1820
- counter: "counter-vIhcIf",
1821
1816
  list: "list-fTpwcL",
1822
1817
  item: "item-SBIvtk",
1823
1818
  itemText: "itemText-tVdjcF",
@@ -719,8 +719,9 @@ export declare const SelectField: React_2.ForwardRefExoticComponent<RootOwnProps
719
719
  /** Gap in pixels between the trigger and the popup. */
720
720
  sideOffset?: number | undefined;
721
721
  /**
722
- * Text direction. Forwarded to both the trigger and the portaled popup so the
723
- * popup lays out correctly even though it renders outside the field's subtree.
722
+ * Text direction. Forwarded to the trigger and to the portaled positioner +
723
+ * popup so they lay out and anchor (RTL-aware `align`) correctly even though
724
+ * they render outside the field's subtree.
724
725
  */
725
726
  dir?: "ltr" | "rtl" | undefined;
726
727
  /** Class applied to the trigger button. */
@@ -786,8 +787,9 @@ export declare type SelectFieldProps = RootOwnProps & {
786
787
  /** Gap in pixels between the trigger and the popup. */
787
788
  sideOffset?: number;
788
789
  /**
789
- * Text direction. Forwarded to both the trigger and the portaled popup so the
790
- * popup lays out correctly even though it renders outside the field's subtree.
790
+ * Text direction. Forwarded to the trigger and to the portaled positioner +
791
+ * popup so they lay out and anchor (RTL-aware `align`) correctly even though
792
+ * they render outside the field's subtree.
791
793
  */
792
794
  dir?: 'ltr' | 'rtl';
793
795
  /** Class applied to the trigger button. */
@@ -1,8 +1,8 @@
1
1
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { ChevronDown, InfoCircle } from "@wix/wix-ui-icons-common";
2
3
  import { Select, Select_module } from "../Select/index.js";
3
4
  import { FieldRoot_FieldRoot, FieldError_FieldError, FieldDescription_FieldDescription } from "../8972.js";
4
5
  import * as __rspack_external_react from "react";
5
- const DEFAULT_ICON = '▾';
6
6
  const isDivider = (item)=>'divider' in item;
7
7
  const isGroup = (item)=>'groupLabel' in item;
8
8
  function renderOption(option) {
@@ -41,7 +41,7 @@ function renderOption(option) {
41
41
  })
42
42
  }, value);
43
43
  }
44
- const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options, label, 'aria-label': ariaLabel, placeholder, description, error, variant = 'floating', alignment = 'start', invalid = false, loading = false, required = false, disabled = false, readOnly, icon = DEFAULT_ICON, outerBorder = false, sideOffset = 4, dir, triggerClassName, popupClassName, ...rootProps }, ref)=>/*#__PURE__*/ jsx(FieldRoot_FieldRoot, {
44
+ const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options, label, 'aria-label': ariaLabel, placeholder, description, error, variant = 'floating', alignment = 'start', invalid = false, loading = false, required = false, disabled = false, readOnly, icon = /*#__PURE__*/ jsx(ChevronDown, {}), outerBorder = false, sideOffset = 4, dir, triggerClassName, popupClassName, ...rootProps }, ref)=>/*#__PURE__*/ jsx(FieldRoot_FieldRoot, {
45
45
  className: Select_module.root,
46
46
  invalid: invalid,
47
47
  disabled: disabled,
@@ -82,10 +82,15 @@ const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options,
82
82
  })
83
83
  ]
84
84
  }),
85
- null != error ? /*#__PURE__*/ jsx(FieldError_FieldError, {
85
+ null != error ? /*#__PURE__*/ jsxs(FieldError_FieldError, {
86
86
  className: Select_module.error,
87
87
  match: invalid,
88
- children: error
88
+ children: [
89
+ /*#__PURE__*/ jsx(InfoCircle, {
90
+ "aria-hidden": true
91
+ }),
92
+ error
93
+ ]
89
94
  }) : null,
90
95
  null != description ? /*#__PURE__*/ jsx(FieldDescription_FieldDescription, {
91
96
  className: Select_module.description,
@@ -93,6 +98,8 @@ const SelectField = /*#__PURE__*/ __rspack_external_react.forwardRef(({ options,
93
98
  }) : null,
94
99
  /*#__PURE__*/ jsx(Select.Portal, {
95
100
  children: /*#__PURE__*/ jsx(Select.Positioner, {
101
+ dir: dir,
102
+ align: "start",
96
103
  alignItemWithTrigger: false,
97
104
  sideOffset: sideOffset,
98
105
  children: /*#__PURE__*/ jsx(Select.Popup, {
package/dist/index.d.ts CHANGED
@@ -8958,8 +8958,9 @@ export declare const SelectField: React_2.ForwardRefExoticComponent<RootOwnProps
8958
8958
  /** Gap in pixels between the trigger and the popup. */
8959
8959
  sideOffset?: number | undefined;
8960
8960
  /**
8961
- * Text direction. Forwarded to both the trigger and the portaled popup so the
8962
- * popup lays out correctly even though it renders outside the field's subtree.
8961
+ * Text direction. Forwarded to the trigger and to the portaled positioner +
8962
+ * popup so they lay out and anchor (RTL-aware `align`) correctly even though
8963
+ * they render outside the field's subtree.
8963
8964
  */
8964
8965
  dir?: "ltr" | "rtl" | undefined;
8965
8966
  /** Class applied to the trigger button. */
@@ -9025,8 +9026,9 @@ export declare type SelectFieldProps = RootOwnProps & {
9025
9026
  /** Gap in pixels between the trigger and the popup. */
9026
9027
  sideOffset?: number;
9027
9028
  /**
9028
- * Text direction. Forwarded to both the trigger and the portaled popup so the
9029
- * popup lays out correctly even though it renders outside the field's subtree.
9029
+ * Text direction. Forwarded to the trigger and to the portaled positioner +
9030
+ * popup so they lay out and anchor (RTL-aware `align`) correctly even though
9031
+ * they render outside the field's subtree.
9030
9032
  */
9031
9033
  dir?: 'ltr' | 'rtl';
9032
9034
  /** Class applied to the trigger button. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-ui",
3
- "version": "1.88.0",
3
+ "version": "1.90.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": "5487b52dceba792843845f2f0203cae7c727c8654c0ebf616e361b66"
98
+ "falconPackageHash": "44b9b3e5fde142552a4990cc7f18cc6b31df121b9494732e85bbca72"
99
99
  }