@mhmo91/schmancy 0.9.23 → 0.9.24

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.
@@ -1,3 +1,14 @@
1
+ import { type PropertyValues } from 'lit';
2
+ /**
3
+ * Preset → (type, token) shorthand. Saves the two-decision-per-text-node
4
+ * fatigue that 50+ typography nodes in a single page cause.
5
+ */
6
+ export type TypographyPreset = 'display' | 'display-lg' | 'display-md' | 'display-sm' | 'heading-lg' | 'heading-md' | 'heading-sm' | 'title-lg' | 'title-md' | 'title-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'label-lg' | 'label-md' | 'label-sm' | 'caption';
7
+ /**
8
+ * Allowed semantic tag names for the `as` prop. Closed enum so we can
9
+ * use `literal` template parts safely with `lit/static-html`.
10
+ */
11
+ export type TypographyTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'div';
1
12
  declare const SchmancyTypography_base: import("../../mixins").Constructor<CustomElementConstructor> & import("../../mixins").Constructor<import("@mixins/tailwind.mixin").ITailwindElementMixin> & import("../../mixins").Constructor<import("lit").LitElement> & import("../../mixins").Constructor<import("../../mixins").IBaseMixin>;
2
13
  /**
3
14
  * @element schmancy-typography
@@ -11,6 +22,26 @@ export declare class SchmancyTypography extends SchmancyTypography_base {
11
22
  * @type {'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label'}
12
23
  */
13
24
  type: 'display' | 'headline' | 'title' | 'subtitle' | 'body' | 'label';
25
+ /**
26
+ * Shorthand for picking a (type, token) pair in one go. When set, derives
27
+ * `type` and `token` automatically — saves the two-decisions-per-text-node
28
+ * fatigue that hits when a single page has 50+ typography nodes.
29
+ *
30
+ * @attr preset
31
+ * @type {TypographyPreset}
32
+ * @example <schmancy-typography preset="heading-md">Title</schmancy-typography>
33
+ */
34
+ preset?: TypographyPreset;
35
+ /**
36
+ * Render the slot wrapped in the requested semantic HTML element so screen
37
+ * readers expose the right role / heading level. Without `as`, the slot
38
+ * sits directly in the shadow root and the host is a generic element.
39
+ *
40
+ * @attr as
41
+ * @type {TypographyTag}
42
+ * @example <schmancy-typography preset="heading-md" as="h2">Section</schmancy-typography>
43
+ */
44
+ as?: TypographyTag;
14
45
  /**
15
46
  * @attr token - The size token.
16
47
  * @deprecated Prefer using Tailwind responsive text classes for better responsive design.
@@ -49,6 +80,7 @@ export declare class SchmancyTypography extends SchmancyTypography_base {
49
80
  /** Placeholder shown when editable and empty */
50
81
  placeholder: string;
51
82
  private _editRef;
83
+ protected willUpdate(changed: PropertyValues): void;
52
84
  /** Focus and select all text in editable mode */
53
85
  selectAll(): void;
54
86
  connectedCallback(): void;