@ornikar/kitt-universal 32.5.3-canary.00f8f98ae6299285821fb6a87eab9440995c7566.0 → 32.5.3-canary.f3d9b69069a5f00edad9110e1f71513d5e1ba86a.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.
@@ -6,7 +6,16 @@
6
6
  .kitt-u_opacityEnterActive_o1t4vl7b{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
7
7
  .kitt-u_opacityExit_ogyytm1{opacity:1;}
8
8
  .kitt-u_opacityExitActive_o18xvk52{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
9
- .kitt-u_inputTextContainer_i1encr9g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;}.kitt-u_inputTextContainer_i1encr9g > *::-ms-clear,.kitt-u_inputTextContainer_i1encr9g > *::-ms-reveal{display:none;}.kitt-u_inputTextContainer_i1encr9g > *{-webkit-transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;transition:border-color 200ms ease-in-out,background-color 200ms ease-in-out;}
9
+ .InputTextContainer-module_inputTextContainer__gzH8Q > * {
10
+ transition: 200ms ease-in-out;
11
+ border-radius: 4px;
12
+ }
13
+
14
+ .InputTextContainer-module_inputTextContainer__gzH8Q > *:hover,
15
+ .kitt-hover .InputTextContainer-module_inputTextContainer__gzH8Q > * {
16
+ background-color: #f7f4ee;
17
+ }
18
+
10
19
  /* Overlay animation styles - uses CSS variables for theme values */
11
20
  .FullscreenModalAnimation-module_overlay-enter__L1J1X {
12
21
  opacity: 0;
@@ -4229,29 +4229,6 @@ function useStaticBottomSheet(Content) {
4229
4229
  };
4230
4230
  }
4231
4231
 
4232
- function isDocumentBodyAvailable(body) {
4233
- return !!body;
4234
- }
4235
-
4236
- /**
4237
- * Returns document.body if it exists, or null otherwise.
4238
- * This is useful when document.body might not be available, such as when document.write() is called
4239
- * which destroys the DOM and causes React portals to fail with "Target container is not a DOM element" error.
4240
- */
4241
- function getDocumentBodyIfExists() {
4242
- // document.body can be null when document.write() is called
4243
- const body = typeof document !== 'undefined' ? document.body : null;
4244
- return isDocumentBodyAvailable(body) ? body : null;
4245
- }
4246
-
4247
- function Portal({
4248
- children
4249
- }) {
4250
- const container = getDocumentBodyIfExists();
4251
- if (!container) return null;
4252
- return /*#__PURE__*/createPortal(children, container);
4253
- }
4254
-
4255
4232
  function useBlockBodyScroll(shouldBlockScroll, isInitialRender) {
4256
4233
  useEffect(() => {
4257
4234
  if (shouldBlockScroll) {
@@ -4274,9 +4251,7 @@ function ModalBehaviourPortal({
4274
4251
  const isInitialRenderRef = useRef(true);
4275
4252
  useBlockBodyScroll(!!visible, isInitialRenderRef.current);
4276
4253
  isInitialRenderRef.current = false;
4277
- return children ? /*#__PURE__*/jsx(Portal, {
4278
- children: children
4279
- }) : null;
4254
+ return children ? /*#__PURE__*/createPortal(children, document.body) : null;
4280
4255
  }
4281
4256
 
4282
4257
  const OnCloseContext = /*#__PURE__*/createContext(() => {});
@@ -5414,10 +5389,11 @@ function InputPressable({
5414
5389
  });
5415
5390
  }
5416
5391
 
5417
- const inputTextContainer = "kitt-u_inputTextContainer_i1encr9g";
5392
+ const styles$3 = {"inputTextContainer":"InputTextContainer-module_inputTextContainer__gzH8Q"};
5393
+
5418
5394
  function InputTextContainer(props) {
5419
5395
  return /*#__PURE__*/jsx("div", {
5420
- className: inputTextContainer,
5396
+ className: styles$3.inputTextContainer,
5421
5397
  ...props
5422
5398
  });
5423
5399
  }
@@ -11772,89 +11748,87 @@ function Picker({
11772
11748
  disabled,
11773
11749
  ...restToggleProps
11774
11750
  })
11775
- }), /*#__PURE__*/jsx(Portal, {
11751
+ }), /*#__PURE__*/createPortal(/*#__PURE__*/jsx(View, {
11752
+ ref: refMemo,
11753
+ testID: testID,
11754
+ ...menuProps,
11755
+ position: strategy,
11756
+ top: 0,
11757
+ left: 0,
11758
+ width: isItemsWidthFixed ? '100%' : itemsWidth,
11759
+ maxWidth: isItemsWidthFixed ? 'kitt.picker.maxWidthFixed' : undefined,
11760
+ zIndex: 1,
11761
+ _web: {
11762
+ style: {
11763
+ transform: `translate3d(${tooltipX}px, ${tooltipY}px, 0)`,
11764
+ visibility: isOpen ? 'visible' : 'hidden',
11765
+ transitionDuration: '300ms',
11766
+ transitionProperty: 'opacity, padding',
11767
+ transitionTimingFunction: 'ease-in-out'
11768
+ }
11769
+ },
11776
11770
  children: /*#__PURE__*/jsx(View, {
11777
- ref: refMemo,
11778
- testID: testID,
11779
- ...menuProps,
11780
- position: strategy,
11781
- top: 0,
11782
- left: 0,
11783
- width: isItemsWidthFixed ? '100%' : itemsWidth,
11784
- maxWidth: isItemsWidthFixed ? 'kitt.picker.maxWidthFixed' : undefined,
11785
- zIndex: 1,
11771
+ opacity: isOpen ? 1 : 0,
11772
+ backgroundColor: "kitt.picker.web.optionsContainer.backgroundColor",
11773
+ borderRadius: "kitt.picker.web.optionsContainer.borderRadius",
11774
+ shadow: "kitt.picker.web.optionsContainer.shadow",
11786
11775
  _web: {
11787
11776
  style: {
11788
- transform: `translate3d(${tooltipX}px, ${tooltipY}px, 0)`,
11777
+ transform: `translateY(${isOpen ? 0 : 8})`,
11789
11778
  visibility: isOpen ? 'visible' : 'hidden',
11790
11779
  transitionDuration: '300ms',
11791
- transitionProperty: 'opacity, padding',
11792
11780
  transitionTimingFunction: 'ease-in-out'
11793
11781
  }
11794
11782
  },
11795
- children: /*#__PURE__*/jsx(View, {
11796
- opacity: isOpen ? 1 : 0,
11797
- backgroundColor: "kitt.picker.web.optionsContainer.backgroundColor",
11798
- borderRadius: "kitt.picker.web.optionsContainer.borderRadius",
11799
- shadow: "kitt.picker.web.optionsContainer.shadow",
11800
- _web: {
11801
- style: {
11802
- transform: `translateY(${isOpen ? 0 : 8})`,
11803
- visibility: isOpen ? 'visible' : 'hidden',
11804
- transitionDuration: '300ms',
11805
- transitionTimingFunction: 'ease-in-out'
11806
- }
11807
- },
11808
- children: /*#__PURE__*/jsx(CSSTransition, {
11809
- unmountOnExit: true,
11810
- nodeRef: nodeRef,
11811
- timeout: 300,
11812
- in: isOpen,
11813
- classNames: pickerClassNames,
11814
- children: /*#__PURE__*/jsx(View, {
11815
- ref: nodeRef,
11816
- paddingY: "kitt.2",
11817
- children: childrenArray.map((child, index) => {
11818
- const currentValue = items[index];
11819
- if (currentValue === undefined) {
11820
- throw new Error(`Picker: No value found for item at index ${index}`);
11783
+ children: /*#__PURE__*/jsx(CSSTransition, {
11784
+ unmountOnExit: true,
11785
+ nodeRef: nodeRef,
11786
+ timeout: 300,
11787
+ in: isOpen,
11788
+ classNames: pickerClassNames,
11789
+ children: /*#__PURE__*/jsx(View, {
11790
+ ref: nodeRef,
11791
+ paddingY: "kitt.2",
11792
+ children: childrenArray.map((child, index) => {
11793
+ const currentValue = items[index];
11794
+ if (currentValue === undefined) {
11795
+ throw new Error(`Picker: No value found for item at index ${index}`);
11796
+ }
11797
+ const {
11798
+ onClick,
11799
+ 'aria-selected': ariaSelected,
11800
+ ...itemProps
11801
+ } = getItemProps({
11802
+ item: currentValue,
11803
+ index,
11804
+ disabled
11805
+ });
11806
+ return /*#__PURE__*/jsx(Pressable, {
11807
+ ...itemProps,
11808
+ accessibilityState: {
11809
+ selected: ariaSelected
11810
+ },
11811
+ onPress: onClick,
11812
+ children: ({
11813
+ isHovered,
11814
+ isFocused,
11815
+ isPressed
11816
+ }) => {
11817
+ return /*#__PURE__*/jsx(PickerItem, {
11818
+ isSelected: checkSelectedItem(selectedItem || undefined, currentValue),
11819
+ isHighlighted: highlightedIndex === index,
11820
+ isHovered: isHovered,
11821
+ isFocused: isFocused,
11822
+ isPressed: isPressed,
11823
+ children: child
11824
+ });
11821
11825
  }
11822
- const {
11823
- onClick,
11824
- 'aria-selected': ariaSelected,
11825
- ...itemProps
11826
- } = getItemProps({
11827
- item: currentValue,
11828
- index,
11829
- disabled
11830
- });
11831
- return /*#__PURE__*/jsx(Pressable, {
11832
- ...itemProps,
11833
- accessibilityState: {
11834
- selected: ariaSelected
11835
- },
11836
- onPress: onClick,
11837
- children: ({
11838
- isHovered,
11839
- isFocused,
11840
- isPressed
11841
- }) => {
11842
- return /*#__PURE__*/jsx(PickerItem, {
11843
- isSelected: checkSelectedItem(selectedItem || undefined, currentValue),
11844
- isHighlighted: highlightedIndex === index,
11845
- isHovered: isHovered,
11846
- isFocused: isFocused,
11847
- isPressed: isPressed,
11848
- children: child
11849
- });
11850
- }
11851
- }, itemProps.id);
11852
- })
11826
+ }, itemProps.id);
11853
11827
  })
11854
11828
  })
11855
11829
  })
11856
11830
  })
11857
- })]
11831
+ }), document.body)]
11858
11832
  });
11859
11833
  }
11860
11834
  Picker.Option = PickerOption;
@@ -13318,69 +13292,67 @@ function Tooltip({
13318
13292
  onFocus: handleToggleTooltip,
13319
13293
  onBlur: handleToggleTooltip,
13320
13294
  width: '100%'
13321
- }), /*#__PURE__*/jsx(Portal, {
13322
- children: /*#__PURE__*/jsx(View, {
13323
- ref: refs.setFloating,
13324
- "aria-hidden": !isVisible,
13325
- paddingX: {
13326
- base: 'kitt.4',
13327
- small: 0
13328
- },
13329
- width: {
13330
- base: '100%',
13331
- small: 'max-content'
13332
- },
13333
- maxWidth: {
13334
- base: '100%',
13335
- small: 'kitt.tooltip.maxWidth'
13336
- },
13337
- opacity: isVisible ? 'kitt.tooltip.opacity' : 0,
13338
- paddingTop: placement === 'bottom' ? currentFloatingPadding : undefined,
13339
- paddingBottom: placement === 'top' ? currentFloatingPadding : undefined,
13295
+ }), /*#__PURE__*/createPortal(/*#__PURE__*/jsx(View, {
13296
+ ref: refs.setFloating,
13297
+ "aria-hidden": !isVisible,
13298
+ paddingX: {
13299
+ base: 'kitt.4',
13300
+ small: 0
13301
+ },
13302
+ width: {
13303
+ base: '100%',
13304
+ small: 'max-content'
13305
+ },
13306
+ maxWidth: {
13307
+ base: '100%',
13308
+ small: 'kitt.tooltip.maxWidth'
13309
+ },
13310
+ opacity: isVisible ? 'kitt.tooltip.opacity' : 0,
13311
+ paddingTop: placement === 'bottom' ? currentFloatingPadding : undefined,
13312
+ paddingBottom: placement === 'top' ? currentFloatingPadding : undefined,
13313
+ style: {
13314
+ pointerEvents: isVisible ? 'auto' : 'none'
13315
+ },
13316
+ position: strategy,
13317
+ zIndex: zIndex,
13318
+ top: 0,
13319
+ left: 0,
13320
+ _web: {
13340
13321
  style: {
13341
- pointerEvents: isVisible ? 'auto' : 'none'
13342
- },
13343
- position: strategy,
13344
- zIndex: zIndex,
13345
- top: 0,
13346
- left: 0,
13322
+ transform: `translate3d(${isBase && !fullWidth ? `0, ${tooltipY}px, 0` : `${tooltipX}px, ${tooltipY}px, 0`})`,
13323
+ visibility: isVisible ? 'visible' : 'hidden',
13324
+ transitionDuration,
13325
+ transitionProperty: theme.kitt.tooltip.transition[themePart].property,
13326
+ transitionTimingFunction
13327
+ }
13328
+ },
13329
+ onTouchStart: handleToggleTooltip,
13330
+ onTouchEnd: handleToggleTooltip,
13331
+ onMouseEnter: handleToggleTooltip,
13332
+ onMouseLeave: handleToggleTooltip,
13333
+ children: /*#__PURE__*/jsxs(View, {
13347
13334
  _web: {
13348
13335
  style: {
13349
- transform: `translate3d(${isBase && !fullWidth ? `0, ${tooltipY}px, 0` : `${tooltipX}px, ${tooltipY}px, 0`})`,
13350
- visibility: isVisible ? 'visible' : 'hidden',
13351
- transitionDuration,
13352
- transitionProperty: theme.kitt.tooltip.transition[themePart].property,
13353
- transitionTimingFunction
13336
+ transform: `scale(${isVisible ? 1 : 0.8})`,
13337
+ transitionDuration: isVisible ? '0' : transitionDuration,
13338
+ transitionProperty: 'all',
13339
+ transitionTimingFunction,
13340
+ transformOrigin
13354
13341
  }
13355
13342
  },
13356
- onTouchStart: handleToggleTooltip,
13357
- onTouchEnd: handleToggleTooltip,
13358
- onMouseEnter: handleToggleTooltip,
13359
- onMouseLeave: handleToggleTooltip,
13360
- children: /*#__PURE__*/jsxs(View, {
13361
- _web: {
13362
- style: {
13363
- transform: `scale(${isVisible ? 1 : 0.8})`,
13364
- transitionDuration: isVisible ? '0' : transitionDuration,
13365
- transitionProperty: 'all',
13366
- transitionTimingFunction,
13367
- transformOrigin
13368
- }
13369
- },
13370
- children: [shouldRenderArrow && placement === 'bottom' ? /*#__PURE__*/jsx(Arrow, {
13371
- ref: arrowRef,
13372
- position: "bottom",
13373
- ...sharedArrowProps
13374
- }) : null, /*#__PURE__*/jsx(TooltipContent, {
13375
- children: content
13376
- }), shouldRenderArrow && placement === 'top' ? /*#__PURE__*/jsx(Arrow, {
13377
- ref: arrowRef,
13378
- position: "top",
13379
- ...sharedArrowProps
13380
- }) : null]
13381
- })
13343
+ children: [shouldRenderArrow && placement === 'bottom' ? /*#__PURE__*/jsx(Arrow, {
13344
+ ref: arrowRef,
13345
+ position: "bottom",
13346
+ ...sharedArrowProps
13347
+ }) : null, /*#__PURE__*/jsx(TooltipContent, {
13348
+ children: content
13349
+ }), shouldRenderArrow && placement === 'top' ? /*#__PURE__*/jsx(Arrow, {
13350
+ ref: arrowRef,
13351
+ position: "top",
13352
+ ...sharedArrowProps
13353
+ }) : null]
13382
13354
  })
13383
- })]
13355
+ }), document.body)]
13384
13356
  });
13385
13357
  }
13386
13358
  Tooltip.Arrow = Arrow;