@g4rcez/components 3.0.0 → 3.0.2
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/dist/MotionConfigContext-C7MqlSdv.js +2713 -0
- package/dist/MotionConfigContext-C7MqlSdv.js.map +1 -0
- package/dist/ai/SKILL.md +266 -0
- package/dist/ai/docs/Alert.md +167 -0
- package/dist/ai/docs/AnimatedList.md +205 -0
- package/dist/ai/docs/Autocomplete.md +225 -0
- package/dist/ai/docs/Button.md +182 -0
- package/dist/ai/docs/Calendar.md +219 -0
- package/dist/ai/docs/Card.md +174 -0
- package/dist/ai/docs/Checkbox.md +199 -0
- package/dist/ai/docs/CommandPalette.md +293 -0
- package/dist/ai/docs/DatePicker.md +171 -0
- package/dist/ai/docs/Dropdown.md +223 -0
- package/dist/ai/docs/Empty.md +163 -0
- package/dist/ai/docs/Expand.md +143 -0
- package/dist/ai/docs/FileUpload.md +225 -0
- package/dist/ai/docs/Form.md +107 -0
- package/dist/ai/docs/FormReset.md +117 -0
- package/dist/ai/docs/Heading.md +88 -0
- package/dist/ai/docs/Input.md +237 -0
- package/dist/ai/docs/InputField.md +170 -0
- package/dist/ai/docs/List.md +205 -0
- package/dist/ai/docs/Menu.md +166 -0
- package/dist/ai/docs/Modal.md +280 -0
- package/dist/ai/docs/MultiSelect.md +196 -0
- package/dist/ai/docs/Notifications.md +231 -0
- package/dist/ai/docs/PageCalendar.md +271 -0
- package/dist/ai/docs/Polymorph.md +159 -0
- package/dist/ai/docs/Progress.md +145 -0
- package/dist/ai/docs/Radiobox.md +128 -0
- package/dist/ai/docs/RenderOnView.md +138 -0
- package/dist/ai/docs/Resizable.md +159 -0
- package/dist/ai/docs/Select.md +284 -0
- package/dist/ai/docs/Shortcut.md +105 -0
- package/dist/ai/docs/Skeleton.md +166 -0
- package/dist/ai/docs/Slider.md +144 -0
- package/dist/ai/docs/Slot.md +173 -0
- package/dist/ai/docs/Spinner.md +118 -0
- package/dist/ai/docs/Stats.md +137 -0
- package/dist/ai/docs/Step.md +159 -0
- package/dist/ai/docs/Switch.md +167 -0
- package/dist/ai/docs/Table.md +298 -0
- package/dist/ai/docs/Tabs.md +191 -0
- package/dist/ai/docs/Tag.md +224 -0
- package/dist/ai/docs/TaskList.md +144 -0
- package/dist/ai/docs/Textarea.md +167 -0
- package/dist/ai/docs/Timeline.md +210 -0
- package/dist/ai/docs/Toolbar.md +132 -0
- package/dist/ai/docs/Tooltip.md +231 -0
- package/dist/ai/docs/TransferList.md +142 -0
- package/dist/ai/docs/Typography.md +187 -0
- package/dist/ai/docs/Wizard.md +213 -0
- package/dist/ai/docs/index.md +183 -0
- package/dist/autocomplete-Boida9R7.js +375 -0
- package/dist/autocomplete-Boida9R7.js.map +1 -0
- package/dist/calendar-BswV66Nx.js +1719 -0
- package/dist/calendar-BswV66Nx.js.map +1 -0
- package/dist/chevron-down-BBFYYzZq.js +6 -0
- package/dist/chevron-down-BBFYYzZq.js.map +1 -0
- package/dist/chevron-right-DvXGOiS_.js +6 -0
- package/dist/chevron-right-DvXGOiS_.js.map +1 -0
- package/dist/circle-check-big-3M5lhTxx.js +9 -0
- package/dist/circle-check-big-3M5lhTxx.js.map +1 -0
- package/dist/components/core/button.js +76 -0
- package/dist/components/core/button.js.map +1 -0
- package/dist/components/core/tag.d.ts +1 -1
- package/dist/components/core/tag.d.ts.map +1 -1
- package/dist/components/core/tag.js +67 -0
- package/dist/components/core/tag.js.map +1 -0
- package/dist/components/display/alert.js +94 -0
- package/dist/components/display/alert.js.map +1 -0
- package/dist/components/display/calendar.js +15 -0
- package/dist/components/display/calendar.js.map +1 -0
- package/dist/components/display/card.js +84 -0
- package/dist/components/display/card.js.map +1 -0
- package/dist/components/display/list.d.ts.map +1 -1
- package/dist/components/display/list.js +93 -0
- package/dist/components/display/list.js.map +1 -0
- package/dist/components/display/notifications.js +15 -0
- package/dist/components/display/notifications.js.map +1 -0
- package/dist/components/display/stats.js +16 -0
- package/dist/components/display/stats.js.map +1 -0
- package/dist/components/display/tabs.js +12 -0
- package/dist/components/display/tabs.js.map +1 -0
- package/dist/components/display/timeline.js +29 -0
- package/dist/components/display/timeline.js.map +1 -0
- package/dist/components/floating/dropdown.d.ts +1 -0
- package/dist/components/floating/dropdown.d.ts.map +1 -1
- package/dist/components/floating/dropdown.js +58 -0
- package/dist/components/floating/dropdown.js.map +1 -0
- package/dist/components/floating/expand.js +41 -0
- package/dist/components/floating/expand.js.map +1 -0
- package/dist/components/floating/menu.d.ts.map +1 -1
- package/dist/components/floating/menu.js +177 -0
- package/dist/components/floating/menu.js.map +1 -0
- package/dist/components/floating/modal.js +297 -0
- package/dist/components/floating/modal.js.map +1 -0
- package/dist/components/floating/tooltip.js +73 -0
- package/dist/components/floating/tooltip.js.map +1 -0
- package/dist/components/form/autocomplete.js +16 -0
- package/dist/components/form/autocomplete.js.map +1 -0
- package/dist/components/form/checkbox.js +44 -0
- package/dist/components/form/checkbox.js.map +1 -0
- package/dist/components/form/date-picker.js +12 -0
- package/dist/components/form/date-picker.js.map +1 -0
- package/dist/components/form/file-upload.js +11 -0
- package/dist/components/form/file-upload.js.map +1 -0
- package/dist/components/form/form.js +8 -0
- package/dist/components/form/form.js.map +1 -0
- package/dist/components/form/input.js +5 -0
- package/dist/components/form/input.js.map +1 -0
- package/dist/components/form/radiobox.js +30 -0
- package/dist/components/form/radiobox.js.map +1 -0
- package/dist/components/form/select.js +106 -0
- package/dist/components/form/select.js.map +1 -0
- package/dist/components/form/switch.js +65 -0
- package/dist/components/form/switch.js.map +1 -0
- package/dist/components/form/task-list.js +68 -0
- package/dist/components/form/task-list.js.map +1 -0
- package/dist/components/form/transfer-list.js +55 -0
- package/dist/components/form/transfer-list.js.map +1 -0
- package/dist/components/table/table.js +10 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/config/default-translations.d.ts +4 -4
- package/dist/constants-r-AHn273.js +6 -0
- package/dist/constants-r-AHn273.js.map +1 -0
- package/dist/context-BFXNJVn2.js +161 -0
- package/dist/context-BFXNJVn2.js.map +1 -0
- package/dist/createLucideIcon-CP-mMPfa.js +76 -0
- package/dist/createLucideIcon-CP-mMPfa.js.map +1 -0
- package/dist/date-picker-BxPTdZPy.js +1598 -0
- package/dist/date-picker-BxPTdZPy.js.map +1 -0
- package/dist/dom-Dl8XH0CK.js +2833 -0
- package/dist/dom-Dl8XH0CK.js.map +1 -0
- package/dist/file-CBCP85VI.js +15 -0
- package/dist/file-CBCP85VI.js.map +1 -0
- package/dist/file-upload-BB6BdGcE.js +3118 -0
- package/dist/file-upload-BB6BdGcE.js.map +1 -0
- package/dist/floating-ui.react-DycKASR0.js +3706 -0
- package/dist/floating-ui.react-DycKASR0.js.map +1 -0
- package/dist/fns-D2eyJKd5.js +33 -0
- package/dist/fns-D2eyJKd5.js.map +1 -0
- package/dist/hooks/use-translations.d.ts +4 -4
- package/dist/hooks/use-translations.d.ts.map +1 -1
- package/dist/index-0YMC-_Lt.js +20 -0
- package/dist/index-0YMC-_Lt.js.map +1 -0
- package/dist/index-BJ1ayTam.js +126 -0
- package/dist/index-BJ1ayTam.js.map +1 -0
- package/dist/index-BtlhELJ3.js +3416 -0
- package/dist/index-BtlhELJ3.js.map +1 -0
- package/dist/index-ChfR6F8d.js +1590 -0
- package/dist/index-ChfR6F8d.js.map +1 -0
- package/dist/index-DE4shK8D.js +215 -0
- package/dist/index-DE4shK8D.js.map +1 -0
- package/dist/index-DJSMaZR4.js +35 -0
- package/dist/index-DJSMaZR4.js.map +1 -0
- package/dist/index-t1qLJTt5.js +351 -0
- package/dist/index-t1qLJTt5.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.esm-BaIwleSE.js +343 -0
- package/dist/index.esm-BaIwleSE.js.map +1 -0
- package/dist/index.js +8050 -20
- package/dist/index.js.map +1 -1
- package/dist/info-N5jWZg2A.js +10 -0
- package/dist/info-N5jWZg2A.js.map +1 -0
- package/dist/input-CoJoHIhd.js +441 -0
- package/dist/input-CoJoHIhd.js.map +1 -0
- package/dist/input-field-DTeIrwpK.js +146 -0
- package/dist/input-field-DTeIrwpK.js.map +1 -0
- package/dist/notifications-NPuFDsBp.js +2550 -0
- package/dist/notifications-NPuFDsBp.js.map +1 -0
- package/dist/polymorph-B5n9fs_K.js +10 -0
- package/dist/polymorph-B5n9fs_K.js.map +1 -0
- package/dist/proxy-BZcQiBrp.js +2495 -0
- package/dist/proxy-BZcQiBrp.js.map +1 -0
- package/dist/skeleton-D75GFBV6.js +10 -0
- package/dist/skeleton-D75GFBV6.js.map +1 -0
- package/dist/slot-CQW8ZzBb.js +79 -0
- package/dist/slot-CQW8ZzBb.js.map +1 -0
- package/dist/styles/common.js +3 -3
- package/dist/styles/dark.js +4 -4
- package/dist/styles/design-tokens.js +89 -60
- package/dist/styles/light.js +4 -4
- package/dist/styles/theme.js +2 -2
- package/dist/tabs-ccIA7vMo.js +106 -0
- package/dist/tabs-ccIA7vMo.js.map +1 -0
- package/dist/triangle-alert-CHMhQ6yd.js +16 -0
- package/dist/triangle-alert-CHMhQ6yd.js.map +1 -0
- package/dist/use-motion-value-eGwNuWuw.js +14 -0
- package/dist/use-motion-value-eGwNuWuw.js.map +1 -0
- package/dist/use-stable-ref-CYh-YkID.js +11 -0
- package/dist/use-stable-ref-CYh-YkID.js.map +1 -0
- package/dist/use-translations-BwLKTrZv.js +10 -0
- package/dist/use-translations-BwLKTrZv.js.map +1 -0
- package/dist/x-B9bYxG31.js +9 -0
- package/dist/x-B9bYxG31.js.map +1 -0
- package/package.json +6 -7
- package/dist/components/core/button.jsx +0 -79
- package/dist/components/core/heading.jsx +0 -4
- package/dist/components/core/polymorph.jsx +0 -5
- package/dist/components/core/render-on-view.jsx +0 -31
- package/dist/components/core/resizable.jsx +0 -51
- package/dist/components/core/slot.jsx +0 -156
- package/dist/components/core/tag.jsx +0 -51
- package/dist/components/core/typography.jsx +0 -22
- package/dist/components/display/alert.jsx +0 -58
- package/dist/components/display/calendar.jsx +0 -299
- package/dist/components/display/card.jsx +0 -43
- package/dist/components/display/empty.jsx +0 -11
- package/dist/components/display/list.jsx +0 -81
- package/dist/components/display/notifications.jsx +0 -126
- package/dist/components/display/progress.jsx +0 -11
- package/dist/components/display/shortcut.jsx +0 -23
- package/dist/components/display/skeleton.jsx +0 -12
- package/dist/components/display/spinner.jsx +0 -7
- package/dist/components/display/stats.jsx +0 -20
- package/dist/components/display/step.jsx +0 -131
- package/dist/components/display/tabs.jsx +0 -98
- package/dist/components/display/timeline.jsx +0 -25
- package/dist/components/floating/command-palette.jsx +0 -194
- package/dist/components/floating/dropdown.jsx +0 -53
- package/dist/components/floating/expand.jsx +0 -44
- package/dist/components/floating/menu.jsx +0 -147
- package/dist/components/floating/modal.jsx +0 -299
- package/dist/components/floating/toolbar.jsx +0 -5
- package/dist/components/floating/tooltip.jsx +0 -58
- package/dist/components/floating/wizard.jsx +0 -161
- package/dist/components/form/autocomplete.jsx +0 -279
- package/dist/components/form/checkbox.jsx +0 -12
- package/dist/components/form/date-picker.jsx +0 -115
- package/dist/components/form/file-upload.jsx +0 -133
- package/dist/components/form/form.jsx +0 -10
- package/dist/components/form/formReset.jsx +0 -17
- package/dist/components/form/free-text.jsx +0 -41
- package/dist/components/form/input-field.jsx +0 -56
- package/dist/components/form/input.jsx +0 -36
- package/dist/components/form/multi-select.jsx +0 -328
- package/dist/components/form/radiobox.jsx +0 -6
- package/dist/components/form/select.jsx +0 -42
- package/dist/components/form/slider.jsx +0 -45
- package/dist/components/form/switch.jsx +0 -46
- package/dist/components/form/task-list.jsx +0 -26
- package/dist/components/form/textarea.jsx +0 -12
- package/dist/components/form/transfer-list.jsx +0 -39
- package/dist/components/index.js +0 -45
- package/dist/components/page-calendar/calendar-header.jsx +0 -81
- package/dist/components/page-calendar/day-view.jsx +0 -87
- package/dist/components/page-calendar/event-pill.jsx +0 -25
- package/dist/components/page-calendar/index.js +0 -2
- package/dist/components/page-calendar/month-view.jsx +0 -47
- package/dist/components/page-calendar/page-calendar.jsx +0 -41
- package/dist/components/page-calendar/page-calendar.types.js +0 -1
- package/dist/components/page-calendar/page-calendar.utils.js +0 -71
- package/dist/components/page-calendar/week-view.jsx +0 -64
- package/dist/components/table/filter.jsx +0 -141
- package/dist/components/table/group.jsx +0 -68
- package/dist/components/table/index.jsx +0 -60
- package/dist/components/table/inner-table.jsx +0 -104
- package/dist/components/table/metadata.jsx +0 -36
- package/dist/components/table/pagination.jsx +0 -73
- package/dist/components/table/row.jsx +0 -58
- package/dist/components/table/sort.jsx +0 -105
- package/dist/components/table/table-lib.js +0 -83
- package/dist/components/table/table.context.jsx +0 -4
- package/dist/components/table/thead.jsx +0 -103
- package/dist/config/context.js +0 -12
- package/dist/config/default-translations.jsx +0 -83
- package/dist/config/default-tweaks.js +0 -4
- package/dist/constants.js +0 -2
- package/dist/hooks/use-click-outside.js +0 -17
- package/dist/hooks/use-color-parser.js +0 -9
- package/dist/hooks/use-components-provider.jsx +0 -19
- package/dist/hooks/use-debounce.js +0 -12
- package/dist/hooks/use-floating-ref.js +0 -6
- package/dist/hooks/use-form.js +0 -550
- package/dist/hooks/use-hover.js +0 -18
- package/dist/hooks/use-input-id.js +0 -5
- package/dist/hooks/use-is-coarse-device.js +0 -12
- package/dist/hooks/use-locale.js +0 -10
- package/dist/hooks/use-media-query.js +0 -25
- package/dist/hooks/use-on-event.js +0 -7
- package/dist/hooks/use-parent.js +0 -21
- package/dist/hooks/use-preferences.js +0 -23
- package/dist/hooks/use-previous.js +0 -9
- package/dist/hooks/use-reactive.js +0 -9
- package/dist/hooks/use-remove-scroll.js +0 -61
- package/dist/hooks/use-resize-observer.js +0 -17
- package/dist/hooks/use-stable-ref.js +0 -9
- package/dist/hooks/use-swipe.js +0 -17
- package/dist/hooks/use-translations.js +0 -9
- package/dist/hooks/use-tweaks.js +0 -9
- package/dist/hooks/use-window-size.js +0 -14
- package/dist/index.mjs +0 -37103
- package/dist/index.mjs.map +0 -1
- package/dist/index.umd.js +0 -28
- package/dist/index.umd.js.map +0 -1
- package/dist/lib/combi-keys.js +0 -60
- package/dist/lib/dict.js +0 -39
- package/dist/lib/dom.js +0 -62
- package/dist/lib/fns.js +0 -46
- package/dist/lib/fzf.js +0 -117
- package/dist/lib/keyboard-area.js +0 -14
- package/dist/types.js +0 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "@g4rcez/components — Component Index"
|
|
3
|
+
description: Full component catalog for @g4rcez/components React design system
|
|
4
|
+
package: "@g4rcez/components"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# @g4rcez/components — Component Index
|
|
8
|
+
|
|
9
|
+
A design system library built on React, Tailwind CSS, and design tokens.
|
|
10
|
+
|
|
11
|
+
**Installation:**
|
|
12
|
+
```bash
|
|
13
|
+
npm install @g4rcez/components
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Setup:**
|
|
17
|
+
```tsx
|
|
18
|
+
import "@g4rcez/components/index.css";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## All Components
|
|
22
|
+
|
|
23
|
+
| Component | Category | Import | Description |
|
|
24
|
+
|-----------|----------|--------|-------------|
|
|
25
|
+
| Button | Core | `import { Button } from "@g4rcez/components/button"` | Versatile button with multiple variants, sizes, and polymorphic rendering |
|
|
26
|
+
| Tag | Core | `import { Tag } from "@g4rcez/components/tag"` | Label/badge for metadata, status, and categorization |
|
|
27
|
+
| Heading | Core | `import { Heading } from "@g4rcez/components"` | Semantic heading with consistent typography tokens |
|
|
28
|
+
| Polymorph | Core | `import { Polymorph } from "@g4rcez/components"` | Polymorphic base component for rendering as any HTML element |
|
|
29
|
+
| RenderOnView | Core | `import { RenderOnView } from "@g4rcez/components"` | Lazy-renders children when they scroll into the viewport |
|
|
30
|
+
| Resizable | Core | `import { Resizable } from "@g4rcez/components"` | Drag-to-resize panel container |
|
|
31
|
+
| Slot | Core | `import { Slot } from "@g4rcez/components"` | Render-prop slot for component composition |
|
|
32
|
+
| Typography | Core | `import { Typography } from "@g4rcez/components"` | Body text component with semantic token styling |
|
|
33
|
+
| Alert | Display | `import { Alert } from "@g4rcez/components/alert"` | Dismissible alert for messages, warnings, and status updates |
|
|
34
|
+
| AnimatedList | Display | `import { AnimatedList } from "@g4rcez/components"` | List with enter/exit animation for dynamic items |
|
|
35
|
+
| Calendar | Display | `import { Calendar } from "@g4rcez/components/calendar"` | Inline date picker calendar |
|
|
36
|
+
| Card | Display | `import { Card } from "@g4rcez/components/card"` | Surface container with card tokens and elevation |
|
|
37
|
+
| Empty | Display | `import { Empty } from "@g4rcez/components"` | Empty state placeholder with optional icon and action |
|
|
38
|
+
| List | Display | `import { List } from "@g4rcez/components/list"` | Virtualized scrollable list for large data sets |
|
|
39
|
+
| Notifications | Display | `import { Notifications } from "@g4rcez/components/notifications"` | Toast notification system with queue management |
|
|
40
|
+
| Progress | Display | `import { Progress } from "@g4rcez/components"` | Progress bar with themed fill |
|
|
41
|
+
| Shortcut | Display | `import { Shortcut } from "@g4rcez/components"` | Keyboard shortcut badge display |
|
|
42
|
+
| Skeleton | Display | `import { Skeleton } from "@g4rcez/components"` | Loading placeholder with pulse animation |
|
|
43
|
+
| Spinner | Display | `import { Spinner } from "@g4rcez/components"` | Animated loading spinner |
|
|
44
|
+
| Stats | Display | `import { Stats } from "@g4rcez/components/stats"` | Metric/statistics display with label and value |
|
|
45
|
+
| Step | Display | `import { Step } from "@g4rcez/components"` | Multi-step wizard progress indicator |
|
|
46
|
+
| Tabs | Display | `import { Tabs } from "@g4rcez/components/tabs"` | Tabbed navigation with panel switching |
|
|
47
|
+
| Timeline | Display | `import { Timeline } from "@g4rcez/components/timeline"` | Vertical event timeline with themed markers |
|
|
48
|
+
| Autocomplete | Form | `import { Autocomplete } from "@g4rcez/components/autocomplete"` | Text input with dropdown suggestions |
|
|
49
|
+
| Checkbox | Form | `import { Checkbox } from "@g4rcez/components/checkbox"` | Checkbox with indeterminate support |
|
|
50
|
+
| DatePicker | Form | `import { DatePicker } from "@g4rcez/components/date-picker"` | Date input with calendar popover |
|
|
51
|
+
| FileUpload | Form | `import { FileUpload } from "@g4rcez/components/file-upload"` | Drag-and-drop file upload with preview |
|
|
52
|
+
| Form | Form | `import { Form } from "@g4rcez/components/form"` | Form wrapper with Zod validation and field management |
|
|
53
|
+
| FormReset | Form | `import { FormReset } from "@g4rcez/components"` | Reset button wired to the nearest Form context |
|
|
54
|
+
| Input | Form | `import { Input } from "@g4rcez/components/input"` | Text input with mask, prefix/suffix, and error states |
|
|
55
|
+
| InputField | Form | `import { InputField } from "@g4rcez/components"` | Input with label, helper text, and error message |
|
|
56
|
+
| MultiSelect | Form | `import { MultiSelect } from "@g4rcez/components"` | Multi-value select with search and tag display |
|
|
57
|
+
| Radiobox | Form | `import { Radiobox } from "@g4rcez/components/radiobox"` | Styled radio button group |
|
|
58
|
+
| Select | Form | `import { Select } from "@g4rcez/components/select"` | Dropdown select with search and virtual scroll |
|
|
59
|
+
| Slider | Form | `import { Slider } from "@g4rcez/components"` | Range slider input |
|
|
60
|
+
| Switch | Form | `import { Switch } from "@g4rcez/components/switch"` | Toggle switch for boolean values |
|
|
61
|
+
| TaskList | Form | `import { TaskList } from "@g4rcez/components/task-list"` | Checklist with completion tracking |
|
|
62
|
+
| Textarea | Form | `import { Textarea } from "@g4rcez/components"` | Multi-line text input with auto-resize |
|
|
63
|
+
| TransferList | Form | `import { TransferList } from "@g4rcez/components/transfer-list"` | Dual-pane list for moving items between sets |
|
|
64
|
+
| CommandPalette | Floating | `import { CommandPalette } from "@g4rcez/components"` | Spotlight-style command palette with keyboard navigation |
|
|
65
|
+
| Dropdown | Floating | `import { Dropdown } from "@g4rcez/components/dropdown"` | Floating dropdown menu anchored to a trigger |
|
|
66
|
+
| Expand | Floating | `import { Expand } from "@g4rcez/components/expand"` | Collapsible accordion/expand panel |
|
|
67
|
+
| Menu | Floating | `import { Menu } from "@g4rcez/components/menu"` | Context menu or navigation menu |
|
|
68
|
+
| Modal | Floating | `import { Modal } from "@g4rcez/components/modal"` | Dialog overlay with focus trap and scroll lock |
|
|
69
|
+
| Toolbar | Floating | `import { Toolbar } from "@g4rcez/components"` | Grouped action bar with button slots |
|
|
70
|
+
| Tooltip | Floating | `import { Tooltip } from "@g4rcez/components/tooltip"` | Hover tooltip with floating positioning |
|
|
71
|
+
| Wizard | Floating | `import { Wizard } from "@g4rcez/components"` | Multi-step guided flow overlay |
|
|
72
|
+
| Table | Table | `import { Table } from "@g4rcez/components/table"` | Feature-rich data table with sorting, filtering, and virtualization |
|
|
73
|
+
| PageCalendar | Calendar | `import { PageCalendar } from "@g4rcez/components"` | Full-page calendar with month, week, and day views |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Core
|
|
78
|
+
|
|
79
|
+
| Component | Import | Description |
|
|
80
|
+
|-----------|--------|-------------|
|
|
81
|
+
| Button | `import { Button } from "@g4rcez/components/button"` | Versatile button with multiple variants, sizes, and polymorphic rendering |
|
|
82
|
+
| Tag | `import { Tag } from "@g4rcez/components/tag"` | Label/badge for metadata, status, and categorization |
|
|
83
|
+
| Heading | `import { Heading } from "@g4rcez/components"` | Semantic heading with consistent typography tokens |
|
|
84
|
+
| Polymorph | `import { Polymorph } from "@g4rcez/components"` | Polymorphic base component for rendering as any HTML element |
|
|
85
|
+
| RenderOnView | `import { RenderOnView } from "@g4rcez/components"` | Lazy-renders children when they scroll into the viewport |
|
|
86
|
+
| Resizable | `import { Resizable } from "@g4rcez/components"` | Drag-to-resize panel container |
|
|
87
|
+
| Slot | `import { Slot } from "@g4rcez/components"` | Render-prop slot for component composition |
|
|
88
|
+
| Typography | `import { Typography } from "@g4rcez/components"` | Body text component with semantic token styling |
|
|
89
|
+
|
|
90
|
+
## Display
|
|
91
|
+
|
|
92
|
+
| Component | Import | Description |
|
|
93
|
+
|-----------|--------|-------------|
|
|
94
|
+
| Alert | `import { Alert } from "@g4rcez/components/alert"` | Dismissible alert for messages, warnings, and status updates |
|
|
95
|
+
| AnimatedList | `import { AnimatedList } from "@g4rcez/components"` | List with enter/exit animation for dynamic items |
|
|
96
|
+
| Calendar | `import { Calendar } from "@g4rcez/components/calendar"` | Inline date picker calendar |
|
|
97
|
+
| Card | `import { Card } from "@g4rcez/components/card"` | Surface container with card tokens and elevation |
|
|
98
|
+
| Empty | `import { Empty } from "@g4rcez/components"` | Empty state placeholder with optional icon and action |
|
|
99
|
+
| List | `import { List } from "@g4rcez/components/list"` | Virtualized scrollable list for large data sets |
|
|
100
|
+
| Notifications | `import { Notifications } from "@g4rcez/components/notifications"` | Toast notification system with queue management |
|
|
101
|
+
| Progress | `import { Progress } from "@g4rcez/components"` | Progress bar with themed fill |
|
|
102
|
+
| Shortcut | `import { Shortcut } from "@g4rcez/components"` | Keyboard shortcut badge display |
|
|
103
|
+
| Skeleton | `import { Skeleton } from "@g4rcez/components"` | Loading placeholder with pulse animation |
|
|
104
|
+
| Spinner | `import { Spinner } from "@g4rcez/components"` | Animated loading spinner |
|
|
105
|
+
| Stats | `import { Stats } from "@g4rcez/components/stats"` | Metric/statistics display with label and value |
|
|
106
|
+
| Step | `import { Step } from "@g4rcez/components"` | Multi-step wizard progress indicator |
|
|
107
|
+
| Tabs | `import { Tabs } from "@g4rcez/components/tabs"` | Tabbed navigation with panel switching |
|
|
108
|
+
| Timeline | `import { Timeline } from "@g4rcez/components/timeline"` | Vertical event timeline with themed markers |
|
|
109
|
+
|
|
110
|
+
## Form
|
|
111
|
+
|
|
112
|
+
| Component | Import | Description |
|
|
113
|
+
|-----------|--------|-------------|
|
|
114
|
+
| Autocomplete | `import { Autocomplete } from "@g4rcez/components/autocomplete"` | Text input with dropdown suggestions |
|
|
115
|
+
| Checkbox | `import { Checkbox } from "@g4rcez/components/checkbox"` | Checkbox with indeterminate support |
|
|
116
|
+
| DatePicker | `import { DatePicker } from "@g4rcez/components/date-picker"` | Date input with calendar popover |
|
|
117
|
+
| FileUpload | `import { FileUpload } from "@g4rcez/components/file-upload"` | Drag-and-drop file upload with preview |
|
|
118
|
+
| Form | `import { Form } from "@g4rcez/components/form"` | Form wrapper with Zod validation and field management |
|
|
119
|
+
| FormReset | `import { FormReset } from "@g4rcez/components"` | Reset button wired to the nearest Form context |
|
|
120
|
+
| Input | `import { Input } from "@g4rcez/components/input"` | Text input with mask, prefix/suffix, and error states |
|
|
121
|
+
| InputField | `import { InputField } from "@g4rcez/components"` | Input with label, helper text, and error message |
|
|
122
|
+
| MultiSelect | `import { MultiSelect } from "@g4rcez/components"` | Multi-value select with search and tag display |
|
|
123
|
+
| Radiobox | `import { Radiobox } from "@g4rcez/components/radiobox"` | Styled radio button group |
|
|
124
|
+
| Select | `import { Select } from "@g4rcez/components/select"` | Dropdown select with search and virtual scroll |
|
|
125
|
+
| Slider | `import { Slider } from "@g4rcez/components"` | Range slider input |
|
|
126
|
+
| Switch | `import { Switch } from "@g4rcez/components/switch"` | Toggle switch for boolean values |
|
|
127
|
+
| TaskList | `import { TaskList } from "@g4rcez/components/task-list"` | Checklist with completion tracking |
|
|
128
|
+
| Textarea | `import { Textarea } from "@g4rcez/components"` | Multi-line text input with auto-resize |
|
|
129
|
+
| TransferList | `import { TransferList } from "@g4rcez/components/transfer-list"` | Dual-pane list for moving items between sets |
|
|
130
|
+
|
|
131
|
+
## Floating
|
|
132
|
+
|
|
133
|
+
| Component | Import | Description |
|
|
134
|
+
|-----------|--------|-------------|
|
|
135
|
+
| CommandPalette | `import { CommandPalette } from "@g4rcez/components"` | Spotlight-style command palette with keyboard navigation |
|
|
136
|
+
| Dropdown | `import { Dropdown } from "@g4rcez/components/dropdown"` | Floating dropdown menu anchored to a trigger |
|
|
137
|
+
| Expand | `import { Expand } from "@g4rcez/components/expand"` | Collapsible accordion/expand panel |
|
|
138
|
+
| Menu | `import { Menu } from "@g4rcez/components/menu"` | Context menu or navigation menu |
|
|
139
|
+
| Modal | `import { Modal } from "@g4rcez/components/modal"` | Dialog overlay with focus trap and scroll lock |
|
|
140
|
+
| Toolbar | `import { Toolbar } from "@g4rcez/components"` | Grouped action bar with button slots |
|
|
141
|
+
| Tooltip | `import { Tooltip } from "@g4rcez/components/tooltip"` | Hover tooltip with floating positioning |
|
|
142
|
+
| Wizard | `import { Wizard } from "@g4rcez/components"` | Multi-step guided flow overlay |
|
|
143
|
+
|
|
144
|
+
## Table
|
|
145
|
+
|
|
146
|
+
| Component | Import | Description |
|
|
147
|
+
|-----------|--------|-------------|
|
|
148
|
+
| Table | `import { Table } from "@g4rcez/components/table"` | Feature-rich data table with sorting, filtering, and virtualization |
|
|
149
|
+
|
|
150
|
+
## Calendar
|
|
151
|
+
|
|
152
|
+
| Component | Import | Description |
|
|
153
|
+
|-----------|--------|-------------|
|
|
154
|
+
| PageCalendar | `import { PageCalendar } from "@g4rcez/components"` | Full-page calendar with month, week, and day views |
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Design Token Quick Reference
|
|
159
|
+
|
|
160
|
+
All components use CSS custom properties for theming. Override in your `@theme` block:
|
|
161
|
+
|
|
162
|
+
```css
|
|
163
|
+
@theme {
|
|
164
|
+
--primary: oklch(0.6 0.2 250); /* primary color */
|
|
165
|
+
--danger: oklch(0.6 0.2 30); /* danger/error color */
|
|
166
|
+
--button-primary-bg: var(--primary);
|
|
167
|
+
--button-primary-text: var(--primary-foreground);
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
See individual component docs for the full token list per component.
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Setup
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
// 1. Import the stylesheet in your app root
|
|
179
|
+
import "@g4rcez/components/index.css";
|
|
180
|
+
|
|
181
|
+
// 2. Apply theme class on your root element
|
|
182
|
+
<div className="light"> ... </div> // or "dark"
|
|
183
|
+
```
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { jsx as f, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { u as He, o as Ye, m as $e, g as ze, b as Ve, h as Oe, c as Pe, d as Ze, i as _e, j as Ue, F as Be, l as We } from "./floating-ui.react-DycKASR0.js";
|
|
3
|
+
import { useRef as E, useState as x, useEffect as S, forwardRef as G, Fragment as je } from "react";
|
|
4
|
+
import { flushSync as ie } from "react-dom";
|
|
5
|
+
import { Y as Ke } from "./index-BtlhELJ3.js";
|
|
6
|
+
import { h as Qe, o as qe, I as T, g as ce, i as Ge, c as ue, m as Je, f as Xe } from "./dom-Dl8XH0CK.js";
|
|
7
|
+
import { i as q, c as et, s as de } from "./fns-D2eyJKd5.js";
|
|
8
|
+
import { u as tt } from "./use-translations-BwLKTrZv.js";
|
|
9
|
+
import { I as nt } from "./input-field-DTeIrwpK.js";
|
|
10
|
+
import { m as J, A as rt } from "./proxy-BZcQiBrp.js";
|
|
11
|
+
import { C as lt } from "./chevron-down-BBFYYzZq.js";
|
|
12
|
+
const fe = () => window.matchMedia("@media (pointer: coarse)"), ot = () => {
|
|
13
|
+
const t = E(q() ? null : fe()), [n, a] = x(q() ? !1 : t.current?.matches ?? !1);
|
|
14
|
+
return S(() => {
|
|
15
|
+
(t.current === null ? fe() : t.current).addEventListener("change", (l) => a(l.matches));
|
|
16
|
+
}, []), n;
|
|
17
|
+
}, at = (t, n = "overflow-hidden") => {
|
|
18
|
+
const a = E(null), o = ot(), l = E(q() ? "" : document.documentElement.style.overflowY);
|
|
19
|
+
return S(() => {
|
|
20
|
+
if (!(a.current === null && !t) && n !== "block-only" && n === "overflow-hidden")
|
|
21
|
+
if (t) {
|
|
22
|
+
if (l.current = document.documentElement.style.overflowY, document.documentElement.style.overflowY = "hidden", o || et()) return;
|
|
23
|
+
document.documentElement.style.padding = Qe(document.documentElement) ? "0 15px 0 0" : "";
|
|
24
|
+
} else
|
|
25
|
+
document.documentElement.style.padding = "", document.documentElement.style.overflowY = l.current;
|
|
26
|
+
}, [t, o, n]), S(() => {
|
|
27
|
+
if (!t) return;
|
|
28
|
+
const i = new AbortController(), u = document.documentElement, s = (m) => {
|
|
29
|
+
const d = a.current;
|
|
30
|
+
if (d && d.contains(m.target)) {
|
|
31
|
+
const y = d.getBoundingClientRect(), k = d.style.height ? Number(qe(d.style.height)) : null, H = T.number(k) ? k : y.height, R = d.scrollHeight <= H;
|
|
32
|
+
return H === d.scrollHeight ? t ? m.preventDefault() : void 0 : R ? void 0 : t ? m.preventDefault() : void 0;
|
|
33
|
+
}
|
|
34
|
+
return m.currentTarget === document.documentElement, t ? m.preventDefault() : void 0;
|
|
35
|
+
};
|
|
36
|
+
return u.addEventListener("wheel", s, { signal: i.signal, passive: !1 }), u.addEventListener("scroll", s, { signal: i.signal, passive: !1 }), () => {
|
|
37
|
+
i.abort();
|
|
38
|
+
};
|
|
39
|
+
}, [t]), a;
|
|
40
|
+
}, st = (t, n) => {
|
|
41
|
+
t = String(t).toLocaleLowerCase(), n = String(n).toLocaleLowerCase();
|
|
42
|
+
const a = n[0], o = t.split("").map((u, s) => u === a ? s : !1).filter((u) => u !== !1);
|
|
43
|
+
if (o.length === 0)
|
|
44
|
+
return null;
|
|
45
|
+
const l = [];
|
|
46
|
+
if (o.forEach((u) => {
|
|
47
|
+
let s = u + 1;
|
|
48
|
+
const m = [u];
|
|
49
|
+
for (let d = 1; d < n.length; d++) {
|
|
50
|
+
const y = n[d];
|
|
51
|
+
if (s = t.indexOf(y, s), s === -1)
|
|
52
|
+
return;
|
|
53
|
+
m.push(s), s++;
|
|
54
|
+
}
|
|
55
|
+
l.push(m);
|
|
56
|
+
}), l.length === 0)
|
|
57
|
+
return null;
|
|
58
|
+
const i = l.sort((u, s) => {
|
|
59
|
+
if (u.length === 1)
|
|
60
|
+
return u[0] - s[0];
|
|
61
|
+
const m = u[u.length - 1] - u[0], d = s[s.length - 1] - s[0];
|
|
62
|
+
return m - d;
|
|
63
|
+
})[0];
|
|
64
|
+
return t === n ? 1 : i.length > 1 ? 2 + (i[i.length - 1] - i[0]) : 2 + i[0];
|
|
65
|
+
}, me = (t, n, a) => {
|
|
66
|
+
const o = t.split(n).filter(Boolean);
|
|
67
|
+
let l = a;
|
|
68
|
+
for (const i of o) {
|
|
69
|
+
if (l == null)
|
|
70
|
+
return l;
|
|
71
|
+
l = l[i];
|
|
72
|
+
}
|
|
73
|
+
return l;
|
|
74
|
+
}, ge = { basic: /[,[\]]+?/, extend: /[,[\].]+?/ }, he = (t, n) => {
|
|
75
|
+
const a = me(n, ge.basic, t);
|
|
76
|
+
return a !== void 0 && a !== t ? a : me(n, ge.extend, t);
|
|
77
|
+
}, pe = (t) => t.replace(/[^0-9]/g, ""), V = (t) => t.normalize("NFD").replace(/[\u0300-\u036f]/g, ""), ve = (t, n, a, o = "FUZZY") => o === "CONTAINS" ? t.includes(n) : o === "EQUAL" ? t === n : o === "CONTAINS_NUMBERS" ? pe(t).includes(pe(n)) : o === "STARTS_WITH" ? t.startsWith(n) : o === "ENDS_WITH" ? t.endsWith(n) : o === "FUZZY" ? st(t, n) !== null : !1, it = (t, n, a, o = "FUZZY") => Array.isArray(n) ? n.some((l) => ve(t, l, a, o)) : ve(t, n, a, o), ct = (t, n, a) => {
|
|
78
|
+
if (a.length === 0)
|
|
79
|
+
return t;
|
|
80
|
+
const o = /* @__PURE__ */ new Map(), l = a.map((i) => ({ ...i, value: T.array(i.value) ? i.value.map(V) : V(`${i.value}`) }));
|
|
81
|
+
return t.forEach((i) => {
|
|
82
|
+
const u = he(i, n);
|
|
83
|
+
l.forEach((s) => {
|
|
84
|
+
const m = he(i, s.key);
|
|
85
|
+
if (!m) return;
|
|
86
|
+
const d = V(`${s.value}`.toLocaleLowerCase()).trim(), y = V(`${m}`.toLocaleLowerCase()).trim();
|
|
87
|
+
if (it(y, d, s.score, s.match))
|
|
88
|
+
return void o.set(u, i);
|
|
89
|
+
T.function(s.ifNotMatch) && s.ifNotMatch(d, y) && o.set(u, i);
|
|
90
|
+
});
|
|
91
|
+
}), Array.from(o.values());
|
|
92
|
+
}, ut = (t) => /* @__PURE__ */ f(je, { children: t.children }), dt = {
|
|
93
|
+
duration: 200,
|
|
94
|
+
open: { transform: "scaleY(1)", opacity: 1 },
|
|
95
|
+
close: { transform: "scaleY(0)", opacity: 0 },
|
|
96
|
+
initial: { transform: "scaleY(0)", opacity: 0.2 }
|
|
97
|
+
}, ft = [], mt = G(function(n, a) {
|
|
98
|
+
return /* @__PURE__ */ f(J.ul, { ...n, ref: a, className: "max-h-96 w-full overscroll-contain rounded-lg", children: /* @__PURE__ */ f(rt, { children: n.children }) });
|
|
99
|
+
}), gt = G(function({ item: n, context: a, ...o }, l) {
|
|
100
|
+
return /* @__PURE__ */ f(J.li, { ...o, ref: l, className: "first:rounded-t-lg last:rounded-t-lg" });
|
|
101
|
+
}), ht = { List: mt, Item: gt }, L = 40, St = G(
|
|
102
|
+
({
|
|
103
|
+
left: t,
|
|
104
|
+
error: n,
|
|
105
|
+
right: a,
|
|
106
|
+
loading: o,
|
|
107
|
+
options: l,
|
|
108
|
+
container: i,
|
|
109
|
+
rightLabel: u,
|
|
110
|
+
interactive: s,
|
|
111
|
+
emptyMessage: m,
|
|
112
|
+
optionalText: d,
|
|
113
|
+
labelClassName: y,
|
|
114
|
+
feedback: k = null,
|
|
115
|
+
hideLeft: H = !1,
|
|
116
|
+
required: R = !1,
|
|
117
|
+
dynamicOption: X = !1,
|
|
118
|
+
...c
|
|
119
|
+
}, be) => {
|
|
120
|
+
const we = E(null), ee = E(null), O = E(null), P = c.value ?? c.defaultValue ?? "", te = tt(), [ne, D] = x(() => Math.min(320, L * l.length)), [w, A] = x(!1), [C, F] = x(""), [I, Z] = x(P), [ye, _] = x(() => l.find((e) => e.value === P)?.label ?? P), [v, Y] = x(null), re = E(ft), Ce = at(w, "block-only"), le = X && C !== "" ? [
|
|
121
|
+
{
|
|
122
|
+
value: C,
|
|
123
|
+
label: C,
|
|
124
|
+
"data-dynamic": "true"
|
|
125
|
+
},
|
|
126
|
+
...l
|
|
127
|
+
] : l, oe = () => ie(() => A(!0)), xe = C ? ct(le, "value", [
|
|
128
|
+
{ key: "value", value: C },
|
|
129
|
+
{ key: "label", value: C }
|
|
130
|
+
]) : le, U = () => {
|
|
131
|
+
A(!1), D(0);
|
|
132
|
+
}, g = xe.filter((e) => e.hidden !== !0), Ee = X ? void 0 : `^(${l.map((e) => `${de(e.value)}${e.label ? "|" + de(e.label) : ""}`).join("|")})$`, { x: Ie, y: Ne, strategy: Le, refs: b, context: M, placement: ae } = He({
|
|
133
|
+
open: w,
|
|
134
|
+
transform: !0,
|
|
135
|
+
onOpenChange: A,
|
|
136
|
+
placement: "bottom-start",
|
|
137
|
+
whileElementsMounted: Ve,
|
|
138
|
+
middleware: [
|
|
139
|
+
Ye(4),
|
|
140
|
+
$e({ allowedPlacements: ["top-start", "bottom-start"], alignment: "start" }),
|
|
141
|
+
ze({
|
|
142
|
+
padding: 10,
|
|
143
|
+
elementContext: "reference",
|
|
144
|
+
apply(e) {
|
|
145
|
+
const h = e.elements.floating.querySelector("ul")?.getBoundingClientRect().height || 0, p = ce(b.reference.current, window.innerHeight), K = Math.min(h < L ? p : h, p, e.availableHeight), Q = g.length === 0 ? L : Math.min(K, p, h), $ = `${ee.current?.getBoundingClientRect().width || p}px`;
|
|
146
|
+
Object.assign(e.elements.floating.style, { width: $, maxWidth: $, height: Q });
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
}), Se = Oe(M, dt), { getReferenceProps: ke, getFloatingProps: Re, getItemProps: De } = Pe([
|
|
151
|
+
Ze(M, { role: "listbox" }),
|
|
152
|
+
_e(M),
|
|
153
|
+
Ue(M, {
|
|
154
|
+
cols: 0,
|
|
155
|
+
listRef: re,
|
|
156
|
+
loop: !0,
|
|
157
|
+
virtual: !0,
|
|
158
|
+
allowEscape: !0,
|
|
159
|
+
activeIndex: v,
|
|
160
|
+
selectedIndex: v,
|
|
161
|
+
focusItemOnOpen: "auto",
|
|
162
|
+
openOnArrowKeyDown: !0,
|
|
163
|
+
scrollItemIntoView: !0
|
|
164
|
+
})
|
|
165
|
+
]);
|
|
166
|
+
S(() => {
|
|
167
|
+
if (c.value) {
|
|
168
|
+
const e = l.find((r) => r.value === c.value);
|
|
169
|
+
e && (_(e.label ?? e.value), Z(c.value));
|
|
170
|
+
}
|
|
171
|
+
}, [c.value, l.length]), S(() => {
|
|
172
|
+
if (!w) return D(0);
|
|
173
|
+
const e = b.reference;
|
|
174
|
+
if (e.current === null) return;
|
|
175
|
+
const r = ce(e.current, window.innerHeight);
|
|
176
|
+
setTimeout(() => D(Math.min(r, g.length * L)), 100);
|
|
177
|
+
}, [C, w, b.reference, g.length]), S(() => {
|
|
178
|
+
const e = b.reference.current;
|
|
179
|
+
if (e)
|
|
180
|
+
return Ge(e);
|
|
181
|
+
}, []);
|
|
182
|
+
const B = (e, r) => {
|
|
183
|
+
Z(e.value);
|
|
184
|
+
const h = b.reference.current;
|
|
185
|
+
if (!h) return;
|
|
186
|
+
h?.setAttribute("data-value", e.value), h.value = e.value;
|
|
187
|
+
const p = new Event("change", { bubbles: !1, cancelable: !0 });
|
|
188
|
+
h.dispatchEvent(p), c.onChange && c.onChange(p), _(e.label ?? ""), U(), F(""), Y(r);
|
|
189
|
+
}, Ae = (e) => {
|
|
190
|
+
const r = e.target.value;
|
|
191
|
+
return F(r), !w && r === "" ? A(!0) : (e.target.name = c.name || "", r ? A(!0) : c.onChange?.(e));
|
|
192
|
+
}, Fe = () => {
|
|
193
|
+
oe(), F(""), b.reference.current?.focus();
|
|
194
|
+
}, Me = () => {
|
|
195
|
+
Y((e) => e === null ? 0 : e), oe(), F("");
|
|
196
|
+
}, Te = () => {
|
|
197
|
+
b.reference.current?.setAttribute("data-value", ""), F(""), Z(""), _(""), Xe(b.reference.current), U();
|
|
198
|
+
}, N = c.id || c.name, W = `${N}-shadow`, j = g.length === 0, se = ae === "top" || ae === "top-start";
|
|
199
|
+
return /* @__PURE__ */ z(
|
|
200
|
+
nt,
|
|
201
|
+
{
|
|
202
|
+
...c,
|
|
203
|
+
left: t,
|
|
204
|
+
error: n,
|
|
205
|
+
ref: ee,
|
|
206
|
+
form: c.form,
|
|
207
|
+
loading: o,
|
|
208
|
+
name: c.name,
|
|
209
|
+
feedback: w && se ? c.title : k,
|
|
210
|
+
hideLeft: H,
|
|
211
|
+
required: R,
|
|
212
|
+
title: c.title,
|
|
213
|
+
container: i,
|
|
214
|
+
rightLabel: u,
|
|
215
|
+
interactive: s,
|
|
216
|
+
id: W,
|
|
217
|
+
optionalText: d,
|
|
218
|
+
componentName: "autocomplete",
|
|
219
|
+
labelClassName: y,
|
|
220
|
+
placeholder: c.placeholder,
|
|
221
|
+
right: /* @__PURE__ */ z("span", { className: "flex items-center gap-0.5", children: [
|
|
222
|
+
a,
|
|
223
|
+
/* @__PURE__ */ z("button", { type: "button", className: "p-2 transition-colors link:text-primary md:p-1", onClick: Fe, children: [
|
|
224
|
+
/* @__PURE__ */ f(lt, { size: 20 }),
|
|
225
|
+
/* @__PURE__ */ f("span", { className: "sr-only", children: te.inputCaretDown })
|
|
226
|
+
] }),
|
|
227
|
+
I ? /* @__PURE__ */ f("button", { type: "button", onClick: Te, className: "p-2 transition-colors link:text-danger md:p-1", children: /* @__PURE__ */ f("svg", { width: "15", height: "15", viewBox: "0 0 15 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ f(
|
|
228
|
+
"path",
|
|
229
|
+
{
|
|
230
|
+
d: "M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",
|
|
231
|
+
fill: "currentColor",
|
|
232
|
+
fillRule: "evenodd",
|
|
233
|
+
clipRule: "evenodd"
|
|
234
|
+
}
|
|
235
|
+
) }) }) : null
|
|
236
|
+
] }),
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ f(
|
|
239
|
+
"input",
|
|
240
|
+
{
|
|
241
|
+
"data-shadow": "true",
|
|
242
|
+
...ke({
|
|
243
|
+
...c,
|
|
244
|
+
onFocus: Me,
|
|
245
|
+
pattern: Ee,
|
|
246
|
+
onChange: Ae,
|
|
247
|
+
id: W,
|
|
248
|
+
name: W,
|
|
249
|
+
ref: b.setReference,
|
|
250
|
+
onClick: (e) => e.currentTarget.focus(),
|
|
251
|
+
onKeyDown(e) {
|
|
252
|
+
if (e.key === "Escape")
|
|
253
|
+
return e.currentTarget.blur(), U();
|
|
254
|
+
if (w) {
|
|
255
|
+
if (e.key === "ArrowDown") {
|
|
256
|
+
let r = T.number(v) ? v + 1 : 0;
|
|
257
|
+
return r > g.length - 1 && (r = 0), O.current?.scrollIntoView({ index: r }), Y(r);
|
|
258
|
+
}
|
|
259
|
+
if (e.key === "ArrowUp") {
|
|
260
|
+
let r = T.number(v) ? v - 1 : g.length - 1;
|
|
261
|
+
return r < 0 && (r = g.length - 1), O.current?.scrollIntoView({ index: r }), Y(r);
|
|
262
|
+
}
|
|
263
|
+
if (e.key === "Enter") {
|
|
264
|
+
if (v !== null && g[v])
|
|
265
|
+
return e.preventDefault(), B(g[v], v);
|
|
266
|
+
if (g.length === 1)
|
|
267
|
+
return e.preventDefault(), B(g[0], 0);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}),
|
|
272
|
+
"data-value": I,
|
|
273
|
+
"data-error": !!n,
|
|
274
|
+
"data-name": N,
|
|
275
|
+
"data-target": N,
|
|
276
|
+
required: R,
|
|
277
|
+
value: w ? C : l.length === 0 ? "" : ye || I,
|
|
278
|
+
"aria-autocomplete": "list",
|
|
279
|
+
autoComplete: "off",
|
|
280
|
+
className: ue(
|
|
281
|
+
"input placeholder-input-mask group h-input-height w-full flex-1",
|
|
282
|
+
"rounded-md bg-transparent px-input-x py-input-y text-foreground",
|
|
283
|
+
"outline-none transition-colors focus:ring-2 focus:ring-inset focus:ring-primary",
|
|
284
|
+
"group-error:text-danger group-error:placeholder-input-mask-error",
|
|
285
|
+
"text-base group-focus-within:border-primary group-hover:border-primary",
|
|
286
|
+
c.className
|
|
287
|
+
)
|
|
288
|
+
}
|
|
289
|
+
),
|
|
290
|
+
/* @__PURE__ */ f(
|
|
291
|
+
"input",
|
|
292
|
+
{
|
|
293
|
+
id: N,
|
|
294
|
+
name: N,
|
|
295
|
+
type: "hidden",
|
|
296
|
+
"data-origin": N,
|
|
297
|
+
ref: be,
|
|
298
|
+
required: R,
|
|
299
|
+
defaultValue: c.value || I || void 0
|
|
300
|
+
}
|
|
301
|
+
),
|
|
302
|
+
/* @__PURE__ */ f(Be, { preserveTabOrder: !0, children: w ? /* @__PURE__ */ f(We, { modal: !0, guards: !0, returnFocus: !1, context: M, initialFocus: -1, visuallyHiddenDismiss: !0, children: /* @__PURE__ */ z(
|
|
303
|
+
J.div,
|
|
304
|
+
{
|
|
305
|
+
...Re({
|
|
306
|
+
ref: Je(Ce, b.setFloating),
|
|
307
|
+
style: { ...Se.styles, left: Ie, top: Ne ?? 0, position: Le, height: "auto" }
|
|
308
|
+
}),
|
|
309
|
+
initial: !1,
|
|
310
|
+
"data-floating": "true",
|
|
311
|
+
animate: { height: j ? "auto" : ne },
|
|
312
|
+
className: ue(
|
|
313
|
+
"shadow-floating isolate z-floating m-0 max-h-80 origin-[top_center] list-none overscroll-contain rounded-b-lg rounded-t-lg border border-floating-border bg-floating-background p-0 text-foreground ease-in-out",
|
|
314
|
+
se ? "origin-[bottom_center]" : "origin-[top_center]"
|
|
315
|
+
),
|
|
316
|
+
onAnimationComplete: () => {
|
|
317
|
+
if (!w) return D(0);
|
|
318
|
+
const r = b.floating.current.querySelectorAll("li").item(0), h = (r ? r.getBoundingClientRect().height : L) * g.length;
|
|
319
|
+
return ie(() => D(h + 2));
|
|
320
|
+
},
|
|
321
|
+
children: [
|
|
322
|
+
j ? /* @__PURE__ */ f("div", { role: "option", className: "w-full border-b border-tooltip-border", children: /* @__PURE__ */ f("span", { className: "flex w-full justify-between p-2 text-left text-disabled", children: m || te.autocompleteEmpty }) }) : null,
|
|
323
|
+
/* @__PURE__ */ f(
|
|
324
|
+
Ke,
|
|
325
|
+
{
|
|
326
|
+
overscan: 40,
|
|
327
|
+
ref: O,
|
|
328
|
+
hidden: j,
|
|
329
|
+
data: g,
|
|
330
|
+
style: { height: ne },
|
|
331
|
+
defaultItemHeight: L,
|
|
332
|
+
components: ht,
|
|
333
|
+
scrollerRef: (e) => {
|
|
334
|
+
we.current = e;
|
|
335
|
+
},
|
|
336
|
+
className: "border-floating max-h-full overscroll-contain rounded-lg bg-floating-background p-0 text-foreground",
|
|
337
|
+
itemContent: (e, r) => {
|
|
338
|
+
const h = r.Render ?? ut, p = I === r.value || I === r.label, K = v === e, Q = r.label ?? r.value;
|
|
339
|
+
return /* @__PURE__ */ f(
|
|
340
|
+
"button",
|
|
341
|
+
{
|
|
342
|
+
"data-value": r.value,
|
|
343
|
+
...De({
|
|
344
|
+
ref: ($) => {
|
|
345
|
+
re.current[e] = $;
|
|
346
|
+
},
|
|
347
|
+
role: "option",
|
|
348
|
+
type: "button",
|
|
349
|
+
"aria-checked": p,
|
|
350
|
+
"aria-current": p,
|
|
351
|
+
"aria-selected": p,
|
|
352
|
+
"aria-busy": r.disabled,
|
|
353
|
+
onClick: () => B(r, e),
|
|
354
|
+
className: `cursor-pointer min-h-10 hover:bg-floating-hover w-full p-2 text-left ${p ? "bg-primary-hover text-primary-foreground" : ""} ${K ? "bg-floating-hover text-floating-foreground" : ""}`
|
|
355
|
+
}),
|
|
356
|
+
children: /* @__PURE__ */ f(h, { ...c, label: r.label, value: r.value, children: Q })
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
)
|
|
362
|
+
]
|
|
363
|
+
}
|
|
364
|
+
) }) : null })
|
|
365
|
+
]
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
export {
|
|
371
|
+
St as A,
|
|
372
|
+
ct as f,
|
|
373
|
+
at as u
|
|
374
|
+
};
|
|
375
|
+
//# sourceMappingURL=autocomplete-Boida9R7.js.map
|