@nimbus-ds/popover 3.0.0 → 3.1.0-rc.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/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use Popovers to bring attention to specific user interface elements and suggest an action or to guide users through a new experience
4
4
 
5
- ## 2023-02-24 `3.0.0`
5
+ ## 2023-03-13 `3.0.0`
6
6
 
7
7
  ### 🛠 Breaking changes
8
8
 
@@ -49,6 +49,7 @@ Use Popovers to bring attention to specific user interface elements and suggest
49
49
  - Removed `terser-webpack-plugin@5.3.5`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
50
50
  - Removed `ts-loader@9.3.1`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
51
51
  - Removed `webpack-cli@4.10.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
52
+ - Removed `webpack@5.74.0`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
52
53
  - Removed `typescript@4.7.4`. ([#63](https://github.com/TiendaNube/nimbus-design-system/pull/63) by [@juniorconquista](https://github.com/juniorconquista))
53
54
 
54
55
  ## 2022-10-24 `1.2.0`
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  // Generated by dts-bundle-generator v7.1.0
2
2
 
3
- import { Placement } from '@floating-ui/react-dom-interactions';
4
3
  import React from 'react';
5
4
  import { HTMLAttributes, ReactNode } from 'react';
6
5
 
@@ -39,36 +38,89 @@ export type PopoverColorProperties = keyof typeof propertiesPopover.color;
39
38
  export type PopoverBackgroundColorProperties = keyof typeof propertiesPopover.backgroundColor;
40
39
  export type PopoverPaddingProperties = keyof typeof propertiesPopover.padding;
41
40
  export interface PopoverSprinkle {
41
+ /**
42
+ * The width property specifies the width of a popover's content area.
43
+ * @default 17.5rem
44
+ */
42
45
  width?: string | Conditions<string>;
46
+ /**
47
+ * The height property specifies the height of a popover's content area.
48
+ */
43
49
  height?: string | Conditions<string>;
50
+ /**
51
+ * The zIndex property specifies the stack order of the popover.
52
+ */
44
53
  zIndex?: number | Conditions<number>;
54
+ /**
55
+ * The backgroundColor property sets the background color of the popover.
56
+ * @default neutral-background
57
+ * @examples ["neutral-interactive", { xs: "neutral-surface", md: "neutral-interactive" }]
58
+ */
45
59
  backgroundColor?: PopoverBackgroundColorProperties | Conditions<PopoverBackgroundColorProperties>;
60
+ /**
61
+ * The color property is used to set the color of the popover.
62
+ * @default neutral-background
63
+ */
46
64
  color?: PopoverColorProperties | Conditions<PopoverColorProperties>;
65
+ /**
66
+ * The padding properties are used to generate space around an popover's content area.
67
+ * @default base
68
+ */
47
69
  padding?: PopoverPaddingProperties | Conditions<PopoverPaddingProperties>;
48
70
  }
49
- export type PopoverExtends = PopoverSprinkle & HTMLAttributes<HTMLDivElement>;
50
- export interface PopoverProps extends PopoverExtends {
51
- /** Popover anchor */
71
+ export type PopoverPlacement = "top" | "right" | "bottom" | "left" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end" | "top-start" | "top-end";
72
+ export interface PopoverProperties extends PopoverSprinkle {
73
+ /**
74
+ * An HTML element, or a function that returns one. It's used to set the position of the popover.
75
+ * @TJS-type React.ReactNode
76
+ */
52
77
  children: ReactNode;
53
- /** Content for the Popover */
78
+ /**
79
+ * The content of the popover.
80
+ * @TJS-type React.ReactNode
81
+ */
54
82
  content: ReactNode;
55
- /** Default open popover */
83
+ /**
84
+ * If true, the component is shown.
85
+ */
56
86
  visible?: boolean;
57
- /** Function to control popover opening and closing */
87
+ /**
88
+ * Function to control popover opening and closing.
89
+ * @TJS-type (visible: boolean) => void;
90
+ */
58
91
  onVisibility?: (visible: boolean) => void;
59
- /** Conditional for displaying the popover arrow */
92
+ /**
93
+ * Conditional for displaying the popover arrow.
94
+ * @default true
95
+ */
60
96
  arrow?: boolean;
61
- /** Position of the Popover */
62
- position?: Placement;
63
- /** Adds hover event listeners that change the open state, like CSS :hover */
97
+ /**
98
+ * Position of the popover.
99
+ * @default bottom
100
+ */
101
+ position?: PopoverPlacement;
102
+ /**
103
+ * Adds hover event listeners that change the open state, like CSS :hover.
104
+ * @default false
105
+ */
64
106
  enabledHover?: boolean;
65
- /** Adds click event listeners that change the open state */
107
+ /**
108
+ * Adds click event listeners that change the open state.
109
+ * @default true
110
+ */
66
111
  enabledClick?: boolean;
67
- /** Adds listeners that dismiss (close) the floating element */
112
+ /**
113
+ * Adds listeners that dismiss (close) the floating element.
114
+ * @default true
115
+ */
68
116
  enabledDismiss?: boolean;
69
- /** offset() displaces the floating element from its core placement along the specified axes */
117
+ /**
118
+ * Offest displaces the floating element from its core placement along the specified axes.
119
+ * @default 10
120
+ */
70
121
  offset?: number;
71
122
  }
123
+ export type PopoverProps = PopoverProperties & HTMLAttributes<HTMLDivElement>;
72
124
  export declare const Popover: React.FC<PopoverProps>;
73
125
 
74
126
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimbus-ds/popover",
3
- "version": "3.0.0",
3
+ "version": "3.1.0-rc.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "sideEffects": false,
11
11
  "scripts": {
12
- "build": "webpack",
12
+ "build": "yarn g:webpack",
13
13
  "clean": "rm -rf dist",
14
14
  "version": "yarn version"
15
15
  },
@@ -29,8 +29,9 @@
29
29
  "url": "https://github.com/TiendaNube/nimbus-design-system/issues"
30
30
  },
31
31
  "devDependencies": {
32
- "@nimbus-ds/box": "^3.0.0",
33
- "@vanilla-extract/dynamic": "^2.0.2",
34
- "webpack": "^5.74.0"
35
- }
32
+ "@nimbus-ds/box": "^3.2.0",
33
+ "@nimbus-ds/webpack": "^1.3.0-rc.2",
34
+ "@vanilla-extract/dynamic": "^2.0.2"
35
+ },
36
+ "stableVersion": "3.0.0"
36
37
  }