{
  "component": {
    "id": "date-range-picker",
    "name": "Date range picker",
    "tier": "pro",
    "exampleId": "date-range-picker",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/date-range-demo.tsx",
    "exportName": "DateRangeDemo",
    "sha256": "e90e77ff8fb9e063eeb7cf3aff17314b8684b19e028566e4388f5ba852dd3fca",
    "helperImports": [],
    "directComponentImports": [
      "date-picker",
      "date-range-picker",
      "tidal-button"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add @tidal-pro/date-range-picker",
    "registryUrl": "https://tidalui.com/r/pro/date-range-picker.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/date-range-picker",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/date-range-picker",
      "registryUrl": "https://tidalui.com/r/pro/date-range-picker.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/date-range-picker.tsx",
    "exports": [
      "TidalButton",
      "TidalDateDigits",
      "TidalDateRange",
      "TidalDateRangePicker",
      "tidalFormatDate",
      "tidalParseDate",
      "tidalRangeDays",
      "tidalRangeIssue"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/date-range-picker.css",
      "components/ui/date-picker.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "@radix-ui/react-popover@1.2.0",
      "lucide-react"
    ],
    "registry": [
      "@tidal-pro/date-picker"
    ],
    "additionalRegistry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "date-picker",
      "date-range-picker",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/date-range-picker.css",
      "components/ui/date-picker.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/date-range-picker.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/date-range-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useEffect, useLayoutEffect, useRef, useState } from \"react\";\n\nimport { ArrowUpRight, Check, RotateCcw } from \"lucide-react\";\n\nimport { TidalDateRangePicker, tidalRangeDays, tidalRangeIssue, type TidalDateRange } from \"./components/ui/date-range-picker\";\n\nimport { TidalDateDigits, tidalFormatDate, tidalParseDate } from \"./components/ui/date-picker\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\nimport \"./components/ui/date-picker.css\";\n\nimport \"./components/ui/date-range-picker.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .date-range-specimen {\\n  width: 100%;\\n  max-width: 760px;\\n  padding: 28px;\\n  border: 1px solid var(--t-border);\\n  border-radius: var(--t-radius-card);\\n  background: var(--t-surface);\\n  box-shadow:\\n    0 2px 3px #00000004,\\n    0 18px 35px -30px #00000040;\\n}\\n.tidal-scope .date-range-specimen > h3 {\\n  font-size: 29px;\\n  font-weight: 500;\\n  line-height: 1.15;\\n  letter-spacing: -1.1px;\\n  margin: 15px 0 26px;\\n}\\n.tidal-scope .date-range-specimen > h3 em {\\n  font:\\n    italic 37px/1.15 \\\"Instrument Serif\\\",\\n    Georgia,\\n    serif;\\n  letter-spacing: -0.8px;\\n}\\n\\n.tidal-scope .range-demo-short-duration {\\n  display: none;\\n}\\n.tidal-scope .range-demo-stage {\\n  padding: 7px;\\n  margin: 0 -7px;\\n  overflow: hidden;\\n  transition: height 420ms var(--t-ease-out);\\n}\\n.tidal-scope .range-demo-content {\\n  display: flow-root;\\n}\\n.tidal-scope .range-demo-layout {\\n  display: grid;\\n  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);\\n  gap: 28px;\\n  align-items: center;\\n}\\n.tidal-scope .range-demo-layout form {\\n  min-width: 0;\\n}\\n.tidal-scope .range-demo-form-caption {\\n  display: block;\\n  font-size: 11px;\\n  letter-spacing: 1.3px;\\n  color: var(--t-muted);\\n  margin-bottom: 24px;\\n}\\n.tidal-scope .range-demo-ticket {\\n  position: relative;\\n  min-width: 0;\\n  border: 1px solid var(--t-ink);\\n  border-radius: 12px;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  padding: 20px;\\n  box-shadow:\\n    0 14px 20px -15px #00000050,\\n    inset 0 1px 0 #ffffff12;\\n  overflow: hidden;\\n  animation: range-ticket-enter 620ms var(--t-ease-out) both;\\n}\\n.tidal-scope .range-demo-ticket-heading {\\n  display: flex;\\n  justify-content: space-between;\\n  gap: 8px;\\n  font-size: 11px;\\n  letter-spacing: 1.3px;\\n  opacity: 0.65;\\n  margin-bottom: 27px;\\n}\\n.tidal-scope .range-demo-endpoints {\\n  display: grid;\\n  grid-template-columns: repeat(2, minmax(0, 1fr));\\n  gap: 14px;\\n}\\n.tidal-scope .range-demo-endpoints > div {\\n  min-width: 0;\\n}\\n.tidal-scope .range-demo-endpoints > div > span:first-child {\\n  display: block;\\n  font-size: 11px;\\n  letter-spacing: 1px;\\n  opacity: 0.5;\\n  margin-bottom: 14px;\\n}\\n.tidal-scope .range-demo-month {\\n  display: block;\\n  font-size: 11px;\\n  letter-spacing: 1px;\\n  text-transform: uppercase;\\n  animation: range-month-enter 280ms var(--t-ease-out) both;\\n}\\n.tidal-scope .range-demo-endpoint-day {\\n  font-size: 40px;\\n  line-height: 1.1;\\n  font-weight: 500;\\n  letter-spacing: -2px;\\n  margin: 3px 0 7px;\\n}\\n.tidal-scope .range-demo-endpoints time {\\n  display: block;\\n  font-size: 11px;\\n  line-height: 1.55;\\n  opacity: 0.7;\\n  overflow-wrap: anywhere;\\n}\\n.tidal-scope .range-demo-unset {\\n  display: block;\\n  font-size: 26px;\\n  line-height: 2.2;\\n  opacity: 0.6;\\n}\\n.tidal-scope .range-demo-seam {\\n  position: relative;\\n  display: flex;\\n  justify-content: center;\\n  align-items: center;\\n  gap: 10px;\\n  font-size: 11px;\\n  letter-spacing: 1.4px;\\n  margin: 25px -21px 22px;\\n  color: inherit;\\n}\\n.tidal-scope .range-demo-seam > span,\\n.tidal-scope .range-demo-seam > i {\\n  opacity: 0.5;\\n}\\n.tidal-scope .range-demo-seam:before,\\n.tidal-scope .range-demo-seam:after {\\n  content: \\\"\\\";\\n  position: absolute;\\n  width: 13px;\\n  height: 13px;\\n  border-radius: 50%;\\n  background: var(--t-surface);\\n  top: calc(50% - 6.5px);\\n}\\n.tidal-scope .range-demo-seam:before {\\n  left: -6.5px;\\n}\\n.tidal-scope .range-demo-seam:after {\\n  right: -6.5px;\\n}\\n.tidal-scope .range-demo-seam i {\\n  flex: 1;\\n  border-top: 1px dashed #80808080;\\n}\\n.tidal-scope .range-demo-duration {\\n  display: flex;\\n  gap: 17px;\\n  align-items: center;\\n  min-width: 0;\\n}\\n.tidal-scope .range-demo-duration > span:first-child {\\n  font-size: 66px;\\n  line-height: 1.1;\\n  letter-spacing: -4px;\\n  font-weight: 500;\\n  flex-shrink: 0;\\n}\\n.tidal-scope .range-demo-duration > span:last-child {\\n  font-size: 11px;\\n  line-height: 1.65;\\n  opacity: 0.7;\\n  max-width: 110px;\\n}\\n.tidal-scope .range-demo-axis {\\n  display: grid;\\n  grid-template-columns: 1fr 1fr;\\n  position: relative;\\n  margin-top: 20px;\\n  color: inherit;\\n  font-size: 11px;\\n  letter-spacing: 0.8px;\\n  opacity: 0.8;\\n}\\n.tidal-scope .range-demo-axis > div {\\n  position: relative;\\n  grid-column: 1/-1;\\n  height: 7px;\\n  background: #80808055;\\n  border-radius: 4px;\\n  margin: 0 3px 10px;\\n}\\n.tidal-scope .range-demo-axis > div > span {\\n  position: absolute;\\n  height: 7px;\\n  top: 0;\\n  background: var(--t-surface);\\n  transition:\\n    left 420ms var(--t-ease-out),\\n    width 420ms var(--t-ease-out);\\n}\\n.tidal-scope .range-demo-axis > div > i {\\n  position: absolute;\\n  top: -3px;\\n  width: 3px;\\n  height: 13px;\\n  border-radius: 2px;\\n  background: var(--t-surface);\\n  transform: translateX(-50%);\\n  transition: left 420ms var(--t-ease-out);\\n}\\n.tidal-scope .range-demo-axis > span:last-child {\\n  text-align: right;\\n}\\n.tidal-scope .range-demo-ticket > p {\\n  color: inherit;\\n  font-size: 11px;\\n  line-height: 1.6;\\n  margin: 14px 0 0;\\n  opacity: 0.5;\\n}\\n.tidal-scope .range-demo-actions {\\n  display: flex;\\n  gap: 8px;\\n  margin-top: 22px;\\n}\\n.tidal-scope .range-demo-actions .tidal-button {\\n  flex: 1;\\n  min-width: 0;\\n  padding: 0 9px;\\n  font-size: 11px;\\n  outline-offset: -5px;\\n}\\n.tidal-scope .range-demo-actions .tidal-button:focus-visible {\\n  outline-color: currentColor;\\n}\\n.tidal-scope .range-demo-status {\\n  display: block;\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.5;\\n  margin-top: 10px;\\n}\\n.tidal-scope .range-demo-note {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  line-height: 1.65;\\n  margin: 22px 0 0;\\n}\\n.tidal-scope .range-demo-complete {\\n  text-align: center;\\n  padding: 16px 5px 22px;\\n  animation: range-ticket-enter 420ms var(--t-ease-out) both;\\n}\\n.tidal-scope .range-demo-complete > span {\\n  display: flex;\\n  align-items: center;\\n  justify-content: center;\\n  width: 44px;\\n  height: 44px;\\n  border-radius: 50%;\\n  background: var(--t-ink);\\n  color: var(--t-surface);\\n  margin: 0 auto 15px;\\n}\\n.tidal-scope .range-demo-complete h4 {\\n  font-size: 22px;\\n  font-weight: 500;\\n  letter-spacing: -0.7px;\\n  outline-offset: -5px;\\n}\\n.tidal-scope .range-demo-complete p {\\n  font-size: 11px;\\n  color: var(--t-muted);\\n  margin-top: 9px;\\n}\\n.tidal-scope .date-range-specimen[data-phase=\\\"set\\\"] .range-demo-layout {\\n  grid-template-columns: 1fr;\\n}\\n.tidal-scope .date-range-specimen[data-phase=\\\"set\\\"] .range-demo-ticket {\\n  max-width: 300px;\\n  width: 100%;\\n  margin-inline: auto;\\n}\\n.tidal-scope .range-demo-saved-actions {\\n  justify-content: center;\\n}\\n.tidal-scope .range-demo-saved-actions .tidal-button {\\n  flex: 0 1 auto;\\n  padding: 0 16px;\\n}\\n.tidal-scope .range-demo-saved-actions .tidal-button:last-child {\\n  width: 44px;\\n  padding: 0;\\n}\\n@keyframes range-ticket-enter {\\n  from {\\n    opacity: 0;\\n    transform: translateY(8px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: translateY(0);\\n  }\\n}\\n@keyframes range-month-enter {\\n  from {\\n    opacity: 0;\\n    transform: translateY(3px);\\n  }\\n  to {\\n    opacity: 1;\\n    transform: translateY(0);\\n  }\\n}\\n@media (max-width: 600px) {\\n  .tidal-scope .date-range-specimen {\\n    padding: 16px;\\n  }\\n  .tidal-scope .date-range-specimen > h3 {\\n    font-size: 25px;\\n    margin: 12px 0 16px;\\n  }\\n  .tidal-scope .date-range-specimen > h3 em {\\n    font-size: 32px;\\n  }\\n  .tidal-scope .range-demo-layout {\\n    grid-template-columns: 1fr;\\n    gap: 16px;\\n  }\\n  .tidal-scope .range-demo-form-caption {\\n    display: none;\\n  }\\n  .tidal-scope .range-demo-ticket {\\n    padding: 16px;\\n  }\\n  .tidal-scope .range-demo-ticket-heading {\\n    margin-bottom: 18px;\\n  }\\n  .tidal-scope .range-demo-endpoints > div > span:first-child {\\n    margin-bottom: 10px;\\n  }\\n  .tidal-scope .range-demo-seam {\\n    margin: 18px -17px 14px;\\n  }\\n  .tidal-scope .range-demo-duration > span:first-child {\\n    font-size: 56px;\\n  }\\n  .tidal-scope .range-demo-axis {\\n    margin-top: 14px;\\n  }\\n  .tidal-scope .range-demo-ticket > p {\\n    margin-top: 10px;\\n  }\\n  .tidal-scope .range-demo-actions {\\n    margin-top: 14px;\\n  }\\n  .tidal-scope .range-demo-note {\\n    font-size: 11px;\\n    margin-top: 14px;\\n  }\\n}\\n@media (max-width: 600px) {\\n  .tidal-scope .range-demo-ticket {\\n    padding: 14px;\\n  }\\n  .tidal-scope .range-demo-ticket-heading {\\n    margin-bottom: 10px;\\n  }\\n  .tidal-scope .range-demo-endpoints > div > span:first-child {\\n    margin-bottom: 6px;\\n  }\\n  .tidal-scope .range-demo-endpoint-day {\\n    font-size: 32px;\\n    margin: 3px 0 5px;\\n  }\\n  .tidal-scope .range-demo-seam {\\n    margin: 12px -15px 10px;\\n  }\\n  .tidal-scope .range-demo-duration > span:first-child {\\n    font-size: 48px;\\n  }\\n  .tidal-scope .range-demo-axis {\\n    margin-top: 12px;\\n  }\\n  .tidal-scope .range-demo-ticket > p {\\n    display: none;\\n  }\\n  .tidal-scope .date-range-specimen .tidal-range-fieldset > legend {\\n    margin-bottom: 10px;\\n  }\\n  .tidal-scope .date-range-specimen .tidal-range-native > label {\\n    margin-bottom: 5px;\\n  }\\n  .tidal-scope .date-range-specimen .tidal-range-date-control {\\n    padding: 3px;\\n  }\\n  .tidal-scope .date-range-specimen .tidal-range-toolbar {\\n    margin-top: 6px;\\n  }\\n  .tidal-scope .range-demo-actions {\\n    margin-top: 12px;\\n  }\\n}\\n@media (prefers-reduced-motion: reduce) {\\n  .tidal-scope .date-range-specimen * {\\n    animation: none !important;\\n    transition: none !important;\\n  }\\n  .tidal-scope .range-demo-ticket,\\n  .tidal-scope .range-demo-complete,\\n  .tidal-scope .range-demo-month {\\n    transform: none;\\n  }\\n}\";\n\nconst original: TidalDateRange = { start: \"2026-10-26\", end: \"2026-11-06\" };\n\nconst today = \"2026-10-14\",\n  last = \"2026-12-31\",\n  held = \"2026-11-26\";\n\nconst rules = {\n  min: today,\n  max: last,\n  minDays: 2,\n  maxDays: 45,\n  isDateDisabled: (iso: string) => iso === held,\n  isRangeDisabled: (range: { start: string; end: string }) =>\n    range.start <= held && range.end >= held,\n};\n\nconst presets = [\n  { label: \"7 days\", value: { start: \"2026-10-26\", end: \"2026-11-01\" } },\n  { label: \"14 days\", value: { start: \"2026-10-26\", end: \"2026-11-08\" } },\n  { label: \"Next sprint\", value: { start: \"2026-11-02\", end: \"2026-11-13\" } },\n];\n\nexport function DateRangeDemo() {\n  const [range, setRange] = useState<TidalDateRange>({ ...original }),\n    [error, setError] = useState(\"\"),\n    [phase, setPhase] = useState<\"editing\" | \"setting\" | \"set\">(\"editing\"),\n    [height, setHeight] = useState<number>();\n  const start = useRef<HTMLInputElement>(null),\n    end = useRef<HTMLInputElement>(null),\n    title = useRef<HTMLHeadingElement>(null),\n    content = useRef<HTMLDivElement>(null),\n    restore = useRef(false),\n    timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n  const focusOwner = useRef<HTMLElement | null>(null);\n  const days = tidalRangeDays(range),\n    complete = days !== null,\n    valid = tidalRangeIssue(range, rules) === null;\n  const firstDate = tidalParseDate(range.start),\n    endDate = tidalParseDate(range.end),\n    span = tidalParseDate(last)!.getTime() - tidalParseDate(today)!.getTime();\n  const left = firstDate\n      ? Math.max(\n          0,\n          Math.min(\n            1,\n            (firstDate.getTime() - tidalParseDate(today)!.getTime()) / span,\n          ),\n        )\n      : 0,\n    right = endDate\n      ? Math.max(\n          left,\n          Math.min(\n            1,\n            (endDate.getTime() - tidalParseDate(today)!.getTime()) / span,\n          ),\n        )\n      : left;\n  useEffect(() => () => clearTimeout(timer.current), []);\n  useLayoutEffect(() => {\n    const active = document.activeElement;\n    const canMoveFocus =\n      active === document.body || active === focusOwner.current;\n    if (phase === \"set\" && canMoveFocus) {\n      title.current?.focus({ preventScroll: true });\n      focusOwner.current = null;\n    } else if (phase === \"editing\" && restore.current) {\n      restore.current = false;\n      if (canMoveFocus) start.current?.focus({ preventScroll: true });\n      focusOwner.current = null;\n    }\n  }, [phase]);\n  useLayoutEffect(() => {\n    const node = content.current;\n    if (!node) return;\n    const measure = () => {\n      const css = getComputedStyle(node.parentElement!);\n      setHeight(\n        node.offsetHeight +\n          Number.parseFloat(css.paddingTop) +\n          Number.parseFloat(css.paddingBottom),\n      );\n    };\n    measure();\n    const ro = new ResizeObserver(measure);\n    ro.observe(node);\n    return () => ro.disconnect();\n  }, []);\n  function edit() {\n    clearTimeout(timer.current);\n    focusOwner.current =\n      document.activeElement instanceof HTMLElement\n        ? document.activeElement\n        : null;\n    setError(\"\");\n    restore.current = true;\n    setPhase(\"editing\");\n    if (phase === \"editing\") {\n      restore.current = false;\n      start.current?.focus({ preventScroll: true });\n    }\n  }\n  function reset() {\n    setRange({ ...original });\n    edit();\n  }\n  return (\n    <div className=\"date-range-specimen\" data-phase={phase}>\n      <div className=\"range-demo-stage\" style={{ height }}>\n        <div ref={content} className=\"range-demo-content\">\n          {phase === \"set\" ? (\n            <div className=\"range-demo-complete\">\n              <span aria-hidden=\"true\">\n                <Check size={20} />\n              </span>\n              <h4 ref={title} tabIndex={-1}>\n                A window of possibility.\n              </h4>\n              <p>Kept in this sample. No dates were booked or scheduled.</p>\n            </div>\n          ) : null}\n          <div className=\"range-demo-layout\">\n            {phase !== \"set\" ? (\n              <form\n                noValidate\n                onSubmit={(e) => {\n                  e.preventDefault();\n                  if (!valid) {\n                    setError(\n                      \"Choose a complete 2–45 day window that does not cross November 26.\",\n                    );\n                    (!range.start ? start.current : end.current)?.focus({\n                      preventScroll: true,\n                    });\n                    return;\n                  }\n                  focusOwner.current =\n                    (e.nativeEvent as SubmitEvent).submitter instanceof\n                    HTMLElement\n                      ? (e.nativeEvent as SubmitEvent).submitter\n                      : document.activeElement instanceof HTMLElement\n                        ? document.activeElement\n                        : null;\n                  setPhase(\"setting\");\n                  timer.current = setTimeout(() => setPhase(\"set\"), 550);\n                }}\n              >\n                <span className=\"range-demo-form-caption\">\n                  THE NEXT LITTLE CHAPTER\n                </span>\n                <TidalDateRangePicker\n                  label=\"Sample planning window\"\n                  value={range}\n                  onValueChange={(next) => {\n                    setRange(next);\n                    setError(\"\");\n                  }}\n                  startRef={start}\n                  endRef={end}\n                  name=\"planning-window\"\n                  required\n                  disabled={phase === \"setting\"}\n                  today={today}\n                  {...rules}\n                  presets={presets}\n                  description=\"Sample windows: 2–45 days. November 26 is held.\"\n                  error={error}\n                />\n                <div className=\"range-demo-actions\">\n                  <TidalButton\n                    type=\"button\"\n                    variant=\"secondary\"\n                    onClick={phase === \"setting\" ? edit : reset}\n                  >\n                    {phase === \"setting\" ? \"Cancel sample\" : \"Reset sample\"}\n                  </TidalButton>\n                  <TidalButton type=\"submit\" loading={phase === \"setting\"}>\n                    {phase === \"setting\"\n                      ? \"Keeping window\"\n                      : \"Keep sample window\"}\n                    {phase === \"editing\" ? <ArrowUpRight size={13} /> : null}\n                  </TidalButton>\n                </div>\n                {phase === \"setting\" ? (\n                  <span className=\"range-demo-status\" role=\"status\">\n                    Keeping this local sample…\n                  </span>\n                ) : null}\n              </form>\n            ) : null}\n            <section\n              className=\"range-demo-ticket\"\n              aria-label=\"Sample planning window readout\"\n              data-empty={!complete || undefined}\n            >\n              <div className=\"range-demo-ticket-heading\">\n                <span>THE MAKING WINDOW</span>\n                <span>R / 030</span>\n              </div>\n              <div className=\"range-demo-endpoints\">\n                {([\"start\", \"end\"] as const).map((which, i) => {\n                  const date = which === \"start\" ? firstDate : endDate;\n                  return (\n                    <div key={which}>\n                      <span>{i === 0 ? \"A BEGINNING\" : \"AN ENDING\"}</span>\n                      {date ? (\n                        <>\n                          <span\n                            className=\"range-demo-month\"\n                            key={range[which]!.slice(0, 7)}\n                            aria-hidden=\"true\"\n                          >\n                            {tidalFormatDate(range[which]!, \"en-US\", {\n                              month: \"short\",\n                            })}\n                          </span>\n                          <div\n                            className=\"range-demo-endpoint-day\"\n                            aria-hidden=\"true\"\n                          >\n                            <TidalDateDigits\n                              text={String(date.getUTCDate()).padStart(2, \"0\")}\n                            />\n                          </div>\n                          <time dateTime={range[which]!}>\n                            {tidalFormatDate(range[which]!, \"en-US\", {\n                              weekday: \"short\",\n                              month: \"short\",\n                              day: \"numeric\",\n                              year: \"numeric\",\n                            })}\n                          </time>\n                        </>\n                      ) : (\n                        <span className=\"range-demo-unset\">Open</span>\n                      )}\n                    </div>\n                  );\n                })}\n              </div>\n              <div className=\"range-demo-seam\" aria-hidden=\"true\">\n                <i />\n                <span>THE SPACE BETWEEN</span>\n                <i />\n              </div>\n              <div className=\"range-demo-duration\">\n                <span aria-hidden=\"true\">\n                  {complete ? (\n                    <TidalDateDigits text={String(days).padStart(2, \"0\")} />\n                  ) : (\n                    <span>—</span>\n                  )}\n                </span>\n                <span>\n                  <span className=\"range-demo-full-duration\">\n                    {complete\n                      ? `${days} calendar ${days === 1 ? \"day\" : \"days\"}, inclusive.`\n                      : \"Choose both dates to see the window.\"}\n                  </span>\n                  <span\n                    className=\"range-demo-short-duration\"\n                    aria-hidden=\"true\"\n                  >\n                    {complete ? \"days\" : \"open\"}\n                  </span>\n                </span>\n              </div>\n              <div className=\"range-demo-axis\" aria-hidden=\"true\">\n                <div>\n                  <span\n                    style={{\n                      left: `${left * 100}%`,\n                      width: `${(right - left) * 100}%`,\n                    }}\n                  />\n                  <i style={{ left: `${left * 100}%` }} />\n                  <i style={{ left: `${right * 100}%` }} />\n                </div>\n                <span>OCT 14</span>\n                <span>DEC 31</span>\n              </div>\n              <p>\n                {complete\n                  ? \"Date range selected.\"\n                  : \"Select a start and end date.\"}\n              </p>\n            </section>\n          </div>\n          {phase === \"set\" ? (\n            <div className=\"range-demo-actions range-demo-saved-actions\">\n              <TidalButton variant=\"secondary\" onClick={edit}>\n                Adjust sample\n              </TidalButton>\n              <TidalButton\n                variant=\"secondary\"\n                aria-label=\"Reset original window\"\n                onClick={reset}\n              >\n                <RotateCcw size={15} />\n              </TidalButton>\n            </div>\n          ) : null}\n        </div>\n      </div>\n      <p className=\"range-demo-note\">\n        Fictional availability. Nothing is booked, sent or stored.\n      </p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <DateRangeDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/date-range-picker.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "{ ...original }",
      "setter": "setRange",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onClick",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onValueChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [
      "planning-window"
    ],
    "expectedFormData": {
      "planning-window": "fixture value"
    },
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "server-gated"
  },
  "exceptions": []
}
