@hyalo/angular 0.0.0-stage → 0.1.0

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 (83) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +21 -0
  3. package/README.md +32 -3
  4. package/fesm2022/hyalo-angular-accordion.mjs +230 -0
  5. package/fesm2022/hyalo-angular-accordion.mjs.map +1 -0
  6. package/fesm2022/hyalo-angular-button.mjs +203 -0
  7. package/fesm2022/hyalo-angular-button.mjs.map +1 -0
  8. package/fesm2022/hyalo-angular-card.mjs +221 -0
  9. package/fesm2022/hyalo-angular-card.mjs.map +1 -0
  10. package/fesm2022/hyalo-angular-choice.mjs +788 -0
  11. package/fesm2022/hyalo-angular-choice.mjs.map +1 -0
  12. package/fesm2022/hyalo-angular-dialog.mjs +571 -0
  13. package/fesm2022/hyalo-angular-dialog.mjs.map +1 -0
  14. package/fesm2022/hyalo-angular-field.mjs +312 -0
  15. package/fesm2022/hyalo-angular-field.mjs.map +1 -0
  16. package/fesm2022/hyalo-angular-icon.mjs +343 -0
  17. package/fesm2022/hyalo-angular-icon.mjs.map +1 -0
  18. package/fesm2022/hyalo-angular-interaction.mjs +455 -0
  19. package/fesm2022/hyalo-angular-interaction.mjs.map +1 -0
  20. package/fesm2022/hyalo-angular-navbar.mjs +343 -0
  21. package/fesm2022/hyalo-angular-navbar.mjs.map +1 -0
  22. package/fesm2022/hyalo-angular-overlay.mjs +94 -0
  23. package/fesm2022/hyalo-angular-overlay.mjs.map +1 -0
  24. package/fesm2022/hyalo-angular-popover-overlay-kit-6wPwnxln.mjs +3 -0
  25. package/fesm2022/hyalo-angular-popover.mjs +487 -0
  26. package/fesm2022/hyalo-angular-popover.mjs.map +1 -0
  27. package/fesm2022/hyalo-angular-segmented.mjs +223 -0
  28. package/fesm2022/hyalo-angular-segmented.mjs.map +1 -0
  29. package/fesm2022/hyalo-angular-select.mjs +464 -0
  30. package/fesm2022/hyalo-angular-select.mjs.map +1 -0
  31. package/fesm2022/hyalo-angular-tabs.mjs +324 -0
  32. package/fesm2022/hyalo-angular-tabs.mjs.map +1 -0
  33. package/fesm2022/hyalo-angular-theme.mjs +94 -0
  34. package/fesm2022/hyalo-angular-theme.mjs.map +1 -0
  35. package/fesm2022/hyalo-angular-toast.mjs +322 -0
  36. package/fesm2022/hyalo-angular-toast.mjs.map +1 -0
  37. package/fesm2022/hyalo-angular.mjs +473 -0
  38. package/fesm2022/hyalo-angular.mjs.map +1 -0
  39. package/package.json +133 -3
  40. package/styles/hyalo-core.css +25 -0
  41. package/styles/hyalo.css +17 -0
  42. package/styles/overlays/dialog.css +9 -0
  43. package/styles/overlays/popover.css +9 -0
  44. package/styles/overlays/select.css +9 -0
  45. package/styles/overlays/toast.css +8 -0
  46. package/styles/palettes/aurora.css +47 -0
  47. package/styles/palettes/ember.css +47 -0
  48. package/styles/palettes/graphite.css +47 -0
  49. package/styles/palettes/ocean.css +47 -0
  50. package/styles/palettes/orchid.css +47 -0
  51. package/styles/palettes/rose.css +47 -0
  52. package/styles/parts/card.css +49 -0
  53. package/styles/parts/dialog.css +116 -0
  54. package/styles/parts/drawer.css +124 -0
  55. package/styles/parts/field.css +36 -0
  56. package/styles/parts/glass.css +137 -0
  57. package/styles/parts/motion.css +82 -0
  58. package/styles/parts/navbar.css +55 -0
  59. package/styles/parts/popover.css +27 -0
  60. package/styles/parts/presence.css +55 -0
  61. package/styles/parts/reset.css +42 -0
  62. package/styles/parts/select.css +46 -0
  63. package/styles/parts/themes.css +105 -0
  64. package/styles/parts/toast.css +128 -0
  65. package/styles/parts/tokens.css +151 -0
  66. package/styles/parts/typography.css +64 -0
  67. package/types/hyalo-angular-accordion.d.ts +74 -0
  68. package/types/hyalo-angular-button.d.ts +88 -0
  69. package/types/hyalo-angular-card.d.ts +61 -0
  70. package/types/hyalo-angular-choice.d.ts +259 -0
  71. package/types/hyalo-angular-dialog.d.ts +170 -0
  72. package/types/hyalo-angular-field.d.ts +135 -0
  73. package/types/hyalo-angular-icon.d.ts +122 -0
  74. package/types/hyalo-angular-interaction.d.ts +131 -0
  75. package/types/hyalo-angular-navbar.d.ts +110 -0
  76. package/types/hyalo-angular-overlay.d.ts +31 -0
  77. package/types/hyalo-angular-popover.d.ts +142 -0
  78. package/types/hyalo-angular-segmented.d.ts +79 -0
  79. package/types/hyalo-angular-select.d.ts +130 -0
  80. package/types/hyalo-angular-tabs.d.ts +102 -0
  81. package/types/hyalo-angular-theme.d.ts +46 -0
  82. package/types/hyalo-angular-toast.d.ts +79 -0
  83. package/types/hyalo-angular.d.ts +345 -0
@@ -0,0 +1,128 @@
1
+ /* The toast stack renders in a CDK overlay at the bottom inline-end corner. */
2
+ .hy-toast-pane {
3
+ z-index: var(--hy-z-toast);
4
+ pointer-events: none;
5
+ }
6
+
7
+ .hy-toast-list {
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-items: flex-end;
11
+ gap: var(--hy-space-2);
12
+ margin: 0;
13
+ padding: var(--hy-space-4);
14
+ padding-block-end: max(var(--hy-space-4), env(safe-area-inset-bottom));
15
+ list-style: none;
16
+ }
17
+
18
+ .hy-toast {
19
+ --_c: var(--hy-ink-2);
20
+ display: flex;
21
+ align-items: flex-start;
22
+ gap: var(--hy-space-3);
23
+ inline-size: min(var(--hy-toast-width, 24rem), calc(100vw - 2 * var(--hy-space-4)));
24
+ padding-block: var(--hy-space-3);
25
+ padding-inline: var(--hy-space-4) var(--hy-space-3);
26
+ border-radius: var(--hy-toast-radius, var(--hy-radius-m));
27
+ color: var(--hy-ink);
28
+ pointer-events: auto;
29
+ touch-action: pan-y;
30
+ animation: hy-toast-in var(--hy-dur-enter) var(--hy-ease-out);
31
+ }
32
+
33
+ .hy-toast[data-tone='info'] {
34
+ --_c: var(--hy-primary);
35
+ }
36
+
37
+ .hy-toast[data-tone='success'] {
38
+ --_c: var(--hy-success);
39
+ }
40
+
41
+ .hy-toast[data-tone='warning'] {
42
+ --_c: var(--hy-warning);
43
+ }
44
+
45
+ .hy-toast[data-tone='danger'] {
46
+ --_c: var(--hy-danger);
47
+ }
48
+
49
+ /*
50
+ * Only the exit transitions. A swipe writes translate and opacity on every
51
+ * frame from a spring, and a transition there would make the toast trail
52
+ * the finger.
53
+ */
54
+ .hy-toast[data-leaving] {
55
+ opacity: 0;
56
+ translate: 0 calc(0.5rem * var(--hy-move));
57
+ transition:
58
+ opacity var(--hy-dur-exit) var(--hy-ease-out),
59
+ translate var(--hy-dur-exit) var(--hy-ease-out);
60
+ }
61
+
62
+ .hy-toast__icon {
63
+ margin-block-start: 0.125rem;
64
+ color: var(--_c);
65
+ }
66
+
67
+ .hy-toast__text {
68
+ flex: 1;
69
+ min-inline-size: 0;
70
+ }
71
+
72
+ .hy-toast__title,
73
+ .hy-toast__message {
74
+ margin: 0;
75
+ }
76
+
77
+ .hy-toast__title {
78
+ font-weight: 620;
79
+ }
80
+
81
+ .hy-toast__message {
82
+ color: var(--hy-ink-2);
83
+ font-size: var(--hy-step--1);
84
+ letter-spacing: var(--hy-tracking-small);
85
+ }
86
+
87
+ .hy-toast__title + .hy-toast__message {
88
+ margin-block-start: 0.125rem;
89
+ }
90
+
91
+ .hy-toast__action,
92
+ .hy-toast__close {
93
+ flex: none;
94
+ display: inline-grid;
95
+ place-items: center;
96
+ min-block-size: 2rem;
97
+ min-inline-size: 2rem;
98
+ padding-inline: var(--hy-space-2);
99
+ border: 0;
100
+ border-radius: var(--hy-radius-s);
101
+ background: transparent;
102
+ color: var(--hy-ink-2);
103
+ font-weight: 600;
104
+ cursor: pointer;
105
+ }
106
+
107
+ .hy-toast__action {
108
+ color: var(--hy-primary);
109
+ }
110
+
111
+ .hy-toast__action:hover,
112
+ .hy-toast__close:hover {
113
+ background: color-mix(in srgb, var(--hy-ink) 8%, transparent);
114
+ }
115
+
116
+ .hy-toast__action:focus-visible,
117
+ .hy-toast__close:focus-visible {
118
+ outline: none;
119
+ box-shadow: var(--hy-focus-ring);
120
+ }
121
+
122
+ @keyframes hy-toast-in {
123
+ from {
124
+ opacity: 0;
125
+ translate: 0 calc(1rem * var(--hy-move));
126
+ scale: calc(1 - 0.03 * var(--hy-move));
127
+ }
128
+ }
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Design tokens. Every Hyalo component reads these, and a theme is only a
3
+ * different set of values for the same names. All names start with --hy-.
4
+ */
5
+ :root {
6
+ /* Colour (light theme is the default) */
7
+ --hy-bg: #eef1f4;
8
+ --hy-surface-1: #ffffff;
9
+ --hy-surface-2: #f6f8fa;
10
+ --hy-surface-3: #e9edf1;
11
+ --hy-surface-4: #dce2e8;
12
+ --hy-ink: #0f1a24;
13
+ --hy-ink-2: #3b4856;
14
+ --hy-ink-3: #596775;
15
+ /* Secondary text on glass. Darker, because the backdrop keeps changing. */
16
+ --hy-ink-2-glass: #2c3845;
17
+ --hy-ink-3-glass: #45525f;
18
+ --hy-line: rgb(15 26 36 / 0.12);
19
+ --hy-line-strong: rgb(15 26 36 / 0.24);
20
+ --hy-primary: #3a4cd0;
21
+ --hy-primary-hover: #3141b8;
22
+ --hy-primary-ink: #ffffff;
23
+ --hy-primary-wash: rgb(58 76 208 / 0.12);
24
+ /*
25
+ * Secondary is optional, so it is not set here. Set --hy-secondary and
26
+ * --hy-secondary-ink to give a theme a second brand colour; until then,
27
+ * everything that reads them falls back to the primary pair.
28
+ */
29
+ --hy-success: #12735a;
30
+ --hy-success-wash: rgb(18 115 90 / 0.12);
31
+ --hy-warning: #8f5400;
32
+ --hy-warning-wash: rgb(143 84 0 / 0.12);
33
+ --hy-danger: #b93029;
34
+ --hy-danger-ink: #ffffff;
35
+ --hy-danger-wash: rgb(185 48 41 / 0.12);
36
+ --hy-scrim: rgb(9 14 20 / 0.38);
37
+
38
+ /* Glass */
39
+ --hy-glass-tint: 255 255 255;
40
+ --hy-glass-fill-top: 0.64;
41
+ --hy-glass-fill-bottom: 0.36;
42
+ --hy-glass-blur: 25px;
43
+ --hy-glass-saturate: 180%;
44
+ --hy-glass-edge: inset 0 1px 0 rgb(255 255 255 / 0.85), inset 0 0 0 1px rgb(255 255 255 / 0.4);
45
+ --hy-glass-border: rgb(15 26 36 / 0.08);
46
+ --hy-glass-shadow: 0 1px 2px rgb(15 26 36 / 0.06), 0 12px 32px -12px rgb(15 26 36 / 0.22);
47
+ /* Small chips read as thin glass, sheets and dialogs as thick. */
48
+ --hy-glass-shadow-thin: 0 1px 2px rgb(15 26 36 / 0.06), 0 4px 12px -6px rgb(15 26 36 / 0.16);
49
+ --hy-glass-shadow-thick: 0 2px 4px rgb(15 26 36 / 0.06), 0 24px 64px -20px rgb(15 26 36 / 0.32);
50
+ --hy-glass-reflection: linear-gradient(
51
+ to bottom,
52
+ rgb(255 255 255 / 0.5),
53
+ rgb(255 255 255 / 0) 42%
54
+ );
55
+ --hy-glass-glow: 255 255 255;
56
+
57
+ /* Type */
58
+ --hy-font-display: 'Inter Display', 'Inter', ui-sans-serif, system-ui, sans-serif;
59
+ --hy-font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
60
+ --hy-font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
61
+ --hy-font-fa: 'Vazirmatn', 'Estedad', Tahoma, sans-serif;
62
+ --hy-step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
63
+ --hy-step-0: clamp(0.9375rem, 0.91rem + 0.15vw, 1rem);
64
+ --hy-step-1: clamp(1.0625rem, 1.02rem + 0.25vw, 1.1875rem);
65
+ --hy-step-2: clamp(1.25rem, 1.17rem + 0.4vw, 1.5rem);
66
+ --hy-step-3: clamp(1.5rem, 1.36rem + 0.7vw, 2rem);
67
+ --hy-step-4: clamp(1.875rem, 1.6rem + 1.3vw, 2.75rem);
68
+ --hy-step-5: clamp(2.25rem, 1.8rem + 2.2vw, 3.75rem);
69
+ --hy-step-6: clamp(2.75rem, 2rem + 3.6vw, 5.25rem);
70
+ --hy-leading-tight: 1.15;
71
+ --hy-leading: 1.55;
72
+ /* Small text opens up a little to stay legible. Headings tighten instead. */
73
+ --hy-tracking-small: 0.01em;
74
+
75
+ /* Shape and space (4px base) */
76
+ --hy-radius-s: 8px;
77
+ --hy-radius-m: 14px;
78
+ --hy-radius-l: 22px;
79
+ --hy-radius-pill: 999px;
80
+ --hy-space-1: 0.25rem;
81
+ --hy-space-2: 0.5rem;
82
+ --hy-space-3: 0.75rem;
83
+ --hy-space-4: 1rem;
84
+ --hy-space-5: 1.25rem;
85
+ --hy-space-6: 1.5rem;
86
+ --hy-space-7: 1.75rem;
87
+ --hy-space-8: 2rem;
88
+ --hy-space-9: 2.5rem;
89
+ --hy-space-10: 3rem;
90
+ --hy-space-11: 4rem;
91
+ --hy-space-12: 5rem;
92
+ --hy-container: 72rem;
93
+ --hy-gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
94
+
95
+ /* Controls */
96
+ --hy-control-sm: 2rem;
97
+ --hy-control-md: 2.5rem;
98
+ --hy-control-lg: 3rem;
99
+ --hy-focus-ring: 0 0 0 2px var(--hy-bg), 0 0 0 4px var(--hy-primary);
100
+
101
+ /* Motion. Matches the MOTION constants in TypeScript. */
102
+ --hy-dur-quick: 0.22s;
103
+ --hy-dur-settle: 0.44s;
104
+ --hy-dur-scene: 0.9s;
105
+ --hy-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
106
+ --hy-ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
107
+ --hy-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
108
+ /*
109
+ * Overlays enter and leave with these. With reduced motion they turn into
110
+ * short cross-fades instead of disappearing: --hy-move scales every slide
111
+ * and scale in the overlay keyframes down to nothing.
112
+ */
113
+ --hy-dur-enter: 0.44s;
114
+ --hy-dur-exit: 0.22s;
115
+ --hy-move: 1;
116
+
117
+ /* Layers */
118
+ --hy-z-sticky: 100;
119
+ --hy-z-overlay: 1000;
120
+ --hy-z-toast: 1100;
121
+ --hy-z-tooltip: 1200;
122
+ }
123
+
124
+ /* Persian and Arabic text gets its own family. Sizes stay the same or larger. */
125
+ :lang(fa),
126
+ :lang(ar) {
127
+ --hy-font-body: var(--hy-font-fa);
128
+ --hy-font-display: var(--hy-font-fa);
129
+ --hy-leading: 1.75;
130
+ --hy-tracking-small: 0;
131
+ }
132
+
133
+ @media (prefers-reduced-motion: reduce) {
134
+ :root:not([data-hy-motion='full']) {
135
+ --hy-dur-quick: 1ms;
136
+ --hy-dur-settle: 1ms;
137
+ --hy-dur-scene: 1ms;
138
+ --hy-dur-enter: 0.2s;
139
+ --hy-dur-exit: 0.15s;
140
+ --hy-move: 0;
141
+ }
142
+ }
143
+
144
+ :root[data-hy-motion='reduced'] {
145
+ --hy-dur-quick: 1ms;
146
+ --hy-dur-settle: 1ms;
147
+ --hy-dur-scene: 1ms;
148
+ --hy-dur-enter: 0.2s;
149
+ --hy-dur-exit: 0.15s;
150
+ --hy-move: 0;
151
+ }
@@ -0,0 +1,64 @@
1
+ /* Typography helpers. */
2
+ .hy-display {
3
+ font-family: var(--hy-font-display);
4
+ font-size: var(--hy-step-6);
5
+ line-height: 1.02;
6
+ letter-spacing: -0.03em;
7
+ }
8
+
9
+ .hy-h1 {
10
+ font-size: var(--hy-step-5);
11
+ letter-spacing: -0.025em;
12
+ }
13
+
14
+ .hy-h2 {
15
+ font-size: var(--hy-step-4);
16
+ letter-spacing: -0.02em;
17
+ }
18
+
19
+ .hy-h3 {
20
+ font-size: var(--hy-step-3);
21
+ letter-spacing: -0.015em;
22
+ }
23
+
24
+ .hy-lead {
25
+ font-size: var(--hy-step-1);
26
+ color: var(--hy-ink-2);
27
+ }
28
+
29
+ .hy-muted {
30
+ color: var(--hy-ink-3);
31
+ }
32
+
33
+ /* Letter spacing hurts connected scripts, so it is removed for them. */
34
+ :lang(fa) :is(.hy-display, .hy-h1, .hy-h2, .hy-h3),
35
+ :lang(ar) :is(.hy-display, .hy-h1, .hy-h2, .hy-h3) {
36
+ letter-spacing: 0;
37
+ }
38
+
39
+ .hy-clamp {
40
+ display: -webkit-box;
41
+ -webkit-box-orient: vertical;
42
+ -webkit-line-clamp: var(--hy-lines, 2);
43
+ line-clamp: var(--hy-lines, 2);
44
+ overflow: hidden;
45
+ }
46
+
47
+ .hy-visually-hidden {
48
+ position: absolute;
49
+ inline-size: 1px;
50
+ block-size: 1px;
51
+ padding: 0;
52
+ margin: -1px;
53
+ overflow: hidden;
54
+ clip-path: inset(50%);
55
+ white-space: nowrap;
56
+ border: 0;
57
+ }
58
+
59
+ .hy-mesh {
60
+ background:
61
+ radial-gradient(60% 50% at 15% 10%, rgb(34 197 140 / 0.28), transparent 70%),
62
+ radial-gradient(55% 55% at 90% 20%, rgb(88 101 242 / 0.3), transparent 70%),
63
+ radial-gradient(50% 60% at 60% 100%, rgb(56 189 248 / 0.22), transparent 70%), var(--hy-bg);
64
+ }
@@ -0,0 +1,74 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/aria/accordion";
3
+ import * as i2 from "@hyalo/angular";
4
+ /**
5
+ * One collapsible section. The panel content stays in the DOM while closed
6
+ * (marked `inert`), so in-page search and FAQ structured data still see it.
7
+ */
8
+ export declare class HyAccordionItem {
9
+ /** Text of the header button. */
10
+ readonly heading: import("@angular/core").InputSignal<string>;
11
+ /** Heading level of the header, 2 to 6. Pick the one that fits the page outline. */
12
+ readonly headingLevel: import("@angular/core").InputSignalWithTransform<number, unknown>;
13
+ /** Whether the section is open. Two-way bindable. */
14
+ readonly expanded: import("@angular/core").ModelSignal<boolean>;
15
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyAccordionItem, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyAccordionItem, "hy-accordion-item", never, {
18
+ "heading": {
19
+ "alias": "heading";
20
+ "required": false;
21
+ "isSignal": true;
22
+ };
23
+ "headingLevel": {
24
+ "alias": "headingLevel";
25
+ "required": false;
26
+ "isSignal": true;
27
+ };
28
+ "expanded": {
29
+ "alias": "expanded";
30
+ "required": false;
31
+ "isSignal": true;
32
+ };
33
+ "disabled": {
34
+ "alias": "disabled";
35
+ "required": false;
36
+ "isSignal": true;
37
+ };
38
+ }, {
39
+ "expanded": "expandedChange";
40
+ }, never, ["[hyAccordionHeading]", "*"], true, never>;
41
+ }
42
+ /**
43
+ * A stack of collapsible sections on Angular Aria. Arrow keys move between
44
+ * headers, Home and End jump to the ends, Enter or Space toggles.
45
+ *
46
+ * ```html
47
+ * <hy-accordion>
48
+ * <hy-accordion-item heading="How long does delivery take?">Three to five working days.</hy-accordion-item>
49
+ * <hy-accordion-item heading="Can I return it?">Within 30 days, free of charge.</hy-accordion-item>
50
+ * </hy-accordion>
51
+ * ```
52
+ *
53
+ * Only one section is open at a time unless `multiple` is set. Opening and
54
+ * closing animate the height with CSS grid, which costs no layout script.
55
+ */
56
+ export declare class HyAccordion {
57
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyAccordion, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyAccordion, "hy-accordion", never, {}, {}, never, ["*"], true, [{
59
+ directive: typeof i1.AccordionGroup;
60
+ inputs: {
61
+ "multiExpandable": "multiple";
62
+ "disabled": "disabled";
63
+ };
64
+ outputs: {};
65
+ }, {
66
+ directive: typeof i2.HyMaterialDirective;
67
+ inputs: {
68
+ "hyMaterial": "material";
69
+ };
70
+ outputs: {};
71
+ }]>;
72
+ }
73
+ /** Everything needed to build an accordion. */
74
+ export declare const HY_ACCORDION: readonly [typeof HyAccordion, typeof HyAccordionItem];
@@ -0,0 +1,88 @@
1
+ import * as i1 from "@hyalo/angular";
2
+ import { HySize, HyTone } from "@hyalo/angular";
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * - `solid`: filled with the tone colour. The main action on a view.
6
+ * - `glass`: a glass surface with tone-coloured text.
7
+ * - `soft`: a light wash of the tone colour.
8
+ * - `ghost`: text only, a surface appears on hover.
9
+ */
10
+ export type HyButtonVariant = 'solid' | 'glass' | 'soft' | 'ghost';
11
+ /**
12
+ * Button and link button.
13
+ *
14
+ * ```html
15
+ * <button hyButton (click)="save()">Save</button>
16
+ * <a hyButton variant="glass" routerLink="/pricing">Pricing</a>
17
+ * <button hyButton iconOnly aria-label="Close"><hy-icon name="x" /></button>
18
+ * ```
19
+ *
20
+ * It stays a native `<button>` or `<a>`, so forms, routing and keyboard
21
+ * behaviour work as usual. A press dims and shrinks it the moment the
22
+ * pointer goes down. Add `hyMagnetic` for the magnetic hover effect, or
23
+ * `hyRipple` for a press ripple.
24
+ *
25
+ * While `loading`, the button keeps its focus and width, sets `aria-busy`
26
+ * and ignores clicks. A disabled link gets `aria-disabled` and leaves the
27
+ * tab order, since links have no native disabled state.
28
+ */
29
+ export declare class HyButton {
30
+ private readonly config;
31
+ private readonly fidelity;
32
+ private readonly el;
33
+ protected readonly isButton: boolean;
34
+ /** Visual style. */
35
+ readonly variant: import("@angular/core").InputSignal<HyButtonVariant>;
36
+ /** Height and padding. Defaults to the configured size. */
37
+ readonly size: import("@angular/core").InputSignal<HySize>;
38
+ /** Colour role. Defaults to the configured tone. */
39
+ readonly tone: import("@angular/core").InputSignal<HyTone>;
40
+ /** Square button for a single icon. Give it an `aria-label`. */
41
+ readonly iconOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
42
+ /** Shows a spinner and blocks clicks without dropping focus. */
43
+ readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
44
+ /** Disables the button. On links this sets `aria-disabled`. */
45
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
46
+ /** Glass follows the configured material and goes solid on the low tier. */
47
+ protected readonly material: import("@angular/core").Signal<import("@hyalo/angular").HyMaterial | null>;
48
+ /** True when clicks should be ignored. */
49
+ protected readonly blocked: import("@angular/core").Signal<boolean>;
50
+ constructor();
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyButton, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyButton, "button[hyButton], a[hyButton]", never, {
53
+ "variant": {
54
+ "alias": "variant";
55
+ "required": false;
56
+ "isSignal": true;
57
+ };
58
+ "size": {
59
+ "alias": "size";
60
+ "required": false;
61
+ "isSignal": true;
62
+ };
63
+ "tone": {
64
+ "alias": "tone";
65
+ "required": false;
66
+ "isSignal": true;
67
+ };
68
+ "iconOnly": {
69
+ "alias": "iconOnly";
70
+ "required": false;
71
+ "isSignal": true;
72
+ };
73
+ "loading": {
74
+ "alias": "loading";
75
+ "required": false;
76
+ "isSignal": true;
77
+ };
78
+ "disabled": {
79
+ "alias": "disabled";
80
+ "required": false;
81
+ "isSignal": true;
82
+ };
83
+ }, {}, never, ["*"], true, [{
84
+ directive: typeof i1.HyInteractive;
85
+ inputs: {};
86
+ outputs: {};
87
+ }]>;
88
+ }
@@ -0,0 +1,61 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@hyalo/angular";
3
+ /** Inner spacing of a card. */
4
+ export type HyCardPadding = 'none' | 'sm' | 'md' | 'lg';
5
+ /** Full-bleed media at the top of a card: an image, video or canvas. */
6
+ export declare class HyCardMedia {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCardMedia, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyCardMedia, "[hyCardMedia]", never, {}, {}, never, never, true, never>;
9
+ }
10
+ /** Title area. Put the card's heading here. */
11
+ export declare class HyCardHeader {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCardHeader, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyCardHeader, "[hyCardHeader]", never, {}, {}, never, never, true, never>;
14
+ }
15
+ /** Actions or meta at the bottom. */
16
+ export declare class HyCardFooter {
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCardFooter, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyCardFooter, "[hyCardFooter]", never, {}, {}, never, never, true, never>;
19
+ }
20
+ /**
21
+ * Makes one link inside the card cover the whole card, so the card is
22
+ * clickable while screen readers still hear a single, well-named link.
23
+ * Other buttons in the card stay clickable on top of it.
24
+ */
25
+ export declare class HyCardLink {
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCardLink, never>;
27
+ static ɵdir: i0.ɵɵDirectiveDeclaration<HyCardLink, "a[hyCardLink]", never, {}, {}, never, never, true, never>;
28
+ }
29
+ /**
30
+ * The kit's signature surface: a glass panel with optional media, header,
31
+ * body and footer.
32
+ *
33
+ * ```html
34
+ * <hy-card material="clear" hyTilt>
35
+ * <img hyCardMedia src="watch.avif" alt="" />
36
+ * <h3 hyCardHeader><a hyCardLink routerLink="/watch/1">Calibre 7</a></h3>
37
+ * <p>Hand-wound, 42 mm, sapphire caseback.</p>
38
+ * <div hyCardFooter>From 4 200 EUR</div>
39
+ * </hy-card>
40
+ * ```
41
+ */
42
+ export declare class HyCard {
43
+ /** Inner spacing. Media always stays full bleed. */
44
+ readonly padding: import("@angular/core").InputSignal<HyCardPadding>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<HyCard, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<HyCard, "hy-card", never, {
47
+ "padding": {
48
+ "alias": "padding";
49
+ "required": false;
50
+ "isSignal": true;
51
+ };
52
+ }, {}, never, ["[hyCardMedia]", "[hyCardHeader]", "*", "[hyCardFooter]"], true, [{
53
+ directive: typeof i1.HyMaterialDirective;
54
+ inputs: {
55
+ "hyMaterial": "material";
56
+ };
57
+ outputs: {};
58
+ }]>;
59
+ }
60
+ /** Everything needed to build a card. */
61
+ export declare const HY_CARD: readonly [typeof HyCard, typeof HyCardMedia, typeof HyCardHeader, typeof HyCardFooter, typeof HyCardLink];