@sybilion/uilib 1.4.21 → 1.4.22

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 (65) hide show
  1. package/assets/globals.css +3 -0
  2. package/dist/agent-glossary/workspace.generated.ts +2 -0
  3. package/dist/agent-glossary/workspace.index.md +2 -0
  4. package/dist/agent-glossary/workspace.md +2 -0
  5. package/dist/esm/components/ui/Checkbox/Checkbox.js +2 -2
  6. package/dist/esm/components/ui/Checkbox/Checkbox.styl.js +2 -2
  7. package/dist/esm/components/ui/DatePicker/Calendar.js +72 -0
  8. package/dist/esm/components/ui/DatePicker/DatePicker.js +81 -0
  9. package/dist/esm/components/ui/DatePicker/DatePicker.styl.js +7 -0
  10. package/dist/esm/components/ui/DatePicker/DatePickerInput.js +70 -0
  11. package/dist/esm/components/ui/DatePicker/DateRangePickerInput.js +130 -0
  12. package/dist/esm/components/ui/DatePicker/dateUtils.js +137 -0
  13. package/dist/esm/components/ui/RadioGroup/RadioGroup.helpers.js +6 -0
  14. package/dist/esm/components/ui/RadioGroup/RadioGroup.js +18 -0
  15. package/dist/esm/components/ui/RadioGroup/RadioGroup.styl.js +7 -0
  16. package/dist/esm/index.js +5 -0
  17. package/dist/esm/types/src/components/ui/Checkbox/Checkbox.d.ts +1 -1
  18. package/dist/esm/types/src/components/ui/Checkbox/Checkbox.types.d.ts +2 -0
  19. package/dist/esm/types/src/components/ui/Checkbox/index.d.ts +1 -1
  20. package/dist/esm/types/src/components/ui/DatePicker/Calendar.d.ts +2 -0
  21. package/dist/esm/types/src/components/ui/DatePicker/DatePicker.d.ts +2 -0
  22. package/dist/esm/types/src/components/ui/DatePicker/DatePicker.types.d.ts +60 -0
  23. package/dist/esm/types/src/components/ui/DatePicker/DatePickerInput.d.ts +2 -0
  24. package/dist/esm/types/src/components/ui/DatePicker/DateRangePickerInput.d.ts +2 -0
  25. package/dist/esm/types/src/components/ui/DatePicker/dateUtils.d.ts +30 -0
  26. package/dist/esm/types/src/components/ui/DatePicker/index.d.ts +6 -0
  27. package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.d.ts +4 -0
  28. package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.example.d.ts +1 -0
  29. package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.helpers.d.ts +3 -0
  30. package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.types.d.ts +11 -0
  31. package/dist/esm/types/src/components/ui/RadioGroup/index.d.ts +2 -0
  32. package/dist/esm/types/src/docs/pages/DatePickerPage.d.ts +1 -0
  33. package/dist/esm/types/src/docs/pages/RadioGroupPage.d.ts +1 -0
  34. package/dist/esm/types/src/index.d.ts +2 -0
  35. package/package.json +2 -1
  36. package/src/components/ui/Checkbox/AGENT.md +1 -0
  37. package/src/components/ui/Checkbox/Checkbox.styl +26 -2
  38. package/src/components/ui/Checkbox/Checkbox.styl.d.ts +4 -0
  39. package/src/components/ui/Checkbox/Checkbox.tsx +3 -3
  40. package/src/components/ui/Checkbox/Checkbox.types.ts +5 -1
  41. package/src/components/ui/Checkbox/index.ts +1 -1
  42. package/src/components/ui/DatePicker/AGENT.md +45 -0
  43. package/src/components/ui/DatePicker/Calendar.tsx +160 -0
  44. package/src/components/ui/DatePicker/DatePicker.styl +219 -0
  45. package/src/components/ui/DatePicker/DatePicker.styl.d.ts +39 -0
  46. package/src/components/ui/DatePicker/DatePicker.tsx +160 -0
  47. package/src/components/ui/DatePicker/DatePicker.types.ts +91 -0
  48. package/src/components/ui/DatePicker/DatePickerInput.tsx +169 -0
  49. package/src/components/ui/DatePicker/DateRangePickerInput.tsx +276 -0
  50. package/src/components/ui/DatePicker/dateUtils.ts +199 -0
  51. package/src/components/ui/DatePicker/index.ts +13 -0
  52. package/src/components/ui/RadioGroup/AGENT.md +24 -0
  53. package/src/components/ui/RadioGroup/RadioGroup.example.tsx +136 -0
  54. package/src/components/ui/RadioGroup/RadioGroup.helpers.ts +11 -0
  55. package/src/components/ui/RadioGroup/RadioGroup.styl +70 -0
  56. package/src/components/ui/RadioGroup/RadioGroup.styl.d.ts +13 -0
  57. package/src/components/ui/RadioGroup/RadioGroup.tsx +58 -0
  58. package/src/components/ui/RadioGroup/RadioGroup.types.ts +19 -0
  59. package/src/components/ui/RadioGroup/index.ts +6 -0
  60. package/src/docs/pages/CheckboxPage.tsx +129 -18
  61. package/src/docs/pages/DatePickerPage.tsx +183 -0
  62. package/src/docs/pages/FormsOverviewPage.tsx +131 -0
  63. package/src/docs/pages/RadioGroupPage.tsx +21 -0
  64. package/src/docs/registry.ts +12 -0
  65. package/src/index.ts +2 -0
@@ -0,0 +1,70 @@
1
+ .groupRoot
2
+ display grid
3
+ gap var(--p-2)
4
+
5
+ &[data-orientation=horizontal]
6
+ display flex
7
+ flex-direction row
8
+ flex-wrap wrap
9
+ gap var(--p-4)
10
+
11
+ .radioRoot
12
+ cursor pointer
13
+ display flex
14
+ align-items center
15
+ justify-content center
16
+ flex-shrink 0
17
+
18
+ border-radius 50%
19
+ border 1px solid var(--input)
20
+ background transparent
21
+ box-shadow 0 1px 2px 0 rgba(0, 0, 0, 0.05)
22
+ outline none
23
+ transition box-shadow 0.15s ease-in-out
24
+
25
+ .dark &
26
+ background-color var(--input-30)
27
+
28
+ &[data-state=checked]
29
+ border-color var(--primary)
30
+ color var(--primary)
31
+ .dark &
32
+ border-color var(--primary)
33
+
34
+ &:focus-visible
35
+ border-color var(--ring)
36
+ box-shadow 0 0 0 3px var(--ring-50)
37
+
38
+ &[aria-invalid=true]
39
+ box-shadow 0 0 0 3px var(--destructive-200)
40
+ border-color var(--destructive)
41
+ .dark &
42
+ box-shadow 0 0 0 3px var(--destructive-400)
43
+
44
+ &:disabled
45
+ cursor not-allowed
46
+ opacity 0.5
47
+
48
+ .radioIndicator
49
+ width calc(100% - var(--dot-gap))
50
+ height calc(100% - var(--dot-gap))
51
+ border-radius 50%
52
+ background-color currentColor
53
+
54
+ color currentColor
55
+ transition none
56
+
57
+ .size-sm
58
+ --dot-gap 3px
59
+ width var(--icon-size-sm)
60
+ height var(--icon-size-sm)
61
+
62
+ .size-md
63
+ --dot-gap 4px
64
+ width var(--icon-size-md)
65
+ height var(--icon-size-md)
66
+
67
+ .size-lg
68
+ --dot-gap 5px
69
+ width var(--icon-size-lg)
70
+ height var(--icon-size-lg)
@@ -0,0 +1,13 @@
1
+ // This file is automatically generated.
2
+ // Please do not change this file!
3
+ interface CssExports {
4
+ 'dark': string;
5
+ 'groupRoot': string;
6
+ 'radioIndicator': string;
7
+ 'radioRoot': string;
8
+ 'size-lg': string;
9
+ 'size-md': string;
10
+ 'size-sm': string;
11
+ }
12
+ export const cssExports: CssExports;
13
+ export default cssExports;
@@ -0,0 +1,58 @@
1
+ import cn from 'classnames';
2
+ import { createContext, useContext } from 'react';
3
+
4
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
+
6
+ import {
7
+ getDefaultRadioGroupContextValues,
8
+ getRadioGroupContextValues,
9
+ } from './RadioGroup.helpers';
10
+ import S from './RadioGroup.styl';
11
+ import type {
12
+ RadioGroupContextValue,
13
+ RadioGroupItemProps,
14
+ RadioGroupProps,
15
+ } from './RadioGroup.types';
16
+
17
+ const RadioGroupContext = createContext<RadioGroupContextValue>(
18
+ getDefaultRadioGroupContextValues(),
19
+ );
20
+
21
+ function RadioGroup({
22
+ className,
23
+ size = 'md',
24
+ children,
25
+ ...props
26
+ }: RadioGroupProps) {
27
+ return (
28
+ <RadioGroupContext.Provider value={{ size }}>
29
+ <RadioGroupPrimitive.Root
30
+ data-slot="radio-group"
31
+ className={cn(S.groupRoot, className)}
32
+ {...props}
33
+ >
34
+ {children}
35
+ </RadioGroupPrimitive.Root>
36
+ </RadioGroupContext.Provider>
37
+ );
38
+ }
39
+
40
+ function RadioGroupItem({ className, size, ...props }: RadioGroupItemProps) {
41
+ const context = useContext(RadioGroupContext);
42
+ const resolvedSize = getRadioGroupContextValues(context, size);
43
+
44
+ return (
45
+ <RadioGroupPrimitive.Item
46
+ data-slot="radio-group-item"
47
+ className={cn(S.radioRoot, S[`size-${resolvedSize}`], className)}
48
+ {...props}
49
+ >
50
+ <RadioGroupPrimitive.Indicator
51
+ data-slot="radio-group-indicator"
52
+ className={S.radioIndicator}
53
+ />
54
+ </RadioGroupPrimitive.Item>
55
+ );
56
+ }
57
+
58
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,19 @@
1
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
2
+
3
+ export type RadioGroupSize = 'sm' | 'md' | 'lg';
4
+
5
+ export interface RadioGroupContextValue {
6
+ size?: RadioGroupSize;
7
+ }
8
+
9
+ export interface RadioGroupProps extends React.ComponentProps<
10
+ typeof RadioGroupPrimitive.Root
11
+ > {
12
+ size?: RadioGroupSize;
13
+ }
14
+
15
+ export interface RadioGroupItemProps extends React.ComponentProps<
16
+ typeof RadioGroupPrimitive.Item
17
+ > {
18
+ size?: RadioGroupSize;
19
+ }
@@ -0,0 +1,6 @@
1
+ export { RadioGroup, RadioGroupItem } from './RadioGroup';
2
+ export type {
3
+ RadioGroupItemProps,
4
+ RadioGroupProps,
5
+ RadioGroupSize,
6
+ } from './RadioGroup.types';
@@ -7,38 +7,149 @@ import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
7
7
  import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
8
8
  import { DocsHeaderActions } from '../docsHeaderActions';
9
9
 
10
+ const SIZES = ['sm', 'md', 'lg'] as const;
11
+
12
+ const STATES = [
13
+ { label: 'unchecked', checked: false },
14
+ { label: 'checked', checked: true },
15
+ ] as const;
16
+
10
17
  export default function CheckboxPage() {
11
18
  return (
12
19
  <>
13
20
  <AppPageHeader
14
21
  breadcrumbs={[{ label: 'Checkbox' }]}
15
22
  title="Checkbox"
16
- subheader="Binary control for selecting an option."
23
+ subheader="Sizes, checked/unchecked states, and disabled state."
17
24
  actions={<DocsHeaderActions />}
18
25
  />
19
26
  <DocsGuidance source={CheckboxGuidance} />
20
27
  <PageContentSection
21
28
  style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
22
29
  >
23
- <div
24
- style={{
25
- display: 'flex',
26
- flexDirection: 'column',
27
- gap: 'var(--p-2)',
28
- padding: 'var(--p-2)',
29
- background: 'var(--background)',
30
- borderRadius: 'var(--radius-3)',
31
- }}
32
- >
33
- <div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
34
- <Checkbox id="cb-default" />
35
- <Label htmlFor="cb-default">Option</Label>
30
+ <section>
31
+ <h3 style={{ marginBottom: '1rem' }}>States × sizes</h3>
32
+ <div style={{ overflowX: 'auto' }}>
33
+ <table style={{ borderCollapse: 'collapse', width: '100%' }}>
34
+ <thead>
35
+ <tr>
36
+ <th style={{ textAlign: 'left', padding: '0.5rem' }} />
37
+ {SIZES.map(s => (
38
+ <th key={s} style={{ padding: '0.5rem' }}>
39
+ {s}
40
+ </th>
41
+ ))}
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ {STATES.map(st => (
46
+ <tr key={st.label}>
47
+ <td
48
+ style={{
49
+ padding: '0.5rem',
50
+ fontWeight: 600,
51
+ whiteSpace: 'nowrap',
52
+ }}
53
+ >
54
+ {st.label}
55
+ </td>
56
+ {SIZES.map(s => (
57
+ <td key={s} style={{ padding: '0.5rem' }}>
58
+ <Checkbox
59
+ id={`cb-${st.label}-${s}`}
60
+ size={s}
61
+ checked={st.checked}
62
+ aria-label={`${st.label} ${s}`}
63
+ />
64
+ </td>
65
+ ))}
66
+ </tr>
67
+ ))}
68
+ </tbody>
69
+ </table>
70
+ </div>
71
+ </section>
72
+ <section>
73
+ <h3 style={{ marginBottom: '1rem' }}>With label</h3>
74
+ <div
75
+ style={{
76
+ display: 'flex',
77
+ flexWrap: 'wrap',
78
+ gap: '1.5rem',
79
+ alignItems: 'center',
80
+ }}
81
+ >
82
+ {SIZES.map(s => (
83
+ <div
84
+ key={s}
85
+ style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}
86
+ >
87
+ <Checkbox id={`cb-label-${s}`} size={s} defaultChecked />
88
+ <Label htmlFor={`cb-label-${s}`}>{s}</Label>
89
+ </div>
90
+ ))}
36
91
  </div>
37
- <div style={{ display: 'flex', alignItems: 'center', gap: '0.5rem' }}>
38
- <Checkbox id="cb-disabled" disabled />
39
- <Label htmlFor="cb-disabled">Option</Label>
92
+ </section>
93
+ <section>
94
+ <h3 style={{ marginBottom: '1rem' }}>Disabled</h3>
95
+ <div style={{ overflowX: 'auto' }}>
96
+ <table style={{ borderCollapse: 'collapse', width: '100%' }}>
97
+ <thead>
98
+ <tr>
99
+ <th style={{ textAlign: 'left', padding: '0.5rem' }} />
100
+ {SIZES.map(s => (
101
+ <th key={s} style={{ padding: '0.5rem' }}>
102
+ {s}
103
+ </th>
104
+ ))}
105
+ </tr>
106
+ </thead>
107
+ <tbody>
108
+ <tr>
109
+ <td
110
+ style={{
111
+ padding: '0.5rem',
112
+ fontWeight: 600,
113
+ whiteSpace: 'nowrap',
114
+ }}
115
+ >
116
+ unchecked
117
+ </td>
118
+ {SIZES.map(s => (
119
+ <td key={s} style={{ padding: '0.5rem' }}>
120
+ <Checkbox
121
+ size={s}
122
+ disabled
123
+ aria-label={`Disabled unchecked ${s}`}
124
+ />
125
+ </td>
126
+ ))}
127
+ </tr>
128
+ <tr>
129
+ <td
130
+ style={{
131
+ padding: '0.5rem',
132
+ fontWeight: 600,
133
+ whiteSpace: 'nowrap',
134
+ }}
135
+ >
136
+ checked
137
+ </td>
138
+ {SIZES.map(s => (
139
+ <td key={s} style={{ padding: '0.5rem' }}>
140
+ <Checkbox
141
+ size={s}
142
+ checked
143
+ disabled
144
+ aria-label={`Disabled checked ${s}`}
145
+ />
146
+ </td>
147
+ ))}
148
+ </tr>
149
+ </tbody>
150
+ </table>
40
151
  </div>
41
- </div>
152
+ </section>
42
153
  </PageContentSection>
43
154
  </>
44
155
  );
@@ -0,0 +1,183 @@
1
+ import { useState } from 'react';
2
+
3
+ import {
4
+ DatePickerInput,
5
+ DateRangePickerInput,
6
+ } from '#uilib/components/ui/DatePicker';
7
+ import type { DateRangeValue } from '#uilib/components/ui/DatePicker';
8
+ import datePickerGuidance from '#uilib/components/ui/DatePicker/AGENT.md';
9
+ import { Label } from '#uilib/components/ui/Label';
10
+ import { PageContentSection } from '#uilib/components/ui/Page';
11
+
12
+ import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
13
+ import { DocsGuidance } from '../components/DocsGuidance/DocsGuidance';
14
+ import { DocsHeaderActions } from '../docsHeaderActions';
15
+
16
+ const SIZES = ['sm', 'md', 'lg'] as const;
17
+ const FIELD_WIDTH = 240;
18
+ const RANGE_FIELD_WIDTH = 360;
19
+
20
+ export default function DatePickerPage() {
21
+ const [value, setValue] = useState('2026-07-03');
22
+ const [emptyValue, setEmptyValue] = useState<string | undefined>();
23
+ const [rangeValue, setRangeValue] = useState<DateRangeValue | null>({
24
+ start: '2026-07-01',
25
+ end: '2026-07-15',
26
+ });
27
+ const [emptyRange, setEmptyRange] = useState<DateRangeValue | null>(null);
28
+
29
+ return (
30
+ <>
31
+ <AppPageHeader
32
+ breadcrumbs={[{ label: 'DatePicker' }]}
33
+ title="DatePicker"
34
+ subheader="Single-date and range inputs with calendar popup, sizes, and constraints."
35
+ actions={<DocsHeaderActions />}
36
+ />
37
+ <DocsGuidance source={datePickerGuidance} />
38
+ <PageContentSection
39
+ style={{ display: 'flex', flexDirection: 'column', gap: '2rem' }}
40
+ >
41
+ <section>
42
+ <h3 style={{ marginBottom: '1rem' }}>Sizes</h3>
43
+ <div
44
+ style={{
45
+ display: 'flex',
46
+ flexWrap: 'wrap',
47
+ gap: '1rem',
48
+ alignItems: 'flex-end',
49
+ }}
50
+ >
51
+ {SIZES.map(size => (
52
+ <div key={size}>
53
+ <Label htmlFor={`date-picker-${size}`}>{size}</Label>
54
+ <DatePickerInput
55
+ id={`date-picker-${size}`}
56
+ size={size}
57
+ value={value}
58
+ onChange={next => setValue(next ?? '')}
59
+ style={{ width: FIELD_WIDTH }}
60
+ />
61
+ </div>
62
+ ))}
63
+ </div>
64
+ </section>
65
+
66
+ <section>
67
+ <h3 style={{ marginBottom: '1rem' }}>Placeholder</h3>
68
+ <DatePickerInput
69
+ value={emptyValue}
70
+ onChange={setEmptyValue}
71
+ placeholder="Select a date"
72
+ style={{ width: FIELD_WIDTH }}
73
+ />
74
+ </section>
75
+
76
+ <section>
77
+ <h3 style={{ marginBottom: '1rem' }}>Min / max dates</h3>
78
+ <p
79
+ style={{
80
+ marginBottom: '0.75rem',
81
+ color: 'var(--muted-foreground)',
82
+ }}
83
+ >
84
+ Only dates between 2026-07-01 and 2026-07-31 are selectable.
85
+ </p>
86
+ <DatePickerInput
87
+ value={value}
88
+ onChange={next => setValue(next ?? '')}
89
+ minDate="2026-07-01"
90
+ maxDate="2026-07-31"
91
+ style={{ width: FIELD_WIDTH }}
92
+ />
93
+ </section>
94
+
95
+ <section>
96
+ <h3 style={{ marginBottom: '1rem' }}>Week starts Monday</h3>
97
+ <DatePickerInput
98
+ value={value}
99
+ onChange={next => setValue(next ?? '')}
100
+ calendarProps={{ startOfWeek: 1 }}
101
+ style={{ width: FIELD_WIDTH }}
102
+ />
103
+ </section>
104
+
105
+ <section>
106
+ <h3 style={{ marginBottom: '1rem' }}>Date range</h3>
107
+ <p
108
+ style={{
109
+ marginBottom: '0.75rem',
110
+ color: 'var(--muted-foreground)',
111
+ }}
112
+ >
113
+ Click a start date, then an end date. The active field is outlined
114
+ while you pick; hover previews the interval before the second click.
115
+ </p>
116
+ <div
117
+ style={{
118
+ display: 'flex',
119
+ flexWrap: 'wrap',
120
+ gap: '1rem',
121
+ alignItems: 'flex-end',
122
+ }}
123
+ >
124
+ <div>
125
+ <Label htmlFor="date-range-default">Default range</Label>
126
+ <DateRangePickerInput
127
+ id="date-range-default"
128
+ value={rangeValue}
129
+ onChange={setRangeValue}
130
+ style={{ width: RANGE_FIELD_WIDTH }}
131
+ />
132
+ </div>
133
+ <div>
134
+ <Label htmlFor="date-range-empty">Empty range</Label>
135
+ <DateRangePickerInput
136
+ id="date-range-empty"
137
+ value={emptyRange}
138
+ onChange={setEmptyRange}
139
+ startPlaceholder="From"
140
+ endPlaceholder="To"
141
+ style={{ width: RANGE_FIELD_WIDTH }}
142
+ />
143
+ </div>
144
+ </div>
145
+ </section>
146
+
147
+ <section>
148
+ <h3 style={{ marginBottom: '1rem' }}>Range sizes</h3>
149
+ <div
150
+ style={{
151
+ display: 'flex',
152
+ flexWrap: 'wrap',
153
+ gap: '1rem',
154
+ alignItems: 'flex-end',
155
+ }}
156
+ >
157
+ {SIZES.map(size => (
158
+ <div key={size}>
159
+ <Label htmlFor={`date-range-${size}`}>{size}</Label>
160
+ <DateRangePickerInput
161
+ id={`date-range-${size}`}
162
+ size={size}
163
+ value={rangeValue}
164
+ onChange={setRangeValue}
165
+ style={{ width: RANGE_FIELD_WIDTH }}
166
+ />
167
+ </div>
168
+ ))}
169
+ </div>
170
+ </section>
171
+
172
+ <section>
173
+ <h3 style={{ marginBottom: '1rem' }}>Disabled</h3>
174
+ <DatePickerInput
175
+ value="2026-07-03"
176
+ disabled
177
+ style={{ width: FIELD_WIDTH }}
178
+ />
179
+ </section>
180
+ </PageContentSection>
181
+ </>
182
+ );
183
+ }
@@ -3,6 +3,11 @@ import { useState } from 'react';
3
3
  import { Button } from '#uilib/components/ui/Button';
4
4
  import { ButtonGroup } from '#uilib/components/ui/ButtonGroup';
5
5
  import { Checkbox } from '#uilib/components/ui/Checkbox';
6
+ import {
7
+ DatePickerInput,
8
+ DateRangePickerInput,
9
+ } from '#uilib/components/ui/DatePicker';
10
+ import type { DateRangeValue } from '#uilib/components/ui/DatePicker';
6
11
  import { DropZone } from '#uilib/components/ui/DropZone/DropZone';
7
12
  import { Input } from '#uilib/components/ui/Input';
8
13
  import { Label } from '#uilib/components/ui/Label';
@@ -11,6 +16,7 @@ import { LabeledInput } from '#uilib/components/ui/LabeledInput/LabeledInput';
11
16
  import { MobileAdaptiveSelector } from '#uilib/components/ui/MobileAdaptiveSelector';
12
17
  import { NumberControl } from '#uilib/components/ui/NumberControl';
13
18
  import { PageContentSection } from '#uilib/components/ui/Page';
19
+ import { RadioGroup, RadioGroupItem } from '#uilib/components/ui/RadioGroup';
14
20
  import { RegionSelector } from '#uilib/components/ui/RegionCoords';
15
21
  import { Renamer } from '#uilib/components/ui/Renamer';
16
22
  import {
@@ -113,11 +119,17 @@ export default function FormsOverviewPage() {
113
119
  const [composedRole, setComposedRole] = useState('editor');
114
120
  const [composedNotifications, setComposedNotifications] = useState(true);
115
121
  const [composedTerms, setComposedTerms] = useState(false);
122
+ const [billingPlan, setBillingPlan] = useState('pro');
116
123
  const [dropZoneName, setDropZoneName] = useState<string | null>(null);
117
124
  const [mobileSelectorValue, setMobileSelectorValue] = useState('a');
118
125
  const [regionPick, setRegionPick] = useState<string | null>(null);
119
126
  const [renamerValue, setRenamerValue] = useState('Dataset name');
120
127
  const [timeRange, setTimeRange] = useState('1y');
128
+ const [dateValue, setDateValue] = useState('2026-07-03');
129
+ const [dateRangeValue, setDateRangeValue] = useState<DateRangeValue | null>({
130
+ start: '2026-07-01',
131
+ end: '2026-07-31',
132
+ });
121
133
 
122
134
  return (
123
135
  <>
@@ -240,6 +252,93 @@ export default function FormsOverviewPage() {
240
252
  </div>
241
253
  </section>
242
254
 
255
+ <section>
256
+ <h3 style={{ marginBottom: '1rem' }}>RadioGroup</h3>
257
+ <div style={twoColumnStyle}>
258
+ <div style={panelStyle}>
259
+ <p style={stateLabelStyle}>Default</p>
260
+ <RadioGroup
261
+ value={billingPlan}
262
+ onValueChange={setBillingPlan}
263
+ aria-label="Billing plan"
264
+ >
265
+ <div
266
+ style={{
267
+ display: 'flex',
268
+ alignItems: 'center',
269
+ gap: '0.5rem',
270
+ }}
271
+ >
272
+ <RadioGroupItem value="starter" id="forms-rg-starter" />
273
+ <Label htmlFor="forms-rg-starter">Starter</Label>
274
+ </div>
275
+ <div
276
+ style={{
277
+ display: 'flex',
278
+ alignItems: 'center',
279
+ gap: '0.5rem',
280
+ }}
281
+ >
282
+ <RadioGroupItem value="pro" id="forms-rg-pro" />
283
+ <Label htmlFor="forms-rg-pro">Pro</Label>
284
+ </div>
285
+ <div
286
+ style={{
287
+ display: 'flex',
288
+ alignItems: 'center',
289
+ gap: '0.5rem',
290
+ }}
291
+ >
292
+ <RadioGroupItem value="enterprise" id="forms-rg-enterprise" />
293
+ <Label htmlFor="forms-rg-enterprise">Enterprise</Label>
294
+ </div>
295
+ </RadioGroup>
296
+ </div>
297
+ <div style={panelStyle}>
298
+ <p style={stateLabelStyle}>Disabled</p>
299
+ <RadioGroup
300
+ defaultValue="starter"
301
+ disabled
302
+ aria-label="Disabled plan"
303
+ >
304
+ <div
305
+ style={{
306
+ display: 'flex',
307
+ alignItems: 'center',
308
+ gap: '0.5rem',
309
+ }}
310
+ >
311
+ <RadioGroupItem value="starter" id="forms-rg-dis-starter" />
312
+ <Label htmlFor="forms-rg-dis-starter">Starter</Label>
313
+ </div>
314
+ <div
315
+ style={{
316
+ display: 'flex',
317
+ alignItems: 'center',
318
+ gap: '0.5rem',
319
+ }}
320
+ >
321
+ <RadioGroupItem value="pro" id="forms-rg-dis-pro" />
322
+ <Label htmlFor="forms-rg-dis-pro">Pro</Label>
323
+ </div>
324
+ <div
325
+ style={{
326
+ display: 'flex',
327
+ alignItems: 'center',
328
+ gap: '0.5rem',
329
+ }}
330
+ >
331
+ <RadioGroupItem
332
+ value="enterprise"
333
+ id="forms-rg-dis-enterprise"
334
+ />
335
+ <Label htmlFor="forms-rg-dis-enterprise">Enterprise</Label>
336
+ </div>
337
+ </RadioGroup>
338
+ </div>
339
+ </div>
340
+ </section>
341
+
243
342
  <section>
244
343
  <h3 style={{ marginBottom: '1rem' }}>Switch</h3>
245
344
  <div style={twoColumnStyle}>
@@ -285,6 +384,38 @@ export default function FormsOverviewPage() {
285
384
  </div>
286
385
  </section>
287
386
 
387
+ <section>
388
+ <h3 style={{ marginBottom: '1rem' }}>DatePicker</h3>
389
+ <div style={twoColumnStyle}>
390
+ <div style={panelStyle}>
391
+ <p style={stateLabelStyle}>Single date</p>
392
+ <DatePickerInput
393
+ value={dateValue}
394
+ onChange={next => setDateValue(next ?? '')}
395
+ style={{ width: FIELD_WIDTH }}
396
+ />
397
+ </div>
398
+ <div style={panelStyle}>
399
+ <p style={stateLabelStyle}>Date range</p>
400
+ <DateRangePickerInput
401
+ value={dateRangeValue}
402
+ onChange={setDateRangeValue}
403
+ style={{ width: FIELD_WIDTH + 80 }}
404
+ />
405
+ </div>
406
+ </div>
407
+ <div
408
+ style={{ ...panelStyle, marginTop: '1rem', maxWidth: FIELD_WIDTH }}
409
+ >
410
+ <p style={stateLabelStyle}>Disabled</p>
411
+ <DatePickerInput
412
+ value="2026-07-03"
413
+ disabled
414
+ style={{ width: FIELD_WIDTH }}
415
+ />
416
+ </div>
417
+ </section>
418
+
288
419
  <section>
289
420
  <h3 style={{ marginBottom: '1rem' }}>Slider</h3>
290
421
  <div style={twoColumnStyle}>