@calcifer-design/ui 0.3.0 → 0.5.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.
Files changed (118) hide show
  1. package/dist/components/Breadcrumb/Breadcrumb.d.ts +24 -0
  2. package/dist/components/Breadcrumb/Breadcrumb.js +48 -0
  3. package/dist/components/Breadcrumb/Breadcrumb.module.js +10 -0
  4. package/dist/components/Breadcrumb/Breadcrumb_module.css +49 -0
  5. package/dist/components/CardList/CardList.d.ts +30 -0
  6. package/dist/components/CardList/CardList.js +35 -0
  7. package/dist/components/CardList/CardList.module.js +7 -0
  8. package/dist/components/CardList/CardList_module.css +20 -0
  9. package/dist/components/Checkbox/Checkbox.d.ts +23 -0
  10. package/dist/components/Checkbox/Checkbox.js +33 -0
  11. package/dist/components/Checkbox/Checkbox.module.js +6 -0
  12. package/dist/components/Checkbox/Checkbox_module.css +16 -0
  13. package/dist/components/DatePicker/Calendar.d.ts +19 -0
  14. package/dist/components/DatePicker/Calendar.js +207 -0
  15. package/dist/components/DatePicker/DatePicker.d.ts +72 -0
  16. package/dist/components/DatePicker/DatePicker.js +116 -0
  17. package/dist/components/DatePicker/DatePicker.module.js +14 -0
  18. package/dist/components/DatePicker/DatePicker_module.css +112 -0
  19. package/dist/components/DatePicker/calendarDate.d.ts +46 -0
  20. package/dist/components/DatePicker/calendarDate.js +117 -0
  21. package/dist/components/Descriptions/Descriptions.d.ts +25 -0
  22. package/dist/components/Descriptions/Descriptions.js +44 -0
  23. package/dist/components/Descriptions/Descriptions.module.js +8 -0
  24. package/dist/components/Descriptions/Descriptions_module.css +47 -0
  25. package/dist/components/Field/Field.d.ts +118 -0
  26. package/dist/components/Field/Field.js +90 -0
  27. package/dist/components/Field/PickerField.d.ts +41 -0
  28. package/dist/components/Field/PickerField.js +115 -0
  29. package/dist/components/Field/PickerField.module.js +8 -0
  30. package/dist/components/Field/PickerField_module.css +36 -0
  31. package/dist/components/FilterBar/FilterBar.d.ts +55 -0
  32. package/dist/components/FilterBar/FilterBar.js +138 -0
  33. package/dist/components/FilterBar/FilterBar.module.js +13 -0
  34. package/dist/components/FilterBar/FilterBar_module.css +98 -0
  35. package/dist/components/Form/Form.d.ts +48 -0
  36. package/dist/components/Form/Form.js +38 -0
  37. package/dist/components/Form/Form.module.js +5 -0
  38. package/dist/components/Form/FormContext.d.ts +15 -0
  39. package/dist/components/Form/FormContext.js +20 -0
  40. package/dist/components/Form/Form_module.css +6 -0
  41. package/dist/components/PageShell/PageShell.d.ts +27 -0
  42. package/dist/components/PageShell/PageShell.js +35 -0
  43. package/dist/components/PageShell/PageShell.module.js +9 -0
  44. package/dist/components/PageShell/PageShell_module.css +56 -0
  45. package/dist/components/RadioGroup/RadioGroup.d.ts +35 -0
  46. package/dist/components/RadioGroup/RadioGroup.js +64 -0
  47. package/dist/components/RadioGroup/RadioGroup.module.js +6 -0
  48. package/dist/components/RadioGroup/RadioGroup_module.css +13 -0
  49. package/dist/components/Segmented/Segmented.d.ts +49 -0
  50. package/dist/components/Segmented/Segmented.js +55 -0
  51. package/dist/components/Segmented/Segmented.module.js +7 -0
  52. package/dist/components/Segmented/Segmented_module.css +75 -0
  53. package/dist/components/Select/Select.d.ts +42 -0
  54. package/dist/components/Select/Select.js +90 -0
  55. package/dist/components/Select/Select.module.js +9 -0
  56. package/dist/components/Select/Select_module.css +70 -0
  57. package/dist/components/Steps/Steps.d.ts +30 -0
  58. package/dist/components/Steps/Steps.js +63 -0
  59. package/dist/components/Steps/Steps.module.js +10 -0
  60. package/dist/components/Steps/Steps_module.css +126 -0
  61. package/dist/components/Switch/Switch.d.ts +23 -0
  62. package/dist/components/Switch/Switch.js +25 -0
  63. package/dist/components/Switch/Switch.module.js +6 -0
  64. package/dist/components/Switch/Switch_module.css +41 -0
  65. package/dist/components/TextArea/TextArea.d.ts +16 -0
  66. package/dist/components/TextArea/TextArea.js +28 -0
  67. package/dist/components/TextArea/TextArea.module.js +5 -0
  68. package/dist/components/TextArea/TextArea_module.css +12 -0
  69. package/dist/components/TextInput/TextInput.d.ts +17 -0
  70. package/dist/components/TextInput/TextInput.js +18 -0
  71. package/dist/components/TimePicker/TimePicker.d.ts +19 -0
  72. package/dist/components/TimePicker/TimePicker.js +17 -0
  73. package/dist/components/Timeline/Timeline.d.ts +39 -0
  74. package/dist/components/Timeline/Timeline.js +109 -0
  75. package/dist/components/Timeline/Timeline.module.js +12 -0
  76. package/dist/components/Timeline/Timeline_module.css +99 -0
  77. package/dist/components/Toolbar/InsideToolbarContext.d.ts +6 -0
  78. package/dist/components/Toolbar/InsideToolbarContext.js +3 -0
  79. package/dist/components/Toolbar/Toolbar.d.ts +46 -0
  80. package/dist/components/Toolbar/Toolbar.js +43 -0
  81. package/dist/components/Toolbar/Toolbar.module.js +7 -0
  82. package/dist/components/Toolbar/Toolbar_module.css +26 -0
  83. package/dist/components/Tree/Tree.d.ts +81 -0
  84. package/dist/components/Tree/Tree.js +232 -0
  85. package/dist/components/Tree/Tree.module.js +12 -0
  86. package/dist/components/Tree/Tree_module.css +124 -0
  87. package/dist/components/Tree/treeIndex.d.ts +23 -0
  88. package/dist/components/Tree/treeIndex.js +33 -0
  89. package/dist/components/TreeSelect/TreeSelect.d.ts +61 -0
  90. package/dist/components/TreeSelect/TreeSelect.js +117 -0
  91. package/dist/components/TreeSelect/TreeSelect.module.js +7 -0
  92. package/dist/components/TreeSelect/TreeSelect_module.css +22 -0
  93. package/dist/components/Upload/Upload.d.ts +66 -0
  94. package/dist/components/Upload/Upload.js +287 -0
  95. package/dist/components/Upload/Upload.module.js +12 -0
  96. package/dist/components/Upload/Upload_module.css +96 -0
  97. package/dist/components/ViewField/ViewField.d.ts +26 -0
  98. package/dist/components/ViewField/ViewField.js +29 -0
  99. package/dist/components/ViewField/ViewField.module.js +6 -0
  100. package/dist/components/ViewField/ViewField_module.css +17 -0
  101. package/dist/hooks/useFormReset.d.ts +10 -0
  102. package/dist/hooks/useFormReset.js +34 -0
  103. package/dist/icons/CalendarIcon.d.ts +2 -0
  104. package/dist/icons/CalendarIcon.js +26 -0
  105. package/dist/icons/CheckIcon.d.ts +6 -0
  106. package/dist/icons/CheckIcon.js +17 -0
  107. package/dist/icons/ChevronDownIcon.d.ts +6 -0
  108. package/dist/icons/ChevronDownIcon.js +17 -0
  109. package/dist/icons/MinusIcon.d.ts +5 -0
  110. package/dist/icons/MinusIcon.js +16 -0
  111. package/dist/index.d.ts +46 -0
  112. package/dist/index.js +23 -0
  113. package/dist/styles/field.module.js +15 -0
  114. package/dist/styles/field_module.css +133 -0
  115. package/dist/styles/pair.module.js +6 -0
  116. package/dist/styles/pair_module.css +18 -0
  117. package/dist/styles/popup_module.css +6 -0
  118. package/package.json +2 -2
@@ -0,0 +1,9 @@
1
+ import "./Select_module.css";
2
+ const Select_module = {
3
+ trigger: "trigger-UPubf",
4
+ value: "value-fKND1",
5
+ icon: "icon-_ToIv",
6
+ option: "option-vv9zm",
7
+ indicator: "indicator-O12DN"
8
+ };
9
+ export default Select_module;
@@ -0,0 +1,70 @@
1
+ .trigger-UPubf {
2
+ justify-content: space-between;
3
+ gap: var(--space-3);
4
+ text-align: start;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .value-fKND1 {
9
+ white-space: nowrap;
10
+ text-overflow: ellipsis;
11
+ overflow: hidden;
12
+ }
13
+
14
+ .value-fKND1[data-placeholder] {
15
+ color: var(--color-text-subtle);
16
+ }
17
+
18
+ .icon-_ToIv {
19
+ color: var(--color-text-muted);
20
+ transition-property: transform;
21
+ transition-duration: var(--motion-duration-1);
22
+ transition-timing-function: var(--motion-ease);
23
+ flex: none;
24
+ display: inline-flex;
25
+ }
26
+
27
+ .icon-_ToIv > svg {
28
+ width: 1rem;
29
+ height: 1rem;
30
+ }
31
+
32
+ .icon-_ToIv[data-popup-open] {
33
+ transform: rotate(180deg);
34
+ }
35
+
36
+ .option-vv9zm {
37
+ justify-content: space-between;
38
+ align-items: center;
39
+ gap: var(--space-3);
40
+ min-height: var(--size-touch);
41
+ padding-inline: var(--space-3);
42
+ border-radius: var(--radius-md);
43
+ color: var(--color-text);
44
+ font-size: var(--text-md);
45
+ cursor: pointer;
46
+ -webkit-user-select: none;
47
+ user-select: none;
48
+ display: flex;
49
+ }
50
+
51
+ .option-vv9zm[data-highlighted] {
52
+ background: var(--color-surface-2);
53
+ }
54
+
55
+ .option-vv9zm[data-disabled] {
56
+ cursor: not-allowed;
57
+ opacity: .45;
58
+ }
59
+
60
+ .indicator-O12DN {
61
+ color: var(--color-accent);
62
+ flex: none;
63
+ display: inline-flex;
64
+ }
65
+
66
+ .indicator-O12DN > svg {
67
+ width: 1rem;
68
+ height: 1rem;
69
+ }
70
+
@@ -0,0 +1,30 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface StepsItem {
3
+ /** Identifies the step across renders. */
4
+ id: string;
5
+ title: ReactNode;
6
+ description?: ReactNode;
7
+ }
8
+ export type StepStatus = 'complete' | 'active' | 'error' | 'upcoming';
9
+ export interface StepsProps {
10
+ items: StepsItem[];
11
+ /**
12
+ * The current step, zero-based. Below zero nothing has started; at `items.length` or above
13
+ * everything is complete. Neither case has a current step, so nothing is marked as one.
14
+ */
15
+ current: number;
16
+ /** How the current step is going. */
17
+ currentStatus?: 'active' | 'error';
18
+ /** `horizontal` applies from the `sm` breakpoint up; below it the steps always stack. */
19
+ orientation?: 'horizontal' | 'vertical';
20
+ /** Names the list. */
21
+ 'aria-label'?: string;
22
+ /** The words each status is stated in, for an app that is not in English. */
23
+ statusLabels?: Partial<Record<StepStatus, string>>;
24
+ }
25
+ /**
26
+ * Progress through a sequence. A display only: nothing here can be focused or activated. Each
27
+ * step's status is stated in visually hidden text, so colour and the drawn marker, which is
28
+ * hidden from assistive technology, are never the only signal.
29
+ */
30
+ export declare function Steps({ items, current, currentStatus, orientation, 'aria-label': ariaLabel, statusLabels, }: StepsProps): import("react").JSX.Element;
@@ -0,0 +1,63 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { CheckIcon } from "../../icons/CheckIcon.js";
3
+ import a11y_module from "../../styles/a11y.module.js";
4
+ import Steps_module from "./Steps.module.js";
5
+ const DEFAULT_STATUS_LABELS = {
6
+ complete: 'Completed',
7
+ active: 'Current',
8
+ error: 'Error',
9
+ upcoming: 'Not started'
10
+ };
11
+ function statusOf(index, current, currentStatus) {
12
+ if (index < current) return 'complete';
13
+ return index === current ? currentStatus : 'upcoming';
14
+ }
15
+ function markerOf(status, index) {
16
+ if ('complete' === status) return /*#__PURE__*/ jsx(CheckIcon, {});
17
+ return 'error' === status ? '!' : index + 1;
18
+ }
19
+ function Steps({ items, current, currentStatus = 'active', orientation = 'horizontal', 'aria-label': ariaLabel, statusLabels }) {
20
+ const labels = {
21
+ ...DEFAULT_STATUS_LABELS,
22
+ ...statusLabels
23
+ };
24
+ return /*#__PURE__*/ jsx("ol", {
25
+ role: "list",
26
+ className: Steps_module.list,
27
+ "data-orientation": orientation,
28
+ "aria-label": ariaLabel,
29
+ children: items.map((item, index)=>{
30
+ const status = statusOf(index, current, currentStatus);
31
+ return /*#__PURE__*/ jsxs("li", {
32
+ className: Steps_module.item,
33
+ "data-status": status,
34
+ "aria-current": index === current ? 'step' : void 0,
35
+ children: [
36
+ /*#__PURE__*/ jsx("span", {
37
+ className: Steps_module.marker,
38
+ "aria-hidden": "true",
39
+ children: markerOf(status, index)
40
+ }),
41
+ /*#__PURE__*/ jsxs("span", {
42
+ className: Steps_module.body,
43
+ children: [
44
+ /*#__PURE__*/ jsx("span", {
45
+ className: Steps_module.title,
46
+ children: item.title
47
+ }),
48
+ /*#__PURE__*/ jsx("span", {
49
+ className: a11y_module.visuallyHidden,
50
+ children: labels[status]
51
+ }),
52
+ item.description ? /*#__PURE__*/ jsx("span", {
53
+ className: Steps_module.description,
54
+ children: item.description
55
+ }) : null
56
+ ]
57
+ })
58
+ ]
59
+ }, item.id);
60
+ })
61
+ });
62
+ }
63
+ export { Steps };
@@ -0,0 +1,10 @@
1
+ import "./Steps_module.css";
2
+ const Steps_module = {
3
+ list: "list-hpIu5",
4
+ item: "item-PEG_P",
5
+ marker: "marker-ETCZc",
6
+ body: "body-KsZkq",
7
+ title: "title-TEL7i",
8
+ description: "description-Iud3V"
9
+ };
10
+ export default Steps_module;
@@ -0,0 +1,126 @@
1
+ .list-hpIu5 {
2
+ flex-direction: column;
3
+ margin: 0;
4
+ padding: 0;
5
+ list-style: none;
6
+ display: flex;
7
+ }
8
+
9
+ .item-PEG_P {
10
+ --step-marker-size: 1.75rem;
11
+ gap: var(--space-3);
12
+ min-width: 0;
13
+ padding-block-end: var(--space-4);
14
+ display: flex;
15
+ position: relative;
16
+ }
17
+
18
+ .item-PEG_P:last-child {
19
+ padding-block-end: 0;
20
+ }
21
+
22
+ .item-PEG_P:not(:last-child):before {
23
+ content: "";
24
+ inset-block: var(--step-marker-size) 0;
25
+ background: var(--color-border-strong);
26
+ width: 1px;
27
+ position: absolute;
28
+ inset-inline-start: calc(var(--step-marker-size) / 2);
29
+ }
30
+
31
+ .item-PEG_P[data-status="complete"]:before {
32
+ background: var(--color-accent);
33
+ }
34
+
35
+ .marker-ETCZc {
36
+ width: var(--step-marker-size);
37
+ height: var(--step-marker-size);
38
+ border: 1px solid var(--color-border-strong);
39
+ border-radius: var(--radius-full);
40
+ color: var(--color-text-muted);
41
+ font-size: var(--text-sm);
42
+ font-weight: 600;
43
+ line-height: var(--leading-snug);
44
+ flex: none;
45
+ justify-content: center;
46
+ align-items: center;
47
+ display: inline-flex;
48
+ }
49
+
50
+ .marker-ETCZc > svg {
51
+ width: 1rem;
52
+ height: 1rem;
53
+ }
54
+
55
+ .item-PEG_P[data-status="complete"] .marker-ETCZc {
56
+ border-color: var(--color-accent);
57
+ background: var(--color-accent);
58
+ color: var(--color-accent-text);
59
+ }
60
+
61
+ .item-PEG_P[data-status="active"] .marker-ETCZc {
62
+ border-color: var(--color-accent);
63
+ background: var(--color-accent-soft);
64
+ color: var(--color-text);
65
+ }
66
+
67
+ .item-PEG_P[data-status="error"] .marker-ETCZc {
68
+ border-color: var(--color-danger);
69
+ background: var(--color-danger-surface);
70
+ color: var(--color-text);
71
+ }
72
+
73
+ .body-KsZkq {
74
+ gap: var(--space-1);
75
+ min-width: 0;
76
+ overflow-wrap: anywhere;
77
+ flex-direction: column;
78
+ padding-block-start: var(--space-1);
79
+ display: flex;
80
+ }
81
+
82
+ .title-TEL7i {
83
+ color: var(--color-text);
84
+ font-size: var(--text-sm);
85
+ font-weight: 500;
86
+ line-height: var(--leading-snug);
87
+ }
88
+
89
+ .item-PEG_P[data-status="upcoming"] .title-TEL7i {
90
+ color: var(--color-text-muted);
91
+ }
92
+
93
+ .item-PEG_P[aria-current] .title-TEL7i {
94
+ font-weight: 600;
95
+ }
96
+
97
+ .description-Iud3V {
98
+ color: var(--color-text-muted);
99
+ font-size: var(--text-sm);
100
+ line-height: var(--leading-snug);
101
+ }
102
+
103
+ @media (width >= 40rem) {
104
+ .list-hpIu5[data-orientation="horizontal"] {
105
+ flex-direction: row;
106
+ }
107
+
108
+ .list-hpIu5[data-orientation="horizontal"] .item-PEG_P {
109
+ flex-direction: column;
110
+ flex: 1 1 0;
111
+ padding-block-end: 0;
112
+ padding-inline-end: var(--space-3);
113
+ }
114
+
115
+ .list-hpIu5[data-orientation="horizontal"] .item-PEG_P:last-child {
116
+ padding-inline-end: 0;
117
+ }
118
+
119
+ .list-hpIu5[data-orientation="horizontal"] .item-PEG_P:not(:last-child):before {
120
+ inset-block: calc(var(--step-marker-size) / 2) auto;
121
+ inset-inline: var(--step-marker-size) 0;
122
+ width: auto;
123
+ height: 1px;
124
+ }
125
+ }
126
+
@@ -0,0 +1,23 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type FieldFrameProps } from '../Field/Field.js';
3
+ export interface SwitchProps extends FieldFrameProps {
4
+ /** The text beside the track, and the switch's accessible name. */
5
+ label: string;
6
+ /** Sits under the row and joins the switch's `aria-describedby`. */
7
+ description?: ReactNode;
8
+ /**
9
+ * The validation message. It is rendered and announced; the track itself is not restyled,
10
+ * because a switch's state is binary and already visible.
11
+ */
12
+ error?: string;
13
+ /** Controlled. Pair it with `onCheckedChange`; use `defaultChecked` for an uncontrolled one. */
14
+ checked?: boolean;
15
+ defaultChecked?: boolean;
16
+ /**
17
+ * The new checked state. One argument, as on every other control in the tier: Base UI calls
18
+ * its own callback `(checked, eventDetails)` and this wrapper drops the second, which no
19
+ * consumer can read without a cast.
20
+ */
21
+ onCheckedChange?: (checked: boolean) => void;
22
+ }
23
+ export declare function Switch({ label, name, description, error, checked, defaultChecked, onCheckedChange, required, disabled, }: SwitchProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Switch } from "@base-ui/react/switch";
3
+ import { InlineField } from "../Field/Field.js";
4
+ import Switch_module from "./Switch.module.js";
5
+ function Switch_Switch({ label, name, description, error, checked, defaultChecked, onCheckedChange, required = false, disabled = false }) {
6
+ return /*#__PURE__*/ jsx(InlineField, {
7
+ label: label,
8
+ name: name,
9
+ description: description,
10
+ error: error,
11
+ required: required,
12
+ disabled: disabled,
13
+ children: /*#__PURE__*/ jsx(Switch.Root, {
14
+ className: Switch_module.track,
15
+ checked: checked,
16
+ defaultChecked: defaultChecked,
17
+ onCheckedChange: (nextChecked)=>onCheckedChange?.(nextChecked),
18
+ required: required,
19
+ children: /*#__PURE__*/ jsx(Switch.Thumb, {
20
+ className: Switch_module.thumb
21
+ })
22
+ })
23
+ });
24
+ }
25
+ export { Switch_Switch as Switch };
@@ -0,0 +1,6 @@
1
+ import "./Switch_module.css";
2
+ const Switch_module = {
3
+ track: "track-vswWH",
4
+ thumb: "thumb-aDkgm"
5
+ };
6
+ export default Switch_module;
@@ -0,0 +1,41 @@
1
+ .track-vswWH {
2
+ width: 2.5rem;
3
+ height: 1.5rem;
4
+ padding: var(--space-1);
5
+ border: 1px solid var(--color-border-strong);
6
+ border-radius: var(--radius-full);
7
+ background: var(--color-surface-3);
8
+ cursor: pointer;
9
+ transition-property: background-color, border-color;
10
+ transition-duration: var(--motion-duration-1);
11
+ transition-timing-function: var(--motion-ease);
12
+ flex: none;
13
+ align-items: center;
14
+ display: inline-flex;
15
+ }
16
+
17
+ .track-vswWH[data-checked] {
18
+ border-color: var(--color-accent);
19
+ background: var(--color-accent);
20
+ }
21
+
22
+ .track-vswWH[data-disabled] {
23
+ cursor: not-allowed;
24
+ opacity: .55;
25
+ }
26
+
27
+ .thumb-aDkgm {
28
+ border-radius: var(--radius-full);
29
+ background: var(--color-surface-raised);
30
+ width: 1rem;
31
+ height: 1rem;
32
+ box-shadow: var(--elevation-1);
33
+ transition-property: transform;
34
+ transition-duration: var(--motion-duration-1);
35
+ transition-timing-function: var(--motion-ease);
36
+ }
37
+
38
+ .thumb-aDkgm[data-checked] {
39
+ transform: translateX(.875rem);
40
+ }
41
+
@@ -0,0 +1,16 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface TextAreaProps extends Omit<ComponentPropsWithoutRef<'textarea'>, 'className' | 'style' | 'value' | 'defaultValue' | 'onChange' | 'required' | 'name' | 'disabled' | 'children'> {
3
+ value?: string;
4
+ defaultValue?: string;
5
+ /** Base UI reports the new value directly; there is no event to read `.target.value` off. */
6
+ onValueChange?: (value: string) => void;
7
+ /** The visible height in lines; with `autoResize`, the height it starts from and never shrinks under. */
8
+ rows?: number;
9
+ /**
10
+ * Grows with the content through CSS `field-sizing: content`. A browser without it keeps a
11
+ * normal textarea that the user can drag taller, so nothing is lost and no script measures.
12
+ */
13
+ autoResize?: boolean;
14
+ }
15
+ /** Goes inside `Field`, which supplies `name`, `disabled`, `required`, the label and the messages. */
16
+ export declare function TextArea({ value, defaultValue, onValueChange, rows, autoResize, ...rest }: TextAreaProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Input } from "@base-ui/react/input";
3
+ import field_module from "../../styles/field.module.js";
4
+ import { useFieldRequired } from "../Field/Field.js";
5
+ import TextArea_module from "./TextArea.module.js";
6
+ function TextArea({ value, defaultValue, onValueChange, rows = 4, autoResize = false, ...rest }) {
7
+ const required = useFieldRequired();
8
+ const rowsStyle = autoResize ? {
9
+ '--text-area-rows': rows
10
+ } : void 0;
11
+ return /*#__PURE__*/ jsx(Input, {
12
+ className: [
13
+ field_module.control,
14
+ TextArea_module.root
15
+ ].join(' '),
16
+ value: value,
17
+ defaultValue: defaultValue,
18
+ onValueChange: (nextValue)=>onValueChange?.(nextValue),
19
+ required: required,
20
+ render: /*#__PURE__*/ jsx("textarea", {
21
+ ...rest,
22
+ rows: rows,
23
+ style: rowsStyle,
24
+ "data-auto-resize": autoResize ? '' : void 0
25
+ })
26
+ });
27
+ }
28
+ export { TextArea };
@@ -0,0 +1,5 @@
1
+ import "./TextArea_module.css";
2
+ const TextArea_module = {
3
+ root: "root-rs4DH"
4
+ };
5
+ export default TextArea_module;
@@ -0,0 +1,12 @@
1
+ .root-rs4DH {
2
+ resize: vertical;
3
+ }
4
+
5
+ @supports (field-sizing: content) {
6
+ .root-rs4DH[data-auto-resize] {
7
+ field-sizing: content;
8
+ min-height: calc(var(--text-area-rows) * 1lh + 2 * var(--space-2) + 2px);
9
+ resize: none;
10
+ }
11
+ }
12
+
@@ -0,0 +1,17 @@
1
+ import type { ComponentPropsWithoutRef, ReactElement } from 'react';
2
+ export type TextInputType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'date' | 'number';
3
+ export interface TextInputProps extends Omit<ComponentPropsWithoutRef<'input'>, 'className' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'required' | 'name' | 'disabled'> {
4
+ /** Ignored when `render` is given: the caller's element brings its own. */
5
+ type?: TextInputType;
6
+ value?: string;
7
+ defaultValue?: string;
8
+ /** Base UI reports the new value directly; there is no event to read `.target.value` off. */
9
+ onValueChange?: (value: string) => void;
10
+ /**
11
+ * Render a different element in place of the `<input>`, keeping the field wiring and the
12
+ * control skin: a `<textarea rows={4} />`, an `<input type="file" />`, a masked input. This
13
+ * is the tier's escape hatch for a control the library does not ship.
14
+ */
15
+ render?: ReactElement;
16
+ }
17
+ export declare function TextInput({ type, value, defaultValue, onValueChange, render, ...rest }: TextInputProps): import("react").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Input } from "@base-ui/react/input";
3
+ import { useFieldRequired } from "../Field/Field.js";
4
+ import field_module from "../../styles/field.module.js";
5
+ function TextInput({ type = 'text', value, defaultValue, onValueChange, render, ...rest }) {
6
+ const required = useFieldRequired();
7
+ return /*#__PURE__*/ jsx(Input, {
8
+ ...rest,
9
+ className: field_module.control,
10
+ type: void 0 === render ? type : void 0,
11
+ value: value,
12
+ defaultValue: defaultValue,
13
+ onValueChange: onValueChange,
14
+ required: required,
15
+ render: render
16
+ });
17
+ }
18
+ export { TextInput };
@@ -0,0 +1,19 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export interface TimePickerProps extends Omit<ComponentPropsWithoutRef<'input'>, 'className' | 'style' | 'type' | 'value' | 'defaultValue' | 'onChange' | 'required' | 'name' | 'disabled' | 'min' | 'max' | 'step' | 'children'> {
3
+ /** `HH:mm`, or `''` for no time. A string the browser cannot read as a time shows as empty. */
4
+ value?: string;
5
+ defaultValue?: string;
6
+ /** `HH:mm`, or `''` once cleared. A `step` under 60 adds seconds: `HH:mm:ss`. */
7
+ onValueChange?: (value: string) => void;
8
+ /** The earliest time, `HH:mm`. A later one is `rangeUnderflow` to the browser and to `Form`. */
9
+ min?: string;
10
+ /** The latest time, `HH:mm`. */
11
+ max?: string;
12
+ /** The granularity in seconds, as the native attribute has it: 900 is every quarter hour. */
13
+ step?: number;
14
+ }
15
+ /**
16
+ * Goes inside `Field`. The native control is the choice here: it handles locale, 12 or 24-hour
17
+ * entry, the keyboard and mobile wheels, and none of that is worth rebuilding.
18
+ */
19
+ export declare function TimePicker({ value, defaultValue, onValueChange, ...rest }: TimePickerProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Input } from "@base-ui/react/input";
3
+ import field_module from "../../styles/field.module.js";
4
+ import { useFieldRequired } from "../Field/Field.js";
5
+ function TimePicker({ value, defaultValue, onValueChange, ...rest }) {
6
+ const required = useFieldRequired();
7
+ return /*#__PURE__*/ jsx(Input, {
8
+ ...rest,
9
+ className: field_module.control,
10
+ type: "time",
11
+ value: value,
12
+ defaultValue: defaultValue,
13
+ onValueChange: (nextValue)=>onValueChange?.(nextValue),
14
+ required: required
15
+ });
16
+ }
17
+ export { TimePicker };
@@ -0,0 +1,39 @@
1
+ import type { ReactNode } from 'react';
2
+ export type TimelineTone = 'neutral' | 'accent' | 'success' | 'danger';
3
+ export interface TimelineItem {
4
+ /** Identifies the entry across renders. */
5
+ id: string;
6
+ title: ReactNode;
7
+ /**
8
+ * ISO 8601: `YYYY`, `YYYY-MM`, `YYYY-MM-DD`, or a date and time such as `2026-03-08T09:30:00Z`.
9
+ * Without a time it is a place on the calendar and shifts in no time zone; a time is shown in the
10
+ * viewer's zone. The source string stays in `<time datetime>`, with any offset written in full as
11
+ * `+05:00`, which HTML and `Date` can both read. Anything else is shown as written, without a
12
+ * `<time>`.
13
+ */
14
+ timestamp?: string;
15
+ description?: ReactNode;
16
+ /** Stated in text as well as colour. Left out, the entry looks neutral and says nothing of it. */
17
+ tone?: TimelineTone;
18
+ }
19
+ export interface TimelineProps {
20
+ /** Drawn in the order given, which is the app's to decide. */
21
+ items: TimelineItem[];
22
+ /**
23
+ * A BCP 47 tag for the dates, always on the Gregorian calendar. Left out, the browser's own; a tag
24
+ * it cannot read counts as left out. That default can differ between a server's render and the
25
+ * browser's, which passing `locale` avoids. A time also differs by the viewer's time zone, which
26
+ * `locale` does not cover: leave timestamps with a time out of a server's render.
27
+ */
28
+ locale?: string;
29
+ /** Names the list. */
30
+ 'aria-label'?: string;
31
+ /** The words each tone is stated in, for an app that is not in English. */
32
+ toneLabels?: Partial<Record<TimelineTone, string>>;
33
+ }
34
+ /**
35
+ * A chronological record. A display only: nothing here can be focused or activated. A tone is said
36
+ * in visible words beside the time, because forced colours flatten every tint here to the same
37
+ * thing, and the words are what still tells a failure from a success.
38
+ */
39
+ export declare function Timeline({ items, locale, 'aria-label': ariaLabel, toneLabels }: TimelineProps): import("react").JSX.Element | null;