@sybilion/uilib 1.4.20 → 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.
- package/assets/globals.css +3 -0
- package/dist/agent-glossary/workspace.generated.ts +2 -0
- package/dist/agent-glossary/workspace.index.md +2 -0
- package/dist/agent-glossary/workspace.md +2 -0
- package/dist/esm/components/ui/Checkbox/Checkbox.js +2 -2
- package/dist/esm/components/ui/Checkbox/Checkbox.styl.js +2 -2
- package/dist/esm/components/ui/DatePicker/Calendar.js +72 -0
- package/dist/esm/components/ui/DatePicker/DatePicker.js +81 -0
- package/dist/esm/components/ui/DatePicker/DatePicker.styl.js +7 -0
- package/dist/esm/components/ui/DatePicker/DatePickerInput.js +70 -0
- package/dist/esm/components/ui/DatePicker/DateRangePickerInput.js +130 -0
- package/dist/esm/components/ui/DatePicker/dateUtils.js +137 -0
- package/dist/esm/components/ui/RadioGroup/RadioGroup.helpers.js +6 -0
- package/dist/esm/components/ui/RadioGroup/RadioGroup.js +18 -0
- package/dist/esm/components/ui/RadioGroup/RadioGroup.styl.js +7 -0
- package/dist/esm/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl.js +1 -1
- package/dist/esm/components/ui/TextShimmer/TextShimmer.js +1 -1
- package/dist/esm/components/ui/TextShimmer/TextShimmer.styl.js +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.d.ts +1 -1
- package/dist/esm/types/src/components/ui/Checkbox/Checkbox.types.d.ts +2 -0
- package/dist/esm/types/src/components/ui/Checkbox/index.d.ts +1 -1
- package/dist/esm/types/src/components/ui/DatePicker/Calendar.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DatePicker/DatePicker.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DatePicker/DatePicker.types.d.ts +60 -0
- package/dist/esm/types/src/components/ui/DatePicker/DatePickerInput.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DatePicker/DateRangePickerInput.d.ts +2 -0
- package/dist/esm/types/src/components/ui/DatePicker/dateUtils.d.ts +30 -0
- package/dist/esm/types/src/components/ui/DatePicker/index.d.ts +6 -0
- package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.d.ts +4 -0
- package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.example.d.ts +1 -0
- package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.helpers.d.ts +3 -0
- package/dist/esm/types/src/components/ui/RadioGroup/RadioGroup.types.d.ts +11 -0
- package/dist/esm/types/src/components/ui/RadioGroup/index.d.ts +2 -0
- package/dist/esm/types/src/docs/pages/DataDisplayOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/DatePickerPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FeedbackOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/FormsOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/LayoutOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/NavigationOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/OverlaysOverviewPage.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/RadioGroupPage.d.ts +1 -0
- package/dist/esm/types/src/index.d.ts +2 -0
- package/package.json +2 -1
- package/src/components/ui/Checkbox/AGENT.md +1 -0
- package/src/components/ui/Checkbox/Checkbox.styl +26 -2
- package/src/components/ui/Checkbox/Checkbox.styl.d.ts +4 -0
- package/src/components/ui/Checkbox/Checkbox.tsx +3 -3
- package/src/components/ui/Checkbox/Checkbox.types.ts +5 -1
- package/src/components/ui/Checkbox/index.ts +1 -1
- package/src/components/ui/DatePicker/AGENT.md +45 -0
- package/src/components/ui/DatePicker/Calendar.tsx +160 -0
- package/src/components/ui/DatePicker/DatePicker.styl +219 -0
- package/src/components/ui/DatePicker/DatePicker.styl.d.ts +39 -0
- package/src/components/ui/DatePicker/DatePicker.tsx +160 -0
- package/src/components/ui/DatePicker/DatePicker.types.ts +91 -0
- package/src/components/ui/DatePicker/DatePickerInput.tsx +169 -0
- package/src/components/ui/DatePicker/DateRangePickerInput.tsx +276 -0
- package/src/components/ui/DatePicker/dateUtils.ts +199 -0
- package/src/components/ui/DatePicker/index.ts +13 -0
- package/src/components/ui/RadioGroup/AGENT.md +24 -0
- package/src/components/ui/RadioGroup/RadioGroup.example.tsx +136 -0
- package/src/components/ui/RadioGroup/RadioGroup.helpers.ts +11 -0
- package/src/components/ui/RadioGroup/RadioGroup.styl +70 -0
- package/src/components/ui/RadioGroup/RadioGroup.styl.d.ts +13 -0
- package/src/components/ui/RadioGroup/RadioGroup.tsx +58 -0
- package/src/components/ui/RadioGroup/RadioGroup.types.ts +19 -0
- package/src/components/ui/RadioGroup/index.ts +6 -0
- package/src/components/ui/Sidebar/SidebarGroup/SidebarGroup.styl +3 -0
- package/src/components/ui/TextShimmer/TextShimmer.styl +1 -0
- package/src/components/ui/TextShimmer/TextShimmer.tsx +1 -1
- package/src/docs/components/DocsSidebar/DocsSidebar.tsx +7 -1
- package/src/docs/pages/CheckboxPage.tsx +129 -18
- package/src/docs/pages/DataDisplayOverviewPage.tsx +241 -0
- package/src/docs/pages/DatePickerPage.tsx +183 -0
- package/src/docs/pages/FeedbackOverviewPage.tsx +57 -0
- package/src/docs/pages/FormsOverviewPage.tsx +721 -0
- package/src/docs/pages/LayoutOverviewPage.tsx +259 -0
- package/src/docs/pages/NavigationOverviewPage.tsx +94 -0
- package/src/docs/pages/OverlaysOverviewPage.tsx +196 -0
- package/src/docs/pages/RadioGroupPage.tsx +21 -0
- package/src/docs/registry.ts +48 -0
- package/src/index.ts +2 -0
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { PageContentSection } from '#uilib/components/ui/Page';
|
|
2
|
+
import { Progress } from '#uilib/components/ui/Progress';
|
|
3
|
+
import { Skeleton } from '#uilib/components/ui/Skeleton';
|
|
4
|
+
import { TextShimmer } from '#uilib/components/ui/TextShimmer';
|
|
5
|
+
|
|
6
|
+
import { AppPageHeader } from '../components/AppPageHeader/AppPageHeader';
|
|
7
|
+
import { DocsHeaderActions } from '../docsHeaderActions';
|
|
8
|
+
|
|
9
|
+
const PROGRESS_WIDTH = 320;
|
|
10
|
+
|
|
11
|
+
const panelStyle: React.CSSProperties = {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
gap: '0.75rem',
|
|
15
|
+
padding: 'var(--p-3)',
|
|
16
|
+
borderRadius: 'var(--radius-3)',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default function FeedbackOverviewPage() {
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<AppPageHeader
|
|
23
|
+
breadcrumbs={[{ label: 'Overview' }]}
|
|
24
|
+
title="Overview"
|
|
25
|
+
subheader="Progress, loading placeholders, and animated status text."
|
|
26
|
+
actions={<DocsHeaderActions />}
|
|
27
|
+
/>
|
|
28
|
+
<PageContentSection
|
|
29
|
+
style={{ display: 'flex', flexDirection: 'column', gap: '2.5rem' }}
|
|
30
|
+
>
|
|
31
|
+
<section>
|
|
32
|
+
<h3 style={{ marginBottom: '1rem' }}>Progress</h3>
|
|
33
|
+
<div style={panelStyle}>
|
|
34
|
+
<Progress value={65} style={{ width: PROGRESS_WIDTH }} />
|
|
35
|
+
<Progress style={{ width: PROGRESS_WIDTH }} />
|
|
36
|
+
</div>
|
|
37
|
+
</section>
|
|
38
|
+
|
|
39
|
+
<section>
|
|
40
|
+
<h3 style={{ marginBottom: '1rem' }}>Skeleton</h3>
|
|
41
|
+
<div style={{ ...panelStyle, maxWidth: 320 }}>
|
|
42
|
+
<Skeleton style={{ height: 14, width: '100%' }} />
|
|
43
|
+
<Skeleton style={{ height: 14, width: '80%' }} />
|
|
44
|
+
<Skeleton style={{ height: 80, width: '100%' }} />
|
|
45
|
+
</div>
|
|
46
|
+
</section>
|
|
47
|
+
|
|
48
|
+
<section>
|
|
49
|
+
<h3 style={{ marginBottom: '1rem' }}>TextShimmer</h3>
|
|
50
|
+
<div style={panelStyle}>
|
|
51
|
+
<TextShimmer>Generating forecast…</TextShimmer>
|
|
52
|
+
</div>
|
|
53
|
+
</section>
|
|
54
|
+
</PageContentSection>
|
|
55
|
+
</>
|
|
56
|
+
);
|
|
57
|
+
}
|