@linyao.tw/ui 0.0.0-snapshot.07df57 → 1.0.0

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.
@@ -4,7 +4,7 @@ export declare const Menubar: import('react').ForwardRefExoticComponent<Omit<imp
4
4
  export declare function MenubarMenu<Payload = unknown>(props: BaseMenu.Root.Props<Payload>): import("react").JSX.Element;
5
5
  export declare const MenubarTrigger: <Payload = unknown>(props: BaseMenu.Trigger.Props<Payload> & RefAttributes<HTMLButtonElement>) => ReactElement;
6
6
  export declare const MenubarPortal: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPortalProps, "ref"> & RefAttributes<HTMLDivElement>>;
7
- export declare const MenubarPositioner: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPositionerProps, "ref"> & RefAttributes<HTMLDivElement>>;
7
+ export declare const MenubarPositioner: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').MenuPositionerProps, "ref"> & RefAttributes<HTMLDivElement>>;
8
8
  export declare const MenubarPopup: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuPopupProps, "ref"> & RefAttributes<HTMLDivElement>>;
9
9
  export declare const MenubarItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuItemProps, "ref"> & RefAttributes<HTMLElement>>;
10
10
  export declare const MenubarLinkItem: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').ContextMenuLinkItemProps, "ref"> & RefAttributes<Element>>;
@@ -154,7 +154,7 @@ var D = r(function({ "aria-describedby": t, "aria-label": r, "aria-labelledby":
154
154
  multiple: !1,
155
155
  onValueChange: (e, n) => {
156
156
  let r = e[0] ?? null;
157
- !t && r === null || (f?.(r, n), !n.isCanceled && (v || b(r)));
157
+ (t || r !== null) && (f?.(r, n), !n.isCanceled && (v || b(r)));
158
158
  },
159
159
  ref: g,
160
160
  value: x === null ? [] : [x]
@@ -1 +1 @@
1
- {"version":3,"file":"controls.js","names":[],"sources":["../../../src/components/selection/controls.tsx"],"sourcesContent":["import { Checkbox as BaseCheckbox, type CheckboxRootProps } from \"@base-ui/react/checkbox\";\nimport { CheckboxGroup as BaseCheckboxGroup, type CheckboxGroupProps as BaseCheckboxGroupProps } from \"@base-ui/react/checkbox-group\";\nimport { Radio as BaseRadio, type RadioRootProps } from \"@base-ui/react/radio\";\nimport { RadioGroup as BaseRadioGroup, type RadioGroupProps as BaseRadioGroupProps } from \"@base-ui/react/radio-group\";\nimport { Slider as BaseSlider, type SliderRootProps } from \"@base-ui/react/slider\";\nimport { Switch as BaseSwitch, type SwitchRootProps } from \"@base-ui/react/switch\";\nimport { Toggle as BaseToggle, type ToggleProps as BaseToggleProps } from \"@base-ui/react/toggle\";\nimport { ToggleGroup as BaseToggleGroup, type ToggleGroupProps as BaseToggleGroupProps } from \"@base-ui/react/toggle-group\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { MinusIcon } from \"@phosphor-icons/react/dist/csr/Minus\";\nimport { forwardRef, useState, type ForwardedRef, type JSX, type ReactNode, type RefAttributes } from \"react\";\n\nimport { cx, mergeStateClassName } from \"./classnames\";\nimport styles from \"./selection.module.css\";\n\nfunction CheckGlyph({ indeterminate = false }: { indeterminate?: boolean }) {\n\treturn indeterminate ? <MinusIcon aria-hidden=\"true\" weight=\"bold\" /> : <CheckIcon aria-hidden=\"true\" weight=\"bold\" />;\n}\n\nexport interface CheckboxProps extends CheckboxRootProps {\n\tindicator?: ReactNode;\n}\n\nexport const Checkbox = forwardRef<HTMLElement, CheckboxProps>(function Checkbox({ children, className, indicator, indeterminate, ...props }, ref) {\n\treturn (\n\t\t<BaseCheckbox.Root {...props} className={mergeStateClassName(styles.checkbox, className)} indeterminate={indeterminate} ref={ref}>\n\t\t\t<BaseCheckbox.Indicator className={styles.checkboxIndicator} keepMounted>\n\t\t\t\t{indicator ?? <CheckGlyph indeterminate={indeterminate ?? false} />}\n\t\t\t</BaseCheckbox.Indicator>\n\t\t\t{children}\n\t\t</BaseCheckbox.Root>\n\t);\n});\n\nexport type CheckboxGroupProps = BaseCheckboxGroupProps;\n\nexport const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(function CheckboxGroup({ className, ...props }, ref) {\n\treturn <BaseCheckboxGroup {...props} className={mergeStateClassName(styles.choiceGroup, className)} ref={ref} />;\n});\n\nexport interface CheckboxItemProps extends CheckboxProps {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\twrapperClassName?: string;\n}\n\nexport const CheckboxItem = forwardRef<HTMLElement, CheckboxItemProps>(function CheckboxItem({ description, label, wrapperClassName, ...props }, ref) {\n\treturn (\n\t\t<label className={cx(styles.choiceLabel, wrapperClassName)}>\n\t\t\t<Checkbox {...props} ref={ref} />\n\t\t\t<span className={styles.choiceCopy}>\n\t\t\t\t<span className={styles.choiceTitle}>{label}</span>\n\t\t\t\t{description ? <span className={styles.choiceDescription}>{description}</span> : null}\n\t\t\t</span>\n\t\t</label>\n\t);\n});\n\nexport type RadioGroupProps<Value = string> = BaseRadioGroupProps<Value>;\n\ntype RadioGroupComponent = <Value = string>(props: RadioGroupProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const RadioGroup = forwardRef(function RadioGroup<Value = string>({ className, ...props }: RadioGroupProps<Value>, ref: ForwardedRef<HTMLDivElement>) {\n\treturn <BaseRadioGroup {...props} className={mergeStateClassName(styles.choiceGroup, className)} ref={ref} />;\n}) as RadioGroupComponent;\n\nexport type RadioProps<Value = string> = RadioRootProps<Value>;\n\ntype RadioComponent = <Value = string>(props: RadioProps<Value> & RefAttributes<HTMLElement>) => JSX.Element;\n\nexport const Radio = forwardRef(function Radio<Value = string>({ children, className, ...props }: RadioProps<Value>, ref: ForwardedRef<HTMLElement>) {\n\treturn (\n\t\t<BaseRadio.Root {...props} className={mergeStateClassName(styles.radio, className)} ref={ref}>\n\t\t\t<BaseRadio.Indicator className={styles.radioIndicator} keepMounted />\n\t\t\t{children}\n\t\t</BaseRadio.Root>\n\t);\n}) as RadioComponent;\n\nexport interface RadioItemProps<Value = string> extends RadioProps<Value> {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\twrapperClassName?: string;\n}\n\ntype RadioItemComponent = <Value = string>(props: RadioItemProps<Value> & RefAttributes<HTMLElement>) => JSX.Element;\n\nexport const RadioItem = forwardRef(function RadioItem<Value = string>({ description, label, wrapperClassName, ...props }: RadioItemProps<Value>, ref: ForwardedRef<HTMLElement>) {\n\treturn (\n\t\t<label className={cx(styles.choiceLabel, wrapperClassName)}>\n\t\t\t<Radio {...props} ref={ref} />\n\t\t\t<span className={styles.choiceCopy}>\n\t\t\t\t<span className={styles.choiceTitle}>{label}</span>\n\t\t\t\t{description ? <span className={styles.choiceDescription}>{description}</span> : null}\n\t\t\t</span>\n\t\t</label>\n\t);\n}) as RadioItemComponent;\n\nexport interface SwitchProps extends SwitchRootProps {\n\tchildren?: ReactNode;\n}\n\nexport const Switch = forwardRef<HTMLElement, SwitchProps>(function Switch({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseSwitch.Root {...props} className={mergeStateClassName(styles.switch, className)} ref={ref}>\n\t\t\t<span aria-hidden=\"true\" className={styles.switchSignal} />\n\t\t\t<BaseSwitch.Thumb className={styles.switchThumb} />\n\t\t\t{children}\n\t\t</BaseSwitch.Root>\n\t);\n});\n\nexport interface SliderProps<Value extends number | readonly number[] = number> extends SliderRootProps<Value> {\n\tgetAriaLabel?: (index: number) => string;\n\tgetAriaValueText?: (formattedValue: string, value: number, index: number) => string;\n\tshowValue?: boolean;\n}\n\ntype SliderComponent = <Value extends number | readonly number[] = number>(props: SliderProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nfunction getThumbCount(value: number | readonly number[] | undefined): number {\n\treturn Array.isArray(value) ? Math.max(value.length, 1) : 1;\n}\n\nexport const Slider = forwardRef(function Slider<Value extends number | readonly number[] = number>(\n\t{\n\t\t\"aria-describedby\": ariaDescribedby,\n\t\t\"aria-label\": ariaLabel,\n\t\t\"aria-labelledby\": ariaLabelledby,\n\t\tclassName,\n\t\tdefaultValue,\n\t\tgetAriaLabel,\n\t\tgetAriaValueText,\n\t\tshowValue = false,\n\t\tvalue,\n\t\t...props\n\t}: SliderProps<Value>,\n\tref: ForwardedRef<HTMLDivElement>\n) {\n\tconst thumbCount = getThumbCount(value ?? defaultValue);\n\tconst fallbackThumbLabel = ariaLabel ? (index: number) => (thumbCount === 1 ? ariaLabel : `${ariaLabel} ${index + 1}`) : undefined;\n\n\treturn (\n\t\t<BaseSlider.Root {...props} aria-label={ariaLabel} aria-labelledby={ariaLabelledby} className={mergeStateClassName(styles.slider, className)} defaultValue={defaultValue} ref={ref} value={value}>\n\t\t\t{showValue ? <BaseSlider.Value className={styles.sliderValue} /> : null}\n\t\t\t<BaseSlider.Control className={styles.sliderControl}>\n\t\t\t\t<BaseSlider.Track className={styles.sliderTrack}>\n\t\t\t\t\t<BaseSlider.Indicator className={styles.sliderIndicator} />\n\t\t\t\t\t{Array.from({ length: thumbCount }, (_, index) => (\n\t\t\t\t\t\t<BaseSlider.Thumb\n\t\t\t\t\t\t\tclassName={styles.sliderThumb}\n\t\t\t\t\t\t\tgetAriaLabel={getAriaLabel ?? fallbackThumbLabel}\n\t\t\t\t\t\t\tgetAriaValueText={getAriaValueText}\n\t\t\t\t\t\t\tinputRef={input => {\n\t\t\t\t\t\t\t\tif (!input) return;\n\t\t\t\t\t\t\t\tif (ariaDescribedby) input.setAttribute(\"aria-describedby\", ariaDescribedby);\n\t\t\t\t\t\t\t\tif (ariaLabelledby && !getAriaLabel) input.setAttribute(\"aria-labelledby\", ariaLabelledby);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</BaseSlider.Track>\n\t\t\t</BaseSlider.Control>\n\t\t</BaseSlider.Root>\n\t);\n}) as SliderComponent;\n\nexport interface ToggleProps<Value extends string = string> extends BaseToggleProps<Value> {\n\tvariant?: \"standard\" | \"quiet\";\n}\n\ntype ToggleComponent = <Value extends string = string>(props: ToggleProps<Value> & RefAttributes<HTMLButtonElement>) => JSX.Element;\n\nexport const Toggle = forwardRef(function Toggle<Value extends string = string>({ className, variant = \"standard\", ...props }: ToggleProps<Value>, ref: ForwardedRef<HTMLButtonElement>) {\n\treturn <BaseToggle {...props} className={state => cx(styles.toggle, variant === \"quiet\" && styles.toggleQuiet, typeof className === \"function\" ? className(state) : className)} ref={ref} />;\n}) as ToggleComponent;\n\nexport type ToggleGroupProps<Value extends string = string> = BaseToggleGroupProps<Value>;\n\ntype ToggleGroupComponent = <Value extends string = string>(props: ToggleGroupProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const ToggleGroup = forwardRef(function ToggleGroup<Value extends string = string>({ className, ...props }: ToggleGroupProps<Value>, ref: ForwardedRef<HTMLDivElement>) {\n\treturn <BaseToggleGroup {...props} className={mergeStateClassName(styles.toggleGroup, className)} ref={ref} />;\n}) as ToggleGroupComponent;\n\nexport interface SegmentedControlProps<Value extends string = string> extends Omit<BaseToggleGroupProps<Value>, \"aria-readonly\" | \"defaultValue\" | \"multiple\" | \"onValueChange\" | \"value\"> {\n\tallowEmpty?: boolean;\n\tdefaultValue?: Value | null;\n\tname?: string;\n\tonValueChange?: (value: Value | null, details: BaseToggleGroup.ChangeEventDetails) => void;\n\tsize?: \"sm\" | \"md\";\n\tvalue?: Value | null;\n}\n\ntype SegmentedControlComponent = <Value extends string = string>(props: SegmentedControlProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const SegmentedControl = forwardRef(function SegmentedControl<Value extends string = string>(\n\t{ allowEmpty = false, \"aria-label\": ariaLabel, className, defaultValue = null, disabled = false, name, onValueChange, size = \"md\", value, ...props }: SegmentedControlProps<Value>,\n\tref: ForwardedRef<HTMLDivElement>\n) {\n\tconst controlled = value !== undefined;\n\tconst [internalValue, setInternalValue] = useState<Value | null>(defaultValue);\n\tconst currentValue = controlled ? value : internalValue;\n\n\treturn (\n\t\t<>\n\t\t\t<BaseToggleGroup\n\t\t\t\t{...props}\n\t\t\t\taria-label={ariaLabel}\n\t\t\t\tclassName={mergeStateClassName(styles.segmentedControl, className)}\n\t\t\t\tdata-size={size}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tmultiple={false}\n\t\t\t\tonValueChange={(nextValues, details) => {\n\t\t\t\t\tconst nextValue = nextValues[0] ?? null;\n\t\t\t\t\tif (!allowEmpty && nextValue === null) return;\n\t\t\t\t\tonValueChange?.(nextValue, details);\n\t\t\t\t\tif (details.isCanceled) return;\n\t\t\t\t\tif (!controlled) setInternalValue(nextValue);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\tvalue={currentValue === null ? [] : [currentValue]}\n\t\t\t/>\n\t\t\t{name ? <input disabled={disabled} name={name} type=\"hidden\" value={currentValue ?? \"\"} /> : null}\n\t\t</>\n\t);\n}) as SegmentedControlComponent;\n\nexport const SegmentedControlItem = Toggle;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,EAAW,EAAE,mBAAgB,MAAsC;CAC3E,OAAuB,EAAhB,IAAiB,IAAiD,GAAlD;EAAW,eAAY;EAAO,QAAO;CAAQ,CAAiD;AACtH;AAMA,IAAa,IAAW,EAAuC,SAAkB,EAAE,aAAU,cAAW,cAAW,kBAAe,GAAG,KAAS,GAAK;CAClJ,OACC,kBAAC,EAAa,MAAd;EAAmB,GAAI;EAAO,WAAW,EAAoB,EAAO,UAAU,CAAS;EAAkB;EAAoB;EAA7H,UAAA,CACC,kBAAC,EAAa,WAAd;GAAwB,WAAW,EAAO;GAAmB,aAAA;GAC3D,UAAA,KAAa,kBAAC,GAAD,EAAY,eAAe,KAAiB,GAAQ,CAAA;EAC3C,CAAA,GACvB,CACiB;;AAErB,CAAC,GAIY,IAAgB,EAA+C,SAAuB,EAAE,cAAW,GAAG,KAAS,GAAK;C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,IAAI,CAAC,CAAY;CACjD,CAAA,GACA,IAAO,kBAAC,SAAD;EAAiB;EAAgB;EAAM,MAAK;EAAS,OAAO,KAAgB;CAAK,CAAA,IAAI,IAC5F,EAAA,CAAA;AAEJ,CAAC,GAEY,IAAuB"}
1
+ {"version":3,"file":"controls.js","names":[],"sources":["../../../src/components/selection/controls.tsx"],"sourcesContent":["import { Checkbox as BaseCheckbox, type CheckboxRootProps } from \"@base-ui/react/checkbox\";\nimport { CheckboxGroup as BaseCheckboxGroup, type CheckboxGroupProps as BaseCheckboxGroupProps } from \"@base-ui/react/checkbox-group\";\nimport { Radio as BaseRadio, type RadioRootProps } from \"@base-ui/react/radio\";\nimport { RadioGroup as BaseRadioGroup, type RadioGroupProps as BaseRadioGroupProps } from \"@base-ui/react/radio-group\";\nimport { Slider as BaseSlider, type SliderRootProps } from \"@base-ui/react/slider\";\nimport { Switch as BaseSwitch, type SwitchRootProps } from \"@base-ui/react/switch\";\nimport { Toggle as BaseToggle, type ToggleProps as BaseToggleProps } from \"@base-ui/react/toggle\";\nimport { ToggleGroup as BaseToggleGroup, type ToggleGroupProps as BaseToggleGroupProps } from \"@base-ui/react/toggle-group\";\nimport { CheckIcon } from \"@phosphor-icons/react/dist/csr/Check\";\nimport { MinusIcon } from \"@phosphor-icons/react/dist/csr/Minus\";\nimport { forwardRef, useState, type ForwardedRef, type JSX, type ReactNode, type RefAttributes } from \"react\";\n\nimport { cx, mergeStateClassName } from \"./classnames\";\nimport styles from \"./selection.module.css\";\n\nfunction CheckGlyph({ indeterminate = false }: { indeterminate?: boolean }) {\n\treturn indeterminate ? <MinusIcon aria-hidden=\"true\" weight=\"bold\" /> : <CheckIcon aria-hidden=\"true\" weight=\"bold\" />;\n}\n\nexport interface CheckboxProps extends CheckboxRootProps {\n\tindicator?: ReactNode;\n}\n\nexport const Checkbox = forwardRef<HTMLElement, CheckboxProps>(function Checkbox({ children, className, indicator, indeterminate, ...props }, ref) {\n\treturn (\n\t\t<BaseCheckbox.Root {...props} className={mergeStateClassName(styles.checkbox, className)} indeterminate={indeterminate} ref={ref}>\n\t\t\t<BaseCheckbox.Indicator className={styles.checkboxIndicator} keepMounted>\n\t\t\t\t{indicator ?? <CheckGlyph indeterminate={indeterminate ?? false} />}\n\t\t\t</BaseCheckbox.Indicator>\n\t\t\t{children}\n\t\t</BaseCheckbox.Root>\n\t);\n});\n\nexport type CheckboxGroupProps = BaseCheckboxGroupProps;\n\nexport const CheckboxGroup = forwardRef<HTMLDivElement, CheckboxGroupProps>(function CheckboxGroup({ className, ...props }, ref) {\n\treturn <BaseCheckboxGroup {...props} className={mergeStateClassName(styles.choiceGroup, className)} ref={ref} />;\n});\n\nexport interface CheckboxItemProps extends CheckboxProps {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\twrapperClassName?: string;\n}\n\nexport const CheckboxItem = forwardRef<HTMLElement, CheckboxItemProps>(function CheckboxItem({ description, label, wrapperClassName, ...props }, ref) {\n\treturn (\n\t\t<label className={cx(styles.choiceLabel, wrapperClassName)}>\n\t\t\t<Checkbox {...props} ref={ref} />\n\t\t\t<span className={styles.choiceCopy}>\n\t\t\t\t<span className={styles.choiceTitle}>{label}</span>\n\t\t\t\t{description ? <span className={styles.choiceDescription}>{description}</span> : null}\n\t\t\t</span>\n\t\t</label>\n\t);\n});\n\nexport type RadioGroupProps<Value = string> = BaseRadioGroupProps<Value>;\n\ntype RadioGroupComponent = <Value = string>(props: RadioGroupProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const RadioGroup = forwardRef(function RadioGroup<Value = string>({ className, ...props }: RadioGroupProps<Value>, ref: ForwardedRef<HTMLDivElement>) {\n\treturn <BaseRadioGroup {...props} className={mergeStateClassName(styles.choiceGroup, className)} ref={ref} />;\n}) as RadioGroupComponent;\n\nexport type RadioProps<Value = string> = RadioRootProps<Value>;\n\ntype RadioComponent = <Value = string>(props: RadioProps<Value> & RefAttributes<HTMLElement>) => JSX.Element;\n\nexport const Radio = forwardRef(function Radio<Value = string>({ children, className, ...props }: RadioProps<Value>, ref: ForwardedRef<HTMLElement>) {\n\treturn (\n\t\t<BaseRadio.Root {...props} className={mergeStateClassName(styles.radio, className)} ref={ref}>\n\t\t\t<BaseRadio.Indicator className={styles.radioIndicator} keepMounted />\n\t\t\t{children}\n\t\t</BaseRadio.Root>\n\t);\n}) as RadioComponent;\n\nexport interface RadioItemProps<Value = string> extends RadioProps<Value> {\n\tlabel: ReactNode;\n\tdescription?: ReactNode;\n\twrapperClassName?: string;\n}\n\ntype RadioItemComponent = <Value = string>(props: RadioItemProps<Value> & RefAttributes<HTMLElement>) => JSX.Element;\n\nexport const RadioItem = forwardRef(function RadioItem<Value = string>({ description, label, wrapperClassName, ...props }: RadioItemProps<Value>, ref: ForwardedRef<HTMLElement>) {\n\treturn (\n\t\t<label className={cx(styles.choiceLabel, wrapperClassName)}>\n\t\t\t<Radio {...props} ref={ref} />\n\t\t\t<span className={styles.choiceCopy}>\n\t\t\t\t<span className={styles.choiceTitle}>{label}</span>\n\t\t\t\t{description ? <span className={styles.choiceDescription}>{description}</span> : null}\n\t\t\t</span>\n\t\t</label>\n\t);\n}) as RadioItemComponent;\n\nexport interface SwitchProps extends SwitchRootProps {\n\tchildren?: ReactNode;\n}\n\nexport const Switch = forwardRef<HTMLElement, SwitchProps>(function Switch({ children, className, ...props }, ref) {\n\treturn (\n\t\t<BaseSwitch.Root {...props} className={mergeStateClassName(styles.switch, className)} ref={ref}>\n\t\t\t<span aria-hidden=\"true\" className={styles.switchSignal} />\n\t\t\t<BaseSwitch.Thumb className={styles.switchThumb} />\n\t\t\t{children}\n\t\t</BaseSwitch.Root>\n\t);\n});\n\nexport interface SliderProps<Value extends number | readonly number[] = number> extends SliderRootProps<Value> {\n\tgetAriaLabel?: (index: number) => string;\n\tgetAriaValueText?: (formattedValue: string, value: number, index: number) => string;\n\tshowValue?: boolean;\n}\n\ntype SliderComponent = <Value extends number | readonly number[] = number>(props: SliderProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nfunction getThumbCount(value: number | readonly number[] | undefined): number {\n\treturn Array.isArray(value) ? Math.max(value.length, 1) : 1;\n}\n\nexport const Slider = forwardRef(function Slider<Value extends number | readonly number[] = number>(\n\t{\n\t\t\"aria-describedby\": ariaDescribedby,\n\t\t\"aria-label\": ariaLabel,\n\t\t\"aria-labelledby\": ariaLabelledby,\n\t\tclassName,\n\t\tdefaultValue,\n\t\tgetAriaLabel,\n\t\tgetAriaValueText,\n\t\tshowValue = false,\n\t\tvalue,\n\t\t...props\n\t}: SliderProps<Value>,\n\tref: ForwardedRef<HTMLDivElement>\n) {\n\tconst thumbCount = getThumbCount(value ?? defaultValue);\n\tconst fallbackThumbLabel = ariaLabel ? (index: number) => (thumbCount === 1 ? ariaLabel : `${ariaLabel} ${index + 1}`) : undefined;\n\n\treturn (\n\t\t<BaseSlider.Root {...props} aria-label={ariaLabel} aria-labelledby={ariaLabelledby} className={mergeStateClassName(styles.slider, className)} defaultValue={defaultValue} ref={ref} value={value}>\n\t\t\t{showValue ? <BaseSlider.Value className={styles.sliderValue} /> : null}\n\t\t\t<BaseSlider.Control className={styles.sliderControl}>\n\t\t\t\t<BaseSlider.Track className={styles.sliderTrack}>\n\t\t\t\t\t<BaseSlider.Indicator className={styles.sliderIndicator} />\n\t\t\t\t\t{Array.from({ length: thumbCount }, (_, index) => (\n\t\t\t\t\t\t<BaseSlider.Thumb\n\t\t\t\t\t\t\tclassName={styles.sliderThumb}\n\t\t\t\t\t\t\tgetAriaLabel={getAriaLabel ?? fallbackThumbLabel}\n\t\t\t\t\t\t\tgetAriaValueText={getAriaValueText}\n\t\t\t\t\t\t\tinputRef={input => {\n\t\t\t\t\t\t\t\tif (!input) return;\n\t\t\t\t\t\t\t\tif (ariaDescribedby) input.setAttribute(\"aria-describedby\", ariaDescribedby);\n\t\t\t\t\t\t\t\tif (ariaLabelledby && !getAriaLabel) input.setAttribute(\"aria-labelledby\", ariaLabelledby);\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tindex={index}\n\t\t\t\t\t\t\tkey={index}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</BaseSlider.Track>\n\t\t\t</BaseSlider.Control>\n\t\t</BaseSlider.Root>\n\t);\n}) as SliderComponent;\n\nexport interface ToggleProps<Value extends string = string> extends BaseToggleProps<Value> {\n\tvariant?: \"standard\" | \"quiet\";\n}\n\ntype ToggleComponent = <Value extends string = string>(props: ToggleProps<Value> & RefAttributes<HTMLButtonElement>) => JSX.Element;\n\nexport const Toggle = forwardRef(function Toggle<Value extends string = string>({ className, variant = \"standard\", ...props }: ToggleProps<Value>, ref: ForwardedRef<HTMLButtonElement>) {\n\treturn <BaseToggle {...props} className={state => cx(styles.toggle, variant === \"quiet\" && styles.toggleQuiet, typeof className === \"function\" ? className(state) : className)} ref={ref} />;\n}) as ToggleComponent;\n\nexport type ToggleGroupProps<Value extends string = string> = BaseToggleGroupProps<Value>;\n\ntype ToggleGroupComponent = <Value extends string = string>(props: ToggleGroupProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const ToggleGroup = forwardRef(function ToggleGroup<Value extends string = string>({ className, ...props }: ToggleGroupProps<Value>, ref: ForwardedRef<HTMLDivElement>) {\n\treturn <BaseToggleGroup {...props} className={mergeStateClassName(styles.toggleGroup, className)} ref={ref} />;\n}) as ToggleGroupComponent;\n\nexport interface SegmentedControlProps<Value extends string = string> extends Omit<BaseToggleGroupProps<Value>, \"aria-readonly\" | \"defaultValue\" | \"multiple\" | \"onValueChange\" | \"value\"> {\n\tallowEmpty?: boolean;\n\tdefaultValue?: Value | null;\n\tname?: string;\n\tonValueChange?: (value: Value | null, details: BaseToggleGroup.ChangeEventDetails) => void;\n\tsize?: \"sm\" | \"md\";\n\tvalue?: Value | null;\n}\n\ntype SegmentedControlComponent = <Value extends string = string>(props: SegmentedControlProps<Value> & RefAttributes<HTMLDivElement>) => JSX.Element;\n\nexport const SegmentedControl = forwardRef(function SegmentedControl<Value extends string = string>(\n\t{ allowEmpty = false, \"aria-label\": ariaLabel, className, defaultValue = null, disabled = false, name, onValueChange, size = \"md\", value, ...props }: SegmentedControlProps<Value>,\n\tref: ForwardedRef<HTMLDivElement>\n) {\n\tconst controlled = value !== undefined;\n\tconst [internalValue, setInternalValue] = useState<Value | null>(defaultValue);\n\tconst currentValue = controlled ? value : internalValue;\n\n\treturn (\n\t\t<>\n\t\t\t<BaseToggleGroup\n\t\t\t\t{...props}\n\t\t\t\taria-label={ariaLabel}\n\t\t\t\tclassName={mergeStateClassName(styles.segmentedControl, className)}\n\t\t\t\tdata-size={size}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tmultiple={false}\n\t\t\t\tonValueChange={(nextValues, details) => {\n\t\t\t\t\tconst nextValue = nextValues[0] ?? null;\n\t\t\t\t\tif (!allowEmpty && nextValue === null) return;\n\t\t\t\t\tonValueChange?.(nextValue, details);\n\t\t\t\t\tif (details.isCanceled) return;\n\t\t\t\t\tif (!controlled) setInternalValue(nextValue);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\tvalue={currentValue === null ? [] : [currentValue]}\n\t\t\t/>\n\t\t\t{name ? <input disabled={disabled} name={name} type=\"hidden\" value={currentValue ?? \"\"} /> : null}\n\t\t</>\n\t);\n}) as SegmentedControlComponent;\n\nexport const SegmentedControlItem = Toggle;\n"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,EAAW,EAAE,mBAAgB,MAAsC;CAC3E,OAAuB,EAAhB,IAAiB,IAAiD,GAAlD;EAAW,eAAY;EAAO,QAAO;CAAQ,CAAiD;AACtH;AAMA,IAAa,IAAW,EAAuC,SAAkB,EAAE,aAAU,cAAW,cAAW,kBAAe,GAAG,KAAS,GAAK;CAClJ,OACC,kBAAC,EAAa,MAAd;EAAmB,GAAI;EAAO,WAAW,EAAoB,EAAO,UAAU,CAAS;EAAkB;EAAoB;EAA7H,UAAA,CACC,kBAAC,EAAa,WAAd;GAAwB,WAAW,EAA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AAgB,GAAY,MAAY;GACvC,IAAM,IAAY,EAAW,MAAM;GAC/B,CAAC,KAAc,MAAc,UACjC,IAAgB,GAAW,CAAO,GAC9B,GAAQ,eACP,KAAY,EAAiB,CAAS;EAC5C;EACK;EACL,OAAO,MAAiB,OAAO,CAAC,IAAI,CAAC,CAAY;CACjD,CAAA,GACA,IAAO,kBAAC,SAAD;EAAiB;EAAgB;EAAM,MAAK;EAAS,OAAO,KAAgB;CAAK,CAAA,IAAI,IAC5F,EAAA,CAAA;AAEJ,CAAC,GAEY,IAAuB"}
@@ -30,7 +30,7 @@ export declare const DropdownMenu: {
30
30
  readonly RadioGroup: import('react').NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
31
31
  readonly RadioItem: import('react').ForwardRefExoticComponent<Omit<MenuRadioItemProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
32
32
  readonly RadioItemIndicator: import('react').ForwardRefExoticComponent<Omit<MenuRadioItemIndicatorProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
33
- readonly Root: <Payload>(props: BaseMenu.Root.Props<Payload>) => import("react").JSX.Element;
33
+ readonly Root: <Payload>(props: BaseMenu.Root.Props<Payload>) => React.JSX.Element;
34
34
  readonly Separator: import('react').ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
35
35
  readonly SubmenuRoot: typeof BaseContextMenu.SubmenuRoot;
36
36
  readonly SubmenuTrigger: import('react').ForwardRefExoticComponent<Omit<MenuSubmenuTriggerProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
@@ -55,7 +55,7 @@ export declare const Menu: {
55
55
  readonly RadioGroup: import('react').NamedExoticComponent<Omit<import('@base-ui/react').ContextMenuRadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
56
56
  readonly RadioItem: import('react').ForwardRefExoticComponent<Omit<MenuRadioItemProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
57
57
  readonly RadioItemIndicator: import('react').ForwardRefExoticComponent<Omit<MenuRadioItemIndicatorProps, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
58
- readonly Root: <Payload>(props: BaseMenu.Root.Props<Payload>) => import("react").JSX.Element;
58
+ readonly Root: <Payload>(props: BaseMenu.Root.Props<Payload>) => React.JSX.Element;
59
59
  readonly Separator: import('react').ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
60
60
  readonly SubmenuRoot: typeof BaseContextMenu.SubmenuRoot;
61
61
  readonly SubmenuTrigger: import('react').ForwardRefExoticComponent<Omit<MenuSubmenuTriggerProps, "ref"> & import('react').RefAttributes<HTMLElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linyao.tw/ui",
3
- "version": "0.0.0-snapshot.07df57",
3
+ "version": "1.0.0",
4
4
  "description": "Linyao Design System,麟曜數位工作室的 React 元件與設計規範套件",
5
5
  "keywords": [
6
6
  "react",
@@ -36,26 +36,26 @@
36
36
  "LICENSE"
37
37
  ],
38
38
  "dependencies": {
39
- "@base-ui/react": "^1.7.0",
40
- "@internationalized/date": "^3.12.3",
41
- "react-aria-components": "^1.20.0"
39
+ "@base-ui/react": "^1.8.0",
40
+ "@internationalized/date": "^3.12.4",
41
+ "react-aria-components": "^1.21.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@phosphor-icons/react": "^2.1.10",
45
45
  "@testing-library/dom": "^10.4.1",
46
46
  "@testing-library/jest-dom": "^7.0.1",
47
47
  "@testing-library/react": "^16.3.3",
48
- "@testing-library/user-event": "^14.6.6",
48
+ "@testing-library/user-event": "^14.6.7",
49
49
  "@types/react": "^19.2.18",
50
- "@types/react-dom": "^19.2.5",
50
+ "@types/react-dom": "^19.2.7",
51
51
  "@vitejs/plugin-react": "^6.1.1",
52
52
  "axe-core": "^4.13.0",
53
- "jsdom": "^26.1.0",
53
+ "jsdom": "^30.0.1",
54
54
  "react": "^19.2.8",
55
55
  "react-dom": "^19.2.8",
56
56
  "vite": "^8.2.2",
57
- "vite-plugin-dts": "^5.0.3",
58
- "vitest": "^4.1.11"
57
+ "vite-plugin-dts": "^5.1.0",
58
+ "vitest": "^5.0.0"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@phosphor-icons/react": "^2.1.10",