@astryxdesign/core 0.1.4-canary.ce93640 → 0.1.4-canary.cfe8ece
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/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +1 -8
- package/dist/Calendar/Calendar.js +1 -5
- package/dist/Card/Card.d.ts +2 -4
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +7 -15
- package/dist/CheckboxInput/CheckboxInput.d.ts +1 -1
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +1 -3
- package/dist/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/ClickableCard/ClickableCard.js +3 -26
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +21 -39
- package/dist/TabList/TabMenu.d.ts.map +1 -1
- package/dist/TabList/TabMenu.js +7 -34
- package/dist/Table/BaseTable.d.ts.map +1 -1
- package/dist/Table/BaseTable.js +1 -2
- package/dist/astryx.css +0 -6
- package/dist/astryx.umd.js +30 -30
- package/dist/astryx.umd.js.map +3 -3
- package/package.json +1 -1
- package/src/Banner/Banner.test.tsx +0 -38
- package/src/Banner/Banner.tsx +1 -8
- package/src/Calendar/Calendar.test.tsx +0 -18
- package/src/Calendar/Calendar.tsx +0 -3
- package/src/Card/Card.tsx +6 -16
- package/src/CheckboxInput/CheckboxInput.test.tsx +4 -71
- package/src/CheckboxInput/CheckboxInput.tsx +0 -2
- package/src/ClickableCard/ClickableCard.tsx +2 -45
- package/src/Field/FieldLabel.test.tsx +2 -2
- package/src/Icon/Icon.test.tsx +20 -20
- package/src/NumberInput/NumberInput.test.tsx +3 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +2 -2
- package/src/PowerSearch/PowerSearch.test.tsx +1 -109
- package/src/PowerSearch/PowerSearch.tsx +16 -37
- package/src/TabList/TabList.test.tsx +1 -185
- package/src/TabList/TabMenu.tsx +9 -45
- package/src/Table/BaseTable.tsx +1 -2
- package/src/TextArea/TextArea.test.tsx +3 -3
- package/src/TextInput/TextInput.test.tsx +3 -3
- package/src/__tests__/TestIcon.tsx +0 -26
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAW,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAsB5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,eAAe,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,IAAI,CAAC;CACf;AAED;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC;AAEvD,MAAM,WAAW,WAAY,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC5D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IACrB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AA2JD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,KAAK,EACL,WAAW,EACX,IAAI,EACJ,aAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAkB,EAClB,iBAAyB,EACzB,QAAQ,EACR,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,sCA0Hb;yBA1Ie,MAAM"}
|
package/dist/Banner/Banner.js
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* - /apps/storybook/stories/Banner.stories.tsx (storybook stories)
|
|
31
31
|
* - /packages/cli/templates/blocks/components/Banner/ (showcase blocks)
|
|
32
32
|
*/
|
|
33
|
-
import {
|
|
33
|
+
import { useState } from 'react';
|
|
34
34
|
import * as stylex from '@stylexjs/stylex';
|
|
35
35
|
import { Button } from "../Button/index.js";
|
|
36
36
|
import { Icon } from "../Icon/index.js";
|
|
@@ -249,11 +249,6 @@ export function Banner({
|
|
|
249
249
|
}) {
|
|
250
250
|
const [isDismissed, setIsDismissed] = useState(false);
|
|
251
251
|
const [isExpanded, setIsExpanded] = useState(defaultIsExpanded);
|
|
252
|
-
// Links the expand/collapse toggle to the content region it shows/hides so
|
|
253
|
-
// assistive tech can move from the button to its controlled content
|
|
254
|
-
// (disclosure pattern). The region is conditionally rendered, so aria-controls
|
|
255
|
-
// below is set only while it's mounted to avoid a dangling reference.
|
|
256
|
-
const contentId = useId();
|
|
257
252
|
const defaultIconName = defaultIconNames[status];
|
|
258
253
|
const role = statusRole[status];
|
|
259
254
|
const iconColor = statusIconColor[status];
|
|
@@ -338,7 +333,6 @@ export function Banner({
|
|
|
338
333
|
}),
|
|
339
334
|
onClick: handleToggleExpand,
|
|
340
335
|
"aria-expanded": isExpanded,
|
|
341
|
-
"aria-controls": showContent ? contentId : undefined,
|
|
342
336
|
isIconOnly: true
|
|
343
337
|
}), isDismissable && /*#__PURE__*/_jsx(Button, {
|
|
344
338
|
variant: "ghost",
|
|
@@ -355,7 +349,6 @@ export function Banner({
|
|
|
355
349
|
})]
|
|
356
350
|
})]
|
|
357
351
|
}), showContent && /*#__PURE__*/_jsx("div", {
|
|
358
|
-
id: contentId,
|
|
359
352
|
...mergeProps(themeProps('banner-content', {
|
|
360
353
|
container,
|
|
361
354
|
status
|
|
@@ -660,11 +660,7 @@ function DayCell({
|
|
|
660
660
|
type: "button",
|
|
661
661
|
"data-date": day.iso,
|
|
662
662
|
"aria-label": plainDateFormat(date, DATE_FORMAT_WITH_WEEKDAY),
|
|
663
|
-
"aria-disabled": state.effectivelyDisabled || undefined
|
|
664
|
-
// Mark today's cell programmatically (APG date-picker pattern), not just
|
|
665
|
-
// visually, so screen-reader users can identify the current date.
|
|
666
|
-
,
|
|
667
|
-
"aria-current": state.isToday ? 'date' : undefined,
|
|
663
|
+
"aria-disabled": state.effectivelyDisabled || undefined,
|
|
668
664
|
disabled: isDisabled
|
|
669
665
|
// Initial roving tab-stop seed; useGridFocus owns it after mount.
|
|
670
666
|
,
|
package/dist/Card/Card.d.ts
CHANGED
|
@@ -21,10 +21,8 @@ import type { BaseProps } from '../BaseProps';
|
|
|
21
21
|
* - Non-semantic palette: `blue | cyan | gray | green | orange | pink | purple | red | teal | yellow`
|
|
22
22
|
* Each uses the corresponding `--color-background-<name>` token (20% opacity tint).
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* keeping content geometry faithful to the spacing scale and identical to the
|
|
27
|
-
* borderless variants. Themes can override borderWidth/borderColor.
|
|
24
|
+
* All variants include a transparent border to prevent layout jitter
|
|
25
|
+
* when switching variants. Themes can override borderWidth/borderColor.
|
|
28
26
|
*/
|
|
29
27
|
export type CardVariant = 'default' | 'transparent' | 'muted' | 'blue' | 'cyan' | 'gray' | 'green' | 'orange' | 'pink' | 'purple' | 'red' | 'teal' | 'yellow';
|
|
30
28
|
export type { SizeValue } from '../utils/types';
|
package/dist/Card/Card.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAYrC,OAAO,KAAK,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/Card/Card.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAYrC,OAAO,KAAK,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAO5C;;;;;;;;;;GAUG;AACH,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,aAAa,GACb,OAAO,GACP,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,MAAM,GACN,QAAQ,CAAC;AAkFb,YAAY,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAE9C,MAAM,WAAW,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC1D,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,IAAI,CAAC,EACnB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,OAAO,EACP,OAAmB,EACnB,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,SAAS,+BAwDX;yBArEe,IAAI"}
|
package/dist/Card/Card.js
CHANGED
|
@@ -34,10 +34,8 @@ import { themeProps } from "../utils/themeProps.js";
|
|
|
34
34
|
* - Non-semantic palette: `blue | cyan | gray | green | orange | pink | purple | red | teal | yellow`
|
|
35
35
|
* Each uses the corresponding `--color-background-<name>` token (20% opacity tint).
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* keeping content geometry faithful to the spacing scale and identical to the
|
|
40
|
-
* borderless variants. Themes can override borderWidth/borderColor.
|
|
37
|
+
* All variants include a transparent border to prevent layout jitter
|
|
38
|
+
* when switching variants. Themes can override borderWidth/borderColor.
|
|
41
39
|
*/
|
|
42
40
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
43
41
|
// =============================================================================
|
|
@@ -49,16 +47,13 @@ const styles = {
|
|
|
49
47
|
"--_card-radius": "x2kkz0m",
|
|
50
48
|
kaIpWk: "x153u1i6",
|
|
51
49
|
kVQacm: "x7giv3",
|
|
50
|
+
kMzoRj: "x1litavf",
|
|
51
|
+
ksu8eU: "x1y0btm7",
|
|
52
|
+
kVAM5u: "x9r1u3d",
|
|
52
53
|
$$css: true
|
|
53
54
|
},
|
|
54
55
|
withBorder: {
|
|
55
|
-
kMzoRj: "x1litavf",
|
|
56
|
-
ksu8eU: "x1y0btm7",
|
|
57
56
|
kVAM5u: "xvy26l8",
|
|
58
|
-
kZCmMZ: "xs19ii7",
|
|
59
|
-
kwRFfy: "x12frdag",
|
|
60
|
-
kLKAdn: "x1nex4ik",
|
|
61
|
-
kGO01o: "xbv1mwh",
|
|
62
57
|
$$css: true
|
|
63
58
|
},
|
|
64
59
|
scrollable: {
|
|
@@ -197,17 +192,14 @@ export function Card({
|
|
|
197
192
|
ref: ref,
|
|
198
193
|
...mergeProps(themeProps('card', {
|
|
199
194
|
variant
|
|
200
|
-
}), stylex.props(styles.card, variantStyles[variant], hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
|
|
195
|
+
}), stylex.props(styles.card, variantStyles[variant], variant === 'default' && styles.withBorder, hasFixedHeight && styles.scrollable, dynamicStyles.sizing(width ?? null, height ?? null, maxWidth ?? null, minHeight ?? null), ...container(useThemeDefault ? {
|
|
201
196
|
useThemeDefault: 'card'
|
|
202
197
|
} : {
|
|
203
198
|
paddingInnerX: paddingToken,
|
|
204
199
|
paddingInnerY: paddingToken,
|
|
205
200
|
paddingOuterX: paddingToken,
|
|
206
201
|
paddingOuterY: paddingToken
|
|
207
|
-
}), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding],
|
|
208
|
-
// Applied after the container padding so the border-inset calc wins;
|
|
209
|
-
// it reads the --container-padding-* vars set above.
|
|
210
|
-
variant === 'default' && styles.withBorder, xstyle), className, style),
|
|
202
|
+
}), !useThemeDefault && effectivePadding !== 4 && paddingStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingInlineVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockStartVarStyles[effectivePadding], !useThemeDefault && effectivePadding !== 4 && containerPaddingBlockEndVarStyles[effectivePadding], xstyle), className, style),
|
|
211
203
|
...props,
|
|
212
204
|
children: children
|
|
213
205
|
});
|
|
@@ -158,7 +158,7 @@ export interface CheckboxInputProps extends Omit<BaseProps, 'onChange'> {
|
|
|
158
158
|
* />
|
|
159
159
|
* ```
|
|
160
160
|
*/
|
|
161
|
-
export declare function CheckboxInput({ label, isLabelHidden, description, onChange, changeAction, isLoading, value, isDisabled, htmlName, disabledMessage, isReadOnly, isOptional, isRequired, size, onFocus, onBlur, labelIcon, status, width, xstyle, className, style, ref,
|
|
161
|
+
export declare function CheckboxInput({ label, isLabelHidden, description, onChange, changeAction, isLoading, value, isDisabled, htmlName, disabledMessage, isReadOnly, isOptional, isRequired, size, onFocus, onBlur, labelIcon, status, width, xstyle, className, style, ref, }: CheckboxInputProps): import("react").JSX.Element;
|
|
162
162
|
export declare namespace CheckboxInput {
|
|
163
163
|
var displayName: string;
|
|
164
164
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GA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MAAM,CAAC;IAClB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACnD;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,
|
|
1
|
+
{"version":3,"file":"CheckboxInput.d.ts","sourceRoot":"","sources":["../../src/CheckboxInput/CheckboxInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC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;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACpD;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACnD;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,IAAW,EACX,OAAO,EACP,MAAM,EACN,SAAS,EACT,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,GACJ,EAAE,kBAAkB,+BAuNpB;yBA/Oe,aAAa"}
|
|
@@ -219,8 +219,7 @@ export function CheckboxInput({
|
|
|
219
219
|
xstyle,
|
|
220
220
|
className,
|
|
221
221
|
style,
|
|
222
|
-
ref
|
|
223
|
-
...rest
|
|
222
|
+
ref
|
|
224
223
|
}) {
|
|
225
224
|
const id = useId();
|
|
226
225
|
const descriptionID = useId();
|
|
@@ -293,7 +292,6 @@ export function CheckboxInput({
|
|
|
293
292
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
294
293
|
...stylex.props(styles.checkboxWrapper, wrapperSizeStyles[size]),
|
|
295
294
|
children: [/*#__PURE__*/_jsx("input", {
|
|
296
|
-
...rest,
|
|
297
295
|
ref: mergeRefs(ref, indeterminateRef, disabledMessageTooltip.positionRef),
|
|
298
296
|
id: id,
|
|
299
297
|
type: "checkbox"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClickableCard.d.ts","sourceRoot":"","sources":["../../src/ClickableCard/ClickableCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,UAAU,EAAU,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ClickableCard.d.ts","sourceRoot":"","sources":["../../src/ClickableCard/ClickableCard.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAC,KAAK,SAAS,EAAE,KAAK,UAAU,EAAU,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAIxE,OAAO,KAAK,EAAC,SAAS,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAG3D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAoE5C,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,yCAAyC;IACzC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAE1B;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAEnD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB,0BAA0B;IAC1B,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,aAAa,EACxB,IAAI,EACJ,MAAM,EACN,UAAkB,EAClB,QAAQ,EACR,OAAO,EACP,OAAmB,EACnB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,EACH,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,aAAa,EACxB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,+BAuEpB;yBAzFe,aAAa"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import { useRef } from 'react';
|
|
31
31
|
import * as stylex from '@stylexjs/stylex';
|
|
32
32
|
import "../theme/tokens.stylex.js";
|
|
33
|
-
import {
|
|
33
|
+
import { colorVars, durationVars, easeVars } from "../theme/tokens.stylex.js";
|
|
34
34
|
import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
35
35
|
import { Card } from "../Card/Card.js";
|
|
36
36
|
import { useClickableContainer } from "../hooks/useClickableContainer.js";
|
|
@@ -59,6 +59,7 @@ const styles = {
|
|
|
59
59
|
k5JduY: "x1s928wv",
|
|
60
60
|
kwXMNM: "x1j6awrg",
|
|
61
61
|
kv0HGH: "xarstr8",
|
|
62
|
+
kUfP38: "x1k48kgn",
|
|
62
63
|
kloYau: "x2q1x1w",
|
|
63
64
|
kRicXK: "x1ywzrc5",
|
|
64
65
|
kPNhGg: "x97pup0",
|
|
@@ -71,25 +72,6 @@ const styles = {
|
|
|
71
72
|
kJs8I2: "x1vwwndy",
|
|
72
73
|
$$css: true
|
|
73
74
|
},
|
|
74
|
-
borderless: {
|
|
75
|
-
kMzoRj: "xc342km",
|
|
76
|
-
$$css: true
|
|
77
|
-
},
|
|
78
|
-
bordered: {
|
|
79
|
-
kVAM5u: "x14i3s5s",
|
|
80
|
-
kZCmMZ: "xs19ii7",
|
|
81
|
-
kwRFfy: "x12frdag",
|
|
82
|
-
kLKAdn: "x1nex4ik",
|
|
83
|
-
kGO01o: "xbv1mwh",
|
|
84
|
-
k1ekBW: "xshfolx",
|
|
85
|
-
kIyJzY: "xuedmi6",
|
|
86
|
-
kAMwcw: "xlr8y92",
|
|
87
|
-
$$css: true
|
|
88
|
-
},
|
|
89
|
-
borderedHoverOnPointer: {
|
|
90
|
-
kbt25U: "x1ww4t2b",
|
|
91
|
-
$$css: true
|
|
92
|
-
},
|
|
93
75
|
disabled: {
|
|
94
76
|
kkrTdU: "x1h6gzvc",
|
|
95
77
|
kSiTet: "xbyyjgo",
|
|
@@ -175,11 +157,6 @@ export function ClickableCard({
|
|
|
175
157
|
onMouseUpProp(e);
|
|
176
158
|
} : onMouseUp;
|
|
177
159
|
const isLink = href != null;
|
|
178
|
-
|
|
179
|
-
// Only the `default` variant has a visible border. Card draws a transparent
|
|
180
|
-
// 1px border on every other variant purely to avoid layout jitter; we drop
|
|
181
|
-
// it here so the hover overlay covers the full box with no untinted ring.
|
|
182
|
-
const hasBorder = variant === 'default';
|
|
183
160
|
return /*#__PURE__*/_jsxs(Card, {
|
|
184
161
|
ref: mergeRefs(ref, containerRef),
|
|
185
162
|
width: width,
|
|
@@ -193,7 +170,7 @@ export function ClickableCard({
|
|
|
193
170
|
className: classNameProp,
|
|
194
171
|
style
|
|
195
172
|
}),
|
|
196
|
-
xstyle: [styles.interactive, styles.focusWithin,
|
|
173
|
+
xstyle: [styles.interactive, styles.focusWithin, !isDisabled && styles.overlay, !isDisabled && styles.hoverOnPointer, isDisabled && styles.disabled, xstyleProp],
|
|
197
174
|
onClick: !isDisabled ? onClick : undefined,
|
|
198
175
|
onMouseUp: !isDisabled ? handleMouseUp : undefined,
|
|
199
176
|
...props,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PowerSearch.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PowerSearch.d.ts","sourceRoot":"","sources":["../../src/PowerSearch/PowerSearch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,EAMZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,cAAc,CAAC;AAMtB,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAe1C,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAIjB,qBAAqB,EACrB,iBAAiB,EAIjB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAyQjB,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAC5C,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,CACX;IACC,yEAAyE;IACzE,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gCAAgC;IAChC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC1C,kCAAkC;IAClC,QAAQ,EAAE,CACR,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACzC,UAAU,EAAE,qBAAqB,EACjC,KAAK,EAAE,MAAM,KACV,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,CAAC,CAAC;IAChC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACzC;;;OAGG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;OAGG;IACH,UAAU,CAAC,EAAE,qBAAqB,CAAC;CACpC;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EAAE,UAAU,EAClB,OAAO,EACP,QAAQ,EACR,KAAgB,EAChB,aAAoB,EACpB,WAAyB,EACzB,YAAoB,EACpB,QAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,cAAmB,EACnB,sBAAgC,EAChC,UAAU,EACV,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,GAAG,EACH,SAAS,EACT,IAAI,EAAE,QAAQ,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EACN,SAAS,EACT,KAAK,EACL,UAAU,EAAE,kBAAkB,GAC/B,EAAE,gBAAgB,qBA8dlB;yBA5fe,WAAW"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* - /packages/core/src/PowerSearch/index.ts
|
|
14
14
|
* - /packages/cli/templates/blocks/components/PowerSearch/ (showcase blocks)
|
|
15
15
|
*/
|
|
16
|
-
import React, { useCallback,
|
|
16
|
+
import React, { useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
17
17
|
import * as stylex from '@stylexjs/stylex';
|
|
18
18
|
import { Tokenizer } from "../Tokenizer/index.js";
|
|
19
19
|
import { TypeaheadItem } from "../Typeahead/TypeaheadItem.js";
|
|
@@ -22,7 +22,6 @@ import { Avatar } from "../Avatar/index.js";
|
|
|
22
22
|
import { layerAnimations } from "../Layer/layerAnimations.stylex.js";
|
|
23
23
|
import { Icon } from "../Icon/index.js";
|
|
24
24
|
import { usePopover } from "../Popover/usePopover.js";
|
|
25
|
-
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
26
25
|
import "../theme/tokens.stylex.js";
|
|
27
26
|
import { spacingVars, colorVars, typeScaleVars, fontWeightVars } from "../theme/tokens.stylex.js";
|
|
28
27
|
import { mergeRefs } from "../utils/index.js";
|
|
@@ -698,51 +697,34 @@ export function PowerSearch({
|
|
|
698
697
|
}, popoverKey);
|
|
699
698
|
}, [popoverPartialFilter, popoverState, EditorOverride, configProp, config, handlePopoverSave, handlePopoverCancel, popoverSaveButtonLabel, isReadOnly]);
|
|
700
699
|
|
|
701
|
-
// Plain-text form of the result count, shared by the visible label and the
|
|
702
|
-
// screen-reader announcement so the two never drift.
|
|
703
|
-
const resultCountText = useMemo(() => {
|
|
704
|
-
if (resultCount == null) {
|
|
705
|
-
return null;
|
|
706
|
-
}
|
|
707
|
-
if (typeof resultCount === 'number') {
|
|
708
|
-
const formatted = new Intl.NumberFormat().format(resultCount);
|
|
709
|
-
return `${formatted} ${resultCount === 1 ? 'result' : 'results'}`;
|
|
710
|
-
}
|
|
711
|
-
return resultCount;
|
|
712
|
-
}, [resultCount]);
|
|
713
|
-
|
|
714
|
-
// Announce result-count changes to screen readers through a polite live
|
|
715
|
-
// region, mirroring the way Typeahead announces its dropdown result count.
|
|
716
|
-
// The count is otherwise only shown visually and stays silent to assistive
|
|
717
|
-
// tech. Skip the first run so the count already present on mount isn't
|
|
718
|
-
// announced unprompted — only user-driven changes are spoken.
|
|
719
|
-
const announce = useAnnounce();
|
|
720
|
-
const hasMountedRef = useRef(false);
|
|
721
|
-
useEffect(() => {
|
|
722
|
-
if (!hasMountedRef.current) {
|
|
723
|
-
hasMountedRef.current = true;
|
|
724
|
-
return;
|
|
725
|
-
}
|
|
726
|
-
if (resultCountText != null) {
|
|
727
|
-
announce(resultCountText);
|
|
728
|
-
}
|
|
729
|
-
}, [resultCountText, announce]);
|
|
730
|
-
|
|
731
700
|
// Build combined endContent from resultCount + endContent props
|
|
732
701
|
const combinedEndContent = useMemo(() => {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
702
|
+
let resultCountNode = null;
|
|
703
|
+
if (resultCount != null) {
|
|
704
|
+
if (typeof resultCount === 'number') {
|
|
705
|
+
const formatted = new Intl.NumberFormat().format(resultCount);
|
|
706
|
+
resultCountNode = /*#__PURE__*/_jsxs("span", {
|
|
707
|
+
...{
|
|
708
|
+
className: "x141an7d x1ltkj2j xv1l7n4 xuxw1ft"
|
|
709
|
+
},
|
|
710
|
+
children: [formatted, " ", resultCount === 1 ? 'result' : 'results']
|
|
711
|
+
});
|
|
712
|
+
} else {
|
|
713
|
+
resultCountNode = /*#__PURE__*/_jsx("span", {
|
|
714
|
+
...{
|
|
715
|
+
className: "x141an7d x1ltkj2j xv1l7n4 xuxw1ft"
|
|
716
|
+
},
|
|
717
|
+
children: resultCount
|
|
718
|
+
});
|
|
719
|
+
}
|
|
720
|
+
}
|
|
739
721
|
if (resultCountNode && endContent) {
|
|
740
722
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
741
723
|
children: [resultCountNode, endContent]
|
|
742
724
|
});
|
|
743
725
|
}
|
|
744
726
|
return resultCountNode || endContent || undefined;
|
|
745
|
-
}, [
|
|
727
|
+
}, [resultCount, endContent]);
|
|
746
728
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
747
729
|
children: [/*#__PURE__*/_jsx("div", {
|
|
748
730
|
ref: mergeRefs(ref, popover.triggerRef),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabMenu.d.ts","sourceRoot":"","sources":["../../src/TabList/TabMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TabMenu.d.ts","sourceRoot":"","sources":["../../src/TabList/TabMenu.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,EAAqB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAiBtD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC7B;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CACxC,SAAS,CAAC,iBAAiB,CAAC,EAC5B,QAAQ,GAAG,WAAW,GAAG,OAAO,CACjC;IACC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AA8KD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EACtB,GAAG,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,YAAY,qBAiJd;yBAxJe,OAAO"}
|
package/dist/TabList/TabMenu.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* - /packages/core/src/TabList/TabList.test.tsx
|
|
16
16
|
* - /packages/cli/templates/blocks/components/TabList/ (showcase blocks)
|
|
17
17
|
*/
|
|
18
|
-
import React, { useCallback, useId
|
|
18
|
+
import React, { useCallback, useId } from 'react';
|
|
19
19
|
import * as stylex from '@stylexjs/stylex';
|
|
20
20
|
import { Icon } from "../Icon/index.js";
|
|
21
21
|
import { renderIconSlot } from "../Icon/index.js";
|
|
@@ -135,31 +135,18 @@ export function TabMenu({
|
|
|
135
135
|
}) {
|
|
136
136
|
const tabListCtx = useTabListContext();
|
|
137
137
|
const menuId = useId();
|
|
138
|
-
const buttonRef = useRef(null);
|
|
139
138
|
const popover = usePopover({
|
|
140
139
|
hasLightDismiss: true,
|
|
141
140
|
hasCloseButton: false,
|
|
142
141
|
hasAutoFocus: false,
|
|
143
142
|
// The popup's own role="menu" is the exposed semantics; a modal dialog
|
|
144
143
|
// wrapper would announce an unnamed dialog around the menu.
|
|
145
|
-
role: 'none'
|
|
146
|
-
// Return focus to the trigger when the menu closes (Escape, Tab, select,
|
|
147
|
-
// or light dismiss) so keyboard focus is never dropped to <body>.
|
|
148
|
-
onHide: useCallback(() => {
|
|
149
|
-
buttonRef.current?.focus();
|
|
150
|
-
}, [])
|
|
144
|
+
role: 'none'
|
|
151
145
|
});
|
|
152
|
-
|
|
153
|
-
// The overflow menu is a composite widget: a single roving tab stop with
|
|
154
|
-
// arrow-key navigation between items, per the APG menu pattern. The hook owns
|
|
155
|
-
// item tabindex — items render tabIndex={-1} and exactly one is promoted to 0.
|
|
156
146
|
const {
|
|
157
147
|
listRef,
|
|
158
|
-
handleKeyDown: handleListKeyDown
|
|
159
|
-
handleFocus,
|
|
160
|
-
focusFirst
|
|
148
|
+
handleKeyDown: handleListKeyDown
|
|
161
149
|
} = useListFocus({
|
|
162
|
-
hasRovingTabIndex: true,
|
|
163
150
|
onEscape: () => popover.hide()
|
|
164
151
|
});
|
|
165
152
|
const handleToggle = useCallback(() => {
|
|
@@ -167,21 +154,8 @@ export function TabMenu({
|
|
|
167
154
|
popover.hide();
|
|
168
155
|
} else {
|
|
169
156
|
popover.show();
|
|
170
|
-
// Move focus into the menu on open so arrow navigation works and the
|
|
171
|
-
// roving tab stop lands on a real item (APG menu-button focus-on-open).
|
|
172
|
-
requestAnimationFrame(() => focusFirst());
|
|
173
|
-
}
|
|
174
|
-
}, [popover, focusFirst]);
|
|
175
|
-
const handleMenuKeyDown = useCallback(e => {
|
|
176
|
-
// APG menu-button: Tab leaves the menu rather than walking its items.
|
|
177
|
-
// Close and let onHide return focus to the trigger, from which the
|
|
178
|
-
// browser's default Tab continues to the next element.
|
|
179
|
-
if (e.key === 'Tab') {
|
|
180
|
-
popover.hide();
|
|
181
|
-
return;
|
|
182
157
|
}
|
|
183
|
-
|
|
184
|
-
}, [handleListKeyDown, popover]);
|
|
158
|
+
}, [popover]);
|
|
185
159
|
const selectedOption = options.find(o => o.value === tabListCtx.value);
|
|
186
160
|
const triggerLabel = selectedOption?.label ?? label;
|
|
187
161
|
const hasSelectedOption = selectedOption != null;
|
|
@@ -190,7 +164,7 @@ export function TabMenu({
|
|
|
190
164
|
tabListCtx.onChange(value);
|
|
191
165
|
popover.hide();
|
|
192
166
|
}, [tabListCtx, popover]);
|
|
193
|
-
const setButtonRef = mergeRefs(popover.triggerRef,
|
|
167
|
+
const setButtonRef = mergeRefs(popover.triggerRef, ref);
|
|
194
168
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
195
169
|
children: [/*#__PURE__*/_jsxs("button", {
|
|
196
170
|
ref: setButtonRef,
|
|
@@ -248,8 +222,7 @@ export function TabMenu({
|
|
|
248
222
|
id: menuId,
|
|
249
223
|
role: "menu",
|
|
250
224
|
"aria-label": label,
|
|
251
|
-
onKeyDown:
|
|
252
|
-
onFocus: handleFocus,
|
|
225
|
+
onKeyDown: handleListKeyDown,
|
|
253
226
|
...mergeProps(themeProps('tab-menu-dropdown'), {
|
|
254
227
|
className: "x78zum5 xdt5ytf x1lsbc85 xu0wf1k x7a5moj"
|
|
255
228
|
}),
|
|
@@ -263,7 +236,7 @@ export function TabMenu({
|
|
|
263
236
|
const isSelected = tabListCtx.value === option.value;
|
|
264
237
|
return /*#__PURE__*/_jsxs("div", {
|
|
265
238
|
role: "menuitem",
|
|
266
|
-
tabIndex:
|
|
239
|
+
tabIndex: 0,
|
|
267
240
|
"aria-current": isSelected ? 'true' : undefined,
|
|
268
241
|
onClick: () => handleSelect(option.value),
|
|
269
242
|
onKeyDown: e => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAkB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseTable.d.ts","sourceRoot":"","sources":["../../src/Table/BaseTable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAe,KAAK,YAAY,EAAkB,KAAK,GAAG,EAAC,MAAM,OAAO,CAAC;AAGhF,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,SAAS,CAAC;AAyiBjB;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS,EAAqB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC3E,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAC,KACrD,YAAY,CAAC"}
|
package/dist/Table/BaseTable.js
CHANGED
|
@@ -199,8 +199,7 @@ function areRowPropsEqual(prevProps, nextProps) {
|
|
|
199
199
|
return true;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
// Different object reference - compare values
|
|
203
|
-
// one-level shallow compare: nested fields rely on reference identity.
|
|
202
|
+
// Different object reference - compare values
|
|
204
203
|
const prevItem = prevProps.item;
|
|
205
204
|
const nextItem = nextProps.item;
|
|
206
205
|
const keys = Object.keys(nextItem);
|
package/dist/astryx.css
CHANGED
|
@@ -439,7 +439,6 @@
|
|
|
439
439
|
@media (hover: hover){.x1jtjlen.x1jtjlen.x1jtjlen:where(.x1tspnpo:hover *):not(#\#):not(#\#){border-color:color-mix(in srgb,var(--color-border-emphasized),var(--color-tint-hover) 20%)}}
|
|
440
440
|
@media (hover: hover){.x70talc.x70talc.x70talc:where(.xklqth5:hover *):not(#\#):not(#\#){border-color:color-mix(in srgb,var(--color-border-emphasized),var(--color-tint-hover) 20%)}}
|
|
441
441
|
@media (hover: hover){.xmt8yqp.xmt8yqp.xmt8yqp:where(.x1tspnpo:hover *):not(#\#):not(#\#){border-color:var(--color-border)}}
|
|
442
|
-
@media (hover: hover){.x1ww4t2b.x1ww4t2b:hover:not(#\#):not(#\#){border-color:var(--color-border-emphasized)}}
|
|
443
442
|
@media (hover: hover){.x4ohgrr.x4ohgrr:hover:not(#\#):not(#\#){text-decoration:underline}}
|
|
444
443
|
.x67t5t6:not(#\#):not(#\#):not(#\#){-webkit-backdrop-filter:blur(12px)}
|
|
445
444
|
.x1ua5tub:not(#\#):not(#\#):not(#\#){-webkit-box-orient:vertical}
|
|
@@ -848,7 +847,6 @@
|
|
|
848
847
|
.x1mzt3pk:not(#\#):not(#\#):not(#\#){overflow-wrap:break-word}
|
|
849
848
|
.x1h4wwuj:not(#\#):not(#\#):not(#\#){overflow-wrap:normal}
|
|
850
849
|
.xyri2b:not(#\#):not(#\#):not(#\#){padding-inline-end:0}
|
|
851
|
-
.x12frdag:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--container-padding-inline-end) - var(--border-width))}
|
|
852
850
|
.x64h4k7:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--container-padding-inline-end)}
|
|
853
851
|
.x1peupej:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
854
852
|
.xpc6k2p:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-outer-x,var(--spacing-4))}
|
|
@@ -865,7 +863,6 @@
|
|
|
865
863
|
.x1q91b2g:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--spacing-8)}
|
|
866
864
|
.x1c1uobl:not(#\#):not(#\#):not(#\#){padding-inline-start:0}
|
|
867
865
|
.x1f43n9v:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(16px + var(--spacing-1-5))}
|
|
868
|
-
.xs19ii7:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--container-padding-inline-start) - var(--border-width))}
|
|
869
866
|
.x2a0j69:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
|
|
870
867
|
.x1c35znw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--container-padding-inline-start)}
|
|
871
868
|
.xwjyata:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
@@ -982,7 +979,6 @@
|
|
|
982
979
|
.x12qzo2w:not(#\#):not(#\#):not(#\#){transition-property:background-image}
|
|
983
980
|
.x1tv3a4w:not(#\#):not(#\#):not(#\#){transition-property:border-color,box-shadow,background-color}
|
|
984
981
|
.x12zzom9:not(#\#):not(#\#):not(#\#){transition-property:border-color,box-shadow}
|
|
985
|
-
.xshfolx:not(#\#):not(#\#):not(#\#){transition-property:border-color}
|
|
986
982
|
.x16mfhj0:not(#\#):not(#\#):not(#\#){transition-property:box-shadow,border-color}
|
|
987
983
|
.x1vix5yk:not(#\#):not(#\#):not(#\#){transition-property:color,background-color,box-shadow}
|
|
988
984
|
.x1mpt4pi:not(#\#):not(#\#):not(#\#){transition-property:color,text-decoration}
|
|
@@ -1343,7 +1339,6 @@
|
|
|
1343
1339
|
.x18d9i69:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:0}
|
|
1344
1340
|
.x1j85h84:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:1px}
|
|
1345
1341
|
.x9jihrk:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--_chat-composer-padding) + var(--_chat-composer-radius))}
|
|
1346
|
-
.xbv1mwh:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--container-padding-block-end) - var(--border-width))}
|
|
1347
1342
|
.xxbfulo:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--spacing-3) + var(--radius-chat))}
|
|
1348
1343
|
.xvpcij2:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--_chat-composer-padding)}
|
|
1349
1344
|
.xc1wllq:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--container-padding-block-end)}
|
|
@@ -1363,7 +1358,6 @@
|
|
|
1363
1358
|
.xexx8yu:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:0}
|
|
1364
1359
|
.x1htvmrp:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--_chat-composer-padding) + var(--_chat-composer-radius))}
|
|
1365
1360
|
.x1enrzb7:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--border-width) + var(--spacing-1))}
|
|
1366
|
-
.x1nex4ik:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--container-padding-block-start) - var(--border-width))}
|
|
1367
1361
|
.x1ak3mig:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-1-5) + var(--spacing-2))}
|
|
1368
1362
|
.x2gtn7z:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--_chat-composer-padding)}
|
|
1369
1363
|
.x14m0hsi:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--container-padding-block-start)}
|