@astryxdesign/core 0.1.9-canary.fe6baeb → 0.1.9-canary.fef7dca
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/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Avatar/Avatar.js +6 -5
- package/dist/Calendar/Calendar.js +5 -5
- package/dist/Calendar/dayCellUtils.d.ts +4 -4
- package/dist/Calendar/dayCellUtils.js +2 -2
- package/dist/Calendar/styles.d.ts +30 -31
- package/dist/Calendar/styles.d.ts.map +1 -1
- package/dist/Calendar/styles.js +30 -31
- package/dist/Carousel/Carousel.d.ts.map +1 -1
- package/dist/Carousel/Carousel.js +22 -12
- package/dist/Chat/ChatDictationButton.d.ts.map +1 -1
- package/dist/Chat/ChatDictationButton.js +3 -1
- package/dist/Chat/ChatToolCalls.d.ts.map +1 -1
- package/dist/Chat/ChatToolCalls.js +10 -3
- package/dist/Citation/Citation.d.ts +22 -1
- package/dist/Citation/Citation.d.ts.map +1 -1
- package/dist/Citation/Citation.js +20 -6
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +8 -2
- package/dist/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenu.js +9 -0
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuCheckboxItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuItem.js +4 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.d.ts.map +1 -1
- package/dist/DropdownMenu/DropdownMenuRadioItem.js +4 -1
- package/dist/DropdownMenu/menuItemHover.d.ts +23 -0
- package/dist/DropdownMenu/menuItemHover.d.ts.map +1 -0
- package/dist/DropdownMenu/menuItemHover.js +33 -0
- package/dist/HoverCard/useHoverCard.d.ts.map +1 -1
- package/dist/HoverCard/useHoverCard.js +10 -4
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +15 -9
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +48 -39
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +41 -15
- package/dist/Switch/Switch.d.ts +8 -1
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +160 -91
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.d.ts.map +1 -1
- package/dist/Table/plugins/groupedRows/useTableGroupedRows.js +15 -11
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +36 -26
- package/dist/Table/plugins/tree/useTableTreeData.d.ts.map +1 -1
- package/dist/Table/plugins/tree/useTableTreeData.js +29 -23
- package/dist/Typeahead/BaseTypeahead.d.ts.map +1 -1
- package/dist/Typeahead/BaseTypeahead.js +19 -10
- package/dist/astryx.css +15 -7
- package/dist/astryx.umd.js +50 -50
- package/dist/astryx.umd.js.map +4 -4
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +13 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +2 -1
- package/dist/utils/rtlStyles.d.ts +24 -0
- package/dist/utils/rtlStyles.d.ts.map +1 -0
- package/dist/utils/rtlStyles.js +27 -0
- package/locales/en.json +16 -0
- package/locales/pseudo.json +12 -0
- package/package.json +6 -1
- package/src/Avatar/Avatar.doc.mjs +14 -1
- package/src/Avatar/Avatar.test.tsx +13 -0
- package/src/Avatar/Avatar.tsx +18 -4
- package/src/Avatar/AvatarStatusDot.doc.mjs +3 -3
- package/src/Button/Button.doc.mjs +0 -4
- package/src/Calendar/Calendar.test.tsx +17 -16
- package/src/Calendar/Calendar.tsx +13 -13
- package/src/Calendar/dayCellUtils.test.ts +18 -18
- package/src/Calendar/dayCellUtils.ts +2 -2
- package/src/Calendar/styles.ts +33 -39
- package/src/Carousel/Carousel.tsx +25 -6
- package/src/Chat/ChatComposer.doc.mjs +2 -2
- package/src/Chat/ChatComposerInput.doc.mjs +1 -1
- package/src/Chat/ChatDictationButton.tsx +7 -1
- package/src/Chat/ChatToolCalls.tsx +9 -2
- package/src/Citation/Citation.doc.mjs +4 -3
- package/src/Citation/Citation.test.tsx +97 -0
- package/src/Citation/Citation.tsx +43 -11
- package/src/DateTimeInput/DateTimeInput.doc.mjs +16 -1
- package/src/DateTimeInput/DateTimeInput.test.tsx +112 -0
- package/src/DateTimeInput/DateTimeInput.tsx +28 -16
- package/src/DropdownMenu/DropdownMenu.test.tsx +60 -0
- package/src/DropdownMenu/DropdownMenu.tsx +9 -0
- package/src/DropdownMenu/DropdownMenuCheckboxItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuItem.tsx +8 -2
- package/src/DropdownMenu/DropdownMenuRadioItem.tsx +8 -2
- package/src/DropdownMenu/menuItemHover.ts +39 -0
- package/src/HoverCard/useHoverCard.tsx +15 -3
- package/src/Lightbox/Lightbox.tsx +11 -3
- package/src/MultiSelector/MultiSelector.test.tsx +66 -0
- package/src/MultiSelector/MultiSelector.tsx +62 -47
- package/src/Selector/Selector.test.tsx +119 -0
- package/src/Selector/Selector.tsx +45 -16
- package/src/Switch/Switch.doc.mjs +10 -4
- package/src/Switch/Switch.test.tsx +22 -0
- package/src/Switch/Switch.tsx +90 -33
- package/src/Table/plugins/groupedRows/useTableGroupedRows.tsx +9 -6
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +24 -17
- package/src/Table/plugins/tree/useTableTreeData.tsx +17 -13
- package/src/Table/useTableRowStatus.doc.mjs +1 -1
- package/src/Thumbnail/Thumbnail.doc.mjs +1 -1
- package/src/TopNav/TopNavMegaMenuFeaturedCard.doc.mjs +1 -1
- package/src/Typeahead/BaseTypeahead.tsx +29 -14
- package/src/Typeahead/Typeahead.test.tsx +27 -0
- package/src/theme/derivedVarRegistry.test.ts +1 -0
- package/src/theme/derivedVarRegistry.ts +6 -0
- package/src/theme/generateThemeRules.test.ts +42 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/rtlStyles.ts +27 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAc5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AA2BrD;;;;;;GAMG;AACH,KAAK,eAAe,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEzD;;GAEG;AACH,KAAK,iBAAiB,GACpB,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE7D;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAgBpD;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar/Avatar.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAoB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAc5C,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,eAAe,CAAC;AA2BrD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CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;CAChD;AAsCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,EACrB,GAAG,EACH,aAAa,EAAE,MAAM,EACrB,WAAW,EACX,IAAI,EACJ,IAAW,EACX,GAAG,EACH,MAAM,EACN,OAAc,EACd,IAAI,EACJ,EAAE,EACF,MAAM,EACN,GAAG,EACH,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,WAAW,+BAsOb;yBAzPe,MAAM"}
|
package/dist/Avatar/Avatar.js
CHANGED
|
@@ -99,6 +99,7 @@ const styles = {
|
|
|
99
99
|
kVAEAm: "x1n2onr6",
|
|
100
100
|
k1xSpc: "x3nfvp2",
|
|
101
101
|
kmuXW: "x2lah0s",
|
|
102
|
+
kaIpWk: "xjspbzw",
|
|
102
103
|
$$css: true
|
|
103
104
|
},
|
|
104
105
|
content: {
|
|
@@ -116,10 +117,10 @@ const styles = {
|
|
|
116
117
|
kjj79g: "xl56j7k",
|
|
117
118
|
kzqmXN: "xh8yej3",
|
|
118
119
|
kZKoxP: "x5yr21d",
|
|
119
|
-
kWkggS: "
|
|
120
|
-
kMwMTN: "
|
|
120
|
+
kWkggS: "xelv01g",
|
|
121
|
+
kMwMTN: "xicfil",
|
|
121
122
|
kMv6JI: "x9ynric",
|
|
122
|
-
k63SB2: "
|
|
123
|
+
k63SB2: "xi08x9w",
|
|
123
124
|
kP9fke: "xtvhhri",
|
|
124
125
|
$$css: true
|
|
125
126
|
},
|
|
@@ -175,7 +176,7 @@ const dynamicStyles = {
|
|
|
175
176
|
"--x-height": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(size)
|
|
176
177
|
}],
|
|
177
178
|
fontSize: size => [_temp, {
|
|
178
|
-
"--x-fontSize": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(size * INITIALS_FONT_SIZE_RATIO)
|
|
179
|
+
"--x-fontSize": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(`var(--_avatar-fallback-font-size, ${size * INITIALS_FONT_SIZE_RATIO}px)`)
|
|
179
180
|
}],
|
|
180
181
|
statusPosition: size => [_temp2, {
|
|
181
182
|
"--x-bottom": (val => typeof val === "number" ? val + "px" : val != null ? val : undefined)(size * CIRCLE_EDGE_OFFSET_RATIO),
|
|
@@ -372,7 +373,7 @@ export function Avatar({
|
|
|
372
373
|
children: getInitials(name)
|
|
373
374
|
}), showIcon && /*#__PURE__*/_jsx("div", {
|
|
374
375
|
...{
|
|
375
|
-
className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d
|
|
376
|
+
className: "x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xelv01g xicfil x9ynric xi08x9w xtvhhri"
|
|
376
377
|
},
|
|
377
378
|
children: /*#__PURE__*/_jsx(DefaultIcon, {
|
|
378
379
|
size: numericSize
|
|
@@ -24,7 +24,7 @@ import { useAnnounce, useGridFocus } from "../hooks/index.js";
|
|
|
24
24
|
import { useCalendarDays, useCalendarConstraints } from "./hooks/index.js";
|
|
25
25
|
import { calendarStyles, monthGridStyles, dayCellStyles, dayCellTheme } from "./styles.js";
|
|
26
26
|
import { plainDateFromISO, plainDateToISO, plainDateToDate, plainDateToday, plainDateSetFirstOfMonth, plainDateAddMonths, plainDateAddDays, plainDateIsBefore, plainDateIsEqual, plainDateGetWeekNumber, plainDateFormat, DATE_FORMAT_WITH_WEEKDAY, DATE_FORMAT_MONTH_YEAR } from "../utils/plainDate.js";
|
|
27
|
-
import { mergeProps, composeEventHandlers } from "../utils/index.js";
|
|
27
|
+
import { mergeProps, composeEventHandlers, rtlStyles } from "../utils/index.js";
|
|
28
28
|
import { computeDayCellState, computeRangeRounding, computePreviewRounding, computeDayNeighborContinuity, isEndpoint } from "./dayCellUtils.js";
|
|
29
29
|
|
|
30
30
|
// =============================================================================
|
|
@@ -283,7 +283,7 @@ export function Calendar({
|
|
|
283
283
|
// caller classNames, so the RTL mirror must live on its own
|
|
284
284
|
// element.
|
|
285
285
|
_jsx("span", {
|
|
286
|
-
...stylex.props(calendarStyles.navIcon),
|
|
286
|
+
...stylex.props(calendarStyles.navIcon, rtlStyles.mirror),
|
|
287
287
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
288
288
|
icon: "chevronLeft",
|
|
289
289
|
size: "sm",
|
|
@@ -304,7 +304,7 @@ export function Calendar({
|
|
|
304
304
|
label: t('@astryx.calendar.nextMonth'),
|
|
305
305
|
variant: "ghost",
|
|
306
306
|
icon: /*#__PURE__*/_jsx("span", {
|
|
307
|
-
...stylex.props(calendarStyles.navIcon),
|
|
307
|
+
...stylex.props(calendarStyles.navIcon, rtlStyles.mirror),
|
|
308
308
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
309
309
|
icon: "chevronRight",
|
|
310
310
|
size: "sm",
|
|
@@ -692,9 +692,9 @@ function DayCell({
|
|
|
692
692
|
"aria-selected": state.isSelected || state.isInRange || undefined,
|
|
693
693
|
...stylex.props(dayCellStyles.cell),
|
|
694
694
|
children: [state.isInRange && /*#__PURE__*/_jsx("div", {
|
|
695
|
-
...stylex.props(dayCellStyles.rangeBg, dayCellTheme.rangeBg, rangeRounding.
|
|
695
|
+
...stylex.props(dayCellStyles.rangeBg, dayCellTheme.rangeBg, rangeRounding.roundStart && dayCellStyles.rangeBgRadiusStart, rangeRounding.roundEnd && dayCellStyles.rangeBgRadiusEnd, state.isRangeStart && dayCellStyles.rangeInsetStart, state.isRangeStart && rangeRounding.roundEnd && dayCellStyles.rangeInsetEnd, state.isRangeEnd && dayCellStyles.rangeInsetEnd, state.isRangeStart && rangeRounding.roundStart && dayCellStyles.rangeInsetStart)
|
|
696
696
|
}), state.isInPreview && /*#__PURE__*/_jsx("div", {
|
|
697
|
-
...stylex.props(dayCellStyles.previewBg, dayCellTheme.previewBg, previewRounding.
|
|
697
|
+
...stylex.props(dayCellStyles.previewBg, dayCellTheme.previewBg, previewRounding.roundStart && dayCellStyles.previewBgRadiusStart, previewRounding.roundEnd && dayCellStyles.previewBgRadiusEnd, state.isPreviewStart && dayCellStyles.previewStart, state.isPreviewEnd && dayCellStyles.previewEnd)
|
|
698
698
|
}), /*#__PURE__*/_jsx("button", {
|
|
699
699
|
type: "button",
|
|
700
700
|
"data-date": day.iso,
|
|
@@ -39,16 +39,16 @@ export declare function computeRangeRounding(state: DayCellState, neighbors?: {
|
|
|
39
39
|
prevInRange?: boolean;
|
|
40
40
|
nextInRange?: boolean;
|
|
41
41
|
}): {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
roundStart: boolean;
|
|
43
|
+
roundEnd: boolean;
|
|
44
44
|
};
|
|
45
45
|
/** Rounding for the hover-preview background. */
|
|
46
46
|
export declare function computePreviewRounding(state: DayCellState, neighbors?: {
|
|
47
47
|
prevInPreview?: boolean;
|
|
48
48
|
nextInPreview?: boolean;
|
|
49
49
|
}): {
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
roundStart: boolean;
|
|
51
|
+
roundEnd: boolean;
|
|
52
52
|
};
|
|
53
53
|
/** Whether a day is a selection endpoint (selected, range start, or range end). */
|
|
54
54
|
export declare function isEndpoint(state: DayCellState): boolean;
|
|
@@ -49,8 +49,8 @@ function computeHighlightRounding(input) {
|
|
|
49
49
|
const prevBreaks = input.prevContinues !== undefined ? !input.prevContinues : false;
|
|
50
50
|
const nextBreaks = input.nextContinues !== undefined ? !input.nextContinues : false;
|
|
51
51
|
return {
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
roundStart: input.isStart || input.isFirstColumn || prevBreaks,
|
|
53
|
+
roundEnd: input.isEnd || input.isLastColumn || nextBreaks
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -48,7 +48,6 @@ export declare const calendarStyles: Readonly<{
|
|
|
48
48
|
}>;
|
|
49
49
|
readonly navIcon: Readonly<{
|
|
50
50
|
readonly display: stylex.StyleXClassNameFor<"display", "inline-flex">;
|
|
51
|
-
readonly transform: stylex.StyleXClassNameFor<"transform", "scaleX(-1)" | null>;
|
|
52
51
|
}>;
|
|
53
52
|
}>;
|
|
54
53
|
export declare const monthGridStyles: Readonly<{
|
|
@@ -103,51 +102,51 @@ export declare const dayCellStyles: Readonly<{
|
|
|
103
102
|
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
104
103
|
readonly top: stylex.StyleXClassNameFor<"top", "2px">;
|
|
105
104
|
readonly bottom: stylex.StyleXClassNameFor<"bottom", "2px">;
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
105
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", 0>;
|
|
106
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", 0>;
|
|
108
107
|
}>;
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
108
|
+
readonly rangeBgRadiusStart: Readonly<{
|
|
109
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", "2px">;
|
|
110
|
+
readonly borderStartStartRadius: stylex.StyleXClassNameFor<"borderStartStartRadius", "9999px">;
|
|
111
|
+
readonly borderEndStartRadius: stylex.StyleXClassNameFor<"borderEndStartRadius", "9999px">;
|
|
113
112
|
}>;
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
readonly
|
|
117
|
-
readonly
|
|
113
|
+
readonly rangeBgRadiusEnd: Readonly<{
|
|
114
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", "2px">;
|
|
115
|
+
readonly borderStartEndRadius: stylex.StyleXClassNameFor<"borderStartEndRadius", "9999px">;
|
|
116
|
+
readonly borderEndEndRadius: stylex.StyleXClassNameFor<"borderEndEndRadius", "9999px">;
|
|
118
117
|
}>;
|
|
119
|
-
readonly
|
|
120
|
-
readonly
|
|
118
|
+
readonly rangeInsetStart: Readonly<{
|
|
119
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", "2px">;
|
|
121
120
|
}>;
|
|
122
|
-
readonly
|
|
123
|
-
readonly
|
|
121
|
+
readonly rangeInsetEnd: Readonly<{
|
|
122
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", "2px">;
|
|
124
123
|
}>;
|
|
125
124
|
readonly previewBg: Readonly<{
|
|
126
125
|
readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
|
|
127
126
|
readonly top: stylex.StyleXClassNameFor<"top", "2px">;
|
|
128
127
|
readonly bottom: stylex.StyleXClassNameFor<"bottom", "2px">;
|
|
129
|
-
readonly
|
|
130
|
-
readonly
|
|
128
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", 0>;
|
|
129
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", 0>;
|
|
131
130
|
}>;
|
|
132
|
-
readonly
|
|
133
|
-
readonly
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
131
|
+
readonly previewBgRadiusStart: Readonly<{
|
|
132
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", "2px">;
|
|
133
|
+
readonly borderStartStartRadius: stylex.StyleXClassNameFor<"borderStartStartRadius", "9999px">;
|
|
134
|
+
readonly borderEndStartRadius: stylex.StyleXClassNameFor<"borderEndStartRadius", "9999px">;
|
|
136
135
|
}>;
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
140
|
-
readonly
|
|
136
|
+
readonly previewBgRadiusEnd: Readonly<{
|
|
137
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", "2px">;
|
|
138
|
+
readonly borderStartEndRadius: stylex.StyleXClassNameFor<"borderStartEndRadius", "9999px">;
|
|
139
|
+
readonly borderEndEndRadius: stylex.StyleXClassNameFor<"borderEndEndRadius", "9999px">;
|
|
141
140
|
}>;
|
|
142
141
|
readonly previewStart: Readonly<{
|
|
143
|
-
readonly
|
|
144
|
-
readonly
|
|
145
|
-
readonly
|
|
142
|
+
readonly insetInlineStart: stylex.StyleXClassNameFor<"insetInlineStart", "2px">;
|
|
143
|
+
readonly borderStartStartRadius: stylex.StyleXClassNameFor<"borderStartStartRadius", "9999px">;
|
|
144
|
+
readonly borderEndStartRadius: stylex.StyleXClassNameFor<"borderEndStartRadius", "9999px">;
|
|
146
145
|
}>;
|
|
147
146
|
readonly previewEnd: Readonly<{
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
147
|
+
readonly insetInlineEnd: stylex.StyleXClassNameFor<"insetInlineEnd", "2px">;
|
|
148
|
+
readonly borderStartEndRadius: stylex.StyleXClassNameFor<"borderStartEndRadius", "9999px">;
|
|
149
|
+
readonly borderEndEndRadius: stylex.StyleXClassNameFor<"borderEndEndRadius", "9999px">;
|
|
151
150
|
}>;
|
|
152
151
|
readonly day: Readonly<{
|
|
153
152
|
readonly width: stylex.StyleXClassNameFor<"width", "28px">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Calendar/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAgB3C,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/Calendar/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAgB3C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CzB,CAAC;AAMH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuC1B,CAAC;AAMH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GxB,CAAC;AAMH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEvB,CAAC"}
|
package/dist/Calendar/styles.js
CHANGED
|
@@ -63,7 +63,6 @@ export const calendarStyles = {
|
|
|
63
63
|
},
|
|
64
64
|
navIcon: {
|
|
65
65
|
k1xSpc: "x3nfvp2",
|
|
66
|
-
k3aq6I: "xgtlewx",
|
|
67
66
|
$$css: true
|
|
68
67
|
}
|
|
69
68
|
};
|
|
@@ -137,60 +136,60 @@ export const dayCellStyles = {
|
|
|
137
136
|
kVAEAm: "x10l6tqk",
|
|
138
137
|
k87sOh: "xs7f9wi",
|
|
139
138
|
krVfgx: "x1c7jfne",
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
kLqNvP: "x1o0tod",
|
|
140
|
+
kt4wiu: "xtijo5x",
|
|
142
141
|
$$css: true
|
|
143
142
|
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
143
|
+
rangeBgRadiusStart: {
|
|
144
|
+
kLqNvP: "xaoy8p5",
|
|
145
|
+
krdFHd: "x19415el",
|
|
146
|
+
kVL7Gh: "x1wc3881",
|
|
148
147
|
$$css: true
|
|
149
148
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
rangeBgRadiusEnd: {
|
|
150
|
+
kt4wiu: "xz03a8w",
|
|
151
|
+
kfmiAY: "x8agd5o",
|
|
152
|
+
kT0f0o: "x1dgc8on",
|
|
154
153
|
$$css: true
|
|
155
154
|
},
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
rangeInsetStart: {
|
|
156
|
+
kLqNvP: "xaoy8p5",
|
|
158
157
|
$$css: true
|
|
159
158
|
},
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
rangeInsetEnd: {
|
|
160
|
+
kt4wiu: "xz03a8w",
|
|
162
161
|
$$css: true
|
|
163
162
|
},
|
|
164
163
|
previewBg: {
|
|
165
164
|
kVAEAm: "x10l6tqk",
|
|
166
165
|
k87sOh: "xs7f9wi",
|
|
167
166
|
krVfgx: "x1c7jfne",
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
kLqNvP: "x1o0tod",
|
|
168
|
+
kt4wiu: "xtijo5x",
|
|
170
169
|
$$css: true
|
|
171
170
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
previewBgRadiusStart: {
|
|
172
|
+
kLqNvP: "xaoy8p5",
|
|
173
|
+
krdFHd: "x19415el",
|
|
174
|
+
kVL7Gh: "x1wc3881",
|
|
176
175
|
$$css: true
|
|
177
176
|
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
previewBgRadiusEnd: {
|
|
178
|
+
kt4wiu: "xz03a8w",
|
|
179
|
+
kfmiAY: "x8agd5o",
|
|
180
|
+
kT0f0o: "x1dgc8on",
|
|
182
181
|
$$css: true
|
|
183
182
|
},
|
|
184
183
|
previewStart: {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
184
|
+
kLqNvP: "xaoy8p5",
|
|
185
|
+
krdFHd: "x19415el",
|
|
186
|
+
kVL7Gh: "x1wc3881",
|
|
188
187
|
$$css: true
|
|
189
188
|
},
|
|
190
189
|
previewEnd: {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
kt4wiu: "xz03a8w",
|
|
191
|
+
kfmiAY: "x8agd5o",
|
|
192
|
+
kT0f0o: "x1dgc8on",
|
|
194
193
|
$$css: true
|
|
195
194
|
},
|
|
196
195
|
day: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/Carousel/Carousel.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAef,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAE5C,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAIhD,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC9D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpC;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AA+JD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,QAAQ,EACR,GAAO,EACP,UAAiB,EACjB,WAAkB,EAClB,OAAe,EACf,OAAO,EACP,YAAY,EAAE,kBAAkB,EAChC,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,SAAS,EACb,EAAE,aAAa,+BA6Mf;yBA3Ne,QAAQ"}
|
|
@@ -27,7 +27,8 @@ import { Button } from "../Button/index.js";
|
|
|
27
27
|
import { Icon } from "../Icon/index.js";
|
|
28
28
|
import { useLayer } from "../Layer/index.js";
|
|
29
29
|
import { useScrollOverflow } from "../hooks/useScrollOverflow.js";
|
|
30
|
-
import {
|
|
30
|
+
import { isRtlElement } from "../hooks/isRtlElement.js";
|
|
31
|
+
import { mergeProps, mergeRefs, rtlStyles } from "../utils/index.js";
|
|
31
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
32
33
|
import { useTranslator } from "../i18n/index.js";
|
|
33
34
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -284,7 +285,10 @@ export function Carousel({
|
|
|
284
285
|
// for users who opted out of motion.
|
|
285
286
|
const prefersReducedMotion = typeof window !== 'undefined' && typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
286
287
|
el.scrollBy({
|
|
287
|
-
|
|
288
|
+
// `direction` is the logical intent (-1 = toward content start, +1 =
|
|
289
|
+
// toward content end). Under RTL the scroll axis is inverted (start is
|
|
290
|
+
// scrollLeft 0, the end is negative), so flip the physical delta sign.
|
|
291
|
+
left: (isRtlElement(el) ? -1 : 1) * direction * Math.max(amount, itemWidth),
|
|
288
292
|
behavior: prefersReducedMotion ? 'auto' : 'smooth'
|
|
289
293
|
});
|
|
290
294
|
}, []);
|
|
@@ -332,16 +336,19 @@ export function Carousel({
|
|
|
332
336
|
children: [/*#__PURE__*/_jsx("div", {
|
|
333
337
|
...{
|
|
334
338
|
0: {
|
|
335
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xuuh30"
|
|
339
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xuuh30 x1nyx83j"
|
|
336
340
|
},
|
|
337
341
|
1: {
|
|
338
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xuuh30 xg01cxk x47corl"
|
|
342
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xuuh30 x1nyx83j xg01cxk x47corl"
|
|
339
343
|
}
|
|
340
344
|
}[!!!overflowStart << 0],
|
|
341
345
|
children: /*#__PURE__*/_jsx(Button, {
|
|
342
|
-
icon: /*#__PURE__*/_jsx(
|
|
343
|
-
|
|
344
|
-
|
|
346
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
347
|
+
...stylex.props(rtlStyles.mirror),
|
|
348
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
349
|
+
icon: "chevronLeft",
|
|
350
|
+
size: "xsm"
|
|
351
|
+
})
|
|
345
352
|
}),
|
|
346
353
|
label: t('@astryx.carousel.scrollLeft'),
|
|
347
354
|
variant: "ghost",
|
|
@@ -359,16 +366,19 @@ export function Carousel({
|
|
|
359
366
|
}), /*#__PURE__*/_jsx("div", {
|
|
360
367
|
...{
|
|
361
368
|
0: {
|
|
362
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xitnhlw"
|
|
369
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x67bb7w x1hc1fzr x19991ni xuedmi6 xlr8y92 xitnhlw x36dvrd"
|
|
363
370
|
},
|
|
364
371
|
1: {
|
|
365
|
-
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xitnhlw xg01cxk x47corl"
|
|
372
|
+
className: "x78zum5 x6s0dn4 xl56j7k x1prclbq xjspbzw x14hfi27 x19991ni xuedmi6 xlr8y92 xitnhlw x36dvrd xg01cxk x47corl"
|
|
366
373
|
}
|
|
367
374
|
}[!!!overflowEnd << 0],
|
|
368
375
|
children: /*#__PURE__*/_jsx(Button, {
|
|
369
|
-
icon: /*#__PURE__*/_jsx(
|
|
370
|
-
|
|
371
|
-
|
|
376
|
+
icon: /*#__PURE__*/_jsx("span", {
|
|
377
|
+
...stylex.props(rtlStyles.mirror),
|
|
378
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
|
379
|
+
icon: "chevronRight",
|
|
380
|
+
size: "xsm"
|
|
381
|
+
})
|
|
372
382
|
}),
|
|
373
383
|
label: t('@astryx.carousel.scrollRight'),
|
|
374
384
|
variant: "ghost",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDictationButton.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatDictationButton.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAMvE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C,MAAM,WAAW,wBAAyB,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC1E,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IACjC,sEAAsE;IACtE,SAAS,EAAE,0BAA0B,CAAC;IACtC,iCAAiC;IACjC,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,6EAA6E;IAC7E,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAiDD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,SAAS,EACT,IAAW,EACX,uBAA8B,EAC9B,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,wBAAwB,4BAoE1B;yBA9Ee,mBAAmB"}
|
|
@@ -24,6 +24,7 @@ import { colorVars, radiusVars } from "../theme/tokens.stylex.js";
|
|
|
24
24
|
import { Button } from "../Button/index.js";
|
|
25
25
|
import { Icon } from "../Icon/index.js";
|
|
26
26
|
import { mergeProps } from "../utils/index.js";
|
|
27
|
+
import { useTranslator } from "../i18n/index.js";
|
|
27
28
|
|
|
28
29
|
// =============================================================================
|
|
29
30
|
// Types
|
|
@@ -86,6 +87,7 @@ export function ChatDictationButton({
|
|
|
86
87
|
style,
|
|
87
88
|
...rest
|
|
88
89
|
}) {
|
|
90
|
+
const t = useTranslator();
|
|
89
91
|
if (isHiddenWhenUnsupported && !dictation.isSupported) {
|
|
90
92
|
return null;
|
|
91
93
|
}
|
|
@@ -94,7 +96,7 @@ export function ChatDictationButton({
|
|
|
94
96
|
bands,
|
|
95
97
|
volume: rawVolume
|
|
96
98
|
} = dictation;
|
|
97
|
-
const accessibleLabel = label ?? (isListening ? '
|
|
99
|
+
const accessibleLabel = label ?? (isListening ? t('@astryx.chatDictationButton.stopDictation') : t('@astryx.chatDictationButton.startDictation'));
|
|
98
100
|
|
|
99
101
|
// Boost each band for visibility — quiet speech (0-10%) maps to full visual range
|
|
100
102
|
const boostedBands = bands.map(b => Math.min(Math.pow(b / 0.2, 0.5), 1));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatToolCalls.d.ts","sourceRoot":"","sources":["../../src/Chat/ChatToolCalls.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,EAA+B,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC1E,OAAO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E,MAAM,CAAC;IACf,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AA0YD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,4BAsJtD;yBAtJe,aAAa"}
|
|
@@ -27,6 +27,7 @@ import { Icon } from "../Icon/index.js";
|
|
|
27
27
|
import { Spinner } from "../Spinner/index.js";
|
|
28
28
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
29
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
30
|
+
import { useTranslator } from "../i18n/index.js";
|
|
30
31
|
|
|
31
32
|
// =============================================================================
|
|
32
33
|
// Types
|
|
@@ -104,6 +105,7 @@ function getToolCallKey(call) {
|
|
|
104
105
|
function CallRow({
|
|
105
106
|
call
|
|
106
107
|
}) {
|
|
108
|
+
const t = useTranslator();
|
|
107
109
|
const status = call.status ?? 'complete';
|
|
108
110
|
const hasDetail = call.resultDetail != null;
|
|
109
111
|
const [isDetailOpen, setIsDetailOpen] = useState(false);
|
|
@@ -160,7 +162,9 @@ function CallRow({
|
|
|
160
162
|
// users. Rendering it inside the row also folds it into the
|
|
161
163
|
// accessible name of expandable (role="button") rows.
|
|
162
164
|
_jsx(VisuallyHidden, {
|
|
163
|
-
children:
|
|
165
|
+
children: t('@astryx.chatToolCalls.error', {
|
|
166
|
+
message: call.errorMessage ?? ''
|
|
167
|
+
})
|
|
164
168
|
})]
|
|
165
169
|
}), /*#__PURE__*/_jsx("span", {
|
|
166
170
|
...{
|
|
@@ -252,6 +256,7 @@ function CallRow({
|
|
|
252
256
|
* ```
|
|
253
257
|
*/
|
|
254
258
|
export function ChatToolCalls(props) {
|
|
259
|
+
const t = useTranslator();
|
|
255
260
|
const {
|
|
256
261
|
calls,
|
|
257
262
|
label: _customLabel,
|
|
@@ -324,11 +329,13 @@ export function ChatToolCalls(props) {
|
|
|
324
329
|
size: "sm",
|
|
325
330
|
color: "inherit"
|
|
326
331
|
})
|
|
327
|
-
}), /*#__PURE__*/
|
|
332
|
+
}), /*#__PURE__*/_jsx("span", {
|
|
328
333
|
...{
|
|
329
334
|
className: "x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4"
|
|
330
335
|
},
|
|
331
|
-
children:
|
|
336
|
+
children: t('@astryx.chatToolCalls.groupLabel', {
|
|
337
|
+
count: calls.length
|
|
338
|
+
})
|
|
332
339
|
})]
|
|
333
340
|
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
334
341
|
children: [/*#__PURE__*/_jsx("span", {
|
|
@@ -6,14 +6,35 @@
|
|
|
6
6
|
*
|
|
7
7
|
* SYNC: When modified, update these files to stay in sync:
|
|
8
8
|
* - /packages/core/src/Citation/index.ts (exports if types change)
|
|
9
|
+
* - /packages/core/src/Citation/Citation.doc.mjs (props table, features)
|
|
10
|
+
* - /packages/core/src/Citation/Citation.test.tsx (tests for new/changed behavior)
|
|
11
|
+
* - /apps/storybook/stories/Citation.stories.tsx (storybook stories)
|
|
9
12
|
* - /packages/cli/templates/blocks/components/Citation/ (showcase blocks)
|
|
10
13
|
*/
|
|
11
14
|
import type React from 'react';
|
|
15
|
+
import type { ReactNode } from 'react';
|
|
12
16
|
import type { BaseProps } from '../BaseProps';
|
|
13
17
|
export interface CitationSource {
|
|
14
18
|
title?: string;
|
|
15
19
|
url?: string;
|
|
16
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Image URL for a favicon or source logo, rendered as `<img src>` inside the
|
|
22
|
+
* icon circle. This is the idiomatic field for image sources (mirrors
|
|
23
|
+
* `Avatar`/`Thumbnail` `src`). When both `src` and a non-string `icon` are
|
|
24
|
+
* provided, `icon` wins.
|
|
25
|
+
*/
|
|
26
|
+
src?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Source icon shown before the label text (label variant only). Accepts:
|
|
29
|
+
* - a React node / Astryx `<Icon>` / SVG element — rendered as-is, or
|
|
30
|
+
* - a string image URL — rendered as `<img src>` for backward compatibility
|
|
31
|
+
* with callers that passed a favicon URL here.
|
|
32
|
+
*
|
|
33
|
+
* Note: unlike icon slots elsewhere in the system, a bare string is treated
|
|
34
|
+
* as an image URL (not a semantic icon name) to preserve the original
|
|
35
|
+
* favicon behavior. Pass an Astryx `<Icon>` (or other node) for a real icon.
|
|
36
|
+
*/
|
|
37
|
+
icon?: ReactNode;
|
|
17
38
|
}
|
|
18
39
|
export interface CitationProps extends BaseProps<HTMLElement> {
|
|
19
40
|
ref?: React.Ref<HTMLElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Citation.d.ts","sourceRoot":"","sources":["../../src/Citation/Citation.tsx"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"Citation.d.ts","sourceRoot":"","sources":["../../src/Citation/Citation.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAarC,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,aAAc,SAAQ,SAAS,CAAC,WAAW,CAAC;IAC3D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC7B,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC9B;AA2GD,wBAAgB,QAAQ,CAAC,EACvB,GAAG,EACH,MAAM,EACN,MAAM,EACN,OAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,EACL,aAAa,EAAE,MAAM,EACrB,GAAG,IAAI,EACR,EAAE,aAAa,GAAG,KAAK,CAAC,YAAY,CA2FpC;yBArGe,QAAQ"}
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
*
|
|
11
11
|
* SYNC: When modified, update these files to stay in sync:
|
|
12
12
|
* - /packages/core/src/Citation/index.ts (exports if types change)
|
|
13
|
+
* - /packages/core/src/Citation/Citation.doc.mjs (props table, features)
|
|
14
|
+
* - /packages/core/src/Citation/Citation.test.tsx (tests for new/changed behavior)
|
|
15
|
+
* - /apps/storybook/stories/Citation.stories.tsx (storybook stories)
|
|
13
16
|
* - /packages/cli/templates/blocks/components/Citation/ (showcase blocks)
|
|
14
17
|
*/
|
|
15
18
|
import * as stylex from '@stylexjs/stylex';
|
|
@@ -18,6 +21,7 @@ import { colorVars, spacingVars, radiusVars, typeScaleVars, fontWeightVars, bord
|
|
|
18
21
|
import { mergeProps } from "../utils/index.js";
|
|
19
22
|
import { themeProps } from "../utils/themeProps.js";
|
|
20
23
|
import { useTranslator } from "../i18n/index.js";
|
|
24
|
+
import { renderIconSlot } from "../Icon/index.js";
|
|
21
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
26
|
const styles = {
|
|
23
27
|
label: {
|
|
@@ -100,7 +104,15 @@ export function Citation({
|
|
|
100
104
|
const t = useTranslator();
|
|
101
105
|
const title = source.title ?? String(number);
|
|
102
106
|
const href = source.url;
|
|
103
|
-
|
|
107
|
+
|
|
108
|
+
// Resolve the source icon. A non-string `icon` node renders as-is (an Astryx
|
|
109
|
+
// <Icon>, SVG, avatar, etc.). Otherwise fall back to an image URL: `src`, or
|
|
110
|
+
// a legacy string passed to `icon` (back-compat — favicon URLs still render
|
|
111
|
+
// as <img>). The icon is decorative; the accessible name comes solely from
|
|
112
|
+
// the element's aria-label, so nothing is double-announced.
|
|
113
|
+
const iconNode = source.icon != null && typeof source.icon !== 'string' ? source.icon : null;
|
|
114
|
+
const imageSrc = source.src ?? (typeof source.icon === 'string' ? source.icon : undefined);
|
|
115
|
+
const hasIcon = iconNode != null || imageSrc != null;
|
|
104
116
|
const Tag = href ? 'a' : 'span';
|
|
105
117
|
// `doc-noteref` is a reference role — only appropriate on the interactive
|
|
106
118
|
// link form. On a plain (unlinked) span it is not a permitted role
|
|
@@ -146,15 +158,17 @@ export function Citation({
|
|
|
146
158
|
...linkProps,
|
|
147
159
|
...mergeProps(themeProps('citation', {
|
|
148
160
|
variant
|
|
149
|
-
}), stylex.props(styles.label,
|
|
150
|
-
children: [
|
|
161
|
+
}), stylex.props(styles.label, hasIcon && styles.labelWithIcon, href != null && styles.labelHover, href != null && styles.labelInteractive, xstyle), className, style),
|
|
162
|
+
children: [hasIcon && /*#__PURE__*/_jsx("span", {
|
|
163
|
+
"aria-hidden": "true",
|
|
151
164
|
...{
|
|
152
165
|
className: "x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s"
|
|
153
166
|
},
|
|
154
|
-
children:
|
|
155
|
-
|
|
167
|
+
children: iconNode != null ? renderIconSlot(iconNode, {
|
|
168
|
+
size: 'sm'
|
|
169
|
+
}) : /*#__PURE__*/_jsx("img", {
|
|
170
|
+
src: imageSrc,
|
|
156
171
|
alt: "",
|
|
157
|
-
"aria-hidden": "true",
|
|
158
172
|
...{
|
|
159
173
|
className: "x1ad1g3v x9gl9lo"
|
|
160
174
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateTimeInput.d.ts","sourceRoot":"","sources":["../../src/DateTimeInput/DateTimeInput.tsx"],"names":[],"mappings":"AAuCA,OAAO,EAEL,KAAK,WAAW,EAMjB,MAAM,UAA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