pixelize-design-library 2.4.2-beta.62 → 2.4.2-beta.63
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/CHANGELOG.md +75 -2
- package/COMPONENT-GOTCHAS.md +25 -6
- package/DESIGN-GUIDE.md +12 -5
- package/dist/Components/Button/Button.styles.js +51 -21
- package/dist/Components/Card/CardProps.d.ts +2 -2
- package/dist/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/Components/DatePicker/dayStates.js +2 -1
- package/dist/Components/Drawer/Drawer.js +2 -1
- package/dist/Components/Dropdown/DropDown.js +2 -1
- package/dist/Components/FileUpload/FileUpload.js +9 -2
- package/dist/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/Components/Notification/Notification.js +4 -3
- package/dist/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
- package/dist/Components/SearchSelect/SearchSelect.js +42 -21
- package/dist/Components/SearchSelect/searchSelectNav.d.ts +13 -0
- package/dist/Components/SearchSelect/searchSelectNav.js +40 -0
- package/dist/Components/Select/SelectPopup.js +2 -1
- package/dist/Components/SelectSearch/SelectSearch.js +2 -1
- package/dist/Components/SettingRow/SettingRow.js +2 -1
- package/dist/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/Components/SideBar/SideBar.js +16 -13
- package/dist/Components/SideBar/SideBarProps.d.ts +1 -1
- package/dist/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/Components/SideBar/sidebarMotion.d.ts +2 -0
- package/dist/Components/SideBar/sidebarMotion.js +6 -0
- package/dist/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/Components/StageProgress/StageItem.js +5 -2
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/StatCard/StatCard.js +2 -1
- package/dist/Components/Table/Table.js +6 -2
- package/dist/Components/Table/components/TableActions.js +3 -2
- package/dist/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/Components/Table/settings/TableSettings.js +7 -2
- package/dist/Components/Table/variants/classic.js +3 -2
- package/dist/Components/Timeline/Timeline.js +11 -4
- package/dist/Components/Toaster/Toaster.js +19 -8
- package/dist/Components/Toggle/TableToggle.js +5 -2
- package/dist/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/Components/UserDetails/UserDetails.js +3 -1
- package/dist/Theme/chakra/Card.styles.d.ts +7 -1
- package/dist/Theme/chakra/Card.styles.js +4 -1
- package/dist/Theme/chakra/Menu.styles.d.ts +3 -5
- package/dist/Theme/chakra/Menu.styles.js +3 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +2 -11
- package/dist/Theme/chakra/Popover.styles.js +2 -0
- package/dist/Theme/chakra/common.web.d.ts +4 -0
- package/dist/Theme/chakra/componentStyles.d.ts +11 -3
- package/dist/Theme/chakra/componentStyles.js +10 -6
- package/dist/Theme/chakra/motion.d.ts +1 -0
- package/dist/Theme/chakra/motion.js +2 -1
- package/dist/Theme/chakra/overlay.styles.d.ts +5 -0
- package/dist/Theme/chakra/overlay.styles.js +4 -1
- package/dist/Theme/themeProps.d.ts +4 -0
- package/dist/Theme/tokens/brands/index.d.ts +1 -0
- package/dist/Theme/tokens/brands/index.js +17 -1
- package/dist/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +7 -29
- package/dist/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +6 -1
- package/dist/Theme/tokens/builders/buildDarkPalette.js +37 -8
- package/dist/Theme/tokens/builders/mutedText.d.ts +1 -1
- package/dist/Theme/tokens/builders/mutedText.js +13 -3
- package/dist/Theme/tokens/builders/planeStep.d.ts +4 -0
- package/dist/Theme/tokens/builders/planeStep.js +20 -0
- package/dist/Theme/tokens/builders/planes.d.ts +4 -0
- package/dist/Theme/tokens/builders/planes.js +33 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.d.ts +9 -0
- package/dist/Theme/tokens/builders/skeletonShimmer.js +25 -0
- package/dist/Theme/tokens/builders/surfaceRaised.d.ts +3 -1
- package/dist/Theme/tokens/builders/surfaceRaised.js +18 -8
- package/dist/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/Theme/tokens/primitives/index.d.ts +2 -2
- package/dist/Theme/tokens/primitives/index.js +4 -1
- package/dist/Theme/tokens/primitives/motion.d.ts +1 -0
- package/dist/Theme/tokens/primitives/motion.js +2 -1
- package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
- package/dist/Theme/tokens/primitives/shadows.js +56 -6
- package/dist/Theme/tokens/primitives/typography.js +1 -1
- package/dist/esm/Components/Button/Button.styles.js +54 -24
- package/dist/esm/Components/ConfirmDialog/ConfirmDialog.js +2 -1
- package/dist/esm/Components/CustomModulesTable/CustomModulesTable.js +6 -4
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +2 -1
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -1
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +2 -1
- package/dist/esm/Components/DatePicker/dayStates.js +2 -1
- package/dist/esm/Components/Drawer/Drawer.js +2 -1
- package/dist/esm/Components/Dropdown/DropDown.js +2 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +10 -3
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +7 -4
- package/dist/esm/Components/KanbanBoard/AccountCard.js +4 -2
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -2
- package/dist/esm/Components/Notification/Notification.js +4 -3
- package/dist/esm/Components/NotificationBell/NotificationPanel.js +4 -3
- package/dist/esm/Components/OrganizationDetails/CreateOrgModal.js +2 -1
- package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +5 -3
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +7 -3
- package/dist/esm/Components/SearchSelect/SearchSelect.js +42 -21
- package/dist/esm/Components/SearchSelect/searchSelectNav.js +32 -0
- package/dist/esm/Components/Select/SelectPopup.js +2 -1
- package/dist/esm/Components/SelectSearch/SelectSearch.js +2 -1
- package/dist/esm/Components/SettingRow/SettingRow.js +2 -1
- package/dist/esm/Components/SettingRow/SettingsSection.js +2 -1
- package/dist/esm/Components/SideBar/SecondaryBar.js +4 -3
- package/dist/esm/Components/SideBar/SideBar.js +17 -14
- package/dist/esm/Components/SideBar/components/MenuItemBox.js +7 -4
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -1
- package/dist/esm/Components/SideBar/components/OtherApps.js +2 -1
- package/dist/esm/Components/SideBar/components/PinnedSection.js +7 -4
- package/dist/esm/Components/SideBar/sidebarMotion.js +3 -0
- package/dist/esm/Components/SignInActivityTable/SignInActivityTable.js +6 -4
- package/dist/esm/Components/StageProgress/StageItem.js +5 -2
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/StatCard/StatCard.js +2 -1
- package/dist/esm/Components/Table/Table.js +8 -4
- package/dist/esm/Components/Table/components/TableActions.js +3 -2
- package/dist/esm/Components/Table/filters/CompactSelect.js +2 -1
- package/dist/esm/Components/Table/settings/TableSettings.js +8 -3
- package/dist/esm/Components/Table/variants/classic.js +3 -2
- package/dist/esm/Components/Timeline/Timeline.js +11 -4
- package/dist/esm/Components/Toaster/Toaster.js +20 -9
- package/dist/esm/Components/Toggle/TableToggle.js +5 -2
- package/dist/esm/Components/UserDetails/AddUserModal.js +2 -1
- package/dist/esm/Components/UserDetails/ChangeRoleModal.js +2 -1
- package/dist/esm/Components/UserDetails/UserDetails.js +3 -1
- package/dist/esm/Theme/chakra/Card.styles.js +4 -1
- package/dist/esm/Theme/chakra/Menu.styles.js +3 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +2 -0
- package/dist/esm/Theme/chakra/componentStyles.js +10 -6
- package/dist/esm/Theme/chakra/motion.js +1 -0
- package/dist/esm/Theme/chakra/overlay.styles.js +3 -0
- package/dist/esm/Theme/tokens/brands/index.js +16 -0
- package/dist/esm/Theme/tokens/brands/radiant/palette.light.js +15 -0
- package/dist/esm/Theme/tokens/brands/rosewood/palette.light.js +10 -10
- package/dist/esm/Theme/tokens/brands/zinc/palette.dark.js +3 -35
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +38 -9
- package/dist/esm/Theme/tokens/builders/mutedText.js +12 -2
- package/dist/esm/Theme/tokens/builders/planeStep.js +14 -0
- package/dist/esm/Theme/tokens/builders/planes.js +28 -0
- package/dist/esm/Theme/tokens/builders/skeletonShimmer.js +21 -0
- package/dist/esm/Theme/tokens/builders/surfaceRaised.js +16 -7
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +3 -1
- package/dist/esm/Theme/tokens/primitives/index.js +1 -1
- package/dist/esm/Theme/tokens/primitives/motion.js +1 -0
- package/dist/esm/Theme/tokens/primitives/shadows.js +54 -5
- package/dist/esm/Theme/tokens/primitives/typography.js +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -5
- package/package.json +1 -1
|
@@ -7,6 +7,7 @@ import CheckBox from "../Checkbox/Checkbox.js";
|
|
|
7
7
|
import ToolTip from "../ToolTip/ToolTip.js";
|
|
8
8
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
9
9
|
import { accentTextOnCanvas, onFilled } from "../../Theme/tokens/builders/accentText.js";
|
|
10
|
+
import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
|
|
10
11
|
import { getFilterHoverBg } from "./filterHoverStyle.js";
|
|
11
12
|
import { fieldFocusVisible } from "../../Theme/chakra/focusRing.styles.js";
|
|
12
13
|
const FilterSidebar = ({ sidebarOptions, selected, onChange, maxVisible = 10, width = 280, variant = "minimal", containerPadding, containerHeight,
|
|
@@ -16,6 +17,8 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
|
|
|
16
17
|
}) => {
|
|
17
18
|
const theme = useCustomTheme();
|
|
18
19
|
const hoverBg = useMemo(() => getFilterHoverBg(theme.colors), [theme.colors]);
|
|
20
|
+
const rangePick = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.surfaceRaised), [theme.colors]);
|
|
21
|
+
const ratingPick = useMemo(() => bandOn(theme.colors.primary[50], theme.colors.background[50]), [theme.colors]);
|
|
19
22
|
const [openPrice, setOpenPrice] = useState({});
|
|
20
23
|
// Determine if the component is controlled (prop provided) or uncontrolled (internal state)
|
|
21
24
|
const isControlled = selected !== undefined;
|
|
@@ -146,20 +149,20 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
|
|
|
146
149
|
pointerEvents: 'none', // Allow clicks to pass through track
|
|
147
150
|
zIndex: 3,
|
|
148
151
|
margin: 0,
|
|
149
|
-
} })] }), _jsxs(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [_jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-min-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ?
|
|
152
|
+
} })] }), _jsxs(SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [_jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-min-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(Portal, { children: _jsx(PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? rangePick : theme.colors.surfaceRaised, borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.primary[400] : "transparent", _hover: { bg: hoverBg }, "data-testid": `range-option-min-${section.id}-${v}`, onClick: () => {
|
|
150
153
|
const min = v;
|
|
151
154
|
const max = currentMax;
|
|
152
155
|
const nextVal = [Math.min(min, max), Math.max(min, max)];
|
|
153
156
|
setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
|
|
154
157
|
setOpenPrice({});
|
|
155
|
-
}, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), _jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-max-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(PopoverContent, { width: "6rem", p: 0, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ?
|
|
158
|
+
}, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), _jsxs(Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [_jsx(PopoverTrigger, { children: _jsx(Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.background[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", "data-testid": `range-trigger-max-${section.id}`, onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: _jsx(Box, { ml: "auto", children: _jsxs(Text, { fontSize: "xs", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), _jsx(PopoverContent, { width: "6rem", p: 0, bg: theme.colors.surfaceRaised, children: _jsx(PopoverBody, { p: 0, children: _jsx(VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => (_jsxs(Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? rangePick : theme.colors.surfaceRaised, borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.primary[400] : "transparent", _hover: { bg: hoverBg }, "data-testid": `range-option-max-${section.id}-${v}`, onClick: () => {
|
|
156
159
|
const max = v;
|
|
157
160
|
const min = currentMin;
|
|
158
161
|
const nextVal = [Math.min(min, max), Math.max(min, max)];
|
|
159
162
|
setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
|
|
160
163
|
setOpenPrice({});
|
|
161
164
|
}, children: [_jsxs(Text, { fontSize: "sm", color: theme.colors.text[500], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMax === v ? (_jsx(Box, { bg: theme.colors.primary[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: _jsx(Check, { size: 9, color: onFilled(theme.colors.primary[100], theme.colors.white, theme.colors.black) }) })) : null] }, `max-${v}`))) }) }) })] })] })] }));
|
|
162
|
-
})()) : (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: [4, 3, 2, 1].map((r) => (_jsx(Flex, { align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: String(internalSelected[section.id] || "") === String(r) ?
|
|
165
|
+
})()) : (_jsxs(_Fragment, { children: [section.id === "rating" ? (_jsx(VStack, { align: "start", spacing: 1, w: "full", children: [4, 3, 2, 1].map((r) => (_jsx(Flex, { align: "center", justify: "space-between", w: "full", p: 1, borderRadius: "md", cursor: "pointer", bg: String(internalSelected[section.id] || "") === String(r) ? ratingPick : "transparent", border: String(internalSelected[section.id] || "") === String(r) ? `1px solid ${theme.colors.primary[200]}` : "none", _hover: { bg: hoverBg }, onClick: () => {
|
|
163
166
|
setInternalSelected((prev) => {
|
|
164
167
|
const next = { ...prev, [section.id]: String(r) };
|
|
165
168
|
onChange === null || onChange === void 0 ? void 0 : onChange(next);
|
|
@@ -169,7 +172,7 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
|
|
|
169
172
|
// orange[500] on background[50] ~2.2:1, fails the 3:1 icon bar — walk the scale like
|
|
170
173
|
// Notification's clock icon. Canvas mirrors this row's own bg ternary (red[50] when selected).
|
|
171
174
|
const isRowSelected = String(internalSelected[section.id] || "") === String(r);
|
|
172
|
-
const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ?
|
|
175
|
+
const starColor = accentTextOnCanvas(theme.colors.orange, isRowSelected ? ratingPick : theme.colors.background[50]);
|
|
173
176
|
return Array.from({ length: 5 }, (_, i) => (_jsx(Box, { children: _jsx(Star, { size: 16, color: starColor, fill: i < r ? starColor : "none" }) }, `star-${r}-${i}`)));
|
|
174
177
|
})() }), _jsx(Text, { fontSize: "sm", color: theme.colors.text[500], children: "& Up" })] }) }, `rating-${r}`))) })) : null, section.searchable && (_jsx(Input, { size: "xs", h: "26px", fontSize: "xs", "aria-label": `Search ${section.label}`, placeholder: `Search ${section.label}...`, borderRadius: "md", bg: theme.colors.background[50], border: "1px solid",
|
|
175
178
|
// NOTE: boxborder[500] not gray[200] — WCAG 1.4.11 needs >=3:1 for a control boundary; gray[200] fails in dark.
|
|
@@ -4,6 +4,7 @@ import { Box, Flex, Text, Tooltip, HStack, VStack, Collapse, Spacer, } from "@ch
|
|
|
4
4
|
import { ChevronDown, ChevronUp, ExternalLink, Trash2 } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
6
|
import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
7
|
+
import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
|
|
7
8
|
import { resolveSoftTone } from "../../Theme/tokens/builders/tone.js";
|
|
8
9
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
9
10
|
import { BORDER_WIDTHS } from "../../Theme/tokens/primitives/borderWidths.js";
|
|
@@ -16,6 +17,7 @@ const ACTION_TRANSITION = transitionFor(["background-color", "color"]);
|
|
|
16
17
|
const AccountCard = React.memo(({ account, onDelete, onOpen, isExpanded = false, onToggleExpand, isDeletable = true, }) => {
|
|
17
18
|
const { colors } = useCustomTheme();
|
|
18
19
|
const errorTone = resolveSoftTone(colors, colors.semantic.error);
|
|
20
|
+
const openHover = bandOn(colors.primary[50], colors.background[50]);
|
|
19
21
|
const keys = useMemo(() => Object.keys(account).filter((key) => typeof account[key] === "string" && !excludeKeys.includes(key)), [account]);
|
|
20
22
|
const visibleKeys = isExpanded ? keys : keys.slice(0, 4);
|
|
21
23
|
const handleToggle = () => {
|
|
@@ -26,8 +28,8 @@ const AccountCard = React.memo(({ account, onDelete, onOpen, isExpanded = false,
|
|
|
26
28
|
boxShadow: "md",
|
|
27
29
|
transform: "translateY(-0.063rem)",
|
|
28
30
|
}, children: _jsxs(VStack, { align: "stretch", spacing: 1, fontSize: "sm", color: colors.text[500], children: [visibleKeys.map((key) => (_jsx(AccountRow, { label: key.replace(/\b\w/g, (c) => c.toUpperCase()), value: account[key] }, key))), _jsx(Collapse, { in: isExpanded && account.details !== undefined, animateOpacity: true, children: _jsx(Text, { pt: 2, fontSize: "xs-plus", color: colors.text[600], children: account.details }) }), _jsxs(Flex, { justify: "space-between", w: "full", pt: 2, alignItems: "center", children: [keys.length > 4 ? (_jsxs(Text, { as: "button", type: "button", "aria-expanded": isExpanded, color: colors.accentText, fontSize: "xs", fontWeight: 600, cursor: "pointer", onClick: handleToggle, display: "flex", alignItems: "center", gap: 1, borderRadius: "sm", _hover: { textDecoration: "underline" }, sx: focusVisibleStyles(colors), children: ["Show ", isExpanded ? "less" : "more", " ", isExpanded ? _jsx(ChevronUp, { size: 13 }) : _jsx(ChevronDown, { size: 13 })] })) : (_jsx(Spacer, {})), _jsxs(HStack, { spacing: 1, opacity: 0, transition: transitionFor(["opacity"]), _groupHover: { opacity: 1 }, _groupFocusWithin: { opacity: 1 }, sx: reducedMotionSx(), children: [isDeletable && (_jsx(Tooltip, { label: "Delete", hasArrow: true, children: _jsx(Flex, { as: "button", type: "button", align: "center", justify: "center", boxSize: "1.625rem", borderRadius: "lg", cursor: "pointer", color: colors.textMuted, transition: ACTION_TRANSITION, sx: { ...focusVisibleStyles(colors), ...reducedMotionSx() }, _hover: { bg: errorTone.bg, color: errorTone.fg }, onClick: () => onDelete === null || onDelete === void 0 ? void 0 : onDelete(account), "aria-label": "Delete", children: _jsx(Trash2, { size: 15 }) }) })), _jsx(Tooltip, { label: "Open", hasArrow: true, children: _jsx(Flex, { as: "button", type: "button", align: "center", justify: "center", boxSize: "1.625rem", borderRadius: "lg", cursor: "pointer", color: colors.textMuted, transition: ACTION_TRANSITION, sx: { ...focusVisibleStyles(colors), ...reducedMotionSx() }, _hover: {
|
|
29
|
-
bg:
|
|
30
|
-
color: accentTextOnCanvas(colors.primary,
|
|
31
|
+
bg: openHover,
|
|
32
|
+
color: accentTextOnCanvas(colors.primary, openHover),
|
|
31
33
|
}, onClick: () => onOpen === null || onOpen === void 0 ? void 0 : onOpen(account), "aria-label": "Open", children: _jsx(ExternalLink, { size: 15 }) }) })] })] })] }) }));
|
|
32
34
|
});
|
|
33
35
|
export default AccountCard;
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { Box, Button, Flex, Menu, MenuButton, MenuDivider, MenuItem, MenuList, Stack, Text, } from "@chakra-ui/react";
|
|
3
3
|
import Avatar from "../Avatar/Avatar.js";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
5
6
|
import { accentTextOnCanvas, isDarkCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
6
7
|
import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
|
|
7
8
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
@@ -51,10 +52,10 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
|
|
|
51
52
|
// Without a cap one long title stretches the whole dropdown; titles truncate instead.
|
|
52
53
|
maxW: "18rem", bg: theme.colors.surfaceRaised,
|
|
53
54
|
// NOTE: Chakra's MenuItem inherits --menu-bg hardcoded to #fff via dead _dark — set it or items stay white.
|
|
54
|
-
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Box, { pt: 4, pb: 2, px: 4, children: _jsx(PersonChip, { name: userName, imageUrl: userAvathar, secondary: userRole, orientation: "vertical", size: "xl", maxW: "100%" }) }), _jsx(MenuDivider, { borderColor: theme.colors
|
|
55
|
+
sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Box, { pt: 4, pb: 2, px: 4, children: _jsx(PersonChip, { name: userName, imageUrl: userAvathar, secondary: userRole, orientation: "vertical", size: "xl", maxW: "100%" }) }), _jsx(MenuDivider, { borderColor: raisedRule(theme.colors) }), _jsx(Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
|
|
55
56
|
var _a, _b, _c, _d;
|
|
56
57
|
return (_jsxs(MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && (_jsx(Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), _jsx(Box, { minW: 0, isTruncated: true, title: String((_a = menu.title) !== null && _a !== void 0 ? _a : ""), children: menu.title })] }, `${String((_d = (_c = (_b = menu.id) !== null && _b !== void 0 ? _b : menu.url) !== null && _c !== void 0 ? _c : menu.title) !== null && _d !== void 0 ? _d : idx)}-${idx}`));
|
|
57
|
-
}) }), _jsx(MenuDivider, { borderColor: theme.colors
|
|
58
|
+
}) }), _jsx(MenuDivider, { borderColor: raisedRule(theme.colors) }), _jsxs(MenuItem, { onClick: handleLogout, sx: {
|
|
58
59
|
...menuItemStyle,
|
|
59
60
|
color: theme.colors.semanticText.error,
|
|
60
61
|
_hover: { bg: dangerTone.bg, color: dangerTone.fg },
|
|
@@ -9,8 +9,9 @@ import { liftToContrast } from "../../Theme/tokens/builders/outlineRung.js";
|
|
|
9
9
|
import Avatar from "../Avatar/Avatar.js";
|
|
10
10
|
import { focusVisibleRing } from "../../Theme/chakra/focusRing.styles.js";
|
|
11
11
|
import { reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
12
|
-
|
|
13
|
-
const
|
|
12
|
+
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
13
|
+
const CARD_TRANSITION = transitionFor(["box-shadow", "background-color", "border-color"], "base");
|
|
14
|
+
const DISMISS_TRANSITION = transitionFor(["background-color", "color", "transform"], "base");
|
|
14
15
|
/** Date-driven countdown card ("due in 3 days" / "overdue by 2 hours"). For inbox-style rows use `NotificationItem`, which cannot render a future date. */
|
|
15
16
|
const Notification = ({ notification, onClose, showStatus, onClick, isLoading = false, colors, }) => {
|
|
16
17
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -103,7 +104,7 @@ const Notification = ({ notification, onClose, showStatus, onClick, isLoading =
|
|
|
103
104
|
return (_jsx(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", children: _jsxs(VStack, { align: "start", spacing: 3, w: "100%", children: [_jsxs(HStack, { spacing: 2, children: [_jsx(SkeletonCircle, { size: "4" }), _jsx(Skeleton, { height: "14px", width: "60%" })] }), _jsxs(HStack, { align: "center", spacing: 3, w: "100%", children: [_jsx(SkeletonCircle, { size: "8" }), _jsxs(VStack, { align: "start", spacing: 1, flex: "1", children: [_jsx(Skeleton, { height: "16px", width: "70%" }), _jsx(Skeleton, { height: "12px", width: "50%" })] })] }), _jsx(Divider, { borderColor: borderColor }), _jsxs(HStack, { justify: "space-between", w: "100%", children: [_jsx(Skeleton, { height: "12px", width: "40%" }), _jsx(Skeleton, { height: "12px", width: "30%" })] })] }) }));
|
|
104
105
|
}
|
|
105
106
|
// 🧩 Normal render
|
|
106
|
-
return (_jsxs(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md"
|
|
107
|
+
return (_jsxs(Box, { bg: bgColor, border: "1px solid", borderColor: borderColor, borderRadius: "xl", p: 4, w: "100%", maxW: "400px", boxShadow: "sm", _hover: { boxShadow: "md" }, transition: CARD_TRANSITION, sx: reducedMotionSx(), position: "relative", children: [onClose && (_jsx(Box, { position: "absolute", top: "2", right: "2", cursor: "pointer", onClick: onClose, onKeyDown: (e) => {
|
|
107
108
|
if (e.key === "Enter" || e.key === " ") {
|
|
108
109
|
e.preventDefault();
|
|
109
110
|
onClose();
|
|
@@ -7,6 +7,7 @@ import EmptyState from "../EmptyState/EmptyState.js";
|
|
|
7
7
|
import Skeletons from "../Skeletons/Skeletons.js";
|
|
8
8
|
import NotificationList from "./NotificationList.js";
|
|
9
9
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
10
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
10
11
|
import { formatCount, useAnchoredPanelHeight } from "./notificationHelpers.js";
|
|
11
12
|
const DEFAULT_EMPTY = { title: "No notifications yet", description: "You're all caught up.", size: "sm" };
|
|
12
13
|
/** The panel shell: header, zone/filter row, scroll body with loading/empty/error, footer. */
|
|
@@ -18,14 +19,14 @@ function NotificationPanel({ items, toItem, zones, activeZone, onZoneChange, fil
|
|
|
18
19
|
const measuredHeight = useAnchoredPanelHeight(ref);
|
|
19
20
|
const resolvedMaxH = maxH !== null && maxH !== void 0 ? maxH : (isPopover ? measuredHeight : undefined);
|
|
20
21
|
const activeZoneConfig = zones === null || zones === void 0 ? void 0 : zones.find((zone) => zone.id === activeZone);
|
|
21
|
-
return (_jsxs(Flex, { ref: ref, direction: "column", w: "100%", maxH: isPopover ? resolvedMaxH : undefined, overflow: isPopover ? "hidden" : "visible", bg: colors.surfaceRaised, borderRadius: "xl", children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, px: 4, py: 3, borderBottom: "1px solid", borderColor: colors
|
|
22
|
+
return (_jsxs(Flex, { ref: ref, direction: "column", w: "100%", maxH: isPopover ? resolvedMaxH : undefined, overflow: isPopover ? "hidden" : "visible", bg: colors.surfaceRaised, borderRadius: "xl", children: [_jsxs(Flex, { align: "center", justify: "space-between", gap: 2, px: 4, py: 3, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: [header !== null && header !== void 0 ? header : (_jsx(Text, { fontWeight: 700, fontSize: "0.9375rem", color: colors.header[900], children: "Notifications" })), headerAction] }), zones && zones.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification zones", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: zones.map((zone) => {
|
|
22
23
|
const isActive = zone.id === activeZone;
|
|
23
24
|
const label = zone.count ? `${zone.label} (${formatCount(zone.count)})` : zone.label;
|
|
24
25
|
return (_jsx(Button, { label: label, size: "xs", variant: isActive ? "solid" : "ghost", colorScheme: "primary", "aria-pressed": isActive, onClick: () => onZoneChange === null || onZoneChange === void 0 ? void 0 : onZoneChange(zone.id) }, zone.id));
|
|
25
|
-
}) })) : null, filters && filters.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification filters", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: colors
|
|
26
|
+
}) })) : null, filters && filters.length ? (_jsx(Flex, { role: "group", "aria-label": "Notification filters", gap: 2, px: 4, py: 2, borderBottom: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: filters.map((filter) => {
|
|
26
27
|
const isActive = filter.id === activeFilter;
|
|
27
28
|
const label = typeof filter.count === "number" ? `${filter.label} (${formatCount(filter.count)})` : filter.label;
|
|
28
29
|
return (_jsx(Button, { label: label, size: "xs", variant: isActive ? "solid" : "ghost", colorScheme: "secondary", "aria-pressed": isActive, onClick: () => onFilterChange === null || onFilterChange === void 0 ? void 0 : onFilterChange(filter.id) }, filter.id));
|
|
29
|
-
}) })) : null, _jsx(Box, { flex: "1", minH: 0, overflowY: isPopover ? "auto" : "visible", children: (activeZoneConfig === null || activeZoneConfig === void 0 ? void 0 : activeZoneConfig.render) ? (activeZoneConfig.render()) : isLoading ? (_jsx(Box, { p: 4, role: "status", "aria-live": "polite", "aria-label": "Loading notifications", children: [0, 1, 2, 3].map((rowIndex) => (_jsxs(Flex, { gap: 3, mt: rowIndex ? 4 : 0, align: "center", children: [_jsx(Skeletons, { type: "circle", size: "7" }), _jsxs(Box, { flex: "1", children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "70%" }), _jsx(Box, { mt: 1.5, children: _jsx(Skeletons, { type: "skeleton", height: "0.625rem", width: "45%" }) })] })] }, rowIndex))) })) : error ? (_jsx(EmptyState, { title: "Couldn't load notifications", description: error instanceof Error ? error.message : "Something went wrong. Try again.", icon: AlertCircle, colorScheme: "error", size: "sm", action: onRetry ? _jsx(Button, { label: "Retry", size: "sm", variant: "outline", colorScheme: "red", onClick: onRetry }) : undefined })) : items.length === 0 ? (_jsx(EmptyState, { ...(empty !== null && empty !== void 0 ? empty : DEFAULT_EMPTY) })) : (_jsxs(_Fragment, { children: [_jsx(NotificationList, { items: items, toItem: toItem, groupBy: groupBy, collapseGroups: collapseGroups, dayLabels: dayLabels, onItemClick: onItemClick, itemActions: itemActions, renderItem: renderItem, renderSectionHeader: renderSectionHeader, unreadIndicator: unreadIndicator, actionsAlwaysVisible: actionsAlwaysVisible, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Notifications" }), hasMore ? (_jsx(Flex, { justify: "center", py: 3, children: _jsx(Button, { label: "Load more", size: "sm", variant: "ghost", colorScheme: "primary", isLoading: isLoadingMore, onClick: onLoadMore }) })) : null] })) }), footer ? (_jsx(Box, { px: 4, py: 2.5, borderTop: "1px solid", borderColor: colors
|
|
30
|
+
}) })) : null, _jsx(Box, { flex: "1", minH: 0, overflowY: isPopover ? "auto" : "visible", children: (activeZoneConfig === null || activeZoneConfig === void 0 ? void 0 : activeZoneConfig.render) ? (activeZoneConfig.render()) : isLoading ? (_jsx(Box, { p: 4, role: "status", "aria-live": "polite", "aria-label": "Loading notifications", children: [0, 1, 2, 3].map((rowIndex) => (_jsxs(Flex, { gap: 3, mt: rowIndex ? 4 : 0, align: "center", children: [_jsx(Skeletons, { type: "circle", size: "7" }), _jsxs(Box, { flex: "1", children: [_jsx(Skeletons, { type: "skeleton", height: "0.75rem", width: "70%" }), _jsx(Box, { mt: 1.5, children: _jsx(Skeletons, { type: "skeleton", height: "0.625rem", width: "45%" }) })] })] }, rowIndex))) })) : error ? (_jsx(EmptyState, { title: "Couldn't load notifications", description: error instanceof Error ? error.message : "Something went wrong. Try again.", icon: AlertCircle, colorScheme: "error", size: "sm", action: onRetry ? _jsx(Button, { label: "Retry", size: "sm", variant: "outline", colorScheme: "red", onClick: onRetry }) : undefined })) : items.length === 0 ? (_jsx(EmptyState, { ...(empty !== null && empty !== void 0 ? empty : DEFAULT_EMPTY) })) : (_jsxs(_Fragment, { children: [_jsx(NotificationList, { items: items, toItem: toItem, groupBy: groupBy, collapseGroups: collapseGroups, dayLabels: dayLabels, onItemClick: onItemClick, itemActions: itemActions, renderItem: renderItem, renderSectionHeader: renderSectionHeader, unreadIndicator: unreadIndicator, actionsAlwaysVisible: actionsAlwaysVisible, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "Notifications" }), hasMore ? (_jsx(Flex, { justify: "center", py: 3, children: _jsx(Button, { label: "Load more", size: "sm", variant: "ghost", colorScheme: "primary", isLoading: isLoadingMore, onClick: onLoadMore }) })) : null] })) }), footer ? (_jsx(Box, { px: 4, py: 2.5, borderTop: "1px solid", borderColor: raisedRule(colors), flexShrink: 0, children: footer })) : null] }));
|
|
30
31
|
}
|
|
31
32
|
export default NotificationPanel;
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalCloseButton, ModalBody, HStack, VStack, } from "@chakra-ui/react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
5
6
|
import Button from "../Button/Button.js";
|
|
6
7
|
import TextInput from "../Input/TextInput.js";
|
|
7
8
|
const EMPTY = {
|
|
@@ -51,6 +52,6 @@ const CreateOrgModal = ({ isOpen, onClose, isLoading, onSubmit, labels, }) => {
|
|
|
51
52
|
phone: (_a = values === null || values === void 0 ? void 0 : values.phone) === null || _a === void 0 ? void 0 : _a.trim(),
|
|
52
53
|
});
|
|
53
54
|
};
|
|
54
|
-
return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, autoFocus: false, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: colors
|
|
55
|
+
return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, autoFocus: false, children: [_jsx(ModalOverlay, { backdropFilter: "blur(4px)" }), _jsxs(ModalContent, { bg: colors.surfaceRaised, borderRadius: "xl", overflow: "hidden", children: [_jsx(ModalHeader, { borderBottom: "1px solid", borderColor: raisedRule(colors), fontSize: "1.05rem", fontWeight: 600, children: labels.createOrganization }), _jsx(ModalCloseButton, {}), _jsxs(ModalBody, { py: 6, children: [_jsxs(VStack, { spacing: 4, align: "stretch", children: [_jsx(TextInput, { label: labels.companyName, value: values.company_name, onChange: (e) => setField("company_name", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Name", error: !!errors.company_name, errorMessage: errors.company_name }), _jsx(TextInput, { label: labels.companyAddress, value: values.company_address, onChange: (e) => setField("company_address", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Company Address", error: !!errors.company_address, errorMessage: errors.company_address }), _jsx(TextInput, { label: labels.phone, value: values.phone, onChange: (e) => setField("phone", e.target.value), isRequired: true, width: "100%", placeholder: "Enter Phone Number", error: !!errors.phone, errorMessage: errors.phone })] }), _jsxs(HStack, { justifyContent: "center", spacing: 4, mt: 6, children: [_jsx(Button, { label: labels.cancel, onClick: onClose, variant: "outline", colorScheme: "red", size: "sm" }), _jsx(Button, { label: labels.submit, onClick: handleSubmit, colorScheme: "primary", size: "sm", isLoading: isLoading })] })] })] })] }));
|
|
55
56
|
};
|
|
56
57
|
export default CreateOrgModal;
|
|
@@ -4,6 +4,7 @@ import { Avatar, Badge, Box, Flex, Heading, HStack, IconButton, Input, Skeleton,
|
|
|
4
4
|
import { ArrowLeft, Building2, Check, CheckCircle2, Crown, Globe, Mail, Pencil, Plus, Trash2, Users, X, } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
6
|
import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
7
|
+
import { bandOn } from "../../Theme/tokens/builders/planeStep.js";
|
|
7
8
|
import { resolveFilledSurface } from "../../Theme/tokens/builders/filledSurface.js";
|
|
8
9
|
import { resolveSoftTone } from "../../Theme/tokens/builders/tone.js";
|
|
9
10
|
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
@@ -72,7 +73,8 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
|
|
|
72
73
|
const primary50 = colors.primary[50];
|
|
73
74
|
const primary100 = colors.primary[100];
|
|
74
75
|
const primarySolid = resolveFilledSurface(colors.primary, colors);
|
|
75
|
-
const
|
|
76
|
+
const primaryTile = bandOn(primary50, surface);
|
|
77
|
+
const onPrimaryTile = accentTextOnCanvas(colors.primary, primaryTile);
|
|
76
78
|
const cardSx = {
|
|
77
79
|
backgroundColor: surface,
|
|
78
80
|
borderRadius: "xl",
|
|
@@ -126,12 +128,12 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
|
|
|
126
128
|
borderColor: colors.primary[300],
|
|
127
129
|
boxShadow: "lg",
|
|
128
130
|
transform: "translateY(-3px)",
|
|
129
|
-
}, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg:
|
|
131
|
+
}, children: [_jsxs(Flex, { justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsx(Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "lg", bg: primaryTile, color: onPrimaryTile, children: _jsx(Building2, { size: 18 }) }), _jsxs(HStack, { spacing: 1, children: [item.default === 1 ? (_jsxs(Badge, { colorScheme: "green", borderRadius: "full", px: 2, py: 0.5, display: "flex", alignItems: "center", gap: 1, fontSize: "0.7rem", fontWeight: 600, children: [_jsx(CheckCircle2, { size: 12 }), labels.default] })) : isSwitching ? (_jsxs(Flex, { align: "center", gap: 2, color: colors.accentText, children: [_jsx(Spinner, { size: "sm" }), _jsx(Text, { fontSize: "xs", children: labels.settingDefault })] })) : (_jsxs(Flex, { align: "center", gap: 1, fontSize: "xs", color: colors.accentText, fontWeight: 600, cursor: "pointer", _hover: { color: colors.primary[700], gap: 2 }, transition: transitionFor(["color", "gap"]), sx: reducedMotionSx(), role: "button", tabIndex: 0, _focusVisible: focusVisibleRing(colors), onClick: () => onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId), onKeyDown: (e) => {
|
|
130
132
|
if (e.key !== "Enter" && e.key !== " ")
|
|
131
133
|
return;
|
|
132
134
|
e.preventDefault();
|
|
133
135
|
onSetDefault === null || onSetDefault === void 0 ? void 0 : onSetDefault(item.orgId);
|
|
134
|
-
}, children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color:
|
|
136
|
+
}, children: [_jsx(CheckCircle2, { size: 12 }), _jsx(Text, { children: labels.setAsDefault })] })), canEdit && (_jsx(Tooltip, { label: labels.editOrganization, hasArrow: true, children: _jsx(IconButton, { "aria-label": labels.editOrganization, icon: _jsx(Pencil, { size: 12 }), size: "xs", variant: "ghost", color: muted, borderRadius: "full", _hover: { color: onPrimaryTile, bg: primaryTile }, onClick: () => startEditing(item) }) })), _jsx(Tooltip, { label: isProtected
|
|
135
137
|
? ((_d = item.deleteDisabledReason) !== null && _d !== void 0 ? _d : labels.protectedOrganization)
|
|
136
138
|
: labels.deleteOrganization, hasArrow: true, children: isProtected ? (_jsx(Box, { as: "span", display: "inline-flex", children: deleteButton })) : (deleteButton) })] })] }), isEditingThis ? (_jsxs(Box, { children: [_jsxs(HStack, { spacing: 1, children: [_jsx(Input, { value: editValue, onChange: (e) => {
|
|
137
139
|
setEditValue(e.target.value);
|
|
@@ -4,9 +4,13 @@ import { Box, Image, IconButton, Input, Text, Tooltip, HStack, } from "@chakra-u
|
|
|
4
4
|
import { Eye, FileText, SquarePen, User } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
6
|
import { BORDER_WIDTHS } from "../../Theme/tokens/primitives/borderWidths.js";
|
|
7
|
+
import { transitionFor } from "../../Theme/tokens/primitives/motion.js";
|
|
7
8
|
import { accentTextOnCanvas } from "../../Theme/tokens/builders/accentText.js";
|
|
8
9
|
import { labelOnFill, solidFillRung } from "../../Theme/tokens/builders/filledSurface.js";
|
|
9
10
|
import { hexToRgb } from "../../Theme/tokens/builders/color.js";
|
|
11
|
+
const RING_TRANSITION = transitionFor(["box-shadow"], "base");
|
|
12
|
+
const FADE_TRANSITION = transitionFor(["opacity"], "base");
|
|
13
|
+
const ACTION_TRANSITION = transitionFor(["transform", "background", "box-shadow"], "base");
|
|
10
14
|
/** Avatar display with optional edit/view actions — does not crop, resize, or upload; PDF detection breaks on a freshly-picked file. */
|
|
11
15
|
export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth = "100px", imageAlt = "Profile Photo", imageObjectFit = "cover", imageBorderRadius = "full", editIconSize = "sm", editIconPositionRight = "0px", editIconPositionBottom = "0px", isRound = true, boxStyle, isEditable = false, isView = false, style, handleIsView, fallbackText, revealOnHover = true, }) {
|
|
12
16
|
var _a, _b, _c, _d, _e;
|
|
@@ -62,13 +66,13 @@ export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth
|
|
|
62
66
|
return (_jsx(Box, { ...mediaFrame, display: "flex", alignItems: "center", justifyContent: "center", bg: c.primary.opacity[16], color: accentTextOnCanvas(c.primary, c.backgroundColor.main), children: fallbackText ? (_jsx(Text, { fontSize: "1.75rem", fontWeight: 700, lineHeight: "1", children: fallbackText })) : (_jsx(User, { size: "48%" })) }));
|
|
63
67
|
};
|
|
64
68
|
const hasActions = isEditable || isView;
|
|
65
|
-
return (_jsxs(Box, { position: "relative", display: "inline-block", style: boxStyle, borderRadius: imageBorderRadius, transition:
|
|
69
|
+
return (_jsxs(Box, { position: "relative", display: "inline-block", style: boxStyle, borderRadius: imageBorderRadius, transition: RING_TRANSITION, sx: {
|
|
66
70
|
"&:hover .ppv-overlay": { opacity: 1 },
|
|
67
71
|
"&:hover .ppv-actions": { opacity: 1 },
|
|
68
72
|
"&:hover .ppv-media": {
|
|
69
73
|
boxShadow: `0 0 0 0.1875rem ${c.primary.opacity[24]}`,
|
|
70
74
|
},
|
|
71
|
-
}, children: [_jsx(Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition:
|
|
75
|
+
}, children: [_jsx(Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition: RING_TRANSITION, children: renderMedia() }), hasActions && (_jsxs(_Fragment, { children: [_jsx(Box, { className: "ppv-overlay", position: "absolute", inset: 0, borderRadius: imageBorderRadius, bg: hoverScrim(0.3), opacity: 0, transition: FADE_TRANSITION, pointerEvents: "none" }), _jsxs(HStack, { className: "ppv-actions", position: "absolute", right: editIconPositionRight, bottom: editIconPositionBottom, transform: "translate(-15%, -15%)", spacing: 1.5, opacity: revealOnHover ? 0 : 1, transition: FADE_TRANSITION, children: [isEditable && (_jsx(Tooltip, { label: "Edit", "aria-label": "Edit", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(SquarePen, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleClick, "aria-label": "Edit photo", bg: c.primary[solidFillRung(c.primary, c.white)], color: labelOnFill(c.primary[solidFillRung(c.primary, c.white)], c.white, c.black), border: `0.125rem solid ${c.background[50]}`, boxShadow: (_b = theme.shadows) === null || _b === void 0 ? void 0 : _b.md, style: style, transition: ACTION_TRANSITION, _hover: {
|
|
72
76
|
bg: c.primary[600],
|
|
73
77
|
color: labelOnFill(c.primary[600], c.white, c.black),
|
|
74
78
|
transform: "scale(1.1)",
|
|
@@ -76,7 +80,7 @@ export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth
|
|
|
76
80
|
}, _active: {
|
|
77
81
|
bg: c.primary[700],
|
|
78
82
|
color: labelOnFill(c.primary[700], c.white, c.black),
|
|
79
|
-
} }) })), isView && (_jsx(Tooltip, { label: "View", "aria-label": "View", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Eye, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleIsView, "aria-label": "View photo", bg: c.background[50], color: c.text[700], border: `${BORDER_WIDTHS.hairline} solid ${border}`, boxShadow: (_d = theme.shadows) === null || _d === void 0 ? void 0 : _d.md, style: style, transition:
|
|
83
|
+
} }) })), isView && (_jsx(Tooltip, { label: "View", "aria-label": "View", hasArrow: true, children: _jsx(IconButton, { icon: _jsx(Eye, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleIsView, "aria-label": "View photo", bg: c.background[50], color: c.text[700], border: `${BORDER_WIDTHS.hairline} solid ${border}`, boxShadow: (_d = theme.shadows) === null || _d === void 0 ? void 0 : _d.md, style: style, transition: ACTION_TRANSITION, _hover: {
|
|
80
84
|
bg: c.gray[50],
|
|
81
85
|
color: accentTextOnCanvas(c.primary, c.gray[50]),
|
|
82
86
|
transform: "scale(1.1)",
|
|
@@ -5,6 +5,7 @@ import { Check, ChevronDown, ChevronUp, CircleX, Plus, X } from "lucide-react";
|
|
|
5
5
|
import { TextLabel } from "../Common/FormLabel.js";
|
|
6
6
|
import Tag from "../Tag/Tag.js";
|
|
7
7
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
8
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
8
9
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
9
10
|
import { optionRowSpec } from "../../Theme/tokens/primitives/optionRowSizes.js";
|
|
10
11
|
import { optionRowInk, optionRowWeight } from "../Select/optionRowInk.js";
|
|
@@ -22,6 +23,7 @@ import SelectTruncatedLabel from "./SelectTruncatedLabel.js";
|
|
|
22
23
|
import { getSearchSelectSizeStyles, } from "./searchSelectSize.js";
|
|
23
24
|
import Checkbox from "../Checkbox/Checkbox.js";
|
|
24
25
|
import { rafThrottle } from "../../Utils/rafThrottle.js";
|
|
26
|
+
import { ADD_NEW_ROW, NO_ROW, SELECT_ALL_ROW, firstRow, hasRow, lastRow, stepRow } from "./searchSelectNav.js";
|
|
25
27
|
const SEGMENT_TRANSITION = transitionFor(["background-color", "box-shadow"]);
|
|
26
28
|
const CHEVRON_TRANSITION = transitionFor(["transform", "color"], "base");
|
|
27
29
|
const normalizeSingleValue = (val) => {
|
|
@@ -49,7 +51,7 @@ const OptionRow = React.memo(function OptionRow({ option, index, optionId, isSel
|
|
|
49
51
|
bg: isSelected ? rowBackgrounds.selectedActive : rowBackgrounds.active,
|
|
50
52
|
}, onClick: () => onSelect(option), onMouseEnter: () => onActivate(index), display: "flex", alignItems: "center", gap: spec.gap, color: optionRowInk(colors, singleSelected),
|
|
51
53
|
// `view` is consumer JSX with no size of its own; it inherited the 16px body font.
|
|
52
|
-
fontSize: spec.fontSize, fontWeight: optionRowWeight(singleSelected), borderBottom: `${BORDER_WIDTHS.hairline} solid ${colors
|
|
54
|
+
fontSize: spec.fontSize, fontWeight: optionRowWeight(singleSelected), borderBottom: `${BORDER_WIDTHS.hairline} solid ${raisedRule(colors)}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected, sx: DECORATIVE_CHECKBOX_SX, size: checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { isTruncated: true, children: option.label })), singleSelected && (_jsx(Box, { as: Check, size: spec.iconSize, color: colors.accentText, flexShrink: 0 }))] }));
|
|
53
55
|
});
|
|
54
56
|
/** Full-featured combobox: search, chips, select-all, paginated infinite scroll — not DOM-virtualized despite the `virtualization` prop. */
|
|
55
57
|
/** Prefer `Select` with `native={false}` for new work — not yet a drop-in; see select-absorption-spec.md. */
|
|
@@ -94,7 +96,9 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
94
96
|
const listboxId = `${baseId}-listbox`;
|
|
95
97
|
const insideSelectPortalId = `${baseId}-inside-select`;
|
|
96
98
|
const getOptionId = (index) => `${baseId}-option-${index}`;
|
|
97
|
-
const
|
|
99
|
+
const selectAllId = `${baseId}-select-all`;
|
|
100
|
+
const addNewId = `${baseId}-add-new`;
|
|
101
|
+
const [activeIndex, setActiveIndex] = useState(NO_ROW);
|
|
98
102
|
const pendingFocusRestoreRef = useRef(false);
|
|
99
103
|
// NOTE: the ARIA host follows real focus; opening from a button doesn't move it.
|
|
100
104
|
const [focusedTrigger, setFocusedTrigger] = useState(null);
|
|
@@ -190,9 +194,22 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
190
194
|
}
|
|
191
195
|
setInputValue("");
|
|
192
196
|
};
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
197
|
+
const hasSelectAllRow = isMultiple && isSelectAll;
|
|
198
|
+
const hasAddNewRow = Boolean(addNew === null || addNew === void 0 ? void 0 : addNew.enabled);
|
|
199
|
+
const rowLayout = {
|
|
200
|
+
optionCount: filteredOptions.length,
|
|
201
|
+
hasSelectAll: hasSelectAllRow,
|
|
202
|
+
hasAddNew: hasAddNewRow,
|
|
203
|
+
};
|
|
204
|
+
const activeOptionId = !isOpen
|
|
205
|
+
? undefined
|
|
206
|
+
: activeIndex === SELECT_ALL_ROW && hasSelectAllRow
|
|
207
|
+
? selectAllId
|
|
208
|
+
: activeIndex === ADD_NEW_ROW && hasAddNewRow
|
|
209
|
+
? addNewId
|
|
210
|
+
: activeIndex >= 0 && filteredOptions[activeIndex]
|
|
211
|
+
? getOptionId(activeIndex)
|
|
212
|
+
: undefined;
|
|
196
213
|
// One element hosts the field's ARIA at a time: real focus wins, else render state.
|
|
197
214
|
const primaryTarget = focusedTrigger !== null && focusedTrigger !== void 0 ? focusedTrigger : (isOpen || inputValue || !selectedValues.length
|
|
198
215
|
? "input"
|
|
@@ -235,19 +252,14 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
235
252
|
setIsOpen(true);
|
|
236
253
|
};
|
|
237
254
|
const moveActive = (delta) => {
|
|
238
|
-
setActiveIndex((prev) =>
|
|
239
|
-
if (!filteredOptions.length)
|
|
240
|
-
return -1;
|
|
241
|
-
if (prev < 0)
|
|
242
|
-
return delta > 0 ? 0 : filteredOptions.length - 1;
|
|
243
|
-
return (prev + delta + filteredOptions.length) % filteredOptions.length;
|
|
244
|
-
});
|
|
255
|
+
setActiveIndex((prev) => stepRow(rowLayout, prev, delta));
|
|
245
256
|
};
|
|
246
257
|
const restoreFocus = () => {
|
|
247
258
|
pendingFocusRestoreRef.current = true;
|
|
248
259
|
};
|
|
249
260
|
// NOTE: only reacts to keys from the combobox triggers — without this guard, Tag's own "Remove" button lost its clicks.
|
|
250
261
|
const handleControlKeyDown = (e) => {
|
|
262
|
+
var _a;
|
|
251
263
|
const target = e.target;
|
|
252
264
|
const isKnownTrigger = target === inputRef.current ||
|
|
253
265
|
target === triggerButtonRef.current ||
|
|
@@ -275,15 +287,15 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
275
287
|
}
|
|
276
288
|
break;
|
|
277
289
|
case "Home":
|
|
278
|
-
if (isOpen &&
|
|
290
|
+
if (isOpen && firstRow(rowLayout) !== NO_ROW && !isTextInputTarget) {
|
|
279
291
|
e.preventDefault();
|
|
280
|
-
setActiveIndex(
|
|
292
|
+
setActiveIndex(firstRow(rowLayout));
|
|
281
293
|
}
|
|
282
294
|
break;
|
|
283
295
|
case "End":
|
|
284
|
-
if (isOpen &&
|
|
296
|
+
if (isOpen && lastRow(rowLayout) !== NO_ROW && !isTextInputTarget) {
|
|
285
297
|
e.preventDefault();
|
|
286
|
-
setActiveIndex(
|
|
298
|
+
setActiveIndex(lastRow(rowLayout));
|
|
287
299
|
}
|
|
288
300
|
break;
|
|
289
301
|
case "Enter":
|
|
@@ -291,6 +303,14 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
291
303
|
e.preventDefault();
|
|
292
304
|
openMenu();
|
|
293
305
|
}
|
|
306
|
+
else if (activeIndex === SELECT_ALL_ROW && hasSelectAllRow) {
|
|
307
|
+
e.preventDefault();
|
|
308
|
+
handleSelectAll();
|
|
309
|
+
}
|
|
310
|
+
else if (activeIndex === ADD_NEW_ROW && (addNew === null || addNew === void 0 ? void 0 : addNew.enabled)) {
|
|
311
|
+
e.preventDefault();
|
|
312
|
+
(_a = addNew.onClick) === null || _a === void 0 ? void 0 : _a.call(addNew);
|
|
313
|
+
}
|
|
294
314
|
else if (activeIndex >= 0 && filteredOptions[activeIndex]) {
|
|
295
315
|
e.preventDefault();
|
|
296
316
|
handleSelect(filteredOptions[activeIndex]);
|
|
@@ -309,7 +329,7 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
309
329
|
if (isOpen) {
|
|
310
330
|
e.preventDefault();
|
|
311
331
|
setIsOpen(false);
|
|
312
|
-
setActiveIndex(
|
|
332
|
+
setActiveIndex(NO_ROW);
|
|
313
333
|
restoreFocus();
|
|
314
334
|
}
|
|
315
335
|
break;
|
|
@@ -321,11 +341,12 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
321
341
|
// (e.g. typing), rather than leaving it pointing at a now out-of-range or stale option.
|
|
322
342
|
useEffect(() => {
|
|
323
343
|
if (!isOpen) {
|
|
324
|
-
setActiveIndex(
|
|
344
|
+
setActiveIndex(NO_ROW);
|
|
325
345
|
return;
|
|
326
346
|
}
|
|
327
|
-
|
|
328
|
-
|
|
347
|
+
const layout = { optionCount: filteredOptions.length, hasSelectAll: hasSelectAllRow, hasAddNew: hasAddNewRow };
|
|
348
|
+
setActiveIndex((prev) => (hasRow(prev, layout) ? prev : NO_ROW));
|
|
349
|
+
}, [isOpen, filteredOptions.length, hasSelectAllRow, hasAddNewRow]);
|
|
329
350
|
useEffect(() => {
|
|
330
351
|
var _a, _b;
|
|
331
352
|
if (!isOpen || activeIndex < 0 || !optionsListRef.current)
|
|
@@ -640,6 +661,6 @@ const SearchSelect = ({ id, label, options, onChange, onSelect, onSearch, isOpti
|
|
|
640
661
|
top: `${dropdownPos.top}px`,
|
|
641
662
|
left: `${dropdownPos.left}px`,
|
|
642
663
|
width: `${dropdownPos.width}px`,
|
|
643
|
-
}, zIndex: zIndices.popover, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "xl", overflow: "hidden", bg: theme.colors.surfaceRaised, boxShadow: theme.shadows.lg, display: "flex", flexDirection: "column", children: [
|
|
664
|
+
}, zIndex: zIndices.popover, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "xl", overflow: "hidden", bg: theme.colors.surfaceRaised, boxShadow: theme.shadows.lg, display: "flex", flexDirection: "column", children: [hasSelectAllRow && (_jsxs(Box, { id: selectAllId, role: "option", "aria-selected": allFilteredSelected, bg: activeIndex === SELECT_ALL_ROW ? rowBackgrounds.active : undefined, py: spec.py, px: spec.px, minH: spec.minH, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: spec.gap, color: theme.colors.text[700], borderBottom: `${BORDER_WIDTHS.hairline} solid ${raisedRule(theme.colors)}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: DECORATIVE_CHECKBOX_SX, size: s.checkboxSize }), _jsx(Text, { fontSize: spec.fontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { ref: optionsListRef, flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: `${BORDER_WIDTHS.hairline} solid`, borderColor: raisedRule(theme.colors), children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: spec.fontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: spec.fontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsx(OptionRow, { option: option, index: index, optionId: getOptionId(index), isSelected: isSelected(option.id), isActive: index === activeIndex, isMultiple: isMultiple, spec: spec, colors: theme.colors, rowBackgrounds: rowBackgrounds, checkboxSize: s.checkboxSize, onSelect: selectOption, onActivate: setActiveIndex }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: spec.py, px: spec.px, display: "flex", alignItems: "center", justifyContent: "center", gap: spec.gap, minH: spec.minH, color: theme.colors.textMuted, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: spec.fontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { id: addNewId, role: "option", "aria-selected": false, py: spec.py, px: spec.px, borderTop: `${BORDER_WIDTHS.hairline} solid`, borderColor: raisedRule(theme.colors), bg: activeIndex === ADD_NEW_ROW ? rowBackgrounds.active : theme.colors.surfaceRaised, display: "flex", alignItems: "center", gap: spec.gap, color: theme.colors.accentText, fontWeight: 500, minH: spec.minH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: rowBackgrounds.active }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: spec.fontSize, children: addNew.text || "Add New" })] }))] }) })), _jsx(FieldMessage, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }));
|
|
644
665
|
};
|
|
645
666
|
export default SearchSelect;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const NO_ROW = -1;
|
|
2
|
+
export const SELECT_ALL_ROW = -2;
|
|
3
|
+
export const ADD_NEW_ROW = -3;
|
|
4
|
+
export const navRows = ({ optionCount, hasSelectAll, hasAddNew }) => [
|
|
5
|
+
...(hasSelectAll ? [SELECT_ALL_ROW] : []),
|
|
6
|
+
...Array.from({ length: optionCount }, (_, index) => index),
|
|
7
|
+
...(hasAddNew ? [ADD_NEW_ROW] : []),
|
|
8
|
+
];
|
|
9
|
+
export const hasRow = (row, { optionCount, hasSelectAll, hasAddNew }) => (row >= 0 && row < optionCount) || (row === SELECT_ALL_ROW && hasSelectAll) || (row === ADD_NEW_ROW && hasAddNew);
|
|
10
|
+
export const stepRow = (layout, current, delta) => {
|
|
11
|
+
const rows = navRows(layout);
|
|
12
|
+
if (!rows.length)
|
|
13
|
+
return NO_ROW;
|
|
14
|
+
const at = rows.indexOf(current);
|
|
15
|
+
if (at < 0)
|
|
16
|
+
return delta > 0 ? rows[0] : rows[rows.length - 1];
|
|
17
|
+
return rows[(at + delta + rows.length) % rows.length];
|
|
18
|
+
};
|
|
19
|
+
export const firstRow = ({ optionCount, hasSelectAll, hasAddNew }) => {
|
|
20
|
+
if (hasSelectAll)
|
|
21
|
+
return SELECT_ALL_ROW;
|
|
22
|
+
if (optionCount > 0)
|
|
23
|
+
return 0;
|
|
24
|
+
return hasAddNew ? ADD_NEW_ROW : NO_ROW;
|
|
25
|
+
};
|
|
26
|
+
export const lastRow = ({ optionCount, hasSelectAll, hasAddNew }) => {
|
|
27
|
+
if (hasAddNew)
|
|
28
|
+
return ADD_NEW_ROW;
|
|
29
|
+
if (optionCount > 0)
|
|
30
|
+
return optionCount - 1;
|
|
31
|
+
return hasSelectAll ? SELECT_ALL_ROW : NO_ROW;
|
|
32
|
+
};
|
|
@@ -3,6 +3,7 @@ import React, { forwardRef, useCallback, useEffect, useLayoutEffect, useMemo, us
|
|
|
3
3
|
import { Box, Checkbox, FormControl, Input, Popover, PopoverAnchor, PopoverContent, Portal, Spinner, useDisclosure, useMergeRefs, } from "@chakra-ui/react";
|
|
4
4
|
import { Check, ChevronDown, X } from "lucide-react";
|
|
5
5
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
6
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
6
7
|
import { focusGlowShadow } from "../../Theme/chakra/focusRing.styles.js";
|
|
7
8
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
8
9
|
import { optionRowDescriptionInk, optionRowInk, optionRowWeight } from "./optionRowInk.js";
|
|
@@ -436,7 +437,7 @@ const SelectPopup = forwardRef(function SelectPopup(props, ref) {
|
|
|
436
437
|
const selectedValueIds = selectedOptions.map((option) => option.id.toString());
|
|
437
438
|
const hiddenValues = !name ? [] : props.isMulti ? selectedValueIds : [(_c = selectedValueIds[0]) !== null && _c !== void 0 ? _c : ""];
|
|
438
439
|
const groupedRows = useMemo(() => (hasGroups ? buildGroupedRows(filteredOptions) : []), [hasGroups, filteredOptions]);
|
|
439
|
-
return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, isReadOnly: isReadOnly, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: ids.inputId, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "div", ref: mergedTriggerRef, ...ids.controlProps, role: "combobox", tabIndex: isDisabled ? -1 : 0, "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-owns": `${listboxId} ${filterInputId}`, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled || undefined, "data-readonly": isReadOnly || undefined, "aria-required": isRequired || undefined, "aria-label": triggerAriaLabel(), "aria-labelledby": ariaLabelledBy, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", textAlign: "left", cursor: isDisabled ? "not-allowed" : isReadOnly ? "default" : "pointer", "data-testid": dataTestId, sx: triggerSx, children: [_jsx(Box, { as: "span", display: "inline-flex", flexWrap: showChips ? "wrap" : "nowrap", alignItems: "center", gap: showChips ? 1 : 1.5, minW: 0, flex: 1, isTruncated: !showChips, children: showChips ? (_jsxs(_Fragment, { children: [visibleChipOptions.map((option) => (_jsx(Tag, { label: String(option.label), size: chipSize, variant: "subtle", icon: isInteractive ? X : undefined, onIconClick: isInteractive ? () => handleSelect(option) : undefined }, option.id))), overflowChipCount > 0 && (_jsx(Tag, { label: `+${overflowChipCount}`, size: chipSize, variant: "subtle", colorScheme: "gray" }))] })) : (_jsxs(_Fragment, { children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] })) }), showClear && (_jsx(Box, { as: "button", type: "button", "aria-label": "Clear selection", onClick: handleClear, display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, ml: 2, color: colors.textMuted, _hover: { color: colors.text[700] }, children: _jsx(X, { size: CONTROL_SIZES[size].iconSize }) })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: CHEVRON_TRANSITION, transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: colors.textMuted, sx: reducedMotionSx(), children: _jsx(ChevronDown, { size: CONTROL_SIZES[size].iconSize }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { "aria-label": (_d = label !== null && label !== void 0 ? label : ariaLabel) !== null && _d !== void 0 ? _d : placeholder, width: "max-content", minWidth: triggerWidth ? `${triggerWidth}px` : undefined, maxWidth: "min(24rem, calc(100vw - 2rem))", borderRadius: "xl", boxShadow: theme.shadows.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [_jsx(Box, { p: spec.mx, borderBottom: `${BORDER_WIDTHS.hairline} solid ${colors
|
|
440
|
+
return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, isReadOnly: isReadOnly, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: ids.inputId, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "div", ref: mergedTriggerRef, ...ids.controlProps, role: "combobox", tabIndex: isDisabled ? -1 : 0, "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-owns": `${listboxId} ${filterInputId}`, "aria-activedescendant": activeDescendantId, "aria-disabled": isDisabled || undefined, "data-readonly": isReadOnly || undefined, "aria-required": isRequired || undefined, "aria-label": triggerAriaLabel(), "aria-labelledby": ariaLabelledBy, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", textAlign: "left", cursor: isDisabled ? "not-allowed" : isReadOnly ? "default" : "pointer", "data-testid": dataTestId, sx: triggerSx, children: [_jsx(Box, { as: "span", display: "inline-flex", flexWrap: showChips ? "wrap" : "nowrap", alignItems: "center", gap: showChips ? 1 : 1.5, minW: 0, flex: 1, isTruncated: !showChips, children: showChips ? (_jsxs(_Fragment, { children: [visibleChipOptions.map((option) => (_jsx(Tag, { label: String(option.label), size: chipSize, variant: "subtle", icon: isInteractive ? X : undefined, onIconClick: isInteractive ? () => handleSelect(option) : undefined }, option.id))), overflowChipCount > 0 && (_jsx(Tag, { label: `+${overflowChipCount}`, size: chipSize, variant: "subtle", colorScheme: "gray" }))] })) : (_jsxs(_Fragment, { children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] })) }), showClear && (_jsx(Box, { as: "button", type: "button", "aria-label": "Clear selection", onClick: handleClear, display: "inline-flex", alignItems: "center", justifyContent: "center", flexShrink: 0, ml: 2, color: colors.textMuted, _hover: { color: colors.text[700] }, children: _jsx(X, { size: CONTROL_SIZES[size].iconSize }) })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: CHEVRON_TRANSITION, transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: colors.textMuted, sx: reducedMotionSx(), children: _jsx(ChevronDown, { size: CONTROL_SIZES[size].iconSize }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { "aria-label": (_d = label !== null && label !== void 0 ? label : ariaLabel) !== null && _d !== void 0 ? _d : placeholder, width: "max-content", minWidth: triggerWidth ? `${triggerWidth}px` : undefined, maxWidth: "min(24rem, calc(100vw - 2rem))", borderRadius: "xl", boxShadow: theme.shadows.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [_jsx(Box, { p: spec.mx, borderBottom: `${BORDER_WIDTHS.hairline} solid ${raisedRule(colors)}`, display: isSearchable ? undefined : "none", children: _jsx(Input, { ref: filterInputRef, id: filterInputId, size: size, px: spec.px, placeholder: "Type to filter...", value: currentSearch, onChange: handleFilterChange, "aria-activedescendant": activeDescendantId, "aria-controls": listboxId, "aria-label": "Filter options", tabIndex: isSearchable ? undefined : -1 }) }), _jsxs(Box, { id: listboxId, ref: listRef, role: "listbox", "aria-label": (_e = label !== null && label !== void 0 ? label : ariaLabel) !== null && _e !== void 0 ? _e : placeholder, "aria-multiselectable": props.isMulti || undefined, "aria-busy": isLoading || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, onScroll: handleListScroll, children: [filteredOptions.length === 0 && !isLoading && !showCreateRow && (_jsx(Box, { mx: spec.mx, px: spec.px, py: spec.py, fontSize: spec.fontSize, color: colors.textMuted, children: noOptionsMessage !== null && noOptionsMessage !== void 0 ? noOptionsMessage : "No Options" })), showCreateRow && (_jsx(Box, { id: createRowId, role: "option", "aria-selected": false, "data-index": -1, onClick: handleCreate, mx: spec.mx, px: spec.px, py: spec.py, minH: spec.minH, borderRadius: "md", cursor: "pointer", fontSize: spec.fontSize, fontWeight: 600, color: colors.primary[600], bg: activeDescendantId === createRowId ? rowBackgrounds.active : "transparent", children: createLabel ? createLabel(currentSearch.trim()) : `Create "${currentSearch.trim()}"` })), hasGroups
|
|
440
441
|
? groupedRows.map((row) => {
|
|
441
442
|
var _a;
|
|
442
443
|
return row.kind === "header" ? (_jsx(Box, { mx: spec.mx, px: spec.px, pt: 2, pb: 1, fontSize: "xs-minus", fontWeight: 600, textTransform: "uppercase", letterSpacing: "0.03em", color: colors.textMuted, children: row.group }, row.key)) : (_jsx(OptionRow, { option: row.option, index: row.index, listboxId: listboxId, isSelected: selectedIds.has(row.option.id.toString()), isActive: row.index === activeIndex, isMulti: (_a = props.isMulti) !== null && _a !== void 0 ? _a : false, theme: theme, backgrounds: rowBackgrounds, spec: spec, renderOption: renderOption, onSelect: handleSelect, onActivate: setActiveIndex }, row.key));
|
|
@@ -12,6 +12,7 @@ import { DEFAULT_CONTROL_SIZE } from "../../Theme/tokens/primitives/controlSizes
|
|
|
12
12
|
import { optionRowSpec, OPTION_ROW_RADIUS } from "../../Theme/tokens/primitives/optionRowSizes.js";
|
|
13
13
|
import { reducedMotionSx } from "../../Theme/chakra/motion.js";
|
|
14
14
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
15
|
+
import { raisedRule } from "../../Theme/tokens/builders/surfaceRaised.js";
|
|
15
16
|
import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
|
|
16
17
|
import { optionRowDescriptionInk, optionRowInk, optionRowWeight } from "../Select/optionRowInk.js";
|
|
17
18
|
import { useExclusiveOverlay } from "../../Hooks/useExclusiveOverlay.js";
|
|
@@ -229,7 +230,7 @@ export default function SelectSearch({ options, initialSelectedOption, onOptionS
|
|
|
229
230
|
return;
|
|
230
231
|
}
|
|
231
232
|
openDropdown();
|
|
232
|
-
}, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-required": isRequired || undefined, cursor: "pointer", sx: { ...fieldControlStyles(theme.colors), ...controlSizeStyles(size), ...reducedMotionSx() }, style: inputStyle }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", height: "100%", display: "flex", alignItems: "center", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "0.313rem", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: `${BORDER_WIDTHS.hairline} solid`, borderColor: theme.colors.boxborder[200], borderRadius: "xl", boxShadow: theme.shadows.lg, bg: theme.colors.surfaceRaised, maxHeight: "9.375rem", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs, size: size, isMultipleSelect: isMultipleSelect }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.surfaceRaised, display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors
|
|
233
|
+
}, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-required": isRequired || undefined, cursor: "pointer", sx: { ...fieldControlStyles(theme.colors), ...controlSizeStyles(size), ...reducedMotionSx() }, style: inputStyle }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", height: "100%", display: "flex", alignItems: "center", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "0.313rem", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: `${BORDER_WIDTHS.hairline} solid`, borderColor: theme.colors.boxborder[200], borderRadius: "xl", boxShadow: theme.shadows.lg, bg: theme.colors.surfaceRaised, maxHeight: "9.375rem", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs, size: size, isMultipleSelect: isMultipleSelect }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.surfaceRaised, display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: raisedRule(theme.colors), zIndex: 1, borderTop: `1px solid ${raisedRule(theme.colors)}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "sm", color: BottomTextColor
|
|
233
234
|
? BottomTextColor
|
|
234
235
|
: theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), _jsx(FieldMessage, { error: error, errorMessage: errorMessage, helperText: helperText, helperId: ids.helperId, errorId: ids.errorId })] }) }) }));
|
|
235
236
|
}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { Box, Divider, Flex, Grid, Text } from "@chakra-ui/react";
|
|
3
3
|
import { cloneElement, isValidElement, useId } from "react";
|
|
4
4
|
import { useCustomTheme } from "../../Theme/useCustomTheme.js";
|
|
5
|
+
import { cardRule } from "../../Theme/tokens/builders/planeStep.js";
|
|
5
6
|
/** One settings-form row: title + description left, one right-aligned control; stacks on mobile. */
|
|
6
7
|
const SettingRow = ({ title, description, control, htmlFor, descriptionId, isDisabled = false }) => {
|
|
7
8
|
var _a;
|
|
@@ -17,6 +18,6 @@ const SettingRow = ({ title, description, control, htmlFor, descriptionId, isDis
|
|
|
17
18
|
"aria-describedby": (_a = controlProps === null || controlProps === void 0 ? void 0 : controlProps["aria-describedby"]) !== null && _a !== void 0 ? _a : resolvedDescriptionId,
|
|
18
19
|
})
|
|
19
20
|
: control;
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx(Divider, { borderColor: colors
|
|
21
|
+
return (_jsxs(_Fragment, { children: [_jsx(Divider, { borderColor: cardRule(colors) }), _jsxs(Grid, { templateColumns: { base: "1fr", md: "15rem 1fr" }, gap: { base: 2, md: 6 }, py: 4, alignItems: "start", opacity: isDisabled ? 0.5 : 1, "aria-disabled": isDisabled || undefined, children: [_jsxs(Box, { children: [htmlFor ? (_jsx(Text, { as: "label", htmlFor: htmlFor, display: "block", fontSize: "sm", fontWeight: 500, color: colors.text[800], children: title })) : (_jsx(Text, { id: titleId, fontSize: "sm", fontWeight: 500, color: colors.text[800], children: title })), _jsx(Text, { id: resolvedDescriptionId, mt: 0.5, fontSize: "xs-plus", color: colors.textMuted, children: description })] }), _jsx(Flex, { minW: 0, justify: { base: "flex-start", md: "flex-end" }, children: namedControl })] })] }));
|
|
21
22
|
};
|
|
22
23
|
export default SettingRow;
|