@nuskin/react-search-components 1.0.0-widget-integration.1 → 1.0.0-widget-integration.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.
package/dist/index.mjs CHANGED
@@ -12462,7 +12462,7 @@ var SearchMessageInputRoot = styled4.form`
12462
12462
  border-radius: 1.5rem;
12463
12463
  display: grid;
12464
12464
  gap: 0.5rem;
12465
- grid-template-columns: minmax(0, 1fr) auto;
12465
+ grid-template-columns: ${({ $hasActions = true }) => $hasActions ? "minmax(0, 1fr) auto" : "minmax(0, 1fr)"};
12466
12466
  inline-size: 100%;
12467
12467
  padding: 0.5rem;
12468
12468
 
@@ -12505,10 +12505,10 @@ var SearchMessageInputActionButton = styled4.button`
12505
12505
  &&&& {
12506
12506
  align-items: center;
12507
12507
  appearance: none;
12508
- background-color: ${({ $active, $voiceListening }) => $voiceListening ? voiceListeningColor : $active ? colors2.neutral[30] : "transparent"};
12508
+ background-color: ${({ $voiceListening }) => $voiceListening ? voiceListeningColor : "transparent"};
12509
12509
  border: 0;
12510
12510
  border-radius: 50% !important;
12511
- color: ${({ $active, $voiceListening }) => $voiceListening ? colors2.primary.white : $active ? colors2.neutral[20] : "inherit"};
12511
+ color: ${({ $voiceListening }) => $voiceListening ? colors2.primary.white : "inherit"};
12512
12512
  cursor: pointer;
12513
12513
  display: inline-flex;
12514
12514
  flex: 0 0 auto;
@@ -12565,7 +12565,6 @@ function SearchMessageInput({
12565
12565
  onVoiceInput,
12566
12566
  placeholder,
12567
12567
  showVoiceInput = false,
12568
- submitLabel,
12569
12568
  value,
12570
12569
  voiceInputLabel,
12571
12570
  voiceListening = false,
@@ -12598,61 +12597,44 @@ function SearchMessageInput({
12598
12597
  submitMessage();
12599
12598
  }
12600
12599
  }
12601
- return /* @__PURE__ */ jsxs(SearchMessageInputRoot, { ...props, $voiceListening: voiceListening, onSubmit: handleSubmit, children: [
12602
- /* @__PURE__ */ jsx(
12603
- SearchMessageInputField,
12604
- {
12605
- "aria-label": inputLabel,
12606
- onChange: (event) => {
12607
- setDraft(event.target.value);
12608
- onChange == null ? void 0 : onChange(event.target.value);
12609
- },
12610
- onKeyDown: handleKeyDown,
12611
- placeholder: voiceListening && !draft ? voiceListeningLabel : placeholder,
12612
- rows: 1,
12613
- value: draft
12614
- }
12615
- ),
12616
- /* @__PURE__ */ jsxs(SearchMessageInputActions, { children: [
12617
- showVoiceInput ? /* @__PURE__ */ jsx(
12618
- SearchMessageInputActionButton,
12619
- {
12620
- "aria-label": voiceInputLabel,
12621
- "aria-pressed": voiceListening,
12622
- $voiceListening: voiceListening,
12623
- onClick: onVoiceInput,
12624
- type: "button",
12625
- children: /* @__PURE__ */ jsx(Icon, { cursor: ICON_CURSORS.POINTER, type: ICON_TYPES.VOICE })
12626
- }
12627
- ) : null,
12628
- /* @__PURE__ */ jsx(
12629
- SearchMessageInputActionButton,
12630
- {
12631
- $active: message.length > 0,
12632
- "aria-label": submitLabel,
12633
- disabled: message.length === 0,
12634
- type: "submit",
12635
- children: /* @__PURE__ */ jsx(
12636
- Icon,
12637
- {
12638
- cursor: ICON_CURSORS.POINTER,
12639
- type: message.length > 0 ? ICON_TYPES.ARROW_UP : ICON_TYPES.ASK_NUI
12640
- }
12641
- )
12642
- }
12643
- )
12644
- ] })
12645
- ] });
12600
+ return /* @__PURE__ */ jsxs(
12601
+ SearchMessageInputRoot,
12602
+ {
12603
+ ...props,
12604
+ $hasActions: showVoiceInput,
12605
+ $voiceListening: voiceListening,
12606
+ onSubmit: handleSubmit,
12607
+ children: [
12608
+ /* @__PURE__ */ jsx(
12609
+ SearchMessageInputField,
12610
+ {
12611
+ "aria-label": inputLabel,
12612
+ onChange: (event) => {
12613
+ setDraft(event.target.value);
12614
+ onChange == null ? void 0 : onChange(event.target.value);
12615
+ },
12616
+ onKeyDown: handleKeyDown,
12617
+ placeholder: voiceListening && !draft ? voiceListeningLabel : placeholder,
12618
+ rows: 1,
12619
+ value: draft
12620
+ }
12621
+ ),
12622
+ showVoiceInput ? /* @__PURE__ */ jsx(SearchMessageInputActions, { children: /* @__PURE__ */ jsx(
12623
+ SearchMessageInputActionButton,
12624
+ {
12625
+ "aria-label": voiceInputLabel,
12626
+ "aria-pressed": voiceListening,
12627
+ $voiceListening: voiceListening,
12628
+ onClick: onVoiceInput,
12629
+ type: "button",
12630
+ children: /* @__PURE__ */ jsx(Icon, { cursor: ICON_CURSORS.POINTER, type: ICON_TYPES.VOICE })
12631
+ }
12632
+ ) }) : null
12633
+ ]
12634
+ }
12635
+ );
12646
12636
  }
12647
12637
  var { colors: colors3 } = nuskinTheme;
12648
- styled4.div`
12649
- position: fixed;
12650
- inset: 0;
12651
- z-index: 10000;
12652
- background: rgba(0, 0, 0, 0.3);
12653
- display: flex;
12654
- flex-direction: column;
12655
- `;
12656
12638
  var SearchPanelRoot = styled4.section`
12657
12639
  background-color: ${colors3.primary.white};
12658
12640
  border-block-end: 1px solid ${colors3.neutral[30]};
@@ -12802,13 +12784,15 @@ var colors4 = {
12802
12784
  };
12803
12785
  var SearchModalBackdropRoot = styled4.div`
12804
12786
  -webkit-tap-highlight-color: transparent;
12805
- background-color: rgba(0, 0, 0, 0.3);
12787
+ background-color: transparent;
12806
12788
  inset: 0;
12807
12789
  position: fixed;
12808
12790
  `;
12809
12791
  var SearchModalSurface = styled4.div`
12810
12792
  inline-size: 100%;
12811
12793
  outline: none;
12794
+ position: relative;
12795
+ z-index: 1;
12812
12796
  `;
12813
12797
  var SearchSuggestionsPanel = styled4.div`
12814
12798
  position: relative;
@@ -13561,7 +13545,6 @@ function SearchModal({
13561
13545
  onChange: input.onChange,
13562
13546
  onSubmit: input.onSubmit,
13563
13547
  placeholder,
13564
- submitLabel: placeholder,
13565
13548
  value: input.value,
13566
13549
  clearOnSubmit: false,
13567
13550
  "data-testid": "search-modal-input"