frontile 0.18.0 → 0.18.2
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/declarations/-private/get-config.d.ts.map +1 -1
- package/declarations/-private/timer.d.ts +3 -3
- package/declarations/-private/timer.d.ts.map +1 -1
- package/declarations/components/buttons/chip.d.ts +1 -1
- package/declarations/components/buttons/chip.d.ts.map +1 -1
- package/declarations/components/buttons/close-button.d.ts +2 -2
- package/declarations/components/buttons/close-button.d.ts.map +1 -1
- package/declarations/components/collections/listbox/item.d.ts +2 -2
- package/declarations/components/collections/listbox/item.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/column.d.ts +6 -0
- package/declarations/components/collections/simple-table/column.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/footer.d.ts +2 -1
- package/declarations/components/collections/simple-table/footer.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/header.d.ts +2 -1
- package/declarations/components/collections/simple-table/header.d.ts.map +1 -1
- package/declarations/components/collections/simple-table/index.d.ts +1 -1
- package/declarations/components/collections/simple-table/index.d.ts.map +1 -1
- package/declarations/components/collections/table/checkbox.d.ts +1 -1
- package/declarations/components/collections/table/checkbox.d.ts.map +1 -1
- package/declarations/components/collections/table/column-visibility.d.ts +2 -2
- package/declarations/components/collections/table/column-visibility.d.ts.map +1 -1
- package/declarations/components/collections/table/table.d.ts +9 -7
- package/declarations/components/collections/table/table.d.ts.map +1 -1
- package/declarations/components/forms/autocomplete.d.ts +12 -12
- package/declarations/components/forms/checkbox.d.ts +2 -2
- package/declarations/components/forms/checkbox.d.ts.map +1 -1
- package/declarations/components/forms/date-input/clipboard.d.ts +34 -0
- package/declarations/components/forms/date-input/clipboard.d.ts.map +1 -0
- package/declarations/components/forms/date-input/date-input.d.ts +93 -0
- package/declarations/components/forms/date-input/date-input.d.ts.map +1 -0
- package/declarations/components/forms/date-input/segment-group.d.ts +132 -0
- package/declarations/components/forms/date-input/segment-group.d.ts.map +1 -0
- package/declarations/components/forms/date-input/segments.d.ts +163 -0
- package/declarations/components/forms/date-input/segments.d.ts.map +1 -0
- package/declarations/components/forms/date-input/types.d.ts +175 -0
- package/declarations/components/forms/date-input/types.d.ts.map +1 -0
- package/declarations/components/forms/date-input.d.ts +6 -0
- package/declarations/components/forms/date-input.d.ts.map +1 -0
- package/declarations/components/forms/date-picker/date-picker.d.ts +263 -15
- package/declarations/components/forms/date-picker/date-picker.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/end-content.d.ts +33 -3
- package/declarations/components/forms/date-picker/end-content.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/types.d.ts +45 -2
- package/declarations/components/forms/date-picker/types.d.ts.map +1 -1
- package/declarations/components/forms/date-picker/value.d.ts +21 -5
- package/declarations/components/forms/date-picker/value.d.ts.map +1 -1
- package/declarations/components/forms/field.d.ts +7 -5
- package/declarations/components/forms/field.d.ts.map +1 -1
- package/declarations/components/forms/form.d.ts +5 -5
- package/declarations/components/forms/form.d.ts.map +1 -1
- package/declarations/components/forms/index.d.ts +1 -0
- package/declarations/components/forms/index.d.ts.map +1 -1
- package/declarations/components/forms/input-otp.d.ts +5 -5
- package/declarations/components/forms/input-otp.d.ts.map +1 -1
- package/declarations/components/forms/input.d.ts +15 -15
- package/declarations/components/forms/input.d.ts.map +1 -1
- package/declarations/components/forms/native-select.d.ts +10 -10
- package/declarations/components/forms/native-select.d.ts.map +1 -1
- package/declarations/components/forms/radio.d.ts +2 -2
- package/declarations/components/forms/radio.d.ts.map +1 -1
- package/declarations/components/forms/select/select.d.ts +16 -16
- package/declarations/components/forms/textarea.d.ts +10 -10
- package/declarations/components/forms/textarea.d.ts.map +1 -1
- package/declarations/components/navigation/pagination/pagination.d.ts +32 -1
- package/declarations/components/navigation/pagination/pagination.d.ts.map +1 -1
- package/declarations/components/overlays/overlay.d.ts +4 -4
- package/declarations/components/overlays/overlay.d.ts.map +1 -1
- package/declarations/components/utilities/avatar.d.ts +35 -2
- package/declarations/components/utilities/avatar.d.ts.map +1 -1
- package/declarations/components/utilities/collapsible.d.ts +16 -0
- package/declarations/components/utilities/collapsible.d.ts.map +1 -1
- package/declarations/test-support.d.ts +30 -0
- package/declarations/test-support.d.ts.map +1 -1
- package/declarations/utils/forms-utils-index.d.ts +1 -1
- package/declarations/utils/forms-utils-index.d.ts.map +1 -1
- package/declarations/utils/nested-data.d.ts +17 -0
- package/declarations/utils/nested-data.d.ts.map +1 -1
- package/dist/components/buttons/chip.js.map +1 -1
- package/dist/components/buttons/close-button.js +5 -12
- package/dist/components/buttons/close-button.js.map +1 -1
- package/dist/components/collections/listbox/item.js +4 -11
- package/dist/components/collections/listbox/item.js.map +1 -1
- package/dist/components/collections/simple-table/column.js +2 -2
- package/dist/components/collections/simple-table/column.js.map +1 -1
- package/dist/components/collections/simple-table/footer.js +1 -1
- package/dist/components/collections/simple-table/footer.js.map +1 -1
- package/dist/components/collections/simple-table/header.js +1 -1
- package/dist/components/collections/simple-table/header.js.map +1 -1
- package/dist/components/collections/simple-table/index.js +1 -1
- package/dist/components/collections/simple-table/index.js.map +1 -1
- package/dist/components/collections/table/checkbox.js +2 -7
- package/dist/components/collections/table/checkbox.js.map +1 -1
- package/dist/components/collections/table/column-visibility.js +2 -7
- package/dist/components/collections/table/column-visibility.js.map +1 -1
- package/dist/components/forms/checkbox.js +4 -12
- package/dist/components/forms/checkbox.js.map +1 -1
- package/dist/components/forms/date-input/clipboard.js +231 -0
- package/dist/components/forms/date-input/clipboard.js.map +1 -0
- package/dist/components/forms/date-input/date-input.js +204 -0
- package/dist/components/forms/date-input/date-input.js.map +1 -0
- package/dist/components/forms/date-input/segment-group.js +292 -0
- package/dist/components/forms/date-input/segment-group.js.map +1 -0
- package/dist/components/forms/date-input/segments.js +562 -0
- package/dist/components/forms/date-input/segments.js.map +1 -0
- package/dist/components/forms/date-input/types.js +2 -0
- package/dist/components/forms/date-input/types.js.map +1 -0
- package/dist/components/forms/date-input.js +4 -0
- package/dist/components/forms/date-input.js.map +1 -0
- package/dist/components/forms/date-picker/date-picker.js +361 -20
- package/dist/components/forms/date-picker/date-picker.js.map +1 -1
- package/dist/components/forms/date-picker/end-content.js +17 -4
- package/dist/components/forms/date-picker/end-content.js.map +1 -1
- package/dist/components/forms/date-picker/value.js +44 -6
- package/dist/components/forms/date-picker/value.js.map +1 -1
- package/dist/components/forms/field.js +12 -20
- package/dist/components/forms/field.js.map +1 -1
- package/dist/components/forms/form.js +11 -27
- package/dist/components/forms/form.js.map +1 -1
- package/dist/components/forms/index.js +5 -2
- package/dist/components/forms/index.js.map +1 -1
- package/dist/components/forms/input-otp.js +10 -26
- package/dist/components/forms/input-otp.js.map +1 -1
- package/dist/components/forms/input.js +9 -22
- package/dist/components/forms/input.js.map +1 -1
- package/dist/components/forms/native-select.js +5 -12
- package/dist/components/forms/native-select.js.map +1 -1
- package/dist/components/forms/radio.js +4 -12
- package/dist/components/forms/radio.js.map +1 -1
- package/dist/components/forms/textarea.js +6 -17
- package/dist/components/forms/textarea.js.map +1 -1
- package/dist/components/navigation/pagination/pagination.js +18 -2
- package/dist/components/navigation/pagination/pagination.js.map +1 -1
- package/dist/components/notifications/index.js +1 -1
- package/dist/components/overlays/overlay.js +8 -21
- package/dist/components/overlays/overlay.js.map +1 -1
- package/dist/components/utilities/avatar.js +26 -5
- package/dist/components/utilities/avatar.js.map +1 -1
- package/dist/components/utilities/collapsible.js +47 -3
- package/dist/components/utilities/collapsible.js.map +1 -1
- package/dist/forms.js +5 -2
- package/dist/forms.js.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/{manager-jDaRVZ5o.js → manager-Dge4r8Vn.js} +9 -19
- package/dist/manager-Dge4r8Vn.js.map +1 -0
- package/dist/notifications.js +1 -1
- package/dist/services/notifications.js +1 -1
- package/dist/test-support.js +903 -389
- package/dist/test-support.js.map +1 -1
- package/dist/utils/forms-utils-index.js +1 -1
- package/dist/utils/forms-utils-index.js.map +1 -1
- package/dist/utils/nested-data.js +28 -1
- package/dist/utils/nested-data.js.map +1 -1
- package/package.json +10 -10
- package/dist/manager-jDaRVZ5o.js.map +0 -1
|
@@ -45,67 +45,67 @@ interface TextareaSignature {
|
|
|
45
45
|
Element: HTMLTextAreaElement;
|
|
46
46
|
}
|
|
47
47
|
declare class Textarea extends Component<TextareaSignature> {
|
|
48
|
-
handleOnInput(event: Event)
|
|
49
|
-
handleOnChange(event: Event)
|
|
50
|
-
handleOnBlur()
|
|
48
|
+
handleOnInput: (event: Event) => void;
|
|
49
|
+
handleOnChange: (event: Event) => void;
|
|
50
|
+
handleOnBlur: () => void;
|
|
51
51
|
get classes(): {
|
|
52
52
|
base: (slotProps?: ({
|
|
53
53
|
size?: "sm" | "md" | "lg" | undefined;
|
|
54
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
55
54
|
hasStartContent?: boolean | undefined;
|
|
56
55
|
hasEndContent?: boolean | undefined;
|
|
57
56
|
hasChips?: boolean | undefined;
|
|
58
57
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
58
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
59
59
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
60
60
|
innerContainer: (slotProps?: ({
|
|
61
61
|
size?: "sm" | "md" | "lg" | undefined;
|
|
62
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
63
62
|
hasStartContent?: boolean | undefined;
|
|
64
63
|
hasEndContent?: boolean | undefined;
|
|
65
64
|
hasChips?: boolean | undefined;
|
|
66
65
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
66
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
67
67
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
68
68
|
startContent: (slotProps?: ({
|
|
69
69
|
size?: "sm" | "md" | "lg" | undefined;
|
|
70
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
71
70
|
hasStartContent?: boolean | undefined;
|
|
72
71
|
hasEndContent?: boolean | undefined;
|
|
73
72
|
hasChips?: boolean | undefined;
|
|
74
73
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
74
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
75
75
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
76
76
|
endContent: (slotProps?: ({
|
|
77
77
|
size?: "sm" | "md" | "lg" | undefined;
|
|
78
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
79
78
|
hasStartContent?: boolean | undefined;
|
|
80
79
|
hasEndContent?: boolean | undefined;
|
|
81
80
|
hasChips?: boolean | undefined;
|
|
82
81
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
82
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
83
83
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
84
84
|
input: (slotProps?: ({
|
|
85
85
|
size?: "sm" | "md" | "lg" | undefined;
|
|
86
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
87
86
|
hasStartContent?: boolean | undefined;
|
|
88
87
|
hasEndContent?: boolean | undefined;
|
|
89
88
|
hasChips?: boolean | undefined;
|
|
90
89
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
90
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
91
91
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
92
92
|
} & {
|
|
93
93
|
input: (slotProps?: ({
|
|
94
94
|
size?: "sm" | "md" | "lg" | undefined;
|
|
95
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
96
95
|
hasStartContent?: boolean | undefined;
|
|
97
96
|
hasEndContent?: boolean | undefined;
|
|
98
97
|
hasChips?: boolean | undefined;
|
|
99
98
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
99
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
100
100
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
101
101
|
} & {
|
|
102
102
|
base: (slotProps?: ({
|
|
103
103
|
size?: "sm" | "md" | "lg" | undefined;
|
|
104
|
-
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
105
104
|
hasStartContent?: boolean | undefined;
|
|
106
105
|
hasEndContent?: boolean | undefined;
|
|
107
106
|
hasChips?: boolean | undefined;
|
|
108
107
|
startContentPointerEvents?: "none" | "auto" | undefined;
|
|
108
|
+
endContentPointerEvents?: "none" | "auto" | undefined;
|
|
109
109
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
110
110
|
};
|
|
111
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/forms/textarea.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../src/components/forms/textarea.gts"],"names":[],"mappings":"AA4HA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAe,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAEzB,UAAU,IAAK,SAAQ,qBAAqB;IAC1C;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;IAElC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAEhC;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAErD;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAEtD;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,UAAU,iBAAiB;IACzB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,mBAAmB,CAAC;CAC9B;AAED,cAAM,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACjD,aAAa,GAAI,OAAO,KAAK,KAAG,IAAI,CAOlC;IAEF,cAAc,GAAI,OAAO,KAAK,KAAG,IAAI,CAOnC;IAEF,YAAY,QAAO,IAAI,CAErB;IAEF,IAAI,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAKV;CAyDF;AACD,OAAO,EAAE,QAAQ,EAAE,KAAK,iBAAiB,EAAE,CAAC;AAC5C,eAAe,QAAQ,CAAC"}
|
|
@@ -42,6 +42,31 @@ interface RenderedItem {
|
|
|
42
42
|
*/
|
|
43
43
|
context: PaginationItemContext;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Every text the component renders itself. Override any of them with
|
|
47
|
+
* `@labels`, e.g. to translate them; the rest keep these English defaults.
|
|
48
|
+
*/
|
|
49
|
+
interface PaginationLabels {
|
|
50
|
+
/** Visible text of the previous-page button. */
|
|
51
|
+
previous: string;
|
|
52
|
+
/** Visible text of the next-page button. */
|
|
53
|
+
next: string;
|
|
54
|
+
/** Accessible name of the previous-page button. */
|
|
55
|
+
previousPage: string;
|
|
56
|
+
/** Accessible name of the next-page button. */
|
|
57
|
+
nextPage: string;
|
|
58
|
+
/** Accessible name of the jump-to-first button (`@showEdges`). */
|
|
59
|
+
firstPage: string;
|
|
60
|
+
/** Accessible name of the jump-to-last button (`@showEdges`). */
|
|
61
|
+
lastPage: string;
|
|
62
|
+
/**
|
|
63
|
+
* Accessible name of a page button. A function, because some languages
|
|
64
|
+
* put the number mid-sentence.
|
|
65
|
+
*/
|
|
66
|
+
page: (page: number) => string;
|
|
67
|
+
/** Screen-reader text for an ellipsis between page buttons. */
|
|
68
|
+
morePages: string;
|
|
69
|
+
}
|
|
45
70
|
interface PaginationArgs {
|
|
46
71
|
/**
|
|
47
72
|
* Total number of items across all pages -- an *item* count, not a page
|
|
@@ -120,6 +145,11 @@ interface PaginationArgs {
|
|
|
120
145
|
* @defaultValue 'pagination'
|
|
121
146
|
*/
|
|
122
147
|
label?: string;
|
|
148
|
+
/**
|
|
149
|
+
* Replaces any of the texts the component renders, e.g. to translate them.
|
|
150
|
+
* Anything left out keeps its English default; see `PaginationLabels`.
|
|
151
|
+
*/
|
|
152
|
+
labels?: Partial<PaginationLabels>;
|
|
123
153
|
/** Class names for each slot of the component, merged with the theme's. */
|
|
124
154
|
classes?: SlotsToClasses<PaginationSlots>;
|
|
125
155
|
}
|
|
@@ -156,6 +186,7 @@ declare class Pagination extends Component<PaginationSignature> {
|
|
|
156
186
|
get siblingCount(): number;
|
|
157
187
|
get showPages(): boolean;
|
|
158
188
|
get label(): string;
|
|
189
|
+
get labels(): PaginationLabels;
|
|
159
190
|
/**
|
|
160
191
|
* Whether `@page` was *passed* decides the mode, not what it holds -- the
|
|
161
192
|
* same rule as `SegmentedControl`. Glimmer's named-args object carries a key
|
|
@@ -282,6 +313,6 @@ declare class Pagination extends Component<PaginationSignature> {
|
|
|
282
313
|
goToPrevious: () => void;
|
|
283
314
|
goToNext: () => void;
|
|
284
315
|
}
|
|
285
|
-
export { Pagination, type PaginationSignature, type PaginationArgs, type PaginationSummary, type PaginationItemContext };
|
|
316
|
+
export { Pagination, type PaginationSignature, type PaginationArgs, type PaginationLabels, type PaginationSummary, type PaginationItemContext };
|
|
286
317
|
export default Pagination;
|
|
287
318
|
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/pagination/pagination.gts"],"names":[],"mappings":"AA+
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/pagination/pagination.gts"],"names":[],"mappings":"AA+gBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAUtC,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,yCAAyC;AACzC,UAAU,iBAAiB;IACzB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,0DAA0D;AAC1D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,YAAY,CAAC;QACtB,OAAO,EAAE,WAAW,CAAC;QACrB,IAAI,EAAE;YAAE,UAAU,EAAE,CAAC,OAAO,CAAC,CAAA;SAAE,CAAC;KACjC,CAAC,CAAC;CACJ;AAED;;;;GAIG;AACH,UAAU,YAAY;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED;;;GAGG;AACH,UAAU,gBAAgB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KG;IACH,SAAS;;;;;;OAQN;IAEH,IAAI,GAAI,MAAM,MAAM,KAAG,IAAI,CASzB;IAEF,YAAY,QAAO,IAAI,CAErB;IAEF,QAAQ,QAAO,IAAI,CAEjB;CAmSH;AAED,OAAO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC3B,CAAC;AACF,eAAe,UAAU,CAAC"}
|
|
@@ -153,10 +153,10 @@ declare class Overlay extends Component<OverlaySignature> {
|
|
|
153
153
|
constructor(owner: Owner, args: Args);
|
|
154
154
|
willDestroy(): void;
|
|
155
155
|
handleClose(): void;
|
|
156
|
-
handleContentClick(event: MouseEvent)
|
|
157
|
-
handleOutsideClick(e: Event)
|
|
158
|
-
handleContentMouseDown(event: MouseEvent)
|
|
159
|
-
handleKeyDown(event: KeyboardEvent)
|
|
156
|
+
handleContentClick: (event: MouseEvent) => void;
|
|
157
|
+
handleOutsideClick: (e: Event) => void;
|
|
158
|
+
handleContentMouseDown: (event: MouseEvent) => void;
|
|
159
|
+
handleKeyDown: (event: KeyboardEvent) => void;
|
|
160
160
|
setupContent: import("ember-modifier").FunctionBasedModifier<{
|
|
161
161
|
Args: {
|
|
162
162
|
Positional: unknown[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/overlay.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../src/components/overlays/overlay.gts"],"names":[],"mappings":"AAymBA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,EAAa,KAAK,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAkB,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAY,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAQ9D,OAAO,EA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KAAG,IAAI,CAIhD;IAEF,aAAa,GAAI,OAAO,aAAa,KAAG,IAAI,CAM1C;IAEF,YAAY;;;;;;OAsDT;IAEH,IACI,mBAAmB;;;;;;MAQtB;IAED,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,IAAI,SAAS,IAAI,OAAO,CAMvB;IAED,IAAI,QAAQ,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAKhD;IAED,IAAI,kBAAkB,IAAI,OAAO,CAKhC;IAED;;;;;;;;;;OAUG;IACH,IAAI,gBAAgB,IAAI,gBAAgB,CAMvC;IAED,IAAI,eAAe,IAAI,OAAO,eAAe,GAAG,SAAS,CAKxD;IAED,IAAI,OAAO,WAQV;IAED,IAAI,qBAAqB;iBAzQuB,WAAW;;;;;;;OA+Q1D;IAID,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC;IAIlD,IAAI,kBAAkB;;;;;;;;;;;;MAIrB;IAED,IAAI,UAAU;;;;;;;;;;;;MAWb;CAkDF;AAED,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,CAAC;AAC1C,eAAe,OAAO,CAAC"}
|
|
@@ -15,9 +15,25 @@ interface AvatarSignature {
|
|
|
15
15
|
*/
|
|
16
16
|
shape?: AvatarVariants['shape'];
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* How the image fills the avatar. `cover` crops the image to fill the
|
|
19
|
+
* avatar, which suits photos. `contain` shows the whole image, inset from
|
|
20
|
+
* the edge, which suits logos and wordmarks.
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue 'cover'
|
|
23
|
+
*/
|
|
24
|
+
fit?: AvatarVariants['fit'];
|
|
25
|
+
/**
|
|
26
|
+
* Draws a faint hairline just inside the avatar's edge. Pass `false` to
|
|
27
|
+
* remove it.
|
|
20
28
|
*
|
|
29
|
+
* @defaultValue true
|
|
30
|
+
*/
|
|
31
|
+
isBordered?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* URL of the image to be displayed in the avatar.
|
|
34
|
+
* If provided, the image will be used instead of initials. If the image
|
|
35
|
+
* fails to load, the avatar falls back to the initials, or to an empty
|
|
36
|
+
* plate when there is no name.
|
|
21
37
|
*/
|
|
22
38
|
src?: string | null;
|
|
23
39
|
/**
|
|
@@ -56,38 +72,55 @@ interface AvatarSignature {
|
|
|
56
72
|
Element: HTMLSpanElement;
|
|
57
73
|
}
|
|
58
74
|
declare class Avatar extends Component<AvatarSignature> {
|
|
75
|
+
failedSrc?: string | null;
|
|
59
76
|
get classes(): {
|
|
60
77
|
base: (slotProps?: ({
|
|
61
78
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
62
79
|
shape?: "circle" | "square" | undefined;
|
|
80
|
+
isBordered?: boolean | undefined;
|
|
81
|
+
fit?: "cover" | "contain" | undefined;
|
|
63
82
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
64
83
|
img: (slotProps?: ({
|
|
65
84
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
66
85
|
shape?: "circle" | "square" | undefined;
|
|
86
|
+
isBordered?: boolean | undefined;
|
|
87
|
+
fit?: "cover" | "contain" | undefined;
|
|
67
88
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
68
89
|
name: (slotProps?: ({
|
|
69
90
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
70
91
|
shape?: "circle" | "square" | undefined;
|
|
92
|
+
isBordered?: boolean | undefined;
|
|
93
|
+
fit?: "cover" | "contain" | undefined;
|
|
71
94
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
72
95
|
} & {
|
|
73
96
|
base: (slotProps?: ({
|
|
74
97
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
75
98
|
shape?: "circle" | "square" | undefined;
|
|
99
|
+
isBordered?: boolean | undefined;
|
|
100
|
+
fit?: "cover" | "contain" | undefined;
|
|
76
101
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
77
102
|
img: (slotProps?: ({
|
|
78
103
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
79
104
|
shape?: "circle" | "square" | undefined;
|
|
105
|
+
isBordered?: boolean | undefined;
|
|
106
|
+
fit?: "cover" | "contain" | undefined;
|
|
80
107
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
81
108
|
name: (slotProps?: ({
|
|
82
109
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
83
110
|
shape?: "circle" | "square" | undefined;
|
|
111
|
+
isBordered?: boolean | undefined;
|
|
112
|
+
fit?: "cover" | "contain" | undefined;
|
|
84
113
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
85
114
|
} & {
|
|
86
115
|
base: (slotProps?: ({
|
|
87
116
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
88
117
|
shape?: "circle" | "square" | undefined;
|
|
118
|
+
isBordered?: boolean | undefined;
|
|
119
|
+
fit?: "cover" | "contain" | undefined;
|
|
89
120
|
} & import("tailwind-variants").ClassProp<import("tailwind-variants").ClassValue>) | undefined) => string;
|
|
90
121
|
};
|
|
122
|
+
get hasImage(): boolean;
|
|
123
|
+
handleImageError: () => void;
|
|
91
124
|
get initials(): string;
|
|
92
125
|
get shouldShowInitials(): boolean;
|
|
93
126
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/utilities/avatar.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/utilities/avatar.gts"],"names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ignature> {
|
|
|
45
45
|
}>;
|
|
46
46
|
endWaiter(): void;
|
|
47
47
|
willDestroy(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Frames scheduled by the current `expand`/`contract`. A frame left over
|
|
50
|
+
* from the previous direction would otherwise still apply its styles after
|
|
51
|
+
* the toggle, e.g. making a panel that was just closed visible again.
|
|
52
|
+
*/
|
|
53
|
+
pendingFrames: Set<number>;
|
|
54
|
+
requestFrame(callback: () => void): void;
|
|
55
|
+
cancelFrames(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Ends the waiter when none of `properties` is transitioning after the
|
|
58
|
+
* styles just written. `onTransitionEnd` only hears about transitions that
|
|
59
|
+
* run: when the start and end values match -- a close that lands before the
|
|
60
|
+
* open frame ever made the panel visible, or a transition that never got
|
|
61
|
+
* to start -- no `transitionend` fires and the waiter would leak.
|
|
62
|
+
*/
|
|
63
|
+
endWaiterUnlessTransitioning(element: HTMLElement, properties: string[]): void;
|
|
48
64
|
onTransitionEnd: (event: TransitionEvent) => void;
|
|
49
65
|
heightTransition(duration: number): string;
|
|
50
66
|
opacityTransition(duration: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/utilities/collapsible.gts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/utilities/collapsible.gts"],"names":[],"mappings":"AA+VA,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAqCtC,UAAU,eAAe;IACvB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,oBAAoB;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,cAAM,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACvD,eAAe,UAAS;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,UAAS;gBAEZ,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe;IAS/C;;;;OAIG;IACH,IAAI,aAAa,IAAI,MAAM,GAAG,SAAS,CAEtC;IAED,IAAI,MAAM,IAAI,UAAU,CAAC,OAAO,UAAU,CAAC,CAoB1C;IAED,cAAc,UAAS;IACvB,MAAM;;;;;;OAmBH;IAEH,SAAS,IAAI,IAAI;IASjB,WAAW,IAAI,IAAI;IAOnB;;;;OAIG;IACH,aAAa,cAAqB;IAElC,YAAY,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAQxC,YAAY,IAAI,IAAI;IAKpB;;;;;;OAMG;IACH,4BAA4B,CAC1B,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,EAAE,GACnB,IAAI;IAoBP,eAAe,GAAI,OAAO,eAAe,UA0CvC;IAEF,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI1C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAI3C,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAqClC;;;;;;;OAOG;IACH,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAS5C,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CA6CrC;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,oBAAoB,EAAE,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -23,4 +23,34 @@ export { setPrefersReducedMotion } from './utils/prefers-reduced-motion';
|
|
|
23
23
|
* that legitimately belongs to `root`.
|
|
24
24
|
*/
|
|
25
25
|
export declare function ownParts(root: Element, part: string): Element[];
|
|
26
|
+
/**
|
|
27
|
+
* Types a date into a segmented `DateInput` or `DatePicker`.
|
|
28
|
+
*
|
|
29
|
+
* `fillIn` cannot do this and, worse, does not fail when you try. The segments
|
|
30
|
+
* are `contenteditable`, so `fillIn` writes their text and fires `input`
|
|
31
|
+
* without complaint -- but the component renders from its own segments and
|
|
32
|
+
* listens only to `beforeinput`/`keydown`, so nothing reaches the value. The
|
|
33
|
+
* result is a test that reads green, whose `assert.dom(...).hasText('01')`
|
|
34
|
+
* even passes, while the component's value stayed `null` and the form would
|
|
35
|
+
* submit empty.
|
|
36
|
+
*
|
|
37
|
+
* This types the digits segment by segment the way a person does, so the value
|
|
38
|
+
* composes through the same commit path as real input.
|
|
39
|
+
*
|
|
40
|
+
* ```js
|
|
41
|
+
* await fillDate('[data-test-due]', '2026-01-20');
|
|
42
|
+
* await fillDate('[data-test-due]', new Date(2026, 0, 20));
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* For `@mode="range"` use {@link fillDateRange}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function fillDate(selector: string, value: Date | string): Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* Types both ends of a range into a segmented `DatePicker @mode="range"`.
|
|
50
|
+
*
|
|
51
|
+
* ```js
|
|
52
|
+
* await fillDateRange('[data-test-trip]', '2026-01-20', '2026-01-25');
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function fillDateRange(selector: string, start: Date | string, end: Date | string): Promise<void>;
|
|
26
56
|
//# sourceMappingURL=test-support.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-support.d.ts","sourceRoot":"","sources":["../src/test-support.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test-support.d.ts","sourceRoot":"","sources":["../src/test-support.ts"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAEf;AAED,wBAAgB,iBAAiB,CAC/B,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAEf;AAkDD,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAS/D;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CACtB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,GAAG,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,GAAG,MAAM,EACpB,GAAG,EAAE,IAAI,GAAG,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare function triggerFormInputEvent(element?: HTMLElement | null): void;
|
|
2
2
|
export { triggerFormInputEvent };
|
|
3
|
-
export { flattenData, unflattenData, hasNestedData, deepEqual } from './nested-data';
|
|
3
|
+
export { flattenData, unflattenData, getPath, hasNestedData, deepEqual } from './nested-data';
|
|
4
4
|
//# sourceMappingURL=forms-utils-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forms-utils-index.d.ts","sourceRoot":"","sources":["../../src/utils/forms-utils-index.ts"],"names":[],"mappings":"AAGA,iBAAS,qBAAqB,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAkBjE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACV,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"forms-utils-index.d.ts","sourceRoot":"","sources":["../../src/utils/forms-utils-index.ts"],"names":[],"mappings":"AAGA,iBAAS,qBAAqB,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAkBjE;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAC;AACjC,OAAO,EACL,WAAW,EACX,aAAa,EACb,OAAO,EACP,aAAa,EACb,SAAS,EACV,MAAM,eAAe,CAAC"}
|
|
@@ -25,6 +25,23 @@ export declare function flattenData<T = unknown>(data: Record<string, unknown>,
|
|
|
25
25
|
* @returns A nested object structure
|
|
26
26
|
*/
|
|
27
27
|
export declare function unflattenData<T = unknown>(data: Record<string, unknown>): Record<string, T>;
|
|
28
|
+
/**
|
|
29
|
+
* Reads a dotted path (`'profile.email'`) from form data, returning
|
|
30
|
+
* `undefined` as soon as a segment is missing or lands on a non-object.
|
|
31
|
+
*
|
|
32
|
+
* The read-side counterpart of `unflattenData`, and refuses the same unsafe
|
|
33
|
+
* segments: field names are untrusted input, so `'__proto__'` must not reach
|
|
34
|
+
* `Object.prototype`.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* getPath({ profile: { email: 'john@example.com' } }, 'profile.email')
|
|
38
|
+
* // Returns: 'john@example.com'
|
|
39
|
+
*
|
|
40
|
+
* @param data - The data object to read from
|
|
41
|
+
* @param path - A flat key or dotted path
|
|
42
|
+
* @returns The value at `path`, or `undefined`
|
|
43
|
+
*/
|
|
44
|
+
export declare function getPath(data: unknown, path: string): unknown;
|
|
28
45
|
/**
|
|
29
46
|
* Checks if the data structure contains any nested objects.
|
|
30
47
|
* If true, we need to handle it as nested data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nested-data.d.ts","sourceRoot":"","sources":["../../src/utils/nested-data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmEH;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EACrC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,O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AG,OAAO,CA4BzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../src/components/buttons/chip.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles } from '@frontile/theme';\nimport { CloseButton } from './close-button';\nimport { renamedArgValue } from '../../-private/deprecated-args';\n\ninterface ChipSignature {\n Args: {\n /**\n * The chip variant.\n *\n * @defaultValue 'solid'\n */\n variant?: 'solid' | 'outline' | 'soft';\n\n /**\n * @deprecated Use `variant`. `default` is now `solid`, `outlined` is\n * `outline`, and `faded` is `soft`.\n */\n appearance?: 'default' | 'outlined' | 'faded';\n\n /**\n * The color of the chip.\n */\n color?:\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * @deprecated Use `color`. `default` is now `neutral`.\n */\n intent?:\n | 'default'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * The size of the chip\n *\n * @defaultValue 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n\n /**\n * The border radius of the chip\n *\n * @defaultValue 'full'\n */\n radius?: 'none' | 'sm' | 'lg' | 'full';\n\n /**\n * Adds a dot before the content, colored by `@color`. On the `solid`\n * variant the dot takes the chip's text color, since the chip's\n * background is already the chip's color.\n *\n * @defaultValue false\n */\n withDot?: boolean;\n\n /**\n * Function to be called when clicking on the close button.\n * If you pass this argument, the close button will be visible.\n */\n onClose?: () => void;\n\n /**\n * The accessible name of the close button. Every close button would\n * otherwise be announced as just \"Close\", which does not say *what* is\n * being removed — worth setting when several chips sit together.\n *\n * @defaultValue 'Close'\n */\n closeButtonTitle?: string;\n\n /**\n * `tabindex` for the close button.\n *\n * Set to `-1` when chips sit inside another control (a multi-select field,\n * say) and the close button should stay a pointer affordance: every chip\n * would otherwise cost a Tab stop before the control itself is reached.\n * Whoever does this owes keyboard users another way to remove a chip.\n *\n * @defaultValue undefined (the close button is a normal tab stop)\n */\n closeButtonTabIndex?: number | string;\n\n /**\n * Dims the chip and disables its close button, if any.\n *\n * @defaultValue false\n */\n isDisabled?: boolean;\n\n /**\n * Custom class name, it will override the default ones using Tailwind Merge library.\n */\n class?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nclass Chip extends Component<ChipSignature> {\n get classNames() {\n const { chip } = useStyles();\n\n const { base, content, dot, closeButton } = chip({\n color:\n renamedArgValue(\n this.args.color,\n this.args.intent,\n { default: 'neutral' } as const,\n {\n component: 'Chip',\n from: 'intent',\n to: 'color',\n id: 'frontile.chip.intent'\n }\n ) || 'neutral',\n size: this.args.size,\n variant:\n renamedArgValue(\n this.args.variant,\n this.args.appearance,\n { default: 'solid', outlined: 'outline', faded: 'soft' } as const,\n {\n component: 'Chip',\n from: 'appearance',\n to: 'variant',\n id: 'frontile.chip.appearance'\n }\n ) || 'solid',\n radius: this.args.radius,\n isDisabled: this.args.isDisabled\n });\n\n return {\n base: base({ class: this.args.class }),\n content: content(),\n dot: dot(),\n closeButton: closeButton()\n };\n }\n\n <template>\n <div\n class={{this.classNames.base}}\n data-component=\"chip\"\n data-part=\"base\"\n ...attributes\n >\n {{#if @withDot}}\n <span class={{this.classNames.dot}} data-part=\"dot\"></span>\n {{/if}}\n <span class={{this.classNames.content}} data-part=\"content\">\n {{yield}}\n </span>\n {{#if @onClose}}\n <CloseButton\n @class={{this.classNames.closeButton}}\n @title={{@closeButtonTitle}}\n @onPress={{@onClose}}\n tabindex={{@closeButtonTabIndex}}\n disabled={{@isDisabled}}\n data-part=\"close-button\"\n />\n {{/if}}\n </div>\n </template>\n}\n\nexport { Chip, type ChipSignature };\nexport default Chip;\n"],"names":["Chip","Component","classNames","chip","useStyles","base","content","dot","closeButton","color","renamedArgValue","args","intent","default","component","from","to","id","size","variant","appearance","outlined","faded","radius","isDisabled","class","setComponentTemplate","precompileTemplate","strictMode","scope","CloseButton"],"mappings":";;;;;;;AAgHA,MAAMA,aAAaC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EAAA;AAEA,EAAA;IAAAkB,oBAAA,CAAAC,kBAAA,CAAA,ygBAAA,EAwBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;"}
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../src/components/buttons/chip.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { useStyles } from '@frontile/theme';\nimport { CloseButton } from './close-button';\nimport { renamedArgValue } from '../../-private/deprecated-args';\n\ninterface ChipSignature {\n Args: {\n /**\n * The chip variant.\n *\n * @defaultValue 'solid'\n */\n variant?: 'solid' | 'outline' | 'soft';\n\n /**\n * @deprecated Use `variant`. `default` is now `solid`, `outlined` is\n * `outline`, and `faded` is `soft`.\n */\n appearance?: 'default' | 'outlined' | 'faded';\n\n /**\n * The color of the chip.\n */\n color?:\n | 'neutral'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * @deprecated Use `color`. `default` is now `neutral`.\n */\n intent?:\n | 'default'\n | 'primary'\n | 'secondary'\n | 'tertiary'\n | 'success'\n | 'warning'\n | 'danger';\n\n /**\n * The size of the chip\n *\n * @defaultValue 'md'\n */\n size?: 'xs' | 'sm' | 'md' | 'lg';\n\n /**\n * The border radius of the chip\n *\n * @defaultValue 'full'\n */\n radius?: 'none' | 'sm' | 'lg' | 'full';\n\n /**\n * Adds a dot before the content, colored by `@color`. On the `solid`\n * variant the dot takes the chip's text color, since the chip's\n * background is already the chip's color.\n *\n * @defaultValue false\n */\n withDot?: boolean;\n\n /**\n * Function to be called when clicking on the close button.\n * If you pass this argument, the close button will be visible.\n */\n onClose?: () => void;\n\n /**\n * The accessible name of the close button. Every close button would\n * otherwise be announced as just \"Close\", which does not say *what* is\n * being removed — worth setting when several chips sit together.\n *\n * @defaultValue 'Close'\n */\n closeButtonTitle?: string;\n\n /**\n * `tabindex` for the close button.\n *\n * Set to `-1` when chips sit inside another control (a multi-select field,\n * say) and the close button should stay a pointer affordance: every chip\n * would otherwise cost a Tab stop before the control itself is reached.\n * Whoever does this owes keyboard users another way to remove a chip.\n *\n * @defaultValue undefined (the close button is a normal tab stop)\n */\n closeButtonTabIndex?: number | string;\n\n /**\n * Dims the chip and disables its close button, if any.\n *\n * @defaultValue false\n */\n isDisabled?: boolean;\n\n /**\n * Custom class name, it will override the default ones using Tailwind Merge library.\n */\n class?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nclass Chip extends Component<ChipSignature> {\n get classNames() {\n const { chip } = useStyles();\n\n const { base, content, dot, closeButton } = chip({\n color:\n renamedArgValue(\n this.args.color,\n this.args.intent,\n { default: 'neutral' } as const,\n {\n component: 'Chip',\n from: 'intent',\n to: 'color',\n id: 'frontile.chip.intent'\n }\n ) || 'neutral',\n size: this.args.size,\n variant:\n renamedArgValue(\n this.args.variant,\n this.args.appearance,\n { default: 'solid', outlined: 'outline', faded: 'soft' } as const,\n {\n component: 'Chip',\n from: 'appearance',\n to: 'variant',\n id: 'frontile.chip.appearance'\n }\n ) || 'solid',\n radius: this.args.radius,\n isDisabled: this.args.isDisabled\n });\n\n return {\n base: base({ class: this.args.class }),\n content: content(),\n dot: dot(),\n closeButton: closeButton()\n };\n }\n\n <template>\n <div\n class={{this.classNames.base}}\n data-component=\"chip\"\n data-part=\"base\"\n ...attributes\n >\n {{#if @withDot}}\n <span class={{this.classNames.dot}} data-part=\"dot\"></span>\n {{/if}}\n <span class={{this.classNames.content}} data-part=\"content\">\n {{yield}}\n </span>\n {{#if @onClose}}\n <CloseButton\n @class={{this.classNames.closeButton}}\n @title={{@closeButtonTitle}}\n @onPress={{@onClose}}\n tabindex={{@closeButtonTabIndex}}\n disabled={{@isDisabled}}\n data-part=\"close-button\"\n />\n {{/if}}\n </div>\n </template>\n}\n\nexport { Chip, type ChipSignature };\nexport default Chip;\n"],"names":["Chip","Component","classNames","chip","useStyles","base","content","dot","closeButton","color","renamedArgValue","args","intent","default","component","from","to","id","size","variant","appearance","outlined","faded","radius","isDisabled","class","setComponentTemplate","precompileTemplate","strictMode","scope","CloseButton"],"mappings":";;;;;;;AAgHA,MAAMA,aAAaC,SAAA,CAAU;EAC3B,IAAIC,UAAAA,GAAa;IACf,MAAM;AAAEC,MAAAA;KAAM,GAAGC,SAAA,EAAA;IAEjB,MAAM;MAAEC,IAAI;MAAEC,OAAO;MAAEC,GAAG;AAAEC,MAAAA;KAAa,GAAGL,IAAA,CAAK;AAC/CM,MAAAA,KAAA,EACEC,eAAA,CACE,IAAI,CAACC,IAAI,CAACF,KAAK,EACf,IAAI,CAACE,IAAI,CAACC,MAAM,EAChB;AAAEC,QAAAA,OAAA,EAAS;AAAU,OAAA,EACrB;AACEC,QAAAA,SAAA,EAAW,MAAA;AACXC,QAAAA,IAAA,EAAM,QAAA;AACNC,QAAAA,EAAA,EAAI,OAAA;AACJC,QAAAA,EAAA,EAAI;OACN,CAAA,IACG,SAAA;AACPC,MAAAA,IAAA,EAAM,IAAI,CAACP,IAAI,CAACO,IAAI;AACpBC,MAAAA,OAAA,EACET,eAAA,CACE,IAAI,CAACC,IAAI,CAACQ,OAAO,EACjB,IAAI,CAACR,IAAI,CAACS,UAAU,EACpB;AAAEP,QAAAA,OAAA,EAAS,OAAA;AAASQ,QAAAA,QAAA,EAAU,SAAA;AAAWC,QAAAA,KAAA,EAAO;AAAO,OAAA,EACvD;AACER,QAAAA,SAAA,EAAW,MAAA;AACXC,QAAAA,IAAA,EAAM,YAAA;AACNC,QAAAA,EAAA,EAAI,SAAA;AACJC,QAAAA,EAAA,EAAI;OACN,CAAA,IACG,OAAA;AACPM,MAAAA,MAAA,EAAQ,IAAI,CAACZ,IAAI,CAACY,MAAM;AACxBC,MAAAA,UAAA,EAAY,IAAI,CAACb,IAAI,CAACa;AACxB,KAAA,CAAA;IAEA,OAAO;MACLnB,IAAA,EAAMA,IAAA,CAAK;AAAEoB,QAAAA,KAAA,EAAO,IAAI,CAACd,IAAI,CAACc;AAAM,OAAA,CAAA;MACpCnB,OAAA,EAASA,OAAA,EAAA;MACTC,GAAA,EAAKA,GAAA,EAAA;MACLC,WAAA,EAAaA,WAAA;KACf;AACF,EAAA;AAEA,EAAA;IAAAkB,oBAAA,CAAAC,kBAAA,CAAA,ygBAAA,EAwBA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { action } from '@ember/object';
|
|
3
2
|
import { tracked } from '@glimmer/tracking';
|
|
4
3
|
import { on } from '@ember/modifier';
|
|
5
4
|
import { deprecate } from '@ember/debug';
|
|
@@ -8,7 +7,7 @@ import press from '../../modifiers/press.js';
|
|
|
8
7
|
import { useStyles } from '@frontile/theme';
|
|
9
8
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
10
9
|
import { setComponentTemplate } from '@ember/component';
|
|
11
|
-
import { d as decorateFieldV2, i as initializeDeferredDecorator
|
|
10
|
+
import { d as decorateFieldV2, i as initializeDeferredDecorator } from '../../runtime--fcdnjmJ-BOdRhmsS.js';
|
|
12
11
|
|
|
13
12
|
class CloseButton extends Component {
|
|
14
13
|
static {
|
|
@@ -68,22 +67,16 @@ class CloseButton extends Component {
|
|
|
68
67
|
handlePressChange = isPressed => {
|
|
69
68
|
this.isPressed = isPressed;
|
|
70
69
|
};
|
|
71
|
-
handlePress
|
|
70
|
+
handlePress = event => {
|
|
72
71
|
if (typeof this.args.onPress === 'function') {
|
|
73
72
|
this.args.onPress(event);
|
|
74
73
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
decorateMethodV2(this.prototype, "handlePress", [action]);
|
|
78
|
-
}
|
|
79
|
-
handleClick(event) {
|
|
74
|
+
};
|
|
75
|
+
handleClick = event => {
|
|
80
76
|
if (typeof this.args.onClick === 'function') {
|
|
81
77
|
this.args.onClick(event);
|
|
82
78
|
}
|
|
83
|
-
}
|
|
84
|
-
static {
|
|
85
|
-
decorateMethodV2(this.prototype, "handleClick", [action]);
|
|
86
|
-
}
|
|
79
|
+
};
|
|
87
80
|
static {
|
|
88
81
|
setComponentTemplate(precompileTemplate("<button type=\"button\" class={{this.classes.base}} data-pressed={{if this.isPressed \"true\"}} data-component=\"close-button\" data-part=\"base\" ...attributes {{press this.handlePress onPressChange=this.handlePressChange}} {{on \"click\" this.handleClick}}>\n\n {{#if (has-block)}}\n {{yield this.classes.icon}}\n {{else}}\n <svg class={{this.classes.icon}} data-part=\"icon\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"></path>\n </svg>\n {{/if}}\n\n <VisuallyHidden>\n {{if @title @title \"Close\"}}\n </VisuallyHidden>\n</button>", {
|
|
89
82
|
strictMode: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-button.js","sources":["../../../src/components/buttons/close-button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport {
|
|
1
|
+
{"version":3,"file":"close-button.js","sources":["../../../src/components/buttons/close-button.gts"],"sourcesContent":["import Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { on } from '@ember/modifier';\nimport { deprecate } from '@ember/debug';\nimport { VisuallyHidden } from '../utilities/visually-hidden';\nimport { press, type PressEvent } from '../../modifiers/press';\nimport { useStyles, type CloseButtonVariants } from '@frontile/theme';\nimport type Owner from '@ember/owner';\n\ninterface CloseButtonSignature {\n Args: {\n /**\n * The title of the close button\n *\n * @defaultValue 'Close'\n */\n title?: string;\n\n /**\n * The icon size\n *\n * @defaultValue 'lg'\n */\n size?: CloseButtonVariants['size'];\n\n /**\n * @defaultValue 'ghost'\n *\n * `transparent` and `subtle` are @deprecated — use `ghost` and `soft` instead.\n */\n variant?: 'ghost' | 'soft' | 'transparent' | 'subtle';\n\n /**\n * The function to call when button is pressed\n */\n onPress?: (event: PressEvent) => void;\n\n /**\n * Deprecated: The function to call when button is clicked\n *\n * @deprecated Use onPress instead for better cross-platform support\n */\n onClick?: (event: Event) => void;\n\n /**\n * Additional class for close button element\n */\n class?: string;\n };\n Blocks: {\n default: [string | null];\n };\n Element: HTMLButtonElement;\n}\n\nclass CloseButton extends Component<CloseButtonSignature> {\n @tracked isPressed = false;\n\n constructor(owner: Owner, args: CloseButtonSignature['Args']) {\n super(owner, args);\n\n if (args.onClick) {\n deprecate(\n 'CloseButton: onClick is deprecated. Use onPress instead for better cross-platform support including touch, keyboard, and screen reader interactions.',\n false,\n {\n id: 'frontile.close-button.onClick',\n until: '0.18.0',\n for: 'frontile',\n since: { available: '0.17.0', enabled: '0.17.0' }\n }\n );\n }\n }\n\n get variant(): 'ghost' | 'soft' {\n const legacy = this.args.variant;\n\n if (legacy === 'transparent' || legacy === 'subtle') {\n deprecate(\n `CloseButton: \\`@variant=\"${legacy}\"\\` is deprecated. Use \\`@variant=\"${legacy === 'transparent' ? 'ghost' : 'soft'}\"\\`.`,\n false,\n {\n id: 'frontile.close-button.variant-values',\n until: '0.19.0',\n for: 'frontile',\n since: { available: '0.18.0', enabled: '0.18.0' }\n }\n );\n\n return legacy === 'transparent' ? 'ghost' : 'soft';\n }\n\n return legacy ?? 'ghost';\n }\n\n get classes() {\n const { closeButton } = useStyles();\n\n const { base, icon } = closeButton({\n size: this.args.size || 'md',\n variant: this.variant\n });\n\n return {\n base: base({ class: this.args.class }),\n icon: icon()\n };\n }\n\n handlePressChange = (isPressed: boolean): void => {\n this.isPressed = isPressed;\n };\n\n handlePress = (event: PressEvent): void => {\n if (typeof this.args.onPress === 'function') {\n this.args.onPress(event);\n }\n };\n\n handleClick = (event: Event): void => {\n if (typeof this.args.onClick === 'function') {\n this.args.onClick(event);\n }\n };\n\n <template>\n <button\n type=\"button\"\n class={{this.classes.base}}\n data-pressed={{if this.isPressed \"true\"}}\n data-component=\"close-button\"\n data-part=\"base\"\n ...attributes\n {{press this.handlePress onPressChange=this.handlePressChange}}\n {{on \"click\" this.handleClick}}\n >\n\n {{#if (has-block)}}\n {{yield this.classes.icon}}\n {{else}}\n <svg\n class={{this.classes.icon}}\n data-part=\"icon\"\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n stroke-width=\"2\"\n d=\"M6 18L18 6M6 6l12 12\"\n ></path>\n </svg>\n {{/if}}\n\n <VisuallyHidden>\n {{if @title @title \"Close\"}}\n </VisuallyHidden>\n </button>\n </template>\n}\n\nexport { CloseButton, type CloseButtonSignature };\nexport default CloseButton;\n"],"names":["CloseButton","Component","g","prototype","tracked","i","constructor","owner","args","onClick","deprecate","id","until","for","since","available","enabled","variant","legacy","classes","closeButton","useStyles","base","icon","size","class","handlePressChange","isPressed","handlePress","event","onPress","handleClick","setComponentTemplate","precompileTemplate","strictMode","scope","press","on","VisuallyHidden"],"mappings":";;;;;;;;;;;AAuDA,MAAMA,oBAAoBC,SAAA,CAAU;AAAA,EAAA;IAAAC,eAAA,CAAA,IAAA,CAAAC,SAAA,EAAA,WAAA,EAAA,CACjCC,OAAA,CAAA,EAAA,YAAA;AAAA,MAAA,OAAoB,KAAA;AAAA,IAAA,CAAA,CAAA;AAAA;EAAA,UAAA,IAAAC,2BAAA,CAAA,IAAA,EAAA,WAAA,CAAA,EAAA,MAAA;AAErBC,EAAAA,WAAAA,CAAYC,KAAY,EAAEC,IAAkC,EAAE;AAC5D,IAAA,KAAK,CAACD,KAAA,EAAOC,IAAA,CAAA;IAEb,IAAIA,IAAA,CAAKC,OAAO,EAAE;AAChBC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AI,CAACjB,IAAI,CAACiB;AAAM,OAAA,CAAA;MACpCF,IAAA,EAAMA,IAAA;KACR;AACF,EAAA;EAEAG,iBAAA,GAAqBC,SAAkB,IAAO;IAC5C,IAAI,CAACA,SAAS,GAAGA,SAAA;EACnB,CAAA;EAEAC,WAAA,GAAeC,KAAO,IAAiB;IACrC,IAAI,OAAO,IAAI,CAACrB,IAAI,CAACsB,OAAO,KAAK,UAAA,EAAY;AAC3C,MAAA,IAAI,CAACtB,IAAI,CAACsB,OAAO,CAACD,KAAA,CAAA;AACpB,IAAA;EACF,CAAA;EAEAE,WAAA,GAAeF,KAAO,IAAY;IAChC,IAAI,OAAO,IAAI,CAACrB,IAAI,CAACC,OAAO,KAAK,UAAA,EAAY;AAC3C,MAAA,IAAI,CAACD,IAAI,CAACC,OAAO,CAACoB,KAAA,CAAA;AACpB,IAAA;EACF,CAAA;AAEA,EAAA;IAAAG,oBAAA,CAAAC,kBAAA,CAAA,kuBAAA,EAqCA;MAAAC,UAAA,EAAA,IAAA;AAAAC,MAAAA,KAAA,EAAAA,OAAA;QAAAC,KAAA;QAAAC,EAAA;AAAAC,QAAAA;AAAA,OAAA;KAAU,CAAA,EAAV,IAAW,CAAA;AAAD;AACZ;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { tracked, cached } from '@glimmer/tracking';
|
|
3
|
-
import { action } from '@ember/object';
|
|
4
3
|
import { assert } from '@ember/debug';
|
|
5
4
|
import { on } from '@ember/modifier';
|
|
6
5
|
import { useStyles } from '@frontile/theme';
|
|
@@ -30,13 +29,10 @@ class ListboxItem extends Component {
|
|
|
30
29
|
assert(`Argument @key is undefined or null, @key must be provided in Listbox.Item component`, this.args.key);
|
|
31
30
|
return this.args.key;
|
|
32
31
|
}
|
|
33
|
-
onRegister
|
|
32
|
+
onRegister = item => {
|
|
34
33
|
this.listItem = item;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
decorateMethodV2(this.prototype, "onRegister", [action]);
|
|
38
|
-
}
|
|
39
|
-
onClick() {
|
|
34
|
+
};
|
|
35
|
+
onClick = () => {
|
|
40
36
|
if (this.listItem?.isDisabled) {
|
|
41
37
|
return;
|
|
42
38
|
}
|
|
@@ -50,16 +46,13 @@ class ListboxItem extends Component {
|
|
|
50
46
|
if (typeof this.args.onClick === 'function') {
|
|
51
47
|
this.args.onClick();
|
|
52
48
|
}
|
|
53
|
-
}
|
|
49
|
+
};
|
|
54
50
|
/**
|
|
55
51
|
* A roving tabindex: the manager nominates one option as the composite's tab
|
|
56
52
|
* stop and every other option stays out of the tab order, as the ARIA
|
|
57
53
|
* listbox pattern requires. Giving a `0` to each active *or selected* option
|
|
58
54
|
* turned a multi-select with eight selections into eight tab stops.
|
|
59
55
|
*/
|
|
60
|
-
static {
|
|
61
|
-
decorateMethodV2(this.prototype, "onClick", [action]);
|
|
62
|
-
}
|
|
63
56
|
get tabindex() {
|
|
64
57
|
return this.manager.isTabStop(this.key) ? 0 : -1;
|
|
65
58
|
}
|