@italia/popover 1.0.0-alpha.9 → 1.0.0-beta.1

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/README.md CHANGED
@@ -1,67 +1,11 @@
1
- # \<it-popover>
1
+ # <it-popover>
2
2
 
3
- This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
3
+ This package is part of [dev-kit-italia](https://italia.github.io/dev-kit-italia), a Web Components kit for the **.italia** design-system.
4
4
 
5
- ## Installation
5
+ ## Installation and usage
6
6
 
7
- ```bash
8
- npm i @italia/popover
9
- ```
7
+ Most users want to install the full kit by installing [`@italia/dev-kit-italia`](https://npmjs.com/package/@italia/dev-kit-italia), but you have the option of installing this single Web Component separately if needed. Please find detailed installation and usage instructions in the [official documentation](https://italia.github.io/dev-kit-italia/?path=/docs/introduzione--documentazione).
10
8
 
11
- ## Usage
9
+ ## Documentation
12
10
 
13
- ```html
14
- <script type="module">
15
- import '@italia/popover';
16
- </script>
17
-
18
- <it-popover></it-popover>
19
- ```
20
-
21
- ## Linting and formatting
22
-
23
- To scan the project for linting and formatting errors, run
24
-
25
- ```bash
26
- npm run lint
27
- ```
28
-
29
- To automatically fix linting and formatting errors, run
30
-
31
- ```bash
32
- npm run format
33
- ```
34
-
35
- ## Testing with Web Test Runner
36
-
37
- To execute a single test run:
38
-
39
- ```bash
40
- npm run test
41
- ```
42
-
43
- To run the tests in interactive watch mode run:
44
-
45
- ```bash
46
- npm run test:watch
47
- ```
48
-
49
- ## Demoing with Storybook
50
-
51
- To run a local instance of Storybook for your component, run
52
-
53
- ```bash
54
- npm run storybook
55
- ```
56
-
57
- To build a production version of Storybook, run
58
-
59
- ```bash
60
- npm run storybook:build
61
- ```
62
-
63
- ## Tooling configs
64
-
65
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
66
-
67
- If you customize the configuration a lot, you can consider moving them to individual files.
11
+ Find the usage instructions for this specific component in its [dedicated documentation page](https://italia.github.io/dev-kit-italia/?path=/docs/componenti-popover--documentazione).
@@ -63,6 +63,14 @@
63
63
  "default": "12",
64
64
  "attribute": "offset"
65
65
  },
66
+ {
67
+ "kind": "field",
68
+ "name": "crossAxisOffset",
69
+ "type": {
70
+ "text": "number | undefined"
71
+ },
72
+ "attribute": "cross-axis-offset"
73
+ },
66
74
  {
67
75
  "kind": "field",
68
76
  "name": "noFlip",
@@ -72,6 +80,16 @@
72
80
  "default": "false",
73
81
  "attribute": "no-flip"
74
82
  },
83
+ {
84
+ "kind": "field",
85
+ "name": "centerArrow",
86
+ "type": {
87
+ "text": "boolean"
88
+ },
89
+ "default": "false",
90
+ "description": "Centre the arrow on the trigger instead of the fixed notch position. Used by avatar dropdowns.",
91
+ "attribute": "center-arrow"
92
+ },
75
93
  {
76
94
  "kind": "field",
77
95
  "name": "_triggerSlot",
@@ -214,6 +232,13 @@
214
232
  "default": "12",
215
233
  "fieldName": "offset"
216
234
  },
235
+ {
236
+ "name": "cross-axis-offset",
237
+ "type": {
238
+ "text": "number | undefined"
239
+ },
240
+ "fieldName": "crossAxisOffset"
241
+ },
217
242
  {
218
243
  "name": "no-flip",
219
244
  "type": {
@@ -221,6 +246,15 @@
221
246
  },
222
247
  "default": "false",
223
248
  "fieldName": "noFlip"
249
+ },
250
+ {
251
+ "name": "center-arrow",
252
+ "type": {
253
+ "text": "boolean"
254
+ },
255
+ "default": "false",
256
+ "description": "Centre the arrow on the trigger instead of the fixed notch position. Used by avatar dropdowns.",
257
+ "fieldName": "centerArrow"
224
258
  }
225
259
  ],
226
260
  "superclass": {
File without changes
File without changes
package/dist/src/index.js CHANGED
File without changes
File without changes
@@ -8,7 +8,10 @@ export declare class ItPopover extends BaseComponent {
8
8
  controlled: boolean;
9
9
  placement: PopoverPlacement;
10
10
  offset: number;
11
+ crossAxisOffset?: number;
11
12
  noFlip: boolean;
13
+ /** Centre the arrow on the trigger instead of the fixed notch position. Used by avatar dropdowns. */
14
+ centerArrow: boolean;
12
15
  private _triggerSlot;
13
16
  private _contentSlot;
14
17
  private get _triggerElement();
@@ -1 +1 @@
1
- {"version":3,"file":"it-popover.d.ts","sourceRoot":"","sources":["../../src/it-popover.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAA2D,KAAK,SAAS,EAAQ,MAAM,kBAAkB,CAAC;AAGjH,KAAK,gBAAgB,GAAG,SAAS,CAAC;AAElC,qBACa,SAAU,SAAQ,aAAa;IAC1C,MAAM,CAAC,MAAM,+BAAU;IAEqB,IAAI,UAAS;IAE5B,UAAU,UAAS;IAEpB,SAAS,EAAE,gBAAgB,CAAkB;IAE7C,MAAM,EAAE,MAAM,CAAM;IAEG,MAAM,EAAE,OAAO,CAAS;IAE5C,OAAO,CAAC,YAAY,CAAmB;IAEvC,OAAO,CAAC,YAAY,CAAmB;IAEtE,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,KAAK,eAAe,GAE1B;IAED,OAAO,CAAC,aAAa,CAAC,CAAc;IAEpC,OAAO,CAAC,QAAQ,CAAC,CAAa;IAE9B,OAAO,CAAC,sBAAsB;IAwB9B,SAAS,CAAC,mBAAmB;IAoB7B,oBAAoB;IAMpB,SAAS,CAAC,YAAY,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;IAKhE,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAatC,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,KAAK;IA6Db,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,gBAAgB,CAQtB;IAEF,OAAO,CAAC,aAAa;IAId,MAAM;IAIN,WAAW;IAIX,YAAY;IAInB,MAAM;CAMP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
1
+ {"version":3,"file":"it-popover.d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