@phillips/seldon 1.146.0 → 1.146.2

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.
@@ -1,4 +1,4 @@
1
- var r = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- r as __exports
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = {};
1
+ var e = { exports: {} };
2
2
  export {
3
- e as __exports
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var r = {};
2
2
  export {
3
- e as __module
3
+ r as __exports
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var e = {};
2
2
  export {
3
- e as __module
3
+ e as __exports
4
4
  };
@@ -55,6 +55,14 @@ export interface ComboBoxProps {
55
55
  * If true, the input will be cleared when the user clicks away when the input value is not in the options list.
56
56
  */
57
57
  autoClearInput?: boolean;
58
+ /**
59
+ * popoverContainer ref for the ComboBox
60
+ */
61
+ popoverContainerRef?: React.RefObject<HTMLElement>;
62
+ /**
63
+ * No options message translation
64
+ */
65
+ noOptionsMessage?: string;
58
66
  }
59
67
  /**
60
68
  * ## Overview
@@ -1,9 +1,9 @@
1
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { Root as D, Trigger as E, Portal as T, Content as j } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { Root as T, Trigger as j, Portal as F, Content as K } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
3
3
  import p from "../../node_modules/classnames/index.js";
4
- import { Command as w, CommandInput as F, CommandList as K, CommandGroup as G, CommandItem as X } from "../../node_modules/cmdk/dist/index.js";
4
+ import { Command as w, CommandInput as G, CommandList as X, CommandGroup as q, CommandItem as z } from "../../node_modules/cmdk/dist/index.js";
5
5
  import l from "react";
6
- import { useOnClickOutside as q } from "../../node_modules/usehooks-ts/dist/index.js";
6
+ import { useOnClickOutside as A } from "../../node_modules/usehooks-ts/dist/index.js";
7
7
  import "../../assets/formatted/AccountActive.js";
8
8
  import "../../assets/formatted/Account.js";
9
9
  import "../../assets/formatted/Add.js";
@@ -14,11 +14,11 @@ import "../../assets/formatted/ArrowRight.js";
14
14
  import "../../assets/formatted/ArrowUp.js";
15
15
  import "../../assets/formatted/Bag.js";
16
16
  import "../../assets/formatted/Calendar.js";
17
- import z from "../../assets/formatted/ChevronDown.js";
17
+ import H from "../../assets/formatted/ChevronDown.js";
18
18
  import "../../assets/formatted/ChevronLeft.js";
19
19
  import "../../assets/formatted/ChevronRight.js";
20
20
  import "../../assets/formatted/ChevronUp.js";
21
- import A from "../../assets/formatted/CloseX.js";
21
+ import J from "../../assets/formatted/CloseX.js";
22
22
  import "../../assets/formatted/ConditionReport.js";
23
23
  import "../../assets/formatted/Delete.js";
24
24
  import "../../assets/formatted/Download.js";
@@ -68,9 +68,9 @@ import "../../assets/formatted/VolumeMaximum.js";
68
68
  import "../../assets/formatted/VolumeMid.js";
69
69
  import "../../assets/formatted/VolumeMinimum.js";
70
70
  import "../../assets/formatted/WeChat.js";
71
- import { getCommonProps as H } from "../../utils/index.js";
71
+ import { getCommonProps as M } from "../../utils/index.js";
72
72
  import { getScssVar as v } from "../../utils/scssUtils.js";
73
- const J = l.forwardRef(function({
73
+ const Q = l.forwardRef(function({
74
74
  options: N = [],
75
75
  className: g,
76
76
  id: r,
@@ -84,18 +84,20 @@ const J = l.forwardRef(function({
84
84
  ariaLabelContent: _,
85
85
  hideLabel: R = !1,
86
86
  autoClearInput: O = !0,
87
- ...k
88
- }, y) {
89
- const { className: e, ...I } = H({ id: r }, "ComboBox"), [C, s] = l.useState(!1), $ = l.useRef(null), S = z, B = A, b = l.useRef(null), P = l.useRef({}), c = N.filter(
87
+ popoverContainerRef: k,
88
+ noOptionsMessage: y = "No Options.",
89
+ ...I
90
+ }, S) {
91
+ const { className: e, ...B } = M({ id: r }, "ComboBox"), [C, s] = l.useState(!1), $ = l.useRef(null), P = H, D = J, b = l.useRef(null), E = l.useRef({}), n = N.filter(
90
92
  (o) => o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())
91
93
  );
92
- return q(b, (o) => {
94
+ return A(b, (o) => {
93
95
  if (o.target.closest(`.${e}__item`) || o.target.closest(`.${e}__content`))
94
96
  return;
95
- !c.some(
97
+ !n.some(
96
98
  (a) => a.value.toLowerCase() === m.toLowerCase()
97
99
  ) && O && i(""), s(!1), o.stopPropagation();
98
- }), /* @__PURE__ */ t("div", { ref: y, className: p(e, g), id: r, ...I, ...k, children: /* @__PURE__ */ n("div", { ref: b, children: [
100
+ }), /* @__PURE__ */ t("div", { ref: S, className: p(e, g), id: r, ...B, ...I, children: /* @__PURE__ */ c("div", { ref: b, children: [
99
101
  /* @__PURE__ */ t(
100
102
  "label",
101
103
  {
@@ -116,10 +118,10 @@ const J = l.forwardRef(function({
116
118
  o.key === "Escape" && s(!1);
117
119
  }, 0);
118
120
  },
119
- children: /* @__PURE__ */ n(D, { open: !0, children: [
120
- /* @__PURE__ */ n("div", { className: `${e}__input-wrapper`, children: [
121
- /* @__PURE__ */ t(E, { asChild: !0, children: /* @__PURE__ */ t(
122
- F,
121
+ children: /* @__PURE__ */ c(T, { open: !0, children: [
122
+ /* @__PURE__ */ c("div", { className: `${e}__input-wrapper`, children: [
123
+ /* @__PURE__ */ t(j, { asChild: !0, children: /* @__PURE__ */ t(
124
+ G,
123
125
  {
124
126
  ref: $,
125
127
  placeholder: x,
@@ -148,7 +150,7 @@ const J = l.forwardRef(function({
148
150
  "aria-label": u || `${r}-clear`,
149
151
  tabIndex: -1,
150
152
  children: /* @__PURE__ */ t("div", { className: `${e}__icon`, children: /* @__PURE__ */ t(
151
- B,
153
+ D,
152
154
  {
153
155
  color: v("", "$primary-black"),
154
156
  height: 18,
@@ -173,7 +175,7 @@ const J = l.forwardRef(function({
173
175
  [`${e}__icon--flipped`]: C
174
176
  }),
175
177
  children: /* @__PURE__ */ t(
176
- S,
178
+ P,
177
179
  {
178
180
  color: v("", "$pure-black"),
179
181
  height: 18,
@@ -186,20 +188,20 @@ const J = l.forwardRef(function({
186
188
  }
187
189
  )
188
190
  ] }),
189
- /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(
190
- j,
191
+ /* @__PURE__ */ t(F, { container: k?.current, children: /* @__PURE__ */ t(
192
+ K,
191
193
  {
192
194
  className: `${e}__content`,
193
195
  "aria-label": _ || `${r}-content`,
194
- children: C && /* @__PURE__ */ t(K, { className: `${e}__list`, children: c.some(
196
+ children: C && /* @__PURE__ */ t(X, { className: `${e}__list`, children: n.some(
195
197
  (o) => o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())
196
- ) ? /* @__PURE__ */ t(G, { children: c.map(
198
+ ) ? /* @__PURE__ */ t(q, { children: n.map(
197
199
  (o, h) => (o.value.toLowerCase().includes(m.toLowerCase()) || o.label && o.label.toLowerCase().includes(m.toLowerCase())) && /* @__PURE__ */ t(
198
- X,
200
+ z,
199
201
  {
200
202
  className: `${e}__item`,
201
203
  value: o.label ? `${o.label} ${o.value}` : o.value,
202
- ref: (a) => P.current[o.value] = a,
204
+ ref: (a) => E.current[o.value] = a,
203
205
  onSelect: (a) => {
204
206
  i(a), s(!1);
205
207
  },
@@ -207,7 +209,7 @@ const J = l.forwardRef(function({
207
209
  },
208
210
  `${o.value}-${h}`
209
211
  )
210
- ) }) : /* @__PURE__ */ t(w.Empty, { children: "No Options." }) })
212
+ ) }) : /* @__PURE__ */ t(w.Empty, { children: y }) })
211
213
  }
212
214
  ) })
213
215
  ] })
@@ -215,7 +217,7 @@ const J = l.forwardRef(function({
215
217
  )
216
218
  ] }) });
217
219
  });
218
- J.displayName = "ComboBox";
220
+ Q.displayName = "ComboBox";
219
221
  export {
220
- J as default
222
+ Q as default
221
223
  };
@@ -16,3 +16,4 @@ export declare const Playground: {
16
16
  };
17
17
  argTypes: {};
18
18
  };
19
+ export declare const ComboBoxInDrawer: () => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { __module as t } from "../../_virtual/index7.js";
1
+ import { __module as t } from "../../_virtual/index5.js";
2
2
  /*!
3
3
  Copyright (c) 2015 Jed Watson.
4
4
  Based on code that is Copyright 2013-2015, Facebook, Inc.
@@ -1,6 +1,6 @@
1
- import { __exports as l } from "../../../_virtual/index5.js";
1
+ import { __exports as l } from "../../../_virtual/index7.js";
2
2
  import "./pipeline/index.js";
3
- import { __exports as _ } from "../../../_virtual/index6.js";
3
+ import { __exports as _ } from "../../../_virtual/index8.js";
4
4
  Object.defineProperty(l, "__esModule", {
5
5
  value: !0
6
6
  });
@@ -1,4 +1,4 @@
1
- import { __exports as u } from "../../../../_virtual/index6.js";
1
+ import { __exports as u } from "../../../../_virtual/index8.js";
2
2
  import "./build.js";
3
3
  import "./format.js";
4
4
  import "./validate.js";
@@ -1,4 +1,4 @@
1
- import { __module as e } from "../../../../_virtual/index8.js";
1
+ import { __module as e } from "../../../../_virtual/index6.js";
2
2
  import { __require as o } from "./cjs/react-is.production.min.js";
3
3
  import { __require as t } from "./cjs/react-is.development.js";
4
4
  var r;
@@ -1,8 +1,6 @@
1
1
  @use '../../../allPartials' as *;
2
2
 
3
3
  .#{$px}-nav__item {
4
- cursor: pointer;
5
-
6
4
  @include isHeaderMobile {
7
5
  a {
8
6
  white-space: normal;
@@ -35,6 +33,7 @@
35
33
  & > button {
36
34
  background-color: transparent;
37
35
  border: 0;
36
+ cursor: pointer;
38
37
  display: flex;
39
38
  padding: 0.5rem 0.625rem calc(0.5rem + 2px); // 1 px so that the bottom border of the nav counts as part of the button
40
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.146.0",
3
+ "version": "1.146.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"