@12-apps/ui 6.24.1 → 6.24.3
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/NATIVE.md +1 -1
- package/dist/_internal/components/data-display/Alert/Alert.js +5 -3
- package/dist/_internal/components/data-display/Alert/Alert.metrics.js +1 -1
- package/dist/_internal/components/data-display/Alert/Alert.styles.js +2 -2
- package/dist/_internal/components/data-display/Banner/Banner.js +7 -2
- package/dist/_internal/components/data-display/Banner/Banner.styles.js +10 -1
- package/dist/_internal/components/data-display/CardKit/card-actions-context.js +4 -4
- package/dist/_internal/components/data-display/CardKit/use-remove-confirm.js +5 -5
- package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +6 -6
- package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +11 -11
- package/dist/_internal/components/data-display/DataViews/data-views-display-panel.js +2 -2
- package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +5 -5
- package/dist/_internal/components/data-display/DataViews/data-views-shell-toolbar.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-table-parts.js +4 -4
- package/dist/_internal/components/data-display/DataViews/data-views-toolbar.js +3 -3
- package/dist/_internal/components/data-display/DataViews/data-views-view-nav.js +1 -1
- package/dist/_internal/components/data-display/index.js +5 -5
- package/dist/_internal/components/index.js +5 -5
- package/dist/{chunk-7L6LAVJ7.js → chunk-4IVDVZZ2.js} +25 -11
- package/dist/chunk-4IVDVZZ2.js.map +1 -0
- package/dist/{chunk-U2YJCNRU.js → chunk-4T7TXRGM.js} +2 -2
- package/dist/{chunk-E27Y7FF2.js → chunk-57Z2ND3N.js} +9 -10
- package/dist/{chunk-E27Y7FF2.js.map → chunk-57Z2ND3N.js.map} +1 -1
- package/dist/{chunk-6RZDDUSM.js → chunk-7GKRZJWI.js} +2 -2
- package/dist/{chunk-2C47DEVU.js → chunk-JD4IVP22.js} +2 -2
- package/dist/{chunk-JQ45NDBS.js → chunk-JPV45AD6.js} +3 -3
- package/dist/{chunk-PRUSQQDT.js → chunk-KM5O4ICK.js} +2 -2
- package/dist/{chunk-2YEZONLX.js → chunk-M4LFDGI6.js} +30 -5
- package/dist/chunk-M4LFDGI6.js.map +1 -0
- package/dist/{chunk-TSYWI3NP.js → chunk-NXNNICH7.js} +2 -2
- package/dist/{chunk-2FDBR77W.js → chunk-O6AZDQJJ.js} +2 -2
- package/dist/chunk-O6AZDQJJ.js.map +1 -0
- package/dist/{chunk-XO753WHD.js → chunk-QX2PLXQA.js} +2 -2
- package/dist/{chunk-OAYX4XN7.js → chunk-SQNW22ZZ.js} +2 -2
- package/dist/{chunk-O3336DJ6.js → chunk-SYJMI2NP.js} +2 -2
- package/dist/{chunk-B2Y3BABA.js → chunk-TXKZEKJN.js} +6 -9
- package/dist/chunk-TXKZEKJN.js.map +1 -0
- package/dist/{chunk-QFVFHIHE.js → chunk-WNMYWQ7D.js} +98 -30
- package/dist/chunk-WNMYWQ7D.js.map +1 -0
- package/dist/data-display/Alert.js +3 -3
- package/dist/data-display/Banner.js +7 -2
- package/dist/data-display/CardKit.js +5 -5
- package/dist/data-display/DataViews.js +11 -11
- package/dist/native/data-display/Alert.js +2 -5
- package/dist/native/data-display/Alert.js.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.d.ts +14 -0
- package/dist/types/components/data-display/Alert/Alert.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.metrics.d.ts +66 -23
- package/dist/types/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
- package/dist/types/components/data-display/Alert/Alert.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.d.ts.map +1 -1
- package/dist/types/components/data-display/Banner/Banner.styles.d.ts +3 -0
- package/dist/types/components/data-display/Banner/Banner.styles.d.ts.map +1 -1
- package/dist/types/components/data-display/DataViews/data-views-view-nav.d.ts +1 -1
- package/dist/types/components/data-display/DataViews/data-views-view-nav.d.ts.map +1 -1
- package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts +66 -23
- package/dist/types-native/components/data-display/Alert/Alert.metrics.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/data-display/Alert/Alert.metrics.ts +66 -9
- package/src/components/data-display/Alert/Alert.styles.tsx +4 -5
- package/src/components/data-display/Alert/Alert.tsx +139 -21
- package/src/components/data-display/Alert/NATIVE-NOTES.md +1 -1
- package/src/components/data-display/Banner/Banner.styles.ts +40 -2
- package/src/components/data-display/Banner/Banner.tsx +22 -9
- package/src/components/data-display/DataViews/data-views-view-nav.tsx +3 -3
- package/dist/chunk-2FDBR77W.js.map +0 -1
- package/dist/chunk-2YEZONLX.js.map +0 -1
- package/dist/chunk-7L6LAVJ7.js.map +0 -1
- package/dist/chunk-B2Y3BABA.js.map +0 -1
- package/dist/chunk-QFVFHIHE.js.map +0 -1
- /package/dist/{chunk-U2YJCNRU.js.map → chunk-4T7TXRGM.js.map} +0 -0
- /package/dist/{chunk-6RZDDUSM.js.map → chunk-7GKRZJWI.js.map} +0 -0
- /package/dist/{chunk-2C47DEVU.js.map → chunk-JD4IVP22.js.map} +0 -0
- /package/dist/{chunk-JQ45NDBS.js.map → chunk-JPV45AD6.js.map} +0 -0
- /package/dist/{chunk-PRUSQQDT.js.map → chunk-KM5O4ICK.js.map} +0 -0
- /package/dist/{chunk-TSYWI3NP.js.map → chunk-NXNNICH7.js.map} +0 -0
- /package/dist/{chunk-XO753WHD.js.map → chunk-QX2PLXQA.js.map} +0 -0
- /package/dist/{chunk-OAYX4XN7.js.map → chunk-SQNW22ZZ.js.map} +0 -0
- /package/dist/{chunk-O3336DJ6.js.map → chunk-SYJMI2NP.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/data-display/Alert/Alert.styles.tsx"],"sourcesContent":["import Error from '@mui/icons-material/Error';\nimport Info from '@mui/icons-material/Info';\nimport CheckCircle from '@mui/icons-material/CheckCircle';\nimport Warning from '@mui/icons-material/Warning';\nimport { alpha, darken, keyframes, lighten } from '@mui/material/styles/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport type { AlertVariant } from './Alert.base';\nimport { VARIANT_ICON } from './Alert.helpers';\nimport {\n ACTION_SLOT,\n ALERT_EASING,\n ALERT_PADDING_UNITS,\n ALERT_TRANSITION_MS,\n type AlertPalette,\n FADE_IN,\n GLASS,\n GLOW,\n GRADIENT,\n ICON_SLOT,\n ICON_SPIN,\n MESSAGE_BUTTON,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n NEUTRAL_GREY,\n PULSE,\n seconds,\n SEMANTIC_SURFACE,\n SEMANTIC_VARIANTS,\n} from './Alert.metrics';\nimport type { IconName } from '../../../icons/Icon.types';\nimport { px } from '../../../tokens/theme';\n\nexport type { AlertPalette } from './Alert.metrics';\n\nexport const pulseAnimation = keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 ${PULSE.spread}px currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\n// Additional animations can be enabled as needed\n// const slideInAnimation = keyframes`\n// from {\n// transform: translateX(-100%);\n// opacity: 0;\n// }\n// to {\n// transform: translateX(0);\n// opacity: 1;\n// }\n// `;\n\n// const bounceIn = keyframes`\n// 0% {\n// transform: scale(0.3);\n// opacity: 0;\n// }\n// 50% {\n// transform: scale(1.05);\n// }\n// 70% {\n// transform: scale(0.9);\n// }\n// 100% {\n// transform: scale(1);\n// opacity: 1;\n// }\n// `;\n\n// Removed unused slideInAnimation - can be re-added if needed for future features\n\nexport const shimmerAnimation = keyframes`\n 0% {\n background-position: -${GRADIENT.shimmerTravel}px 0;\n }\n 100% {\n background-position: ${GRADIENT.shimmerTravel}px 0;\n }\n`;\n\nexport const fadeInScale = keyframes`\n from {\n opacity: 0;\n transform: scale(${FADE_IN.scale}) translateY(-${FADE_IN.lift}px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n`;\n\nexport const iconRotate = keyframes`\n 0% {\n transform: rotate(0deg) scale(${ICON_SPIN.from});\n }\n 50% {\n transform: rotate(180deg) scale(${ICON_SPIN.mid});\n }\n 100% {\n transform: rotate(360deg) scale(1);\n }\n`;\n\n// The MUI-themed twin of `alertPalette` in `Alert.metrics.ts`: same names,\n// same three greys for `neutral`, same fallback to `info`.\nexport const getColorFromTheme = (theme: Theme, variant: string): AlertPalette => {\n const colorMap: Record<string, AlertPalette> = {\n info: theme.palette.info,\n success: theme.palette.success,\n warning: theme.palette.warning,\n danger: theme.palette.error,\n primary: theme.palette.primary,\n secondary: theme.palette.secondary,\n neutral: {\n main: theme.palette.grey[NEUTRAL_GREY.main] || '#9E9E9E',\n light: theme.palette.grey[NEUTRAL_GREY.light] || '#E0E0E0',\n dark: theme.palette.grey[NEUTRAL_GREY.dark] || '#616161',\n },\n };\n\n return colorMap[variant] || theme.palette.info;\n};\n\n/** The shared glyph names drawn with MUI's icons; the native side draws the same names from the icon set. */\nconst VARIANT_ICONS: Partial<Record<IconName, React.ReactNode>> = {\n Info: <Info />,\n CheckCircle: <CheckCircle />,\n Warning: <Warning />,\n Error: <Error />,\n};\n\nexport const getVariantIcon = (variant: string): React.ReactNode => {\n const name = VARIANT_ICON[variant as AlertVariant];\n return name ? VARIANT_ICONS[name] : undefined;\n};\n\n/**\n * The room the message is given — padding, the stack's rhythm, and where the\n * icon and the close button sit relative to it.\n *\n * Extracted for the same reason {@link alertVariantStyles} and\n * {@link alertEmphasisStyles} were: `styled()`'s callback is one function, and\n * every block written inline is counted against its length by the complexity\n * gate. Keeping the layout here means the callback assembles four named pieces\n * instead of carrying all of them.\n */\nexport const alertLayoutStyles = (\n theme: Theme,\n colorPalette: AlertPalette,\n animate: boolean | undefined,\n): CSSObject => ({\n // ROOM TO READ.\n //\n // MUI's `6px 16px` is sized for one line of text and nothing else. This Alert\n // routinely carries three things stacked — a sentence, a smaller explanation,\n // then a control — and at 6px they touched top and bottom and ran together\n // vertically, so the whole card read as one dense block instead of as a\n // message with parts. The generosity is what makes the structure legible; it\n // is not decoration.\n //\n // Padding stays overridable by an `sx` (a full-bleed strip legitimately wants\n // it tight), because this is a default rather than a rule.\n padding: theme.spacing(ALERT_PADDING_UNITS.vertical, ALERT_PADDING_UNITS.horizontal),\n\n '.MuiAlert-message': {\n display: 'flex',\n flexDirection: 'column',\n // 0.5 put a title, its explanation and a button 4px apart, which reads as a\n // spacing bug rather than as a group. 1 separates the lines; the extra\n // margin below goes to whatever CONTROL sits at the end, because the gap\n // between prose and a thing you press has to be bigger than the gap between\n // two lines of prose or the button looks like part of the text.\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n fontSize: px(MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_LINE_HEIGHT,\n // No padding of its own — the root's is now doing that job, and MUI's\n // default `8px 0` on top of it would double the vertical space.\n padding: 0,\n // A CONTROL ON A TINTED PANEL NEEDS AN EDGE.\n //\n // `ghost` and `text` paint no background and no border — bare labels, which\n // works on white where the surrounding page is obviously not clickable.\n // Inside a coloured Alert it stops working: the label is one more coloured\n // phrase among several, and a \"Cancelar\" beside two lines of prose reads as\n // part of the prose.\n //\n // Only the BORDER is set, never the background or the colour, and that is\n // what makes it safe to apply to every button rather than just the bare\n // ones: a `solid` keeps its fill and its light label and gains a hairline\n // in the same hue, while a `ghost` gains the whole affordance.\n '.MuiButton-root': {\n marginTop: theme.spacing(MESSAGE_BUTTON.marginTopUnits),\n border: `1px solid ${alpha(colorPalette.main, MESSAGE_BUTTON.borderAlpha)}`,\n },\n },\n\n '.MuiAlert-icon': {\n transition: `transform ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`,\n alignItems: 'center',\n // Clear of the words rather than nearly touching them, and aligned to the\n // FIRST line instead of centred on the whole block — an icon floating\n // halfway down a three-line message points at nothing.\n alignSelf: 'flex-start',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n animation: animate ? `${iconRotate} ${seconds(ICON_SPIN.ms)} ease-out` : 'none',\n },\n\n // The close button, kept off the text it sits beside.\n '.MuiAlert-action': {\n alignItems: 'flex-start',\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n },\n});\n\n/**\n * A semantic Alert's surface and ink.\n *\n * ## Why this is not `alpha(main, 0.1)`\n *\n * It used to be, four times over, with `color: main` for the text. Both halves\n * were wrong, and independently so.\n *\n * The fill was TRANSLUCENT. A 10% wash only reads as a banner when something\n * opaque is behind it, so the component silently depended on where a consumer\n * put it. Placed over content — a floating notice, an invite anchored above a\n * catalogue — the page came straight through and the sentence interleaved with\n * whatever it was over. That is not a faint banner; it is an unreadable one,\n * and nothing in the component said so.\n *\n * The ink was the SEVERITY HUE at body size. `#0288d1`, this library's info\n * blue, is 3.03:1 on white — under the 4.5:1 WCAG AA floor before any wash is\n * involved. So the text failed on a plain white page too, where the fill was\n * behaving exactly as intended.\n *\n * ## Why `lighten`/`darken` rather than a hand-picked pair\n *\n * These are the same transforms MUI's own `standard` Alert uses, at the same\n * ratios — the recipe this component overrode. Reusing it means an OPAQUE tint\n * with a dark ink of the same hue, contrast that holds on any surface because\n * it no longer depends on one, and a pairing already proven across MUI's\n * palette rather than eyeballed here. Both modes are handled: on a dark theme\n * the tint darkens and the ink lightens, which an alpha wash could never do\n * because it carries the seed's own lightness through unchanged.\n *\n * The border keeps an alpha — it is a hairline over the tint it belongs to, so\n * translucency there costs nothing and lets the edge follow the fill.\n *\n * The ratios live in `Alert.metrics.ts` (`SEMANTIC_SURFACE`), where the\n * native renderer reads the same three through the same colour arithmetic.\n */\nconst semanticSurface = (theme: Theme, colorPalette: AlertPalette): CSSObject => {\n const dark = theme.palette.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(colorPalette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(colorPalette.main, SEMANTIC_SURFACE.tint.light),\n color: dark\n ? lighten(colorPalette.main, SEMANTIC_SURFACE.ink)\n : darken(colorPalette.main, SEMANTIC_SURFACE.ink),\n border: `1px solid ${alpha(colorPalette.main, SEMANTIC_SURFACE.borderAlpha)}`,\n '.MuiAlert-icon': {\n color: colorPalette.main,\n },\n };\n};\n\n// The six visual variants. Each block is spread in only when it matches, which\n// is how the original inline version read; keeping that shape here means the\n// styled() callback carries one branch instead of six. The four semantics were\n// four IDENTICAL copies of the same block — they now share one, so the next\n// change to a banner's surface cannot land on three of them.\nexport const alertVariantStyles = (\n theme: Theme,\n customVariant: string | undefined,\n colorPalette: AlertPalette,\n): CSSObject => ({\n ...(customVariant !== undefined &&\n SEMANTIC_VARIANTS.has(customVariant as AlertVariant) &&\n semanticSurface(theme, colorPalette)),\n\n ...(customVariant === 'glass' && {\n // 85%, not 10%. This is the variant that is MEANT to be see-through, and it\n // was the same mistake in a costume: at 0.1 the blur had almost nothing to\n // sit on, so `glass` was not frosted, it was a window. A frosted pane has to\n // be mostly pane — the backdrop should be legible AS texture behind the\n // text, never as competition with it.\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n backdropFilter: `blur(${GLASS.blur}px) saturate(${GLASS.saturatePercent}%)`,\n WebkitBackdropFilter: `blur(${GLASS.blur}px) saturate(${GLASS.saturatePercent}%)`,\n border: `1px solid ${alpha(theme.palette.divider, GLASS.borderAlpha)}`,\n color: theme.palette.text.primary,\n '.MuiAlert-icon': {\n color: theme.palette.primary.main,\n },\n // Safari before 18 and Firefox with the filter disabled paint the declared\n // alpha with nothing blurred behind it — the see-through banner this is\n // fixing. There is no degraded frost to fall back to, so it falls back to an\n // opaque pane: less pretty, still readable.\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: theme.palette.background.paper,\n },\n }),\n\n ...(customVariant === 'gradient' && {\n background: `linear-gradient(${GRADIENT.angleDeg}deg, ${alpha(colorPalette.light || colorPalette.main, GRADIENT.stopAlpha)}, ${alpha(colorPalette.dark || colorPalette.main, GRADIENT.stopAlpha)})`,\n color: theme.palette.getContrastText(colorPalette.main),\n border: 'none',\n position: 'relative',\n overflow: 'hidden',\n '.MuiAlert-icon': {\n color: theme.palette.getContrastText(colorPalette.main),\n },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: `-${GRADIENT.shimmerTravel}px`,\n width: '100%',\n height: '100%',\n background: `linear-gradient(90deg, transparent, ${alpha(theme.palette.common.white, GRADIENT.shimmerAlpha)}, transparent)`,\n animation: `${shimmerAnimation} ${seconds(GRADIENT.shimmerMs)} infinite`,\n },\n '&:hover': {\n filter: `brightness(${GRADIENT.hoverBrightness})`,\n transform: `translateY(-${GRADIENT.hoverLift}px) scale(${GRADIENT.hoverScale})`,\n },\n }),\n});\n\n/** The web's glow: a soft shadow of the hue and a touch of brightness. */\nconst glowStyles = (colorPalette: AlertPalette): CSSObject => ({\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(colorPalette.main, GLOW.alpha)} !important`,\n filter: `brightness(${GLOW.brightness})`,\n});\n\n/** The web's pulse: a wash of the hue over the whole card, fading out every two seconds. */\nconst pulseAfter = (colorPalette: AlertPalette): CSSObject => ({\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: colorPalette.main,\n opacity: PULSE.alpha,\n animation: `${pulseAnimation} ${seconds(PULSE.ms)} infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n});\n\n// glow and pulse combine into three distinct looks, so the combinations are\n// spelled out rather than layered — layering them would let the glow-only shadow\n// leak into the glow+pulse case. Declaration ORDER is kept as it has always\n// been, because emotion hashes the serialised block into the class name.\nexport const alertEmphasisStyles = (\n colorPalette: AlertPalette,\n glow: boolean,\n pulse: boolean,\n): CSSObject => ({\n ...(glow && !pulse && glowStyles(colorPalette)),\n\n // Pulse animation\n ...(pulse &&\n !glow && {\n position: 'relative',\n '&::after': pulse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MACA,WACe;AAAA,EACf,GAAI,QAAQ,CAAC,SAAS,WAAW,YAAY;AAAA;AAAA,EAG7C,GAAI,SACF,CAAC,QAAQ;AAAA,IACP,UAAU;AAAA,IACV,YAAY,WAAW,YAAY;AAAA,EACrC;AAAA;AAAA,EAGF,GAAI,QACF,SAAS;AAAA,IACP,UAAU;AAAA,IACV,GAAG,WAAW,YAAY;AAAA,IAC1B,YAAY,WAAW,YAAY;AAAA,EACrC;AACJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Alert/Alert.styles.tsx"],"sourcesContent":["import Error from '@mui/icons-material/Error';\nimport Info from '@mui/icons-material/Info';\nimport CheckCircle from '@mui/icons-material/CheckCircle';\nimport Warning from '@mui/icons-material/Warning';\nimport { alpha, darken, keyframes, lighten } from '@mui/material/styles/index.js';\nimport type { CSSObject, Theme } from '@mui/material/styles/index.js';\nimport React from 'react';\n\nimport type { AlertVariant } from './Alert.base';\nimport { VARIANT_ICON } from './Alert.helpers';\nimport {\n ACTION_SLOT,\n ALERT_EASING,\n ALERT_PADDING_UNITS,\n ALERT_TRANSITION_MS,\n type AlertPalette,\n FADE_IN,\n GLASS,\n GLOW,\n GRADIENT,\n ICON_SLOT,\n ICON_SPIN,\n MESSAGE_BUTTON,\n MESSAGE_FONT_SIZE,\n MESSAGE_GAP_UNITS,\n MESSAGE_LINE_HEIGHT,\n NEUTRAL_GREY,\n PULSE,\n seconds,\n SEMANTIC_SURFACE,\n SEMANTIC_VARIANTS,\n} from './Alert.metrics';\nimport type { IconName } from '../../../icons/Icon.types';\nimport { px } from '../../../tokens/theme';\n\nexport type { AlertPalette } from './Alert.metrics';\n\nexport const pulseAnimation = keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 1;\n }\n 70% {\n box-shadow: 0 0 0 ${PULSE.spread}px currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\n// Additional animations can be enabled as needed\n// const slideInAnimation = keyframes`\n// from {\n// transform: translateX(-100%);\n// opacity: 0;\n// }\n// to {\n// transform: translateX(0);\n// opacity: 1;\n// }\n// `;\n\n// const bounceIn = keyframes`\n// 0% {\n// transform: scale(0.3);\n// opacity: 0;\n// }\n// 50% {\n// transform: scale(1.05);\n// }\n// 70% {\n// transform: scale(0.9);\n// }\n// 100% {\n// transform: scale(1);\n// opacity: 1;\n// }\n// `;\n\n// Removed unused slideInAnimation - can be re-added if needed for future features\n\nexport const shimmerAnimation = keyframes`\n 0% {\n background-position: -${GRADIENT.shimmerTravel}px 0;\n }\n 100% {\n background-position: ${GRADIENT.shimmerTravel}px 0;\n }\n`;\n\nexport const fadeInScale = keyframes`\n from {\n opacity: 0;\n transform: scale(${FADE_IN.scale}) translateY(-${FADE_IN.lift}px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n`;\n\nexport const iconRotate = keyframes`\n 0% {\n transform: rotate(0deg) scale(${ICON_SPIN.from});\n }\n 50% {\n transform: rotate(180deg) scale(${ICON_SPIN.mid});\n }\n 100% {\n transform: rotate(360deg) scale(1);\n }\n`;\n\n// The MUI-themed twin of `alertPalette` in `Alert.metrics.ts`: same names,\n// same three greys for `neutral`, same fallback to `info`.\nexport const getColorFromTheme = (theme: Theme, variant: string): AlertPalette => {\n const colorMap: Record<string, AlertPalette> = {\n info: theme.palette.info,\n success: theme.palette.success,\n warning: theme.palette.warning,\n danger: theme.palette.error,\n primary: theme.palette.primary,\n secondary: theme.palette.secondary,\n neutral: {\n main: theme.palette.grey[NEUTRAL_GREY.main] || '#9E9E9E',\n light: theme.palette.grey[NEUTRAL_GREY.light] || '#E0E0E0',\n dark: theme.palette.grey[NEUTRAL_GREY.dark] || '#616161',\n },\n };\n\n return colorMap[variant] || theme.palette.info;\n};\n\n/** The shared glyph names drawn with MUI's icons; the native side draws the same names from the icon set. */\nconst VARIANT_ICONS: Partial<Record<IconName, React.ReactNode>> = {\n Info: <Info />,\n CheckCircle: <CheckCircle />,\n Warning: <Warning />,\n Error: <Error />,\n};\n\nexport const getVariantIcon = (variant: string): React.ReactNode => {\n const name = VARIANT_ICON[variant as AlertVariant];\n return name ? VARIANT_ICONS[name] : undefined;\n};\n\n/**\n * The room the message is given — padding, the stack's rhythm, and where the\n * icon and the close button sit relative to it.\n *\n * Extracted for the same reason {@link alertVariantStyles} and\n * {@link alertEmphasisStyles} were: `styled()`'s callback is one function, and\n * every block written inline is counted against its length by the complexity\n * gate. Keeping the layout here means the callback assembles four named pieces\n * instead of carrying all of them.\n */\nexport const alertLayoutStyles = (\n theme: Theme,\n colorPalette: AlertPalette,\n animate: boolean | undefined,\n): CSSObject => ({\n // ROOM TO READ.\n //\n // MUI's `6px 16px` is sized for one line of text and nothing else. This Alert\n // routinely carries three things stacked — a sentence, a smaller explanation,\n // then a control — and at 6px they touched top and bottom and ran together\n // vertically, so the whole card read as one dense block instead of as a\n // message with parts. The generosity is what makes the structure legible; it\n // is not decoration.\n //\n // Padding stays overridable by an `sx` (a full-bleed strip legitimately wants\n // it tight), because this is a default rather than a rule.\n padding: theme.spacing(ALERT_PADDING_UNITS.vertical, ALERT_PADDING_UNITS.horizontal),\n\n '.MuiAlert-message': {\n display: 'flex',\n flexDirection: 'column',\n // 0.5 put a title, its explanation and a button 4px apart, which reads as a\n // spacing bug rather than as a group. 1 separates the lines; the extra\n // margin below goes to whatever CONTROL sits at the end, because the gap\n // between prose and a thing you press has to be bigger than the gap between\n // two lines of prose or the button looks like part of the text.\n gap: theme.spacing(MESSAGE_GAP_UNITS),\n fontSize: px(MESSAGE_FONT_SIZE),\n lineHeight: MESSAGE_LINE_HEIGHT,\n // No padding of its own — the root's is now doing that job, and MUI's\n // default `8px 0` on top of it would double the vertical space.\n padding: 0,\n // A CONTROL ON A TINTED PANEL NEEDS AN EDGE.\n //\n // `ghost` and `text` paint no background and no border — bare labels, which\n // works on white where the surrounding page is obviously not clickable.\n // Inside a coloured Alert it stops working: the label is one more coloured\n // phrase among several, and a \"Cancelar\" beside two lines of prose reads as\n // part of the prose.\n //\n // Only the BORDER is set, never the background or the colour, and that is\n // what makes it safe to apply to every button rather than just the bare\n // ones: a `solid` keeps its fill and its light label and gains a hairline\n // in the same hue, while a `ghost` gains the whole affordance.\n '.MuiButton-root': {\n marginTop: theme.spacing(MESSAGE_BUTTON.marginTopUnits),\n border: `1px solid ${alpha(colorPalette.main, MESSAGE_BUTTON.borderAlpha)}`,\n },\n },\n\n '.MuiAlert-icon': {\n transition: `transform ${seconds(ALERT_TRANSITION_MS)} ${ALERT_EASING}`,\n alignItems: 'center',\n // Clear of the words rather than nearly touching them, and aligned to the\n // FIRST line instead of centred on the whole block — an icon floating\n // halfway down a three-line message points at nothing.\n alignSelf: 'flex-start',\n marginRight: theme.spacing(ICON_SLOT.marginRightUnits),\n paddingTop: theme.spacing(ICON_SLOT.paddingTopUnits),\n animation: animate ? `${iconRotate} ${seconds(ICON_SPIN.ms)} ease-out` : 'none',\n },\n\n // The close button, kept off the text it sits beside.\n '.MuiAlert-action': {\n alignItems: 'flex-start',\n paddingLeft: theme.spacing(ACTION_SLOT.paddingLeftUnits),\n },\n});\n\n/**\n * A semantic Alert's surface and ink.\n *\n * ## Why this is not `alpha(main, 0.1)`\n *\n * It used to be, four times over, with `color: main` for the text. Both halves\n * were wrong, and independently so.\n *\n * The fill was TRANSLUCENT. A 10% wash only reads as a banner when something\n * opaque is behind it, so the component silently depended on where a consumer\n * put it. Placed over content — a floating notice, an invite anchored above a\n * catalogue — the page came straight through and the sentence interleaved with\n * whatever it was over. That is not a faint banner; it is an unreadable one,\n * and nothing in the component said so.\n *\n * The ink was the SEVERITY HUE at body size. `#0288d1`, this library's info\n * blue, is 3.03:1 on white — under the 4.5:1 WCAG AA floor before any wash is\n * involved. So the text failed on a plain white page too, where the fill was\n * behaving exactly as intended.\n *\n * ## Why `lighten`/`darken` rather than a hand-picked pair\n *\n * These are the same transforms MUI's own `standard` Alert uses, at the same\n * ratios — the recipe this component overrode. Reusing it means an OPAQUE tint\n * with a dark ink of the same hue, contrast that holds on any surface because\n * it no longer depends on one, and a pairing already proven across MUI's\n * palette rather than eyeballed here. Both modes are handled: on a dark theme\n * the tint darkens and the ink lightens, which an alpha wash could never do\n * because it carries the seed's own lightness through unchanged.\n *\n * The border keeps an alpha — it is a hairline over the tint it belongs to, so\n * translucency there costs nothing and lets the edge follow the fill.\n *\n * The ratios live in `Alert.metrics.ts` (`SEMANTIC_SURFACE`), where the\n * native renderer reads the same three through the same colour arithmetic.\n */\nconst semanticSurface = (theme: Theme, colorPalette: AlertPalette): CSSObject => {\n const dark = theme.palette.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(colorPalette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(colorPalette.main, SEMANTIC_SURFACE.tint.light),\n color: dark\n ? lighten(colorPalette.main, SEMANTIC_SURFACE.ink)\n : darken(colorPalette.main, SEMANTIC_SURFACE.ink),\n border: `1px solid ${alpha(colorPalette.main, SEMANTIC_SURFACE.borderAlpha)}`,\n '.MuiAlert-icon': {\n color: colorPalette.main,\n },\n };\n};\n\n// The six visual variants. Each block is spread in only when it matches, which\n// is how the original inline version read; keeping that shape here means the\n// styled() callback carries one branch instead of six. The four semantics were\n// four IDENTICAL copies of the same block — they now share one, so the next\n// change to a banner's surface cannot land on three of them.\nexport const alertVariantStyles = (\n theme: Theme,\n customVariant: string | undefined,\n colorPalette: AlertPalette,\n): CSSObject => ({\n ...(customVariant !== undefined &&\n SEMANTIC_VARIANTS.has(customVariant as AlertVariant) &&\n semanticSurface(theme, colorPalette)),\n\n ...(customVariant === 'glass' && {\n // 85%, not 10%. This is the variant that is MEANT to be see-through, and it\n // was the same mistake in a costume: at 0.1 the blur had almost nothing to\n // sit on, so `glass` was not frosted, it was a window. A frosted pane has to\n // be mostly pane — the backdrop should be legible AS texture behind the\n // text, never as competition with it.\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n backdropFilter: `blur(${GLASS.blur}px) saturate(${GLASS.saturatePercent}%)`,\n WebkitBackdropFilter: `blur(${GLASS.blur}px) saturate(${GLASS.saturatePercent}%)`,\n border: `1px solid ${alpha(theme.palette.divider, GLASS.borderAlpha)}`,\n color: theme.palette.text.primary,\n '.MuiAlert-icon': {\n color: theme.palette.primary.main,\n },\n // Safari before 18 and Firefox with the filter disabled paint the declared\n // alpha with nothing blurred behind it — the see-through banner this is\n // fixing. There is no degraded frost to fall back to, so it falls back to an\n // opaque pane: less pretty, still readable.\n '@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)))': {\n backgroundColor: theme.palette.background.paper,\n },\n }),\n\n ...(customVariant === 'gradient' && {\n background: `linear-gradient(${GRADIENT.angleDeg}deg, ${alpha(colorPalette.light || colorPalette.main, GRADIENT.stopAlpha)}, ${alpha(colorPalette.dark || colorPalette.main, GRADIENT.stopAlpha)})`,\n color: theme.palette.getContrastText(colorPalette.main),\n border: 'none',\n position: 'relative',\n overflow: 'hidden',\n '.MuiAlert-icon': {\n color: theme.palette.getContrastText(colorPalette.main),\n },\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: `-${GRADIENT.shimmerTravel}px`,\n width: '100%',\n height: '100%',\n background: `linear-gradient(90deg, transparent, ${alpha(theme.palette.common.white, GRADIENT.shimmerAlpha)}, transparent)`,\n animation: `${shimmerAnimation} ${seconds(GRADIENT.shimmerMs)} infinite`,\n },\n }),\n});\n\n/** The web's glow: a soft shadow of the hue and a touch of brightness. */\nconst glowStyles = (colorPalette: AlertPalette): CSSObject => ({\n // No `!important`: the pointer states paint their tint as an INSET shadow on\n // the same property, and compose this one alongside it rather than fighting\n // it. `glowShadow` in `Alert.tsx` is the other half of that pair.\n boxShadow: `0 0 ${GLOW.blur}px ${GLOW.spread}px ${alpha(colorPalette.main, GLOW.alpha)}`,\n filter: `brightness(${GLOW.brightness})`,\n});\n\n/** The web's pulse: a wash of the hue over the whole card, fading out every two seconds. */\nconst pulseAfter = (colorPalette: AlertPalette): CSSObject => ({\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n borderRadius: 'inherit',\n backgroundColor: colorPalette.main,\n opacity: PULSE.alpha,\n animation: `${pulseAnimation} ${seconds(PULSE.ms)} infinite`,\n pointerEvents: 'none',\n zIndex: -1,\n});\n\n// glow and pulse combine into three distinct looks, so the combinations are\n// spelled out rather than layered — layering them would let the glow-only shadow\n// leak into the glow+pulse case. Declaration ORDER is kept as it has always\n// been, because emotion hashes the serialised block into the class name.\nexport const alertEmphasisStyles = (\n colorPalette: AlertPalette,\n glow: boolean,\n pulse: boolean,\n): CSSObject => ({\n ...(glow && !pulse && glowStyles(colorPalette)),\n\n // Pulse animation\n ...(pulse &&\n !glow && {\n position: 'relative',\n '&::after': pulseAfter(colorPalette),\n }),\n\n // Both glow and pulse\n ...(glow &&\n pulse && {\n position: 'relative',\n ...glowStyles(colorPalette),\n '&::after': pulseAfter(colorPalette),\n }),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,iBAAiB;AACxB,OAAO,aAAa;AACpB,SAAS,OAAO,QAAQ,WAAW,eAAe;AAqI1C;AApGD,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMN,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwC7B,IAAM,mBAAmB;AAAA;AAAA,4BAEJ,SAAS,aAAa;AAAA;AAAA;AAAA,2BAGvB,SAAS,aAAa;AAAA;AAAA;AAI1C,IAAM,cAAc;AAAA;AAAA;AAAA,uBAGJ,QAAQ,KAAK,iBAAiB,QAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQ1D,IAAM,aAAa;AAAA;AAAA,oCAEU,UAAU,IAAI;AAAA;AAAA;AAAA,sCAGZ,UAAU,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;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,CAAC;AAAA,EACtF,QAAQ,cAAc,KAAK,UAAU;AACvC;AAGA,IAAM,aAAa,CAAC,kBAA2C;AAAA,EAC7D,SAAS;AAAA,EACT,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,iBAAiB,aAAa;AAAA,EAC9B,SAAS,MAAM;AAAA,EACf,WAAW,GAAG,cAAc,IAAI,QAAQ,MAAM,EAAE,CAAC;AAAA,EACjD,eAAe;AAAA,EACf,QAAQ;AACV;AAMO,IAAM,sBAAsB,CACjC,cACA,MACA,WACe;AAAA,EACf,GAAI,QAAQ,CAAC,SAAS,WAAW,YAAY;AAAA;AAAA,EAG7C,GAAI,SACF,CAAC,QAAQ;AAAA,IACP,UAAU;AAAA,IACV,YAAY,WAAW,YAAY;AAAA,EACrC;AAAA;AAAA,EAGF,GAAI,QACF,SAAS;AAAA,IACP,UAAU;AAAA,IACV,GAAG,WAAW,YAAY;AAAA,IAC1B,YAAY,WAAW,YAAY;AAAA,EACrC;AACJ;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridToolbar
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JD4IVP22.js";
|
|
4
4
|
|
|
5
5
|
// src/components/data-display/DataViews/data-views-shell-toolbar.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -64,4 +64,4 @@ function ShellToolbar({
|
|
|
64
64
|
export {
|
|
65
65
|
ShellToolbar
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=chunk-
|
|
67
|
+
//# sourceMappingURL=chunk-7GKRZJWI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DataViewsDisplayPanel
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SQNW22ZZ.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsExportMenu
|
|
6
6
|
} from "./chunk-XUJG2HFW.js";
|
|
@@ -133,4 +133,4 @@ function GridToolbar(props) {
|
|
|
133
133
|
export {
|
|
134
134
|
GridToolbar
|
|
135
135
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
136
|
+
//# sourceMappingURL=chunk-JD4IVP22.js.map
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-4X4KM4ZB.js";
|
|
4
4
|
import {
|
|
5
5
|
DataViewsGrid
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QX2PLXQA.js";
|
|
7
7
|
import {
|
|
8
8
|
viewStateKey
|
|
9
9
|
} from "./chunk-ZOLAYP2D.js";
|
|
10
10
|
import {
|
|
11
11
|
ViewDialogs,
|
|
12
12
|
ViewMutationErrorAlert
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-4T7TXRGM.js";
|
|
14
14
|
import {
|
|
15
15
|
useSavedViewsController
|
|
16
16
|
} from "./chunk-HR7YTBR7.js";
|
|
@@ -178,4 +178,4 @@ function renderViewDialogs(ctl, fields, columns, views, testIdPrefix, onSaved) {
|
|
|
178
178
|
export {
|
|
179
179
|
DataViewsTableBase
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=chunk-
|
|
181
|
+
//# sourceMappingURL=chunk-JPV45AD6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCardActions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SYJMI2NP.js";
|
|
4
4
|
import {
|
|
5
5
|
ConfirmActionDialog
|
|
6
6
|
} from "./chunk-QQS3GQYS.js";
|
|
@@ -50,4 +50,4 @@ function useRemoveConfirm({
|
|
|
50
50
|
export {
|
|
51
51
|
useRemoveConfirm
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=chunk-
|
|
53
|
+
//# sourceMappingURL=chunk-KM5O4ICK.js.map
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTIVE,
|
|
3
|
+
HOVER
|
|
4
|
+
} from "./chunk-TXKZEKJN.js";
|
|
5
|
+
|
|
1
6
|
// src/components/data-display/Banner/Banner.styles.ts
|
|
2
7
|
import { alpha, keyframes } from "@mui/material/styles/index.js";
|
|
3
8
|
var fadeInSlide = keyframes`
|
|
@@ -91,22 +96,42 @@ var bannerPartStyles = (theme, colorPalette) => ({
|
|
|
91
96
|
opacity: 0.7,
|
|
92
97
|
marginLeft: theme.spacing(1),
|
|
93
98
|
flexShrink: 0,
|
|
99
|
+
// Opacity and a wash only: the dismiss used to spin 90deg, which drew the
|
|
100
|
+
// eye to the way out rather than to the message. Same fix as `Alert`'s
|
|
101
|
+
// close button, which is the sibling surface (FUT-1458).
|
|
94
102
|
"&:hover": {
|
|
95
103
|
opacity: 1,
|
|
96
|
-
backgroundColor: alpha(colorPalette.main, 0.1)
|
|
97
|
-
transform: "rotate(90deg)"
|
|
104
|
+
backgroundColor: alpha(colorPalette.main, 0.1)
|
|
98
105
|
},
|
|
99
|
-
"&:focus": {
|
|
106
|
+
"&:focus-visible": {
|
|
100
107
|
opacity: 1,
|
|
101
108
|
outline: `2px solid ${colorPalette.main}`,
|
|
102
109
|
outlineOffset: "2px"
|
|
103
110
|
}
|
|
104
111
|
}
|
|
105
112
|
});
|
|
113
|
+
var tint = (theme, a) => `inset 0 0 0 100vmax ${alpha(theme.palette.mode === "light" ? "#000000" : "#ffffff", a)}`;
|
|
114
|
+
var bannerPointerStates = (theme) => ({
|
|
115
|
+
"&:hover": {
|
|
116
|
+
boxShadow: tint(theme, HOVER.tintAlpha)
|
|
117
|
+
},
|
|
118
|
+
// The `:not(:has(…))` names CONTROLS, not any descendant: `:active` matches
|
|
119
|
+
// an ancestor of whatever is pressed, so without it pressing the dismiss or
|
|
120
|
+
// an action dimmed the message that owns it. Excluding `:has(:active)`
|
|
121
|
+
// wholesale does not work — pressing the TEXT makes that text `:active` too,
|
|
122
|
+
// so the guard matched on every press and the state never fired.
|
|
123
|
+
'&:active:not(:has(button:active, a:active, [role="button"]:active))': {
|
|
124
|
+
boxShadow: tint(theme, ACTIVE.tintAlpha),
|
|
125
|
+
transition: "none"
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
var BANNER_TINT_S = ACTIVE.ms / 1e3;
|
|
106
129
|
|
|
107
130
|
export {
|
|
108
131
|
fadeInSlide,
|
|
109
132
|
getVariantColor,
|
|
110
|
-
bannerPartStyles
|
|
133
|
+
bannerPartStyles,
|
|
134
|
+
bannerPointerStates,
|
|
135
|
+
BANNER_TINT_S
|
|
111
136
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
137
|
+
//# sourceMappingURL=chunk-M4LFDGI6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Banner/Banner.styles.ts"],"sourcesContent":["import { alpha, keyframes } from '@mui/material/styles/index.js';\nimport type { CSSObject, PaletteColor, Theme } from '@mui/material/styles/index.js';\n\nimport type { BannerVariant } from './Banner.types';\nimport { ACTIVE, HOVER } from '../Alert/Alert.metrics';\n\n// Animations\nexport const fadeInSlide = keyframes`\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n`;\n\nconst pulseAnimation = keyframes`\n 0% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0.7;\n }\n 70% {\n box-shadow: 0 0 0 8px currentColor;\n opacity: 0;\n }\n 100% {\n box-shadow: 0 0 0 0 currentColor;\n opacity: 0;\n }\n`;\n\nexport const getVariantColor = (theme: Theme, variant: BannerVariant) => {\n const colorMap = {\n info: theme.palette.info,\n success: theme.palette.success,\n warning: theme.palette.warning,\n critical: theme.palette.error,\n };\n return colorMap[variant];\n};\n\nexport const bannerPartStyles = (theme: Theme, colorPalette: PaletteColor): CSSObject => ({\n // Icon container\n '.banner-icon': {\n flexShrink: 0,\n marginTop: theme.spacing(0.25),\n color: colorPalette.main,\n fontSize: '1.25rem',\n display: 'flex',\n alignItems: 'center',\n position: 'relative',\n\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n inset: -4,\n borderRadius: '50%',\n background: alpha(colorPalette.main, 0.1),\n animation: `${pulseAnimation} 3s infinite`,\n },\n },\n\n // Content area\n '.banner-content': {\n flex: 1,\n minWidth: 0, // Prevents flex item overflow\n },\n\n // Title styles\n '.banner-title': {\n fontWeight: 600,\n fontSize: '1rem',\n lineHeight: 1.4,\n marginBottom: theme.spacing(0.5),\n color: colorPalette.dark || colorPalette.main,\n },\n\n // Description styles \n '.banner-description': {\n fontSize: '0.875rem',\n lineHeight: 1.5,\n opacity: 0.9,\n color: 'inherit',\n },\n\n // Actions area\n '.banner-actions': {\n display: 'flex',\n flexShrink: 0,\n gap: theme.spacing(1),\n alignItems: 'center',\n marginTop: theme.spacing(1),\n\n [theme.breakpoints.up('sm')]: {\n marginTop: 0,\n marginLeft: theme.spacing(2),\n },\n },\n\n // Dismiss button\n '.banner-dismiss': {\n color: 'inherit',\n opacity: 0.7,\n marginLeft: theme.spacing(1),\n flexShrink: 0,\n\n // Opacity and a wash only: the dismiss used to spin 90deg, which drew the\n // eye to the way out rather than to the message. Same fix as `Alert`'s\n // close button, which is the sibling surface (FUT-1458).\n '&:hover': {\n opacity: 1,\n backgroundColor: alpha(colorPalette.main, 0.1),\n },\n\n '&:focus-visible': {\n opacity: 1,\n outline: `2px solid ${colorPalette.main}`,\n outlineOffset: '2px',\n },\n },\n});\n\n/**\n * The pointer states, from `Alert`'s own table.\n *\n * Banner had NO hover at all — measured ΔE76 0.00 on every variant in both\n * modes — so moving between the two surfaces gave feedback on one and silence\n * on the other. They are the same kind of thing and now answer a pointer the\n * same way.\n *\n * Neither block may declare `transition`: `:active` under a mouse always\n * implies `:hover`, so a shorthand here would outrank the root's and reset the\n * opacity fade the press is built on.\n */\n/** The same flat inset tint `Alert` paints; see `ACTIVE` for why it is a layer. */\nconst tint = (theme: Theme, a: number): string =>\n `inset 0 0 0 100vmax ${alpha(theme.palette.mode === 'light' ? '#000000' : '#ffffff', a)}`;\n\nexport const bannerPointerStates = (theme: Theme): CSSObject => ({\n '&:hover': {\n boxShadow: tint(theme, HOVER.tintAlpha),\n },\n\n // The `:not(:has(…))` names CONTROLS, not any descendant: `:active` matches\n // an ancestor of whatever is pressed, so without it pressing the dismiss or\n // an action dimmed the message that owns it. Excluding `:has(:active)`\n // wholesale does not work — pressing the TEXT makes that text `:active` too,\n // so the guard matched on every press and the state never fired.\n '&:active:not(:has(button:active, a:active, [role=\"button\"]:active))': {\n boxShadow: tint(theme, ACTIVE.tintAlpha),\n transition: 'none',\n },\n});\n\n/** The seconds the tint takes easing back, shared with `Alert`. */\nexport const BANNER_TINT_S = ACTIVE.ms / 1000;\n"],"mappings":";;;;;;AAAA,SAAS,OAAO,iBAAiB;AAO1B,IAAM,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAW3B,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAehB,IAAM,kBAAkB,CAAC,OAAc,YAA2B;AACvE,QAAM,WAAW;AAAA,IACf,MAAM,MAAM,QAAQ;AAAA,IACpB,SAAS,MAAM,QAAQ;AAAA,IACvB,SAAS,MAAM,QAAQ;AAAA,IACvB,UAAU,MAAM,QAAQ;AAAA,EAC1B;AACA,SAAO,SAAS,OAAO;AACzB;AAEO,IAAM,mBAAmB,CAAC,OAAc,kBAA2C;AAAA;AAAA,EAExF,gBAAgB;AAAA,IACd,YAAY;AAAA,IACZ,WAAW,MAAM,QAAQ,IAAI;AAAA,IAC7B,OAAO,aAAa;AAAA,IACpB,UAAU;AAAA,IACV,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,UAAU;AAAA,IAEV,aAAa;AAAA,MACX,SAAS;AAAA,MACT,UAAU;AAAA,MACV,OAAO;AAAA,MACP,c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C/D,WAAW;AAAA,IACT,WAAW,KAAK,OAAO,MAAM,SAAS;AAAA,EACxC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,uEAAuE;AAAA,IACrE,WAAW,KAAK,OAAO,OAAO,SAAS;AAAA,IACvC,YAAY;AAAA,EACd;AACF;AAGO,IAAM,gBAAgB,OAAO,KAAK;","names":[]}
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-TQ6FPOPD.js";
|
|
24
24
|
import {
|
|
25
25
|
ShellToolbar
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-7GKRZJWI.js";
|
|
27
27
|
import {
|
|
28
28
|
resolveSelectionExtra
|
|
29
29
|
} from "./chunk-KX75HM5U.js";
|
|
@@ -237,4 +237,4 @@ function GridShell(props) {
|
|
|
237
237
|
export {
|
|
238
238
|
GridShell
|
|
239
239
|
};
|
|
240
|
-
//# sourceMappingURL=chunk-
|
|
240
|
+
//# sourceMappingURL=chunk-NXNNICH7.js.map
|
|
@@ -160,7 +160,7 @@ function ToggleContents({
|
|
|
160
160
|
}) {
|
|
161
161
|
const copy = useDataViewsCopy();
|
|
162
162
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
163
|
-
/* @__PURE__ */ jsx(default2, { component: "span", sx: { fontWeight: 600 }, "data-testid": `${testIdPrefix}-display-view-name`, children: view.activeViewName ??
|
|
163
|
+
/* @__PURE__ */ jsx(default2, { component: "span", sx: { fontWeight: 600 }, "data-testid": `${testIdPrefix}-display-view-name`, children: view.activeViewName ?? copy.nav.mainView }),
|
|
164
164
|
view.dirty && /* @__PURE__ */ jsx(
|
|
165
165
|
default2,
|
|
166
166
|
{
|
|
@@ -294,4 +294,4 @@ export {
|
|
|
294
294
|
ViewHeader,
|
|
295
295
|
ViewFooter
|
|
296
296
|
};
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
297
|
+
//# sourceMappingURL=chunk-O6AZDQJJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/DataViews/data-views-view-nav.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * The saved views, rendered INSIDE the Exibir panel rather than in a dropdown\n * of their own.\n *\n * Two levels, both of them replacing the panel's BODY (the tabs stay put):\n * the list of views, and one view's actions. It is a drill-down and not a\n * nested menu on purpose — an absolutely positioned popover inside the panel's\n * own scroll container gets clipped by it, which is how copy.nav.deleteView ends\n * up unreachable. One level, no clipping, and it works on touch.\n */\nimport ChevronLeftRoundedIcon from \"@mui/icons-material/ChevronLeftRounded\";\nimport CheckRoundedIcon from \"@mui/icons-material/CheckRounded\";\nimport DeleteOutlineRoundedIcon from \"@mui/icons-material/DeleteOutlineRounded\";\nimport EditOutlinedIcon from \"@mui/icons-material/EditOutlined\";\nimport GroupOutlinedIcon from \"@mui/icons-material/GroupOutlined\";\nimport MoreVertRoundedIcon from \"@mui/icons-material/MoreVertRounded\";\nimport PushPinOutlinedIcon from \"@mui/icons-material/PushPinOutlined\";\nimport StarOutlineRoundedIcon from \"@mui/icons-material/StarOutlined\";\nimport StarOutlineRoundedIcon2 from \"@mui/icons-material/StarOutlineRounded\";\nimport IconButton from \"@mui/material/IconButton/index.js\";\n\nimport KeyboardArrowDownRoundedIcon from \"@mui/icons-material/KeyboardArrowDownRounded\";\nimport RestartAltRoundedIcon from \"@mui/icons-material/RestartAltRounded\";\nimport SaveOutlinedIcon from \"@mui/icons-material/SaveOutlined\";\n\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\nimport { Button } from \"../../form/Button\";\nimport { Box } from \"../../../mui/Box\";\nimport { Text } from \"../../typography/Text\";\n\nimport type { DisplayPanelView } from \"./data-views-display-panel\";\nimport type { SavedViewSummary } from \"./data-views-types\";\n\n/** What the panel needs to drive the views without owning any of them. */\nexport interface ViewNavHandlers {\n views: SavedViewSummary[];\n activeViewId?: string | null;\n /** `null` selects the built-in view named by `copy.nav.mainView`. */\n onSelectView: (id: string | null) => void;\n onEditView: (view: SavedViewSummary) => void;\n onPatchView: (\n view: SavedViewSummary,\n changes: Partial<Pick<SavedViewSummary, \"isDefault\" | \"pinned\" | \"shared\">>,\n ) => void;\n onDeleteView: (view: SavedViewSummary) => void;\n}\n\nconst rowSx = {\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n width: \"100%\",\n px: 1.25,\n py: 1,\n border: 0,\n borderRadius: 1,\n bgcolor: \"transparent\",\n cursor: \"pointer\",\n font: \"inherit\",\n fontSize: \"0.8125rem\",\n textAlign: \"left\",\n color: \"text.primary\",\n \"&:hover\": { bgcolor: \"action.hover\" },\n} as const;\n\n/** The list: the built-in view, then each saved one with its own \"⋮\". */\nexport function ViewsList({\n handlers,\n onOpenActions,\n testIdPrefix,\n}: {\n handlers: ViewNavHandlers;\n onOpenActions: (view: SavedViewSummary) => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n const { views, activeViewId, onSelectView } = handlers;\n const onMain = !activeViewId;\n return (\n <Box sx={{ p: 0.75 }} data-testid={`${testIdPrefix}-views-list`}>\n <Box\n component=\"button\"\n type=\"button\"\n onClick={() => onSelectView(null)}\n data-testid={`${testIdPrefix}-view-main`}\n sx={{ ...rowSx, color: onMain ? \"primary.main\" : \"text.primary\", fontWeight: onMain ? 600 : 400 }}\n >\n <Box component=\"span\" sx={{ flex: 1 }}>\n {copy.nav.mainView}\n </Box>\n {onMain && <CheckRoundedIcon fontSize=\"small\" />}\n </Box>\n\n {views.map((view) => {\n const active = view.id === activeViewId;\n return (\n <Box key={view.id} sx={{ display: \"flex\", alignItems: \"center\" }}>\n <Box\n component=\"button\"\n type=\"button\"\n onClick={() => onSelectView(view.id)}\n data-testid={`${testIdPrefix}-view-${view.id}`}\n sx={{ ...rowSx, minWidth: 0, color: active ? \"primary.main\" : \"text.primary\", fontWeight: active ? 600 : 400 }}\n >\n <Box component=\"span\" sx={{ flex: 1, minWidth: 0, overflow: \"hidden\", textOverflow: \"ellipsis\", whiteSpace: \"nowrap\" }}>\n {view.name}\n </Box>\n {/* What the row-menu toggles DID, readable without opening it:\n a view set as default, pinned or shared says so here. */}\n {view.isDefault && (\n <StarOutlineRoundedIcon fontSize=\"small\" sx={{ color: \"warning.main\" }} titleAccess={copy.nav.defaultTag} />\n )}\n {view.pinned && (\n <PushPinOutlinedIcon fontSize=\"small\" sx={{ color: \"text.disabled\" }} titleAccess=\"Fixada\" />\n )}\n {view.shared && (\n <GroupOutlinedIcon fontSize=\"small\" sx={{ color: \"text.disabled\" }} titleAccess=\"Compartilhada\" />\n )}\n {active && <CheckRoundedIcon fontSize=\"small\" />}\n </Box>\n <IconButton\n size=\"small\"\n onClick={() => onOpenActions(view)}\n aria-label={copy.nav.viewOptions(view.name)}\n data-testid={`${testIdPrefix}-view-${view.id}-menu`}\n >\n <MoreVertRoundedIcon fontSize=\"small\" />\n </IconButton>\n </Box>\n );\n })}\n\n {views.length === 0 && (\n <Text variant=\"caption\" as=\"p\">\n <Box component=\"span\" sx={{ display: \"block\", px: 1.25, py: 1.5, color: \"text.secondary\", lineHeight: 1.6 }}>\n {copy.nav.emptyHint}\n </Box>\n </Text>\n )}\n </Box>\n );\n}\n\n/** One view's actions, reached from its \"⋮\" and left by the back row. */\nexport function ViewActions({\n view,\n handlers,\n onBack,\n testIdPrefix,\n}: {\n view: SavedViewSummary;\n handlers: ViewNavHandlers;\n onBack: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n const { onEditView, onPatchView, onDeleteView } = handlers;\n const action = (\n key: string,\n Icon: typeof StarOutlineRoundedIcon2,\n label: string,\n onClick: () => void,\n opts: { on?: boolean; danger?: boolean } = {},\n ): React.JSX.Element => (\n <Box\n component=\"button\"\n type=\"button\"\n onClick={onClick}\n data-testid={`${testIdPrefix}-view-action-${key}`}\n sx={{\n ...rowSx,\n color: opts.danger ? \"error.main\" : \"text.primary\",\n \"&:hover\": { bgcolor: opts.danger ? \"error.lighter\" : \"action.hover\" },\n }}\n >\n <Icon fontSize=\"small\" sx={{ color: opts.danger ? \"inherit\" : \"text.disabled\" }} />\n <Box component=\"span\" sx={{ flex: 1 }}>\n {label}\n </Box>\n {opts.on && <CheckRoundedIcon fontSize=\"small\" color=\"primary\" />}\n </Box>\n );\n\n return (\n <Box sx={{ p: 0.75 }} data-testid={`${testIdPrefix}-view-actions`}>\n <Box\n component=\"button\"\n type=\"button\"\n onClick={onBack}\n data-testid={`${testIdPrefix}-view-actions-back`}\n sx={{ ...rowSx, color: \"text.secondary\", fontSize: \"0.75rem\" }}\n >\n <ChevronLeftRoundedIcon fontSize=\"small\" />\n <Box component=\"span\" sx={{ flex: 1, fontWeight: 600, color: \"text.primary\" }}>\n {view.name}\n </Box>\n </Box>\n <Box sx={{ my: 0.5, borderTop: 1, borderColor: \"divider\" }} />\n {action(\"edit\", EditOutlinedIcon, copy.nav.editView, () => onEditView(view))}\n {action(\"default\", StarOutlineRoundedIcon2, copy.nav.setDefault, () => onPatchView(view, { isDefault: !view.isDefault }), { on: view.isDefault })}\n {action(\"pin\", PushPinOutlinedIcon, copy.nav.pinToSidebar, () => onPatchView(view, { pinned: !view.pinned }), { on: view.pinned })}\n {action(\"share\", GroupOutlinedIcon, copy.nav.shareWithTeam, () => onPatchView(view, { shared: !view.shared }), { on: view.shared })}\n <Box sx={{ my: 0.5, borderTop: 1, borderColor: \"divider\" }} />\n {action(\"delete\", DeleteOutlineRoundedIcon, copy.nav.deleteView, () => onDeleteView(view), { danger: true })}\n </Box>\n );\n}\n\n/** Name, unsaved dot, chevron — the parts, so the toggle has one decision. */\nfunction ToggleContents({\n view,\n open,\n interactive,\n testIdPrefix,\n}: {\n view: DisplayPanelView;\n open: boolean;\n interactive: boolean;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <>\n <Box component=\"span\" sx={{ fontWeight: 600 }} data-testid={`${testIdPrefix}-display-view-name`}>\n {view.activeViewName ?? copy.nav.mainView}\n </Box>\n {view.dirty && (\n <Box\n component=\"span\"\n aria-label={copy.nav.unsavedChanges}\n data-testid={`${testIdPrefix}-display-dirty`}\n sx={{ height: 6, width: 6, borderRadius: \"50%\", bgcolor: \"primary.main\" }}\n />\n )}\n {interactive && (\n <KeyboardArrowDownRoundedIcon\n fontSize=\"small\"\n sx={{ color: \"text.disabled\", transform: open ? \"rotate(180deg)\" : \"none\" }}\n />\n )}\n </>\n );\n}\n\n/** The name + unsaved dot; a button only when there are views to open. */\nfunction ViewToggle({\n view,\n open,\n onToggle,\n testIdPrefix,\n}: {\n view: DisplayPanelView;\n open: boolean;\n onToggle: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const interactive = Boolean(view.nav);\n // One decision, not eight: a panel with no views renders the same row as\n // plain text rather than as a button that opens nothing.\n const affordance = interactive\n ? { px: 0.75, py: 0.25, cursor: \"pointer\", \"&:hover\": { bgcolor: \"action.hover\" } }\n : { px: 0, py: 0, cursor: \"default\" };\n return (\n <Box\n component={interactive ? \"button\" : \"div\"}\n type={interactive ? \"button\" : undefined}\n onClick={interactive ? onToggle : undefined}\n aria-expanded={interactive ? open : undefined}\n data-testid={`${testIdPrefix}-display-view-toggle`}\n sx={{\n ml: \"auto\",\n display: \"flex\",\n alignItems: \"center\",\n gap: 0.75,\n minWidth: 0,\n border: 0,\n borderRadius: 1,\n font: \"inherit\",\n fontSize: \"0.75rem\",\n bgcolor: open ? \"action.selected\" : \"transparent\",\n ...affordance,\n }}\n >\n <ToggleContents view={view} open={open} interactive={interactive} testIdPrefix={testIdPrefix} />\n </Box>\n );\n}\n\n/** The VISÃO row above the tabs. */\nexport function ViewHeader(props: {\n view: DisplayPanelView;\n open: boolean;\n onToggle: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1, px: 1.5, py: 1, borderBottom: 1, borderColor: \"divider\" }}>\n <Text variant=\"caption\" as=\"span\">\n <Box component=\"span\" sx={{ textTransform: \"uppercase\", letterSpacing: 0.5, color: \"text.disabled\" }}>\n {copy.nav.label}\n </Box>\n </Text>\n <ViewToggle {...props} />\n </Box>\n );\n}\n\n/** Redefinir / Salvar como nova / Atualizar, pinned below the tabs. */\nexport function ViewFooter({\n view,\n onDone,\n testIdPrefix,\n}: {\n view: DisplayPanelView;\n onDone: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n gap: 1,\n px: 1.5,\n py: 1,\n borderTop: 1,\n borderColor: \"divider\",\n bgcolor: \"action.hover\",\n }}\n >\n <Button\n variant=\"text\"\n size=\"sm\"\n color=\"neutral\"\n disabled={!view.dirty}\n startIcon={<RestartAltRoundedIcon fontSize=\"small\" />}\n onClick={view.onReset}\n dataTestId={`${testIdPrefix}-display-reset`}\n >\n {copy.nav.reset}\n </Button>\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1 }}>\n {/* Only meaningful with a view APPLIED: on the main view the single\n \"Salvar visão\" already is \"save as new\". */}\n {view.onUpdate && (\n <Button\n variant=\"text\"\n size=\"sm\"\n color=\"neutral\"\n onClick={() => {\n view.onSaveAs();\n onDone();\n }}\n dataTestId={`${testIdPrefix}-display-save-as`}\n >\n {copy.nav.saveAs}\n </Button>\n )}\n {/* Enabled only when something in Ordenar / Colunas / Exibição (or the\n filters the view also stores) differs from the applied view: the\n filled button is a STATE — \"there is something to save\" — not a\n permanent fixture. */}\n <Button\n size=\"sm\"\n disabled={!view.dirty}\n startIcon={<SaveOutlinedIcon fontSize=\"small\" />}\n onClick={() => {\n (view.onUpdate ?? view.onSaveAs)();\n onDone();\n }}\n dataTestId={`${testIdPrefix}-display-save`}\n >\n {view.onUpdate ? copy.nav.update : copy.nav.save}\n </Button>\n </Box>\n </Box>\n );\n}\n\n"],"mappings":";;;;;;;;;;;;;;AAYA,OAAO,4BAA4B;AACnC,OAAO,sBAAsB;AAC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,KAAK,UAAU;AACjC,uBAAO;AAAA,cACT;AAAA,cACA,YAAY,GAAG,YAAY;AAAA,cAE1B,eAAK,WAAW,KAAK,IAAI,SAAS,KAAK,IAAI;AAAA;AAAA,UAC9C;AAAA,WACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["default"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GridShell
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NXNNICH7.js";
|
|
4
4
|
import {
|
|
5
5
|
useDataViewsState
|
|
6
6
|
} from "./chunk-TX5V42AY.js";
|
|
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
DataViewsGrid
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-QX2PLXQA.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
ViewFooter,
|
|
11
11
|
ViewHeader,
|
|
12
12
|
ViewsList
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O6AZDQJJ.js";
|
|
14
14
|
import {
|
|
15
15
|
useDataViewsCopy
|
|
16
16
|
} from "./chunk-KHG57NAE.js";
|
|
@@ -261,4 +261,4 @@ function DataViewsDisplayPanel({
|
|
|
261
261
|
export {
|
|
262
262
|
DataViewsDisplayPanel
|
|
263
263
|
};
|
|
264
|
-
//# sourceMappingURL=chunk-
|
|
264
|
+
//# sourceMappingURL=chunk-SQNW22ZZ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Alert
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WNMYWQ7D.js";
|
|
4
4
|
|
|
5
5
|
// src/components/data-display/CardKit/card-actions-context.tsx
|
|
6
6
|
import { createContext, useCallback, useContext, useState } from "react";
|
|
@@ -54,4 +54,4 @@ export {
|
|
|
54
54
|
CardActionsProvider,
|
|
55
55
|
useCardActions
|
|
56
56
|
};
|
|
57
|
-
//# sourceMappingURL=chunk-
|
|
57
|
+
//# sourceMappingURL=chunk-SYJMI2NP.js.map
|
|
@@ -24,7 +24,7 @@ var TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits:
|
|
|
24
24
|
var DESCRIPTION = { fontSize: 14.8, opacity: 0.9 };
|
|
25
25
|
var ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 };
|
|
26
26
|
var ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 };
|
|
27
|
-
var CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7,
|
|
27
|
+
var CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 };
|
|
28
28
|
var SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 };
|
|
29
29
|
var GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 };
|
|
30
30
|
var GRADIENT = {
|
|
@@ -32,16 +32,13 @@ var GRADIENT = {
|
|
|
32
32
|
stopAlpha: 0.9,
|
|
33
33
|
shimmerAlpha: 0.2,
|
|
34
34
|
shimmerMs: 3e3,
|
|
35
|
-
shimmerTravel: 1e3
|
|
36
|
-
hoverBrightness: 1.1,
|
|
37
|
-
hoverLift: 2,
|
|
38
|
-
hoverScale: 1.01
|
|
35
|
+
shimmerTravel: 1e3
|
|
39
36
|
};
|
|
40
37
|
var GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 };
|
|
41
38
|
var PULSE = { alpha: 0.2, ms: 2e3, spread: 10 };
|
|
42
|
-
var HOVER = {
|
|
43
|
-
var ACTIVE = {
|
|
44
|
-
var FOCUS = { ringWidth:
|
|
39
|
+
var HOVER = { tintAlpha: 0.06 };
|
|
40
|
+
var ACTIVE = { tintAlpha: 0.2, ms: 250 };
|
|
41
|
+
var FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 };
|
|
45
42
|
var NEUTRAL_GREY = { main: 500, light: 300, dark: 700 };
|
|
46
43
|
var seconds = (ms) => `${ms / 1e3}s`;
|
|
47
44
|
function alertPalette(theme, key) {
|
|
@@ -133,4 +130,4 @@ export {
|
|
|
133
130
|
gradientSurface,
|
|
134
131
|
alertSurface
|
|
135
132
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-TXKZEKJN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/data-display/Alert/Alert.metrics.ts"],"sourcesContent":["import type { AlertVariant } from './Alert.base';\nimport { alpha, darken, lighten } from '../../../tokens/color';\nimport { contrastText, type UiGreyStep, type UiTheme } from '../../../tokens/theme';\n\n/**\n * THE NUMBERS BOTH `Alert` RENDERERS DRAW WITH.\n *\n * `Alert.styles.tsx` / `Alert.tsx` (MUI) and `Alert.native.tsx` (React\n * Native) read this one table. Spacing is in SPACING UNITS where the web\n * writes `theme.spacing(n)`; durations are ms (the web turns them into `s`\n * through {@link seconds} so its emitted CSS is byte-for-byte what it was);\n * everything else is px, a ratio or an alpha. The hover, active and focus\n * numbers are here too although only the DOM can honour them — a number the\n * web draws with belongs in the table whether or not native can reach it.\n */\n\n/** The root: 12px corners, 14px 16px of padding, one 300ms curve for everything. */\nexport const ALERT_RADIUS_UNITS = 1.5;\nexport const ALERT_PADDING_UNITS = { vertical: 1.75, horizontal: 2 } as const;\nexport const ALERT_TRANSITION_MS = 300;\nexport const ALERT_EASING = 'cubic-bezier(0.4, 0, 0.2, 1)';\n\n/** Mount: the web's `fadeInScale` keyframes and the icon's `iconRotate`. */\nexport const FADE_IN = { ms: 300, scale: 0.95, lift: 10 } as const;\nexport const ICON_SPIN = { ms: 600, from: 0.8, mid: 1.1 } as const;\n/** Dismiss: MUI `Collapse` runs 300ms; `onClose` fires 200ms in. */\nexport const COLLAPSE_MS = 300;\nexport const CLOSE_DELAY_MS = 200;\n\n/** The message column: 8px between title, description and children; 0.95rem body on 1.5. */\nexport const MESSAGE_GAP_UNITS = 1;\nexport const MESSAGE_FONT_SIZE = 15.2;\nexport const MESSAGE_LINE_HEIGHT = 1.5;\n/** A control inside the message gets an edge: 4px above, a hairline at 0.45 of the hue. */\nexport const MESSAGE_BUTTON = { marginTopUnits: 0.5, borderAlpha: 0.45 } as const;\n\n/** The title: 1.05rem at 600; MUI's `AlertTitle` lifts it 2px; 4px below it when a description follows. */\nexport const TITLE = { fontSize: 16.8, fontWeight: 600, marginTop: -2, marginBottomUnits: 0.5 } as const;\n/** The description: 0.925rem, slightly faded. */\nexport const DESCRIPTION = { fontSize: 14.8, opacity: 0.9 } as const;\n\n/** The icon slot: MUI's 22px glyph at 0.9, 14px from the words, 2px down (MUI's 7px stays below). */\nexport const ICON_SLOT = { size: 22, opacity: 0.9, marginRightUnits: 1.75, paddingTopUnits: 0.25, paddingBottom: 7 } as const;\n/** The action slot: MUI's `4px 0 0 16px` with the 16px ours, pushed right, 8px into the padding. */\nexport const ACTION_SLOT = { paddingLeftUnits: 2, paddingTop: 4, marginRight: -8 } as const;\n/** The close button: MUI's small `IconButton` (5px padding, 18px glyph) at 0.7. */\nexport const CLOSE_BUTTON = { padding: 5, iconSize: 18, opacity: 0.7, washAlpha: 0.1 } as const;\n\n/**\n * A semantic Alert's surface and ink: an OPAQUE tint of the hue with a dark\n * ink of the same hue — MUI's own `standard` recipe, at its ratios. See\n * `semanticSurface` in `Alert.styles.tsx` for why not `alpha(main, 0.1)`.\n */\nexport const SEMANTIC_SURFACE = { tint: { light: 0.9, dark: 0.8 }, ink: 0.6, borderAlpha: 0.35 } as const;\n/** `glass`: 85% paper under a 20px blur, a 0.4 divider hairline. */\nexport const GLASS = { backgroundAlpha: 0.85, borderAlpha: 0.4, blur: 20, saturatePercent: 180 } as const;\n/**\n * `gradient`: light→dark at 0.9 along 135°, a 0.2 white shimmer sweeping 1000px every 3s.\n *\n * It carries no hover of its own, and that is load-bearing rather than an\n * omission. `alertVariantStyles` is spread AFTER the root's `'&:hover'` in the\n * same object literal, so a second `'&:hover'` key does not merge with it — it\n * REPLACES it. While this variant had one, `gradient` was the only alert that\n * brightened on hover while every other variant darkened, and the only one to\n * lose the shimmer reveal the root's hover performs.\n */\nexport const GRADIENT = {\n angleDeg: 135,\n stopAlpha: 0.9,\n shimmerAlpha: 0.2,\n shimmerMs: 3000,\n shimmerTravel: 1000,\n} as const;\n\n/** Emphasis: the glow's shadow and brightness, the pulse's wash. */\nexport const GLOW = { blur: 20, spread: 5, alpha: 0.3, brightness: 1.05 } as const;\nexport const PULSE = { alpha: 0.2, ms: 2000, spread: 10 } as const;\n\n/**\n * Pointer states — DOM only, kept so the web derives them.\n *\n * HOVER and ACTIVE carry NO geometry, and that is the point rather than an\n * omission. They used to lift the card 3px, scale it 1.01, grow a 20px shadow\n * and spin the icon 10deg at 1.15 — four things moving at once on a surface\n * that is not a control, which made a page of alerts twitch under the pointer.\n *\n * Both are a TINT now: a flat inset layer over the surface. Two mechanisms\n * came before it and each failed on a case the next had to fix. Dropping the\n * element's `opacity` composites toward the PAGE, so it inverted the hover on\n * a light tint (L* 95.0 idle, 89.1 hovered, 91.1 pressed) and vanished on a\n * dark one. A `filter: brightness()` fixed the direction but is MULTIPLICATIVE,\n * so it moved a near-black `glass` by four counts (ΔE76 1.71, under the JND)\n * and Banner's 10%-alpha wash by ΔE76 0.44. A layer is additive: it reads the\n * same on an opaque tint, a translucent wash and a gradient, and because it\n * paints above the background and below the content the ink keeps its own\n * contrast.\n */\nexport const HOVER = { tintAlpha: 0.06 } as const;\n\n/**\n * The press: a 20% tint LAYER, eased back fast.\n *\n * The layer is the point. The first attempt dropped the whole element's\n * opacity, which composites toward the PAGE and so behaves differently on\n * every surface it is asked about. Measured: over a light page it made a light\n * tint LIGHTER (L* 95.0 idle, 89.1 hovered, 91.1 pressed), so pushing the\n * surface looked like the pointer leaving; over a dark page it landed back on\n * the idle surface (ΔE76 0.82 on `glass`); on `gradient` it washed white body\n * copy to 2.31:1, under AA; and it diluted the ink during a text-selection\n * drag. A `brightness()` step instead of it fixed the direction but not the\n * reach — a multiplier does nothing to a near-black `glass` in dark mode\n * (ΔE76 1.71) and nothing to Banner's 10%-alpha wash (ΔE76 0.44), because it\n * scales only what the element already paints.\n *\n * An inset shadow at 100vmax is a flat tint over the whole surface: ADDITIVE,\n * so it reads the same on an opaque tint, a translucent wash and a gradient;\n * painted above the background and below the content, so the ink keeps its\n * own contrast; and animatable, which `background-image` is not.\n *\n * `ms` is 250 and not the 1000 first asked for, and the reason is that ONE\n * property carries both states. CSS runs a transition from the DESTINATION\n * state's declaration, and entering hover and releasing a press share that\n * destination — so they cannot have different durations without a second\n * animatable property, and both free pseudo-elements are already spent on the\n * `gradient` shimmer and the `pulse` wash. At 1000ms the hover inherited the\n * second: crossing an alert in 300ms peaked at a ≈ 0.024, under the JND, and\n * for ~360ms the alert you had just LEFT was darker than the one under the\n * pointer. A fast press-return is the smaller loss, and it is the call the\n * product owner made when shown both.\n */\nexport const ACTIVE = { tintAlpha: 0.2, ms: 250 } as const;\n\nexport const FOCUS = { ringWidth: 2, ringAlpha: 1, offset: 2 } as const;\n\n/** `neutral` has no palette slot; the web has always drawn it from three greys. */\nexport const NEUTRAL_GREY: Record<'main' | 'light' | 'dark', UiGreyStep> = { main: 500, light: 300, dark: 700 };\n\n/** A duration as the CSS the web has always emitted: `2000` → `2s`, `300` → `0.3s`. */\nexport const seconds = (ms: number): string => `${ms / 1000}s`;\n\n/** The palette shape the web's `getColorFromTheme` returns — a main plus optional shades. */\nexport interface AlertPalette {\n main: string;\n light?: string;\n dark?: string;\n}\n\n/**\n * The renderer-free twin of the web's `getColorFromTheme`: a variant or\n * colour name to its palette, `neutral` from the greys, anything unknown\n * (`glass`, `gradient`) to `info`.\n */\nexport function alertPalette(theme: UiTheme, key: string | undefined): AlertPalette {\n switch (key) {\n case 'info':\n case 'success':\n case 'warning':\n case 'danger':\n case 'primary':\n case 'secondary':\n return theme.palette[key];\n case 'neutral':\n return {\n main: theme.palette.grey[NEUTRAL_GREY.main],\n light: theme.palette.grey[NEUTRAL_GREY.light],\n dark: theme.palette.grey[NEUTRAL_GREY.dark],\n };\n default:\n return theme.palette.info;\n }\n}\n\n/** What a variant paints: its fill, its ink, its hairline if any, and the colour of its glyph. */\nexport interface AlertSurface {\n backgroundColor: string;\n color: string;\n borderColor?: string;\n iconColor: string;\n}\n\nexport const SEMANTIC_VARIANTS: ReadonlySet<AlertVariant> = new Set(['info', 'success', 'warning', 'danger']);\n\n/** The opaque tint and same-hue ink, inverted for dark mode; the hairline keeps its alpha. */\nexport function semanticSurface(theme: UiTheme, palette: AlertPalette): AlertSurface {\n const dark = theme.mode === 'dark';\n return {\n backgroundColor: dark\n ? darken(palette.main, SEMANTIC_SURFACE.tint.dark)\n : lighten(palette.main, SEMANTIC_SURFACE.tint.light),\n color: dark ? lighten(palette.main, SEMANTIC_SURFACE.ink) : darken(palette.main, SEMANTIC_SURFACE.ink),\n borderColor: alpha(palette.main, SEMANTIC_SURFACE.borderAlpha),\n iconColor: palette.main,\n };\n}\n\nexport function glassSurface(theme: UiTheme): AlertSurface {\n return {\n backgroundColor: alpha(theme.palette.background.paper, GLASS.backgroundAlpha),\n color: theme.palette.text.primary,\n borderColor: alpha(theme.palette.divider, GLASS.borderAlpha),\n iconColor: theme.palette.primary.main,\n };\n}\n\n/** The gradient's two stops; a renderer with no gradient fill paints `from`. */\nexport function gradientStops(palette: AlertPalette): { from: string; to: string } {\n return {\n from: alpha(palette.light || palette.main, GRADIENT.stopAlpha),\n to: alpha(palette.dark || palette.main, GRADIENT.stopAlpha),\n };\n}\n\nexport function gradientSurface(palette: AlertPalette): AlertSurface {\n const ink = contrastText(palette.main);\n return { backgroundColor: gradientStops(palette).from, color: ink, iconColor: ink };\n}\n\n/** The surface for a variant, `glass` and `gradient` included. */\nexport function alertSurface(theme: UiTheme, variant: AlertVariant, palette: AlertPalette): AlertSurface {\n if (variant === 'glass') return glassSurface(theme);\n if (variant === 'gradient') return gradientSurface(palette);\n return semanticSurface(theme, palette);\n}\n"],"mappings":";;;;;;;;;;AAiBO,IAAM,qBAAqB;AAC3B,IAAM,sBAAsB,EAAE,UAAU,MAAM,YAAY,EAAE;AAC5D,IAAM,sBAAsB;AAC5B,IAAM,eAAe;AAGrB,IAAM,UAAU,EAAE,IAAI,KAAK,OAAO,MAAM,MAAM,GAAG;AACjD,IAAM,YAAY,EAAE,IAAI,KAAK,MAAM,KAAK,KAAK,IAAI;AAEjD,IAAM,cAAc;AACpB,IAAM,iBAAiB;AAGvB,IAAM,oBAAoB;AAC1B,IAAM,oBAAoB;AAC1B,IAAM,sBAAsB;AAE5B,IAAM,iBAAiB,EAAE,gBAAgB,KAAK,aAAa,KAAK;AAGhE,IAAM,QAAQ,EAAE,UAAU,MAAM,YAAY,KAAK,WAAW,IAAI,mBAAmB,IAAI;AAEvF,IAAM,cAAc,EAAE,UAAU,MAAM,SAAS,IAAI;AAGnD,IAAM,YAAY,EAAE,MAAM,IAAI,SAAS,KAAK,kBAAkB,MAAM,iBAAiB,MAAM,eAAe,EAAE;AAE5G,IAAM,cAAc,EAAE,kBAAkB,GAAG,YAAY,GAAG,aAAa,GAAG;AAE1E,IAAM,eAAe,EAAE,SAAS,GAAG,UAAU,IAAI,SAAS,KAAK,WAAW,IAAI;AAO9E,IAAM,mBAAmB,EAAE,MAAM,EAAE,OAAO,KAAK,MAAM,IAAI,GAAG,KAAK,KAAK,aAAa,KAAK;AAExF,IAAM,QAAQ,EAAE,iBAAiB,MAAM,aAAa,KAAK,MAAM,IAAI,iBAAiB,IAAI;AAWxF,IAAM,WAAW;AAAA,EACtB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,cAAc;AAAA,EACd,WAAW;AAAA,EACX,eAAe;AACjB;AAGO,IAAM,OAAO,EAAE,MAAM,IAAI,QAAQ,GAAG,OAAO,KAAK,Y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