@c2n/icon-button 0.0.12 → 0.0.14

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.
@@ -0,0 +1 @@
1
+ {"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/icon-button.ts","declarations":[{"kind":"class","description":"A round, hoverable button that wraps a slotted icon. Renders a real `<button>` (focus is delegated to\nit) so it is keyboard operable; set `aria-label` on the host to name it.","name":"IconButton","cssProperties":[{"type":{"text":"color"},"name":"--c2-icon-button--background-color"},{"type":{"text":"border-radius"},"name":"--c2-icon-button--border-radius","default":"999px"},{"type":{"text":"border"},"name":"--c2-icon-button--border","default":"none"},{"type":{"text":"color"},"name":"--c2-icon-button__hover--background-color","default":"rgb(230, 230, 230)"},{"type":{"text":"outline"},"name":"--c2-icon-button__focus--outline","default":"2px solid rgba(2, 101, 220, 0.4)"},{"type":{"text":"pixel"},"name":"--c2-icon-button__focus--outline-offset","default":"2px"},{"type":{"text":"opacity"},"name":"--c2-icon-button__disabled--opacity","default":"0.38"},{"type":{"text":"color"},"description":"Pressed state of a toggle button (see `selected`).","name":"--c2-icon-button__selected--background-color","default":"rgb(230, 230, 230)"},{"type":{"text":"pixel"},"name":"--c2-icon-button__icon--width","default":"24px"},{"type":{"text":"pixel"},"name":"--c2-icon-button__icon--height","default":"24px"},{"type":{"text":"color"},"name":"--c2-icon-button__icon--color"},{"type":{"text":"color"},"name":"--c2-icon-button__icon__hover--color"},{"type":{"text":"color"},"name":"--c2-icon-button__icon__selected--color"},{"type":{"text":"pixel"},"name":"--c2-icon-button__state-layer--size","default":"48px"}],"cssParts":[{"description":"The native button that provides the icon-only interactive surface.","name":"button"}],"slots":[{"description":"The icon (an inline `<svg>`, a `c2-feather-*` or a `c2-mat-icon` element).","name":""}],"members":[{"kind":"field","name":"shadowRootOptions","type":{"text":"object"},"static":true,"default":"{ ...LitElement.shadowRootOptions, delegatesFocus: true }"},{"kind":"field","name":"tooltip","type":{"text":"string | undefined"},"default":"undefined","description":"Tooltip text shown after a short delay; also used as the accessible name when `aria-label` is not set.","attribute":"tooltip"},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button: no pointer events, no focus, reduced opacity.","attribute":"disabled","reflects":true},{"kind":"field","name":"ariaLabel","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the inner `<button>`.","attribute":"aria-label"},{"kind":"field","name":"selected","type":{"text":"boolean"},"default":"false","description":"Pressed state of a toggle button (`aria-pressed=\"true\"`); styled with the `__selected--*` variables.","attribute":"selected","reflects":true},{"kind":"field","name":"toggle","type":{"text":"boolean"},"default":"false","description":"Declares a toggle button: `aria-pressed` is announced as `false` while not selected. Set by `c2-button-group` in selection modes.","attribute":"toggle","reflects":true}],"attributes":[{"name":"tooltip","type":{"text":"string | undefined"},"default":"undefined","description":"Tooltip text shown after a short delay; also used as the accessible name when `aria-label` is not set.","fieldName":"tooltip"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button: no pointer events, no focus, reduced opacity.","fieldName":"disabled"},{"name":"aria-label","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the inner `<button>`.","fieldName":"ariaLabel"},{"name":"selected","type":{"text":"boolean"},"default":"false","description":"Pressed state of a toggle button (`aria-pressed=\"true\"`); styled with the `__selected--*` variables.","fieldName":"selected"},{"name":"toggle","type":{"text":"boolean"},"default":"false","description":"Declares a toggle button: `aria-pressed` is announced as `false` while not selected. Set by `c2-button-group` in selection modes.","fieldName":"toggle"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"c2-icon-button","customElement":true}],"exports":[{"kind":"js","name":"IconButton","declaration":{"name":"IconButton","module":"src/icon-button.ts"}},{"kind":"custom-element-definition","name":"c2-icon-button","declaration":{"name":"IconButton","module":"src/icon-button.ts"}}]}]}
@@ -1,5 +1,5 @@
1
1
  import { LitElement, html, nothing, unsafeCSS } from "lit";
2
- import { property } from "lit/decorators.js";
2
+ import { property } from "@c2n/core/lit-helper.js";
3
3
  import { customElement } from "@c2n/core/element-helper.js";
4
4
  import { ifDefined } from "lit/directives/if-defined.js";
5
5
  import "@c2n/tooltip";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c2n/icon-button",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "type": "module",
5
5
  "main": "dist/icon-button.js",
6
6
  "exports": {
@@ -21,6 +21,7 @@
21
21
  "files": [
22
22
  "dist",
23
23
  "types",
24
+ "custom-elements.json",
24
25
  "react.d.ts",
25
26
  "react.js",
26
27
  "vue.d.ts",
@@ -61,13 +62,13 @@
61
62
  }
62
63
  },
63
64
  "dependencies": {
64
- "@c2n/core": "0.0.12",
65
- "@c2n/tooltip": "0.0.12",
65
+ "@c2n/core": "0.0.14",
66
+ "@c2n/tooltip": "0.0.14",
66
67
  "lit": "3.3.3"
67
68
  },
68
69
  "devDependencies": {
69
70
  "@c2n/config": "*"
70
71
  },
71
72
  "customElements": "custom-elements.json",
72
- "gitHead": "43e38b42ac221ffeef99a773c42dd3356961d26a"
73
+ "gitHead": "0261bfceaaa9f710a54e8f36cb57f946c0b83e53"
73
74
  }
@@ -8,6 +8,8 @@ import '@c2n/tooltip';
8
8
  *
9
9
  * @slot - The icon (an inline `<svg>`, a `c2-feather-*` or a `c2-mat-icon` element).
10
10
  *
11
+ * @csspart button - The native button that provides the icon-only interactive surface.
12
+ *
11
13
  * @cssproperty {color} --c2-icon-button--background-color
12
14
  * @cssproperty {border-radius} [--c2-icon-button--border-radius=999px]
13
15
  * @cssproperty {border} [--c2-icon-button--border=none]
@@ -1 +1 @@
1
- {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,MAAM,KAAK,CAAA;AAM1D,OAAO,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAoB;IAE1C,OAAgB,iBAAiB;;;;;;;MAA4D;IAE7F,6GAA6G;IACjG,OAAO,EAAE,MAAM,GAAG,SAAS,CAAY;IAEnD,yEAAyE;IAC7B,QAAQ,UAAQ;IAE5D,yDAAyD;IACT,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAE/E,2GAA2G;IAC/D,QAAQ,UAAQ;IAE5D,wIAAwI;IAC5F,MAAM,UAAQ;IAEjD,MAAM;CAehB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,UAAU,CAAA;KAC7B;CACF"}
1
+ {"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../src/icon-button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA4B,MAAM,KAAK,CAAA;AAM1D,OAAO,cAAc,CAAA;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBACa,UAAW,SAAQ,UAAU;IACxC,OAAgB,MAAM,0BAAoB;IAE1C,OAAgB,iBAAiB;;;;;;;MAA4D;IAE7F,6GAA6G;IACjG,OAAO,EAAE,MAAM,GAAG,SAAS,CAAY;IAEnD,yEAAyE;IAC7B,QAAQ,UAAQ;IAE5D,yDAAyD;IACT,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAE/E,2GAA2G;IAC/D,QAAQ,UAAQ;IAE5D,wIAAwI;IAC5F,MAAM,UAAQ;IAEjD,MAAM;CAehB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,UAAU,CAAA;KAC7B;CACF"}