@d4gger/design-system 4.0.0 → 4.0.1
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/brand-effects.css +5 -3
- package/dist/components/alert/Alert.cjs +17 -3
- package/dist/components/alert/Alert.cjs.map +2 -2
- package/dist/components/alert/Alert.d.cts +6 -0
- package/dist/components/alert/Alert.d.cts.map +1 -1
- package/dist/components/alert/Alert.d.mts +6 -0
- package/dist/components/alert/Alert.d.mts.map +1 -1
- package/dist/components/alert/Alert.d.ts +6 -0
- package/dist/components/alert/Alert.d.ts.map +1 -1
- package/dist/components/alert/Alert.js +17 -3
- package/dist/components/alert/Alert.js.map +2 -2
- package/dist/components/alert.css +62 -5
- package/dist/components/bottom-dock.css +8 -0
- package/dist/components/bottomDock/BottomDock.cjs +1 -1
- package/dist/components/bottomDock/BottomDock.cjs.map +2 -2
- package/dist/components/bottomDock/BottomDock.js +1 -1
- package/dist/components/bottomDock/BottomDock.js.map +2 -2
- package/dist/components/bottomDock/bottomDock.props.cjs +1 -1
- package/dist/components/bottomDock/bottomDock.props.cjs.map +2 -2
- package/dist/components/bottomDock/bottomDock.props.d.cts +2 -2
- package/dist/components/bottomDock/bottomDock.props.d.cts.map +1 -1
- package/dist/components/bottomDock/bottomDock.props.d.mts +2 -2
- package/dist/components/bottomDock/bottomDock.props.d.mts.map +1 -1
- package/dist/components/bottomDock/bottomDock.props.d.ts +2 -2
- package/dist/components/bottomDock/bottomDock.props.d.ts.map +1 -1
- package/dist/components/bottomDock/bottomDock.props.js +1 -1
- package/dist/components/bottomDock/bottomDock.props.js.map +2 -2
- package/dist/components/card.css +1 -1
- package/dist/components/collapsible/Collapsible.cjs +10 -0
- package/dist/components/collapsible/Collapsible.cjs.map +2 -2
- package/dist/components/collapsible/Collapsible.d.cts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.mts.map +1 -1
- package/dist/components/collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/Collapsible.js +10 -0
- package/dist/components/collapsible/Collapsible.js.map +2 -2
- package/dist/components/dialog.css +1 -1
- package/dist/components/environment-ribbon.css +73 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs +69 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.cjs.map +7 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.cts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.mts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts +15 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.d.ts.map +1 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js +39 -0
- package/dist/components/environmentRibbon/EnvironmentRibbon.js.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs +39 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.cjs.map +7 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.cts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.mts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts +18 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.d.ts.map +1 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js +19 -0
- package/dist/components/environmentRibbon/environmentRibbon.props.js.map +7 -0
- package/dist/components/field.css +5 -0
- package/dist/components/icon/Icon.cjs +16 -0
- package/dist/components/icon/Icon.cjs.map +2 -2
- package/dist/components/icon/Icon.d.cts +25 -1
- package/dist/components/icon/Icon.d.cts.map +1 -1
- package/dist/components/icon/Icon.d.mts +25 -1
- package/dist/components/icon/Icon.d.mts.map +1 -1
- package/dist/components/icon/Icon.d.ts +25 -1
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/icon/Icon.js +21 -0
- package/dist/components/icon/Icon.js.map +2 -2
- package/dist/components/icon/icons.cjs +12 -0
- package/dist/components/icon/icons.cjs.map +2 -2
- package/dist/components/icon/icons.d.cts +30 -0
- package/dist/components/icon/icons.d.cts.map +1 -1
- package/dist/components/icon/icons.d.mts +30 -0
- package/dist/components/icon/icons.d.mts.map +1 -1
- package/dist/components/icon/icons.d.ts +30 -0
- package/dist/components/icon/icons.d.ts.map +1 -1
- package/dist/components/icon/icons.js +12 -0
- package/dist/components/icon/icons.js.map +2 -2
- package/dist/components/index.cjs +1 -0
- package/dist/components/index.cjs.map +2 -2
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +1 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.js.map +2 -2
- package/dist/components/notification-center.css +17 -9
- package/dist/components/notificationCenter/NotificationCenter.cjs +7 -2
- package/dist/components/notificationCenter/NotificationCenter.cjs.map +2 -2
- package/dist/components/notificationCenter/NotificationCenter.d.cts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.cts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.mts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.mts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.d.ts +2 -0
- package/dist/components/notificationCenter/NotificationCenter.d.ts.map +1 -1
- package/dist/components/notificationCenter/NotificationCenter.js +7 -2
- package/dist/components/notificationCenter/NotificationCenter.js.map +2 -2
- package/dist/components/page-header.css +21 -0
- package/dist/components/pageHeader/PageHeader.cjs +10 -2
- package/dist/components/pageHeader/PageHeader.cjs.map +2 -2
- package/dist/components/pageHeader/PageHeader.d.cts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.mts.map +1 -1
- package/dist/components/pageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/pageHeader/PageHeader.js +10 -2
- package/dist/components/pageHeader/PageHeader.js.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.cjs +7 -1
- package/dist/components/pageHeader/pageHeader.props.cjs.map +2 -2
- package/dist/components/pageHeader/pageHeader.props.d.cts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.cts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.mts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.mts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.d.ts +5 -0
- package/dist/components/pageHeader/pageHeader.props.d.ts.map +1 -1
- package/dist/components/pageHeader/pageHeader.props.js +7 -1
- package/dist/components/pageHeader/pageHeader.props.js.map +2 -2
- package/dist/components/sidebar/Sidebar.cjs +6 -2
- package/dist/components/sidebar/Sidebar.cjs.map +2 -2
- package/dist/components/sidebar/Sidebar.d.cts +8 -0
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.mts +8 -0
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.ts +8 -0
- package/dist/components/sidebar/Sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.js +6 -2
- package/dist/components/sidebar/Sidebar.js.map +2 -2
- package/dist/components/sidebar.css +58 -13
- package/dist/components.css +1 -0
- package/dist/docs/README.md +1 -0
- package/dist/docs/component-contract.md +5 -3
- package/dist/docs/component-index.json +9 -1
- package/dist/docs/components/alert.md +28 -8
- package/dist/docs/components/bottom-dock.md +4 -4
- package/dist/docs/components/card.md +1 -1
- package/dist/docs/components/collapsible.md +5 -0
- package/dist/docs/components/dialog.md +1 -1
- package/dist/docs/components/environment-ribbon.md +126 -0
- package/dist/docs/components/field.md +2 -0
- package/dist/docs/components/icon.md +1 -0
- package/dist/docs/components/notification-center.md +14 -9
- package/dist/docs/components/page-header.md +18 -6
- package/dist/docs/components/sidebar.md +17 -6
- package/dist/docs/consumer-guide.md +11 -4
- package/dist/styles.css +270 -30
- package/dist/tokens.css +2 -0
- package/package.json +1 -1
|
@@ -45,6 +45,10 @@ var import_IconButton = require("../iconButton/IconButton");
|
|
|
45
45
|
var import_Icon = require("../icon/Icon");
|
|
46
46
|
var import_notificationCenter = require("./notificationCenter.props");
|
|
47
47
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
|
+
const DEFAULT_BADGE_MAX = 99;
|
|
49
|
+
function resolveBadgeMax(max) {
|
|
50
|
+
return max !== void 0 && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX;
|
|
51
|
+
}
|
|
48
52
|
const NotificationCenter = React.forwardRef(
|
|
49
53
|
({ children, unreadCount, ...props }, forwardedRef) => {
|
|
50
54
|
const { asChild, className, variant = "popover", ...notificationCenterProps } = (0, import_extractProps.extractProps)(
|
|
@@ -115,9 +119,10 @@ const NotificationCenterItem = React.forwardRef(
|
|
|
115
119
|
);
|
|
116
120
|
NotificationCenterItem.displayName = "NotificationCenterItem";
|
|
117
121
|
const NotificationCenterTrigger = React.forwardRef(
|
|
118
|
-
({ children, unreadCount, className, ...props }, forwardedRef) => {
|
|
122
|
+
({ children, unreadCount, max, className, ...props }, forwardedRef) => {
|
|
119
123
|
const { asChild, ...triggerProps } = (0, import_extractProps.extractProps)(props, import_notificationCenter.notificationCenterTriggerPropDefs);
|
|
120
|
-
const
|
|
124
|
+
const cap = resolveBadgeMax(max);
|
|
125
|
+
const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Badge.Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > cap ? `${cap}+` : unreadCount }) : null;
|
|
121
126
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
127
|
import_IconButton.IconButton,
|
|
123
128
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notificationCenter/NotificationCenter.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount >
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,wBAAuB;AACvB,wBAAgC;AAEhC,0BAA6B;AAC7B,mBAAsB;AACtB,wBAA2B;AAC3B,kBAAqB;AACrB,gCAOO;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */\n max?: number\n}\n\nconst DEFAULT_BADGE_MAX = 99\n\n// A cap that is not a positive whole number falls back to the default, so a bad prop never prints \"NaN+\" or \"0+\".\nfunction resolveBadgeMax(max: number | undefined): number {\n return max !== undefined && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, max, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const cap = resolveBadgeMax(max)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount > cap ? `${cap}+` : unreadCount}\n </Badge>\n ) : null\n\n return (\n <IconButton\n {...triggerProps}\n ref={forwardedRef}\n asChild={asChild}\n variant=\"ghost\"\n size=\"sm\"\n className={classNames('dsx-notification-center__trigger', className)}\n aria-label={props['aria-label'] ?? (unreadCount && unreadCount > 0 ? `Notifications, ${unreadCount} unread` : 'Notifications')}\n >\n {asChild ? (\n <Slot><Slottable>{children}</Slottable>{badge}</Slot>\n ) : (\n <>{children ?? <Icon name=\"bell\" size=\"sm\" />}{badge}</>\n )}\n </IconButton>\n )\n },\n)\nNotificationCenterTrigger.displayName = 'NotificationCenterTrigger'\n\nconst NotificationCenterRoot: typeof NotificationCenter & {\n Header: typeof NotificationCenterHeader\n List: typeof NotificationCenterList\n Footer: typeof NotificationCenterFooter\n Item: typeof NotificationCenterItem\n Trigger: typeof NotificationCenterTrigger\n} = Object.assign(NotificationCenter, {\n Header: NotificationCenterHeader,\n List: NotificationCenterList,\n Footer: NotificationCenterFooter,\n Item: NotificationCenterItem,\n Trigger: NotificationCenterTrigger,\n})\n\nexport {\n NotificationCenterRoot as NotificationCenter,\n NotificationCenterHeader,\n NotificationCenterList,\n NotificationCenterFooter,\n NotificationCenterItem,\n NotificationCenterTrigger,\n}\nexport type {\n NotificationCenterProps,\n NotificationCenterHeaderProps,\n NotificationCenterListProps,\n NotificationCenterFooterProps,\n NotificationCenterItemProps,\n NotificationCenterTriggerProps,\n}\n"],
|
|
5
|
+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AAe,cAAc,IACzC,4CAAC,sBAAM,SAAQ,WAAU,MAAK,MAAK,WAAU,kCAAiC,eAAY,QACvF,wBAAc,MAAM,GAAG,GAAG,MAAM,aACnC,IACE;AAEJ,WACI;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,eAAW,kBAAAA,SAAW,oCAAoC,SAAS;AAAA,QACnE,cAAY,MAAM,YAAY,MAAM,eAAe,cAAc,IAAI,kBAAkB,WAAW,YAAY;AAAA,QAE7G,oBACC,6CAAC,0BAAK;AAAA,sDAAC,+BAAW,UAAS;AAAA,UAAa;AAAA,WAAM,IAE9C,4EAAG;AAAA,sBAAY,4CAAC,oBAAK,MAAK,QAAO,MAAK,MAAK;AAAA,UAAI;AAAA,WAAM;AAAA;AAAA,IAEzD;AAAA,EAEN;AACF;AACA,0BAA0B,cAAc;AAExC,MAAM,yBAMF,OAAO,OAAO,oBAAoB;AAAA,EACpC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX,CAAC;",
|
|
6
6
|
"names": ["classNames"]
|
|
7
7
|
}
|
|
@@ -20,6 +20,8 @@ interface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
20
20
|
}
|
|
21
21
|
interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
|
|
22
22
|
unreadCount?: number;
|
|
23
|
+
/** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
|
|
24
|
+
max?: number;
|
|
23
25
|
}
|
|
24
26
|
declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
27
|
declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
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AAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACrH,UAAU,8BAA+B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,iCAAiC;IAC/H,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8HAA8H;IAC9H,GAAG,CAAC,EAAE,MAAM,CAAA;CACb;AASD,QAAA,MAAM,kBAAkB,gGAwBvB,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAW3B,CAAA;AAGD,QAAA,MAAM,wBAAwB,sGAW7B,CAAA;AAGD,QAAA,MAAM,sBAAsB,oGAmB3B,CAAA;AAGD,QAAA,MAAM,yBAAyB,0GA4B9B,CAAA;AAGD,QAAA,MAAM,sBAAsB,EAAE,OAAO,kBAAkB,GAAG;IACxD,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,MAAM,EAAE,OAAO,wBAAwB,CAAA;IACvC,IAAI,EAAE,OAAO,sBAAsB,CAAA;IACnC,OAAO,EAAE,OAAO,yBAAyB,CAAA;CAOzC,CAAA;AAEF,OAAO,EACL,sBAAsB,IAAI,kBAAkB,EAC5C,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
|
|
@@ -20,6 +20,8 @@ interface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElemen
|
|
|
20
20
|
}
|
|
21
21
|
interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
|
|
22
22
|
unreadCount?: number;
|
|
23
|
+
/** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
|
|
24
|
+
max?: number;
|
|
23
25
|
}
|
|
24
26
|
declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
27
|
declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCenter.d.mts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,iCAAiC,GAAG,eAAe,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAElG,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,0BAA0B;IACxG,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AACD,UAAU,6BAA8B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,gCAAgC;CAAG;AACzH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,8BAA8B;CAAG;AACr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
|
20
20
|
}
|
|
21
21
|
interface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {
|
|
22
22
|
unreadCount?: number;
|
|
23
|
+
/** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */
|
|
24
|
+
max?: number;
|
|
23
25
|
}
|
|
24
26
|
declare const NotificationCenter: React.ForwardRefExoticComponent<NotificationCenterProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
27
|
declare const NotificationCenterHeader: React.ForwardRefExoticComponent<NotificationCenterHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCenter.d.ts","sourceRoot":"","sources":["../../../src/components/notificationCenter/NotificationCenter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,EAChC,8BAA8B,EAC9B,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EAClC,MAAM,4BAA4B,CAAA;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpE,KAAK,0BAA0B,GAAG,eAAe,CAAC,OAAO,0BAA0B,CAAC,CAAA;AACpF,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,gCAAgC,GAAG,eAAe,CAAC,OAAO,gCAAgC,CAAC,CAAA;AAChG,KAAK,8BAA8B,GAAG,eAAe,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAC5F,KAAK,iCAAiC,GAAG,eAAe,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAElG,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,0BAA0B;IACxG,WAAW,CAA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1B,CAAA;AACD,YAAY,EACV,uBAAuB,EACvB,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAC/B,CAAA"}
|
|
@@ -14,6 +14,10 @@ import {
|
|
|
14
14
|
notificationCenterTriggerPropDefs
|
|
15
15
|
} from "./notificationCenter.props.js";
|
|
16
16
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
const DEFAULT_BADGE_MAX = 99;
|
|
18
|
+
function resolveBadgeMax(max) {
|
|
19
|
+
return max !== void 0 && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX;
|
|
20
|
+
}
|
|
17
21
|
const NotificationCenter = React.forwardRef(
|
|
18
22
|
({ children, unreadCount, ...props }, forwardedRef) => {
|
|
19
23
|
const { asChild, className, variant = "popover", ...notificationCenterProps } = extractProps(
|
|
@@ -84,9 +88,10 @@ const NotificationCenterItem = React.forwardRef(
|
|
|
84
88
|
);
|
|
85
89
|
NotificationCenterItem.displayName = "NotificationCenterItem";
|
|
86
90
|
const NotificationCenterTrigger = React.forwardRef(
|
|
87
|
-
({ children, unreadCount, className, ...props }, forwardedRef) => {
|
|
91
|
+
({ children, unreadCount, max, className, ...props }, forwardedRef) => {
|
|
88
92
|
const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs);
|
|
89
|
-
const
|
|
93
|
+
const cap = resolveBadgeMax(max);
|
|
94
|
+
const badge = unreadCount && unreadCount > 0 ? /* @__PURE__ */ jsx(Badge, { variant: "primary", size: "sm", className: "dsx-notification-center__badge", "aria-hidden": "true", children: unreadCount > cap ? `${cap}+` : unreadCount }) : null;
|
|
90
95
|
return /* @__PURE__ */ jsx(
|
|
91
96
|
IconButton,
|
|
92
97
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/notificationCenter/NotificationCenter.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount >
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,MAAM,iBAAiB;AAEhC,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot, Slottable } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { Badge } from '../badge/Badge'\nimport { IconButton } from '../iconButton/IconButton'\nimport { Icon } from '../icon/Icon'\nimport {\n notificationCenterPropDefs,\n notificationCenterHeaderPropDefs,\n notificationCenterListPropDefs,\n notificationCenterFooterPropDefs,\n notificationCenterItemPropDefs,\n notificationCenterTriggerPropDefs,\n} from './notificationCenter.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype NotificationCenterOwnProps = GetPropDefTypes<typeof notificationCenterPropDefs>\ntype NotificationCenterHeaderOwnProps = GetPropDefTypes<typeof notificationCenterHeaderPropDefs>\ntype NotificationCenterListOwnProps = GetPropDefTypes<typeof notificationCenterListPropDefs>\ntype NotificationCenterFooterOwnProps = GetPropDefTypes<typeof notificationCenterFooterPropDefs>\ntype NotificationCenterItemOwnProps = GetPropDefTypes<typeof notificationCenterItemPropDefs>\ntype NotificationCenterTriggerOwnProps = GetPropDefTypes<typeof notificationCenterTriggerPropDefs>\n\ninterface NotificationCenterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterOwnProps {\n unreadCount?: number\n}\ninterface NotificationCenterHeaderProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterHeaderOwnProps {}\ninterface NotificationCenterListProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterListOwnProps {}\ninterface NotificationCenterFooterProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterFooterOwnProps {}\ninterface NotificationCenterItemProps extends React.HTMLAttributes<HTMLDivElement>, NotificationCenterItemOwnProps {}\ninterface NotificationCenterTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, NotificationCenterTriggerOwnProps {\n unreadCount?: number\n /** Largest count the badge draws; above it the badge reads `{max}+`. Default 99. The accessible name keeps the real count. */\n max?: number\n}\n\nconst DEFAULT_BADGE_MAX = 99\n\n// A cap that is not a positive whole number falls back to the default, so a bad prop never prints \"NaN+\" or \"0+\".\nfunction resolveBadgeMax(max: number | undefined): number {\n return max !== undefined && Number.isInteger(max) && max > 0 ? max : DEFAULT_BADGE_MAX\n}\n\nconst NotificationCenter = React.forwardRef<HTMLDivElement, NotificationCenterProps>(\n ({ children, unreadCount, ...props }, forwardedRef) => {\n const { asChild, className, variant = 'popover', ...notificationCenterProps } = extractProps(\n props,\n notificationCenterPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...notificationCenterProps}\n ref={forwardedRef}\n className={classNames(\n 'dsx-notification-center',\n variant === 'popover' && 'dsx-notification-center--popover',\n variant === 'sidebar' && 'dsx-notification-center--sidebar',\n className,\n )}\n data-unread={unreadCount && unreadCount > 0 ? String(unreadCount) : undefined}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenter.displayName = 'NotificationCenter'\n\nconst NotificationCenterHeader = React.forwardRef<HTMLDivElement, NotificationCenterHeaderProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, notificationCenterHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...headerProps} ref={forwardedRef} className={classNames('dsx-notification-center__header', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterHeader.displayName = 'NotificationCenterHeader'\n\nconst NotificationCenterList = React.forwardRef<HTMLDivElement, NotificationCenterListProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...listProps } = extractProps(props, notificationCenterListPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...listProps} ref={forwardedRef} className={classNames('dsx-notification-center__list', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterList.displayName = 'NotificationCenterList'\n\nconst NotificationCenterFooter = React.forwardRef<HTMLDivElement, NotificationCenterFooterProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, ...footerProps } = extractProps(props, notificationCenterFooterPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...footerProps} ref={forwardedRef} className={classNames('dsx-notification-center__footer', className)}>\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterFooter.displayName = 'NotificationCenterFooter'\n\nconst NotificationCenterItem = React.forwardRef<HTMLDivElement, NotificationCenterItemProps>(\n ({ children, ...props }, forwardedRef) => {\n const { asChild, className, unread = false, ...itemProps } = extractProps(\n props,\n notificationCenterItemPropDefs,\n )\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...itemProps}\n ref={forwardedRef}\n data-unread={unread ? 'true' : undefined}\n className={classNames('dsx-notification-center__item', unread && 'dsx-notification-center__item--unread', className)}\n >\n {children}\n </Comp>\n )\n },\n)\nNotificationCenterItem.displayName = 'NotificationCenterItem'\n\nconst NotificationCenterTrigger = React.forwardRef<HTMLButtonElement, NotificationCenterTriggerProps>(\n ({ children, unreadCount, max, className, ...props }, forwardedRef) => {\n const { asChild, ...triggerProps } = extractProps(props, notificationCenterTriggerPropDefs)\n const cap = resolveBadgeMax(max)\n const badge = unreadCount && unreadCount > 0 ? (\n <Badge variant=\"primary\" size=\"sm\" className=\"dsx-notification-center__badge\" aria-hidden=\"true\">\n {unreadCount > cap ? `${cap}+` : unreadCount}\n </Badge>\n ) : null\n\n return (\n <IconButton\n {...triggerProps}\n ref={forwardedRef}\n asChild={asChild}\n variant=\"ghost\"\n size=\"sm\"\n className={classNames('dsx-notification-center__trigger', className)}\n aria-label={props['aria-label'] ?? (unreadCount && unreadCount > 0 ? `Notifications, ${unreadCount} unread` : 'Notifications')}\n >\n {asChild ? (\n <Slot><Slottable>{children}</Slottable>{badge}</Slot>\n ) : (\n <>{children ?? <Icon name=\"bell\" size=\"sm\" />}{badge}</>\n )}\n </IconButton>\n )\n },\n)\nNotificationCenterTrigger.displayName = 'NotificationCenterTrigger'\n\nconst NotificationCenterRoot: typeof NotificationCenter & {\n Header: typeof NotificationCenterHeader\n List: typeof NotificationCenterList\n Footer: typeof NotificationCenterFooter\n Item: typeof NotificationCenterItem\n Trigger: typeof NotificationCenterTrigger\n} = Object.assign(NotificationCenter, {\n Header: NotificationCenterHeader,\n List: NotificationCenterList,\n Footer: NotificationCenterFooter,\n Item: NotificationCenterItem,\n Trigger: NotificationCenterTrigger,\n})\n\nexport {\n NotificationCenterRoot as NotificationCenter,\n NotificationCenterHeader,\n NotificationCenterList,\n NotificationCenterFooter,\n NotificationCenterItem,\n NotificationCenterTrigger,\n}\nexport type {\n NotificationCenterProps,\n NotificationCenterHeaderProps,\n NotificationCenterListProps,\n NotificationCenterFooterProps,\n NotificationCenterItemProps,\n NotificationCenterTriggerProps,\n}\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAA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AAK,WAAU,kCAAiC,eAAY,QACvF,wBAAc,MAAM,GAAG,GAAG,MAAM,aACnC,IACE;AAEJ,WACI;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL;AAAA,QACA,SAAQ;AAAA,QACR,MAAK;AAAA,QACL,WAAW,WAAW,oCAAoC,SAAS;AAAA,QACnE,cAAY,MAAM,YAAY,MAAM,eAAe,cAAc,IAAI,kBAAkB,WAAW,YAAY;AAAA,QAE7G,oBACC,qBAAC,QAAK;AAAA,8BAAC,aAAW,UAAS;AAAA,UAAa;AAAA,WAAM,IAE9C,iCAAG;AAAA,sBAAY,oBAAC,QAAK,MAAK,QAAO,MAAK,MAAK;AAAA,UAAI;AAAA,WAAM;AAAA;AAAA,IAEzD;AAAA,EAEN;AACF;AACA,0BAA0B,cAAc;AAExC,MAAM,yBAMF,OAAO,OAAO,oBAAoB;AAAA,EACpC,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,SAAS;AACX,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -10,6 +10,27 @@
|
|
|
10
10
|
flex-shrink: 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
/* variant="floating": a glass bar that sits inside the page with its own edge, the header of the
|
|
14
|
+
floating shells (direction C). Same glass recipe as `Card variant="glass"`, except the outer shadow.
|
|
15
|
+
The page decides whether it sticks. Prefixed backdrop-filter first, standard last (see baseCard.css).
|
|
16
|
+
|
|
17
|
+
The shadow falls below the bar only (offset = -spread, so it starts at the bar's bottom edge). The bar sits
|
|
18
|
+
flush at the edge of a scroll container (`Sidebar.Inset`, overflow: auto), which clips anything painted past
|
|
19
|
+
its left, right and top edges: a full-ring shadow ended in a vertical cut at the bar's side, visible in the
|
|
20
|
+
light theme (G-21). Offset, blur and the strong card shadow colour are the existing tokens; at the bar's edge
|
|
21
|
+
this reads as the old shadow does (measured in the batch's verification.md). */
|
|
22
|
+
.dsx-page-header:where([data-variant='floating']) {
|
|
23
|
+
border: var(--dsx-border-width-sm) solid var(--dsx-effect-panel-glass-border);
|
|
24
|
+
border-radius: var(--dsx-rounded-lg);
|
|
25
|
+
background: var(--dsx-color-panel-translucent);
|
|
26
|
+
box-shadow:
|
|
27
|
+
inset 0 1px 0 0 var(--dsx-effect-panel-glass-rim-highlight),
|
|
28
|
+
inset 0 0 0 1px var(--dsx-effect-panel-glass-rim),
|
|
29
|
+
0 var(--dsx-shadow-offset-lg) var(--dsx-shadow-blur-md) calc(-1 * var(--dsx-shadow-offset-lg)) var(--dsx-effect-shadow-card-strong);
|
|
30
|
+
-webkit-backdrop-filter: var(--dsx-effect-panel-glass-backdrop-filter);
|
|
31
|
+
backdrop-filter: var(--dsx-effect-panel-glass-backdrop-filter);
|
|
32
|
+
}
|
|
33
|
+
|
|
13
34
|
.dsx-page-header__title {
|
|
14
35
|
margin: 0;
|
|
15
36
|
font-family: var(--dsx-typography-headline-medium-font-family);
|
|
@@ -41,9 +41,17 @@ var import_extractProps = require("../../_internal/helpers/extractProps");
|
|
|
41
41
|
var import_pageHeader = require("./pageHeader.props");
|
|
42
42
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
43
|
const PageHeaderRoot = React.forwardRef((props, forwardedRef) => {
|
|
44
|
-
const { asChild, className, ...headerProps } = (0, import_extractProps.extractProps)(props, import_pageHeader.pageHeaderPropDefs);
|
|
44
|
+
const { asChild, className, variant = "default", ...headerProps } = (0, import_extractProps.extractProps)(props, import_pageHeader.pageHeaderPropDefs);
|
|
45
45
|
const Comp = asChild ? import_react_slot.Slot : "div";
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
+
Comp,
|
|
48
|
+
{
|
|
49
|
+
...headerProps,
|
|
50
|
+
ref: forwardedRef,
|
|
51
|
+
className: (0, import_classnames.default)("dsx-page-header", className),
|
|
52
|
+
"data-variant": variant
|
|
53
|
+
}
|
|
54
|
+
);
|
|
47
55
|
});
|
|
48
56
|
PageHeaderRoot.displayName = "PageHeader";
|
|
49
57
|
const PageHeaderTitle = React.forwardRef((props, forwardedRef) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/pageHeader/PageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs } from './pageHeader.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype PageHeaderElement = React.ComponentRef<'div'>\ntype PageHeaderOwnProps = GetPropDefTypes<typeof pageHeaderPropDefs>\n\ninterface PageHeaderProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderOwnProps {}\n\nconst PageHeaderRoot = React.forwardRef<PageHeaderElement, PageHeaderProps>((props, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, pageHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,wBAAuB;AACvB,wBAAqB;AAErB,0BAA6B;AAC7B,wBAAuF;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs } from './pageHeader.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype PageHeaderElement = React.ComponentRef<'div'>\ntype PageHeaderOwnProps = GetPropDefTypes<typeof pageHeaderPropDefs>\n\ninterface PageHeaderProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderOwnProps {}\n\nconst PageHeaderRoot = React.forwardRef<PageHeaderElement, PageHeaderProps>((props, forwardedRef) => {\n const { asChild, className, variant = 'default', ...headerProps } = extractProps(props, pageHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...headerProps}\n ref={forwardedRef}\n className={classNames('dsx-page-header', className)}\n data-variant={variant}\n />\n )\n})\nPageHeaderRoot.displayName = 'PageHeader'\n\ntype PageHeaderTitleElement = React.ComponentRef<'h1'>\ntype PageHeaderTitleOwnProps = GetPropDefTypes<typeof pageHeaderTitlePropDefs>\n\ninterface PageHeaderTitleProps extends React.ComponentPropsWithoutRef<'h1'>, PageHeaderTitleOwnProps {}\n\nconst PageHeaderTitle = React.forwardRef<PageHeaderTitleElement, PageHeaderTitleProps>((props, forwardedRef) => {\n const { asChild, className, ...titleProps } = extractProps(props, pageHeaderTitlePropDefs)\n const Comp = asChild ? Slot : 'h1'\n\n return <Comp {...titleProps} ref={forwardedRef} className={classNames('dsx-page-header__title', className)} />\n})\nPageHeaderTitle.displayName = 'PageHeaderTitle'\n\ntype PageHeaderActionsElement = React.ComponentRef<'div'>\ntype PageHeaderActionsOwnProps = GetPropDefTypes<typeof pageHeaderActionsPropDefs>\n\ninterface PageHeaderActionsProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderActionsOwnProps {}\n\nconst PageHeaderActions = React.forwardRef<PageHeaderActionsElement, PageHeaderActionsProps>(\n (props, forwardedRef) => {\n const { asChild, className, ...actionsProps } = extractProps(props, pageHeaderActionsPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...actionsProps} ref={forwardedRef} className={classNames('dsx-page-header__actions', className)} />\n )\n },\n)\nPageHeaderActions.displayName = 'PageHeaderActions'\n\nconst PageHeader: typeof PageHeaderRoot & {\n Actions: typeof PageHeaderActions\n Title: typeof PageHeaderTitle\n} = Object.assign(PageHeaderRoot, {\n Actions: PageHeaderActions,\n Title: PageHeaderTitle,\n})\n\nexport { PageHeader, PageHeaderActions, PageHeaderRoot, PageHeaderTitle }\nexport type { PageHeaderActionsProps, PageHeaderProps, PageHeaderTitleProps }\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;AACvB,wBAAuB;AACvB,wBAAqB;AAErB,0BAA6B;AAC7B,wBAAuF;AAcnF;AALJ,MAAM,iBAAiB,MAAM,WAA+C,CAAC,OAAO,iBAAiB;AACnG,QAAM,EAAE,SAAS,WAAW,UAAU,WAAW,GAAG,YAAY,QAAI,kCAAa,OAAO,oCAAkB;AAC1G,QAAM,OAAO,UAAU,yBAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,eAAW,kBAAAA,SAAW,mBAAmB,SAAS;AAAA,MAClD,gBAAc;AAAA;AAAA,EAChB;AAEJ,CAAC;AACD,eAAe,cAAc;AAO7B,MAAM,kBAAkB,MAAM,WAAyD,CAAC,OAAO,iBAAiB;AAC9G,QAAM,EAAE,SAAS,WAAW,GAAG,WAAW,QAAI,kCAAa,OAAO,yCAAuB;AACzF,QAAM,OAAO,UAAU,yBAAO;AAE9B,SAAO,4CAAC,QAAM,GAAG,YAAY,KAAK,cAAc,eAAW,kBAAAA,SAAW,0BAA0B,SAAS,GAAG;AAC9G,CAAC;AACD,gBAAgB,cAAc;AAO9B,MAAM,oBAAoB,MAAM;AAAA,EAC9B,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,SAAS,WAAW,GAAG,aAAa,QAAI,kCAAa,OAAO,2CAAyB;AAC7F,UAAM,OAAO,UAAU,yBAAO;AAE9B,WACE,4CAAC,QAAM,GAAG,cAAc,KAAK,cAAc,eAAW,kBAAAA,SAAW,4BAA4B,SAAS,GAAG;AAAA,EAE7G;AACF;AACA,kBAAkB,cAAc;AAEhC,MAAM,aAGF,OAAO,OAAO,gBAAgB;AAAA,EAChC,SAAS;AAAA,EACT,OAAO;AACT,CAAC;",
|
|
6
6
|
"names": ["classNames"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.cts","sourceRoot":"","sources":["../../../src/components/pageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEpE,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,kBAAkB;CAAG;AAE9F,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"PageHeader.d.cts","sourceRoot":"","sources":["../../../src/components/pageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEpE,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,kBAAkB;CAAG;AAE9F,QAAA,MAAM,cAAc,wFAYlB,CAAA;AAIF,KAAK,uBAAuB,GAAG,eAAe,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE9E,UAAU,oBAAqB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,uBAAuB;CAAG;AAEvG,QAAA,MAAM,eAAe,iGAKnB,CAAA;AAIF,KAAK,yBAAyB,GAAG,eAAe,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAElF,UAAU,sBAAuB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,yBAAyB;CAAG;AAE5G,QAAA,MAAM,iBAAiB,+FAStB,CAAA;AAGD,QAAA,MAAM,UAAU,EAAE,OAAO,cAAc,GAAG;IACxC,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,KAAK,EAAE,OAAO,eAAe,CAAA;CAI7B,CAAA;AAEF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,CAAA;AACzE,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.mts","sourceRoot":"","sources":["../../../src/components/pageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAE3G,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAGpE,KAAK,kBAAkB,GAAG,eAAe,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEpE,UAAU,eAAgB,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,kBAAkB;CAAG;AAE9F,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"PageHeader.d.mts","sourceRoot":"","sources":["../../../src/components/pageHeader/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,oBAA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AA;AACzE,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -5,9 +5,17 @@ import { extractProps } from "../../_internal/helpers/extractProps.js";
|
|
|
5
5
|
import { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs } from "./pageHeader.props.js";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
const PageHeaderRoot = React.forwardRef((props, forwardedRef) => {
|
|
8
|
-
const { asChild, className, ...headerProps } = extractProps(props, pageHeaderPropDefs);
|
|
8
|
+
const { asChild, className, variant = "default", ...headerProps } = extractProps(props, pageHeaderPropDefs);
|
|
9
9
|
const Comp = asChild ? Slot : "div";
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Comp,
|
|
12
|
+
{
|
|
13
|
+
...headerProps,
|
|
14
|
+
ref: forwardedRef,
|
|
15
|
+
className: classNames("dsx-page-header", className),
|
|
16
|
+
"data-variant": variant
|
|
17
|
+
}
|
|
18
|
+
);
|
|
11
19
|
});
|
|
12
20
|
PageHeaderRoot.displayName = "PageHeader";
|
|
13
21
|
const PageHeaderTitle = React.forwardRef((props, forwardedRef) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/pageHeader/PageHeader.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs } from './pageHeader.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype PageHeaderElement = React.ComponentRef<'div'>\ntype PageHeaderOwnProps = GetPropDefTypes<typeof pageHeaderPropDefs>\n\ninterface PageHeaderProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderOwnProps {}\n\nconst PageHeaderRoot = React.forwardRef<PageHeaderElement, PageHeaderProps>((props, forwardedRef) => {\n const { asChild, className, ...headerProps } = extractProps(props, pageHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return <Comp
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY;AAErB,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B,oBAAoB,+BAA+B;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react'\nimport classNames from 'classnames'\nimport { Slot } from '@radix-ui/react-slot'\n\nimport { extractProps } from '../../_internal/helpers/extractProps'\nimport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs } from './pageHeader.props'\n\nimport type { GetPropDefTypes } from '../../_internal/props/propDef'\n\ntype PageHeaderElement = React.ComponentRef<'div'>\ntype PageHeaderOwnProps = GetPropDefTypes<typeof pageHeaderPropDefs>\n\ninterface PageHeaderProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderOwnProps {}\n\nconst PageHeaderRoot = React.forwardRef<PageHeaderElement, PageHeaderProps>((props, forwardedRef) => {\n const { asChild, className, variant = 'default', ...headerProps } = extractProps(props, pageHeaderPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp\n {...headerProps}\n ref={forwardedRef}\n className={classNames('dsx-page-header', className)}\n data-variant={variant}\n />\n )\n})\nPageHeaderRoot.displayName = 'PageHeader'\n\ntype PageHeaderTitleElement = React.ComponentRef<'h1'>\ntype PageHeaderTitleOwnProps = GetPropDefTypes<typeof pageHeaderTitlePropDefs>\n\ninterface PageHeaderTitleProps extends React.ComponentPropsWithoutRef<'h1'>, PageHeaderTitleOwnProps {}\n\nconst PageHeaderTitle = React.forwardRef<PageHeaderTitleElement, PageHeaderTitleProps>((props, forwardedRef) => {\n const { asChild, className, ...titleProps } = extractProps(props, pageHeaderTitlePropDefs)\n const Comp = asChild ? Slot : 'h1'\n\n return <Comp {...titleProps} ref={forwardedRef} className={classNames('dsx-page-header__title', className)} />\n})\nPageHeaderTitle.displayName = 'PageHeaderTitle'\n\ntype PageHeaderActionsElement = React.ComponentRef<'div'>\ntype PageHeaderActionsOwnProps = GetPropDefTypes<typeof pageHeaderActionsPropDefs>\n\ninterface PageHeaderActionsProps extends React.ComponentPropsWithoutRef<'div'>, PageHeaderActionsOwnProps {}\n\nconst PageHeaderActions = React.forwardRef<PageHeaderActionsElement, PageHeaderActionsProps>(\n (props, forwardedRef) => {\n const { asChild, className, ...actionsProps } = extractProps(props, pageHeaderActionsPropDefs)\n const Comp = asChild ? Slot : 'div'\n\n return (\n <Comp {...actionsProps} ref={forwardedRef} className={classNames('dsx-page-header__actions', className)} />\n )\n },\n)\nPageHeaderActions.displayName = 'PageHeaderActions'\n\nconst PageHeader: typeof PageHeaderRoot & {\n Actions: typeof PageHeaderActions\n Title: typeof PageHeaderTitle\n} = Object.assign(PageHeaderRoot, {\n Actions: PageHeaderActions,\n Title: PageHeaderTitle,\n})\n\nexport { PageHeader, PageHeaderActions, PageHeaderRoot, PageHeaderTitle }\nexport type { PageHeaderActionsProps, PageHeaderProps, PageHeaderTitleProps }\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AACvB,OAAO,gBAAgB;AACvB,SAAS,YAAY;AAErB,SAAS,oBAAoB;AAC7B,SAAS,2BAA2B,oBAAoB,+BAA+B;AAcnF;AALJ,MAAM,iBAAiB,MAAM,WAA+C,CAAC,OAAO,iBAAiB;AACnG,QAAM,EAAE,SAAS,WAAW,UAAU,WAAW,GAAG,YAAY,IAAI,aAAa,OAAO,kBAAkB;AAC1G,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,WAAW,WAAW,mBAAmB,SAAS;AAAA,MAClD,gBAAc;AAAA;AAAA,EAChB;AAEJ,CAAC;AACD,eAAe,cAAc;AAO7B,MAAM,kBAAkB,MAAM,WAAyD,CAAC,OAAO,iBAAiB;AAC9G,QAAM,EAAE,SAAS,WAAW,GAAG,WAAW,IAAI,aAAa,OAAO,uBAAuB;AACzF,QAAM,OAAO,UAAU,OAAO;AAE9B,SAAO,oBAAC,QAAM,GAAG,YAAY,KAAK,cAAc,WAAW,WAAW,0BAA0B,SAAS,GAAG;AAC9G,CAAC;AACD,gBAAgB,cAAc;AAO9B,MAAM,oBAAoB,MAAM;AAAA,EAC9B,CAAC,OAAO,iBAAiB;AACvB,UAAM,EAAE,SAAS,WAAW,GAAG,aAAa,IAAI,aAAa,OAAO,yBAAyB;AAC7F,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE,oBAAC,QAAM,GAAG,cAAc,KAAK,cAAc,WAAW,WAAW,4BAA4B,SAAS,GAAG;AAAA,EAE7G;AACF;AACA,kBAAkB,cAAc;AAEhC,MAAM,aAGF,OAAO,OAAO,gBAAgB;AAAA,EAChC,SAAS;AAAA,EACT,OAAO;AACT,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -24,8 +24,14 @@ __export(pageHeader_props_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(pageHeader_props_exports);
|
|
26
26
|
var import_asChild = require("../../_internal/props/asChild.prop");
|
|
27
|
+
const pageHeaderVariants = ["default", "floating"];
|
|
27
28
|
const pageHeaderPropDefs = {
|
|
28
|
-
...import_asChild.asChildPropDef
|
|
29
|
+
...import_asChild.asChildPropDef,
|
|
30
|
+
variant: {
|
|
31
|
+
type: "enum",
|
|
32
|
+
values: pageHeaderVariants,
|
|
33
|
+
default: "default"
|
|
34
|
+
}
|
|
29
35
|
};
|
|
30
36
|
const pageHeaderTitlePropDefs = {
|
|
31
37
|
...import_asChild.asChildPropDef
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/pageHeader/pageHeader.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst pageHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderTitlePropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderActionsPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nexport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs }\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+B;AAI/B,MAAM,qBAAqB;AAAA,EACzB,GAAG;
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst pageHeaderVariants = ['default', 'floating'] as const\n\nconst pageHeaderPropDefs = {\n ...asChildPropDef,\n variant: {\n type: 'enum',\n values: pageHeaderVariants,\n default: 'default',\n },\n} satisfies {\n asChild: PropDef\n variant: PropDef<(typeof pageHeaderVariants)[number]>\n}\n\nconst pageHeaderTitlePropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderActionsPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nexport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs }\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA+B;AAI/B,MAAM,qBAAqB,CAAC,WAAW,UAAU;AAEjD,MAAM,qBAAqB;AAAA,EACzB,GAAG;AAAA,EACH,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAKA,MAAM,0BAA0B;AAAA,EAC9B,GAAG;AACL;AAIA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AACL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageHeader.props.d.cts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pageHeader.props.d.cts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,kBAAkB;;;;;;;;;;CAUvB,CAAA;AAED,QAAA,MAAM,uBAAuB;;;;;CAI5B,CAAA;AAED,QAAA,MAAM,yBAAyB;;;;;CAI9B,CAAA;AAED,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageHeader.props.d.mts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pageHeader.props.d.mts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,kBAAkB;;;;;;;;;;CAUvB,CAAA;AAED,QAAA,MAAM,uBAAuB;;;;;CAI5B,CAAA;AAED,QAAA,MAAM,yBAAyB;;;;;CAI9B,CAAA;AAED,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageHeader.props.d.ts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pageHeader.props.d.ts","sourceRoot":"","sources":["../../../src/components/pageHeader/pageHeader.props.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,kBAAkB;;;;;;;;;;CAUvB,CAAA;AAED,QAAA,MAAM,uBAAuB;;;;;CAI5B,CAAA;AAED,QAAA,MAAM,yBAAyB;;;;;CAI9B,CAAA;AAED,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { asChildPropDef } from "../../_internal/props/asChild.prop.js";
|
|
2
|
+
const pageHeaderVariants = ["default", "floating"];
|
|
2
3
|
const pageHeaderPropDefs = {
|
|
3
|
-
...asChildPropDef
|
|
4
|
+
...asChildPropDef,
|
|
5
|
+
variant: {
|
|
6
|
+
type: "enum",
|
|
7
|
+
values: pageHeaderVariants,
|
|
8
|
+
default: "default"
|
|
9
|
+
}
|
|
4
10
|
};
|
|
5
11
|
const pageHeaderTitlePropDefs = {
|
|
6
12
|
...asChildPropDef
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/pageHeader/pageHeader.props.ts"],
|
|
4
|
-
"sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst pageHeaderPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderTitlePropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderActionsPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nexport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs }\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,sBAAsB;AAI/B,MAAM,qBAAqB;AAAA,EACzB,GAAG;
|
|
4
|
+
"sourcesContent": ["import { asChildPropDef } from '../../_internal/props/asChild.prop'\n\nimport type { PropDef } from '../../_internal/props/propDef'\n\nconst pageHeaderVariants = ['default', 'floating'] as const\n\nconst pageHeaderPropDefs = {\n ...asChildPropDef,\n variant: {\n type: 'enum',\n values: pageHeaderVariants,\n default: 'default',\n },\n} satisfies {\n asChild: PropDef\n variant: PropDef<(typeof pageHeaderVariants)[number]>\n}\n\nconst pageHeaderTitlePropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nconst pageHeaderActionsPropDefs = {\n ...asChildPropDef,\n} satisfies {\n asChild: PropDef\n}\n\nexport { pageHeaderActionsPropDefs, pageHeaderPropDefs, pageHeaderTitlePropDefs }\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,sBAAsB;AAI/B,MAAM,qBAAqB,CAAC,WAAW,UAAU;AAEjD,MAAM,qBAAqB;AAAA,EACzB,GAAG;AAAA,EACH,SAAS;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF;AAKA,MAAM,0BAA0B;AAAA,EAC9B,GAAG;AACL;AAIA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AACL;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -167,6 +167,7 @@ function useSidebar() {
|
|
|
167
167
|
},
|
|
168
168
|
isMobile: false,
|
|
169
169
|
mobile: "none",
|
|
170
|
+
mobileTrigger: true,
|
|
170
171
|
sidebarId: void 0,
|
|
171
172
|
collapsible: "offcanvas",
|
|
172
173
|
manualToggleRef: { current: false },
|
|
@@ -255,6 +256,7 @@ const SidebarProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
255
256
|
storage = "localStorage",
|
|
256
257
|
toggleShortcut = true,
|
|
257
258
|
mobile = "sheet",
|
|
259
|
+
mobileTrigger = true,
|
|
258
260
|
mobileBreakpoint = 768,
|
|
259
261
|
collapsible = "offcanvas",
|
|
260
262
|
variant = "default",
|
|
@@ -366,6 +368,7 @@ const SidebarProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
366
368
|
setMobileSheetOpen,
|
|
367
369
|
isMobile: isMobileMode,
|
|
368
370
|
mobile,
|
|
371
|
+
mobileTrigger,
|
|
369
372
|
sidebarId,
|
|
370
373
|
collapsible,
|
|
371
374
|
manualToggleRef,
|
|
@@ -376,7 +379,7 @@ const SidebarProvider = React.forwardRef((props, forwardedRef) => {
|
|
|
376
379
|
submenuOpenOnActive,
|
|
377
380
|
variant: effectiveVariant
|
|
378
381
|
}),
|
|
379
|
-
[effectiveExpanded, persisted.expanded, persisted.setExpanded, effectivePreviewExpanded, canPreview, mobileSheetOpen, isMobileMode, mobile, sidebarId, collapsible, defaultSubmenuMode, submenuOpenOnActive, effectiveVariant]
|
|
382
|
+
[effectiveExpanded, persisted.expanded, persisted.setExpanded, effectivePreviewExpanded, canPreview, mobileSheetOpen, isMobileMode, mobile, mobileTrigger, sidebarId, collapsible, defaultSubmenuMode, submenuOpenOnActive, effectiveVariant]
|
|
380
383
|
);
|
|
381
384
|
const nestedCounterRef = React.useRef(0);
|
|
382
385
|
const desktopChildren = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SidebarNestedContext.Provider, { value: { counter: nestedCounterRef, isActive: nested }, children });
|
|
@@ -438,6 +441,7 @@ const SidebarRoot = React.forwardRef((props, forwardedRef) => {
|
|
|
438
441
|
},
|
|
439
442
|
isMobile: false,
|
|
440
443
|
mobile: "none",
|
|
444
|
+
mobileTrigger: true,
|
|
441
445
|
sidebarId: void 0,
|
|
442
446
|
collapsible: "offcanvas",
|
|
443
447
|
manualToggleRef: { current: false },
|
|
@@ -550,7 +554,7 @@ const SidebarRoot = React.forwardRef((props, forwardedRef) => {
|
|
|
550
554
|
} = sidebarProps;
|
|
551
555
|
const isMobileSheetMode = value.isMobile && value.mobile === "sheet";
|
|
552
556
|
const content = isMobileSheetMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(React.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Drawer, { open: value.mobileSheetOpen, onOpenChange: value.setMobileSheetOpen, direction: "left", children: [
|
|
553
|
-
!value.mobileSheetOpen && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
557
|
+
!value.mobileSheetOpen && value.mobileTrigger && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
554
558
|
"button",
|
|
555
559
|
{
|
|
556
560
|
type: "button",
|