// @subframe/sync-disable // @ts-nocheck "use client"; /* * Documentation: * Date Picker — https://app.subframe.com/f023064a5ca0/library?component=Date+Picker_e0461776-caeb-4bb3-a9a1-7df3bcfe9afe * Dropdown Menu select — https://app.subframe.com/f023064a5ca0/library?component=Dropdown+Menu+select_99951515-459b-4286-919e-a89e7549b43b * Icon Button — https://app.subframe.com/f023064a5ca0/library?component=Icon+Button_af9405b1-8c54-4e01-9786-5aad308224f6 */ import React from "react"; import { FeatherCalendar } from "@subframe/core"; import { FeatherChevronDown } from "@subframe/core"; import { FeatherChevronLeft } from "@subframe/core"; import { FeatherChevronRight } from "@subframe/core"; import * as SubframeCore from "@subframe/core"; import * as SubframeUtils from "../../utils"; import { DropdownMenuSelect } from "../DropdownMenuSelect"; import { IconButton } from "../IconButton"; export interface WeekdayProps extends React.HTMLAttributes { children?: React.ReactNode; className?: string; } const Weekday = React.forwardRef(function Weekday( { children, className, ...otherProps }: WeekdayProps, ref ) { return (
{children ? ( {children} ) : null}
); }); export interface SelectProps extends React.HTMLAttributes { children?: React.ReactNode; grow?: boolean; className?: string; } const Select = React.forwardRef(function Select( { children, grow = false, className, ...otherProps }: SelectProps, ref ) { return (
{children ? ( {children} ) : null}
); }); export interface CalendarPanelProps extends React.HTMLAttributes { month?: React.ReactNode; year?: React.ReactNode; className?: string; } const CalendarPanel = React.forwardRef( function CalendarPanel( { month, year, className, ...otherProps }: CalendarPanelProps, ref ) { return (
} /> } /> } /> } />
Mo Di Mi Do Fr Sa So
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 1 2
} /> } /> } /> } />
Mo Di Mi Do Fr Sa So
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 1 2
); } ); export interface MonthSelectProps extends React.HTMLAttributes { className?: string; } const MonthSelect = React.forwardRef( function MonthSelect({ className, ...otherProps }: MonthSelectProps, ref) { return (
September
Januar Februar März April Mai Juni Juli August September Oktober November Dezember
); } ); export interface YearSelectProps extends React.ComponentProps { className?: string; } const YearSelect = React.forwardRef< React.ElementRef, YearSelectProps >(function YearSelect({ className, ...otherProps }: YearSelectProps, ref) { return ( 2026
2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031
); }); export interface DayProps extends React.HTMLAttributes { children?: React.ReactNode; selected?: boolean; today?: boolean; outside?: boolean; className?: string; } const Day = React.forwardRef(function Day( { children, selected = false, today = false, outside = false, className, ...otherProps }: DayProps, ref ) { return (
{children ? ( {children} ) : null}
); }); export interface YearCellProps extends React.HTMLAttributes { children?: React.ReactNode; selected?: boolean; className?: string; } const YearCell = React.forwardRef( function YearCell( { children, selected = false, className, ...otherProps }: YearCellProps, ref ) { return (
{children ? ( {children} ) : null}
); } ); export interface DatePickerRootProps extends Omit, "placeholder"> { disabled?: boolean; error?: boolean; hasValue?: boolean; size?: "small" | "medium" | "large"; fillContainer?: boolean; borderless?: boolean; noPadding?: boolean; showLabel?: boolean; label?: React.ReactNode; helpText?: React.ReactNode; message?: React.ReactNode; placeholder?: React.ReactNode; value?: React.ReactNode; month?: React.ReactNode; year?: React.ReactNode; boolean?: boolean; className?: string; } const DatePickerRoot = React.forwardRef( function DatePickerRoot( { disabled = false, error = false, hasValue = false, size = "medium", fillContainer = false, borderless = false, noPadding = false, showLabel = false, label, helpText, message, placeholder, value, month, year, boolean = false, className, ...otherProps }: DatePickerRootProps, ref ) { return (
{label ? ( {label} ) : null} {helpText ? ( {helpText} ) : null}
{value ? ( {value} ) : null} {placeholder ? ( {placeholder} ) : null}
{message ? ( {message} ) : null}
); } ); export const DatePicker = Object.assign(DatePickerRoot, { Weekday, Select, CalendarPanel, MonthSelect, YearSelect, Day, YearCell, });