@c2n/select 0.0.12 → 0.0.13

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/select.ts","declarations":[{"kind":"class","description":"A dropdown built from a trigger button and a `c2-list` of `c2-list-item` rows inside a `c2-overlay` popover. The\nrows are the light-DOM children of the select, so they are themed with the `--c2-list-item--*` variables directly on\nthe select (or on a wrapper); the dropdown container is themed through the `--c2-select__list--*` variables and the\ntrigger through `--c2-select__button--*`. The select has no intrinsic width: give the host a `width` (or place it in\na grid/flex cell) and the trigger fills it.","name":"Select","cssProperties":[{"type":{"text":"pixel"},"name":"--c2-select__button--min-height","default":"36px"},{"type":{"text":"padding"},"name":"--c2-select__button--padding","default":"6px 10px 6px 12px"},{"type":{"text":"pixel"},"description":"Space between the icons and the text.","name":"--c2-select__button--gap","default":"8px"},{"type":{"text":"color"},"name":"--c2-select__button--background","default":"#ffffff"},{"type":{"text":"color"},"name":"--c2-select__button--color","default":"#18181b"},{"type":{"text":"font-size"},"name":"--c2-select__button--font-size","default":"14px"},{"type":{"text":"font-weight"},"name":"--c2-select__button--font-weight"},{"type":{"text":"font-style"},"name":"--c2-select__button--font-style","default":"normal"},{"type":{"text":"font-family"},"name":"--c2-select__button--font-family"},{"type":{"text":"border-radius"},"name":"--c2-select__button--border-top-left-radius","default":"6px"},{"type":{"text":"border-radius"},"name":"--c2-select__button--border-top-right-radius","default":"6px"},{"type":{"text":"border-radius"},"name":"--c2-select__button--border-bottom-left-radius","default":"6px"},{"type":{"text":"border-radius"},"name":"--c2-select__button--border-bottom-right-radius","default":"6px"},{"type":{"text":"border"},"name":"--c2-select__button--border-top","default":"1px solid #bcbcc6"},{"type":{"text":"border"},"name":"--c2-select__button--border-right","default":"1px solid #bcbcc6"},{"type":{"text":"border"},"name":"--c2-select__button--border-bottom","default":"1px solid #bcbcc6"},{"type":{"text":"border"},"name":"--c2-select__button--border-left","default":"1px solid #bcbcc6"},{"type":{"text":"border"},"name":"--c2-select__button__hover--border-top","default":"1px solid #a1a1aa"},{"type":{"text":"border"},"name":"--c2-select__button__hover--border-right","default":"1px solid #a1a1aa"},{"type":{"text":"border"},"name":"--c2-select__button__hover--border-bottom","default":"1px solid #a1a1aa"},{"type":{"text":"border"},"name":"--c2-select__button__hover--border-left","default":"1px solid #a1a1aa"},{"type":{"text":"color"},"name":"--c2-select__button__hover--background","default":"#fafafa"},{"type":{"text":"color"},"name":"--c2-select__button__hover--color","default":"#18181b"},{"type":{"text":"border"},"name":"--c2-select__button__open--border-top","default":"1px solid #476ef9"},{"type":{"text":"border"},"name":"--c2-select__button__open--border-right","default":"1px solid #476ef9"},{"type":{"text":"border"},"name":"--c2-select__button__open--border-bottom","default":"1px solid #476ef9"},{"type":{"text":"border"},"name":"--c2-select__button__open--border-left","default":"1px solid #476ef9"},{"type":{"text":"outline"},"name":"--c2-select__button__focus--outline","default":"2px solid rgba(71, 110, 249, 0.4)"},{"type":{"text":"pixel"},"description":"Flush by default: `[open]` already turns the border accent, so an offset ring reads as a second border.","name":"--c2-select__button__focus--outline-offset","default":"0px"},{"type":{"text":"opacity"},"name":"--c2-select__button__disabled--opacity","default":"0.38"},{"type":{"text":"pixel"},"name":"--c2-select__button__prefix-icon--width","default":"16px"},{"type":{"text":"pixel"},"name":"--c2-select__button__prefix-icon--height","default":"16px"},{"type":{"text":"color"},"description":"Defaults to the trigger text colour.","name":"--c2-select__button__prefix-icon--color"},{"type":{"text":"pixel"},"name":"--c2-select__button__suffix-icon--width","default":"16px"},{"type":{"text":"pixel"},"name":"--c2-select__button__suffix-icon--height","default":"16px"},{"type":{"text":"color"},"name":"--c2-select__button__suffix-icon--color","default":"#71717a"},{"type":{"text":"font-weight"},"name":"--c2-select__placeholder--font-weight"},{"type":{"text":"font-style"},"name":"--c2-select__placeholder--font-style"},{"type":{"text":"color"},"name":"--c2-select__placeholder--color","default":"#71717a"},{"type":{"text":"opacity"},"name":"--c2-select__placeholder--opacity","default":"1"},{"type":{"text":"color"},"name":"--c2-select__list--background","default":"#ffffff"},{"type":{"text":"border"},"name":"--c2-select__list--border-top","default":"1px solid #e4e4e7"},{"type":{"text":"border"},"name":"--c2-select__list--border-right","default":"1px solid #e4e4e7"},{"type":{"text":"border"},"name":"--c2-select__list--border-bottom","default":"1px solid #e4e4e7"},{"type":{"text":"border"},"name":"--c2-select__list--border-left","default":"1px solid #e4e4e7"},{"type":{"text":"border-radius"},"name":"--c2-select__list--border-top-left-radius","default":"8px"},{"type":{"text":"border-radius"},"name":"--c2-select__list--border-top-right-radius","default":"8px"},{"type":{"text":"border-radius"},"name":"--c2-select__list--border-bottom-left-radius","default":"8px"},{"type":{"text":"border-radius"},"name":"--c2-select__list--border-bottom-right-radius","default":"8px"},{"type":{"text":"box-shadow"},"name":"--c2-select__list--box-shadow","default":"0 8px 24px rgba(24, 24, 27, 0.08)"},{"type":{"text":"padding"},"name":"--c2-select__list--padding-top","default":"4px"},{"type":{"text":"padding"},"name":"--c2-select__list--padding-right","default":"4px"},{"type":{"text":"padding"},"name":"--c2-select__list--padding-bottom","default":"4px"},{"type":{"text":"padding"},"name":"--c2-select__list--padding-left","default":"4px"},{"type":{"text":"pixel"},"description":"Floor for the dropdown's width; it is never narrower than the trigger.","name":"--c2-select__list--min-width","default":"auto"},{"type":{"text":"pixel"},"description":"The dropdown scrolls past this height.","name":"--c2-select__list--max-height","default":"280px"}],"slots":[{"description":"The options: `c2-list-item` elements, each with a `value`.","name":"default"},{"description":"Icon shown at the start of the trigger: an inline SVG, a `c2-feather-*` icon or a `c2-mat-icon`.","name":"button-prefix-icon"},{"description":"Icon shown at the end of the trigger. Defaults to a chevron that flips while open.","name":"button-suffix-icon"},{"description":"Replaces the trigger text entirely (selected labels or placeholder) with custom markup.","name":"button-content"}],"members":[{"kind":"field","name":"formAssociated","type":{"text":"boolean"},"static":true,"default":"true"},{"kind":"field","name":"shadowRootOptions","type":{"text":"object"},"static":true,"default":"{ ...LitElement.shadowRootOptions, delegatesFocus: true }"},{"kind":"field","name":"internals","privacy":"private","readonly":true},{"kind":"field","name":"customValidityMessage","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"disabledByForm","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"defaultValue","type":{"text":"string[]"},"privacy":"private","default":"[]"},{"kind":"field","name":"defaultValueCaptured","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"open","type":{"text":"boolean"},"default":"false","description":"Whether the dropdown is showing. Reflects the popover state; set it to open or close programmatically.","attribute":"open","reflects":true},{"kind":"field","name":"readonly","type":{"text":"boolean"},"default":"false","description":"Shows the current value but never opens the dropdown.","attribute":"readonly","reflects":true},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Dims the trigger and ignores interaction.","attribute":"disabled","reflects":true},{"kind":"field","name":"focused","type":{"text":"boolean"},"default":"false","description":"True while the trigger has keyboard focus.","attribute":"focused","reflects":true},{"kind":"field","name":"fitSize","type":{"text":"boolean"},"default":"false","description":"Make the dropdown exactly as wide as the trigger instead of at least as wide.","attribute":"fit-size"},{"kind":"field","name":"placeholder","type":{"text":"string"},"default":"''","description":"Text shown in the trigger while nothing is selected.","attribute":"placeholder"},{"kind":"field","name":"ariaLabel","type":{"text":"string | null"},"default":"null","description":"Accessible name of the trigger and option list.","attribute":"aria-label"},{"kind":"field","name":"ariaLabelledByAttr","type":{"text":"string | null"},"default":"null","description":"Mirrors the host's `aria-labelledby` so the trigger re-renders when a label claims the element — a\n`c2-label[for]` sets it after both have upgraded.","attribute":"aria-labelledby"},{"kind":"field","name":"labelText","type":{"text":"string"},"privacy":"private","default":"''","description":"Text of whatever labels the host, resolved once the DOM settles; see triggerLabel."},{"kind":"field","name":"multiple","type":{"text":"boolean"},"default":"false","description":"Allow several options to be selected; the dropdown stays open after a pick and the trigger lists every label.","attribute":"multiple"},{"kind":"field","name":"required","type":{"text":"boolean"},"default":"false","description":"Keep at least one option selected: picking the only selected option again does not clear it.","attribute":"required"},{"kind":"field","name":"name","type":{"text":"string"},"default":"''","description":"Name used when the select participates in a form.","attribute":"name"},{"kind":"field","name":"value","type":{"text":"string[]"},"default":"[]","description":"Selected values. Written as `value=\"a;b\"` in markup, read as `['a', 'b']` from the property.","attribute":"value","reflects":true},{"kind":"field","name":"selectedValue","type":{"text":"string"},"description":"Scalar convenience API for a single-select. Setting it replaces the current selection."},{"kind":"field","name":"form","description":"The containing form, when this control is associated with one.","readonly":true},{"kind":"field","name":"labels","description":"Labels associated with this form control.","readonly":true},{"kind":"field","name":"validity","readonly":true},{"kind":"field","name":"validationMessage","readonly":true},{"kind":"field","name":"willValidate","readonly":true},{"kind":"field","name":"button","type":{"text":"HTMLButtonElement"},"privacy":"public"},{"kind":"field","name":"menu","type":{"text":"HTMLElement"},"privacy":"public"},{"kind":"field","name":"listItemSlot","type":{"text":"HTMLSlotElement | undefined"},"privacy":"public"},{"kind":"field","name":"displayText","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"childItemsUpdated","type":{"text":"Promise<unknown[]>"},"privacy":"protected"},{"kind":"field","name":"data","type":{"text":"unknown[]"},"default":"[]"},{"kind":"method","name":"formResetCallback"},{"kind":"method","name":"formDisabledCallback","parameters":[{"name":"disabled","type":{"text":"boolean"}}]},{"kind":"method","name":"formStateRestoreCallback","parameters":[{"name":"state","type":{"text":"string | File | FormData | null"}}]},{"kind":"method","name":"checkValidity"},{"kind":"method","name":"reportValidity"},{"kind":"method","name":"setCustomValidity","parameters":[{"name":"message","type":{"text":"string"}}]},{"kind":"method","name":"onButtonBlur","privacy":"private","return":{"type":{"text":"void"}}},{"kind":"field","name":"onKeydown","privacy":"private"},{"kind":"method","name":"toggle","privacy":"public","return":{"type":{"text":"void"}},"parameters":[{"name":"value","optional":true,"type":{"text":"boolean"}}]},{"kind":"method","name":"onButtonFocus","privacy":"private","return":{"type":{"text":"void"}}},{"kind":"method","name":"prepareGetDisplayText","privacy":"private"},{"kind":"method","name":"updateDisplayText","privacy":"private"},{"kind":"method","name":"renderButtonContent","privacy":"private"},{"kind":"method","name":"renderButtonSuffixIcon","privacy":"private"},{"kind":"method","name":"handleSelectionChange","privacy":"private","parameters":[{"name":"event","type":{"text":"CustomEvent<SelectionChangeEventDetail>"}}]},{"kind":"method","name":"handleOverlayToggle","privacy":"private","parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"syncFormState","privacy":"private"},{"kind":"field","name":"effectiveDisabled","privacy":"private","readonly":true},{"kind":"method","name":"getUpdateComplete","privacy":"protected","return":{"type":{"text":"Promise<boolean>"}}},{"kind":"method","name":"handleSlotChange","privacy":"private"},{"kind":"field","name":"triggerLabel","type":{"text":"string"},"privacy":"private","description":"The accessible name for the trigger.\n\nThe focusable control is a `<button>` inside the shadow root, and neither of the two ways an author\nnames this element reaches it on its own: `aria-labelledby` on the host points at an id in the light DOM,\nwhich ARIA cannot resolve across the shadow boundary, and a wrapping `<label>` names the host rather than\nthe button. So the label's *text* is copied onto the button instead.","readonly":true},{"kind":"method","name":"syncLabelText","privacy":"private","return":{"type":{"text":"void"}},"description":"Reads the text of whatever labels the host: `aria-labelledby` first, then any associated `<label>`."}],"events":[{"name":"input","type":{"text":"Event"},"description":"Fired with `selection-change`, after `value` is updated. Carries no detail: it exists so the select behaves like the other form controls, which is what `v-model`, `ngModel` and any generic form binding listen for."},{"name":"change","type":{"text":"Event"},"description":"Fired with `input`. A select commits on every pick, so the two always fire together."},{"type":{"text":"CustomEvent<SelectionChangeEventDetail>"},"description":"Fired after the user picks an option. `detail.value` is the array of selected values (one entry unless `multiple`), `detail.data` the `data` of each selected row. Does not bubble: several components fire `selection-change`, so a listener belongs on the element itself rather than on an ancestor.","name":"selection-change"}],"attributes":[{"name":"open","type":{"text":"boolean"},"default":"false","description":"Whether the dropdown is showing. Reflects the popover state; set it to open or close programmatically.","fieldName":"open"},{"name":"readonly","type":{"text":"boolean"},"default":"false","description":"Shows the current value but never opens the dropdown.","fieldName":"readonly"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Dims the trigger and ignores interaction.","fieldName":"disabled"},{"name":"focused","type":{"text":"boolean"},"default":"false","description":"True while the trigger has keyboard focus.","fieldName":"focused"},{"name":"fit-size","type":{"text":"boolean"},"default":"false","description":"Make the dropdown exactly as wide as the trigger instead of at least as wide.","fieldName":"fitSize"},{"name":"placeholder","type":{"text":"string"},"default":"''","description":"Text shown in the trigger while nothing is selected.","fieldName":"placeholder"},{"name":"aria-label","type":{"text":"string | null"},"default":"null","description":"Accessible name of the trigger and option list.","fieldName":"ariaLabel"},{"name":"aria-labelledby","type":{"text":"string | null"},"default":"null","description":"Mirrors the host's `aria-labelledby` so the trigger re-renders when a label claims the element — a\n`c2-label[for]` sets it after both have upgraded.","fieldName":"ariaLabelledByAttr"},{"name":"multiple","type":{"text":"boolean"},"default":"false","description":"Allow several options to be selected; the dropdown stays open after a pick and the trigger lists every label.","fieldName":"multiple"},{"name":"required","type":{"text":"boolean"},"default":"false","description":"Keep at least one option selected: picking the only selected option again does not clear it.","fieldName":"required"},{"name":"name","type":{"text":"string"},"default":"''","description":"Name used when the select participates in a form.","fieldName":"name"},{"name":"value","type":{"text":"string[]"},"default":"[]","description":"Selected values. Written as `value=\"a;b\"` in markup, read as `['a', 'b']` from the property.","fieldName":"value"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"c2-select","customElement":true,"internalComponents":["c2-list","c2-overlay"],"slotComponents":["c2-list-item"]}],"exports":[{"kind":"js","name":"Select","declaration":{"name":"Select","module":"src/select.ts"}},{"kind":"custom-element-definition","name":"c2-select","declaration":{"name":"Select","module":"src/select.ts"}}]}]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c2n/select",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "type": "module",
5
5
  "main": "dist/select.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",
@@ -62,15 +63,15 @@
62
63
  }
63
64
  },
64
65
  "dependencies": {
65
- "@c2n/core": "0.0.12",
66
- "@c2n/list": "0.0.12",
67
- "@c2n/list-item": "0.0.12",
68
- "@c2n/overlay": "0.0.12",
66
+ "@c2n/core": "0.0.13",
67
+ "@c2n/list": "0.0.13",
68
+ "@c2n/list-item": "0.0.13",
69
+ "@c2n/overlay": "0.0.13",
69
70
  "lit": "3.3.3"
70
71
  },
71
72
  "devDependencies": {
72
73
  "@c2n/config": "*"
73
74
  },
74
75
  "customElements": "custom-elements.json",
75
- "gitHead": "43e38b42ac221ffeef99a773c42dd3356961d26a"
76
+ "gitHead": "aa19b641f64fbc54c36b7649a8171d7a686abbdd"
76
77
  }