@tolle_/tolle-ui 18.2.29 → 18.3.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.
- package/esm2022/lib/accordion-item.component.mjs +5 -11
- package/esm2022/lib/accordion.component.mjs +4 -9
- package/esm2022/lib/alert-dialog-dynamic.component.mjs +12 -12
- package/esm2022/lib/alert-dialog.component.mjs +82 -64
- package/esm2022/lib/alert-dialog.service.mjs +38 -6
- package/esm2022/lib/alert.component.mjs +5 -11
- package/esm2022/lib/aspect-ratio.component.mjs +119 -0
- package/esm2022/lib/attachment.component.mjs +334 -0
- package/esm2022/lib/avatar-fallback.component.mjs +3 -3
- package/esm2022/lib/avatar.component.mjs +4 -9
- package/esm2022/lib/badge.component.mjs +4 -9
- package/esm2022/lib/breadcrumb-item.component.mjs +3 -3
- package/esm2022/lib/breadcrumb-link.component.mjs +3 -3
- package/esm2022/lib/breadcrumb-separator.component.mjs +3 -3
- package/esm2022/lib/breadcrumb.component.mjs +3 -3
- package/esm2022/lib/bubble.component.mjs +301 -0
- package/esm2022/lib/button.component.mjs +5 -11
- package/esm2022/lib/calendar.component.mjs +5 -11
- package/esm2022/lib/card.component.mjs +14 -43
- package/esm2022/lib/carousel/carousel.component.mjs +5 -12
- package/esm2022/lib/chain-of-thought.component.mjs +380 -0
- package/esm2022/lib/chart-pie.component.mjs +386 -0
- package/esm2022/lib/chart.component.mjs +1146 -0
- package/esm2022/lib/chart.service.mjs +555 -0
- package/esm2022/lib/checkbox.component.mjs +5 -11
- package/esm2022/lib/checkpoint.component.mjs +134 -0
- package/esm2022/lib/collapsible.component.mjs +4 -11
- package/esm2022/lib/combobox.component.mjs +372 -0
- package/esm2022/lib/command-dialog.component.mjs +164 -0
- package/esm2022/lib/command.component.mjs +514 -0
- package/esm2022/lib/command.service.mjs +130 -0
- package/esm2022/lib/confirmation.component.mjs +219 -0
- package/esm2022/lib/context-menu-trigger.directive.mjs +36 -0
- package/esm2022/lib/context-menu.component.mjs +460 -0
- package/esm2022/lib/context-menu.service.mjs +125 -0
- package/esm2022/lib/context.component.mjs +377 -0
- package/esm2022/lib/conversation.component.mjs +442 -0
- package/esm2022/lib/country-selector.component.mjs +5 -11
- package/esm2022/lib/data-table.component.mjs +59 -12
- package/esm2022/lib/date-picker.component.mjs +251 -198
- package/esm2022/lib/date-range-picker.component.mjs +224 -116
- package/esm2022/lib/date-time-picker.component.mjs +506 -0
- package/esm2022/lib/direction.component.mjs +79 -0
- package/esm2022/lib/dropdown-item.component.mjs +3 -3
- package/esm2022/lib/dropdown-label.component.mjs +3 -3
- package/esm2022/lib/dropdown-menu.component.mjs +3 -3
- package/esm2022/lib/dropdown-separator.component.mjs +3 -3
- package/esm2022/lib/dropdown-trigger.directive.mjs +6 -4
- package/esm2022/lib/empty-state.component.mjs +4 -9
- package/esm2022/lib/field.component.mjs +394 -0
- package/esm2022/lib/hover-card.component.mjs +6 -16
- package/esm2022/lib/inline-citation.component.mjs +263 -0
- package/esm2022/lib/input-group.component.mjs +418 -0
- package/esm2022/lib/input.component.mjs +5 -11
- package/esm2022/lib/item.component.mjs +243 -0
- package/esm2022/lib/kbd.component.mjs +82 -0
- package/esm2022/lib/label.component.mjs +4 -9
- package/esm2022/lib/marker.component.mjs +135 -0
- package/esm2022/lib/masked-input.component.mjs +5 -11
- package/esm2022/lib/menubar.component.mjs +683 -0
- package/esm2022/lib/message-scroller.component.mjs +353 -0
- package/esm2022/lib/message-scroller.service.mjs +157 -0
- package/esm2022/lib/message.component.mjs +228 -0
- package/esm2022/lib/modal-ref.mjs +36 -7
- package/esm2022/lib/modal.component.mjs +42 -28
- package/esm2022/lib/modal.mjs +2 -29
- package/esm2022/lib/modal.service.mjs +26 -4
- package/esm2022/lib/model-selector.component.mjs +310 -0
- package/esm2022/lib/multi-select.component.mjs +155 -72
- package/esm2022/lib/native-select.component.mjs +201 -0
- package/esm2022/lib/navigation-menu.component.mjs +642 -0
- package/esm2022/lib/otp-group.component.mjs +3 -3
- package/esm2022/lib/otp-slot.component.mjs +4 -9
- package/esm2022/lib/otp.component.mjs +5 -11
- package/esm2022/lib/pagination.component.mjs +7 -10
- package/esm2022/lib/plan.component.mjs +335 -0
- package/esm2022/lib/popover-content.component.mjs +4 -9
- package/esm2022/lib/popover.component.mjs +15 -13
- package/esm2022/lib/progress.component.mjs +4 -9
- package/esm2022/lib/prompt-input.component.mjs +526 -0
- package/esm2022/lib/queue.component.mjs +280 -0
- package/esm2022/lib/radio-group.component.mjs +6 -13
- package/esm2022/lib/radio-item.component.mjs +4 -9
- package/esm2022/lib/range-calendar.component.mjs +5 -11
- package/esm2022/lib/reasoning.component.mjs +335 -0
- package/esm2022/lib/resizable-panel.component.mjs +5 -5
- package/esm2022/lib/resizable.component.mjs +219 -0
- package/esm2022/lib/segment.component.mjs +19 -9
- package/esm2022/lib/select-group.component.mjs +4 -8
- package/esm2022/lib/select-item.component.mjs +4 -9
- package/esm2022/lib/select-separator.component.mjs +4 -8
- package/esm2022/lib/select.component.mjs +133 -49
- package/esm2022/lib/separator.component.mjs +4 -9
- package/esm2022/lib/sheet.component.mjs +38 -56
- package/esm2022/lib/shimmer.component.mjs +84 -0
- package/esm2022/lib/sidebar.component.mjs +11 -1
- package/esm2022/lib/skeleton.component.mjs +4 -9
- package/esm2022/lib/sources.component.mjs +452 -0
- package/esm2022/lib/spinner.component.mjs +68 -0
- package/esm2022/lib/suggestion.component.mjs +207 -0
- package/esm2022/lib/switch.component.mjs +5 -11
- package/esm2022/lib/table.component.mjs +213 -0
- package/esm2022/lib/tabs.component.mjs +4 -11
- package/esm2022/lib/tag-input.component.mjs +5 -11
- package/esm2022/lib/task.component.mjs +359 -0
- package/esm2022/lib/textarea.component.mjs +5 -11
- package/esm2022/lib/theme.service.mjs +17 -6
- package/esm2022/lib/time-picker.component.mjs +923 -0
- package/esm2022/lib/toast.service.mjs +3 -2
- package/esm2022/lib/toaster.component.mjs +76 -39
- package/esm2022/lib/toggle-group.component.mjs +4 -9
- package/esm2022/lib/toggle.component.mjs +5 -11
- package/esm2022/lib/tool.component.mjs +462 -0
- package/esm2022/lib/typography.component.mjs +83 -0
- package/esm2022/lib/utils/color.mjs +140 -19
- package/esm2022/public-api.mjs +61 -1
- package/fesm2022/tolle-ui.mjs +16642 -1105
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/alert-dialog-dynamic.component.d.ts +5 -0
- package/lib/alert-dialog.component.d.ts +23 -2
- package/lib/aspect-ratio.component.d.ts +20 -0
- package/lib/attachment.component.d.ts +101 -0
- package/lib/bubble.component.d.ts +112 -0
- package/lib/chain-of-thought.component.d.ts +166 -0
- package/lib/chart-pie.component.d.ts +108 -0
- package/lib/chart.component.d.ts +369 -0
- package/lib/chart.service.d.ts +222 -0
- package/lib/checkpoint.component.d.ts +51 -0
- package/lib/combobox.component.d.ts +90 -0
- package/lib/command-dialog.component.d.ts +53 -0
- package/lib/command.component.d.ts +189 -0
- package/lib/command.service.d.ts +67 -0
- package/lib/confirmation.component.d.ts +70 -0
- package/lib/context-menu-trigger.directive.d.ts +12 -0
- package/lib/context-menu.component.d.ts +41 -0
- package/lib/context-menu.service.d.ts +38 -0
- package/lib/context.component.d.ts +134 -0
- package/lib/conversation.component.d.ts +165 -0
- package/lib/data-table.component.d.ts +26 -1
- package/lib/date-picker.component.d.ts +72 -11
- package/lib/date-range-picker.component.d.ts +63 -6
- package/lib/date-time-picker.component.d.ts +119 -0
- package/lib/direction.component.d.ts +45 -0
- package/lib/field.component.d.ts +201 -0
- package/lib/inline-citation.component.d.ts +103 -0
- package/lib/input-group.component.d.ts +150 -0
- package/lib/item.component.d.ts +154 -0
- package/lib/kbd.component.d.ts +50 -0
- package/lib/marker.component.d.ts +58 -0
- package/lib/menubar.component.d.ts +247 -0
- package/lib/message-scroller.component.d.ts +159 -0
- package/lib/message-scroller.service.d.ts +73 -0
- package/lib/message.component.d.ts +128 -0
- package/lib/modal-ref.d.ts +6 -1
- package/lib/modal.component.d.ts +7 -4
- package/lib/modal.d.ts +9 -3
- package/lib/model-selector.component.d.ts +103 -0
- package/lib/multi-select.component.d.ts +66 -14
- package/lib/native-select.component.d.ts +57 -0
- package/lib/navigation-menu.component.d.ts +230 -0
- package/lib/plan.component.d.ts +120 -0
- package/lib/popover.component.d.ts +1 -0
- package/lib/prompt-input.component.d.ts +194 -0
- package/lib/queue.component.d.ts +106 -0
- package/lib/reasoning.component.d.ts +127 -0
- package/lib/resizable.component.d.ts +43 -0
- package/lib/segment.component.d.ts +13 -3
- package/lib/select.component.d.ts +37 -5
- package/lib/sheet.component.d.ts +3 -0
- package/lib/shimmer.component.d.ts +38 -0
- package/lib/sidebar.component.d.ts +2 -0
- package/lib/sources.component.d.ts +156 -0
- package/lib/spinner.component.d.ts +29 -0
- package/lib/suggestion.component.d.ts +96 -0
- package/lib/table.component.d.ts +106 -0
- package/lib/task.component.d.ts +151 -0
- package/lib/theme.service.d.ts +9 -0
- package/lib/time-picker.component.d.ts +243 -0
- package/lib/toast.service.d.ts +3 -1
- package/lib/toaster.component.d.ts +26 -9
- package/lib/tool.component.d.ts +158 -0
- package/lib/typography.component.d.ts +32 -0
- package/lib/utils/color.d.ts +19 -5
- package/package.json +3 -2
- package/preset.js +7 -1
- package/public-api.d.ts +50 -0
- package/registry/docs-content.json +8480 -1542
- package/registry/llms-full.txt +2679 -319
- package/registry/llms.txt +43 -4
- package/registry/manifest.json +9090 -1742
- package/registry/r/accordion-item.json +1 -1
- package/registry/r/accordion.json +1 -1
- package/registry/r/alert-dialog-dynamic.json +1 -1
- package/registry/r/alert-dialog.json +1 -1
- package/registry/r/alert.json +1 -1
- package/registry/r/attachment.json +23 -0
- package/registry/r/avatar-fallback.json +1 -1
- package/registry/r/avatar.json +1 -1
- package/registry/r/badge.json +1 -1
- package/registry/r/breadcrumb-item.json +1 -1
- package/registry/r/breadcrumb-link.json +1 -1
- package/registry/r/breadcrumb-separator.json +1 -1
- package/registry/r/breadcrumb.json +1 -1
- package/registry/r/bubble.json +23 -0
- package/registry/r/button.json +1 -1
- package/registry/r/calendar.json +1 -1
- package/registry/r/card.json +1 -1
- package/registry/r/carousel.json +1 -1
- package/registry/r/chain-of-thought.json +23 -0
- package/registry/r/chart-pie.json +30 -0
- package/registry/r/chart.json +28 -0
- package/registry/r/checkbox.json +1 -1
- package/registry/r/checkpoint.json +23 -0
- package/registry/r/collapsible.json +1 -1
- package/registry/r/combobox.json +31 -0
- package/registry/r/command-dialog.json +21 -0
- package/registry/r/command.json +26 -0
- package/registry/r/confirmation.json +23 -0
- package/registry/r/context-menu-trigger.json +1 -1
- package/registry/r/context-menu.json +1 -1
- package/registry/r/context.json +26 -0
- package/registry/r/conversation.json +23 -0
- package/registry/r/country-selector.json +1 -1
- package/registry/r/data-table.json +1 -1
- package/registry/r/date-picker.json +4 -4
- package/registry/r/date-range-picker.json +3 -3
- package/registry/r/date-time-picker.json +28 -0
- package/registry/r/direction.json +16 -0
- package/registry/r/dropdown-item.json +1 -1
- package/registry/r/dropdown-label.json +1 -1
- package/registry/r/dropdown-menu.json +1 -1
- package/registry/r/dropdown-separator.json +1 -1
- package/registry/r/dropdown-trigger.json +1 -1
- package/registry/r/empty-state.json +1 -1
- package/registry/r/field.json +23 -0
- package/registry/r/hover-card.json +1 -1
- package/registry/r/inline-citation.json +26 -0
- package/registry/r/input-group.json +23 -0
- package/registry/r/input.json +1 -1
- package/registry/r/item.json +23 -0
- package/registry/r/kbd.json +23 -0
- package/registry/r/label.json +1 -1
- package/registry/r/marker.json +23 -0
- package/registry/r/masked-input.json +1 -1
- package/registry/r/menubar.json +24 -0
- package/registry/r/message-scroller.json +26 -0
- package/registry/r/message.json +23 -0
- package/registry/r/modal.json +3 -3
- package/registry/r/model-selector.json +32 -0
- package/registry/r/multi-select.json +2 -2
- package/registry/r/native-select.json +23 -0
- package/registry/r/navigation-menu.json +24 -0
- package/registry/r/otp-group.json +1 -1
- package/registry/r/otp-slot.json +1 -1
- package/registry/r/otp.json +1 -1
- package/registry/r/pagination.json +3 -2
- package/registry/r/plan.json +23 -0
- package/registry/r/popover-content.json +1 -1
- package/registry/r/popover.json +1 -1
- package/registry/r/progress.json +1 -1
- package/registry/r/prompt-input.json +23 -0
- package/registry/r/queue.json +23 -0
- package/registry/r/radio-group.json +1 -1
- package/registry/r/radio-item.json +1 -1
- package/registry/r/range-calendar.json +1 -1
- package/registry/r/reasoning.json +23 -0
- package/registry/r/resizable-panel.json +1 -1
- package/registry/r/segment.json +1 -1
- package/registry/r/select-group.json +1 -1
- package/registry/r/select-item.json +1 -1
- package/registry/r/select-separator.json +1 -1
- package/registry/r/select.json +4 -3
- package/registry/r/separator.json +1 -1
- package/registry/r/sheet.json +1 -1
- package/registry/r/shimmer.json +23 -0
- package/registry/r/sidebar.json +1 -1
- package/registry/r/skeleton.json +1 -1
- package/registry/r/sources.json +23 -0
- package/registry/r/spinner.json +23 -0
- package/registry/r/suggestion.json +23 -0
- package/registry/r/switch.json +1 -1
- package/registry/r/table.json +21 -0
- package/registry/r/tabs.json +1 -1
- package/registry/r/tag-input.json +1 -1
- package/registry/r/task.json +23 -0
- package/registry/r/textarea.json +1 -1
- package/registry/r/time-picker.json +24 -0
- package/registry/r/toaster.json +2 -2
- package/registry/r/toggle-group.json +1 -1
- package/registry/r/toggle.json +1 -1
- package/registry/r/tool.json +23 -0
- package/registry/r/typography.json +23 -0
- package/registry/registry.json +915 -22
- package/theme.css +121 -8
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, QueryList, ChangeDetectorRef, OnDestroy, OnInit, OnChanges } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { cn } from './utils/cn';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/** A wall-clock time with no date and no timezone attached. */
|
|
7
|
+
export interface TimeParts {
|
|
8
|
+
hour: number;
|
|
9
|
+
minute: number;
|
|
10
|
+
second: number;
|
|
11
|
+
}
|
|
12
|
+
/** Seconds elapsed since midnight for a wall-clock time. */
|
|
13
|
+
export declare function timePartsToSeconds(parts: TimeParts): number;
|
|
14
|
+
/**
|
|
15
|
+
* Parses `HH:mm` or `HH:mm:ss` (24-hour). Returns `null` for anything that
|
|
16
|
+
* is not a well-formed, in-range time — callers treat that as "no value".
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseTimeString(value: string | null | undefined): TimeParts | null;
|
|
19
|
+
/** Renders a wall-clock time as `HH:mm`, or `HH:mm:ss` when `withSeconds`. */
|
|
20
|
+
export declare function formatTimeString(parts: TimeParts, withSeconds?: boolean): string;
|
|
21
|
+
/**
|
|
22
|
+
* 24-hour hour to its 12-hour clock face. Midnight is `12 AM` and noon is
|
|
23
|
+
* `12 PM` — the two values that a naive `hour % 12` gets wrong.
|
|
24
|
+
*/
|
|
25
|
+
export declare function to12Hour(hour24: number): {
|
|
26
|
+
hour12: number;
|
|
27
|
+
meridiem: 'AM' | 'PM';
|
|
28
|
+
};
|
|
29
|
+
/** 12-hour clock face back to a 24-hour hour. `12 AM` is 0, `12 PM` is 12. */
|
|
30
|
+
export declare function from12Hour(hour12: number, meridiem: 'AM' | 'PM'): number;
|
|
31
|
+
/** Which unit a column of the picker scrolls through. */
|
|
32
|
+
export type TimeColumnKind = 'hour' | 'minute' | 'second' | 'meridiem';
|
|
33
|
+
/** One entry inside a time column. */
|
|
34
|
+
export interface TimeOption {
|
|
35
|
+
/** Stable identity for `trackBy` and `aria-activedescendant`. */
|
|
36
|
+
id: string;
|
|
37
|
+
/** Text shown to the user. */
|
|
38
|
+
label: string;
|
|
39
|
+
/**
|
|
40
|
+
* The 24-hour value this entry commits for its column. For a `meridiem`
|
|
41
|
+
* column this is the resulting 24-hour *hour*.
|
|
42
|
+
*/
|
|
43
|
+
raw: number;
|
|
44
|
+
/** Value used for the selected comparison (clock-face value for hours). */
|
|
45
|
+
face: number;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** A scrollable column of the picker. */
|
|
49
|
+
export interface TimeColumn {
|
|
50
|
+
kind: TimeColumnKind;
|
|
51
|
+
label: string;
|
|
52
|
+
options: TimeOption[];
|
|
53
|
+
}
|
|
54
|
+
declare const timeOptionVariants: (props?: ({
|
|
55
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
56
|
+
selected?: boolean | null | undefined;
|
|
57
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
58
|
+
/** Variant props for the option rows inside a time column. */
|
|
59
|
+
export type TimeColumnsProps = VariantProps<typeof timeOptionVariants>;
|
|
60
|
+
/**
|
|
61
|
+
* The bare scrollable hour / minute / second / AM-PM columns, with no trigger
|
|
62
|
+
* and no popover of its own.
|
|
63
|
+
*
|
|
64
|
+
* `tolle-time-picker` wraps this in a floating panel, and
|
|
65
|
+
* `tolle-date-time-picker` sits it beside a calendar — so the option
|
|
66
|
+
* generation, the min/max disabling and the roving keyboard model live here
|
|
67
|
+
* once instead of in both.
|
|
68
|
+
*/
|
|
69
|
+
export declare class TimeColumnsComponent implements OnInit, OnChanges {
|
|
70
|
+
private cdr;
|
|
71
|
+
/** Selected hour in 24-hour form, or `null` when nothing is chosen yet. @default null */
|
|
72
|
+
hour: number | null;
|
|
73
|
+
/** Selected minute, or `null` when nothing is chosen yet. @default null */
|
|
74
|
+
minute: number | null;
|
|
75
|
+
/** Selected second, or `null` when nothing is chosen yet. @default null */
|
|
76
|
+
second: number | null;
|
|
77
|
+
/** Renders a 12-hour clock face with an AM/PM column. @default false */
|
|
78
|
+
use12Hours: boolean;
|
|
79
|
+
/** Adds the seconds column. @default false */
|
|
80
|
+
showSeconds: boolean;
|
|
81
|
+
/** Interval between minute entries, in minutes. @default 1 */
|
|
82
|
+
minuteStep: number;
|
|
83
|
+
/** Interval between second entries, in seconds. @default 1 */
|
|
84
|
+
secondStep: number;
|
|
85
|
+
/** Earliest selectable time, as seconds since midnight. @default 0 */
|
|
86
|
+
minSeconds: number;
|
|
87
|
+
/** Latest selectable time, as seconds since midnight. @default 86399 */
|
|
88
|
+
maxSeconds: number;
|
|
89
|
+
/** Row height and text size of the entries. @default 'default' */
|
|
90
|
+
size: TimeColumnsProps['size'];
|
|
91
|
+
/** Extra Tailwind classes merged onto the column strip via `cn()` (last-wins). */
|
|
92
|
+
class: string;
|
|
93
|
+
/** Emitted with the full wall-clock time whenever an entry is chosen. */
|
|
94
|
+
timeChange: EventEmitter<TimeParts>;
|
|
95
|
+
listboxes?: QueryList<ElementRef<HTMLElement>>;
|
|
96
|
+
readonly columnsId: string;
|
|
97
|
+
/**
|
|
98
|
+
* Built once per input change rather than read from a getter: a getter would
|
|
99
|
+
* hand `*ngFor` a fresh array on every change-detection pass, so every row —
|
|
100
|
+
* each carrying a click handler — would be torn down and rebuilt on every
|
|
101
|
+
* pass.
|
|
102
|
+
*/
|
|
103
|
+
columns: TimeColumn[];
|
|
104
|
+
/** Roving active entry per column, for `aria-activedescendant`. */
|
|
105
|
+
activeIndex: number[];
|
|
106
|
+
protected cn: typeof cn;
|
|
107
|
+
constructor(cdr: ChangeDetectorRef);
|
|
108
|
+
ngOnInit(): void;
|
|
109
|
+
ngOnChanges(): void;
|
|
110
|
+
get heightClass(): string;
|
|
111
|
+
private rebuild;
|
|
112
|
+
/**
|
|
113
|
+
* True when nothing in `[start, start + span]` falls inside the allowed
|
|
114
|
+
* window — i.e. picking this entry could not produce a legal time.
|
|
115
|
+
*/
|
|
116
|
+
private rangeDisabled;
|
|
117
|
+
private syncActiveToSelection;
|
|
118
|
+
isSelected(column: TimeColumn, option: TimeOption): boolean;
|
|
119
|
+
isActive(columnIndex: number, option: TimeOption): boolean;
|
|
120
|
+
activeDescendantFor(columnIndex: number): string | null;
|
|
121
|
+
optionClass(column: TimeColumn, option: TimeOption, columnIndex: number): string;
|
|
122
|
+
/** Commits `option` in its column and emits the resulting whole time. */
|
|
123
|
+
choose(column: TimeColumn, option: TimeOption, columnIndex: number): void;
|
|
124
|
+
onColumnKeydown(event: KeyboardEvent, columnIndex: number): void;
|
|
125
|
+
private moveActive;
|
|
126
|
+
/** Lands on the first enabled entry at or past `index`, walking `direction`. */
|
|
127
|
+
private setActive;
|
|
128
|
+
private focusColumn;
|
|
129
|
+
/** Focuses the first column — used when the panel opens. */
|
|
130
|
+
focusFirstColumn(): void;
|
|
131
|
+
/**
|
|
132
|
+
* Centres each column on its selected entry. Scrolls the listbox directly
|
|
133
|
+
* rather than calling `scrollIntoView`, which would also scroll the page
|
|
134
|
+
* behind a fixed-position panel.
|
|
135
|
+
*/
|
|
136
|
+
scrollSelectedIntoView(): void;
|
|
137
|
+
private scrollOptionIntoView;
|
|
138
|
+
trackColumn: (_: number, column: TimeColumn) => TimeColumnKind;
|
|
139
|
+
trackOption: (_: number, option: TimeOption) => string;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimeColumnsComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimeColumnsComponent, "tolle-time-columns", never, { "hour": { "alias": "hour"; "required": false; }; "minute": { "alias": "minute"; "required": false; }; "second": { "alias": "second"; "required": false; }; "use12Hours": { "alias": "use12Hours"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "minuteStep": { "alias": "minuteStep"; "required": false; }; "secondStep": { "alias": "secondStep"; "required": false; }; "minSeconds": { "alias": "minSeconds"; "required": false; }; "maxSeconds": { "alias": "maxSeconds"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "timeChange": "timeChange"; }, never, never, true, never>;
|
|
142
|
+
}
|
|
143
|
+
declare const timePickerTriggerVariants: (props?: ({
|
|
144
|
+
size?: "default" | "xs" | "sm" | "lg" | null | undefined;
|
|
145
|
+
invalid?: boolean | null | undefined;
|
|
146
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
147
|
+
/** Variant props for the time picker trigger. */
|
|
148
|
+
export type TimePickerProps = VariantProps<typeof timePickerTriggerVariants>;
|
|
149
|
+
/**
|
|
150
|
+
* A trigger that opens scrollable hour / minute / second columns in a floating
|
|
151
|
+
* panel.
|
|
152
|
+
*
|
|
153
|
+
* The value is a **24-hour `HH:mm` string** (or `HH:mm:ss` when `showSeconds`),
|
|
154
|
+
* regardless of whether the face is rendered as 12-hour — a wall-clock time has
|
|
155
|
+
* no date and no timezone, and a `Date` would invent both. Set
|
|
156
|
+
* `valueType="date"` to exchange `Date` objects instead, in which case the time
|
|
157
|
+
* is written onto today's date (or onto the date already held by the control).
|
|
158
|
+
*
|
|
159
|
+
* Implements `ControlValueAccessor`, so it works with `ngModel` and reactive
|
|
160
|
+
* forms. Use `tolle-date-time-picker` when a date is needed alongside.
|
|
161
|
+
* @new
|
|
162
|
+
*/
|
|
163
|
+
export declare class TimePickerComponent implements OnChanges, ControlValueAccessor, OnDestroy {
|
|
164
|
+
private cdr;
|
|
165
|
+
/**
|
|
166
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
167
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
168
|
+
* rendering the class it was born with.
|
|
169
|
+
*/
|
|
170
|
+
ngOnChanges(): void;
|
|
171
|
+
/** Text shown on the trigger when no time is selected. @default 'Select a time' */
|
|
172
|
+
placeholder: string;
|
|
173
|
+
/** Disables the control. @default false */
|
|
174
|
+
disabled: boolean;
|
|
175
|
+
/** Renders a 12-hour face with an AM/PM column. The emitted value stays 24-hour. @default false */
|
|
176
|
+
use12Hours: boolean;
|
|
177
|
+
/** Adds a seconds column and emits `HH:mm:ss`. @default false */
|
|
178
|
+
showSeconds: boolean;
|
|
179
|
+
/** Interval between minute entries, in minutes. @default 1 */
|
|
180
|
+
minuteStep: number;
|
|
181
|
+
/** Interval between second entries, in seconds. @default 1 */
|
|
182
|
+
secondStep: number;
|
|
183
|
+
/** Earliest selectable time as a 24-hour `HH:mm` string; earlier entries are disabled. */
|
|
184
|
+
min?: string;
|
|
185
|
+
/** Latest selectable time as a 24-hour `HH:mm` string; later entries are disabled. */
|
|
186
|
+
max?: string;
|
|
187
|
+
/** Height and text size of the trigger and entries. @default 'default' */
|
|
188
|
+
size: TimePickerProps['size'];
|
|
189
|
+
/** Applies the destructive border and focus ring. @default false */
|
|
190
|
+
invalid: boolean;
|
|
191
|
+
/** Accessible name when there is no associated visible label. @default '' */
|
|
192
|
+
ariaLabel: string;
|
|
193
|
+
/** Exchange `Date` objects instead of `HH:mm` strings through the form control. @default 'string' */
|
|
194
|
+
valueType: 'string' | 'date';
|
|
195
|
+
/** Extra Tailwind classes merged onto the trigger via `cn()` (last-wins). */
|
|
196
|
+
class: string;
|
|
197
|
+
/** Emitted with the chosen time whenever it changes. */
|
|
198
|
+
valueChange: EventEmitter<string | Date | null>;
|
|
199
|
+
/** Emitted when the panel opens. */
|
|
200
|
+
opened: EventEmitter<void>;
|
|
201
|
+
/** Emitted when the panel closes. */
|
|
202
|
+
closed: EventEmitter<void>;
|
|
203
|
+
triggerEl?: ElementRef<HTMLElement>;
|
|
204
|
+
panelEl?: ElementRef<HTMLElement>;
|
|
205
|
+
columnsCmp?: TimeColumnsComponent;
|
|
206
|
+
readonly panelId: string;
|
|
207
|
+
hour: number | null;
|
|
208
|
+
minute: number | null;
|
|
209
|
+
second: number | null;
|
|
210
|
+
isOpen: boolean;
|
|
211
|
+
protected cn: typeof cn;
|
|
212
|
+
private cleanup?;
|
|
213
|
+
/** The date half of a `Date` value, kept so round-tripping does not move the day. */
|
|
214
|
+
private dateAnchor;
|
|
215
|
+
private onChange;
|
|
216
|
+
private onTouched;
|
|
217
|
+
constructor(cdr: ChangeDetectorRef);
|
|
218
|
+
private readonly outsideClickHandler;
|
|
219
|
+
private readonly escapeHandler;
|
|
220
|
+
/** The current selection as wall-clock parts, or `null` when incomplete. */
|
|
221
|
+
get parts(): TimeParts | null;
|
|
222
|
+
get displayValue(): string;
|
|
223
|
+
get minSeconds(): number;
|
|
224
|
+
get maxSeconds(): number;
|
|
225
|
+
get computedTriggerClass(): string;
|
|
226
|
+
toggle(): void;
|
|
227
|
+
open(): void;
|
|
228
|
+
close(): void;
|
|
229
|
+
onTriggerKeyDown(event: KeyboardEvent): void;
|
|
230
|
+
onTimeChange(parts: TimeParts): void;
|
|
231
|
+
private emit;
|
|
232
|
+
private currentValue;
|
|
233
|
+
private updatePosition;
|
|
234
|
+
private teardown;
|
|
235
|
+
ngOnDestroy(): void;
|
|
236
|
+
writeValue(value: string | Date | null | undefined): void;
|
|
237
|
+
registerOnChange(fn: (value: string | Date | null) => void): void;
|
|
238
|
+
registerOnTouched(fn: () => void): void;
|
|
239
|
+
setDisabledState(isDisabled: boolean): void;
|
|
240
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
|
|
241
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "tolle-time-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "use12Hours": { "alias": "use12Hours"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "minuteStep": { "alias": "minuteStep"; "required": false; }; "secondStep": { "alias": "secondStep"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "size": { "alias": "size"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "valueType": { "alias": "valueType"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "valueChange": "valueChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
242
|
+
}
|
|
243
|
+
export {};
|
package/lib/toast.service.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
export type ToastVariant = 'default' | 'destructive' | 'success' | 'warning' | 'info';
|
|
2
3
|
export interface Toast {
|
|
3
4
|
id: number;
|
|
4
5
|
title?: string;
|
|
5
6
|
description: string;
|
|
6
|
-
variant?:
|
|
7
|
+
variant?: ToastVariant;
|
|
7
8
|
duration?: number;
|
|
8
9
|
remainingTime: number;
|
|
9
10
|
isPaused: boolean;
|
|
@@ -11,6 +12,7 @@ export interface Toast {
|
|
|
11
12
|
export type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
12
13
|
export declare class ToastService {
|
|
13
14
|
private toasts;
|
|
15
|
+
private nextId;
|
|
14
16
|
private toastSubject;
|
|
15
17
|
toasts$: import("rxjs").Observable<Toast[]>;
|
|
16
18
|
constructor();
|
|
@@ -1,17 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ToastService, Toast, ToastPosition, ToastVariant } from './toast.service';
|
|
2
3
|
import { cn } from './utils/cn';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ToastContainerComponent {
|
|
5
|
+
export declare class ToastContainerComponent implements OnInit, OnDestroy {
|
|
5
6
|
toastService: ToastService;
|
|
7
|
+
private elementRef;
|
|
6
8
|
position: ToastPosition;
|
|
7
9
|
toasts$: import("rxjs").Observable<Toast[]>;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Move the host to <body> so the fixed container is never clipped or
|
|
12
|
+
* z-index-clamped by a consumer ancestor that creates a stacking context
|
|
13
|
+
* (transform / filter / backdrop-blur / opacity). Being a direct child of
|
|
14
|
+
* <body> and sitting above the CDK overlay container keeps toasts on top
|
|
15
|
+
* of modals, sheets and alert dialogs.
|
|
16
|
+
*/
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
icons: Record<ToastVariant, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Border + text only. The toast root always carries an opaque `bg-background`;
|
|
22
|
+
* the variant colour is applied as a separate tint layer (see `getTintClasses`)
|
|
23
|
+
* so toasts are never see-through over page content.
|
|
24
|
+
*/
|
|
25
|
+
private variantClasses;
|
|
26
|
+
private tintClasses;
|
|
27
|
+
private progressClasses;
|
|
28
|
+
private resolve;
|
|
29
|
+
getVariantClasses(variant?: string): string;
|
|
30
|
+
getTintClasses(variant?: string): string;
|
|
31
|
+
getProgressClasses(variant?: string): string;
|
|
15
32
|
get positionClasses(): string;
|
|
16
33
|
protected cn: typeof cn;
|
|
17
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToastContainerComponent, never>;
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
declare const toolStateVariants: (props?: ({
|
|
5
|
+
state?: "error" | "success" | "pending" | "running" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type ToolStateProps = VariantProps<typeof toolStateVariants>;
|
|
8
|
+
/** Lifecycle of a tool call. */
|
|
9
|
+
export type ToolState = NonNullable<ToolStateProps['state']>;
|
|
10
|
+
/**
|
|
11
|
+
* Coordinates a `tolle-tool` with its header, input and output.
|
|
12
|
+
*
|
|
13
|
+
* Header/input/output are OnPush siblings projected into the tool, so the
|
|
14
|
+
* shared open + state they render from is published here.
|
|
15
|
+
*
|
|
16
|
+
* Provided on `ToolComponent`, so each tool call gets its own instance.
|
|
17
|
+
*/
|
|
18
|
+
export declare class ToolService {
|
|
19
|
+
private readonly openSource;
|
|
20
|
+
/** Emits whether the tool call is expanded. */
|
|
21
|
+
readonly open$: import("rxjs").Observable<boolean>;
|
|
22
|
+
private readonly stateSource;
|
|
23
|
+
/** Emits the tool call's lifecycle state. */
|
|
24
|
+
readonly state$: import("rxjs").Observable<ToolState>;
|
|
25
|
+
/** True while the tool call is expanded. */
|
|
26
|
+
get open(): boolean;
|
|
27
|
+
/** The tool call's current state. */
|
|
28
|
+
get state(): ToolState;
|
|
29
|
+
setOpen(value: boolean): void;
|
|
30
|
+
toggle(): void;
|
|
31
|
+
setState(state: ToolState): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolService, never>;
|
|
33
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ToolService>;
|
|
34
|
+
}
|
|
35
|
+
declare const toolVariants: (props?: ({
|
|
36
|
+
state?: "error" | "success" | "pending" | "running" | null | undefined;
|
|
37
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
38
|
+
export type ToolProps = VariantProps<typeof toolVariants>;
|
|
39
|
+
/**
|
|
40
|
+
* A collapsible record of one tool/function call: what was invoked, the
|
|
41
|
+
* arguments it received and the result it returned.
|
|
42
|
+
*
|
|
43
|
+
* Compose it from `tolle-tool-header`, `tolle-tool-input` and
|
|
44
|
+
* `tolle-tool-output`.
|
|
45
|
+
* @new
|
|
46
|
+
*/
|
|
47
|
+
export declare class ToolComponent implements OnInit, OnChanges, OnDestroy {
|
|
48
|
+
/** Lifecycle of the call, driving the header chip and border. @default 'pending' */
|
|
49
|
+
state: ToolState;
|
|
50
|
+
/** Whether the call's input and output are expanded. @default false */
|
|
51
|
+
open: boolean;
|
|
52
|
+
/** Extra Tailwind classes merged onto the tool via `cn()` (last-wins). */
|
|
53
|
+
class: string;
|
|
54
|
+
/** Emitted with the new state whenever the call is expanded or collapsed. */
|
|
55
|
+
openChange: EventEmitter<boolean>;
|
|
56
|
+
private readonly service;
|
|
57
|
+
private readonly cdr;
|
|
58
|
+
private readonly subscriptions;
|
|
59
|
+
/** True while an `open` input is being pushed into the service. */
|
|
60
|
+
private applyingInput;
|
|
61
|
+
ngOnInit(): void;
|
|
62
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
63
|
+
private applyInput;
|
|
64
|
+
ngOnDestroy(): void;
|
|
65
|
+
get computedClass(): string;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolComponent, never>;
|
|
67
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolComponent, "tolle-tool", never, { "state": { "alias": "state"; "required": false; }; "open": { "alias": "open"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "openChange": "openChange"; }, never, ["*"], true, never>;
|
|
68
|
+
}
|
|
69
|
+
/** Clickable header of a `tolle-tool`: the tool's name plus its state chip. */
|
|
70
|
+
export declare class ToolHeaderComponent implements OnChanges, OnInit, OnDestroy {
|
|
71
|
+
/**
|
|
72
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
73
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
74
|
+
* rendering the class it was born with.
|
|
75
|
+
*/
|
|
76
|
+
ngOnChanges(): void;
|
|
77
|
+
/** Name of the tool that was called. @default '' */
|
|
78
|
+
name: string;
|
|
79
|
+
/** Remixicon class shown before the tool name. @default 'ri-tools-line' */
|
|
80
|
+
icon: string;
|
|
81
|
+
/** Overrides the chip text; defaults to a label derived from the state. @default '' */
|
|
82
|
+
stateLabelOverride: string;
|
|
83
|
+
/** Extra Tailwind classes merged onto the header via `cn()` (last-wins). */
|
|
84
|
+
class: string;
|
|
85
|
+
/** Extra Tailwind classes merged onto the state chip via `cn()` (last-wins). */
|
|
86
|
+
chipClassName: string;
|
|
87
|
+
private readonly service;
|
|
88
|
+
private readonly cdr;
|
|
89
|
+
private readonly subscriptions;
|
|
90
|
+
open: boolean;
|
|
91
|
+
state: ToolState;
|
|
92
|
+
ngOnInit(): void;
|
|
93
|
+
ngOnDestroy(): void;
|
|
94
|
+
get stateIcon(): string;
|
|
95
|
+
get stateLabel(): string;
|
|
96
|
+
get chipClass(): string;
|
|
97
|
+
get computedClass(): string;
|
|
98
|
+
onToggle(): void;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolHeaderComponent, never>;
|
|
100
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolHeaderComponent, "tolle-tool-header", never, { "name": { "alias": "name"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "stateLabelOverride": { "alias": "stateLabelOverride"; "required": false; }; "class": { "alias": "class"; "required": false; }; "chipClassName": { "alias": "chipClassName"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Base for the two payload panels. Owns the shared "visible only while the
|
|
104
|
+
* tool is expanded" wiring and the payload-to-text formatting.
|
|
105
|
+
*
|
|
106
|
+
* Decorated with a selector-less `@Directive()` because it uses Angular
|
|
107
|
+
* features (DI and lifecycle hooks) on behalf of its subclasses.
|
|
108
|
+
*/
|
|
109
|
+
export declare abstract class ToolPayloadBase implements OnChanges, OnInit, OnDestroy {
|
|
110
|
+
/**
|
|
111
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
112
|
+
* not mark an OnPush component dirty — without this hook subclasses keep
|
|
113
|
+
* rendering the class they were born with.
|
|
114
|
+
*/
|
|
115
|
+
ngOnChanges(): void;
|
|
116
|
+
/** Payload to render; objects are pretty-printed as JSON, strings are shown as-is. */
|
|
117
|
+
payload: unknown;
|
|
118
|
+
protected readonly service: ToolService;
|
|
119
|
+
private readonly cdr;
|
|
120
|
+
private readonly subscriptions;
|
|
121
|
+
open: boolean;
|
|
122
|
+
ngOnInit(): void;
|
|
123
|
+
ngOnDestroy(): void;
|
|
124
|
+
/** True once there is a payload worth rendering. */
|
|
125
|
+
get hasPayload(): boolean;
|
|
126
|
+
/** The payload as display text. Falls back to `String()` for cyclic values. */
|
|
127
|
+
get formatted(): string;
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolPayloadBase, never>;
|
|
129
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ToolPayloadBase, never, never, {}, {}, never, never, false, never>;
|
|
130
|
+
}
|
|
131
|
+
/** Arguments the tool was called with. Visible while the `tolle-tool` is expanded. */
|
|
132
|
+
export declare class ToolInputComponent extends ToolPayloadBase {
|
|
133
|
+
/** Arguments passed to the tool; objects are pretty-printed as JSON. @default null */
|
|
134
|
+
payload: unknown;
|
|
135
|
+
/** Heading above the payload. @default 'Parameters' */
|
|
136
|
+
label: string;
|
|
137
|
+
/** Extra Tailwind classes merged onto the panel via `cn()` (last-wins). */
|
|
138
|
+
class: string;
|
|
139
|
+
get computedClass(): string;
|
|
140
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolInputComponent, never>;
|
|
141
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolInputComponent, "tolle-tool-input", never, { "payload": { "alias": "payload"; "required": false; }; "label": { "alias": "label"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
142
|
+
}
|
|
143
|
+
/** Result the tool returned. Visible while the `tolle-tool` is expanded. */
|
|
144
|
+
export declare class ToolOutputComponent extends ToolPayloadBase {
|
|
145
|
+
/** Result returned by the tool; objects are pretty-printed as JSON. @default null */
|
|
146
|
+
payload: unknown;
|
|
147
|
+
/** Heading above the payload. @default 'Result' */
|
|
148
|
+
label: string;
|
|
149
|
+
/** Styles the payload as a failure. @default false */
|
|
150
|
+
error: boolean;
|
|
151
|
+
/** Extra Tailwind classes merged onto the panel via `cn()` (last-wins). */
|
|
152
|
+
class: string;
|
|
153
|
+
get payloadClass(): string;
|
|
154
|
+
get computedClass(): string;
|
|
155
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ToolOutputComponent, never>;
|
|
156
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolOutputComponent, "tolle-tool-output", never, { "payload": { "alias": "payload"; "required": false; }; "label": { "alias": "label"; "required": false; }; "error": { "alias": "error"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
157
|
+
}
|
|
158
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OnChanges } from '@angular/core';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
declare const typographyVariants: (props?: ({
|
|
5
|
+
variant?: "muted" | "blockquote" | "code" | "h1" | "h2" | "h3" | "h4" | "p" | "small" | "lead" | "large" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type TypographyProps = VariantProps<typeof typographyVariants>;
|
|
8
|
+
/**
|
|
9
|
+
* Applies the theme's type scale to projected content. Renders the semantically
|
|
10
|
+
* correct host tag for the chosen `variant` (`h1`–`h4`, `blockquote`, `code`,
|
|
11
|
+
* otherwise `p`), so headings stay real headings for assistive tech.
|
|
12
|
+
* @new
|
|
13
|
+
*/
|
|
14
|
+
export declare class TypographyComponent implements OnChanges {
|
|
15
|
+
private readonly cdr;
|
|
16
|
+
/**
|
|
17
|
+
* Angular writes a bound `class` input through its styling path, which does
|
|
18
|
+
* not mark an OnPush component dirty — without this hook the component keeps
|
|
19
|
+
* rendering the class it was born with.
|
|
20
|
+
*/
|
|
21
|
+
ngOnChanges(): void;
|
|
22
|
+
/** Type scale step; also selects the rendered HTML tag. @default 'p' */
|
|
23
|
+
variant: TypographyProps['variant'];
|
|
24
|
+
/** Extra Tailwind classes merged onto the element via `cn()` (last-wins). */
|
|
25
|
+
class: string;
|
|
26
|
+
/** True for the variants that have no dedicated tag and render as `<p>`. */
|
|
27
|
+
get isParagraph(): boolean;
|
|
28
|
+
get computedClass(): string;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TypographyComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TypographyComponent, "tolle-typography", never, { "variant": { "alias": "variant"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/lib/utils/color.d.ts
CHANGED
|
@@ -78,10 +78,24 @@ export declare const BASE_PALETTES: Record<string, BasePalette>;
|
|
|
78
78
|
/** Emit the `:root` + `.dark` neutral-token block for a base color id. */
|
|
79
79
|
export declare function generateBaseCss(baseId: string): string;
|
|
80
80
|
/**
|
|
81
|
-
* Derive 5
|
|
82
|
-
*
|
|
83
|
-
*
|
|
81
|
+
* Derive 5 chart colors from one base hex, spreading hues widely and
|
|
82
|
+
* alternating lightness so adjacent series stay separable — including for
|
|
83
|
+
* red-green colour blindness, where hue alone carries almost no information and
|
|
84
|
+
* the lightness difference does the work.
|
|
85
|
+
*
|
|
86
|
+
* `mode` re-steps the ramp for the target surface. Dark is NOT a lightened flip
|
|
87
|
+
* of light: its usable lightness band is both narrower and lower.
|
|
88
|
+
*
|
|
89
|
+
* NOTE: a palette derived from an arbitrary brand hue cannot be *guaranteed*
|
|
90
|
+
* colour-blind-safe — five hues spread from one starting point will, for some
|
|
91
|
+
* bases, put a confusable pair next to each other. The shipped defaults in
|
|
92
|
+
* `theme.css` are a fixed, validated palette; prefer those unless brand-matched
|
|
93
|
+
* charts matter more than guaranteed separation. Whatever you use, keep the
|
|
94
|
+
* legend and direct labels on, so colour is never the only channel.
|
|
95
|
+
*/
|
|
96
|
+
export declare function generateChartRamp(hex: string, mode?: 'light' | 'dark'): string[];
|
|
97
|
+
/**
|
|
98
|
+
* Emit the `:root` + `.dark` `--chart-1…5` block for a chart base color, with
|
|
99
|
+
* each mode re-stepped for its own surface.
|
|
84
100
|
*/
|
|
85
|
-
export declare function generateChartRamp(hex: string): string[];
|
|
86
|
-
/** Emit the `:root` + `.dark` `--chart-1…5` block for a chart base color. */
|
|
87
101
|
export declare function generateChartCss(hex: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tolle_/tolle-ui",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"tailwind-merge": "^3.4.0",
|
|
36
36
|
"clsx": "^2.1.1",
|
|
37
37
|
"date-fns": "^4.1.0",
|
|
38
|
-
"embla-carousel": "^8.5.2"
|
|
38
|
+
"embla-carousel": "^8.5.2",
|
|
39
|
+
"tailwindcss-animate": "^1.0.7"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
42
|
"tslib": "^2.3.0"
|
package/preset.js
CHANGED
|
@@ -86,6 +86,12 @@ module.exports = {
|
|
|
86
86
|
md: 'calc(var(--radius) - 2px)',
|
|
87
87
|
sm: 'calc(var(--radius) - 4px)',
|
|
88
88
|
},
|
|
89
|
+
transitionTimingFunction: {
|
|
90
|
+
// Named so components reference `ease-tolle` instead of an inline
|
|
91
|
+
// `ease-[cubic-bezier(...)]` arbitrary value — Tailwind 3.4 flags
|
|
92
|
+
// the comma-separated arbitrary form as an ambiguous utility match.
|
|
93
|
+
tolle: 'cubic-bezier(0.2, 0.0, 0.2, 1)',
|
|
94
|
+
},
|
|
89
95
|
boxShadow: {
|
|
90
96
|
sm: 'var(--shadow-sm)',
|
|
91
97
|
DEFAULT: 'var(--shadow)',
|
|
@@ -94,5 +100,5 @@ module.exports = {
|
|
|
94
100
|
},
|
|
95
101
|
},
|
|
96
102
|
},
|
|
97
|
-
plugins: [],
|
|
103
|
+
plugins: [require('tailwindcss-animate')],
|
|
98
104
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -83,3 +83,53 @@ export * from './lib/phone-number.service';
|
|
|
83
83
|
export * from './lib/country-codes.service';
|
|
84
84
|
export * from './lib/resizable-panel.component';
|
|
85
85
|
export * from './lib/resizable-panel-item.component';
|
|
86
|
+
export * from './lib/aspect-ratio.component';
|
|
87
|
+
export * from './lib/resizable.component';
|
|
88
|
+
export * from './lib/context-menu.component';
|
|
89
|
+
export * from './lib/context-menu-trigger.directive';
|
|
90
|
+
export * from './lib/context-menu.service';
|
|
91
|
+
export * from './lib/select.service';
|
|
92
|
+
export * from './lib/radio-service';
|
|
93
|
+
export * from './lib/types/date-range';
|
|
94
|
+
export * from './lib/spinner.component';
|
|
95
|
+
export * from './lib/kbd.component';
|
|
96
|
+
export * from './lib/item.component';
|
|
97
|
+
export * from './lib/native-select.component';
|
|
98
|
+
export * from './lib/typography.component';
|
|
99
|
+
export * from './lib/field.component';
|
|
100
|
+
export * from './lib/input-group.component';
|
|
101
|
+
export * from './lib/table.component';
|
|
102
|
+
export * from './lib/menubar.component';
|
|
103
|
+
export * from './lib/navigation-menu.component';
|
|
104
|
+
export * from './lib/command.service';
|
|
105
|
+
export * from './lib/command.component';
|
|
106
|
+
export * from './lib/command-dialog.component';
|
|
107
|
+
export * from './lib/combobox.component';
|
|
108
|
+
export * from './lib/message-scroller.service';
|
|
109
|
+
export * from './lib/message-scroller.component';
|
|
110
|
+
export * from './lib/message.component';
|
|
111
|
+
export * from './lib/bubble.component';
|
|
112
|
+
export * from './lib/marker.component';
|
|
113
|
+
export * from './lib/attachment.component';
|
|
114
|
+
export * from './lib/conversation.component';
|
|
115
|
+
export * from './lib/prompt-input.component';
|
|
116
|
+
export * from './lib/reasoning.component';
|
|
117
|
+
export * from './lib/tool.component';
|
|
118
|
+
export * from './lib/sources.component';
|
|
119
|
+
export * from './lib/suggestion.component';
|
|
120
|
+
export * from './lib/inline-citation.component';
|
|
121
|
+
export * from './lib/shimmer.component';
|
|
122
|
+
export * from './lib/task.component';
|
|
123
|
+
export * from './lib/chain-of-thought.component';
|
|
124
|
+
export * from './lib/plan.component';
|
|
125
|
+
export * from './lib/queue.component';
|
|
126
|
+
export * from './lib/checkpoint.component';
|
|
127
|
+
export * from './lib/confirmation.component';
|
|
128
|
+
export * from './lib/context.component';
|
|
129
|
+
export * from './lib/model-selector.component';
|
|
130
|
+
export * from './lib/chart.service';
|
|
131
|
+
export * from './lib/chart.component';
|
|
132
|
+
export * from './lib/chart-pie.component';
|
|
133
|
+
export * from './lib/direction.component';
|
|
134
|
+
export * from './lib/time-picker.component';
|
|
135
|
+
export * from './lib/date-time-picker.component';
|