softable-pixels-web 1.1.8 → 1.1.10

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.
Files changed (98) hide show
  1. package/dist/{Button-BrV5pWD2.js → Button-DCVmSier.js} +9 -9
  2. package/dist/Button-DCVmSier.js.map +1 -0
  3. package/dist/{CheckItem-DEUwzhbF.js → CheckItem-itm2oIeW.js} +4 -4
  4. package/dist/{CheckItem-DEUwzhbF.js.map → CheckItem-itm2oIeW.js.map} +1 -1
  5. package/dist/{Checkbox-CA11dJ4h.js → Checkbox-ly07FlTH.js} +5 -5
  6. package/dist/Checkbox-ly07FlTH.js.map +1 -0
  7. package/dist/ContextMenu-fSz83oSd.js +304 -0
  8. package/dist/ContextMenu-fSz83oSd.js.map +1 -0
  9. package/dist/{Icon-D40nGMJM.js → Icon-61UaAUrM.js} +2 -2
  10. package/dist/{Icon-D40nGMJM.js.map → Icon-61UaAUrM.js.map} +1 -1
  11. package/dist/{IconButton-BBdkzg3b.js → IconButton-CsHFWO8K.js} +2 -2
  12. package/dist/IconButton-CsHFWO8K.js.map +1 -0
  13. package/dist/{InfoSummary-Cft-E1GO.js → InfoSummary-DcupqKIy.js} +3 -3
  14. package/dist/{InfoSummary-Cft-E1GO.js.map → InfoSummary-DcupqKIy.js.map} +1 -1
  15. package/dist/Input-BFQKSMEQ.js +174 -0
  16. package/dist/Input-BFQKSMEQ.js.map +1 -0
  17. package/dist/Label-BhqH21lT.js +25 -0
  18. package/dist/Label-BhqH21lT.js.map +1 -0
  19. package/dist/Popover-BsDGCJ-f.js +81 -0
  20. package/dist/Popover-BsDGCJ-f.js.map +1 -0
  21. package/dist/Switch-B4e9qBOu.js +49 -0
  22. package/dist/Switch-B4e9qBOu.js.map +1 -0
  23. package/dist/{TabSwitch-D6WJc7Bf.js → TabSwitch-CvnlK0NZ.js} +4 -4
  24. package/dist/TabSwitch-CvnlK0NZ.js.map +1 -0
  25. package/dist/{TextArea-DY9c18r6.js → TextArea-CUrG_9je.js} +5 -5
  26. package/dist/TextArea-CUrG_9je.js.map +1 -0
  27. package/dist/{ThemeContext-0pOYSNvl.js → ThemeContext-CesN6Ejm.js} +22 -8
  28. package/dist/ThemeContext-CesN6Ejm.js.map +1 -0
  29. package/dist/{Typography-XA7uwbWe.js → Typography-j84zoCoZ.js} +2 -2
  30. package/dist/{Typography-XA7uwbWe.js.map → Typography-j84zoCoZ.js.map} +1 -1
  31. package/dist/button.d.ts +2 -2
  32. package/dist/button.js +3 -3
  33. package/dist/check-item.d.ts +1 -1
  34. package/dist/check-item.js +4 -4
  35. package/dist/checkbox.d.ts +2 -2
  36. package/dist/checkbox.js +4 -4
  37. package/dist/context-menu.d.ts +2 -0
  38. package/dist/context-menu.js +9 -0
  39. package/dist/icon-button.d.ts +1 -1
  40. package/dist/icon-button.js +2 -2
  41. package/dist/{index-DZqSyBAN.d.ts → index-2WYvBk8I.d.ts} +18 -4
  42. package/dist/{index-RcFYZiMi.d.ts → index-8GUY3yRY.d.ts} +1 -1
  43. package/dist/index-BANOx3xI.d.ts +44 -0
  44. package/dist/{index-CyvtOmP2.d.ts → index-BHhl7wD8.d.ts} +4 -3
  45. package/dist/index-BglHC9EI.d.ts +61 -0
  46. package/dist/{index-Cg3ejKX9.d.ts → index-CCiP7SPG.d.ts} +8 -4
  47. package/dist/{index-DQMtfFqC.d.ts → index-Cmj1xJBu.d.ts} +2 -2
  48. package/dist/{index-vtqd-Akd.d.ts → index-CyntoY7A.d.ts} +33 -4
  49. package/dist/index-DM5Wxo_Y.d.ts +104 -0
  50. package/dist/index-DewFmT68.d.ts +15 -0
  51. package/dist/{index-B9MqmTLB.d.ts → index-YYjoEwNX.d.ts} +39 -5
  52. package/dist/index.d.ts +16 -10
  53. package/dist/index.js +20 -14
  54. package/dist/info-summary.js +3 -3
  55. package/dist/input.d.ts +1 -2
  56. package/dist/input.js +5 -5
  57. package/dist/popover.d.ts +2 -0
  58. package/dist/popover.js +6 -0
  59. package/dist/{styleProps-D405c8KF.d.ts → styleProps-5iqKZpC1.d.ts} +1 -1
  60. package/dist/switch.d.ts +2 -0
  61. package/dist/switch.js +4 -0
  62. package/dist/tab-switch.d.ts +1 -1
  63. package/dist/tab-switch.js +3 -3
  64. package/dist/text-area.d.ts +2 -2
  65. package/dist/text-area.js +5 -5
  66. package/dist/theme-context.d.ts +1 -1
  67. package/dist/theme-context.js +1 -1
  68. package/dist/types-Dsf33Reg.d.ts +15 -0
  69. package/dist/{types-ESf1Pmhi.d.ts → types-ubME1KhJ.d.ts} +3 -3
  70. package/dist/typography.d.ts +3 -3
  71. package/dist/typography.js +2 -2
  72. package/dist/use-dismiss.d.ts +20 -0
  73. package/dist/use-dismiss.js +3 -0
  74. package/dist/use-floating.d.ts +15 -0
  75. package/dist/use-floating.js +3 -0
  76. package/dist/use-virtual-anchor.d.ts +12 -0
  77. package/dist/use-virtual-anchor.js +40 -0
  78. package/dist/use-virtual-anchor.js.map +1 -0
  79. package/dist/useDismiss-DJ1mh-X3.js +35 -0
  80. package/dist/useDismiss-DJ1mh-X3.js.map +1 -0
  81. package/dist/useFloating--PcINgSt.js +295 -0
  82. package/dist/useFloating--PcINgSt.js.map +1 -0
  83. package/dist/{useThemedStyles-B7irjShy.d.ts → useThemedStyles-C6dNoaRC.d.ts} +25 -6
  84. package/dist/{useThemedStyles-3rUXJYgS.js → useThemedStyles-MLtE91hE.js} +1 -1
  85. package/dist/useThemedStyles-MLtE91hE.js.map +1 -0
  86. package/package.json +46 -1
  87. package/dist/Button-BrV5pWD2.js.map +0 -1
  88. package/dist/Checkbox-CA11dJ4h.js.map +0 -1
  89. package/dist/IconButton-BBdkzg3b.js.map +0 -1
  90. package/dist/Input-BcDV2JOa.js +0 -327
  91. package/dist/Input-BcDV2JOa.js.map +0 -1
  92. package/dist/Label-DXpBz2AN.js +0 -79
  93. package/dist/Label-DXpBz2AN.js.map +0 -1
  94. package/dist/TabSwitch-D6WJc7Bf.js.map +0 -1
  95. package/dist/TextArea-DY9c18r6.js.map +0 -1
  96. package/dist/ThemeContext-0pOYSNvl.js.map +0 -1
  97. package/dist/index-De1q2lSW.d.ts +0 -49
  98. package/dist/useThemedStyles-3rUXJYgS.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { i as PaddingProps } from "./styleProps-D405c8KF.js";
2
- import { i as styled, r as TypeStyles } from "./useThemedStyles-B7irjShy.js";
3
- import { n as TypographyVariant } from "./types-ESf1Pmhi.js";
1
+ import { i as PaddingProps } from "./styleProps-5iqKZpC1.js";
2
+ import { r as TypeStyles } from "./useThemedStyles-C6dNoaRC.js";
3
+ import { n as TypographyVariant } from "./types-ubME1KhJ.js";
4
4
  import React, { MouseEvent, ReactNode } from "react";
5
5
 
6
6
  //#region src/components/commons/buttons/Button/styles.d.ts
@@ -12,7 +12,41 @@ declare function createButtonStyles({
12
12
  fullWidth,
13
13
  textAlign,
14
14
  outlineColor
15
- }: ButtonProps): ReturnType<typeof styled>;
15
+ }: ButtonProps): {
16
+ container: {
17
+ minHeight: string;
18
+ width: string;
19
+ position: "relative";
20
+ display: "flex";
21
+ justifyContent: Align;
22
+ padding: string;
23
+ gap: string;
24
+ borderRadius: string;
25
+ cursor: "pointer";
26
+ transition: "background-color 0.5s";
27
+ border: string;
28
+ backgroundColor: string;
29
+ boxShadow: "none" | "0px -1px 0px #0A0D120D inset, 0px 1px 2px #0A0D120D";
30
+ __rules: {
31
+ '&:hover': {
32
+ opacity: "0.85 !important";
33
+ };
34
+ '&:disabled': {
35
+ opacity: "0.5 !important";
36
+ cursor: "not-allowed !important";
37
+ };
38
+ };
39
+ };
40
+ content: {
41
+ display: "flex";
42
+ flexDirection: "row";
43
+ alignItems: "center";
44
+ padding: string;
45
+ borderRadius: string;
46
+ whiteSpace: "nowrap";
47
+ columnGap: string;
48
+ };
49
+ };
16
50
  //#endregion
17
51
  //#region src/components/commons/buttons/Button/types.d.ts
18
52
  type Align = 'center' | 'left' | 'right';
@@ -80,4 +114,4 @@ interface ButtonProps extends PaddingProps {
80
114
  declare const Button: React.FC<ButtonProps>;
81
115
  //#endregion
82
116
  export { Button as t };
83
- //# sourceMappingURL=index-B9MqmTLB.d.ts.map
117
+ //# sourceMappingURL=index-YYjoEwNX.d.ts.map
package/dist/index.d.ts CHANGED
@@ -1,12 +1,18 @@
1
- import "./types-ESf1Pmhi.js";
2
- import { t as Button } from "./index-B9MqmTLB.js";
3
- import { t as IconButton } from "./index-CyvtOmP2.js";
4
- import { t as Input } from "./index-De1q2lSW.js";
5
- import { t as TextArea } from "./index-vtqd-Akd.js";
6
- import { t as CheckItem } from "./index-RcFYZiMi.js";
7
- import { t as Checkbox } from "./index-DQMtfFqC.js";
1
+ import "./types-ubME1KhJ.js";
2
+ import { t as Button } from "./index-YYjoEwNX.js";
3
+ import { t as IconButton } from "./index-BHhl7wD8.js";
4
+ import { t as Input } from "./index-DM5Wxo_Y.js";
5
+ import { t as TextArea } from "./index-CyntoY7A.js";
6
+ import { t as CheckItem } from "./index-8GUY3yRY.js";
7
+ import { t as Checkbox } from "./index-Cmj1xJBu.js";
8
+ import { t as ContextMenu } from "./index-BglHC9EI.js";
8
9
  import { InfoSummary, InfoSummaryItem, InfoSummaryProps } from "./info-summary.js";
9
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DZqSyBAN.js";
10
+ import { t as Popover } from "./index-BANOx3xI.js";
11
+ import { t as Switch } from "./index-DewFmT68.js";
12
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-2WYvBk8I.js";
10
13
  import { Typography } from "./typography.js";
11
- import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-Cg3ejKX9.js";
12
- export { Button, CheckItem, Checkbox, IconButton, InfoSummary, InfoSummaryItem, InfoSummaryProps, Input, SwitchOption, TabSwitch, TabSwitchProps, TextArea, ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, Typography, useTheme };
14
+ import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-CCiP7SPG.js";
15
+ import { useDismiss } from "./use-dismiss.js";
16
+ import { AnchorLike, useFloating } from "./use-floating.js";
17
+ import { useVirtualAnchor } from "./use-virtual-anchor.js";
18
+ export { AnchorLike, Button, CheckItem, Checkbox, ContextMenu, IconButton, InfoSummary, InfoSummaryItem, InfoSummaryProps, Input, Popover, Switch, SwitchOption, TabSwitch, TabSwitchProps, TextArea, ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, Typography, useDismiss, useFloating, useTheme, useVirtualAnchor };
package/dist/index.js CHANGED
@@ -1,15 +1,21 @@
1
- import "./Icon-D40nGMJM.js";
2
- import "./useThemedStyles-3rUXJYgS.js";
3
- import { t as Typography } from "./Typography-XA7uwbWe.js";
4
- import { t as Checkbox } from "./Checkbox-CA11dJ4h.js";
5
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-0pOYSNvl.js";
6
- import { t as TabSwitch } from "./TabSwitch-D6WJc7Bf.js";
7
- import { t as CheckItem } from "./CheckItem-DEUwzhbF.js";
8
- import { t as InfoSummary } from "./InfoSummary-Cft-E1GO.js";
9
- import { t as Button } from "./Button-BrV5pWD2.js";
10
- import { t as IconButton } from "./IconButton-BBdkzg3b.js";
11
- import "./Label-DXpBz2AN.js";
12
- import { t as Input } from "./Input-BcDV2JOa.js";
13
- import { t as TextArea } from "./TextArea-DY9c18r6.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import { t as Switch } from "./Switch-B4e9qBOu.js";
3
+ import { t as useDismiss } from "./useDismiss-DJ1mh-X3.js";
4
+ import { t as useFloating } from "./useFloating--PcINgSt.js";
5
+ import { t as Popover } from "./Popover-BsDGCJ-f.js";
6
+ import "./Icon-61UaAUrM.js";
7
+ import { t as Typography } from "./Typography-j84zoCoZ.js";
8
+ import { t as Checkbox } from "./Checkbox-ly07FlTH.js";
9
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-CesN6Ejm.js";
10
+ import { t as TabSwitch } from "./TabSwitch-CvnlK0NZ.js";
11
+ import { t as CheckItem } from "./CheckItem-itm2oIeW.js";
12
+ import { t as InfoSummary } from "./InfoSummary-DcupqKIy.js";
13
+ import { t as ContextMenu } from "./ContextMenu-fSz83oSd.js";
14
+ import { t as Button } from "./Button-DCVmSier.js";
15
+ import { t as IconButton } from "./IconButton-CsHFWO8K.js";
16
+ import "./Label-BhqH21lT.js";
17
+ import { t as Input } from "./Input-BFQKSMEQ.js";
18
+ import { t as TextArea } from "./TextArea-CUrG_9je.js";
19
+ import { useVirtualAnchor } from "./use-virtual-anchor.js";
14
20
 
15
- export { Button, CheckItem, Checkbox, IconButton, InfoSummary, Input, TabSwitch, TextArea, ThemeProvider, Typography, useTheme };
21
+ export { Button, CheckItem, Checkbox, ContextMenu, IconButton, InfoSummary, Input, Popover, Switch, TabSwitch, TextArea, ThemeProvider, Typography, useDismiss, useFloating, useTheme, useVirtualAnchor };
@@ -1,5 +1,5 @@
1
- import "./useThemedStyles-3rUXJYgS.js";
2
- import "./Typography-XA7uwbWe.js";
3
- import { t as InfoSummary } from "./InfoSummary-Cft-E1GO.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import "./Typography-j84zoCoZ.js";
3
+ import { t as InfoSummary } from "./InfoSummary-DcupqKIy.js";
4
4
 
5
5
  export { InfoSummary };
package/dist/input.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import "./types-ESf1Pmhi.js";
2
- import { t as Input } from "./index-De1q2lSW.js";
1
+ import { t as Input } from "./index-DM5Wxo_Y.js";
3
2
  export { Input };
package/dist/input.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./Icon-D40nGMJM.js";
2
- import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-XA7uwbWe.js";
4
- import "./Label-DXpBz2AN.js";
5
- import { t as Input } from "./Input-BcDV2JOa.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import "./Icon-61UaAUrM.js";
3
+ import "./Typography-j84zoCoZ.js";
4
+ import "./Label-BhqH21lT.js";
5
+ import { t as Input } from "./Input-BFQKSMEQ.js";
6
6
 
7
7
  export { Input };
@@ -0,0 +1,2 @@
1
+ import { t as Popover } from "./index-BANOx3xI.js";
2
+ export { Popover };
@@ -0,0 +1,6 @@
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import "./useDismiss-DJ1mh-X3.js";
3
+ import "./useFloating--PcINgSt.js";
4
+ import { t as Popover } from "./Popover-BsDGCJ-f.js";
5
+
6
+ export { Popover };
@@ -43,4 +43,4 @@ interface LayoutProps {
43
43
  type CommonStyleProps = MarginProps & PaddingProps & TextProps & LayoutProps;
44
44
  //#endregion
45
45
  export { TextProps as a, PaddingProps as i, LayoutProps as n, MarginProps as r, CommonStyleProps as t };
46
- //# sourceMappingURL=styleProps-D405c8KF.d.ts.map
46
+ //# sourceMappingURL=styleProps-5iqKZpC1.d.ts.map
@@ -0,0 +1,2 @@
1
+ import { t as Switch } from "./index-DewFmT68.js";
2
+ export { Switch };
package/dist/switch.js ADDED
@@ -0,0 +1,4 @@
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import { t as Switch } from "./Switch-B4e9qBOu.js";
3
+
4
+ export { Switch };
@@ -1,2 +1,2 @@
1
- import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-DZqSyBAN.js";
1
+ import { n as SwitchOption, r as TabSwitchProps, t as TabSwitch } from "./index-2WYvBk8I.js";
2
2
  export { SwitchOption, TabSwitch, TabSwitchProps };
@@ -1,5 +1,5 @@
1
- import "./useThemedStyles-3rUXJYgS.js";
2
- import "./Typography-XA7uwbWe.js";
3
- import { t as TabSwitch } from "./TabSwitch-D6WJc7Bf.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import "./Typography-j84zoCoZ.js";
3
+ import { t as TabSwitch } from "./TabSwitch-CvnlK0NZ.js";
4
4
 
5
5
  export { TabSwitch };
@@ -1,3 +1,3 @@
1
- import "./types-ESf1Pmhi.js";
2
- import { t as TextArea } from "./index-vtqd-Akd.js";
1
+ import "./types-ubME1KhJ.js";
2
+ import { t as TextArea } from "./index-CyntoY7A.js";
3
3
  export { TextArea };
package/dist/text-area.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./Icon-D40nGMJM.js";
2
- import "./useThemedStyles-3rUXJYgS.js";
3
- import "./Typography-XA7uwbWe.js";
4
- import "./Label-DXpBz2AN.js";
5
- import { t as TextArea } from "./TextArea-DY9c18r6.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import "./Icon-61UaAUrM.js";
3
+ import "./Typography-j84zoCoZ.js";
4
+ import "./Label-BhqH21lT.js";
5
+ import { t as TextArea } from "./TextArea-CUrG_9je.js";
6
6
 
7
7
  export { TextArea };
@@ -1,2 +1,2 @@
1
- import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-Cg3ejKX9.js";
1
+ import { a as ThemeName, c as ThemeRegistry, i as ThemeMode, l as ThemeTokens, n as useTheme, o as ThemePersistence, r as ThemeContextData, s as ThemeProviderProps, t as ThemeProvider } from "./index-CCiP7SPG.js";
2
2
  export { ThemeContextData, ThemeMode, ThemeName, ThemePersistence, ThemeProvider, ThemeProviderProps, ThemeRegistry, ThemeTokens, useTheme };
@@ -1,5 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { n as useTheme, t as ThemeProvider } from "./ThemeContext-0pOYSNvl.js";
3
+ import { n as useTheme, t as ThemeProvider } from "./ThemeContext-CesN6Ejm.js";
4
4
 
5
5
  export { ThemeProvider, useTheme };
@@ -0,0 +1,15 @@
1
+ //#region src/hooks/useFloating/types.d.ts
2
+ type Placement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end' | 'center';
3
+ type Strategy = 'fixed' | 'absolute';
4
+ type FloatingOptions = {
5
+ placement?: Placement;
6
+ offsetX?: number;
7
+ offsetY?: number;
8
+ keepInViewport?: boolean;
9
+ viewportMargin?: number;
10
+ scrollContainerId?: string;
11
+ strategy?: Strategy;
12
+ };
13
+ //#endregion
14
+ export { Placement as n, FloatingOptions as t };
15
+ //# sourceMappingURL=types-Dsf33Reg.d.ts.map
@@ -1,5 +1,5 @@
1
- import { a as TextProps, r as MarginProps } from "./styleProps-D405c8KF.js";
2
- import { r as TypeStyles, t as SlotStyle } from "./useThemedStyles-B7irjShy.js";
1
+ import { a as TextProps, r as MarginProps } from "./styleProps-5iqKZpC1.js";
2
+ import { r as TypeStyles, t as SlotStyle } from "./useThemedStyles-C6dNoaRC.js";
3
3
  import { ElementType, ReactNode } from "react";
4
4
 
5
5
  //#region src/components/commons/toolkit/Typography/style.d.ts
@@ -40,4 +40,4 @@ type TextAlign = 'left' | 'center' | 'right' | 'justify';
40
40
  type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'b1' | 'b2' | 'b3' | 'caption' | 'legal';
41
41
  //#endregion
42
42
  export { TypographyVariant as n, TypographyProps as t };
43
- //# sourceMappingURL=types-ESf1Pmhi.d.ts.map
43
+ //# sourceMappingURL=types-ubME1KhJ.d.ts.map
@@ -1,8 +1,8 @@
1
- import { t as TypographyProps } from "./types-ESf1Pmhi.js";
2
- import * as react_jsx_runtime0 from "react/jsx-runtime";
1
+ import { t as TypographyProps } from "./types-ubME1KhJ.js";
2
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
3
3
 
4
4
  //#region src/components/commons/toolkit/Typography/index.d.ts
5
- declare function Typography(props: TypographyProps): react_jsx_runtime0.JSX.Element;
5
+ declare function Typography(props: TypographyProps): react_jsx_runtime1.JSX.Element;
6
6
  //#endregion
7
7
  export { Typography };
8
8
  //# sourceMappingURL=typography.d.ts.map
@@ -1,4 +1,4 @@
1
- import "./useThemedStyles-3rUXJYgS.js";
2
- import { t as Typography } from "./Typography-XA7uwbWe.js";
1
+ import "./useThemedStyles-MLtE91hE.js";
2
+ import { t as Typography } from "./Typography-j84zoCoZ.js";
3
3
 
4
4
  export { Typography };
@@ -0,0 +1,20 @@
1
+ import { RefObject } from "react";
2
+
3
+ //#region src/hooks/useDismiss/index.d.ts
4
+ type UseDismissParams = {
5
+ open: boolean;
6
+ closeOnEscape?: boolean;
7
+ closeOnOutsideClick?: boolean;
8
+ refs: Array<RefObject<HTMLElement | null>>;
9
+ onClose: () => void;
10
+ };
11
+ declare function useDismiss({
12
+ open,
13
+ refs,
14
+ closeOnEscape,
15
+ closeOnOutsideClick,
16
+ onClose
17
+ }: UseDismissParams): void;
18
+ //#endregion
19
+ export { useDismiss };
20
+ //# sourceMappingURL=use-dismiss.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { t as useDismiss } from "./useDismiss-DJ1mh-X3.js";
2
+
3
+ export { useDismiss };
@@ -0,0 +1,15 @@
1
+ import { t as FloatingOptions } from "./types-Dsf33Reg.js";
2
+
3
+ //#region src/hooks/useFloating/index.d.ts
4
+ type AnchorLike = {
5
+ getBoundingClientRect: () => DOMRect;
6
+ };
7
+ type Anchor = HTMLElement | AnchorLike;
8
+ declare function useFloating(targetRef: React.RefObject<Anchor>, options?: FloatingOptions): {
9
+ floatingEl: HTMLElement | null;
10
+ floatingRef: (el: HTMLElement | null) => void;
11
+ update: () => void;
12
+ };
13
+ //#endregion
14
+ export { AnchorLike, useFloating };
15
+ //# sourceMappingURL=use-floating.d.ts.map
@@ -0,0 +1,3 @@
1
+ import { t as useFloating } from "./useFloating--PcINgSt.js";
2
+
3
+ export { useFloating };
@@ -0,0 +1,12 @@
1
+ import { AnchorLike } from "./use-floating.js";
2
+
3
+ //#region src/hooks/useVirtualAnchor/index.d.ts
4
+ declare function useVirtualAnchor(): {
5
+ anchorRef: {
6
+ current: AnchorLike;
7
+ };
8
+ setPoint: (x: number, y: number) => void;
9
+ };
10
+ //#endregion
11
+ export { useVirtualAnchor };
12
+ //# sourceMappingURL=use-virtual-anchor.d.ts.map
@@ -0,0 +1,40 @@
1
+ import { useCallback, useMemo, useRef } from "react";
2
+
3
+ //#region src/hooks/useVirtualAnchor/index.ts
4
+ function rectFromPoint({ x, y }) {
5
+ return {
6
+ x,
7
+ y,
8
+ top: y,
9
+ left: x,
10
+ right: x,
11
+ bottom: y,
12
+ width: 0,
13
+ height: 0,
14
+ toJSON: () => ({
15
+ x,
16
+ y
17
+ })
18
+ };
19
+ }
20
+ function useVirtualAnchor() {
21
+ const pointRef = useRef({
22
+ x: 0,
23
+ y: 0
24
+ });
25
+ return {
26
+ anchorRef: useMemo(() => {
27
+ return { current: { getBoundingClientRect: () => rectFromPoint(pointRef.current) } };
28
+ }, []),
29
+ setPoint: useCallback((x, y) => {
30
+ pointRef.current = {
31
+ x,
32
+ y
33
+ };
34
+ }, [])
35
+ };
36
+ }
37
+
38
+ //#endregion
39
+ export { useVirtualAnchor };
40
+ //# sourceMappingURL=use-virtual-anchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-virtual-anchor.js","names":[],"sources":["../src/hooks/useVirtualAnchor/index.ts"],"sourcesContent":["// External Libraries\nimport { useCallback, useMemo, useRef } from 'react'\n\n// Types\nimport type { AnchorLike } from '../useFloating'\n\ntype Point = { x: number; y: number }\n\nfunction rectFromPoint({ x, y }: Point): DOMRect {\n return {\n x,\n y,\n top: y,\n left: x,\n right: x,\n bottom: y,\n width: 0,\n height: 0,\n toJSON: () => ({ x, y })\n } as unknown as DOMRect\n}\n\nexport function useVirtualAnchor() {\n const pointRef = useRef<Point>({ x: 0, y: 0 })\n\n const anchorRef = useMemo(() => {\n const virtualEl: AnchorLike = {\n getBoundingClientRect: () => rectFromPoint(pointRef.current)\n }\n return { current: virtualEl }\n }, [])\n\n const setPoint = useCallback((x: number, y: number) => {\n pointRef.current = { x, y }\n }, [])\n\n return { anchorRef, setPoint }\n}\n"],"mappings":";;;AAQA,SAAS,cAAc,EAAE,GAAG,KAAqB;AAC/C,QAAO;EACL;EACA;EACA,KAAK;EACL,MAAM;EACN,OAAO;EACP,QAAQ;EACR,OAAO;EACP,QAAQ;EACR,eAAe;GAAE;GAAG;GAAG;EACxB;;AAGH,SAAgB,mBAAmB;CACjC,MAAM,WAAW,OAAc;EAAE,GAAG;EAAG,GAAG;EAAG,CAAC;AAa9C,QAAO;EAAE,WAXS,cAAc;AAI9B,UAAO,EAAE,SAHqB,EAC5B,6BAA6B,cAAc,SAAS,QAAQ,EAC7D,EAC4B;KAC5B,EAAE,CAAC;EAMc,UAJH,aAAa,GAAW,MAAc;AACrD,YAAS,UAAU;IAAE;IAAG;IAAG;KAC1B,EAAE,CAAC;EAEwB"}
@@ -0,0 +1,35 @@
1
+ import { useEffect } from "react";
2
+
3
+ //#region src/hooks/useDismiss/index.ts
4
+ function useDismiss({ open, refs, closeOnEscape = true, closeOnOutsideClick = true, onClose }) {
5
+ useEffect(() => {
6
+ if (!open) return;
7
+ const isInsideSomeRef = (node) => refs.some((r) => r.current?.contains(node));
8
+ const onMouseDown = (e) => {
9
+ if (!closeOnOutsideClick) return;
10
+ const t = e.target;
11
+ if (isInsideSomeRef(t)) return;
12
+ onClose();
13
+ };
14
+ const onKeyDown = (e) => {
15
+ if (!closeOnEscape) return;
16
+ if (e.key === "Escape") onClose();
17
+ };
18
+ document.addEventListener("mousedown", onMouseDown);
19
+ document.addEventListener("keydown", onKeyDown);
20
+ return () => {
21
+ document.removeEventListener("mousedown", onMouseDown);
22
+ document.removeEventListener("keydown", onKeyDown);
23
+ };
24
+ }, [
25
+ open,
26
+ onClose,
27
+ refs,
28
+ closeOnOutsideClick,
29
+ closeOnEscape
30
+ ]);
31
+ }
32
+
33
+ //#endregion
34
+ export { useDismiss as t };
35
+ //# sourceMappingURL=useDismiss-DJ1mh-X3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDismiss-DJ1mh-X3.js","names":[],"sources":["../src/hooks/useDismiss/index.ts"],"sourcesContent":["// External Libraries\nimport { type RefObject, useEffect } from 'react'\n\ntype UseDismissParams = {\n open: boolean\n closeOnEscape?: boolean\n closeOnOutsideClick?: boolean\n refs: Array<RefObject<HTMLElement | null>>\n onClose: () => void\n}\n\nexport function useDismiss({\n open,\n refs,\n closeOnEscape = true,\n closeOnOutsideClick = true,\n onClose\n}: UseDismissParams) {\n useEffect(() => {\n if (!open) return\n\n const isInsideSomeRef = (node: Node) =>\n refs.some(r => r.current?.contains(node))\n\n const onMouseDown = (e: MouseEvent) => {\n if (!closeOnOutsideClick) return\n const t = e.target as Node\n if (isInsideSomeRef(t)) return\n onClose()\n }\n\n const onKeyDown = (e: KeyboardEvent) => {\n if (!closeOnEscape) return\n if (e.key === 'Escape') onClose()\n }\n\n document.addEventListener('mousedown', onMouseDown)\n document.addEventListener('keydown', onKeyDown)\n\n return () => {\n document.removeEventListener('mousedown', onMouseDown)\n document.removeEventListener('keydown', onKeyDown)\n }\n }, [open, onClose, refs, closeOnOutsideClick, closeOnEscape])\n}\n"],"mappings":";;;AAWA,SAAgB,WAAW,EACzB,MACA,MACA,gBAAgB,MAChB,sBAAsB,MACtB,WACmB;AACnB,iBAAgB;AACd,MAAI,CAAC,KAAM;EAEX,MAAM,mBAAmB,SACvB,KAAK,MAAK,MAAK,EAAE,SAAS,SAAS,KAAK,CAAC;EAE3C,MAAM,eAAe,MAAkB;AACrC,OAAI,CAAC,oBAAqB;GAC1B,MAAM,IAAI,EAAE;AACZ,OAAI,gBAAgB,EAAE,CAAE;AACxB,YAAS;;EAGX,MAAM,aAAa,MAAqB;AACtC,OAAI,CAAC,cAAe;AACpB,OAAI,EAAE,QAAQ,SAAU,UAAS;;AAGnC,WAAS,iBAAiB,aAAa,YAAY;AACnD,WAAS,iBAAiB,WAAW,UAAU;AAE/C,eAAa;AACX,YAAS,oBAAoB,aAAa,YAAY;AACtD,YAAS,oBAAoB,WAAW,UAAU;;IAEnD;EAAC;EAAM;EAAS;EAAM;EAAqB;EAAc,CAAC"}