@mhmo91/schmancy 0.9.14 → 0.9.16

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 (61) hide show
  1. package/custom-elements.json +57 -30
  2. package/dist/agent/schmancy.agent.js +178 -25
  3. package/dist/agent/schmancy.agent.js.map +1 -1
  4. package/dist/agent/schmancy.manifest.json +208 -12
  5. package/dist/autocomplete-CgWUCUU-.js.map +1 -1
  6. package/dist/autocomplete-EM0jE7X2.cjs.map +1 -1
  7. package/dist/button.cjs.map +1 -1
  8. package/dist/button.js.map +1 -1
  9. package/dist/checkbox-Br84TiCs.js.map +1 -1
  10. package/dist/checkbox-DtcFMgZL.cjs.map +1 -1
  11. package/dist/chips-BNYOweGm.js.map +1 -1
  12. package/dist/chips-DoCu5YQb.cjs.map +1 -1
  13. package/dist/extra-BUgyMgjl.cjs.map +1 -1
  14. package/dist/extra-HwbaUnCD.js.map +1 -1
  15. package/dist/form-rCZqoAoK.js.map +1 -1
  16. package/dist/form-wI58M85H.cjs.map +1 -1
  17. package/dist/handover/agent-runtime-followups.md +247 -0
  18. package/dist/handover/agent-runtime-v1.md +109 -0
  19. package/dist/input-BGNZlfL8.cjs.map +1 -1
  20. package/dist/input-Bc3bVISm.js.map +1 -1
  21. package/dist/input-chip-CiG61y-N.js.map +1 -1
  22. package/dist/input-chip-p24lkYtY.cjs.map +1 -1
  23. package/dist/radio-group-B72sYGnS.js.map +1 -1
  24. package/dist/radio-group-B7DuNxUq.cjs.map +1 -1
  25. package/dist/select-DFxoBgEf.cjs.map +1 -1
  26. package/dist/select-wFDKDLQI.js.map +1 -1
  27. package/dist/switch.cjs.map +1 -1
  28. package/dist/switch.js.map +1 -1
  29. package/dist/textarea-B2544vx9.cjs.map +1 -1
  30. package/dist/textarea-CS-KdSLz.js.map +1 -1
  31. package/package.json +3 -2
  32. package/src/autocomplete/autocomplete.ts +12 -1
  33. package/src/button/button.ts +6 -1
  34. package/src/button/icon-button.ts +7 -1
  35. package/src/checkbox/checkbox.ts +7 -1
  36. package/src/chips/chips.ts +14 -0
  37. package/src/chips/input-chip.ts +6 -6
  38. package/src/extra/countries/countries.ts +10 -0
  39. package/src/extra/timezone/timezone.ts +8 -1
  40. package/src/form/form.ts +9 -2
  41. package/src/input/input.ts +11 -4
  42. package/src/radio-group/radio-button.ts +10 -1
  43. package/src/radio-group/radio-group.ts +18 -0
  44. package/src/select/select.ts +12 -1
  45. package/src/switch/switch.ts +7 -4
  46. package/src/textarea/textarea.ts +9 -1
  47. package/types/src/autocomplete/autocomplete.d.ts +12 -1
  48. package/types/src/button/button.d.ts +6 -1
  49. package/types/src/button/icon-button.d.ts +7 -1
  50. package/types/src/checkbox/checkbox.d.ts +7 -1
  51. package/types/src/chips/chips.d.ts +14 -0
  52. package/types/src/chips/input-chip.d.ts +6 -6
  53. package/types/src/extra/countries/countries.d.ts +10 -0
  54. package/types/src/extra/timezone/timezone.d.ts +8 -1
  55. package/types/src/form/form.d.ts +9 -2
  56. package/types/src/input/input.d.ts +11 -4
  57. package/types/src/radio-group/radio-button.d.ts +10 -1
  58. package/types/src/radio-group/radio-group.d.ts +18 -0
  59. package/types/src/select/select.d.ts +12 -1
  60. package/types/src/switch/switch.d.ts +7 -4
  61. package/types/src/textarea/textarea.d.ts +9 -1
@@ -5,12 +5,15 @@ import { customElement, property } from 'lit/decorators.js'
5
5
  export type SchmancySwitchChangeEvent = CustomEvent<{ value: boolean }>
6
6
 
7
7
  /**
8
- * Binary on/off control. Form-associated, keyboard-accessible, semantically a
9
- * switch (ARIA role="switch"). Distinct from `schmancy-checkbox`: a switch
10
- * represents an immediate state change, a checkbox represents a selection in
11
- * a form to be submitted.
8
+ * Binary on/off control with immediate effect. Form-associated, keyboard-accessible, semantically a switch (ARIA role="switch"). Distinct from `schmancy-checkbox`: a switch represents an immediate state change, a checkbox represents a selection in a form to be submitted.
12
9
  *
13
10
  * @element schmancy-switch
11
+ * @summary Use when flipping the control takes effect right away (e.g. "Dark mode", "Enable notifications"). Prefer schmancy-checkbox for form submissions.
12
+ * @example
13
+ * <schmancy-switch ?checked=${this.darkMode} @change=${(e) => this.darkMode = e.detail.value}>
14
+ * Dark mode
15
+ * </schmancy-switch>
16
+ * @platform switch change - Accessible native `<button role="switch" aria-checked>` under the hood. No native HTML element exists; falls back to a styled checkbox if the tag never registers.
14
17
  * @fires change - `CustomEvent<{ value: boolean }>` when the state changes.
15
18
  * @attr checked - Initial checked state (also reflected via `value`).
16
19
  * @attr disabled - Disables interaction.
@@ -8,7 +8,15 @@ import style from './textarea.scss?inline'
8
8
  import { TailwindElement } from '@mixins/index'
9
9
 
10
10
  /**
11
- * Textarea component with auto-resize and form integration.
11
+ * Multi-line text input with auto-resize and form integration. Form-associated.
12
+ *
13
+ * @element schmancy-textarea
14
+ * @summary Textarea for freeform text — notes, descriptions, messages. Auto-grows with content up to a maxlength.
15
+ * @example
16
+ * <schmancy-textarea name="description" label="Description" rows="4" maxlength="500"></schmancy-textarea>
17
+ * @platform textarea change - Schmancy-skinned native `<textarea>`. Degrades to styled native `<textarea>` if the tag never registers.
18
+ * @fires input - On every keystroke.
19
+ * @fires change - On blur.
12
20
  *
13
21
  * @prop {string} name - Name attribute for form submission
14
22
  * @prop {string} value - Current value of the textarea
@@ -6,7 +6,18 @@ export type SchmancyAutocompleteChangeEvent = CustomEvent<{
6
6
  }>;
7
7
  declare const SchmancyAutocomplete_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
8
8
  /**
9
- * Autocomplete input component with filtering and multi-select support.
9
+ * Combobox with type-ahead filtering over a list of `<schmancy-option>` children. Single or multi-select. Form-associated.
10
+ *
11
+ * @element schmancy-autocomplete
12
+ * @summary Use when users need to pick from a known list of options but the list is too long for a plain select dropdown. Prefer schmancy-select for short static lists.
13
+ * @example
14
+ * <schmancy-autocomplete name="country" label="Country" placeholder="Start typing…">
15
+ * <schmancy-option value="US">United States</schmancy-option>
16
+ * <schmancy-option value="CA">Canada</schmancy-option>
17
+ * <schmancy-option value="GB">United Kingdom</schmancy-option>
18
+ * </schmancy-autocomplete>
19
+ * @platform combobox change - Composed of a schmancy-input + a floating listbox populated from `<schmancy-option>` children. Multi-select renders selections as schmancy-input-chip chips. Degrades to a datalist-backed native input if the tag never registers.
20
+ * @fires change - `SchmancyAutocompleteChangeEvent` with `{ value }` (single) or `{ value, values }` (multi).
10
21
  *
11
22
  * @prop {string} name - Name attribute for form submission
12
23
  * @prop {string} label - Label text displayed above the input
@@ -8,8 +8,13 @@ export type ButtonVariant = 'elevated' | 'filled' | 'filled tonal' | 'tonal' | '
8
8
  export type ButtonColor = 'primary' | 'secondary' | 'success' | 'error' | 'warning' | 'info' | 'neutral';
9
9
  declare const SchmancyButton_base: CustomElementConstructor & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
10
10
  /**
11
- * A button component.
11
+ * Material Design button — primary interactive surface for triggering actions or navigation.
12
12
  * @element schmancy-button
13
+ * @summary Trigger actions or navigate. Form-associated; participates in native form submission.
14
+ * @example
15
+ * <schmancy-button variant="filled" @click=${() => save()}>Save</schmancy-button>
16
+ * <schmancy-button variant="outlined" href="/next">Continue</schmancy-button>
17
+ * @platform button click - Schmancy-skinned native `<button type="submit">`. When `href` is set, degrades to `<a href="…">`. Falls back to plain `<button>` styled with Tailwind if the tag never registers.
13
18
  * @slot - The default slot.
14
19
  * @slot prefix - The prefix slot.
15
20
  * @slot suffix - The suffix slot.
@@ -2,8 +2,14 @@ import { LitElement, PropertyValueMap } from 'lit';
2
2
  import { ButtonVariant } from './button';
3
3
  declare const SchmnacyIconButton_base: CustomElementConstructor & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
4
4
  /**
5
- * An icon button component.
5
+ * Icon-only button for toolbar actions, close affordances, or overflow menus.
6
6
  * @element schmancy-icon-button
7
+ * @summary Compact round/square button wrapping a single icon glyph. Form-associated like schmancy-button.
8
+ * @example
9
+ * <schmancy-icon-button aria-label="Close" @click=${() => close()}>
10
+ * <schmancy-icon>close</schmancy-icon>
11
+ * </schmancy-icon-button>
12
+ * @platform button click - Schmancy-skinned native `<button>` (or `<a>` when `href` is set). aria-label is required for a11y because there's no text content.
7
13
  * @slot - The default slot (usually an icon or glyph).
8
14
  * @csspart base - The underlying native `<button>` (or `<a>` when `href` is set).
9
15
  */
@@ -5,9 +5,15 @@ export type schmancyCheckBoxChangeEvent = CustomEvent<{
5
5
  }>;
6
6
  declare const SchmancyCheckboxElement_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
7
7
  /**
8
+ * Binary checkbox for multi-select or boolean form fields. Wraps Material Web's `<md-checkbox>`; form-associated.
9
+ *
8
10
  * @element schmancy-checkbox
11
+ * @summary Use for "select many from a list" or any boolean that's part of a form submission. Prefer schmancy-switch for immediate-effect toggles.
12
+ * @example
13
+ * <schmancy-checkbox name="tos" required>I accept the terms</schmancy-checkbox>
14
+ * @platform checkbox change - Wraps `<md-checkbox>` from `@material/web`. Degrades to styled native `<input type="checkbox">` if the tag never registers.
9
15
  * @slot - The label for the checkbox.
10
- * @fires valueChange - Event fired when the checkbox value changes.
16
+ * @fires valueChange - `CustomEvent<{ value: boolean }>` when the checkbox is toggled.
11
17
  **/
12
18
  declare class SchmancyCheckboxElement extends SchmancyCheckboxElement_base {
13
19
  protected static shadowRootOptions: {
@@ -2,6 +2,20 @@ import { PropertyValues } from 'lit';
2
2
  import type { FilterChipChangeEvent as SchmancyChipChangeEvent } from './filter-chip';
3
3
  import { SchmancyFilterChip as SchmancyChip } from './filter-chip';
4
4
  declare const SchmancyChips_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
5
+ /**
6
+ * Filter-chip group — container for selectable `<schmancy-chip>` children. Single or multi-select.
7
+ *
8
+ * @element schmancy-chips
9
+ * @summary Use for filtering or choosing from 2–8 mutually-visible options ("Status: active / paused / archived"). Prefer schmancy-select when the list gets long or vertical.
10
+ * @example
11
+ * <schmancy-chips multi @change=${(e) => this.filters = e.detail.values}>
12
+ * <schmancy-chip value="active">Active</schmancy-chip>
13
+ * <schmancy-chip value="paused">Paused</schmancy-chip>
14
+ * <schmancy-chip value="archived">Archived</schmancy-chip>
15
+ * </schmancy-chips>
16
+ * @platform chip-group change - No direct native equivalent. Degrades to a styled schmancy-select with similar semantics if the tag never registers.
17
+ * @fires change - `CustomEvent<{ value: string }>` (single) or `{ values: string[] }` (multi).
18
+ */
5
19
  export default class SchmancyChips extends SchmancyChips_base {
6
20
  private value$;
7
21
  private values$;
@@ -1,7 +1,7 @@
1
1
  import { LitElement } from 'lit';
2
2
  declare const SchmancyInputChip_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
3
3
  /**
4
- * Input chip component - represents user-provided information that can be removed.
4
+ * Input chip displays user-provided information (tags, recipients, filters) that can be removed but not toggled.
5
5
  *
6
6
  * IMPORTANT: Per Material Design 3 specification, input chips do NOT have selected state.
7
7
  * They represent discrete pieces of user input (like entered tags, selections from lists, etc.)
@@ -13,15 +13,15 @@ declare const SchmancyInputChip_base: import("../../mixins").Constructor<CustomE
13
13
  * - Tags or keywords entered by the user
14
14
  * - Selected items from a multi-select dropdown
15
15
  *
16
- * @fires click - Optional click event on chip body (value)
17
- * @fires remove - Dispatched when remove button is clicked (value)
18
- *
16
+ * @element schmancy-input-chip
17
+ * @summary Removable pill that represents a single user input value. No selected state — use schmancy-chip (filter chip) for toggleable options.
19
18
  * @example
20
- * ```html
21
19
  * <schmancy-input-chip value="john@example.com" avatar="/avatars/john.jpg">
22
20
  * John Doe
23
21
  * </schmancy-input-chip>
24
- * ```
22
+ * @platform chip remove - No native equivalent. Composed of a labeled pill + close button. Degrades to a styled `<span>` with a trailing close `<button>` if the tag never registers.
23
+ * @fires click - Optional click event on chip body (value)
24
+ * @fires remove - Dispatched when remove button is clicked (value)
25
25
  */
26
26
  export declare class SchmancyInputChip extends SchmancyInputChip_base {
27
27
  /** Value identifier for the chip */
@@ -1,4 +1,14 @@
1
1
  declare const SchmancyCountriesSelect_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
+ /**
3
+ * Country picker — type-ahead autocomplete over the ISO 3166-1 country list. Form-associated.
4
+ *
5
+ * @element schmancy-select-countries
6
+ * @summary Drop-in replacement for schmancy-autocomplete when the options are specifically "every country". Pre-seeds the list from countries.data.
7
+ * @example
8
+ * <schmancy-select-countries name="country" label="Shipping country" required></schmancy-select-countries>
9
+ * @platform combobox change - Composes schmancy-autocomplete with a static options list. Value is the 2-letter ISO code.
10
+ * @fires change - `SchmancyAutocompleteChangeEvent` with `{ value: string }` (the ISO code).
11
+ */
2
12
  export declare class SchmancyCountriesSelect extends SchmancyCountriesSelect_base {
3
13
  static formAssociated: boolean;
4
14
  private internals?;
@@ -1,6 +1,13 @@
1
1
  declare const SchmancyTimezonesSelect_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Timezone selector component with autocomplete filtering.
3
+ * Timezone picker type-ahead autocomplete over the IANA tz database. Form-associated.
4
+ *
5
+ * @element schmancy-select-timezones
6
+ * @summary Drop-in replacement for schmancy-autocomplete when the options are IANA timezone names. Value is the IANA identifier ("America/Los_Angeles").
7
+ * @example
8
+ * <schmancy-select-timezones name="tz" label="Timezone" value="America/New_York"></schmancy-select-timezones>
9
+ * @platform combobox change - Composes schmancy-autocomplete with a static IANA timezones list.
10
+ * @fires change - `SchmancyAutocompleteChangeEvent` with `{ value: string }` (the IANA tz name).
4
11
  *
5
12
  * @prop {string} name - Name attribute for form submission
6
13
  * @prop {string} value - Selected timezone value
@@ -1,6 +1,5 @@
1
1
  /**
2
- * A thin ergonomic wrapper around a native `<form>` element. Its children are
3
- * reparented into a `<form>` element in light DOM on connection, so:
2
+ * Ergonomic wrapper around a native `<form>`. Children are reparented into a light-DOM `<form>` on connection so form-associated custom elements resolve `internals.form` via native DOM ancestry.
4
3
  *
5
4
  * - Form-associated custom elements (FACE) resolve their `internals.form`
6
5
  * correctly via native DOM ancestry.
@@ -16,6 +15,14 @@
16
15
  * lifting is the platform's.
17
16
  *
18
17
  * @element schmancy-form
18
+ * @summary Always wrap form-associated schmancy components in schmancy-form (or a native `<form>`) so `new FormData(form)` just works.
19
+ * @example
20
+ * <schmancy-form @submit=${(e) => console.log(Object.fromEntries(e.detail))}>
21
+ * <schmancy-input name="email" type="email" required></schmancy-input>
22
+ * <schmancy-input name="password" type="password" required></schmancy-input>
23
+ * <schmancy-button type="submit" variant="filled">Sign in</schmancy-button>
24
+ * </schmancy-form>
25
+ * @platform form submit - Light-DOM native `<form>` element. Degrades to a `<form>` if the tag never registers — same semantics, just no CustomEvent translation.
19
26
  * @fires submit - `CustomEvent<FormData>` emitted when the form is submitted.
20
27
  * @fires reset - Emitted after the underlying form resets.
21
28
  */
@@ -28,11 +28,18 @@ export type SchmancyInputEnterEvent = CustomEvent<EventDetails>;
28
28
  export type InputSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
29
29
  declare const SchmancyInput_base: import("@mixins/index").Constructor<import("@mixins/index").IFormFieldMixin> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
30
30
  /**
31
- * Enhanced version of the SchmancyInput component with improved form integration
32
- * and compatibility with legacy API.
31
+ * Single-line text input the primary form-text primitive. Form-associated via ElementInternals, so it participates in native `<form>` submission, validation, and reset without additional wiring.
33
32
  *
34
- * This component uses the native form association API and maintains parity with
35
- * native input behaviors while providing a stylish, accessible interface.
33
+ * @element schmancy-input
34
+ * @summary Text input with Material Design styling, native form integration, and RxJS-debounced input/change/enter events.
35
+ * @example
36
+ * <schmancy-form @submit=${onSubmit}>
37
+ * <schmancy-input name="email" type="email" label="Email" required></schmancy-input>
38
+ * </schmancy-form>
39
+ * @platform input change - Schmancy-skinned native `<input>`. Degrades to `<input class="…">` styled via Tailwind if the tag never registers.
40
+ * @fires input - `CustomEvent<{value: string}>` on every keystroke.
41
+ * @fires change - `CustomEvent<{value: string}>` on blur/change.
42
+ * @fires enter - `CustomEvent<{value: string}>` when user presses Enter.
36
43
  *
37
44
  * @prop {string} name - Name attribute for form submission (inherited from FormFieldMixin)
38
45
  * @prop {string} label - Label text for the form field (inherited from FormFieldMixin)
@@ -1,6 +1,15 @@
1
1
  declare const RadioButton_base: import("@mixins/index").Constructor<import("@mixins/index").IFormFieldMixin> & import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
2
2
  /**
3
- * Radio button component for use within radio groups.
3
+ * Single radio button always rendered as a child of `<schmancy-radio-group>`, never standalone.
4
+ *
5
+ * @element schmancy-radio-button
6
+ * @summary Low-level primitive. Use schmancy-radio-group and pass `.options` for the common path; only instantiate schmancy-radio-button directly when you need per-button custom rendering.
7
+ * @example
8
+ * <schmancy-radio-group name="plan">
9
+ * <schmancy-radio-button value="free">Free</schmancy-radio-button>
10
+ * <schmancy-radio-button value="pro" checked>Pro</schmancy-radio-button>
11
+ * </schmancy-radio-group>
12
+ * @platform radio change - Schmancy-skinned `<input type="radio">` semantics. Degrades to native radio if the tag never registers.
4
13
  *
5
14
  * @prop {string} name - Name attribute for grouping radio buttons
6
15
  * @prop {string} value - Value of this radio button
@@ -6,6 +6,24 @@ export type SchmancyRadioGroupChangeEvent = CustomEvent<{
6
6
  value: string;
7
7
  }>;
8
8
  declare const RadioGroup_base: import("@mixins/index").Constructor<import("@mixins/index").IFormFieldMixin> & import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
9
+ /**
10
+ * Radio-button group — single-select from a static list of mutually-exclusive options. Form-associated.
11
+ *
12
+ * @element schmancy-radio-group
13
+ * @summary Use for 2–5 mutually-exclusive options where all should stay visible ("Shipping: standard / express / overnight"). Prefer schmancy-select when the list grows.
14
+ * @example
15
+ * <schmancy-radio-group
16
+ * name="shipping"
17
+ * label="Shipping"
18
+ * .options=${[
19
+ * { label: 'Standard (5 days)', value: 'standard' },
20
+ * { label: 'Express (2 days)', value: 'express' },
21
+ * { label: 'Overnight', value: 'overnight' },
22
+ * ]}
23
+ * ></schmancy-radio-group>
24
+ * @platform radiogroup change - Renders schmancy-radio-button children. Degrades to a fieldset with native `<input type="radio" name="…">` siblings if the tag never registers.
25
+ * @fires change - `SchmancyRadioGroupChangeEvent` with the selected `value`.
26
+ */
9
27
  export declare class RadioGroup extends RadioGroup_base {
10
28
  label: string;
11
29
  name: string;
@@ -4,7 +4,18 @@ export type SchmancySelectChangeEvent = CustomEvent<{
4
4
  }>;
5
5
  declare const SchmancySelect_base: CustomElementConstructor & import("@mixins/index").Constructor<import("lit").LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
6
6
  /**
7
- * Select dropdown component with single and multi-select support.
7
+ * Dropdown selector single or multi-select from a list of `<schmancy-option>` children. Form-associated.
8
+ *
9
+ * @element schmancy-select
10
+ * @summary Material Design dropdown with type-to-filter, keyboard nav, single or multi-select. Options are declared as `<schmancy-option>` children; value / values props sync with selection.
11
+ * @example
12
+ * <schmancy-select name="priority" label="Priority" value="medium">
13
+ * <schmancy-option value="low">Low</schmancy-option>
14
+ * <schmancy-option value="medium">Medium</schmancy-option>
15
+ * <schmancy-option value="high">High</schmancy-option>
16
+ * </schmancy-select>
17
+ * @platform select change - Floating-UI-positioned listbox. Degrades to native `<select>` styled via Tailwind if the tag never registers, though multi-select UX is lost.
18
+ * @fires change - `SchmancySelectChangeEvent` with `{ value }` (single) or `{ value: string[] }` (multi).
8
19
  *
9
20
  * @prop {string} name - Name attribute for form submission
10
21
  * @prop {string} label - Label text displayed above the select
@@ -4,12 +4,15 @@ export type SchmancySwitchChangeEvent = CustomEvent<{
4
4
  }>;
5
5
  declare const SchmancySwitch_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
6
6
  /**
7
- * Binary on/off control. Form-associated, keyboard-accessible, semantically a
8
- * switch (ARIA role="switch"). Distinct from `schmancy-checkbox`: a switch
9
- * represents an immediate state change, a checkbox represents a selection in
10
- * a form to be submitted.
7
+ * Binary on/off control with immediate effect. Form-associated, keyboard-accessible, semantically a switch (ARIA role="switch"). Distinct from `schmancy-checkbox`: a switch represents an immediate state change, a checkbox represents a selection in a form to be submitted.
11
8
  *
12
9
  * @element schmancy-switch
10
+ * @summary Use when flipping the control takes effect right away (e.g. "Dark mode", "Enable notifications"). Prefer schmancy-checkbox for form submissions.
11
+ * @example
12
+ * <schmancy-switch ?checked=${this.darkMode} @change=${(e) => this.darkMode = e.detail.value}>
13
+ * Dark mode
14
+ * </schmancy-switch>
15
+ * @platform switch change - Accessible native `<button role="switch" aria-checked>` under the hood. No native HTML element exists; falls back to a styled checkbox if the tag never registers.
13
16
  * @fires change - `CustomEvent<{ value: boolean }>` when the state changes.
14
17
  * @attr checked - Initial checked state (also reflected via `value`).
15
18
  * @attr disabled - Disables interaction.
@@ -1,7 +1,15 @@
1
1
  import { LitElement, type PropertyValues } from 'lit';
2
2
  declare const SchmancyTextarea_base: import("@mixins/index").Constructor<CustomElementConstructor> & import("@mixins/index").Constructor<import("@mixins/index").ITailwindElementMixin> & import("@mixins/index").Constructor<LitElement> & import("@mixins/index").Constructor<import("@mixins/index").IBaseMixin>;
3
3
  /**
4
- * Textarea component with auto-resize and form integration.
4
+ * Multi-line text input with auto-resize and form integration. Form-associated.
5
+ *
6
+ * @element schmancy-textarea
7
+ * @summary Textarea for freeform text — notes, descriptions, messages. Auto-grows with content up to a maxlength.
8
+ * @example
9
+ * <schmancy-textarea name="description" label="Description" rows="4" maxlength="500"></schmancy-textarea>
10
+ * @platform textarea change - Schmancy-skinned native `<textarea>`. Degrades to styled native `<textarea>` if the tag never registers.
11
+ * @fires input - On every keystroke.
12
+ * @fires change - On blur.
5
13
  *
6
14
  * @prop {string} name - Name attribute for form submission
7
15
  * @prop {string} value - Current value of the textarea