@taicode/common-web 3.0.1 → 3.2.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.
- package/output/components/alert-dialog.d.ts +20 -0
- package/output/components/alert-dialog.d.ts.map +1 -0
- package/output/components/alert-dialog.js +65 -0
- package/output/components/alert.d.ts +11 -0
- package/output/components/alert.d.ts.map +1 -0
- package/output/components/alert.js +38 -0
- package/output/components/avatar.d.ts +13 -0
- package/output/components/avatar.d.ts.map +1 -0
- package/output/components/avatar.js +40 -0
- package/output/components/badge.d.ts +10 -0
- package/output/components/badge.d.ts.map +1 -0
- package/output/components/badge.js +31 -0
- package/output/components/button.d.ts +12 -0
- package/output/components/button.d.ts.map +1 -0
- package/output/components/button.js +44 -0
- package/output/components/card.d.ts +8 -0
- package/output/components/card.d.ts.map +1 -0
- package/output/components/card.js +38 -0
- package/output/components/checkbox.d.ts +5 -0
- package/output/components/checkbox.d.ts.map +1 -0
- package/output/components/checkbox.js +21 -0
- package/output/components/command.d.ts +20 -0
- package/output/components/command.d.ts.map +1 -0
- package/output/components/command.js +55 -0
- package/output/components/dialog.d.ts +20 -0
- package/output/components/dialog.d.ts.map +1 -0
- package/output/components/dialog.js +58 -0
- package/output/components/direction.d.ts +9 -0
- package/output/components/direction.d.ts.map +1 -0
- package/output/components/direction.js +10 -0
- package/output/components/dropdown-menu.d.ts +29 -0
- package/output/components/dropdown-menu.d.ts.map +1 -0
- package/output/components/dropdown-menu.js +78 -0
- package/output/components/field.d.ts +39 -0
- package/output/components/field.d.ts.map +1 -0
- package/output/components/field.js +102 -0
- package/output/components/index.d.ts +36 -0
- package/output/components/index.d.ts.map +1 -0
- package/output/components/index.js +35 -0
- package/output/components/input-group.d.ts +17 -0
- package/output/components/input-group.d.ts.map +1 -0
- package/output/components/input-group.js +75 -0
- package/output/components/input.d.ts +3 -0
- package/output/components/input.d.ts.map +1 -0
- package/output/components/input.js +19 -0
- package/output/components/item.d.ts +25 -0
- package/output/components/item.d.ts.map +1 -0
- package/output/components/item.js +89 -0
- package/output/components/json-view/index.d.ts +11 -0
- package/output/components/json-view/index.d.ts.map +1 -0
- package/output/components/json-view/index.js +52 -0
- package/output/components/kbd.d.ts +4 -0
- package/output/components/kbd.d.ts.map +1 -0
- package/output/components/kbd.js +22 -0
- package/output/components/label.d.ts +5 -0
- package/output/components/label.d.ts.map +1 -0
- package/output/components/label.js +20 -0
- package/output/{loading-button → components/loading-button}/index.d.ts +1 -1
- package/output/components/loading-button/index.d.ts.map +1 -0
- package/output/{loading-button → components/loading-button}/index.js +3 -7
- package/output/components/loading-button/index.test.d.ts.map +1 -0
- package/output/{loading-button → components/loading-button}/index.test.js +4 -4
- package/output/components/native-select.d.ts +9 -0
- package/output/components/native-select.d.ts.map +1 -0
- package/output/components/native-select.js +28 -0
- package/output/components/page-state.d.ts +19 -0
- package/output/components/page-state.d.ts.map +1 -0
- package/output/components/page-state.js +13 -0
- package/output/components/popover.d.ts +11 -0
- package/output/components/popover.d.ts.map +1 -0
- package/output/components/popover.js +44 -0
- package/output/components/progress.d.ts +5 -0
- package/output/components/progress.d.ts.map +1 -0
- package/output/components/progress.js +21 -0
- package/output/components/radio-group.d.ts +6 -0
- package/output/components/radio-group.d.ts.map +1 -0
- package/output/components/radio-group.js +25 -0
- package/output/components/scroll-area.d.ts +6 -0
- package/output/components/scroll-area.d.ts.map +1 -0
- package/output/components/scroll-area.js +24 -0
- package/output/components/select.d.ts +17 -0
- package/output/components/select.d.ts.map +1 -0
- package/output/components/select.js +58 -0
- package/output/components/separator.d.ts +6 -0
- package/output/components/separator.d.ts.map +1 -0
- package/output/components/separator.js +19 -0
- package/output/components/sheet.d.ts +16 -0
- package/output/components/sheet.d.ts.map +1 -0
- package/output/components/sheet.js +58 -0
- package/output/components/size-provider/index.d.ts +2 -0
- package/output/components/size-provider/index.d.ts.map +1 -0
- package/output/components/size-provider/index.js +1 -0
- package/output/{size-provider → components/size-provider}/size-provider.d.ts +1 -1
- package/output/components/size-provider/size-provider.d.ts.map +1 -0
- package/output/{size-provider → components/size-provider}/size-provider.js +1 -1
- package/output/components/skeleton.d.ts +3 -0
- package/output/components/skeleton.d.ts.map +1 -0
- package/output/{catalyst/divider.js → components/skeleton.js} +4 -4
- package/output/components/sonner.d.ts +8 -0
- package/output/components/sonner.d.ts.map +1 -0
- package/output/components/sonner.js +34 -0
- package/output/components/spinner.d.ts +3 -0
- package/output/components/spinner.d.ts.map +1 -0
- package/output/{catalyst/divider.jsx → components/spinner.js} +7 -4
- package/output/components/switch.d.ts +8 -0
- package/output/components/switch.d.ts.map +1 -0
- package/output/components/switch.js +20 -0
- package/output/components/table.d.ts +11 -0
- package/output/components/table.d.ts.map +1 -0
- package/output/components/table.js +47 -0
- package/output/components/tabs.d.ts +12 -0
- package/output/components/tabs.d.ts.map +1 -0
- package/output/components/tabs.js +45 -0
- package/output/components/textarea.d.ts +4 -0
- package/output/components/textarea.d.ts.map +1 -0
- package/output/components/textarea.js +19 -0
- package/output/components/theme-switcher.d.ts +6 -0
- package/output/components/theme-switcher.d.ts.map +1 -0
- package/output/components/theme-switcher.js +19 -0
- package/output/{toaster → components/toaster}/index.d.ts +1 -1
- package/output/components/toaster/index.d.ts.map +1 -0
- package/output/{toaster → components/toaster}/index.js +1 -1
- package/output/components/tooltip.d.ts +8 -0
- package/output/components/tooltip.d.ts.map +1 -0
- package/output/components/tooltip.js +33 -0
- package/output/features/confirm-dialog/index.d.ts +39 -0
- package/output/features/confirm-dialog/index.d.ts.map +1 -0
- package/output/features/confirm-dialog/index.js +19 -0
- package/output/features/input-confirm/index.d.ts +26 -0
- package/output/features/input-confirm/index.d.ts.map +1 -0
- package/output/features/input-confirm/index.js +59 -0
- package/output/{signin → features/signin}/context.d.ts +1 -2
- package/output/features/signin/context.d.ts.map +1 -0
- package/output/{signin → features/signin}/context.js +3 -3
- package/output/{signin → features/signin}/index.d.ts +4 -4
- package/output/features/signin/index.d.ts.map +1 -0
- package/output/{signin → features/signin}/index.js +9 -9
- package/output/{signin → features/signin}/service.d.ts +1 -1
- package/output/features/signin/service.d.ts.map +1 -0
- package/output/{signin → features/signin}/service.js +1 -4
- package/output/features/signin/service.test.d.ts.map +1 -0
- package/output/{signin → features/signin}/service.test.js +1 -1
- package/output/features/signin/types.d.ts.map +1 -0
- package/output/hooks/use-loading/index.d.ts +6 -0
- package/output/hooks/use-loading/index.d.ts.map +1 -0
- package/output/hooks/use-loading/index.js +14 -0
- package/output/hooks/use-loading/index.test.d.ts +2 -0
- package/output/hooks/use-loading/index.test.d.ts.map +1 -0
- package/output/hooks/use-loading/index.test.js +24 -0
- package/output/hooks/use-mobile/index.d.ts +2 -0
- package/output/hooks/use-mobile/index.d.ts.map +1 -0
- package/output/hooks/use-mobile/index.js +16 -0
- package/output/hooks/use-observer/index.d.ts +2 -0
- package/output/hooks/use-observer/index.d.ts.map +1 -0
- package/output/hooks/use-observer/index.js +1 -0
- package/output/hooks/use-observer/use-observer.d.ts.map +1 -0
- package/output/{helpers → hooks}/use-observer/use-observer.js +2 -2
- package/output/hooks/use-observer/use-observer.test.d.ts.map +1 -0
- package/output/{use-observer → hooks/use-observer}/use-observer.test.js +2 -2
- package/output/hooks/use-offline/index.d.ts +6 -0
- package/output/hooks/use-offline/index.d.ts.map +1 -0
- package/output/hooks/use-offline/index.js +19 -0
- package/output/layout/app/index.d.ts +34 -0
- package/output/layout/app/index.d.ts.map +1 -0
- package/output/layout/app/index.js +34 -0
- package/output/layout/dashboard/index.d.ts +58 -0
- package/output/layout/dashboard/index.d.ts.map +1 -0
- package/output/layout/dashboard/index.js +71 -0
- package/output/layout/index.d.ts +3 -0
- package/output/layout/index.d.ts.map +1 -0
- package/output/layout/index.js +2 -0
- package/output/services/cache-api/cache-api.d.ts.map +1 -0
- package/output/{cache-api → services/cache-api}/cache-api.js +1 -1
- package/output/services/cache-api/cache-api.test.d.ts.map +1 -0
- package/output/{cache-api → services/cache-api}/cache-api.test.js +1 -1
- package/output/services/cache-api/index.d.ts +2 -0
- package/output/services/cache-api/index.d.ts.map +1 -0
- package/output/services/cache-api/index.js +1 -0
- package/output/{service → services/service}/index.d.ts +1 -1
- package/output/services/service/index.d.ts.map +1 -0
- package/output/{service → services/service}/index.js +1 -1
- package/output/services/service/service.d.ts +135 -0
- package/output/services/service/service.d.ts.map +1 -0
- package/output/services/service/service.js +276 -0
- package/output/services/service/service.test.d.ts.map +1 -0
- package/output/{service → services/service}/service.test.js +1 -1
- package/output/services/side-cache/index.d.ts +2 -0
- package/output/services/side-cache/index.d.ts.map +1 -0
- package/output/services/side-cache/index.js +1 -0
- package/output/services/side-cache/side-cache.d.ts.map +1 -0
- package/output/services/side-cache/side-cache.test.d.ts.map +1 -0
- package/output/{side-cache → services/side-cache}/side-cache.test.js +1 -1
- package/output/utils/avatar/index.d.ts +28 -0
- package/output/utils/avatar/index.d.ts.map +1 -0
- package/output/utils/avatar/index.js +35 -0
- package/output/utils/cn/index.d.ts +3 -0
- package/output/utils/cn/index.d.ts.map +1 -0
- package/output/utils/cn/index.js +5 -0
- package/output/utils/cn/index.test.d.ts +2 -0
- package/output/utils/cn/index.test.d.ts.map +1 -0
- package/output/utils/cn/index.test.js +7 -0
- package/output/utils/delay/index.d.ts +2 -0
- package/output/utils/delay/index.d.ts.map +1 -0
- package/output/utils/delay/index.js +5 -0
- package/output/utils/form/index.d.ts +3 -0
- package/output/utils/form/index.d.ts.map +1 -0
- package/output/utils/form/index.js +1 -0
- package/output/utils/performance/index.d.ts +82 -0
- package/output/utils/performance/index.d.ts.map +1 -0
- package/output/utils/performance/index.js +129 -0
- package/output/utils/redirect/index.d.ts +6 -0
- package/output/utils/redirect/index.d.ts.map +1 -0
- package/output/utils/redirect/index.js +32 -0
- package/package.json +117 -28
- package/styles.css +123 -0
- package/output/cache-api/cache-api.d.ts.map +0 -1
- package/output/cache-api/cache-api.test.d.ts.map +0 -1
- package/output/cache-api/index.d.ts +0 -2
- package/output/cache-api/index.d.ts.map +0 -1
- package/output/cache-api/index.js +0 -1
- package/output/catalyst/alert.d.ts +0 -29
- package/output/catalyst/alert.d.ts.map +0 -1
- package/output/catalyst/alert.js +0 -46
- package/output/catalyst/alert.jsx +0 -55
- package/output/catalyst/auth-layout.d.ts +0 -5
- package/output/catalyst/auth-layout.d.ts.map +0 -1
- package/output/catalyst/auth-layout.js +0 -4
- package/output/catalyst/auth-layout.jsx +0 -7
- package/output/catalyst/avatar.d.ts +0 -16
- package/output/catalyst/avatar.d.ts.map +0 -1
- package/output/catalyst/avatar.js +0 -30
- package/output/catalyst/avatar.jsx +0 -45
- package/output/catalyst/badge.d.ts +0 -35
- package/output/catalyst/badge.d.ts.map +0 -1
- package/output/catalyst/badge.js +0 -46
- package/output/catalyst/badge.jsx +0 -53
- package/output/catalyst/button.d.ts +0 -59
- package/output/catalyst/button.d.ts.map +0 -1
- package/output/catalyst/button.js +0 -181
- package/output/catalyst/button.jsx +0 -187
- package/output/catalyst/checkbox.d.ts +0 -37
- package/output/catalyst/checkbox.d.ts.map +0 -1
- package/output/catalyst/checkbox.js +0 -97
- package/output/catalyst/checkbox.jsx +0 -105
- package/output/catalyst/combobox.d.ts +0 -20
- package/output/catalyst/combobox.d.ts.map +0 -1
- package/output/catalyst/combobox.js +0 -101
- package/output/catalyst/combobox.jsx +0 -120
- package/output/catalyst/description-list.d.ts +0 -4
- package/output/catalyst/description-list.d.ts.map +0 -1
- package/output/catalyst/description-list.js +0 -25
- package/output/catalyst/description-list.jsx +0 -24
- package/output/catalyst/dialog.d.ts +0 -29
- package/output/catalyst/dialog.d.ts.map +0 -1
- package/output/catalyst/dialog.js +0 -46
- package/output/catalyst/dialog.jsx +0 -55
- package/output/catalyst/divider.d.ts +0 -4
- package/output/catalyst/divider.d.ts.map +0 -1
- package/output/catalyst/dropdown.d.ts +0 -33
- package/output/catalyst/dropdown.d.ts.map +0 -1
- package/output/catalyst/dropdown.js +0 -99
- package/output/catalyst/dropdown.jsx +0 -102
- package/output/catalyst/fieldset.d.ts +0 -22
- package/output/catalyst/fieldset.d.ts.map +0 -1
- package/output/catalyst/fieldset.js +0 -42
- package/output/catalyst/fieldset.jsx +0 -41
- package/output/catalyst/heading.d.ts +0 -7
- package/output/catalyst/heading.d.ts.map +0 -1
- package/output/catalyst/heading.js +0 -23
- package/output/catalyst/heading.jsx +0 -22
- package/output/catalyst/input.d.ts +0 -11
- package/output/catalyst/input.d.ts.map +0 -1
- package/output/catalyst/input.js +0 -70
- package/output/catalyst/input.jsx +0 -73
- package/output/catalyst/link.d.ts +0 -13
- package/output/catalyst/link.d.ts.map +0 -1
- package/output/catalyst/link.js +0 -37
- package/output/catalyst/link.jsx +0 -14
- package/output/catalyst/listbox.d.ts +0 -16
- package/output/catalyst/listbox.d.ts.map +0 -1
- package/output/catalyst/listbox.js +0 -99
- package/output/catalyst/listbox.jsx +0 -120
- package/output/catalyst/navbar.d.ts +0 -16
- package/output/catalyst/navbar.d.ts.map +0 -1
- package/output/catalyst/navbar.js +0 -59
- package/output/catalyst/navbar.jsx +0 -67
- package/output/catalyst/pagination.d.ts +0 -18
- package/output/catalyst/pagination.d.ts.map +0 -1
- package/output/catalyst/pagination.js +0 -35
- package/output/catalyst/pagination.jsx +0 -52
- package/output/catalyst/radio.d.ts +0 -38
- package/output/catalyst/radio.d.ts.map +0 -1
- package/output/catalyst/radio.js +0 -100
- package/output/catalyst/radio.jsx +0 -103
- package/output/catalyst/select.d.ts +0 -6
- package/output/catalyst/select.d.ts.map +0 -1
- package/output/catalyst/select.js +0 -52
- package/output/catalyst/select.jsx +0 -59
- package/output/catalyst/sidebar-layout.d.ts +0 -6
- package/output/catalyst/sidebar-layout.d.ts.map +0 -1
- package/output/catalyst/sidebar-layout.js +0 -18
- package/output/catalyst/sidebar-layout.jsx +0 -58
- package/output/catalyst/sidebar.d.ts +0 -20
- package/output/catalyst/sidebar.d.ts.map +0 -1
- package/output/catalyst/sidebar.js +0 -77
- package/output/catalyst/sidebar.jsx +0 -85
- package/output/catalyst/stacked-layout.d.ts +0 -6
- package/output/catalyst/stacked-layout.d.ts.map +0 -1
- package/output/catalyst/stacked-layout.js +0 -18
- package/output/catalyst/stacked-layout.jsx +0 -55
- package/output/catalyst/switch.d.ts +0 -37
- package/output/catalyst/switch.d.ts.map +0 -1
- package/output/catalyst/switch.js +0 -160
- package/output/catalyst/switch.jsx +0 -161
- package/output/catalyst/table.d.ts +0 -17
- package/output/catalyst/table.d.ts.map +0 -1
- package/output/catalyst/table.js +0 -56
- package/output/catalyst/table.jsx +0 -68
- package/output/catalyst/text.d.ts +0 -6
- package/output/catalyst/text.d.ts.map +0 -1
- package/output/catalyst/text.js +0 -30
- package/output/catalyst/text.jsx +0 -29
- package/output/catalyst/textarea.d.ts +0 -7
- package/output/catalyst/textarea.d.ts.map +0 -1
- package/output/catalyst/textarea.js +0 -48
- package/output/catalyst/textarea.jsx +0 -49
- package/output/catalyst-config/catalyst-config.d.ts +0 -14
- package/output/catalyst-config/catalyst-config.d.ts.map +0 -1
- package/output/catalyst-config/catalyst-config.js +0 -14
- package/output/catalyst-config/index.d.ts +0 -3
- package/output/catalyst-config/index.d.ts.map +0 -1
- package/output/catalyst-config/index.js +0 -1
- package/output/helpers/cache-api/cache-api.d.ts +0 -13
- package/output/helpers/cache-api/cache-api.d.ts.map +0 -1
- package/output/helpers/cache-api/cache-api.js +0 -114
- package/output/helpers/cache-api/cache-api.test.d.ts +0 -2
- package/output/helpers/cache-api/cache-api.test.d.ts.map +0 -1
- package/output/helpers/cache-api/cache-api.test.js +0 -348
- package/output/helpers/cache-api/index.d.ts +0 -2
- package/output/helpers/cache-api/index.d.ts.map +0 -1
- package/output/helpers/cache-api/index.js +0 -1
- package/output/helpers/service/index.d.ts +0 -1
- package/output/helpers/service/index.d.ts.map +0 -1
- package/output/helpers/service/index.js +0 -1
- package/output/helpers/service/service.d.ts +0 -5
- package/output/helpers/service/service.d.ts.map +0 -1
- package/output/helpers/service/service.js +0 -2
- package/output/helpers/side-cache/index.d.ts +0 -2
- package/output/helpers/side-cache/index.d.ts.map +0 -1
- package/output/helpers/side-cache/index.js +0 -1
- package/output/helpers/side-cache/side-cache.d.ts +0 -10
- package/output/helpers/side-cache/side-cache.d.ts.map +0 -1
- package/output/helpers/side-cache/side-cache.js +0 -137
- package/output/helpers/side-cache/side-cache.test.d.ts.map +0 -1
- package/output/helpers/side-cache/side-cache.test.js +0 -179
- package/output/helpers/use-observer/index.d.ts +0 -2
- package/output/helpers/use-observer/index.d.ts.map +0 -1
- package/output/helpers/use-observer/index.js +0 -1
- package/output/helpers/use-observer/use-observer.d.ts.map +0 -1
- package/output/helpers/use-observer/use-observer.test.d.ts.map +0 -1
- package/output/helpers/use-observer/use-observer.test.jsx +0 -134
- package/output/loading-button/index.d.ts.map +0 -1
- package/output/loading-button/index.test.d.ts.map +0 -1
- package/output/service/index.d.ts.map +0 -1
- package/output/service/service.d.ts +0 -286
- package/output/service/service.d.ts.map +0 -1
- package/output/service/service.js +0 -351
- package/output/service/service.test.d.ts.map +0 -1
- package/output/service/service.test.jsx +0 -367
- package/output/side-cache/index.d.ts +0 -2
- package/output/side-cache/index.d.ts.map +0 -1
- package/output/side-cache/index.js +0 -1
- package/output/side-cache/side-cache.d.ts.map +0 -1
- package/output/side-cache/side-cache.test.d.ts +0 -2
- package/output/side-cache/side-cache.test.d.ts.map +0 -1
- package/output/signin/context.d.ts.map +0 -1
- package/output/signin/index.d.ts.map +0 -1
- package/output/signin/service.d.ts.map +0 -1
- package/output/signin/service.test.d.ts.map +0 -1
- package/output/signin/types.d.ts.map +0 -1
- package/output/size-provider/index.d.ts +0 -2
- package/output/size-provider/index.d.ts.map +0 -1
- package/output/size-provider/index.js +0 -1
- package/output/size-provider/size-provider.d.ts.map +0 -1
- package/output/toaster/index.d.ts.map +0 -1
- package/output/use-observer/index.d.ts +0 -2
- package/output/use-observer/index.d.ts.map +0 -1
- package/output/use-observer/index.js +0 -1
- package/output/use-observer/use-observer.d.ts +0 -3
- package/output/use-observer/use-observer.d.ts.map +0 -1
- package/output/use-observer/use-observer.js +0 -16
- package/output/use-observer/use-observer.test.d.ts +0 -2
- package/output/use-observer/use-observer.test.d.ts.map +0 -1
- package/output/use-observer/use-observer.test.jsx +0 -134
- /package/output/{loading-button → components/loading-button}/index.test.d.ts +0 -0
- /package/output/{service → features/signin}/service.test.d.ts +0 -0
- /package/output/{signin → features/signin}/types.d.ts +0 -0
- /package/output/{signin → features/signin}/types.js +0 -0
- /package/output/{helpers → hooks}/use-observer/use-observer.d.ts +0 -0
- /package/output/{helpers → hooks}/use-observer/use-observer.test.d.ts +0 -0
- /package/output/{cache-api → services/cache-api}/cache-api.d.ts +0 -0
- /package/output/{cache-api → services/cache-api}/cache-api.test.d.ts +0 -0
- /package/output/{signin → services/service}/service.test.d.ts +0 -0
- /package/output/{side-cache → services/side-cache}/side-cache.d.ts +0 -0
- /package/output/{side-cache → services/side-cache}/side-cache.js +0 -0
- /package/output/{helpers → services}/side-cache/side-cache.test.d.ts +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import * as Headless from '@headlessui/react';
|
|
14
|
-
import clsx from 'clsx';
|
|
15
|
-
export function Fieldset(_a) {
|
|
16
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
17
|
-
return (_jsx(Headless.Fieldset, Object.assign({}, props, { className: clsx(className, '*:data-[slot=text]:mt-1 [&>*+[data-slot=control]]:mt-6') })));
|
|
18
|
-
}
|
|
19
|
-
export function Legend(_a) {
|
|
20
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
21
|
-
return (_jsx(Headless.Legend, Object.assign({ "data-slot": "legend" }, props, { className: clsx(className, 'text-base/6 font-semibold text-zinc-950 data-disabled:opacity-50 sm:text-sm/6 dark:text-white') })));
|
|
22
|
-
}
|
|
23
|
-
export function FieldGroup(_a) {
|
|
24
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
25
|
-
return _jsx("div", Object.assign({ "data-slot": "control" }, props, { className: clsx(className, 'space-y-8') }));
|
|
26
|
-
}
|
|
27
|
-
export function Field(_a) {
|
|
28
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
29
|
-
return (_jsx(Headless.Field, Object.assign({}, props, { className: clsx(className, '[&>[data-slot=label]+[data-slot=control]]:mt-3', '[&>[data-slot=label]+[data-slot=description]]:mt-1', '[&>[data-slot=description]+[data-slot=control]]:mt-3', '[&>[data-slot=control]+[data-slot=description]]:mt-3', '[&>[data-slot=control]+[data-slot=error]]:mt-3', '*:data-[slot=label]:font-medium') })));
|
|
30
|
-
}
|
|
31
|
-
export function Label(_a) {
|
|
32
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
33
|
-
return (_jsx(Headless.Label, Object.assign({ "data-slot": "label" }, props, { className: clsx(className, 'text-base/6 text-zinc-950 select-none data-disabled:opacity-50 sm:text-sm/6 dark:text-white') })));
|
|
34
|
-
}
|
|
35
|
-
export function Description(_a) {
|
|
36
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
37
|
-
return (_jsx(Headless.Description, Object.assign({ "data-slot": "description" }, props, { className: clsx(className, 'text-base/6 text-zinc-500 data-disabled:opacity-50 sm:text-sm/6 dark:text-zinc-400') })));
|
|
38
|
-
}
|
|
39
|
-
export function ErrorMessage(_a) {
|
|
40
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
41
|
-
return (_jsx(Headless.Description, Object.assign({ "data-slot": "error" }, props, { className: clsx(className, 'text-base/6 text-red-600 data-disabled:opacity-50 sm:text-sm/6 dark:text-red-500') })));
|
|
42
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as Headless from '@headlessui/react';
|
|
13
|
-
import clsx from 'clsx';
|
|
14
|
-
export function Fieldset(_a) {
|
|
15
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
16
|
-
return (<Headless.Fieldset {...props} className={clsx(className, '*:data-[slot=text]:mt-1 [&>*+[data-slot=control]]:mt-6')}/>);
|
|
17
|
-
}
|
|
18
|
-
export function Legend(_a) {
|
|
19
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
20
|
-
return (<Headless.Legend data-slot="legend" {...props} className={clsx(className, 'text-base/6 font-semibold text-zinc-950 data-disabled:opacity-50 sm:text-sm/6 dark:text-white')}/>);
|
|
21
|
-
}
|
|
22
|
-
export function FieldGroup(_a) {
|
|
23
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
24
|
-
return <div data-slot="control" {...props} className={clsx(className, 'space-y-8')}/>;
|
|
25
|
-
}
|
|
26
|
-
export function Field(_a) {
|
|
27
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
28
|
-
return (<Headless.Field {...props} className={clsx(className, '[&>[data-slot=label]+[data-slot=control]]:mt-3', '[&>[data-slot=label]+[data-slot=description]]:mt-1', '[&>[data-slot=description]+[data-slot=control]]:mt-3', '[&>[data-slot=control]+[data-slot=description]]:mt-3', '[&>[data-slot=control]+[data-slot=error]]:mt-3', '*:data-[slot=label]:font-medium')}/>);
|
|
29
|
-
}
|
|
30
|
-
export function Label(_a) {
|
|
31
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
32
|
-
return (<Headless.Label data-slot="label" {...props} className={clsx(className, 'text-base/6 text-zinc-950 select-none data-disabled:opacity-50 sm:text-sm/6 dark:text-white')}/>);
|
|
33
|
-
}
|
|
34
|
-
export function Description(_a) {
|
|
35
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
36
|
-
return (<Headless.Description data-slot="description" {...props} className={clsx(className, 'text-base/6 text-zinc-500 data-disabled:opacity-50 sm:text-sm/6 dark:text-zinc-400')}/>);
|
|
37
|
-
}
|
|
38
|
-
export function ErrorMessage(_a) {
|
|
39
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
40
|
-
return (<Headless.Description data-slot="error" {...props} className={clsx(className, 'text-base/6 text-red-600 data-disabled:opacity-50 sm:text-sm/6 dark:text-red-500')}/>);
|
|
41
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
type HeadingProps = {
|
|
2
|
-
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
-
} & React.ComponentPropsWithoutRef<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
|
|
4
|
-
export declare function Heading({ className, level, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare function Subheading({ className, level, ...props }: HeadingProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export {};
|
|
7
|
-
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../source/catalyst/heading.tsx"],"names":[],"mappings":"AAEA,KAAK,YAAY,GAAG;IAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAAE,GAAG,KAAK,CAAC,wBAAwB,CACpF,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CACxC,CAAA;AAED,wBAAgB,OAAO,CAAC,EAAE,SAAS,EAAE,KAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CASvE;AAED,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,KAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,2CAS1E"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import clsx from 'clsx';
|
|
14
|
-
export function Heading(_a) {
|
|
15
|
-
var { className, level = 1 } = _a, props = __rest(_a, ["className", "level"]);
|
|
16
|
-
let Element = `h${level}`;
|
|
17
|
-
return (_jsx(Element, Object.assign({}, props, { className: clsx(className, 'text-2xl/8 font-semibold text-zinc-950 sm:text-xl/8 dark:text-white') })));
|
|
18
|
-
}
|
|
19
|
-
export function Subheading(_a) {
|
|
20
|
-
var { className, level = 2 } = _a, props = __rest(_a, ["className", "level"]);
|
|
21
|
-
let Element = `h${level}`;
|
|
22
|
-
return (_jsx(Element, Object.assign({}, props, { className: clsx(className, 'text-base/7 font-semibold text-zinc-950 sm:text-sm/6 dark:text-white') })));
|
|
23
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import clsx from 'clsx';
|
|
13
|
-
export function Heading(_a) {
|
|
14
|
-
var { className, level = 1 } = _a, props = __rest(_a, ["className", "level"]);
|
|
15
|
-
let Element = `h${level}`;
|
|
16
|
-
return (<Element {...props} className={clsx(className, 'text-2xl/8 font-semibold text-zinc-950 sm:text-xl/8 dark:text-white')}/>);
|
|
17
|
-
}
|
|
18
|
-
export function Subheading(_a) {
|
|
19
|
-
var { className, level = 2 } = _a, props = __rest(_a, ["className", "level"]);
|
|
20
|
-
let Element = `h${level}`;
|
|
21
|
-
return (<Element {...props} className={clsx(className, 'text-base/7 font-semibold text-zinc-950 sm:text-sm/6 dark:text-white')}/>);
|
|
22
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as Headless from '@headlessui/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export declare function InputGroup({ children }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
declare const dateTypes: string[];
|
|
5
|
-
type DateType = (typeof dateTypes)[number];
|
|
6
|
-
export declare const Input: React.ForwardRefExoticComponent<{
|
|
7
|
-
className?: string;
|
|
8
|
-
type?: "email" | "number" | "password" | "search" | "tel" | "text" | "url" | DateType;
|
|
9
|
-
} & Omit<Headless.InputProps<"input">, "className" | "as"> & React.RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../source/catalyst/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAE7C,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,2CAe9E;AAED,QAAA,MAAM,SAAS,UAAsD,CAAA;AACrE,KAAK,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1C,eAAO,MAAM,KAAK;gBAKF,MAAM;WACX,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ;mGA+DvF,CAAA"}
|
package/output/catalyst/input.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import * as Headless from '@headlessui/react';
|
|
14
|
-
import clsx from 'clsx';
|
|
15
|
-
import { forwardRef } from 'react';
|
|
16
|
-
export function InputGroup({ children }) {
|
|
17
|
-
return (_jsx("span", { "data-slot": "control", className: clsx('relative isolate block', 'has-[[data-slot=icon]:first-child]:[&_input]:pl-10 has-[[data-slot=icon]:last-child]:[&_input]:pr-10 sm:has-[[data-slot=icon]:first-child]:[&_input]:pl-8 sm:has-[[data-slot=icon]:last-child]:[&_input]:pr-8', '*:data-[slot=icon]:pointer-events-none *:data-[slot=icon]:absolute *:data-[slot=icon]:top-3 *:data-[slot=icon]:z-10 *:data-[slot=icon]:size-5 sm:*:data-[slot=icon]:top-2.5 sm:*:data-[slot=icon]:size-4', '[&>[data-slot=icon]:first-child]:left-3 sm:[&>[data-slot=icon]:first-child]:left-2.5 [&>[data-slot=icon]:last-child]:right-3 sm:[&>[data-slot=icon]:last-child]:right-2.5', '*:data-[slot=icon]:text-zinc-500 dark:*:data-[slot=icon]:text-zinc-400'), children: children }));
|
|
18
|
-
}
|
|
19
|
-
const dateTypes = ['date', 'datetime-local', 'month', 'time', 'week'];
|
|
20
|
-
export const Input = forwardRef(function Input(_a, ref) {
|
|
21
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
22
|
-
return (_jsx("span", { "data-slot": "control", className: clsx([
|
|
23
|
-
className,
|
|
24
|
-
// Basic layout
|
|
25
|
-
'relative block w-full',
|
|
26
|
-
// Background color + shadow applied to inset pseudo element, so shadow blends with border in light mode
|
|
27
|
-
'before:absolute before:inset-px before:rounded-[calc(var(--radius-lg)-1px)] before:bg-white before:shadow-sm',
|
|
28
|
-
// Background color is moved to control and shadow is removed in dark mode so hide `before` pseudo
|
|
29
|
-
'dark:before:hidden',
|
|
30
|
-
// Focus ring
|
|
31
|
-
'after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-transparent after:ring-inset sm:focus-within:after:ring-2 sm:focus-within:after:ring-blue-500',
|
|
32
|
-
// Disabled state
|
|
33
|
-
'has-data-disabled:opacity-50 has-data-disabled:before:bg-zinc-950/5 has-data-disabled:before:shadow-none',
|
|
34
|
-
// Invalid state
|
|
35
|
-
'has-data-invalid:before:shadow-red-500/10',
|
|
36
|
-
]), children: _jsx(Headless.Input, Object.assign({ ref: ref }, props, { className: clsx([
|
|
37
|
-
// Date classes
|
|
38
|
-
props.type &&
|
|
39
|
-
dateTypes.includes(props.type) && [
|
|
40
|
-
'[&::-webkit-datetime-edit-fields-wrapper]:p-0',
|
|
41
|
-
'[&::-webkit-date-and-time-value]:min-h-[1.5em]',
|
|
42
|
-
'[&::-webkit-datetime-edit]:inline-flex',
|
|
43
|
-
'[&::-webkit-datetime-edit]:p-0',
|
|
44
|
-
'[&::-webkit-datetime-edit-year-field]:p-0',
|
|
45
|
-
'[&::-webkit-datetime-edit-month-field]:p-0',
|
|
46
|
-
'[&::-webkit-datetime-edit-day-field]:p-0',
|
|
47
|
-
'[&::-webkit-datetime-edit-hour-field]:p-0',
|
|
48
|
-
'[&::-webkit-datetime-edit-minute-field]:p-0',
|
|
49
|
-
'[&::-webkit-datetime-edit-second-field]:p-0',
|
|
50
|
-
'[&::-webkit-datetime-edit-millisecond-field]:p-0',
|
|
51
|
-
'[&::-webkit-datetime-edit-meridiem-field]:p-0',
|
|
52
|
-
],
|
|
53
|
-
// Basic layout
|
|
54
|
-
'relative block w-full appearance-none rounded-lg px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)]',
|
|
55
|
-
// Typography
|
|
56
|
-
'text-base/6 text-zinc-950 placeholder:text-zinc-500 sm:text-sm/6 dark:text-white',
|
|
57
|
-
// Border
|
|
58
|
-
'border border-zinc-950/10 data-hover:border-zinc-950/20 dark:border-white/10 dark:data-hover:border-white/20',
|
|
59
|
-
// Background color
|
|
60
|
-
'bg-transparent dark:bg-white/5',
|
|
61
|
-
// Hide default focus styles
|
|
62
|
-
'focus:outline-hidden',
|
|
63
|
-
// Invalid state
|
|
64
|
-
'data-invalid:border-red-500 data-invalid:data-hover:border-red-500 dark:data-invalid:border-red-500 dark:data-invalid:data-hover:border-red-500',
|
|
65
|
-
// Disabled state
|
|
66
|
-
'data-disabled:border-zinc-950/20 dark:data-disabled:border-white/15 dark:data-disabled:bg-white/2.5 dark:data-hover:data-disabled:border-white/15',
|
|
67
|
-
// System icons
|
|
68
|
-
'dark:scheme-dark',
|
|
69
|
-
]) })) }));
|
|
70
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as Headless from '@headlessui/react';
|
|
13
|
-
import clsx from 'clsx';
|
|
14
|
-
import React, { forwardRef } from 'react';
|
|
15
|
-
export function InputGroup({ children }) {
|
|
16
|
-
return (<span data-slot="control" className={clsx('relative isolate block', 'has-[[data-slot=icon]:first-child]:[&_input]:pl-10 has-[[data-slot=icon]:last-child]:[&_input]:pr-10 sm:has-[[data-slot=icon]:first-child]:[&_input]:pl-8 sm:has-[[data-slot=icon]:last-child]:[&_input]:pr-8', '*:data-[slot=icon]:pointer-events-none *:data-[slot=icon]:absolute *:data-[slot=icon]:top-3 *:data-[slot=icon]:z-10 *:data-[slot=icon]:size-5 sm:*:data-[slot=icon]:top-2.5 sm:*:data-[slot=icon]:size-4', '[&>[data-slot=icon]:first-child]:left-3 sm:[&>[data-slot=icon]:first-child]:left-2.5 [&>[data-slot=icon]:last-child]:right-3 sm:[&>[data-slot=icon]:last-child]:right-2.5', '*:data-[slot=icon]:text-zinc-500 dark:*:data-[slot=icon]:text-zinc-400')}>
|
|
17
|
-
{children}
|
|
18
|
-
</span>);
|
|
19
|
-
}
|
|
20
|
-
const dateTypes = ['date', 'datetime-local', 'month', 'time', 'week'];
|
|
21
|
-
export const Input = forwardRef(function Input(_a, ref) {
|
|
22
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
23
|
-
return (<span data-slot="control" className={clsx([
|
|
24
|
-
className,
|
|
25
|
-
// Basic layout
|
|
26
|
-
'relative block w-full',
|
|
27
|
-
// Background color + shadow applied to inset pseudo element, so shadow blends with border in light mode
|
|
28
|
-
'before:absolute before:inset-px before:rounded-[calc(var(--radius-lg)-1px)] before:bg-white before:shadow-sm',
|
|
29
|
-
// Background color is moved to control and shadow is removed in dark mode so hide `before` pseudo
|
|
30
|
-
'dark:before:hidden',
|
|
31
|
-
// Focus ring
|
|
32
|
-
'after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-transparent after:ring-inset sm:focus-within:after:ring-2 sm:focus-within:after:ring-blue-500',
|
|
33
|
-
// Disabled state
|
|
34
|
-
'has-data-disabled:opacity-50 has-data-disabled:before:bg-zinc-950/5 has-data-disabled:before:shadow-none',
|
|
35
|
-
// Invalid state
|
|
36
|
-
'has-data-invalid:before:shadow-red-500/10',
|
|
37
|
-
])}>
|
|
38
|
-
<Headless.Input ref={ref} {...props} className={clsx([
|
|
39
|
-
// Date classes
|
|
40
|
-
props.type &&
|
|
41
|
-
dateTypes.includes(props.type) && [
|
|
42
|
-
'[&::-webkit-datetime-edit-fields-wrapper]:p-0',
|
|
43
|
-
'[&::-webkit-date-and-time-value]:min-h-[1.5em]',
|
|
44
|
-
'[&::-webkit-datetime-edit]:inline-flex',
|
|
45
|
-
'[&::-webkit-datetime-edit]:p-0',
|
|
46
|
-
'[&::-webkit-datetime-edit-year-field]:p-0',
|
|
47
|
-
'[&::-webkit-datetime-edit-month-field]:p-0',
|
|
48
|
-
'[&::-webkit-datetime-edit-day-field]:p-0',
|
|
49
|
-
'[&::-webkit-datetime-edit-hour-field]:p-0',
|
|
50
|
-
'[&::-webkit-datetime-edit-minute-field]:p-0',
|
|
51
|
-
'[&::-webkit-datetime-edit-second-field]:p-0',
|
|
52
|
-
'[&::-webkit-datetime-edit-millisecond-field]:p-0',
|
|
53
|
-
'[&::-webkit-datetime-edit-meridiem-field]:p-0',
|
|
54
|
-
],
|
|
55
|
-
// Basic layout
|
|
56
|
-
'relative block w-full appearance-none rounded-lg px-[calc(--spacing(3.5)-1px)] py-[calc(--spacing(2.5)-1px)] sm:px-[calc(--spacing(3)-1px)] sm:py-[calc(--spacing(1.5)-1px)]',
|
|
57
|
-
// Typography
|
|
58
|
-
'text-base/6 text-zinc-950 placeholder:text-zinc-500 sm:text-sm/6 dark:text-white',
|
|
59
|
-
// Border
|
|
60
|
-
'border border-zinc-950/10 data-hover:border-zinc-950/20 dark:border-white/10 dark:data-hover:border-white/20',
|
|
61
|
-
// Background color
|
|
62
|
-
'bg-transparent dark:bg-white/5',
|
|
63
|
-
// Hide default focus styles
|
|
64
|
-
'focus:outline-hidden',
|
|
65
|
-
// Invalid state
|
|
66
|
-
'data-invalid:border-red-500 data-invalid:data-hover:border-red-500 dark:data-invalid:border-red-500 dark:data-invalid:data-hover:border-red-500',
|
|
67
|
-
// Disabled state
|
|
68
|
-
'data-disabled:border-zinc-950/20 dark:data-disabled:border-white/15 dark:data-disabled:bg-white/2.5 dark:data-hover:data-disabled:border-white/15',
|
|
69
|
-
// System icons
|
|
70
|
-
'dark:scheme-dark',
|
|
71
|
-
])}/>
|
|
72
|
-
</span>);
|
|
73
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Update this component to use your client-side framework's link
|
|
3
|
-
* component. We've provided examples of how to do this for Next.js, Remix, and
|
|
4
|
-
* Inertia.js in the Catalyst documentation:
|
|
5
|
-
*
|
|
6
|
-
* https://catalyst.tailwindui.com/docs#client-side-router-integration
|
|
7
|
-
*/
|
|
8
|
-
import React from 'react';
|
|
9
|
-
export declare const Link: React.ForwardRefExoticComponent<{
|
|
10
|
-
href: string;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
} & Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
13
|
-
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../source/catalyst/link.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,eAAO,MAAM,IAAI;UAEP,MAAM;SACP,KAAK,CAAC,WAAW;oJA0BxB,CAAA"}
|
package/output/catalyst/link.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
/**
|
|
14
|
-
* TODO: Update this component to use your client-side framework's link
|
|
15
|
-
* component. We've provided examples of how to do this for Next.js, Remix, and
|
|
16
|
-
* Inertia.js in the Catalyst documentation:
|
|
17
|
-
*
|
|
18
|
-
* https://catalyst.tailwindui.com/docs#client-side-router-integration
|
|
19
|
-
*/
|
|
20
|
-
import { forwardRef } from 'react';
|
|
21
|
-
import * as Headless from '@headlessui/react';
|
|
22
|
-
import { useCatalystConfig } from '../catalyst-config/catalyst-config';
|
|
23
|
-
export const Link = forwardRef(function Link(props, ref) {
|
|
24
|
-
const params = Object.assign({}, props);
|
|
25
|
-
const { link = {} } = useCatalystConfig();
|
|
26
|
-
if (link.defaultAs && params.as == undefined) {
|
|
27
|
-
params.as = link.defaultAs;
|
|
28
|
-
}
|
|
29
|
-
if (link.forceAs) {
|
|
30
|
-
params.as = link.forceAs;
|
|
31
|
-
}
|
|
32
|
-
if (!params.as) {
|
|
33
|
-
params.as = 'a';
|
|
34
|
-
}
|
|
35
|
-
const { as: Component } = params, restProps = __rest(params, ["as"]);
|
|
36
|
-
return (_jsx(Headless.DataInteractive, { children: _jsx(Component, Object.assign({}, params, { ref: ref })) }));
|
|
37
|
-
});
|
package/output/catalyst/link.jsx
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Update this component to use your client-side framework's link
|
|
3
|
-
* component. We've provided examples of how to do this for Next.js, Remix, and
|
|
4
|
-
* Inertia.js in the Catalyst documentation:
|
|
5
|
-
*
|
|
6
|
-
* https://catalyst.tailwindui.com/docs#client-side-router-integration
|
|
7
|
-
*/
|
|
8
|
-
import * as Headless from '@headlessui/react';
|
|
9
|
-
import React, { forwardRef } from 'react';
|
|
10
|
-
export const Link = forwardRef(function Link(props, ref) {
|
|
11
|
-
return (<Headless.DataInteractive>
|
|
12
|
-
<a {...props} ref={ref}/>
|
|
13
|
-
</Headless.DataInteractive>);
|
|
14
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as Headless from '@headlessui/react';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
export declare function Listbox<T>({ className, placeholder, autoFocus, 'aria-label': ariaLabel, children: options, ...props }: {
|
|
4
|
-
className?: string;
|
|
5
|
-
placeholder?: React.ReactNode;
|
|
6
|
-
autoFocus?: boolean;
|
|
7
|
-
'aria-label'?: string;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
} & Omit<Headless.ListboxProps<typeof Fragment, T>, 'as' | 'multiple'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare function ListboxOption<T>({ children, className, ...props }: {
|
|
11
|
-
className?: string;
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
} & Omit<Headless.ListboxOptionProps<'div', T>, 'as' | 'className'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare function ListboxLabel({ className, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare function ListboxDescription({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=listbox.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"listbox.d.ts","sourceRoot":"","sources":["../../source/catalyst/listbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,wBAAgB,OAAO,CAAC,CAAC,EAAE,EACzB,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,QAAQ,EAAE,OAAO,EACjB,GAAG,KAAK,EACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,GAAG,UAAU,CAAC,2CAkFrE;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,EAC/B,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,IAAI,CAC1D,QAAQ,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC,CAAC,EACrC,IAAI,GAAG,WAAW,CACnB,2CAgDA;AAED,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,2CAE3F;AAED,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,2CAY3G"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
import * as Headless from '@headlessui/react';
|
|
15
|
-
import clsx from 'clsx';
|
|
16
|
-
import { Fragment } from 'react';
|
|
17
|
-
export function Listbox(_a) {
|
|
18
|
-
var { className, placeholder, autoFocus, 'aria-label': ariaLabel, children: options } = _a, props = __rest(_a, ["className", "placeholder", "autoFocus", 'aria-label', "children"]);
|
|
19
|
-
return (_jsxs(Headless.Listbox, Object.assign({}, props, { multiple: false, children: [_jsxs(Headless.ListboxButton, { autoFocus: autoFocus, "data-slot": "control", "aria-label": ariaLabel, className: clsx([
|
|
20
|
-
className,
|
|
21
|
-
// Basic layout
|
|
22
|
-
'group relative block w-full',
|
|
23
|
-
// Background color + shadow applied to inset pseudo element, so shadow blends with border in light mode
|
|
24
|
-
'before:absolute before:inset-px before:rounded-[calc(var(--radius-lg)-1px)] before:bg-white before:shadow-sm',
|
|
25
|
-
// Background color is moved to control and shadow is removed in dark mode so hide `before` pseudo
|
|
26
|
-
'dark:before:hidden',
|
|
27
|
-
// Hide default focus styles
|
|
28
|
-
'focus:outline-hidden',
|
|
29
|
-
// Focus ring
|
|
30
|
-
'after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-transparent after:ring-inset data-focus:after:ring-2 data-focus:after:ring-blue-500',
|
|
31
|
-
// Disabled state
|
|
32
|
-
'data-disabled:opacity-50 data-disabled:before:bg-zinc-950/5 data-disabled:before:shadow-none',
|
|
33
|
-
]), children: [_jsx(Headless.ListboxSelectedOption, { as: "span", options: options, placeholder: placeholder && _jsx("span", { className: "block truncate text-zinc-500", children: placeholder }), className: clsx([
|
|
34
|
-
// Basic layout
|
|
35
|
-
'relative block w-full appearance-none rounded-lg py-[calc(--spacing(2.5)-1px)] sm:py-[calc(--spacing(1.5)-1px)]',
|
|
36
|
-
// Set minimum height for when no value is selected
|
|
37
|
-
'min-h-11 sm:min-h-9',
|
|
38
|
-
// Horizontal padding
|
|
39
|
-
'pr-[calc(--spacing(7)-1px)] pl-[calc(--spacing(3.5)-1px)] sm:pl-[calc(--spacing(3)-1px)]',
|
|
40
|
-
// Typography
|
|
41
|
-
'text-left text-base/6 text-zinc-950 placeholder:text-zinc-500 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]',
|
|
42
|
-
// Border
|
|
43
|
-
'border border-zinc-950/10 group-data-active:border-zinc-950/20 group-data-hover:border-zinc-950/20 dark:border-white/10 dark:group-data-active:border-white/20 dark:group-data-hover:border-white/20',
|
|
44
|
-
// Background color
|
|
45
|
-
'bg-transparent dark:bg-white/5',
|
|
46
|
-
// Invalid state
|
|
47
|
-
'group-data-invalid:border-red-500 group-data-hover:group-data-invalid:border-red-500 dark:group-data-invalid:border-red-600 dark:data-hover:group-data-invalid:border-red-600',
|
|
48
|
-
// Disabled state
|
|
49
|
-
'group-data-disabled:border-zinc-950/20 group-data-disabled:opacity-100 dark:group-data-disabled:border-white/15 dark:group-data-disabled:bg-white/2.5 dark:group-data-disabled:data-hover:border-white/15',
|
|
50
|
-
]) }), _jsx("span", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2", children: _jsxs("svg", { className: "size-5 stroke-zinc-500 group-data-disabled:stroke-zinc-600 sm:size-4 dark:stroke-zinc-400 forced-colors:stroke-[CanvasText]", viewBox: "0 0 16 16", "aria-hidden": "true", fill: "none", children: [_jsx("path", { d: "M5.75 10.75L8 13L10.25 10.75", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("path", { d: "M10.25 5.25L8 3L5.75 5.25", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })] }) })] }), _jsx(Headless.ListboxOptions, { transition: true, anchor: "selection start", className: clsx(
|
|
51
|
-
// Anchor positioning
|
|
52
|
-
'[--anchor-offset:-1.625rem] [--anchor-padding:--spacing(4)] sm:[--anchor-offset:-1.375rem]',
|
|
53
|
-
// Base styles
|
|
54
|
-
'isolate w-max min-w-[calc(var(--button-width)+1.75rem)] scroll-py-1 rounded-xl p-1 select-none',
|
|
55
|
-
// Invisible border that is only visible in `forced-colors` mode for accessibility purposes
|
|
56
|
-
'outline outline-transparent focus:outline-hidden',
|
|
57
|
-
// Handle scrolling when menu won't fit in viewport
|
|
58
|
-
'overflow-y-scroll overscroll-contain',
|
|
59
|
-
// Popover background
|
|
60
|
-
'bg-white/75 backdrop-blur-xl dark:bg-zinc-800/75',
|
|
61
|
-
// Shadows
|
|
62
|
-
'shadow-lg ring-1 ring-zinc-950/10 dark:ring-white/10 dark:ring-inset',
|
|
63
|
-
// Transitions
|
|
64
|
-
'transition-opacity duration-100 ease-in data-closed:data-leave:opacity-0 data-transition:pointer-events-none'), children: options })] })));
|
|
65
|
-
}
|
|
66
|
-
export function ListboxOption(_a) {
|
|
67
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
68
|
-
let sharedClasses = clsx(
|
|
69
|
-
// Base
|
|
70
|
-
'flex min-w-0 items-center',
|
|
71
|
-
// Icons
|
|
72
|
-
'*:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 sm:*:data-[slot=icon]:size-4', '*:data-[slot=icon]:text-zinc-500 group-data-focus/option:*:data-[slot=icon]:text-white dark:*:data-[slot=icon]:text-zinc-400', 'forced-colors:*:data-[slot=icon]:text-[CanvasText] forced-colors:group-data-focus/option:*:data-[slot=icon]:text-[Canvas]',
|
|
73
|
-
// Avatars
|
|
74
|
-
'*:data-[slot=avatar]:-mx-0.5 *:data-[slot=avatar]:size-6 sm:*:data-[slot=avatar]:size-5');
|
|
75
|
-
return (_jsx(Headless.ListboxOption, Object.assign({ as: Fragment }, props, { children: ({ selectedOption }) => {
|
|
76
|
-
if (selectedOption) {
|
|
77
|
-
return _jsx("div", { className: clsx(className, sharedClasses), children: children });
|
|
78
|
-
}
|
|
79
|
-
return (_jsxs("div", { className: clsx(
|
|
80
|
-
// Basic layout
|
|
81
|
-
'group/option grid cursor-default grid-cols-[--spacing(5)_1fr] items-baseline gap-x-2 rounded-lg py-2.5 pr-3.5 pl-2 sm:grid-cols-[--spacing(4)_1fr] sm:py-1.5 sm:pr-3 sm:pl-1.5',
|
|
82
|
-
// Typography
|
|
83
|
-
'text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]',
|
|
84
|
-
// Focus
|
|
85
|
-
'outline-hidden data-focus:bg-blue-500 data-focus:text-white',
|
|
86
|
-
// Forced colors mode
|
|
87
|
-
'forced-color-adjust-none forced-colors:data-focus:bg-[Highlight] forced-colors:data-focus:text-[HighlightText]',
|
|
88
|
-
// Disabled
|
|
89
|
-
'data-disabled:opacity-50'), children: [_jsx("svg", { className: "relative hidden size-5 self-center stroke-current group-data-selected/option:inline sm:size-4", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: _jsx("path", { d: "M4 8.5l3 3L12 4", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }), _jsx("span", { className: clsx(className, sharedClasses, 'col-start-2'), children: children })] }));
|
|
90
|
-
} })));
|
|
91
|
-
}
|
|
92
|
-
export function ListboxLabel(_a) {
|
|
93
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
94
|
-
return _jsx("span", Object.assign({}, props, { className: clsx(className, 'ml-2.5 truncate first:ml-0 sm:ml-2 sm:first:ml-0') }));
|
|
95
|
-
}
|
|
96
|
-
export function ListboxDescription(_a) {
|
|
97
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
98
|
-
return (_jsx("span", Object.assign({}, props, { className: clsx(className, 'flex flex-1 overflow-hidden text-zinc-500 group-data-focus/option:text-white before:w-2 before:min-w-0 before:shrink dark:text-zinc-400'), children: _jsx("span", { className: "flex-1 truncate", children: children }) })));
|
|
99
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
import * as Headless from '@headlessui/react';
|
|
14
|
-
import clsx from 'clsx';
|
|
15
|
-
import { Fragment } from 'react';
|
|
16
|
-
export function Listbox(_a) {
|
|
17
|
-
var { className, placeholder, autoFocus, 'aria-label': ariaLabel, children: options } = _a, props = __rest(_a, ["className", "placeholder", "autoFocus", 'aria-label', "children"]);
|
|
18
|
-
return (<Headless.Listbox {...props} multiple={false}>
|
|
19
|
-
<Headless.ListboxButton autoFocus={autoFocus} data-slot="control" aria-label={ariaLabel} className={clsx([
|
|
20
|
-
className,
|
|
21
|
-
// Basic layout
|
|
22
|
-
'group relative block w-full',
|
|
23
|
-
// Background color + shadow applied to inset pseudo element, so shadow blends with border in light mode
|
|
24
|
-
'before:absolute before:inset-px before:rounded-[calc(var(--radius-lg)-1px)] before:bg-white before:shadow-sm',
|
|
25
|
-
// Background color is moved to control and shadow is removed in dark mode so hide `before` pseudo
|
|
26
|
-
'dark:before:hidden',
|
|
27
|
-
// Hide default focus styles
|
|
28
|
-
'focus:outline-hidden',
|
|
29
|
-
// Focus ring
|
|
30
|
-
'after:pointer-events-none after:absolute after:inset-0 after:rounded-lg after:ring-transparent after:ring-inset data-focus:after:ring-2 data-focus:after:ring-blue-500',
|
|
31
|
-
// Disabled state
|
|
32
|
-
'data-disabled:opacity-50 data-disabled:before:bg-zinc-950/5 data-disabled:before:shadow-none',
|
|
33
|
-
])}>
|
|
34
|
-
<Headless.ListboxSelectedOption as="span" options={options} placeholder={placeholder && <span className="block truncate text-zinc-500">{placeholder}</span>} className={clsx([
|
|
35
|
-
// Basic layout
|
|
36
|
-
'relative block w-full appearance-none rounded-lg py-[calc(--spacing(2.5)-1px)] sm:py-[calc(--spacing(1.5)-1px)]',
|
|
37
|
-
// Set minimum height for when no value is selected
|
|
38
|
-
'min-h-11 sm:min-h-9',
|
|
39
|
-
// Horizontal padding
|
|
40
|
-
'pr-[calc(--spacing(7)-1px)] pl-[calc(--spacing(3.5)-1px)] sm:pl-[calc(--spacing(3)-1px)]',
|
|
41
|
-
// Typography
|
|
42
|
-
'text-left text-base/6 text-zinc-950 placeholder:text-zinc-500 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]',
|
|
43
|
-
// Border
|
|
44
|
-
'border border-zinc-950/10 group-data-active:border-zinc-950/20 group-data-hover:border-zinc-950/20 dark:border-white/10 dark:group-data-active:border-white/20 dark:group-data-hover:border-white/20',
|
|
45
|
-
// Background color
|
|
46
|
-
'bg-transparent dark:bg-white/5',
|
|
47
|
-
// Invalid state
|
|
48
|
-
'group-data-invalid:border-red-500 group-data-hover:group-data-invalid:border-red-500 dark:group-data-invalid:border-red-600 dark:data-hover:group-data-invalid:border-red-600',
|
|
49
|
-
// Disabled state
|
|
50
|
-
'group-data-disabled:border-zinc-950/20 group-data-disabled:opacity-100 dark:group-data-disabled:border-white/15 dark:group-data-disabled:bg-white/2.5 dark:group-data-disabled:data-hover:border-white/15',
|
|
51
|
-
])}/>
|
|
52
|
-
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
|
|
53
|
-
<svg className="size-5 stroke-zinc-500 group-data-disabled:stroke-zinc-600 sm:size-4 dark:stroke-zinc-400 forced-colors:stroke-[CanvasText]" viewBox="0 0 16 16" aria-hidden="true" fill="none">
|
|
54
|
-
<path d="M5.75 10.75L8 13L10.25 10.75" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"/>
|
|
55
|
-
<path d="M10.25 5.25L8 3L5.75 5.25" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"/>
|
|
56
|
-
</svg>
|
|
57
|
-
</span>
|
|
58
|
-
</Headless.ListboxButton>
|
|
59
|
-
<Headless.ListboxOptions transition anchor="selection start" className={clsx(
|
|
60
|
-
// Anchor positioning
|
|
61
|
-
'[--anchor-offset:-1.625rem] [--anchor-padding:--spacing(4)] sm:[--anchor-offset:-1.375rem]',
|
|
62
|
-
// Base styles
|
|
63
|
-
'isolate w-max min-w-[calc(var(--button-width)+1.75rem)] scroll-py-1 rounded-xl p-1 select-none',
|
|
64
|
-
// Invisible border that is only visible in `forced-colors` mode for accessibility purposes
|
|
65
|
-
'outline outline-transparent focus:outline-hidden',
|
|
66
|
-
// Handle scrolling when menu won't fit in viewport
|
|
67
|
-
'overflow-y-scroll overscroll-contain',
|
|
68
|
-
// Popover background
|
|
69
|
-
'bg-white/75 backdrop-blur-xl dark:bg-zinc-800/75',
|
|
70
|
-
// Shadows
|
|
71
|
-
'shadow-lg ring-1 ring-zinc-950/10 dark:ring-white/10 dark:ring-inset',
|
|
72
|
-
// Transitions
|
|
73
|
-
'transition-opacity duration-100 ease-in data-closed:data-leave:opacity-0 data-transition:pointer-events-none')}>
|
|
74
|
-
{options}
|
|
75
|
-
</Headless.ListboxOptions>
|
|
76
|
-
</Headless.Listbox>);
|
|
77
|
-
}
|
|
78
|
-
export function ListboxOption(_a) {
|
|
79
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
80
|
-
let sharedClasses = clsx(
|
|
81
|
-
// Base
|
|
82
|
-
'flex min-w-0 items-center',
|
|
83
|
-
// Icons
|
|
84
|
-
'*:data-[slot=icon]:size-5 *:data-[slot=icon]:shrink-0 sm:*:data-[slot=icon]:size-4', '*:data-[slot=icon]:text-zinc-500 group-data-focus/option:*:data-[slot=icon]:text-white dark:*:data-[slot=icon]:text-zinc-400', 'forced-colors:*:data-[slot=icon]:text-[CanvasText] forced-colors:group-data-focus/option:*:data-[slot=icon]:text-[Canvas]',
|
|
85
|
-
// Avatars
|
|
86
|
-
'*:data-[slot=avatar]:-mx-0.5 *:data-[slot=avatar]:size-6 sm:*:data-[slot=avatar]:size-5');
|
|
87
|
-
return (<Headless.ListboxOption as={Fragment} {...props}>
|
|
88
|
-
{({ selectedOption }) => {
|
|
89
|
-
if (selectedOption) {
|
|
90
|
-
return <div className={clsx(className, sharedClasses)}>{children}</div>;
|
|
91
|
-
}
|
|
92
|
-
return (<div className={clsx(
|
|
93
|
-
// Basic layout
|
|
94
|
-
'group/option grid cursor-default grid-cols-[--spacing(5)_1fr] items-baseline gap-x-2 rounded-lg py-2.5 pr-3.5 pl-2 sm:grid-cols-[--spacing(4)_1fr] sm:py-1.5 sm:pr-3 sm:pl-1.5',
|
|
95
|
-
// Typography
|
|
96
|
-
'text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]',
|
|
97
|
-
// Focus
|
|
98
|
-
'outline-hidden data-focus:bg-blue-500 data-focus:text-white',
|
|
99
|
-
// Forced colors mode
|
|
100
|
-
'forced-color-adjust-none forced-colors:data-focus:bg-[Highlight] forced-colors:data-focus:text-[HighlightText]',
|
|
101
|
-
// Disabled
|
|
102
|
-
'data-disabled:opacity-50')}>
|
|
103
|
-
<svg className="relative hidden size-5 self-center stroke-current group-data-selected/option:inline sm:size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
104
|
-
<path d="M4 8.5l3 3L12 4" strokeWidth={1.5} strokeLinecap="round" strokeLinejoin="round"/>
|
|
105
|
-
</svg>
|
|
106
|
-
<span className={clsx(className, sharedClasses, 'col-start-2')}>{children}</span>
|
|
107
|
-
</div>);
|
|
108
|
-
}}
|
|
109
|
-
</Headless.ListboxOption>);
|
|
110
|
-
}
|
|
111
|
-
export function ListboxLabel(_a) {
|
|
112
|
-
var { className } = _a, props = __rest(_a, ["className"]);
|
|
113
|
-
return <span {...props} className={clsx(className, 'ml-2.5 truncate first:ml-0 sm:ml-2 sm:first:ml-0')}/>;
|
|
114
|
-
}
|
|
115
|
-
export function ListboxDescription(_a) {
|
|
116
|
-
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
|
117
|
-
return (<span {...props} className={clsx(className, 'flex flex-1 overflow-hidden text-zinc-500 group-data-focus/option:text-white before:w-2 before:min-w-0 before:shrink dark:text-zinc-400')}>
|
|
118
|
-
<span className="flex-1 truncate">{children}</span>
|
|
119
|
-
</span>);
|
|
120
|
-
}
|