@capra/core 1.5.3 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +42 -78
- package/dist/index.d.cts +8 -2
- package/dist/index.d.mts +8 -2
- package/dist/index.mjs +42 -78
- package/dist/style.css +62 -32
- package/docs/conventions--docs.md +186 -0
- package/docs/core-alert--design.md +110 -0
- package/docs/core-alert--usage.md +13 -0
- package/docs/core-anchor--design.md +39 -0
- package/docs/core-anchor--usage.md +39 -0
- package/docs/core-autocompletefield--design.md +91 -0
- package/docs/core-autocompletefield--usage.md +18 -0
- package/docs/core-badge--design.md +70 -0
- package/docs/core-badge--usage.md +13 -0
- package/docs/core-breadcrumbs--design.md +65 -0
- package/docs/core-breadcrumbs--usage.md +16 -0
- package/docs/core-button--design.md +97 -0
- package/docs/core-button--usage.md +17 -0
- package/docs/core-buttonlink--design.md +7 -0
- package/docs/core-buttonlink--usage.md +24 -0
- package/docs/core-card--design.md +100 -0
- package/docs/core-card--usage.md +5 -0
- package/docs/core-checkbox--design.md +66 -0
- package/docs/core-checkbox--usage.md +34 -0
- package/docs/core-collapse--design.md +28 -0
- package/docs/core-collapse--usage.md +20 -0
- package/docs/core-datepickerfield--design.md +71 -0
- package/docs/core-datepickerfield--usage.md +57 -0
- package/docs/core-daterangepickerfield--design.md +76 -0
- package/docs/core-daterangepickerfield--usage.md +62 -0
- package/docs/core-divider--design.md +35 -0
- package/docs/core-divider--usage.md +8 -0
- package/docs/core-drawer--design.md +87 -0
- package/docs/core-drawer--usage.md +9 -0
- package/docs/core-emptystate--design.md +45 -0
- package/docs/core-emptystate--usage.md +13 -0
- package/docs/core-helpertext--design.md +30 -0
- package/docs/core-helpertext--usage.md +11 -0
- package/docs/core-iconbutton--design.md +87 -0
- package/docs/core-iconbutton--usage.md +15 -0
- package/docs/core-inputrow--design.md +85 -0
- package/docs/core-inputrow--usage.md +6 -0
- package/docs/core-label--design.md +27 -0
- package/docs/core-label--usage.md +17 -0
- package/docs/core-link--design.md +58 -0
- package/docs/core-link--usage.md +16 -0
- package/docs/core-listitem--design.md +70 -0
- package/docs/core-listitem--usage.md +6 -0
- package/docs/core-menu--design.md +106 -0
- package/docs/core-menu--usage.md +16 -0
- package/docs/core-modal--design.md +39 -0
- package/docs/core-modal--usage.md +11 -0
- package/docs/core-numberfield--design.md +12 -0
- package/docs/core-numberfield--usage.md +14 -0
- package/docs/core-pagination--design.md +30 -0
- package/docs/core-pagination--usage.md +13 -0
- package/docs/core-passwordfield--design.md +7 -0
- package/docs/core-passwordfield--usage.md +3 -0
- package/docs/core-pill--design.md +94 -0
- package/docs/core-pill--usage.md +10 -0
- package/docs/core-popover--design.md +25 -0
- package/docs/core-popover--usage.md +8 -0
- package/docs/core-radio--design.md +39 -0
- package/docs/core-radio--usage.md +8 -0
- package/docs/core-radiogroup--design.md +5 -0
- package/docs/core-radiogroup--usage.md +12 -0
- package/docs/core-radiotile--design.md +5 -0
- package/docs/core-radiotile--usage.md +10 -0
- package/docs/core-ribbon--design.md +39 -0
- package/docs/core-ribbon--usage.md +12 -0
- package/docs/core-skeleton--design.md +88 -0
- package/docs/core-skeleton--usage.md +13 -0
- package/docs/core-skeletongroup--design.md +50 -0
- package/docs/core-skeletongroup--usage.md +10 -0
- package/docs/core-spinner--design.md +99 -0
- package/docs/core-spinner--usage.md +11 -0
- package/docs/core-switch--design.md +145 -0
- package/docs/core-switch--usage.md +8 -0
- package/docs/core-tabnav--design.md +77 -0
- package/docs/core-tabnav--usage.md +63 -0
- package/docs/core-tag--design.md +21 -0
- package/docs/core-tag--usage.md +11 -0
- package/docs/core-text--design.md +32 -0
- package/docs/core-text--usage.md +10 -0
- package/docs/core-textarea--design.md +74 -0
- package/docs/core-textarea--usage.md +18 -0
- package/docs/core-textfield--design.md +81 -0
- package/docs/core-textfield--usage.md +12 -0
- package/docs/core-textinput--design.md +72 -0
- package/docs/core-textinput--usage.md +19 -0
- package/docs/core-toast--design.md +100 -0
- package/docs/core-toast--usage.md +11 -0
- package/docs/core-tooltip--design.md +61 -0
- package/docs/core-tooltip--usage.md +48 -0
- package/docs/core-topnav--design.md +75 -0
- package/docs/core-topnav--usage.md +6 -0
- package/docs/core-verticalnavigation--design.md +31 -0
- package/docs/core-verticalnavigation--usage.md +17 -0
- package/docs/core-visuallyhidden--design.md +87 -0
- package/docs/core-visuallyhidden--usage.md +35 -0
- package/docs/history-changelogs-capra-core--docs.md +60 -0
- package/docs/index.md +110 -0
- package/docs/using-capra--docs.md +39 -0
- package/package.json +5 -4
package/dist/index.cjs
CHANGED
|
@@ -270,12 +270,12 @@ Label$1.displayName = "Label";
|
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/components/TextInput/TextInput.module.css
|
|
272
272
|
var TextInput_module_default = {
|
|
273
|
-
"errorIndicator": "capra-TextInput-module-
|
|
274
|
-
"input": "capra-TextInput-module-
|
|
275
|
-
"leadingSlot": "capra-TextInput-module-
|
|
276
|
-
"trailingSlot": "capra-TextInput-module-
|
|
277
|
-
"warningIndicator": "capra-TextInput-module-
|
|
278
|
-
"wrapper": "capra-TextInput-module-
|
|
273
|
+
"errorIndicator": "capra-TextInput-module-pTHfnG-errorIndicator",
|
|
274
|
+
"input": "capra-TextInput-module-pTHfnG-input",
|
|
275
|
+
"leadingSlot": "capra-TextInput-module-pTHfnG-leadingSlot",
|
|
276
|
+
"trailingSlot": "capra-TextInput-module-pTHfnG-trailingSlot",
|
|
277
|
+
"warningIndicator": "capra-TextInput-module-pTHfnG-warningIndicator",
|
|
278
|
+
"wrapper": "capra-TextInput-module-pTHfnG-wrapper"
|
|
279
279
|
};
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/components/TextInput/TextInput.tsx
|
|
@@ -2733,23 +2733,23 @@ TextArea.displayName = "TextArea";
|
|
|
2733
2733
|
//#endregion
|
|
2734
2734
|
//#region src/components/Modal/Modal.module.css
|
|
2735
2735
|
var Modal_module_default = {
|
|
2736
|
-
"confirmationActions": "capra-Modal-module-
|
|
2737
|
-
"confirmationBody": "capra-Modal-module-
|
|
2738
|
-
"confirmationIcon": "capra-Modal-module-
|
|
2739
|
-
"confirmationLayout": "capra-Modal-module-
|
|
2740
|
-
"confirmationMessage": "capra-Modal-module-
|
|
2741
|
-
"confirmationSurface": "capra-Modal-module-
|
|
2742
|
-
"content": "capra-Modal-module-
|
|
2743
|
-
"contentShow": "capra-Modal-module-
|
|
2744
|
-
"expandedFooterLayout": "capra-Modal-module-
|
|
2745
|
-
"expandedTitleLayout": "capra-Modal-module-
|
|
2746
|
-
"footer": "capra-Modal-module-
|
|
2747
|
-
"footerActions": "capra-Modal-module-
|
|
2748
|
-
"header": "capra-Modal-module-
|
|
2749
|
-
"headerLeading": "capra-Modal-module-
|
|
2750
|
-
"overlay": "capra-Modal-module-
|
|
2751
|
-
"overlayShow": "capra-Modal-module-
|
|
2752
|
-
"surface": "capra-Modal-module-
|
|
2736
|
+
"confirmationActions": "capra-Modal-module-j-u8iq-confirmationActions",
|
|
2737
|
+
"confirmationBody": "capra-Modal-module-j-u8iq-confirmationBody",
|
|
2738
|
+
"confirmationIcon": "capra-Modal-module-j-u8iq-confirmationIcon",
|
|
2739
|
+
"confirmationLayout": "capra-Modal-module-j-u8iq-confirmationLayout",
|
|
2740
|
+
"confirmationMessage": "capra-Modal-module-j-u8iq-confirmationMessage",
|
|
2741
|
+
"confirmationSurface": "capra-Modal-module-j-u8iq-confirmationSurface",
|
|
2742
|
+
"content": "capra-Modal-module-j-u8iq-content",
|
|
2743
|
+
"contentShow": "capra-Modal-module-j-u8iq-contentShow",
|
|
2744
|
+
"expandedFooterLayout": "capra-Modal-module-j-u8iq-expandedFooterLayout",
|
|
2745
|
+
"expandedTitleLayout": "capra-Modal-module-j-u8iq-expandedTitleLayout",
|
|
2746
|
+
"footer": "capra-Modal-module-j-u8iq-footer",
|
|
2747
|
+
"footerActions": "capra-Modal-module-j-u8iq-footerActions",
|
|
2748
|
+
"header": "capra-Modal-module-j-u8iq-header",
|
|
2749
|
+
"headerLeading": "capra-Modal-module-j-u8iq-headerLeading",
|
|
2750
|
+
"overlay": "capra-Modal-module-j-u8iq-overlay",
|
|
2751
|
+
"overlayShow": "capra-Modal-module-j-u8iq-overlayShow",
|
|
2752
|
+
"surface": "capra-Modal-module-j-u8iq-surface"
|
|
2753
2753
|
};
|
|
2754
2754
|
//#endregion
|
|
2755
2755
|
//#region src/components/Text/Heading.tsx
|
|
@@ -4196,7 +4196,7 @@ const MenuSection = ({ children, "aria-label": ariaLabel, "aria-labelledby": ari
|
|
|
4196
4196
|
}, resolvedChildren));
|
|
4197
4197
|
};
|
|
4198
4198
|
MenuSection.displayName = "Menu.Section";
|
|
4199
|
-
const MenuItem = ({ as, label, description, ariaLabel, href, disabled = false, active = false, variant = "default", icon, indent: indentProp, shortcut, parent = false, onClick, FORCE__className, children, ...rest }) => {
|
|
4199
|
+
const MenuItem = ({ as: Component, label, description, ariaLabel, href, disabled = false, active = false, variant = "default", icon, indent: indentProp, shortcut, parent = false, onPress, onClick, FORCE__className, children, ...rest }) => {
|
|
4200
4200
|
const indentFromSectionHeader = react.useContext(MenuSectionIndentContext);
|
|
4201
4201
|
const indent = indentProp !== void 0 ? indentProp : indentFromSectionHeader ? true : false;
|
|
4202
4202
|
const labelContent = children ?? label;
|
|
@@ -4210,59 +4210,27 @@ const MenuItem = ({ as, label, description, ariaLabel, href, disabled = false, a
|
|
|
4210
4210
|
size: "xs",
|
|
4211
4211
|
"aria-hidden": true
|
|
4212
4212
|
}) : null])));
|
|
4213
|
-
const
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
};
|
|
4220
|
-
/** React Aria runs menu activation through `onAction` (pointer + Enter/Space), not only `onPress`. */
|
|
4221
|
-
const handleAction = () => {
|
|
4222
|
-
if (!disabled && onClick) onClick({});
|
|
4223
|
-
};
|
|
4224
|
-
if (as) {
|
|
4225
|
-
const Component = as;
|
|
4226
|
-
return /* @__PURE__ */ react.createElement(react_aria_components.MenuItem, {
|
|
4227
|
-
isDisabled: disabled,
|
|
4228
|
-
textValue,
|
|
4229
|
-
"aria-label": ariaLabel,
|
|
4230
|
-
"aria-current": active ? "page" : void 0,
|
|
4231
|
-
className: itemClassName,
|
|
4232
|
-
...menuItemDataAttributes,
|
|
4233
|
-
render: (domProps) => /* @__PURE__ */ react.createElement(Component, {
|
|
4234
|
-
...domProps,
|
|
4235
|
-
...rest
|
|
4236
|
-
}),
|
|
4237
|
-
onAction: handleAction
|
|
4238
|
-
}, /* @__PURE__ */ react.createElement(ListItem, {
|
|
4239
|
-
as: "div",
|
|
4240
|
-
role: "presentation",
|
|
4241
|
-
FORCE__className: Menu_module_default.menuItemListItemShell
|
|
4242
|
-
}, listItemContent));
|
|
4243
|
-
}
|
|
4244
|
-
if (Boolean(href) && !disabled) return /* @__PURE__ */ react.createElement(react_aria_components.MenuItem, {
|
|
4245
|
-
href,
|
|
4246
|
-
isDisabled: disabled,
|
|
4247
|
-
textValue,
|
|
4248
|
-
"aria-label": ariaLabel,
|
|
4249
|
-
"aria-current": active ? "page" : void 0,
|
|
4250
|
-
className: itemClassName,
|
|
4251
|
-
...menuItemDataAttributes,
|
|
4252
|
-
onAction: handleAction
|
|
4253
|
-
}, /* @__PURE__ */ react.createElement(ListItem, {
|
|
4254
|
-
as: "div",
|
|
4255
|
-
role: "presentation",
|
|
4256
|
-
FORCE__className: Menu_module_default.menuItemListItemShell
|
|
4257
|
-
}, listItemContent));
|
|
4213
|
+
const render = Component ? (domProps) => {
|
|
4214
|
+
const Element = Component;
|
|
4215
|
+
return /* @__PURE__ */ react.createElement(Element, {
|
|
4216
|
+
...domProps,
|
|
4217
|
+
...rest
|
|
4218
|
+
});
|
|
4219
|
+
} : void 0;
|
|
4258
4220
|
return /* @__PURE__ */ react.createElement(react_aria_components.MenuItem, {
|
|
4221
|
+
href,
|
|
4259
4222
|
isDisabled: disabled,
|
|
4260
4223
|
textValue,
|
|
4261
4224
|
"aria-label": ariaLabel,
|
|
4262
4225
|
"aria-current": active ? "page" : void 0,
|
|
4263
|
-
className:
|
|
4264
|
-
|
|
4265
|
-
|
|
4226
|
+
className: clsx(Menu_module_default.menuItem, FORCE__className),
|
|
4227
|
+
"data-variant": variant,
|
|
4228
|
+
"data-active": active || void 0,
|
|
4229
|
+
"data-indent": indent || void 0,
|
|
4230
|
+
"data-has-description": showDescription || void 0,
|
|
4231
|
+
render,
|
|
4232
|
+
onClick,
|
|
4233
|
+
onPress
|
|
4266
4234
|
}, /* @__PURE__ */ react.createElement(ListItem, {
|
|
4267
4235
|
as: "div",
|
|
4268
4236
|
role: "presentation",
|
|
@@ -4294,10 +4262,9 @@ const MenuSubmenu = ({ label, children, itemHoverAppearance = "default", itemAct
|
|
|
4294
4262
|
size: "xs",
|
|
4295
4263
|
"aria-hidden": true
|
|
4296
4264
|
}))));
|
|
4297
|
-
const triggerClassName = clsx(Menu_module_default.menuItem, classNameOverride);
|
|
4298
4265
|
return /* @__PURE__ */ react.createElement(react_aria_components.SubmenuTrigger, { delay }, /* @__PURE__ */ react.createElement(react_aria_components.MenuItem, {
|
|
4299
4266
|
textValue,
|
|
4300
|
-
className:
|
|
4267
|
+
className: clsx(Menu_module_default.menuItem, classNameOverride)
|
|
4301
4268
|
}, /* @__PURE__ */ react.createElement(ListItem, {
|
|
4302
4269
|
as: "div",
|
|
4303
4270
|
role: "presentation",
|
|
@@ -4708,10 +4675,7 @@ const TabNav = ({ activeKey, onTabClick, items, tabPlacement = "horizontal", cen
|
|
|
4708
4675
|
role: "navigation",
|
|
4709
4676
|
"aria-label": ariaLabel,
|
|
4710
4677
|
className: TabNav_module_default.tabBar
|
|
4711
|
-
}, /* @__PURE__ */ react.createElement("div", {
|
|
4712
|
-
className: TabNav_module_default.tabList,
|
|
4713
|
-
"aria-orientation": tabPlacement === "horizontal" ? "horizontal" : "vertical"
|
|
4714
|
-
}, items.map((item) => {
|
|
4678
|
+
}, /* @__PURE__ */ react.createElement("div", { className: TabNav_module_default.tabList }, items.map((item) => {
|
|
4715
4679
|
const hasSubItems = Boolean(item.subItems?.length);
|
|
4716
4680
|
const showDropdown = hasSubItems || item.variant === "dropdown";
|
|
4717
4681
|
/** Accent “active” tab styling: current route only (not merely flyout open — open + non-route stays grey). */
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React$2 from "react";
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
|
-
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
3
|
+
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, PressEvent, RouterProvider } from "react-aria-components";
|
|
4
4
|
import { SvgIcon } from "@capra/icons";
|
|
5
5
|
import { SvgLogo } from "@capra/icons/logos";
|
|
6
6
|
|
|
@@ -1763,8 +1763,13 @@ type MenuItemProps<As extends React$2.ElementType = 'a'> = Omit<React$2.Componen
|
|
|
1763
1763
|
* Whether to show chevron (for submenu/parent items).
|
|
1764
1764
|
*/
|
|
1765
1765
|
parent?: boolean;
|
|
1766
|
+
/**
|
|
1767
|
+
* Press handler.
|
|
1768
|
+
*/
|
|
1769
|
+
onPress?: (e: PressEvent) => void;
|
|
1766
1770
|
/**
|
|
1767
1771
|
* Click handler.
|
|
1772
|
+
* @deprecated Use `onPress` instead.
|
|
1768
1773
|
*/
|
|
1769
1774
|
onClick?: (e: React$2.MouseEvent) => void;
|
|
1770
1775
|
/**
|
|
@@ -1906,7 +1911,7 @@ declare const Menu: {
|
|
|
1906
1911
|
displayName: string;
|
|
1907
1912
|
Item: {
|
|
1908
1913
|
<As extends React$2.ElementType = "a">({
|
|
1909
|
-
as,
|
|
1914
|
+
as: Component,
|
|
1910
1915
|
label,
|
|
1911
1916
|
description,
|
|
1912
1917
|
ariaLabel,
|
|
@@ -1918,6 +1923,7 @@ declare const Menu: {
|
|
|
1918
1923
|
indent: indentProp,
|
|
1919
1924
|
shortcut,
|
|
1920
1925
|
parent,
|
|
1926
|
+
onPress,
|
|
1921
1927
|
onClick,
|
|
1922
1928
|
FORCE__className,
|
|
1923
1929
|
children,
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$2 from "react";
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
3
|
import { SvgIcon } from "@capra/icons";
|
|
4
|
-
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
4
|
+
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, PressEvent, RouterProvider } from "react-aria-components";
|
|
5
5
|
import { SvgLogo } from "@capra/icons/logos";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/stylingOverride.d.ts
|
|
@@ -1763,8 +1763,13 @@ type MenuItemProps<As extends React$2.ElementType = 'a'> = Omit<React$2.Componen
|
|
|
1763
1763
|
* Whether to show chevron (for submenu/parent items).
|
|
1764
1764
|
*/
|
|
1765
1765
|
parent?: boolean;
|
|
1766
|
+
/**
|
|
1767
|
+
* Press handler.
|
|
1768
|
+
*/
|
|
1769
|
+
onPress?: (e: PressEvent) => void;
|
|
1766
1770
|
/**
|
|
1767
1771
|
* Click handler.
|
|
1772
|
+
* @deprecated Use `onPress` instead.
|
|
1768
1773
|
*/
|
|
1769
1774
|
onClick?: (e: React$2.MouseEvent) => void;
|
|
1770
1775
|
/**
|
|
@@ -1906,7 +1911,7 @@ declare const Menu: {
|
|
|
1906
1911
|
displayName: string;
|
|
1907
1912
|
Item: {
|
|
1908
1913
|
<As extends React$2.ElementType = "a">({
|
|
1909
|
-
as,
|
|
1914
|
+
as: Component,
|
|
1910
1915
|
label,
|
|
1911
1916
|
description,
|
|
1912
1917
|
ariaLabel,
|
|
@@ -1918,6 +1923,7 @@ declare const Menu: {
|
|
|
1918
1923
|
indent: indentProp,
|
|
1919
1924
|
shortcut,
|
|
1920
1925
|
parent,
|
|
1926
|
+
onPress,
|
|
1921
1927
|
onClick,
|
|
1922
1928
|
FORCE__className,
|
|
1923
1929
|
children,
|
package/dist/index.mjs
CHANGED
|
@@ -246,12 +246,12 @@ Label$1.displayName = "Label";
|
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/components/TextInput/TextInput.module.css
|
|
248
248
|
var TextInput_module_default = {
|
|
249
|
-
"errorIndicator": "capra-TextInput-module-
|
|
250
|
-
"input": "capra-TextInput-module-
|
|
251
|
-
"leadingSlot": "capra-TextInput-module-
|
|
252
|
-
"trailingSlot": "capra-TextInput-module-
|
|
253
|
-
"warningIndicator": "capra-TextInput-module-
|
|
254
|
-
"wrapper": "capra-TextInput-module-
|
|
249
|
+
"errorIndicator": "capra-TextInput-module-pTHfnG-errorIndicator",
|
|
250
|
+
"input": "capra-TextInput-module-pTHfnG-input",
|
|
251
|
+
"leadingSlot": "capra-TextInput-module-pTHfnG-leadingSlot",
|
|
252
|
+
"trailingSlot": "capra-TextInput-module-pTHfnG-trailingSlot",
|
|
253
|
+
"warningIndicator": "capra-TextInput-module-pTHfnG-warningIndicator",
|
|
254
|
+
"wrapper": "capra-TextInput-module-pTHfnG-wrapper"
|
|
255
255
|
};
|
|
256
256
|
//#endregion
|
|
257
257
|
//#region src/components/TextInput/TextInput.tsx
|
|
@@ -2709,23 +2709,23 @@ TextArea.displayName = "TextArea";
|
|
|
2709
2709
|
//#endregion
|
|
2710
2710
|
//#region src/components/Modal/Modal.module.css
|
|
2711
2711
|
var Modal_module_default = {
|
|
2712
|
-
"confirmationActions": "capra-Modal-module-
|
|
2713
|
-
"confirmationBody": "capra-Modal-module-
|
|
2714
|
-
"confirmationIcon": "capra-Modal-module-
|
|
2715
|
-
"confirmationLayout": "capra-Modal-module-
|
|
2716
|
-
"confirmationMessage": "capra-Modal-module-
|
|
2717
|
-
"confirmationSurface": "capra-Modal-module-
|
|
2718
|
-
"content": "capra-Modal-module-
|
|
2719
|
-
"contentShow": "capra-Modal-module-
|
|
2720
|
-
"expandedFooterLayout": "capra-Modal-module-
|
|
2721
|
-
"expandedTitleLayout": "capra-Modal-module-
|
|
2722
|
-
"footer": "capra-Modal-module-
|
|
2723
|
-
"footerActions": "capra-Modal-module-
|
|
2724
|
-
"header": "capra-Modal-module-
|
|
2725
|
-
"headerLeading": "capra-Modal-module-
|
|
2726
|
-
"overlay": "capra-Modal-module-
|
|
2727
|
-
"overlayShow": "capra-Modal-module-
|
|
2728
|
-
"surface": "capra-Modal-module-
|
|
2712
|
+
"confirmationActions": "capra-Modal-module-j-u8iq-confirmationActions",
|
|
2713
|
+
"confirmationBody": "capra-Modal-module-j-u8iq-confirmationBody",
|
|
2714
|
+
"confirmationIcon": "capra-Modal-module-j-u8iq-confirmationIcon",
|
|
2715
|
+
"confirmationLayout": "capra-Modal-module-j-u8iq-confirmationLayout",
|
|
2716
|
+
"confirmationMessage": "capra-Modal-module-j-u8iq-confirmationMessage",
|
|
2717
|
+
"confirmationSurface": "capra-Modal-module-j-u8iq-confirmationSurface",
|
|
2718
|
+
"content": "capra-Modal-module-j-u8iq-content",
|
|
2719
|
+
"contentShow": "capra-Modal-module-j-u8iq-contentShow",
|
|
2720
|
+
"expandedFooterLayout": "capra-Modal-module-j-u8iq-expandedFooterLayout",
|
|
2721
|
+
"expandedTitleLayout": "capra-Modal-module-j-u8iq-expandedTitleLayout",
|
|
2722
|
+
"footer": "capra-Modal-module-j-u8iq-footer",
|
|
2723
|
+
"footerActions": "capra-Modal-module-j-u8iq-footerActions",
|
|
2724
|
+
"header": "capra-Modal-module-j-u8iq-header",
|
|
2725
|
+
"headerLeading": "capra-Modal-module-j-u8iq-headerLeading",
|
|
2726
|
+
"overlay": "capra-Modal-module-j-u8iq-overlay",
|
|
2727
|
+
"overlayShow": "capra-Modal-module-j-u8iq-overlayShow",
|
|
2728
|
+
"surface": "capra-Modal-module-j-u8iq-surface"
|
|
2729
2729
|
};
|
|
2730
2730
|
//#endregion
|
|
2731
2731
|
//#region src/components/Text/Heading.tsx
|
|
@@ -4172,7 +4172,7 @@ const MenuSection$1 = ({ children, "aria-label": ariaLabel, "aria-labelledby": a
|
|
|
4172
4172
|
}, resolvedChildren));
|
|
4173
4173
|
};
|
|
4174
4174
|
MenuSection$1.displayName = "Menu.Section";
|
|
4175
|
-
const MenuItem$1 = ({ as, label, description, ariaLabel, href, disabled = false, active = false, variant = "default", icon, indent: indentProp, shortcut, parent = false, onClick, FORCE__className, children, ...rest }) => {
|
|
4175
|
+
const MenuItem$1 = ({ as: Component, label, description, ariaLabel, href, disabled = false, active = false, variant = "default", icon, indent: indentProp, shortcut, parent = false, onPress, onClick, FORCE__className, children, ...rest }) => {
|
|
4176
4176
|
const indentFromSectionHeader = React$1.useContext(MenuSectionIndentContext);
|
|
4177
4177
|
const indent = indentProp !== void 0 ? indentProp : indentFromSectionHeader ? true : false;
|
|
4178
4178
|
const labelContent = children ?? label;
|
|
@@ -4186,59 +4186,27 @@ const MenuItem$1 = ({ as, label, description, ariaLabel, href, disabled = false,
|
|
|
4186
4186
|
size: "xs",
|
|
4187
4187
|
"aria-hidden": true
|
|
4188
4188
|
}) : null])));
|
|
4189
|
-
const
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
};
|
|
4196
|
-
/** React Aria runs menu activation through `onAction` (pointer + Enter/Space), not only `onPress`. */
|
|
4197
|
-
const handleAction = () => {
|
|
4198
|
-
if (!disabled && onClick) onClick({});
|
|
4199
|
-
};
|
|
4200
|
-
if (as) {
|
|
4201
|
-
const Component = as;
|
|
4202
|
-
return /* @__PURE__ */ React$1.createElement(MenuItem, {
|
|
4203
|
-
isDisabled: disabled,
|
|
4204
|
-
textValue,
|
|
4205
|
-
"aria-label": ariaLabel,
|
|
4206
|
-
"aria-current": active ? "page" : void 0,
|
|
4207
|
-
className: itemClassName,
|
|
4208
|
-
...menuItemDataAttributes,
|
|
4209
|
-
render: (domProps) => /* @__PURE__ */ React$1.createElement(Component, {
|
|
4210
|
-
...domProps,
|
|
4211
|
-
...rest
|
|
4212
|
-
}),
|
|
4213
|
-
onAction: handleAction
|
|
4214
|
-
}, /* @__PURE__ */ React$1.createElement(ListItem, {
|
|
4215
|
-
as: "div",
|
|
4216
|
-
role: "presentation",
|
|
4217
|
-
FORCE__className: Menu_module_default.menuItemListItemShell
|
|
4218
|
-
}, listItemContent));
|
|
4219
|
-
}
|
|
4220
|
-
if (Boolean(href) && !disabled) return /* @__PURE__ */ React$1.createElement(MenuItem, {
|
|
4221
|
-
href,
|
|
4222
|
-
isDisabled: disabled,
|
|
4223
|
-
textValue,
|
|
4224
|
-
"aria-label": ariaLabel,
|
|
4225
|
-
"aria-current": active ? "page" : void 0,
|
|
4226
|
-
className: itemClassName,
|
|
4227
|
-
...menuItemDataAttributes,
|
|
4228
|
-
onAction: handleAction
|
|
4229
|
-
}, /* @__PURE__ */ React$1.createElement(ListItem, {
|
|
4230
|
-
as: "div",
|
|
4231
|
-
role: "presentation",
|
|
4232
|
-
FORCE__className: Menu_module_default.menuItemListItemShell
|
|
4233
|
-
}, listItemContent));
|
|
4189
|
+
const render = Component ? (domProps) => {
|
|
4190
|
+
const Element = Component;
|
|
4191
|
+
return /* @__PURE__ */ React$1.createElement(Element, {
|
|
4192
|
+
...domProps,
|
|
4193
|
+
...rest
|
|
4194
|
+
});
|
|
4195
|
+
} : void 0;
|
|
4234
4196
|
return /* @__PURE__ */ React$1.createElement(MenuItem, {
|
|
4197
|
+
href,
|
|
4235
4198
|
isDisabled: disabled,
|
|
4236
4199
|
textValue,
|
|
4237
4200
|
"aria-label": ariaLabel,
|
|
4238
4201
|
"aria-current": active ? "page" : void 0,
|
|
4239
|
-
className:
|
|
4240
|
-
|
|
4241
|
-
|
|
4202
|
+
className: clsx(Menu_module_default.menuItem, FORCE__className),
|
|
4203
|
+
"data-variant": variant,
|
|
4204
|
+
"data-active": active || void 0,
|
|
4205
|
+
"data-indent": indent || void 0,
|
|
4206
|
+
"data-has-description": showDescription || void 0,
|
|
4207
|
+
render,
|
|
4208
|
+
onClick,
|
|
4209
|
+
onPress
|
|
4242
4210
|
}, /* @__PURE__ */ React$1.createElement(ListItem, {
|
|
4243
4211
|
as: "div",
|
|
4244
4212
|
role: "presentation",
|
|
@@ -4270,10 +4238,9 @@ const MenuSubmenu = ({ label, children, itemHoverAppearance = "default", itemAct
|
|
|
4270
4238
|
size: "xs",
|
|
4271
4239
|
"aria-hidden": true
|
|
4272
4240
|
}))));
|
|
4273
|
-
const triggerClassName = clsx(Menu_module_default.menuItem, classNameOverride);
|
|
4274
4241
|
return /* @__PURE__ */ React$1.createElement(SubmenuTrigger, { delay }, /* @__PURE__ */ React$1.createElement(MenuItem, {
|
|
4275
4242
|
textValue,
|
|
4276
|
-
className:
|
|
4243
|
+
className: clsx(Menu_module_default.menuItem, classNameOverride)
|
|
4277
4244
|
}, /* @__PURE__ */ React$1.createElement(ListItem, {
|
|
4278
4245
|
as: "div",
|
|
4279
4246
|
role: "presentation",
|
|
@@ -4684,10 +4651,7 @@ const TabNav = ({ activeKey, onTabClick, items, tabPlacement = "horizontal", cen
|
|
|
4684
4651
|
role: "navigation",
|
|
4685
4652
|
"aria-label": ariaLabel,
|
|
4686
4653
|
className: TabNav_module_default.tabBar
|
|
4687
|
-
}, /* @__PURE__ */ React$1.createElement("div", {
|
|
4688
|
-
className: TabNav_module_default.tabList,
|
|
4689
|
-
"aria-orientation": tabPlacement === "horizontal" ? "horizontal" : "vertical"
|
|
4690
|
-
}, items.map((item) => {
|
|
4654
|
+
}, /* @__PURE__ */ React$1.createElement("div", { className: TabNav_module_default.tabList }, items.map((item) => {
|
|
4691
4655
|
const hasSubItems = Boolean(item.subItems?.length);
|
|
4692
4656
|
const showDropdown = hasSubItems || item.variant === "dropdown";
|
|
4693
4657
|
/** Accent “active” tab styling: current route only (not merely flyout open — open + non-route stays grey). */
|