@12-apps/ui 6.92.0 → 6.92.2

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.
Files changed (59) hide show
  1. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +10 -10
  2. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +11 -11
  3. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +5 -5
  4. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +9 -9
  5. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +7 -7
  6. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +13 -7
  7. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +6 -6
  8. package/dist/_internal/components/data-display/DataViews/data-views-range-bounds.js +2 -2
  9. package/dist/_internal/components/data-display/DataViews/data-views-range-calendar.js +1 -1
  10. package/dist/_internal/components/data-display/DataViews/data-views-range-pill.js +4 -4
  11. package/dist/_internal/components/data-display/DataViews/data-views-range-summary.js +1 -1
  12. package/dist/{chunk-W2KOP27S.js → chunk-3I5PHWKQ.js} +2 -2
  13. package/dist/{chunk-3OHZAZEE.js → chunk-3WYEENUH.js} +9 -4
  14. package/dist/chunk-3WYEENUH.js.map +1 -0
  15. package/dist/{chunk-R4LCPPKA.js → chunk-CNUO2BRV.js} +2 -2
  16. package/dist/{chunk-MZAYIG2I.js → chunk-D2JQF2WC.js} +66 -16
  17. package/dist/chunk-D2JQF2WC.js.map +1 -0
  18. package/dist/{chunk-HS662RLW.js → chunk-DWH4TQXK.js} +4 -3
  19. package/dist/chunk-DWH4TQXK.js.map +1 -0
  20. package/dist/{chunk-FORAVDJF.js → chunk-FC7UCFFA.js} +35 -7
  21. package/dist/chunk-FC7UCFFA.js.map +1 -0
  22. package/dist/{chunk-CKQOYPH3.js → chunk-FYUNROLW.js} +2 -2
  23. package/dist/{chunk-MICX23P4.js → chunk-HRES2S3Q.js} +85 -8
  24. package/dist/chunk-HRES2S3Q.js.map +1 -0
  25. package/dist/{chunk-X3GD3TFI.js → chunk-KQDBOZQE.js} +3 -3
  26. package/dist/{chunk-AI7XWBNG.js → chunk-QE4KYG5I.js} +3 -3
  27. package/dist/chunk-WLDP7C4K.js +44 -0
  28. package/dist/chunk-WLDP7C4K.js.map +1 -0
  29. package/dist/data-display/DataViews.js +11 -11
  30. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +80 -0
  31. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
  32. package/dist/types/components/data-display/DataViews/data-views-more-filters.d.ts.map +1 -1
  33. package/dist/types/components/data-display/DataViews/data-views-range-bounds.d.ts +6 -1
  34. package/dist/types/components/data-display/DataViews/data-views-range-bounds.d.ts.map +1 -1
  35. package/dist/types/components/data-display/DataViews/data-views-range-calendar.d.ts +13 -1
  36. package/dist/types/components/data-display/DataViews/data-views-range-calendar.d.ts.map +1 -1
  37. package/dist/types/components/data-display/DataViews/data-views-range-pill.d.ts.map +1 -1
  38. package/dist/types/components/data-display/DataViews/data-views-range-summary.d.ts +4 -5
  39. package/dist/types/components/data-display/DataViews/data-views-range-summary.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/components/data-display/DataViews/RESPONSIVE-BEHAVIOUR.md +8 -4
  42. package/src/components/data-display/DataViews/data-views-more-fields.tsx +90 -14
  43. package/src/components/data-display/DataViews/data-views-more-filters.tsx +2 -2
  44. package/src/components/data-display/DataViews/data-views-range-bounds.tsx +57 -3
  45. package/src/components/data-display/DataViews/data-views-range-calendar.tsx +122 -8
  46. package/src/components/data-display/DataViews/data-views-range-pill.tsx +5 -0
  47. package/src/components/data-display/DataViews/data-views-range-summary.tsx +9 -22
  48. package/dist/chunk-3OHZAZEE.js.map +0 -1
  49. package/dist/chunk-FORAVDJF.js.map +0 -1
  50. package/dist/chunk-HS662RLW.js.map +0 -1
  51. package/dist/chunk-J2AVWIMM.js +0 -60
  52. package/dist/chunk-J2AVWIMM.js.map +0 -1
  53. package/dist/chunk-MICX23P4.js.map +0 -1
  54. package/dist/chunk-MZAYIG2I.js.map +0 -1
  55. /package/dist/{chunk-W2KOP27S.js.map → chunk-3I5PHWKQ.js.map} +0 -0
  56. /package/dist/{chunk-R4LCPPKA.js.map → chunk-CNUO2BRV.js.map} +0 -0
  57. /package/dist/{chunk-CKQOYPH3.js.map → chunk-FYUNROLW.js.map} +0 -0
  58. /package/dist/{chunk-X3GD3TFI.js.map → chunk-KQDBOZQE.js.map} +0 -0
  59. /package/dist/{chunk-AI7XWBNG.js.map → chunk-QE4KYG5I.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-range-bounds.tsx"],"sourcesContent":["'use client';\n\n/**\n * The `De`/`Até` pair of a range filter, its preset chips, the line under it\n * and — for a day range — the calendar under that (FUT-4144). Shared by the\n * pill's popover, the slide-in panel and the \"Mais\" sheet, so the three cannot\n * drift on what a bound accepts or how it clears.\n */\nimport Box from '@mui/material/Box/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React, { useState } from 'react';\n\nimport { useDataViewsCopy } from './data-views-copy-context';\nimport { DayBoundInput } from './data-views-day-input';\nimport { NumberBoundInput } from './data-views-number-input';\nimport { RangePresets } from './data-views-preset-chips';\nimport { DayRangeCalendar } from './data-views-range-calendar';\nimport { presetsFor } from './data-views-range-presets';\nimport { useOutsideResetKey } from './data-views-range-reset';\nimport { isRangeInverted } from './data-views-range-values';\nimport type { RangeFieldConfig, RangeValue } from './data-views-types';\nimport { sxRem } from '../../../tokens/relative';\n\n/**\n * One end of the range. A day keeps its `AAAA-MM-DD` string verbatim (the form\n * both the field and the backend speak) and is typed through the masked\n * `dd/mm/aaaa` field rather than a native date input — see\n * {@link DayBoundInput} for why. A number parses, and an unparseable/blank\n * entry CLEARS the bound rather than writing `NaN`.\n */\nfunction BoundField<T extends Record<string, unknown>>({\n field,\n label,\n value,\n onChange,\n testId,\n fill,\n}: {\n field: RangeFieldConfig<T>;\n label: string;\n value: number | string | undefined;\n onChange: (bound: number | string | undefined) => void;\n testId: string;\n /** A number box takes its cell's width; a day box always does. */\n fill: boolean;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n if (field.kind === 'day') {\n return (\n <DayBoundInput\n fill\n mask={copy.filters.dayMask}\n invalidMessage={copy.filters.dayInvalid}\n label={label}\n value={value == null ? undefined : String(value)}\n onChange={onChange}\n testId={testId}\n />\n );\n }\n return (\n <NumberBoundInput\n fill={fill}\n label={label}\n value={value}\n unit={field.unit}\n onChange={onChange}\n testId={testId}\n />\n );\n}\n\n\n/** One box of the pair: an equal share of the row for a day, as it was for a number. */\nfunction BoundCell({ grow, children }: { grow: boolean; children: React.ReactNode }): React.JSX.Element {\n if (!grow) return <>{children}</>;\n return <Box sx={{ flex: '1 1 0', minWidth: 0 }}>{children}</Box>;\n}\n\n/**\n * The line under the pair: why an inverted window matches nothing, or — for a\n * day range — that BOTH days are in the result. Saying so is FUT-668's other\n * half: the bounds compare as ISO strings precisely so `até` keeps its whole\n * day, and nothing on screen would otherwise tell the merchant that.\n */\nfunction RangeNote({\n day,\n inverted,\n testId,\n}: {\n day: boolean;\n inverted: boolean;\n testId: string;\n}): React.JSX.Element | null {\n const copy = useDataViewsCopy();\n if (inverted) {\n return (\n <Typography\n component=\"p\"\n data-testid={`${testId}-inverted`}\n sx={{ mt: 0.75, fontSize: sxRem(12), color: 'error.main' }}\n >\n {copy.filters.rangeInvalid}\n </Typography>\n );\n }\n if (!day) return null;\n return (\n <Typography\n component=\"p\"\n data-testid={`${testId}-inclusive`}\n // `text.secondary`, not `disabled`: the note is read, and disabled grey\n // at 12px is 2.68:1 (FUT-4144 UI review).\n sx={{ mt: { xs: 0.25, sm: 0.75 }, fontSize: sxRem(12), color: 'text.secondary' }}\n >\n {copy.filters.rangeInclusiveNote}\n </Typography>\n );\n}\n\n/** Props of {@link RangeBounds}. */\ninterface RangeBoundsProps<T extends Record<string, unknown>> {\n field: RangeFieldConfig<T>;\n value: RangeValue;\n onChange: (range: RangeValue) => void;\n testId: string;\n /**\n * Months the day calendar shows side by side (FUT-4144). Two where the\n * popover has the room; one, with the month/year selectors, on a phone and\n * in the panels.\n */\n calendarMonths?: 1 | 2;\n /**\n * Whether the day calendar is mounted. A host that keeps the pair mounted\n * while hidden (the slide-in panel) passes its open state, so a closed panel\n * holds no calendar of its own.\n */\n showCalendar?: boolean;\n /**\n * A NUMBER pair splits the row equally too, as a day pair always does. Set\n * by the panels, whose width is the row's; the pill's popover sizes itself to\n * its content and keeps the boxes' own width.\n */\n fillRow?: boolean;\n}\n\n/**\n * The `De`/`Até` pair for a range — shared by the pill's popover and the\n * slide-in panel's day fields, so the two surfaces cannot drift on what a bound\n * accepts or how it clears.\n */\nexport function RangeBounds<T extends Record<string, unknown>>({\n field,\n value,\n onChange,\n testId,\n calendarMonths = 1,\n showCalendar = true,\n fillRow = false,\n}: RangeBoundsProps<T>): React.JSX.Element {\n const copy = useDataViewsCopy();\n const { key, emitted } = useOutsideResetKey(value);\n // Moves the calendar to a TYPED day. A typed write is the fields' own, so\n // the outside key above does not see it; a tap on the calendar moves\n // neither, which is what keeps it still under the finger.\n const [typed, setTyped] = useState(0);\n const typedChange = (range: RangeValue) => {\n setTyped((n) => n + 1);\n onChange(emitted(range));\n };\n const day = field.kind === 'day';\n return (\n <Box data-testid={`${testId}-panel`}>\n {/* Above the inputs, not below: the presets are the answer for most\n merchants, and the two date pickers are the escape hatch. */}\n <Box sx={{ '&:not(:empty)': { mb: { xs: 1, sm: 1.5 } } }}>\n <RangePresets presets={presetsFor(field, copy)} value={value} onChange={onChange} testId={testId} />\n </Box>\n {/* Top-aligned: a day that does not exist grows ITS field by a message\n line, and centring would push the other box half a line down. The two\n boxes are one height, so with no message this is the same row. */}\n <Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 1.5 }}>\n {/* A day pair shares the row equally, so it spans the calendar under\n it; a number pair keeps its own widths. */}\n <BoundCell grow={day || fillRow}>\n <BoundField\n key={`min-${key}`}\n field={field}\n label={copy.filters.rangeStart}\n value={value.min}\n onChange={(min) => typedChange({ ...value, min })}\n testId={`${testId}-min`}\n fill={fillRow}\n />\n </BoundCell>\n <BoundCell grow={day || fillRow}>\n <BoundField\n key={`max-${key}`}\n field={field}\n label={copy.filters.rangeEnd}\n value={value.max}\n onChange={(max) => typedChange({ ...value, max })}\n testId={`${testId}-max`}\n fill={fillRow}\n />\n </BoundCell>\n </Box>\n <RangeNote day={day} inverted={isRangeInverted(value)} testId={testId} />\n {/* Under the boxes and the note, with no button to reach it: the typed\n path stays as short as it was, and a period is two taps (FUT-4144). */}\n {day && showCalendar && (\n <DayRangeCalendar\n fieldLabel={field.label}\n value={value}\n onChange={(range) => onChange(emitted(range))}\n months={calendarMonths}\n viewKey={`${key}-${typed}`}\n testId={testId}\n />\n )}\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,OAAO,SAAS;AAChB,OAAO,gBAAgB;AACvB,SAAgB,gBAAgB;AAuC1B,SA0Bc,UA1Bd,KAoIA,YApIA;AAnBN,SAAS,WAA8C;AAAA,EACrD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQsB;AACpB,QAAM,OAAO,iBAAiB;AAC9B,MAAI,MAAM,SAAS,OAAO;AACxB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,MAAI;AAAA,QACJ,MAAM,KAAK,QAAQ;AAAA,QACnB,gBAAgB,KAAK,QAAQ;AAAA,QAC7B;AAAA,QACA,OAAO,SAAS,OAAO,SAAY,OAAO,KAAK;AAAA,QAC/C;AAAA,QACA;AAAA;AAAA,IACF;AAAA,EAEJ;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM,MAAM;AAAA,MACZ;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;AAIA,SAAS,UAAU,EAAE,MAAM,SAAS,GAAoE;AACtG,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AE,EAAE,GACrD,8BAAC,gBAAa,SAAS,WAAW,OAAO,IAAI,GAAG,OAAc,UAAoB,QAAgB,GACpG;AAAA,IAIA,qBAAC,OAAI,IAAI,EAAE,SAAS,QAAQ,YAAY,cAAc,KAAK,IAAI,GAG7D;AAAA,0BAAC,aAAU,MAAM,OAAO,SACtB;AAAA,QAAC;AAAA;AAAA,UAEC;AAAA,UACA,OAAO,KAAK,QAAQ;AAAA,UACpB,OAAO,MAAM;AAAA,UACb,UAAU,CAAC,QAAQ,YAAY,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,UAChD,QAAQ,GAAG,MAAM;AAAA,UACjB,MAAM;AAAA;AAAA,QAND,OAAO,GAAG;AAAA,MAOjB,GACF;AAAA,MACA,oBAAC,aAAU,MAAM,OAAO,SACtB;AAAA,QAAC;AAAA;AAAA,UAEC;AAAA,UACA,OAAO,KAAK,QAAQ;AAAA,UACpB,OAAO,MAAM;AAAA,UACb,UAAU,CAAC,QAAQ,YAAY,EAAE,GAAG,OAAO,IAAI,CAAC;AAAA,UAChD,QAAQ,GAAG,MAAM;AAAA,UACjB,MAAM;AAAA;AAAA,QAND,OAAO,GAAG;AAAA,MAOjB,GACF;AAAA,OACF;AAAA,IACA,oBAAC,aAAU,KAAU,UAAU,gBAAgB,KAAK,GAAG,QAAgB;AAAA,IAGtE,OAAO,gBACN;AAAA,MAAC;AAAA;AAAA,QACC,YAAY,MAAM;AAAA,QAClB;AAAA,QACA,UAAU,CAAC,UAAU,SAAS,QAAQ,KAAK,CAAC;AAAA,QAC5C,QAAQ;AAAA,QACR,SAAS,GAAG,GAAG,IAAI,KAAK;AAAA,QACxB;AAAA;AAAA,IACF;AAAA,KAEJ;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-more-filters.tsx"],"sourcesContent":["\"use client\";\n\nimport KeyboardArrowDownRoundedIcon from \"@mui/icons-material/KeyboardArrowDownRounded\";\n// A FUNNEL, not the tune sliders this used to share with \"Exibir\". The two\n// sit a few px apart on the same bar and do unrelated things — one narrows\n// WHICH rows you see, the other changes HOW they are shown — and with one\n// glyph between them the bar offered the operator no way to tell which was\n// which. On a phone, where both are icon-only, they were indistinguishable.\nimport FilterAltRoundedIcon from \"@mui/icons-material/FilterAltRounded\";\nimport Popover from \"@mui/material/Popover/index.js\";\nimport { useTheme, type Theme } from \"@mui/material/styles/index.js\";\nimport useMediaQuery from \"@mui/material/useMediaQuery/index.js\";\n\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 { fieldClearing, MoreGroup, MoreQuick, type MoreFieldProps } from \"./data-views-more-fields\";\nimport { useStillAnchor } from \"./data-views-still-anchor\";\nimport type { OverflowField } from \"./data-views-overflow\";\nimport { rem, remPx, sxRem } from \"../../../tokens/relative\";\n\n/**\n * \"MAIS\" — the filter overflow: its trigger, its panel and its footer. What\n * goes INSIDE it is `data-views-more-fields`.\n *\n * It holds the fields that had no room on the toolbar. An applied filter is\n * ranked ahead of an idle one for the visible slots but is NOT exempt (see\n * `useFilterOverflow`), so an applied filter can be in here — on a phone, most\n * of them are. That is why the trigger changes tone and counts the applied\n * ones: a filter you cannot see is a filter you forget you set, and the badge\n * is what stops that.\n */\n\ninterface MoreFiltersProps<T extends Record<string, unknown>> extends MoreFieldProps {\n fields: OverflowField<T>[];\n}\n\n/**\n * The trigger, badged with how many fields had no room on the bar — and told\n * apart when some of them are APPLIED.\n *\n * An applied filter can land in here now (it is ranked first, not exempt), so\n * this button is the only thing on screen still saying it exists. A neutral\n * badge reading \"3\" would make \"three filters you have not used\" and \"three\n * filters narrowing this list\" look identical, which is the whole failure the\n * old exemption was written to avoid. So an overflow holding applied filters\n * takes the applied tone and counts them in its own badge.\n */\nfunction MoreTrigger({\n count,\n appliedCount,\n compact,\n onOpen,\n testIdPrefix,\n}: {\n count: number;\n appliedCount: number;\n /** Icon only — the same rung that strips Exibir/Exportar. */\n compact: boolean;\n onOpen: (anchor: HTMLElement) => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n const applied = appliedCount > 0;\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n color=\"neutral\"\n onClick={(event) => onOpen(event.currentTarget as HTMLElement)}\n dataTestId={`${testIdPrefix}-more-filters`}\n aria-label={\n applied\n ? copy.filters.moreFiltersApplied(count, appliedCount)\n : copy.filters.moreFilters(count)\n }\n >\n <Box\n component=\"span\"\n sx={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 0.5,\n color: applied ? \"primary.main\" : undefined,\n }}\n >\n <FilterAltRoundedIcon fontSize=\"small\" />\n {!compact && (\n <Box component=\"span\" sx={{ display: { xs: \"none\", sm: \"inline\" } }}>\n {copy.filters.moreTriggerLabel}\n </Box>\n )}\n <Box\n component=\"span\"\n data-testid={`${testIdPrefix}-more-badge`}\n sx={{\n px: 0.75,\n borderRadius: 5,\n bgcolor: applied ? \"primary.main\" : \"action.selected\",\n color: applied ? \"primary.contrastText\" : undefined,\n fontSize: sxRem(11),\n fontWeight: applied ? 700 : undefined,\n }}\n >\n {applied ? appliedCount : count}\n </Box>\n {!compact && <KeyboardArrowDownRoundedIcon fontSize=\"small\" />}\n </Box>\n </Button>\n );\n}\n\n/** The panel's heading: what these are, and why they are in here. */\nfunction MoreHeading(): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box\n sx={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 1,\n px: 1.5,\n py: 1,\n borderBottom: 1,\n borderColor: \"divider\",\n }}\n >\n <Text variant=\"caption\" as=\"span\">\n <Box component=\"span\" sx={{ textTransform: \"uppercase\", letterSpacing: sxRem(0.5), color: \"text.disabled\" }}>\n {copy.filters.moreHeading}\n </Box>\n </Text>\n <Text variant=\"caption\" as=\"span\">\n <Box component=\"span\" sx={{ ml: \"auto\", color: \"text.disabled\" }}>\n {copy.filters.overflowNote}\n </Box>\n </Text>\n </Box>\n );\n}\n\n/**\n * The panel's own way back to the unfiltered list.\n *\n * The bar's \"Limpar\" is the primary one, but it is a control like any other\n * and the ladder can take its label — and on the narrowest rungs this panel is\n * where most of the fields ended up anyway. Clearing everything from inside it\n * saves closing it to reach a button three pixels wide.\n */\nfunction MoreFooter({\n onClearAll,\n testIdPrefix,\n reserved = false,\n}: {\n onClearAll: () => void;\n testIdPrefix: string;\n /**\n * Hold the footer's height with nothing in it. A panel holding a day range\n * keeps the row while nothing is applied, so the first tap on its calendar\n * does not grow the panel by a row and move its top under the finger\n * (FUT-4144 UI review).\n */\n reserved?: boolean;\n}): React.JSX.Element {\n const copy = useDataViewsCopy();\n return (\n <Box\n aria-hidden={reserved || undefined}\n // Held, the row is blank — no rule over it either, or it reads as an\n // empty bordered row.\n sx={{ px: 1.5, py: 1, borderTop: 1, borderColor: reserved ? \"transparent\" : \"divider\", visibility: reserved ? \"hidden\" : undefined }}\n >\n <Box\n component=\"button\"\n type=\"button\"\n onClick={reserved ? undefined : onClearAll}\n tabIndex={reserved ? -1 : undefined}\n data-testid={reserved ? undefined : `${testIdPrefix}-more-clear-all`}\n sx={{\n width: \"100%\",\n border: 0,\n p: 0,\n bgcolor: \"transparent\",\n cursor: \"pointer\",\n font: \"inherit\",\n fontSize: sxRem(13),\n textAlign: \"left\",\n color: \"primary.main\",\n \"&:hover\": { textDecoration: \"underline\" },\n }}\n >\n {copy.filters.clearAll}\n </Box>\n </Box>\n );\n}\n\n/** The panel's body: a shed quick chip as a toggle row, anything else as a labelled group. */\nfunction MoreFields<T extends Record<string, unknown>>({\n fields,\n ...rest\n}: MoreFiltersProps<T>): React.JSX.Element {\n return (\n <>\n {fields.map((field) =>\n field.quick ? (\n <MoreQuick key={field.id} quick={field.quick} {...rest} />\n ) : (\n <MoreGroup key={field.id} field={field} {...rest} />\n ),\n )}\n </>\n );\n}\n\n/**\n * The panel is a column: heading, the fields' scroller, footer. Its height is\n * the screen's, not a fixed 320px — at 390×844 that cap scrolled a day range's\n * month caption and weekday row out of view after the first tap, and a typed\n * day's refusal out of sight of its box (FUT-4144 UI review). MUI moves the\n * panel up when it is taller than the room under its trigger.\n */\nconst COLUMN_SX = { display: \"flex\", flexDirection: \"column\" } as const;\n\n/**\n * 320, not 300: inside 12px of padding a day range's month then has the 280px\n * its seven 40px columns need and its month/year caption one row (FUT-4144).\n */\nconst PAPER_SX = (theme: Theme) => ({\n ...COLUMN_SX,\n width: rem(theme, 320),\n maxWidth: `calc(100vw - ${rem(theme, 32)})`,\n});\n\n/**\n * Below `sm` the panel takes the screen's width less 8px each side, so a day\n * range's calendar gets the 280px its seven 40px columns need (it had 264 at\n * 320 and 276 at 390, so every day was a 34-36px target).\n */\nconst PHONE_PAPER_SX = (theme: Theme) => ({\n ...COLUMN_SX,\n width: `calc(100vw - ${rem(theme, 16)})`,\n maxWidth: `calc(100vw - ${rem(theme, 16)})`,\n maxHeight: `calc(100% - ${rem(theme, 16)})`,\n});\n\n/** Props of {@link MoreFilters}. */\ninterface MoreFiltersPanelProps<T extends Record<string, unknown>> extends MoreFiltersProps<T> {\n /** Changes on every clear-all; the fields here are keyed on it (FUT-4144). */\n clearKey?: number;\n /** Icon only — the same rung that strips Exibir/Exportar. */\n compact?: boolean;\n /** Clears every filter, not just the ones in here. */\n onClearAll: () => void;\n /** Whether anything is applied anywhere — the footer is pointless otherwise. */\n anyApplied: boolean;\n /**\n * So the shell can FREEZE the measured split while this panel is open.\n *\n * Applying a filter in here makes its field active, and an active field\n * takes an inline slot first — so the field being edited was promoted OUT of\n * this panel mid-keystroke, taking the focused input with it. Typing \"12\"\n * got as far as \"1\" and then had nowhere to go.\n */\n onOpenChange?: (open: boolean) => void;\n}\n\n/** The overflow trigger + panel. Renders nothing when everything fits. */\nexport function MoreFilters<T extends Record<string, unknown>>({\n fields,\n onOpenChange,\n onClearAll,\n anyApplied,\n compact = false,\n clearKey,\n ...rest\n}: MoreFiltersPanelProps<T>): React.JSX.Element | null {\n const still = useStillAnchor();\n const theme = useTheme();\n const phone = useMediaQuery(theme.breakpoints.down(\"sm\"));\n if (fields.length === 0) return null;\n const holdsDayRange = fields.some((field) => field.range?.kind === \"day\");\n return (\n <>\n <MoreTrigger\n count={fields.length}\n appliedCount={\n fields.filter(\n (field) =>\n fieldClearing({\n field,\n pills: rest.pills,\n ranges: rest.ranges,\n onTogglePill: rest.onTogglePill,\n onChangeRange: rest.onChangeRange,\n }).applied,\n ).length\n }\n compact={compact}\n onOpen={(element) => {\n still.open(element);\n onOpenChange?.(true);\n }}\n testIdPrefix={rest.testIdPrefix}\n />\n <Popover\n {...still.popoverProps}\n onClose={() => {\n still.close();\n onOpenChange?.(false);\n }}\n // Below `sm`, 8px from the screen's edges instead of 16.\n marginThreshold={phone ? remPx(theme, 8) : undefined}\n slotProps={{ paper: { ref: still.paperRef, sx: phone ? PHONE_PAPER_SX : PAPER_SX } }}\n >\n <Box data-testid={`${rest.testIdPrefix}-more-panel`} sx={{ ...COLUMN_SX, flex: \"1 1 auto\", minHeight: 0 }}>\n <MoreHeading />\n {/* overflowX hidden, not auto: this panel is a fixed width and its\n contents are told to shrink into it. A horizontal scrollbar here\n means something refused to, which is a bug to fix rather than a\n scrollbar to live with. */}\n <Box sx={{ flex: \"1 1 auto\", minHeight: 0, overflowY: \"auto\", overflowX: \"hidden\", p: { xs: 1, sm: 1.5 }, minWidth: 0 }}>\n <MoreFields key={clearKey} fields={fields} {...rest} />\n </Box>\n {(anyApplied || holdsDayRange) && (\n <MoreFooter onClearAll={onClearAll} testIdPrefix={rest.testIdPrefix} reserved={!anyApplied} />\n )}\n </Box>\n </Popover>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,kCAAkC;AAMzC,OAAO,0BAA0B;AACjC,OAAO,aAAa;AACpB,SAAS,gBAA4B;AACrC,OAAO,mBAAmB;AAqEpB,SA8HF,UArHI,KATF;AA7BN,SAAS,YAAY;AAAA,EACn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ACtB,CAAC,EAAE;AAAA,QACP,EAAE;AAAA,QAEJ;AAAA,QACA,QAAQ,CAAC,YAAY;AACnB,gBAAM,KAAK,OAAO;AAClB,yBAAe,IAAI;AAAA,QACrB;AAAA,QACA,cAAc,KAAK;AAAA;AAAA,IACrB;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,MAAM;AAAA,QACV,SAAS,MAAM;AACb,gBAAM,MAAM;AACZ,yBAAe,KAAK;AAAA,QACtB;AAAA,QAEA,iBAAiB,QAAQ,MAAM,OAAO,CAAC,IAAI;AAAA,QAC3C,WAAW,EAAE,OAAO,EAAE,KAAK,MAAM,UAAU,IAAI,QAAQ,iBAAiB,SAAS,EAAE;AAAA,QAEnF,+BAACA,UAAA,EAAI,eAAa,GAAG,KAAK,YAAY,eAAe,IAAI,EAAE,GAAG,WAAW,MAAM,YAAY,WAAW,EAAE,GACtG;AAAA,8BAAC,eAAY;AAAA,UAKb,oBAACA,UAAA,EAAI,IAAI,EAAE,MAAM,YAAY,WAAW,GAAG,WAAW,QAAQ,WAAW,UAAU,GAAG,EAAE,IAAI,GAAG,IAAI,IAAI,GAAG,UAAU,EAAE,GACpH,8BAAC,cAA0B,QAAiB,GAAG,QAA9B,QAAoC,GACvD;AAAA,WACE,cAAc,kBACd,oBAAC,cAAW,YAAwB,cAAc,KAAK,cAAc,UAAU,CAAC,YAAY;AAAA,WAEhG;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["default"]}
@@ -1,60 +0,0 @@
1
- import {
2
- isRangeSet,
3
- rangeChipLabel
4
- } from "./chunk-GCZJH4XL.js";
5
- import {
6
- useDataViewsCopy
7
- } from "./chunk-KHG57NAE.js";
8
- import {
9
- sxRem
10
- } from "./chunk-YKCAJ2TN.js";
11
-
12
- // src/components/data-display/DataViews/data-views-range-summary.tsx
13
- import Box from "@mui/material/Box/index.js";
14
- import Button from "@mui/material/Button/index.js";
15
- import Typography from "@mui/material/Typography/index.js";
16
- import { jsx, jsxs } from "react/jsx-runtime";
17
- function RangeSummary({
18
- field,
19
- value,
20
- onClear,
21
- testId
22
- }) {
23
- const copy = useDataViewsCopy();
24
- const active = isRangeSet(value);
25
- if (!active && field.kind !== "day") return null;
26
- return /* @__PURE__ */ jsxs(
27
- Box,
28
- {
29
- "aria-hidden": active ? void 0 : true,
30
- sx: {
31
- display: "flex",
32
- alignItems: "center",
33
- justifyContent: "space-between",
34
- gap: 2,
35
- mt: { xs: 0.5, sm: 1.5 },
36
- visibility: active ? void 0 : "hidden"
37
- },
38
- children: [
39
- /* @__PURE__ */ jsx(Typography, { component: "span", sx: { fontSize: sxRem(12), color: "text.secondary" }, children: active ? rangeChipLabel(field, value) : field.label }),
40
- /* @__PURE__ */ jsx(
41
- Button,
42
- {
43
- variant: "text",
44
- size: "small",
45
- onClick: active ? onClear : void 0,
46
- tabIndex: active ? void 0 : -1,
47
- "data-testid": active ? `${testId}-clear` : void 0,
48
- sx: { textTransform: "none" },
49
- children: copy.filters.clear
50
- }
51
- )
52
- ]
53
- }
54
- );
55
- }
56
-
57
- export {
58
- RangeSummary
59
- };
60
- //# sourceMappingURL=chunk-J2AVWIMM.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-range-summary.tsx"],"sourcesContent":["'use client';\n\nimport Box from '@mui/material/Box/index.js';\nimport Button from '@mui/material/Button/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React from 'react';\n\nimport { useDataViewsCopy } from './data-views-copy-context';\nimport { isRangeSet, rangeChipLabel } from './data-views-range-values';\nimport type { RangeFieldConfig, RangeValue } from './data-views-types';\nimport { sxRem } from '../../../tokens/relative';\n\n/**\n * The applied window in words, and \"Limpar\".\n *\n * An inverted window is not an error the merchant must fix before the list\n * responds — it simply matches nothing, and saying so beats an empty grid with\n * no explanation (FUT-668).\n *\n * A DAY filter keeps the row's height while nothing is applied: its first tap\n * on the calendar applies a bound, and a row appearing then grew the popover\n * 26px and moved it 32px up at 320×568, the day under the finger with it\n * (FUT-4144 UI review round 2). The held row is invisible and inert.\n */\nexport function RangeSummary<T extends Record<string, unknown>>({\n field,\n value,\n onClear,\n testId,\n}: {\n field: RangeFieldConfig<T>;\n value: RangeValue;\n onClear: () => void;\n testId: string;\n}): React.JSX.Element | null {\n const copy = useDataViewsCopy();\n const active = isRangeSet(value);\n if (!active && field.kind !== 'day') return null;\n return (\n <Box\n aria-hidden={active ? undefined : true}\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 2,\n mt: { xs: 0.5, sm: 1.5 },\n visibility: active ? undefined : 'hidden',\n }}\n >\n <Typography component=\"span\" sx={{ fontSize: sxRem(12), color: 'text.secondary' }}>\n {active ? rangeChipLabel(field, value) : field.label}\n </Typography>\n <Button\n variant=\"text\"\n size=\"small\"\n onClick={active ? onClear : undefined}\n tabIndex={active ? undefined : -1}\n data-testid={active ? `${testId}-clear` : undefined}\n sx={{ textTransform: 'none' }}\n >\n {copy.filters.clear}\n </Button>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAEA,OAAO,SAAS;AAChB,OAAO,YAAY;AACnB,OAAO,gBAAgB;AAmCnB,SAWE,KAXF;AAfG,SAAS,aAAgD;AAAA,EAC9D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAK6B;AAC3B,QAAM,OAAO,iBAAiB;AAC9B,QAAM,SAAS,WAAW,KAAK;AAC/B,MAAI,CAAC,UAAU,MAAM,SAAS,MAAO,QAAO;AAC5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,SAAS,SAAY;AAAA,MAClC,IAAI;AAAA,QACF,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB,KAAK;AAAA,QACL,IAAI,EAAE,IAAI,KAAK,IAAI,IAAI;AAAA,QACvB,YAAY,SAAS,SAAY;AAAA,MACnC;AAAA,MAEA;AAAA,4BAAC,cAAW,WAAU,QAAO,IAAI,EAAE,UAAU,MAAM,EAAE,GAAG,OAAO,iBAAiB,GAC7E,mBAAS,eAAe,OAAO,KAAK,IAAI,MAAM,OACjD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,SAAQ;AAAA,YACR,MAAK;AAAA,YACL,SAAS,SAAS,UAAU;AAAA,YAC5B,UAAU,SAAS,SAAY;AAAA,YAC/B,eAAa,SAAS,GAAG,MAAM,WAAW;AAAA,YAC1C,IAAI,EAAE,eAAe,OAAO;AAAA,YAE3B,eAAK,QAAQ;AAAA;AAAA,QAChB;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-range-calendar.tsx"],"sourcesContent":["'use client';\n\n/**\n * The range calendar under a day filter's `De`/`Até` boxes (FUT-4144).\n *\n * The owner picked it ALWAYS OPEN (option B of the prototype): a period is\n * three taps — open the filter, the first day, the last day — against five for\n * a calendar button in each box and four for a link to a separate sheet. It\n * sits BELOW the boxes, with no button of its own, so the typed path is not one\n * keystroke longer than it was.\n *\n * The boxes and the calendar are two views of ONE range: a tap writes the\n * boxes, a typed day moves and repaints the calendar, an impossible typed day\n * (which writes nothing) leaves it alone, and \"Limpar\" empties both.\n *\n * It is `Calendar` in `selectionMode=\"range\"`, the same one `DateRangePicker`\n * mounts — not a second calendar. Its own rule picks the period: the first tap\n * starts it, the second closes it, and a second tap BEFORE the first swaps the\n * two, so the boxes never show a period backwards.\n */\nimport Box from '@mui/material/Box/index.js';\nimport Typography from '@mui/material/Typography/index.js';\nimport React from 'react';\n\nimport { EN_US_DATA_VIEWS_COPY } from '../../../en-US.data-display';\nimport type { Theme } from '@mui/material/styles/index.js';\nimport { rem, sxRem } from '../../../tokens/relative';\nimport { Calendar, type DateRange } from '../../form/Calendar';\nimport { toDayString, toLocalDay } from '../../form/DateRangePicker/DateRangePicker.dates';\nimport type { DataViewsDayCalendarCopy } from './data-views-copy';\nimport { useDataViewsCopy } from './data-views-copy-context';\nimport type { RangeValue } from './data-views-types';\n\nconst CALENDAR_CLASS = 'data-views-range-calendar';\n\n/**\n * `Calendar` draws its own `Paper` with 24px of padding and a shadow. Inside\n * the filter's popover that reads as a card inside a card, so the inner frame\n * is flattened through the class hook the component offers for this — the\n * same thing `DateRangePicker` does.\n */\nconst ROOT_SX = (theme: Theme) => ({\n mt: { xs: 1, sm: 1.5 },\n // Below `sm` the caption and the weekday row give up their bottom margins,\n // so the whole popover fits a 320×568 screen under its pill (FUT-4144).\n '& :has(> * > [data-testid=\"calendar-month-select\"])': { mb: { xs: 0.5, sm: 2 } },\n '& :has(> [role=\"columnheader\"])': { mb: { xs: 0, sm: 1 } },\n '& [role=\"columnheader\"]': { height: { xs: rem(theme, 24), sm: rem(theme, 32) } },\n // The days carry no column gap of their own (`Calendar`, FUT-4162), so the\n // seven columns are what a day's 40px target is carved from below `sm`; the\n // range band and its round endpoints are the Calendar's, untouched here.\n // The month/year caption on ONE row at 320: the selectors give up the slack\n // around their text before the arrows are pushed onto a second row.\n '& [data-testid=\"calendar-month-select\"], & [data-testid=\"calendar-year-select\"]': { px: 0.5, minWidth: 0 },\n [`& .${CALENDAR_CLASS}`]: {\n p: 0,\n boxShadow: 'none',\n backgroundColor: 'transparent',\n backgroundImage: 'none',\n // A tapped day already rings itself; the whole grid framed in the primary\n // colour after every tap is noise in a popover. The frame stays for the\n // keyboard reaching the grid itself.\n '&:focus-within': { outline: 'none' },\n '&:focus-visible': {\n outline: (theme: Theme) => `${rem(theme, 2)} solid`,\n outlineColor: 'primary.main',\n outlineOffset: sxRem(2),\n },\n },\n});\n\n/** The two ends of a range, as `Calendar` reads them. */\nfunction rangeOf(value: RangeValue): DateRange {\n return {\n start: toLocalDay(typeof value.min === 'string' ? value.min : null),\n end: toLocalDay(typeof value.max === 'string' ? value.max : null),\n };\n}\n\n/**\n * What a tap on the calendar makes of the range.\n *\n * `Calendar` reports the period it holds after the tap: a fresh start (`end`\n * null) or a closed one, already in order. The one case it cannot see is a\n * range with only `Até` — typed, or left by a saved view — where its first tap\n * would drop that `Até`. A first day on or before it keeps it, so \"até 15/10\"\n * plus one tap on the 3rd is 03/10–15/10, as the prototype does.\n */\nexport function rangeFromCalendar(previous: RangeValue, picked: DateRange): RangeValue {\n const min = dayOf(picked.start);\n const max = dayOf(picked.end) ?? keptEnd(previous, min);\n return { ...(min ? { min } : {}), ...(max ? { max } : {}) };\n}\n\nconst dayOf = (date: Date | null | undefined): string | undefined => (date ? toDayString(date) : undefined);\n\n/** The `Até` of a range that has ONLY one, when the new first day is on or before it. */\nfunction keptEnd(previous: RangeValue, min: string | undefined): string | undefined {\n if (previous.min != null || typeof previous.max !== 'string') return undefined;\n return min && min <= previous.max ? previous.max : undefined;\n}\n\n/**\n * The month the calendar opens on while `De` is empty. With `De` set it opens\n * on De's month, which `Calendar` does by itself.\n *\n * With two months the current month sits on the RIGHT (setembro | outubro), so\n * the days a filter usually asks about — the ones just past — are on screen;\n * with only `Até` set, its month takes that place.\n */\nfunction openingMonth(value: RangeValue, months: number): Date | undefined {\n const end = toLocalDay(typeof value.max === 'string' ? value.max : null);\n const anchor = end ?? new Date();\n return new Date(anchor.getFullYear(), anchor.getMonth() - (months > 1 ? 1 : 0), 1);\n}\n\n/** Props of {@link DayRangeCalendar}. */\nexport interface DayRangeCalendarProps {\n /** The filter's own label (\"Data\"), which names the calendar. */\n fieldLabel: string;\n value: RangeValue;\n /** Called with the range a tap leaves; never for a typed day. */\n onChange: (range: RangeValue) => void;\n /**\n * Months side by side. Two read as a period at a glance where there is room;\n * one, with the month/year selectors, where there is not.\n */\n months: 1 | 2;\n /**\n * Changes when the range moved from OUTSIDE the calendar (typed, a preset,\n * \"Limpar\"), so the calendar re-opens on it. Never for its own taps: a\n * calendar that jumped under the finger picking in it would be unusable.\n */\n viewKey: string;\n testId: string;\n}\n\nexport function DayRangeCalendar({\n fieldLabel,\n value,\n onChange,\n months,\n viewKey,\n testId,\n}: DayRangeCalendarProps): React.JSX.Element {\n const copy: DataViewsDayCalendarCopy =\n useDataViewsCopy().filters.dayCalendar ?? (EN_US_DATA_VIEWS_COPY.filters.dayCalendar as DataViewsDayCalendarCopy);\n const range = rangeOf(value);\n const pick = (picked: DateRange) => onChange(rangeFromCalendar(value, picked));\n const waitingForEnd = Boolean(range.start && !range.end);\n\n return (\n <Box sx={ROOT_SX} data-testid={`${testId}-calendar`}>\n <Calendar\n key={viewKey}\n ariaLabel={copy.label(fieldLabel)}\n className={CALENDAR_CLASS}\n selectionMode=\"range\"\n locale={copy.locale}\n labels={copy.caption}\n // Sunday first, as a pt-BR calendar reads (`D S T Q Q S S`) and as the\n // presets' \"Esta semana\" counts.\n firstDayOfWeek={0}\n numberOfMonths={months}\n // Side by side, a day of the next month in this one is the same day\n // twice; one month alone keeps them, muted, as a six-week frame.\n showOutsideDays={months === 1}\n captionLayout={months > 1 ? 'arrows' : 'selectors'}\n defaultMonth={openingMonth(value, months)}\n range={range}\n // The intermediate callback does the work: the other fires only on the\n // tap that CLOSES a period, so the first tap would write nothing.\n onIntermediateRangeChange={pick}\n />\n <Typography\n component=\"p\"\n aria-live=\"polite\"\n data-testid={`${testId}-calendar-hint`}\n sx={{ mt: { xs: 0.25, sm: 1 }, fontSize: sxRem(12), color: 'text.secondary' }}\n >\n {waitingForEnd ? copy.pickEnd : copy.pickStart}\n </Typography>\n </Box>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBA,OAAO,SAAS;AAChB,OAAO,gBAAgB;AAmInB,SACE,KADF;AAvHJ,IAAM,iBAAiB;AAQvB,IAAM,UAAU,CAAC,WAAkB;AAAA,EACjC,IAAI,EAAE,IAAI,GAAG,IAAI,IAAI;AAAA;AAAA;AAAA,EAGrB,uDAAuD,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,EAAE,EAAE;AAAA,EAChF,mCAAmC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE;AAAA,EAC1D,2BAA2B,EAAE,QAAQ,EAAE,IAAI,IAAI,OAAO,EAAE,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AAK;AAC/B,SAAO,IAAI,KAAK,OAAO,YAAY,GAAG,OAAO,SAAS,KAAK,SAAS,IAAI,IAAI,IAAI,CAAC;AACnF;AAuBO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA6C;AAC3C,QAAM,OACJ,iBAAiB,EAAE,QAAQ,eAAgB,sBAAsB,QAAQ;AAC3E,QAAM,QAAQ,QAAQ,KAAK;AAC3B,QAAM,OAAO,CAAC,WAAsB,SAAS,kBAAkB,OAAO,MAAM,CAAC;AAC7E,QAAM,gBAAgB,QAAQ,MAAM,SAAS,CAAC,MAAM,GAAG;AAEvD,SACE,qBAAC,OAAI,IAAI,SAAS,eAAa,GAAG,MAAM,aACtC;AAAA;AAAA,MAAC;AAAA;AAAA,QAEC,WAAW,KAAK,MAAM,UAAU;AAAA,QAChC,WAAW;AAAA,QACX,eAAc;AAAA,QACd,QAAQ,KAAK;AAAA,QACb,QAAQ,KAAK;AAAA,QAGb,gBAAgB;AAAA,QAChB,gBAAgB;AAAA,QAGhB,iBAAiB,WAAW;AAAA,QAC5B,eAAe,SAAS,IAAI,WAAW;AAAA,QACvC,cAAc,aAAa,OAAO,MAAM;AAAA,QACxC;AAAA,QAGA,2BAA2B;AAAA;AAAA,MAlBtB;AAAA,IAmBP;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,aAAU;AAAA,QACV,eAAa,GAAG,MAAM;AAAA,QACtB,IAAI,EAAE,IAAI,EAAE,IAAI,MAAM,IAAI,EAAE,GAAG,UAAU,MAAM,EAAE,GAAG,OAAO,iBAAiB;AAAA,QAE3E,0BAAgB,KAAK,UAAU,KAAK;AAAA;AAAA,IACvC;AAAA,KACF;AAEJ;","names":["theme"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/data-display/DataViews/data-views-more-fields.tsx"],"sourcesContent":["\"use client\";\n\n/**\n * ONE FIELD, RENDERED INSIDE THE \"MAIS\" PANEL.\n *\n * Split from `data-views-more-filters` at the file-size gate, along the seam\n * that was already there: that module is the trigger, the panel and its\n * footer — the chrome — and this is what goes in it.\n *\n * A field with one or two options renders FLAT: inside a panel there is no\n * space to win back, and two labelled checkboxes are faster than a dropdown\n * needing a second click. Past that — or whenever the field asks for a tree or\n * a search — it is the bar's own {@link PillControl}; see `sharesBarControl`.\n */\nimport Checkbox from \"@mui/material/Checkbox/index.js\";\n\nimport { Box } from \"../../../mui/Box\";\nimport { Text } from \"../../typography/Text\";\n\nimport { PillControl } from \"./data-views-category-pill\";\nimport type { OverflowField } from \"./data-views-overflow\";\nimport { RangeBounds } from \"./data-views-range-pill\";\nimport { isRangeSet } from \"./data-views-range-values\";\nimport type { QuickFilterConfig, RangeValue } from \"./data-views-types\";\nimport { QuickRow } from \"./data-views-quick-chip\";\nimport { isQuickActive } from \"./data-views-overflow-fields\";\nimport { useDataViewsCopy } from \"./data-views-copy-context\";\nimport { fieldRadiusPx } from \"../../../tokens/field-radius\";\nimport { fieldHeight } from \"../../../tokens/field-height\";\nimport { fieldEdge } from \"../../../tokens/field-edge\";\nimport { sxRem } from \"../../../tokens/relative\";\n\n/** What each field's control needs, minus the panel's own chrome. */\nexport interface MoreFieldProps {\n pills: Record<string, string[]>;\n ranges: Record<string, RangeValue>;\n onTogglePill: (fieldId: string, value: string, checked: boolean) => void;\n onChangeRange: (fieldId: string, range: RangeValue) => void;\n /** Presses or releases a quick chip shed into the panel. */\n onToggleQuick?: (quick: QuickFilterConfig) => void;\n testIdPrefix: string;\n}\n\n/**\n * Above this many options a field is a DROPDOWN rather than a flat row of\n * checkboxes. Two options cost two lines and read faster laid out; a \"Cliente\"\n * with a dozen turns the panel into a scrolling wall and buries every field\n * under it, which is exactly what the overflow was meant to avoid.\n */\nconst INLINE_OPTION_LIMIT = 2;\n\n/**\n * Whether an overflowed pill keeps the SAME control it has on the bar.\n *\n * The panel used to build its own flat dropdown for every field past two\n * options, so a field's config only held while it fitted: `control:\n * \"category\"` lost its tree (subcategories flattened into one list, no\n * \"Marcar tudo\", no count footer) and `searchEnabled` lost its search, on\n * exactly the phone widths where most filters live in here. Anything the bar\n * would render as a dropdown now renders as the bar's own {@link PillControl};\n * only a plain two-option field — one that did not ask for a dropdown, a tree\n * or a search — stays a flat checkbox row, which is a panel layout rather than\n * a different control (the filter panel draws the same line).\n */\nfunction sharesBarControl<T extends Record<string, unknown>>(field: OverflowField<T>): boolean {\n const pill = field.pill;\n if (!pill) return false;\n return (\n pill.control === \"category\" ||\n pill.control === \"multiselect\" ||\n pill.searchEnabled === true ||\n pill.options.length > INLINE_OPTION_LIMIT\n );\n}\n\n/** One overflowed pill: the bar's control, or its options as checkboxes. */\nfunction OverflowPill<T extends Record<string, unknown>>({\n field,\n values,\n onTogglePill,\n onClear,\n testIdPrefix,\n}: {\n field: OverflowField<T>;\n values: string[];\n onTogglePill: (fieldId: string, value: string, checked: boolean) => void;\n onClear: () => void;\n testIdPrefix: string;\n}): React.JSX.Element {\n const testId = `${testIdPrefix}-more-${field.id}`;\n if (field.pill && sharesBarControl(field)) {\n return (\n <PillControl\n fieldId={field.id}\n pill={field.pill}\n selected={values}\n onTogglePill={onTogglePill}\n onClearField={onClear}\n testIdPrefix={testIdPrefix}\n testId={testId}\n />\n );\n }\n const onToggle = (value: string, checked: boolean) => onTogglePill(field.id, value, checked);\n return (\n <Box sx={{ display: \"flex\", flexWrap: \"wrap\", gap: 0.75 }}>\n {(field.pill?.options ?? []).map((option) => {\n const checked = values.includes(option.value);\n return (\n <Box\n key={option.value}\n component=\"label\"\n data-testid={`${testId}-${option.value}`}\n sx={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 0.25,\n pr: 1,\n border: 1,\n borderStyle: \"solid\",\n minHeight: fieldHeight,\n borderColor: (theme) => (checked ? theme.palette.primary.main : fieldEdge(theme)),\n bgcolor: checked ? \"action.selected\" : \"transparent\",\n borderRadius: fieldRadiusPx,\n cursor: \"pointer\",\n fontSize: sxRem(13),\n color: checked ? \"primary.main\" : \"text.secondary\",\n }}\n >\n <Checkbox\n size=\"small\"\n checked={checked}\n onChange={(event) => onToggle(option.value, event.target.checked)}\n inputProps={{ \"aria-label\": `${field.label}: ${option.label}` }}\n />\n {option.label}\n </Box>\n );\n })}\n </Box>\n );\n}\n\n\n/**\n * One overflowed range: its presets and its two bounds, as the same controls\n * the pill uses.\n *\n * The whole control DELEGATES to {@link RangeBounds} rather than being built\n * here, which is the point — this panel used to render a raw\n * `<input type=\"date\">`, so the masked `dd/mm/aaaa` field existed only while\n * the filter FITTED on the bar. The moment \"Data\" overflowed it reverted to the\n * native control the mask replaced, and a merchant on a narrow screen never saw\n * the fix at all (FUT-744). `Valor` had the twin bug: a bare `type=\"number\"`\n * plus `Number(raw)` dropped the decimal comma this panel is meant to accept.\n *\n * That also retires the intrinsic-width workaround this pair used to need — a\n * native date input reports a wide minimum (its own mask plus the picker\n * glyph), which is what made two of them refuse to shrink and scrolled the\n * panel sideways. A text input has no such minimum.\n *\n * `RangeBounds` renders the preset chips ITSELF, above the inputs. This panel\n * must NOT render its own row as well: when the delegation above landed, the\n * chips it used to draw by hand stayed behind, and \"Data\" showed Hoje/Ontem/\n * Esta semana/Este mês/Este ano twice — two rows, duplicated test ids, and half\n * the panel's height spent saying the same thing (FUT-751).\n */\nfunction OverflowRange<T extends Record<string, unknown>>({\n field,\n value,\n onChange,\n testIdPrefix,\n}: {\n field: OverflowField<T>;\n value: RangeValue;\n onChange: (range: RangeValue) => void;\n testIdPrefix: string;\n}): React.JSX.Element | null {\n // `group === \"range\"` is what selects this component, so `range` is always\n // set; the guard is for the type, not for a state the caller can reach.\n if (!field.range) return null;\n return (\n <RangeBounds\n field={field.range}\n value={value}\n onChange={onChange}\n testId={`${testIdPrefix}-more-${field.id}`}\n fillRow\n />\n );\n}\n\n/**\n * Whether a field has anything applied, and how to unapply it — the two shapes\n * (a pill's selected values, a range's bounds) answered in one place so the\n * group that renders them stays a renderer.\n */\nexport function fieldClearing<T extends Record<string, unknown>>({\n field,\n pills,\n ranges,\n onTogglePill,\n onChangeRange,\n}: {\n field: OverflowField<T>;\n} & Pick<MoreFieldProps, \"pills\" | \"ranges\" | \"onTogglePill\" | \"onChangeRange\">): {\n applied: boolean;\n clear: () => void;\n} {\n if (field.group === \"quick\" && field.quick) {\n const quick = field.quick;\n // A `default` chip lit by an empty field has nothing to clear.\n const applied = isQuickActive(quick, pills) && (pills[quick.fieldId]?.length ?? 0) > 0;\n return { applied, clear: () => onTogglePill(quick.fieldId, quick.value, false) };\n }\n if (field.group === \"range\") {\n return {\n applied: isRangeSet(ranges[field.id] ?? {}),\n clear: () => onChangeRange(field.id, {}),\n };\n }\n const values = pills[field.id] ?? [];\n return {\n applied: values.length > 0,\n clear: () => values.forEach((value) => onTogglePill(field.id, value, false)),\n };\n}\n\n\n/**\n * A quick chip shed into the panel: its own line, because label and count are\n * already the whole control — no heading above it, no \"Limpar\" beside it.\n */\nexport function MoreQuick({\n quick,\n pills,\n onToggleQuick,\n testIdPrefix,\n}: {\n quick: QuickFilterConfig;\n} & Pick<MoreFieldProps, \"pills\" | \"onToggleQuick\" | \"testIdPrefix\">): React.JSX.Element {\n return (\n <Box sx={{ mb: 1, \"&:last-of-type\": { mb: 0 } }}>\n <QuickRow\n quick={quick}\n active={isQuickActive(quick, pills)}\n onToggle={() => onToggleQuick?.(quick)}\n testIdPrefix={testIdPrefix}\n />\n </Box>\n );\n}\n\n/** One labelled group in the panel: the field's name, then its control. */\nexport function MoreGroup<T extends Record<string, unknown>>({\n field,\n pills,\n ranges,\n onTogglePill,\n onChangeRange,\n testIdPrefix,\n}: {\n field: OverflowField<T>;\n} & MoreFieldProps): React.JSX.Element {\n const copy = useDataViewsCopy();\n const { applied, clear } = fieldClearing({ field, pills, ranges, onTogglePill, onChangeRange });\n return (\n <Box sx={{ mb: 1.5, \"&:last-of-type\": { mb: 0 } }}>\n <Box sx={{ display: \"flex\", alignItems: \"center\", gap: 1, mb: 0.5 }}>\n <Text variant=\"caption\" as=\"span\">\n <Box component=\"span\" sx={{ color: \"text.secondary\" }}>\n {field.label}\n {field.group === \"range\" && isRangeSet(ranges[field.id] ?? {}) ? \" •\" : \"\"}\n </Box>\n </Text>\n {/* The panel's equivalent of the pill's ✕. Without it a field applied\n in here could only be cleared by finding it again on the bar —\n which is where it goes the moment it becomes active, so the\n operator has to close this panel to undo what they just did. */}\n {applied && (\n <Box\n component=\"button\"\n type=\"button\"\n onClick={clear}\n data-testid={`${testIdPrefix}-more-${field.id}-clear`}\n sx={{\n ml: \"auto\",\n border: 0,\n p: 0,\n bgcolor: \"transparent\",\n cursor: \"pointer\",\n font: \"inherit\",\n fontSize: sxRem(12),\n color: \"primary.main\",\n \"&:hover\": { textDecoration: \"underline\" },\n }}\n >\n {copy.filters.clear}\n </Box>\n )}\n </Box>\n {field.group === \"pill\" ? (\n <OverflowPill\n field={field}\n values={pills[field.id] ?? []}\n onTogglePill={onTogglePill}\n onClear={() => (pills[field.id] ?? []).forEach((v) => onTogglePill(field.id, v, false))}\n testIdPrefix={testIdPrefix}\n />\n ) : (\n <OverflowRange\n field={field}\n value={ranges[field.id] ?? {}}\n onChange={(range) => onChangeRange(field.id, range)}\n testIdPrefix={testIdPrefix}\n />\n )}\n </Box>\n );\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,OAAO,cAAc;AA8Ef,cAiBI,YAjBJ;AA3CN,IAAM,sBAAsB;AAe5B,SAAS,iBAAoD,OAAkC;AAC7F,QAAM,OAAO,MAAM;AACnB,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,KAAK,YAAY,cACjB,KAAK,YAAY,iBACjB,KAAK,kBAAkB,QACvB,KAAK,QAAQ,SAAS;AAE1B;AAGA,SAAS,aAAgD;AAAA,EACvD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAMsB;AACpB,QAAM,SAAS,GAAG,YAAY,SAAS,MAAM,EAAE;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