@galaxy-io/dls 1.0.3
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/README.md +42 -0
- package/dist/accordion/Accordion.d.ts +30 -0
- package/dist/accordion/Accordion.js +147 -0
- package/dist/animations/Fade.d.ts +6 -0
- package/dist/animations/Fade.js +22 -0
- package/dist/animations/Flashing.d.ts +3 -0
- package/dist/animations/Flashing.js +14 -0
- package/dist/animations/RotateWithTransition.d.ts +8 -0
- package/dist/animations/RotateWithTransition.js +28 -0
- package/dist/animations/ScaleFade.d.ts +6 -0
- package/dist/animations/ScaleFade.js +31 -0
- package/dist/animations/SpinAnimation.d.ts +7 -0
- package/dist/animations/SpinAnimation.js +20 -0
- package/dist/animations/SpinVerticalAnimation.d.ts +6 -0
- package/dist/animations/SpinVerticalAnimation.js +19 -0
- package/dist/assets/components/GalaxyLogomarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkDark.js +11 -0
- package/dist/assets/components/GalaxyLogomarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyLogomarkLight.js +17 -0
- package/dist/assets/components/GalaxyWordmarkDark.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkDark.js +15 -0
- package/dist/assets/components/GalaxyWordmarkLight.d.ts +3 -0
- package/dist/assets/components/GalaxyWordmarkLight.js +28 -0
- package/dist/assets/components/enrichment/PerplexityIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/PerplexityIcon.js +35 -0
- package/dist/assets/components/enrichment/TavilyIcon.d.ts +3 -0
- package/dist/assets/components/enrichment/TavilyIcon.js +15 -0
- package/dist/assets/components/onboarding/TenantSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupDark.js +498 -0
- package/dist/assets/components/onboarding/TenantSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/TenantSetupLight.js +482 -0
- package/dist/assets/components/onboarding/UserSetupDark.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupDark.js +1086 -0
- package/dist/assets/components/onboarding/UserSetupLight.d.ts +3 -0
- package/dist/assets/components/onboarding/UserSetupLight.js +1024 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildDark.js +466 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupBuildLight.js +460 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectDark.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupConnectLight.js +336 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateDark.js +153 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.d.ts +3 -0
- package/dist/assets/components/onboarding/WorkspaceSetupIntegrateLight.js +153 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectDark.js +117 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodAutoIntrospectLight.js +117 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDark.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankDarkHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLight.js +150 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodBlankLightHovered.js +150 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDark.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonDarkHovered.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLight.js +90 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.d.ts +3 -0
- package/dist/assets/components/projects/MappingMethodJsonLightHovered.js +90 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateDark.js +454 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/projects/ProjectsEmptyStateLight.js +456 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDark.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardDarkHovered.js +1796 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLight.js +1786 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateProjectActionCardLightHovered.js +1786 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDark.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardDarkHovered.js +879 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLight.js +889 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.d.ts +3 -0
- package/dist/assets/components/root/CreateSourceActionCardLightHovered.js +889 -0
- package/dist/assets/components/sources/AttioIcon.d.ts +3 -0
- package/dist/assets/components/sources/AttioIcon.js +11 -0
- package/dist/assets/components/sources/BigquerySourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BigquerySourceIcon.js +39 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/BrowserbaseSourceIcon.js +35 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconDark.js +13 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/ClickhouseLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/ConfluenceSourceIcon.js +30 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyFileUploadSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyTextSourceIcon.js +16 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GalaxyWebhookSourceIcon.js +16 -0
- package/dist/assets/components/sources/GithubSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/GithubSourceIcon.js +27 -0
- package/dist/assets/components/sources/GoogleDriveIcon.d.ts +3 -0
- package/dist/assets/components/sources/GoogleDriveIcon.js +45 -0
- package/dist/assets/components/sources/HubspotSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/HubspotSourceIcon.js +14 -0
- package/dist/assets/components/sources/JiraSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/JiraSourceIcon.js +54 -0
- package/dist/assets/components/sources/LinearSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/LinearSourceIcon.js +14 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconDark.js +17 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/MysqlLogoSourceIconLight.js +17 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/NetsuiteSourceIcon.js +32 -0
- package/dist/assets/components/sources/NotionIcon.d.ts +3 -0
- package/dist/assets/components/sources/NotionIcon.js +20 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/NotionLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconDark.js +28 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresLogoSourceIconLight.js +28 -0
- package/dist/assets/components/sources/PostgresqlIcon.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlIcon.js +61 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/PostgresqlLogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/S3Icon.d.ts +3 -0
- package/dist/assets/components/sources/S3Icon.js +76 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconDark.js +10 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/S3LogoSourceIconLight.js +13 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/SalesforceSourceIcon.js +23 -0
- package/dist/assets/components/sources/SlackIcon.d.ts +3 -0
- package/dist/assets/components/sources/SlackIcon.js +32 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconDark.js +15 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SlackLogoSourceIconLight.js +15 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconDark.js +14 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.d.ts +3 -0
- package/dist/assets/components/sources/SnowflakeLogoSourceIconLight.js +14 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateDark.js +432 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.d.ts +3 -0
- package/dist/assets/components/sources/SourcesEmptyStateLight.js +434 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.d.ts +3 -0
- package/dist/assets/components/sources/WikipediaSourceIcon.js +1490 -0
- package/dist/assets/models/galaxy-logomark.js +4 -0
- package/dist/avatar/Avatar.d.ts +9 -0
- package/dist/avatar/Avatar.js +52 -0
- package/dist/avatar/AvatarEmpty.d.ts +36 -0
- package/dist/avatar/AvatarEmpty.js +43 -0
- package/dist/avatar/AvatarShimmer.d.ts +28 -0
- package/dist/avatar/AvatarShimmer.js +21 -0
- package/dist/avatar/GalaxyAvatar.d.ts +6 -0
- package/dist/avatar/GalaxyAvatar.js +36 -0
- package/dist/avatar/types.d.ts +5 -0
- package/dist/avatar/types.js +9 -0
- package/dist/backgrounds/CellGridBackground.d.ts +13 -0
- package/dist/backgrounds/CellGridBackground.js +39 -0
- package/dist/backgrounds/CrossGridBackground.d.ts +14 -0
- package/dist/backgrounds/CrossGridBackground.js +45 -0
- package/dist/backgrounds/DotGridBackground.d.ts +13 -0
- package/dist/backgrounds/DotGridBackground.js +43 -0
- package/dist/badge/Badge.d.ts +30 -0
- package/dist/badge/Badge.js +92 -0
- package/dist/beacons/Beacon.d.ts +43 -0
- package/dist/beacons/Beacon.js +68 -0
- package/dist/buttons/Button.d.ts +30 -0
- package/dist/buttons/Button.js +173 -0
- package/dist/charts/BarChart.d.ts +21 -0
- package/dist/charts/BarChart.js +264 -0
- package/dist/charts/ChartAxis.d.ts +28 -0
- package/dist/charts/ChartAxis.js +94 -0
- package/dist/charts/ChartLegend.d.ts +7 -0
- package/dist/charts/ChartLegend.js +30 -0
- package/dist/charts/ChartTooltip.d.ts +7 -0
- package/dist/charts/ChartTooltip.js +66 -0
- package/dist/charts/LineChart.d.ts +22 -0
- package/dist/charts/LineChart.js +250 -0
- package/dist/charts/PieChart.d.ts +35 -0
- package/dist/charts/PieChart.js +183 -0
- package/dist/charts/constants.d.ts +22 -0
- package/dist/charts/constants.js +38 -0
- package/dist/charts/types.d.ts +80 -0
- package/dist/charts/types.js +0 -0
- package/dist/charts/utils.d.ts +29 -0
- package/dist/charts/utils.js +62 -0
- package/dist/chips/Chip.d.ts +39 -0
- package/dist/chips/Chip.js +185 -0
- package/dist/containers/FlexItem.d.ts +28 -0
- package/dist/containers/FlexItem.js +93 -0
- package/dist/containers/FlexWrapper.d.ts +147 -0
- package/dist/containers/FlexWrapper.js +122 -0
- package/dist/containers/GridWrapper.d.ts +120 -0
- package/dist/containers/GridWrapper.js +117 -0
- package/dist/containers/Spacing.d.ts +13 -0
- package/dist/containers/Spacing.js +52 -0
- package/dist/containers/Wrapper.d.ts +16 -0
- package/dist/containers/Wrapper.js +50 -0
- package/dist/dividers/HorizontalDivider.d.ts +2 -0
- package/dist/dividers/HorizontalDivider.js +17 -0
- package/dist/dividers/VerticalDivider.d.ts +2 -0
- package/dist/dividers/VerticalDivider.js +17 -0
- package/dist/drawer/Drawer.d.ts +13 -0
- package/dist/drawer/Drawer.js +70 -0
- package/dist/dropdown/Dropdown.d.ts +51 -0
- package/dist/dropdown/Dropdown.js +136 -0
- package/dist/dropdown/DropdownButton.d.ts +18 -0
- package/dist/dropdown/DropdownButton.js +179 -0
- package/dist/dropdown/DropdownFooter.d.ts +10 -0
- package/dist/dropdown/DropdownFooter.js +35 -0
- package/dist/dropdown/DropdownItem.d.ts +10 -0
- package/dist/dropdown/DropdownItem.js +38 -0
- package/dist/editor/CodeEditor.d.ts +68 -0
- package/dist/editor/CodeEditor.js +435 -0
- package/dist/editor/CodeEditorReactWidget.d.ts +35 -0
- package/dist/editor/CodeEditorReactWidget.js +47 -0
- package/dist/hooks/useDismiss.d.ts +27 -0
- package/dist/hooks/useDismiss.js +37 -0
- package/dist/hooks/useElementWidth.d.ts +22 -0
- package/dist/hooks/useElementWidth.js +44 -0
- package/dist/hooks/useResize.d.ts +83 -0
- package/dist/hooks/useResize.js +114 -0
- package/dist/hotkeys/HotKeyBindings.d.ts +7 -0
- package/dist/hotkeys/HotKeyBindings.js +23 -0
- package/dist/hotkeys/HotKeySymbol.d.ts +13 -0
- package/dist/hotkeys/HotKeySymbol.js +49 -0
- package/dist/icons/BackIcon.d.ts +3 -0
- package/dist/icons/BackIcon.js +13 -0
- package/dist/icons/CloseIcon.d.ts +3 -0
- package/dist/icons/CloseIcon.js +13 -0
- package/dist/icons/CreateIcon.d.ts +3 -0
- package/dist/icons/CreateIcon.js +13 -0
- package/dist/icons/ForwardIcon.d.ts +3 -0
- package/dist/icons/ForwardIcon.js +13 -0
- package/dist/icons/GalaxyLogomark.d.ts +5 -0
- package/dist/icons/GalaxyLogomark.js +21 -0
- package/dist/icons/GalaxyLogomark3D.d.ts +41 -0
- package/dist/icons/GalaxyLogomark3D.js +310 -0
- package/dist/icons/GalaxyWordmark.d.ts +5 -0
- package/dist/icons/GalaxyWordmark.js +21 -0
- package/dist/icons/HelpIcon.d.ts +3 -0
- package/dist/icons/HelpIcon.js +14 -0
- package/dist/icons/Icon.d.ts +41 -0
- package/dist/icons/Icon.js +51 -0
- package/dist/icons/ProjectsIcon.d.ts +3 -0
- package/dist/icons/ProjectsIcon.js +12 -0
- package/dist/icons/SearchIcon.d.ts +3 -0
- package/dist/icons/SearchIcon.js +12 -0
- package/dist/icons/SourcesIcon.d.ts +3 -0
- package/dist/icons/SourcesIcon.js +12 -0
- package/dist/icons/TextIcon.d.ts +4 -0
- package/dist/icons/TextIcon.js +22 -0
- package/dist/icons/WebScrapeIcon.d.ts +4 -0
- package/dist/icons/WebScrapeIcon.js +22 -0
- package/dist/icons/WebhookIcon.d.ts +4 -0
- package/dist/icons/WebhookIcon.js +22 -0
- package/dist/icons/sources/AttioLogomark.d.ts +4 -0
- package/dist/icons/sources/AttioLogomark.js +8 -0
- package/dist/icons/sources/BrowserbaseLogomark.d.ts +4 -0
- package/dist/icons/sources/BrowserbaseLogomark.js +8 -0
- package/dist/icons/sources/ClickhouseLogomark.d.ts +4 -0
- package/dist/icons/sources/ClickhouseLogomark.js +16 -0
- package/dist/icons/sources/ConfluenceLogomark.d.ts +4 -0
- package/dist/icons/sources/ConfluenceLogomark.js +8 -0
- package/dist/icons/sources/GithubLogomark.d.ts +4 -0
- package/dist/icons/sources/GithubLogomark.js +8 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleBigqueryLogomark.js +8 -0
- package/dist/icons/sources/GoogleDriveLogomark.d.ts +4 -0
- package/dist/icons/sources/GoogleDriveLogomark.js +8 -0
- package/dist/icons/sources/HubspotLogomark.d.ts +4 -0
- package/dist/icons/sources/HubspotLogomark.js +8 -0
- package/dist/icons/sources/JiraLogomark.d.ts +4 -0
- package/dist/icons/sources/JiraLogomark.js +8 -0
- package/dist/icons/sources/LinearLogomark.d.ts +4 -0
- package/dist/icons/sources/LinearLogomark.js +8 -0
- package/dist/icons/sources/MySQLLogomark.d.ts +4 -0
- package/dist/icons/sources/MySQLLogomark.js +8 -0
- package/dist/icons/sources/NetsuiteLogomark.d.ts +4 -0
- package/dist/icons/sources/NetsuiteLogomark.js +8 -0
- package/dist/icons/sources/NotionLogomark.d.ts +4 -0
- package/dist/icons/sources/NotionLogomark.js +8 -0
- package/dist/icons/sources/PostgresLogomark.d.ts +4 -0
- package/dist/icons/sources/PostgresLogomark.js +8 -0
- package/dist/icons/sources/S3Logomark.d.ts +4 -0
- package/dist/icons/sources/S3Logomark.js +8 -0
- package/dist/icons/sources/SalesforceLogomark.d.ts +4 -0
- package/dist/icons/sources/SalesforceLogomark.js +8 -0
- package/dist/icons/sources/SlackLogoIconmark.d.ts +4 -0
- package/dist/icons/sources/SlackLogoIconmark.js +8 -0
- package/dist/icons/sources/SnowflakeLogomark.d.ts +4 -0
- package/dist/icons/sources/SnowflakeLogomark.js +16 -0
- package/dist/icons/sources/WikipediaLogomark.d.ts +4 -0
- package/dist/icons/sources/WikipediaLogomark.js +8 -0
- package/dist/inputs/CheckboxInput.d.ts +20 -0
- package/dist/inputs/CheckboxInput.js +97 -0
- package/dist/inputs/ColorInput.d.ts +20 -0
- package/dist/inputs/ColorInput.js +368 -0
- package/dist/inputs/CopyInput.d.ts +15 -0
- package/dist/inputs/CopyInput.js +46 -0
- package/dist/inputs/DateInput.d.ts +19 -0
- package/dist/inputs/DateInput.js +498 -0
- package/dist/inputs/Input.d.ts +91 -0
- package/dist/inputs/Input.js +205 -0
- package/dist/inputs/MultiSelectInput.d.ts +38 -0
- package/dist/inputs/MultiSelectInput.js +566 -0
- package/dist/inputs/MultiTextInput.d.ts +27 -0
- package/dist/inputs/MultiTextInput.js +178 -0
- package/dist/inputs/NumberInput.d.ts +4 -0
- package/dist/inputs/NumberInput.js +34 -0
- package/dist/inputs/PasswordInput.d.ts +4 -0
- package/dist/inputs/PasswordInput.js +40 -0
- package/dist/inputs/RadioInput.d.ts +20 -0
- package/dist/inputs/RadioInput.js +108 -0
- package/dist/inputs/SelectInput.d.ts +51 -0
- package/dist/inputs/SelectInput.js +528 -0
- package/dist/inputs/SliderInput.d.ts +16 -0
- package/dist/inputs/SliderInput.js +172 -0
- package/dist/inputs/TextAreaInput.d.ts +40 -0
- package/dist/inputs/TextAreaInput.js +238 -0
- package/dist/inputs/TextInput.d.ts +4 -0
- package/dist/inputs/TextInput.js +53 -0
- package/dist/inputs/ToggleInput.d.ts +11 -0
- package/dist/inputs/ToggleInput.js +100 -0
- package/dist/inputs/hooks.d.ts +10 -0
- package/dist/inputs/hooks.js +22 -0
- package/dist/links/Link.d.ts +2 -0
- package/dist/links/Link.js +10 -0
- package/dist/lists/BulletedList.d.ts +11 -0
- package/dist/lists/BulletedList.js +41 -0
- package/dist/metrics/MetricItem.d.ts +15 -0
- package/dist/metrics/MetricItem.js +53 -0
- package/dist/metrics/ProgressBar.d.ts +15 -0
- package/dist/metrics/ProgressBar.js +60 -0
- package/dist/modal/Modal.d.ts +7 -0
- package/dist/modal/Modal.js +52 -0
- package/dist/overlay/OverlayProvider.d.ts +26 -0
- package/dist/overlay/OverlayProvider.js +92 -0
- package/dist/overlay/constants.d.ts +27 -0
- package/dist/overlay/constants.js +36 -0
- package/dist/overlay/useOverlay.d.ts +7 -0
- package/dist/overlay/useOverlay.js +46 -0
- package/dist/resizable/HorizontalResizeHandle.d.ts +10 -0
- package/dist/resizable/HorizontalResizeHandle.js +32 -0
- package/dist/resizable/VerticalResizeHandle.d.ts +11 -0
- package/dist/resizable/VerticalResizeHandle.js +33 -0
- package/dist/shapes/Circle.d.ts +6 -0
- package/dist/shapes/Circle.js +25 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.d.ts +3 -0
- package/dist/spreadsheet/InfiniteSpreadsheet.js +265 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.d.ts +6 -0
- package/dist/spreadsheet/SpreadsheetAddColumnButton.js +32 -0
- package/dist/spreadsheet/SpreadsheetCell.d.ts +19 -0
- package/dist/spreadsheet/SpreadsheetCell.js +115 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetCellEditor.js +95 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.d.ts +13 -0
- package/dist/spreadsheet/SpreadsheetHeaderCell.js +125 -0
- package/dist/spreadsheet/SpreadsheetRow.d.ts +21 -0
- package/dist/spreadsheet/SpreadsheetRow.js +68 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.d.ts +11 -0
- package/dist/spreadsheet/SpreadsheetRowActionCell.js +60 -0
- package/dist/spreadsheet/hooks/useColumnResize.d.ts +6 -0
- package/dist/spreadsheet/hooks/useColumnResize.js +46 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.d.ts +13 -0
- package/dist/spreadsheet/hooks/useSpreadsheetEditing.js +41 -0
- package/dist/spreadsheet/types.d.ts +92 -0
- package/dist/spreadsheet/types.js +21 -0
- package/dist/styles.css +213 -0
- package/dist/switcher/Switcher.d.ts +11 -0
- package/dist/switcher/Switcher.js +41 -0
- package/dist/table/InfiniteTable.d.ts +83 -0
- package/dist/table/InfiniteTable.js +711 -0
- package/dist/table/VirtualizedInfiniteTable.d.ts +28 -0
- package/dist/table/VirtualizedInfiniteTable.js +359 -0
- package/dist/text/Bold.d.ts +3 -0
- package/dist/text/Bold.js +17 -0
- package/dist/text/Code.d.ts +3 -0
- package/dist/text/Code.js +27 -0
- package/dist/text/EditableText.d.ts +7 -0
- package/dist/text/EditableText.js +141 -0
- package/dist/text/Ellipsis.d.ts +10 -0
- package/dist/text/Ellipsis.js +28 -0
- package/dist/text/MarkdownText.d.ts +7 -0
- package/dist/text/MarkdownText.js +295 -0
- package/dist/text/Paragraph.d.ts +16 -0
- package/dist/text/Paragraph.js +76 -0
- package/dist/text/RequiredMarker.d.ts +6 -0
- package/dist/text/RequiredMarker.js +44 -0
- package/dist/text/Selectable.d.ts +3 -0
- package/dist/text/Selectable.js +15 -0
- package/dist/text/Text.d.ts +47 -0
- package/dist/text/Text.js +104 -0
- package/dist/text/TextShimmer.d.ts +7 -0
- package/dist/text/TextShimmer.js +30 -0
- package/dist/theme/GalaxyTheme.d.ts +36 -0
- package/dist/theme/GalaxyTheme.js +107 -0
- package/dist/theme/constants.d.ts +13 -0
- package/dist/theme/constants.js +43 -0
- package/dist/theme/index.d.ts +6 -0
- package/dist/theme/index.js +6 -0
- package/dist/theme/types.d.ts +174 -0
- package/dist/theme/types.js +0 -0
- package/dist/theme/typography.d.ts +2 -0
- package/dist/theme/typography.js +73 -0
- package/dist/theme/variants/dark.d.ts +2 -0
- package/dist/theme/variants/dark.js +125 -0
- package/dist/theme/variants/light.d.ts +2 -0
- package/dist/theme/variants/light.js +125 -0
- package/dist/tooltip/Tooltip.d.ts +37 -0
- package/dist/tooltip/Tooltip.js +79 -0
- package/dist/utils/colors.d.ts +84 -0
- package/dist/utils/colors.js +323 -0
- package/dist/utils/linaria.d.ts +1 -0
- package/dist/utils/linaria.js +8 -0
- package/dist/widget/Widget.d.ts +28 -0
- package/dist/widget/Widget.js +99 -0
- package/package.json +268 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import Text from "../text/Text.js";
|
|
3
|
+
import FlexWrapper, { AlignItems, FlexDirection, JustifyContent } from "../containers/FlexWrapper.js";
|
|
4
|
+
import { InputLabel } from "./Input.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { styled } from "@linaria/react";
|
|
7
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/inputs/SliderInput.tsx
|
|
10
|
+
var _exp = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "pointer";
|
|
11
|
+
var _exp2 = () => ({ $isDisabled }) => $isDisabled ? .5 : 1;
|
|
12
|
+
var SliderWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
13
|
+
name: "SliderWrapper",
|
|
14
|
+
class: "sbeizks",
|
|
15
|
+
propsAsIs: false,
|
|
16
|
+
vars: {
|
|
17
|
+
"sbeizks-0": [_exp()],
|
|
18
|
+
"sbeizks-1": [_exp2()]
|
|
19
|
+
}
|
|
20
|
+
}));
|
|
21
|
+
var _exp3 = () => ({ theme }) => theme.color.opacity.bw24Alt;
|
|
22
|
+
var SliderTrack = withTheme(/*#__PURE__*/ styled("div")({
|
|
23
|
+
name: "SliderTrack",
|
|
24
|
+
class: "s42jcip",
|
|
25
|
+
propsAsIs: false,
|
|
26
|
+
vars: { "s42jcip-0": [_exp3()] }
|
|
27
|
+
}));
|
|
28
|
+
var _exp4 = () => ({ theme }) => theme.color.icon.primary;
|
|
29
|
+
var SliderFill = withTheme(/*#__PURE__*/ styled("div")({
|
|
30
|
+
name: "SliderFill",
|
|
31
|
+
class: "s1b59sw7",
|
|
32
|
+
propsAsIs: false,
|
|
33
|
+
vars: { "s1b59sw7-0": [_exp4()] }
|
|
34
|
+
}));
|
|
35
|
+
var _exp5 = () => ({ $percentage }) => `calc(4px + ${$percentage}% - ${$percentage / 100 * 8}px)`;
|
|
36
|
+
var _exp6 = () => ({ theme }) => theme.color.icon.primary;
|
|
37
|
+
var _exp7 = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "grab";
|
|
38
|
+
var _exp8 = () => ({ $isDragging }) => $isDragging ? "none" : "left 0.1s ease-out, transform 0.1s ease-out";
|
|
39
|
+
var _exp9 = () => ({ $isDisabled }) => $isDisabled ? "none" : "auto";
|
|
40
|
+
var _exp0 = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "grabbing";
|
|
41
|
+
var _exp1 = () => ({ $isDisabled }) => $isDisabled ? "translate(-50%, -50%)" : "translate(-50%, -50%) scale(1.1)";
|
|
42
|
+
var SliderHandle = withTheme(/*#__PURE__*/ styled("div")({
|
|
43
|
+
name: "SliderHandle",
|
|
44
|
+
class: "salrebx",
|
|
45
|
+
propsAsIs: false,
|
|
46
|
+
vars: {
|
|
47
|
+
"salrebx-0": [_exp5()],
|
|
48
|
+
"salrebx-1": [_exp6()],
|
|
49
|
+
"salrebx-2": [_exp7()],
|
|
50
|
+
"salrebx-3": [_exp8()],
|
|
51
|
+
"salrebx-4": [_exp9()],
|
|
52
|
+
"salrebx-5": [_exp0()],
|
|
53
|
+
"salrebx-6": [_exp1()]
|
|
54
|
+
}
|
|
55
|
+
}));
|
|
56
|
+
var HiddenInput = /*#__PURE__*/ styled("input")({
|
|
57
|
+
name: "HiddenInput",
|
|
58
|
+
class: "h1trli0w",
|
|
59
|
+
propsAsIs: false
|
|
60
|
+
});
|
|
61
|
+
var SliderInput = ({ label, labelTooltip, value, onChange, onInteractionStart, onInteractionEnd, min = 0, max = 100, step = 1, isDisabled = false, width, fillWidth }) => {
|
|
62
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
63
|
+
const sliderRef = useRef(null);
|
|
64
|
+
const isInteractingRef = useRef(false);
|
|
65
|
+
const beginInteraction = useCallback(() => {
|
|
66
|
+
if (isDisabled || isInteractingRef.current) return;
|
|
67
|
+
isInteractingRef.current = true;
|
|
68
|
+
onInteractionStart?.();
|
|
69
|
+
}, [isDisabled, onInteractionStart]);
|
|
70
|
+
const endInteraction = useCallback(() => {
|
|
71
|
+
if (!isInteractingRef.current) return;
|
|
72
|
+
isInteractingRef.current = false;
|
|
73
|
+
onInteractionEnd?.();
|
|
74
|
+
}, [onInteractionEnd]);
|
|
75
|
+
useEffect(() => () => {
|
|
76
|
+
endInteraction();
|
|
77
|
+
}, [endInteraction]);
|
|
78
|
+
const percentage = max === min ? 0 : Math.max(0, Math.min(100, (value - min) / (max - min) * 100));
|
|
79
|
+
const handleChange = useCallback((newValue) => {
|
|
80
|
+
if (isDisabled) return;
|
|
81
|
+
onChange(Math.round(Math.max(min, Math.min(max, newValue)) / step) * step);
|
|
82
|
+
}, [
|
|
83
|
+
isDisabled,
|
|
84
|
+
min,
|
|
85
|
+
max,
|
|
86
|
+
step,
|
|
87
|
+
onChange
|
|
88
|
+
]);
|
|
89
|
+
const handleInputChange = useCallback((e) => {
|
|
90
|
+
handleChange(parseFloat(e.target.value));
|
|
91
|
+
}, [handleChange]);
|
|
92
|
+
const handleMouseDown = useCallback((e) => {
|
|
93
|
+
if (isDisabled) return;
|
|
94
|
+
beginInteraction();
|
|
95
|
+
setIsDragging(true);
|
|
96
|
+
const handleMouseMove = (moveEvent) => {
|
|
97
|
+
if (!sliderRef.current) return;
|
|
98
|
+
const rect = sliderRef.current.getBoundingClientRect();
|
|
99
|
+
const x = moveEvent.clientX - rect.left;
|
|
100
|
+
handleChange(min + Math.max(0, Math.min(100, x / rect.width * 100)) / 100 * (max - min));
|
|
101
|
+
};
|
|
102
|
+
const handleMouseUp = () => {
|
|
103
|
+
setIsDragging(false);
|
|
104
|
+
endInteraction();
|
|
105
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
106
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
107
|
+
};
|
|
108
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
109
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
110
|
+
handleMouseMove(e.nativeEvent);
|
|
111
|
+
}, [
|
|
112
|
+
beginInteraction,
|
|
113
|
+
endInteraction,
|
|
114
|
+
isDisabled,
|
|
115
|
+
min,
|
|
116
|
+
max,
|
|
117
|
+
handleChange
|
|
118
|
+
]);
|
|
119
|
+
return /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
120
|
+
direction: FlexDirection.COLUMN,
|
|
121
|
+
gap: 12,
|
|
122
|
+
width,
|
|
123
|
+
fillWidth,
|
|
124
|
+
children: [label && /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
125
|
+
alignItems: AlignItems.CENTER,
|
|
126
|
+
justifyContent: JustifyContent.SPACE_BETWEEN,
|
|
127
|
+
fillWidth,
|
|
128
|
+
children: [/* @__PURE__ */ jsx(InputLabel, {
|
|
129
|
+
label,
|
|
130
|
+
labelTooltip
|
|
131
|
+
}), /* @__PURE__ */ jsx(Text, { children: value })]
|
|
132
|
+
}), /* @__PURE__ */ jsxs(SliderWrapper, {
|
|
133
|
+
ref: sliderRef,
|
|
134
|
+
$isDisabled: isDisabled,
|
|
135
|
+
onMouseDown: handleMouseDown,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx(SliderTrack, {
|
|
138
|
+
$isDisabled: isDisabled,
|
|
139
|
+
children: /* @__PURE__ */ jsx(SliderFill, {
|
|
140
|
+
$percentage: percentage,
|
|
141
|
+
$isDisabled: isDisabled,
|
|
142
|
+
style: { width: `${percentage}%` }
|
|
143
|
+
})
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsx(SliderHandle, {
|
|
146
|
+
$percentage: percentage,
|
|
147
|
+
$isDisabled: isDisabled,
|
|
148
|
+
$isDragging: isDragging
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ jsx(HiddenInput, {
|
|
151
|
+
type: "range",
|
|
152
|
+
min,
|
|
153
|
+
max,
|
|
154
|
+
step,
|
|
155
|
+
value,
|
|
156
|
+
onChange: handleInputChange,
|
|
157
|
+
onMouseDown: beginInteraction,
|
|
158
|
+
onMouseUp: endInteraction,
|
|
159
|
+
onTouchStart: beginInteraction,
|
|
160
|
+
onTouchEnd: endInteraction,
|
|
161
|
+
onKeyDown: beginInteraction,
|
|
162
|
+
onKeyUp: endInteraction,
|
|
163
|
+
onBlur: endInteraction,
|
|
164
|
+
disabled: isDisabled,
|
|
165
|
+
"aria-label": label || "Slider"
|
|
166
|
+
})
|
|
167
|
+
]
|
|
168
|
+
})]
|
|
169
|
+
});
|
|
170
|
+
};
|
|
171
|
+
//#endregion
|
|
172
|
+
export { SliderInput as default };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare enum TextAreaSize {
|
|
2
|
+
SMALL = "SMALL",
|
|
3
|
+
MEDIUM = "MEDIUM",
|
|
4
|
+
LARGE = "LARGE"
|
|
5
|
+
}
|
|
6
|
+
export declare enum TextAreaVariant {
|
|
7
|
+
TRANSPARENT = "TRANSPARENT",
|
|
8
|
+
BASE = "BASE",
|
|
9
|
+
PRIMARY = "PRIMARY",
|
|
10
|
+
SECONDARY = "SECONDARY",
|
|
11
|
+
TERTIARY = "TERTIARY"
|
|
12
|
+
}
|
|
13
|
+
export interface TextAreaInputProps {
|
|
14
|
+
value?: string;
|
|
15
|
+
onChange: (value: string) => void;
|
|
16
|
+
variant?: TextAreaVariant;
|
|
17
|
+
size?: TextAreaSize;
|
|
18
|
+
lines?: number;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
labelTooltip?: string | React.ReactNode;
|
|
22
|
+
error?: string;
|
|
23
|
+
required?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
autoFocus?: boolean;
|
|
26
|
+
min?: number;
|
|
27
|
+
max?: number;
|
|
28
|
+
onFocus?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
29
|
+
onBlur?: (e: React.FocusEvent<HTMLTextAreaElement>) => void;
|
|
30
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
|
|
31
|
+
width?: number | string;
|
|
32
|
+
height?: number | string;
|
|
33
|
+
fillWidth?: boolean;
|
|
34
|
+
fillHeight?: boolean;
|
|
35
|
+
noBorder?: boolean;
|
|
36
|
+
noPadding?: boolean;
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
}
|
|
39
|
+
declare const TextAreaInput: import("react").ForwardRefExoticComponent<TextAreaInputProps & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
40
|
+
export default TextAreaInput;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import { getCssSizeValue } from "../utils/linaria.js";
|
|
3
|
+
import Text, { TextSize, TextVariant } from "../text/Text.js";
|
|
4
|
+
import TextShimmer from "../text/TextShimmer.js";
|
|
5
|
+
import FlexWrapper, { FlexDirection } from "../containers/FlexWrapper.js";
|
|
6
|
+
import { InputLabel } from "./Input.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import { styled } from "@linaria/react";
|
|
9
|
+
import { match } from "ts-pattern";
|
|
10
|
+
import { forwardRef, useState } from "react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region src/inputs/TextAreaInput.tsx
|
|
13
|
+
var TextAreaSize = /* @__PURE__ */ function(TextAreaSize) {
|
|
14
|
+
TextAreaSize["SMALL"] = "SMALL";
|
|
15
|
+
TextAreaSize["MEDIUM"] = "MEDIUM";
|
|
16
|
+
TextAreaSize["LARGE"] = "LARGE";
|
|
17
|
+
return TextAreaSize;
|
|
18
|
+
}({});
|
|
19
|
+
var TextAreaVariant = /* @__PURE__ */ function(TextAreaVariant) {
|
|
20
|
+
TextAreaVariant["TRANSPARENT"] = "TRANSPARENT";
|
|
21
|
+
TextAreaVariant["BASE"] = "BASE";
|
|
22
|
+
TextAreaVariant["PRIMARY"] = "PRIMARY";
|
|
23
|
+
TextAreaVariant["SECONDARY"] = "SECONDARY";
|
|
24
|
+
TextAreaVariant["TERTIARY"] = "TERTIARY";
|
|
25
|
+
return TextAreaVariant;
|
|
26
|
+
}({});
|
|
27
|
+
var _exp = () => ({ $lines, $size, theme, $height, $noPadding }) => {
|
|
28
|
+
if ($height) return "auto";
|
|
29
|
+
const lineHeight = match($size).with("SMALL", () => Number(theme.font.sans.height.body_sm.replace("px", ""))).with("MEDIUM", () => Number(theme.font.sans.height.body_md.replace("px", ""))).with("LARGE", () => Number(theme.font.sans.height.body_lg.replace("px", ""))).exhaustive();
|
|
30
|
+
if ($noPadding) return `${lineHeight * $lines}px`;
|
|
31
|
+
const padding = match($size).with("SMALL", () => 12).with("MEDIUM", () => 16).with("LARGE", () => 20).exhaustive();
|
|
32
|
+
return `${lineHeight * $lines + padding}px`;
|
|
33
|
+
};
|
|
34
|
+
var _exp2 = () => ({ $fillWidth, $width }) => {
|
|
35
|
+
if ($fillWidth) return "100%";
|
|
36
|
+
if ($width) return getCssSizeValue($width, "0");
|
|
37
|
+
return "auto";
|
|
38
|
+
};
|
|
39
|
+
var _exp3 = () => ({ $height, $fillHeight }) => {
|
|
40
|
+
if ($fillHeight) return "100%";
|
|
41
|
+
if ($height) return getCssSizeValue($height);
|
|
42
|
+
return "auto";
|
|
43
|
+
};
|
|
44
|
+
var _exp4 = () => ({ $fillHeight }) => $fillHeight ? "1" : "none";
|
|
45
|
+
var _exp5 = () => ({ theme, $variant }) => match($variant).with("TRANSPARENT", () => "transparent").with("BASE", () => theme.color.background.base).with("PRIMARY", () => theme.color.background.primary).with("SECONDARY", () => theme.color.background.secondary).with("TERTIARY", () => theme.color.background.tertiary).exhaustive();
|
|
46
|
+
var _exp6 = () => ({ theme, $variant, $error, $noBorder }) => {
|
|
47
|
+
if ($noBorder) return "none";
|
|
48
|
+
if ($error) return theme.color.border.error;
|
|
49
|
+
return match($variant).with("TRANSPARENT", () => theme.color.border.primary).with("BASE", () => theme.color.border.primary).with("PRIMARY", () => theme.color.border.primary).with("SECONDARY", () => theme.color.border.primary).with("TERTIARY", () => theme.color.border.primary).exhaustive();
|
|
50
|
+
};
|
|
51
|
+
var _exp7 = () => ({ theme }) => theme.color.text.primary;
|
|
52
|
+
var _exp8 = () => ({ theme, $size }) => {
|
|
53
|
+
return match($size).with("SMALL", () => theme.font.sans.size.body_sm).with("MEDIUM", () => theme.font.sans.size.body_md).with("LARGE", () => theme.font.sans.size.body_lg).exhaustive();
|
|
54
|
+
};
|
|
55
|
+
var _exp9 = () => ({ theme, $size }) => {
|
|
56
|
+
return match($size).with("SMALL", () => theme.font.sans.height.body_sm).with("MEDIUM", () => theme.font.sans.height.body_md).with("LARGE", () => theme.font.sans.height.body_lg).exhaustive();
|
|
57
|
+
};
|
|
58
|
+
var _exp0 = () => ({ theme }) => theme.font.sans.weight.regular;
|
|
59
|
+
var _exp1 = () => ({ theme }) => theme.font.sans.family;
|
|
60
|
+
var _exp10 = () => ({ $size, $noPadding }) => {
|
|
61
|
+
if ($noPadding) return "0";
|
|
62
|
+
return match($size).with("SMALL", () => "6px").with("MEDIUM", () => "8px").with("LARGE", () => "10px").exhaustive();
|
|
63
|
+
};
|
|
64
|
+
var _exp11 = () => ({ theme }) => theme.color.border.primary;
|
|
65
|
+
var _exp12 = () => ({ theme }) => theme.color.border.selected;
|
|
66
|
+
var _exp13 = () => ({ theme }) => theme.color.text.disabled;
|
|
67
|
+
var StyledTextArea = withTheme(/*#__PURE__*/ styled("textarea")({
|
|
68
|
+
name: "StyledTextArea",
|
|
69
|
+
class: "s1jhbbpd",
|
|
70
|
+
propsAsIs: false,
|
|
71
|
+
vars: {
|
|
72
|
+
"s1jhbbpd-0": [_exp()],
|
|
73
|
+
"s1jhbbpd-1": [_exp2()],
|
|
74
|
+
"s1jhbbpd-2": [_exp3()],
|
|
75
|
+
"s1jhbbpd-3": [_exp4()],
|
|
76
|
+
"s1jhbbpd-4": [_exp5()],
|
|
77
|
+
"s1jhbbpd-5": [_exp6()],
|
|
78
|
+
"s1jhbbpd-6": [_exp7()],
|
|
79
|
+
"s1jhbbpd-7": [_exp8()],
|
|
80
|
+
"s1jhbbpd-8": [_exp9()],
|
|
81
|
+
"s1jhbbpd-9": [_exp0()],
|
|
82
|
+
"s1jhbbpd-10": [_exp1()],
|
|
83
|
+
"s1jhbbpd-11": [_exp10()],
|
|
84
|
+
"s1jhbbpd-12": [_exp11()],
|
|
85
|
+
"s1jhbbpd-13": [_exp12()],
|
|
86
|
+
"s1jhbbpd-14": [_exp13()]
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
89
|
+
var _exp14 = () => ({ $fillWidth }) => $fillWidth ? "100%" : "auto";
|
|
90
|
+
var _exp15 = () => ({ $fillHeight }) => $fillHeight ? "100%" : "auto";
|
|
91
|
+
var _exp16 = () => ({ $fillHeight }) => $fillHeight ? "flex: 1;" : "";
|
|
92
|
+
var TextAreaWrapper = /*#__PURE__*/ styled("div")({
|
|
93
|
+
name: "TextAreaWrapper",
|
|
94
|
+
class: "tu0hnok",
|
|
95
|
+
propsAsIs: false,
|
|
96
|
+
vars: {
|
|
97
|
+
"tu0hnok-0": [_exp14()],
|
|
98
|
+
"tu0hnok-1": [_exp15()],
|
|
99
|
+
"tu0hnok-2": [_exp16()]
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
var _exp17 = () => ({ $lines, $size, theme, $height, $noPadding }) => {
|
|
103
|
+
if ($height) return "auto";
|
|
104
|
+
const lineHeight = match($size).with("SMALL", () => Number(theme.font.sans.height.body_sm.replace("px", ""))).with("MEDIUM", () => Number(theme.font.sans.height.body_md.replace("px", ""))).with("LARGE", () => Number(theme.font.sans.height.body_lg.replace("px", ""))).exhaustive();
|
|
105
|
+
if ($noPadding) return `${lineHeight * $lines}px`;
|
|
106
|
+
const padding = match($size).with("SMALL", () => 12).with("MEDIUM", () => 16).with("LARGE", () => 20).exhaustive();
|
|
107
|
+
return `${lineHeight * $lines + padding}px`;
|
|
108
|
+
};
|
|
109
|
+
var _exp18 = () => ({ $fillWidth, $width }) => {
|
|
110
|
+
if ($fillWidth) return "100%";
|
|
111
|
+
if ($width) return getCssSizeValue($width, "0");
|
|
112
|
+
return "auto";
|
|
113
|
+
};
|
|
114
|
+
var _exp19 = () => ({ $height, $fillHeight }) => {
|
|
115
|
+
if ($fillHeight) return "100%";
|
|
116
|
+
if ($height) return getCssSizeValue($height);
|
|
117
|
+
return "auto";
|
|
118
|
+
};
|
|
119
|
+
var _exp20 = () => ({ $fillHeight }) => $fillHeight ? "1" : "none";
|
|
120
|
+
var _exp21 = () => ({ theme, $variant }) => match($variant).with("TRANSPARENT", () => "transparent").with("BASE", () => theme.color.background.base).with("PRIMARY", () => theme.color.background.primary).with("SECONDARY", () => theme.color.background.secondary).with("TERTIARY", () => theme.color.background.tertiary).exhaustive();
|
|
121
|
+
var _exp22 = () => ({ theme, $variant, $noBorder }) => {
|
|
122
|
+
if ($noBorder) return "transparent";
|
|
123
|
+
return match($variant).with("TRANSPARENT", () => theme.color.border.primary).with("BASE", () => theme.color.border.primary).with("PRIMARY", () => theme.color.border.primary).with("SECONDARY", () => theme.color.border.primary).with("TERTIARY", () => theme.color.border.primary).exhaustive();
|
|
124
|
+
};
|
|
125
|
+
var _exp23 = () => ({ $size, $noPadding }) => {
|
|
126
|
+
if ($noPadding) return "0";
|
|
127
|
+
return match($size).with("SMALL", () => "6px").with("MEDIUM", () => "8px").with("LARGE", () => "10px").exhaustive();
|
|
128
|
+
};
|
|
129
|
+
var LoadingContainer = withTheme(/*#__PURE__*/ styled("div")({
|
|
130
|
+
name: "LoadingContainer",
|
|
131
|
+
class: "l48iv0n",
|
|
132
|
+
propsAsIs: false,
|
|
133
|
+
vars: {
|
|
134
|
+
"l48iv0n-0": [_exp17()],
|
|
135
|
+
"l48iv0n-1": [_exp18()],
|
|
136
|
+
"l48iv0n-2": [_exp19()],
|
|
137
|
+
"l48iv0n-3": [_exp20()],
|
|
138
|
+
"l48iv0n-4": [_exp21()],
|
|
139
|
+
"l48iv0n-5": [_exp22()],
|
|
140
|
+
"l48iv0n-6": [_exp23()]
|
|
141
|
+
}
|
|
142
|
+
}));
|
|
143
|
+
var DEFAULT_STATE = { error: void 0 };
|
|
144
|
+
var TEXTAREA_SIZE_TO_SHIMMER_HEIGHT_MAP = {
|
|
145
|
+
["SMALL"]: 12,
|
|
146
|
+
["MEDIUM"]: 14,
|
|
147
|
+
["LARGE"]: 16
|
|
148
|
+
};
|
|
149
|
+
var TextAreaInput = forwardRef(({ variant = "PRIMARY", size = "MEDIUM", lines = 3, value, min, max, placeholder, label, labelTooltip, error, required, disabled, autoFocus, onChange, onKeyDown, onBlur, onFocus, width, height, fillWidth, fillHeight, noBorder, noPadding, isLoading }, ref) => {
|
|
150
|
+
const [state, setState] = useState(DEFAULT_STATE);
|
|
151
|
+
const handleFocus = (e) => {
|
|
152
|
+
setState({
|
|
153
|
+
...state,
|
|
154
|
+
error: void 0
|
|
155
|
+
});
|
|
156
|
+
onFocus?.(e);
|
|
157
|
+
};
|
|
158
|
+
const handleBlur = (e) => {
|
|
159
|
+
if (value?.length && min && value.length < min) setState({
|
|
160
|
+
...state,
|
|
161
|
+
error: `Must be at least ${min} characters`
|
|
162
|
+
});
|
|
163
|
+
if (value?.length && max && value.length > max) setState({
|
|
164
|
+
...state,
|
|
165
|
+
error: `Must be less than ${max} characters`
|
|
166
|
+
});
|
|
167
|
+
onBlur?.(e);
|
|
168
|
+
};
|
|
169
|
+
const handleChange = (e) => {
|
|
170
|
+
onChange(e.target.value);
|
|
171
|
+
};
|
|
172
|
+
return /* @__PURE__ */ jsx(TextAreaWrapper, {
|
|
173
|
+
$fillHeight: fillHeight,
|
|
174
|
+
$fillWidth: fillWidth,
|
|
175
|
+
children: /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
176
|
+
direction: FlexDirection.COLUMN,
|
|
177
|
+
gap: 4,
|
|
178
|
+
fillWidth,
|
|
179
|
+
fillHeight,
|
|
180
|
+
children: [
|
|
181
|
+
label && /* @__PURE__ */ jsx(InputLabel, {
|
|
182
|
+
label,
|
|
183
|
+
labelTooltip,
|
|
184
|
+
isRequired: required
|
|
185
|
+
}),
|
|
186
|
+
isLoading ? /* @__PURE__ */ jsxs(LoadingContainer, {
|
|
187
|
+
$variant: variant,
|
|
188
|
+
$size: size,
|
|
189
|
+
$lines: lines,
|
|
190
|
+
$width: width,
|
|
191
|
+
$height: height,
|
|
192
|
+
$fillWidth: fillWidth,
|
|
193
|
+
$fillHeight: fillHeight,
|
|
194
|
+
$noBorder: noBorder,
|
|
195
|
+
$noPadding: noPadding,
|
|
196
|
+
children: [/* @__PURE__ */ jsx(TextShimmer, {
|
|
197
|
+
height: TEXTAREA_SIZE_TO_SHIMMER_HEIGHT_MAP[size],
|
|
198
|
+
width: "100%"
|
|
199
|
+
}), /* @__PURE__ */ jsx(TextShimmer, {
|
|
200
|
+
height: TEXTAREA_SIZE_TO_SHIMMER_HEIGHT_MAP[size],
|
|
201
|
+
width: "80%"
|
|
202
|
+
})]
|
|
203
|
+
}) : /* @__PURE__ */ jsx(StyledTextArea, {
|
|
204
|
+
ref,
|
|
205
|
+
placeholder,
|
|
206
|
+
value: value ?? "",
|
|
207
|
+
required,
|
|
208
|
+
disabled,
|
|
209
|
+
onChange: handleChange,
|
|
210
|
+
autoComplete: "off",
|
|
211
|
+
autoCorrect: "off",
|
|
212
|
+
autoFocus,
|
|
213
|
+
onFocus: handleFocus,
|
|
214
|
+
onBlur: handleBlur,
|
|
215
|
+
onKeyDown,
|
|
216
|
+
$variant: variant,
|
|
217
|
+
$size: size,
|
|
218
|
+
$width: width,
|
|
219
|
+
$height: height,
|
|
220
|
+
$fillWidth: fillWidth,
|
|
221
|
+
$fillHeight: fillHeight,
|
|
222
|
+
$error: !!(state.error || error),
|
|
223
|
+
$lines: lines,
|
|
224
|
+
$noBorder: noBorder,
|
|
225
|
+
$noPadding: noPadding
|
|
226
|
+
}),
|
|
227
|
+
(state.error || error) && /* @__PURE__ */ jsx(Text, {
|
|
228
|
+
variant: TextVariant.ERROR,
|
|
229
|
+
size: TextSize.BODY_SM,
|
|
230
|
+
children: state.error || error
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
TextAreaInput.displayName = "TextAreaInput";
|
|
237
|
+
//#endregion
|
|
238
|
+
export { TextAreaSize, TextAreaVariant, TextAreaInput as default };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type InputProps } from "./Input";
|
|
2
|
+
type TextInputProps = Omit<InputProps<string>, "type" | "parse">;
|
|
3
|
+
declare const TextInput: import("react").ForwardRefExoticComponent<TextInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export default TextInput;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import Input from "./Input.js";
|
|
2
|
+
import { forwardRef, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/inputs/TextInput.tsx
|
|
5
|
+
var DEFAULT_STATE = { error: "" };
|
|
6
|
+
var TextInput = forwardRef(({ size, value, min, max, placeholder, label, labelTooltip, leading, trailing, error, isRequired, isDisabled, autoFocus, onChange, onKeyDown, onBlur, fillWidth, width, isMonospace }, ref) => {
|
|
7
|
+
const [state, setState] = useState(DEFAULT_STATE);
|
|
8
|
+
const handleFocus = () => {
|
|
9
|
+
setState({
|
|
10
|
+
...state,
|
|
11
|
+
error: void 0
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const handleBlur = (e) => {
|
|
15
|
+
if (value?.length && min && value.length < min) setState({
|
|
16
|
+
...state,
|
|
17
|
+
error: `Must be at least ${min} characters`
|
|
18
|
+
});
|
|
19
|
+
if (value?.length && max && value.length > max) setState({
|
|
20
|
+
...state,
|
|
21
|
+
error: `Must be less than ${max} characters`
|
|
22
|
+
});
|
|
23
|
+
onBlur?.(e);
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
26
|
+
parse: String,
|
|
27
|
+
onChange,
|
|
28
|
+
size,
|
|
29
|
+
ref,
|
|
30
|
+
type: "text",
|
|
31
|
+
value,
|
|
32
|
+
min,
|
|
33
|
+
max,
|
|
34
|
+
placeholder,
|
|
35
|
+
label,
|
|
36
|
+
labelTooltip,
|
|
37
|
+
leading,
|
|
38
|
+
trailing,
|
|
39
|
+
autoFocus,
|
|
40
|
+
error: state.error || error,
|
|
41
|
+
isRequired,
|
|
42
|
+
isDisabled,
|
|
43
|
+
onKeyDown,
|
|
44
|
+
onFocus: handleFocus,
|
|
45
|
+
onBlur: handleBlur,
|
|
46
|
+
fillWidth,
|
|
47
|
+
width,
|
|
48
|
+
isMonospace
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
TextInput.displayName = "TextInput";
|
|
52
|
+
//#endregion
|
|
53
|
+
export { TextInput as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ToggleInputProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
labelTooltip?: string | React.ReactNode;
|
|
4
|
+
value: boolean;
|
|
5
|
+
onChange: (value: boolean) => void;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
width?: number | string;
|
|
8
|
+
fillWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const ToggleInput: ({ label, labelTooltip, value, onChange, isDisabled, width, fillWidth, }: ToggleInputProps) => import("react").JSX.Element;
|
|
11
|
+
export default ToggleInput;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { withTheme } from "../theme/GalaxyTheme.js";
|
|
2
|
+
import FlexWrapper, { AlignItems, JustifyContent } from "../containers/FlexWrapper.js";
|
|
3
|
+
import { InputLabel } from "./Input.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { styled } from "@linaria/react";
|
|
6
|
+
import { useCallback } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
//#region src/inputs/ToggleInput.tsx
|
|
9
|
+
var _exp = () => ({ $isDisabled }) => $isDisabled ? "not-allowed" : "pointer";
|
|
10
|
+
var _exp2 = () => ({ $isDisabled }) => $isDisabled ? .5 : 1;
|
|
11
|
+
var ToggleWrapper = withTheme(/*#__PURE__*/ styled("div")({
|
|
12
|
+
name: "ToggleWrapper",
|
|
13
|
+
class: "t1t8zlu",
|
|
14
|
+
propsAsIs: false,
|
|
15
|
+
vars: {
|
|
16
|
+
"t1t8zlu-0": [_exp()],
|
|
17
|
+
"t1t8zlu-1": [_exp2()]
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
var _exp3 = () => ({ theme, $isChecked }) => $isChecked ? theme.color.icon.primary : theme.color.opacity.bw24Alt;
|
|
21
|
+
var _exp4 = () => ({ theme }) => theme.color.border.primary;
|
|
22
|
+
var ToggleTrack = withTheme(/*#__PURE__*/ styled("div")({
|
|
23
|
+
name: "ToggleTrack",
|
|
24
|
+
class: "t1br7yd",
|
|
25
|
+
propsAsIs: false,
|
|
26
|
+
vars: {
|
|
27
|
+
"t1br7yd-0": [_exp3()],
|
|
28
|
+
"t1br7yd-1": [_exp4()]
|
|
29
|
+
}
|
|
30
|
+
}));
|
|
31
|
+
var _exp5 = () => ({ $isChecked }) => $isChecked ? "calc(100% - 14px - 1.5px)" : "1.5px";
|
|
32
|
+
var _exp6 = () => ({ theme }) => theme.color.background.base;
|
|
33
|
+
var ToggleThumb = withTheme(/*#__PURE__*/ styled("div")({
|
|
34
|
+
name: "ToggleThumb",
|
|
35
|
+
class: "t1xwadc7",
|
|
36
|
+
propsAsIs: false,
|
|
37
|
+
vars: {
|
|
38
|
+
"t1xwadc7-0": [_exp5()],
|
|
39
|
+
"t1xwadc7-1": [_exp6()]
|
|
40
|
+
}
|
|
41
|
+
}));
|
|
42
|
+
var HiddenInput = /*#__PURE__*/ styled("input")({
|
|
43
|
+
name: "HiddenInput",
|
|
44
|
+
class: "h1smouvb",
|
|
45
|
+
propsAsIs: false
|
|
46
|
+
});
|
|
47
|
+
var ToggleInput = ({ label, labelTooltip, value, onChange, isDisabled = false, width, fillWidth }) => {
|
|
48
|
+
const handleClick = useCallback(() => {
|
|
49
|
+
if (!isDisabled) onChange(!value);
|
|
50
|
+
}, [
|
|
51
|
+
isDisabled,
|
|
52
|
+
value,
|
|
53
|
+
onChange
|
|
54
|
+
]);
|
|
55
|
+
const handleKeyDown = useCallback((e) => {
|
|
56
|
+
if (!isDisabled && (e.key === "Enter" || e.key === " ")) {
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
onChange(!value);
|
|
59
|
+
}
|
|
60
|
+
}, [
|
|
61
|
+
isDisabled,
|
|
62
|
+
value,
|
|
63
|
+
onChange
|
|
64
|
+
]);
|
|
65
|
+
return /* @__PURE__ */ jsxs(FlexWrapper, {
|
|
66
|
+
width,
|
|
67
|
+
fillWidth,
|
|
68
|
+
alignItems: AlignItems.CENTER,
|
|
69
|
+
justifyContent: fillWidth ? JustifyContent.SPACE_BETWEEN : JustifyContent.START,
|
|
70
|
+
gap: fillWidth ? 0 : 6,
|
|
71
|
+
children: [label && /* @__PURE__ */ jsx(InputLabel, {
|
|
72
|
+
label,
|
|
73
|
+
labelTooltip
|
|
74
|
+
}), /* @__PURE__ */ jsxs(ToggleWrapper, {
|
|
75
|
+
$isDisabled: isDisabled,
|
|
76
|
+
onClick: handleClick,
|
|
77
|
+
onKeyDown: handleKeyDown,
|
|
78
|
+
role: "switch",
|
|
79
|
+
"aria-checked": value,
|
|
80
|
+
"aria-disabled": isDisabled,
|
|
81
|
+
tabIndex: isDisabled ? -1 : 0,
|
|
82
|
+
children: [/* @__PURE__ */ jsx(ToggleTrack, {
|
|
83
|
+
$isChecked: value,
|
|
84
|
+
$isDisabled: isDisabled,
|
|
85
|
+
children: /* @__PURE__ */ jsx(ToggleThumb, {
|
|
86
|
+
$isChecked: value,
|
|
87
|
+
$isDisabled: isDisabled
|
|
88
|
+
})
|
|
89
|
+
}), /* @__PURE__ */ jsx(HiddenInput, {
|
|
90
|
+
type: "checkbox",
|
|
91
|
+
checked: value,
|
|
92
|
+
onChange: () => {},
|
|
93
|
+
disabled: isDisabled,
|
|
94
|
+
"aria-label": label || "Toggle"
|
|
95
|
+
})]
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { ToggleInput as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { useElementWidth } from "../hooks/useElementWidth";
|
|
2
|
+
interface ControlledOpenStateProps {
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useControlledOpenState: ({ isOpen: controlledIsOpen, onOpenChange, }: ControlledOpenStateProps) => {
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
setOpen: (nextIsOpen: boolean) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const useDebouncedValue: <T>(value: T, delayMs: number, enabled?: boolean) => T;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useElementWidth } from "../hooks/useElementWidth.js";
|
|
2
|
+
import { useCallback, useState } from "react";
|
|
3
|
+
import { useDebounce } from "react-use";
|
|
4
|
+
//#region src/inputs/hooks.ts
|
|
5
|
+
var useControlledOpenState = ({ isOpen: controlledIsOpen, onOpenChange }) => {
|
|
6
|
+
const [internalIsOpen, setInternalIsOpen] = useState(false);
|
|
7
|
+
const isControlled = controlledIsOpen !== void 0;
|
|
8
|
+
return {
|
|
9
|
+
isOpen: isControlled ? controlledIsOpen : internalIsOpen,
|
|
10
|
+
setOpen: useCallback((nextIsOpen) => {
|
|
11
|
+
if (!isControlled) setInternalIsOpen(nextIsOpen);
|
|
12
|
+
onOpenChange?.(nextIsOpen);
|
|
13
|
+
}, [isControlled, onOpenChange])
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
var useDebouncedValue = (value, delayMs, enabled = true) => {
|
|
17
|
+
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
18
|
+
useDebounce(() => setDebouncedValue(value), enabled ? delayMs : 0, [value, enabled]);
|
|
19
|
+
return debouncedValue;
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { useControlledOpenState, useDebouncedValue, useElementWidth };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum BulletedListSize {
|
|
2
|
+
SMALL = "SMALL",
|
|
3
|
+
MEDIUM = "MEDIUM",
|
|
4
|
+
LARGE = "LARGE"
|
|
5
|
+
}
|
|
6
|
+
export interface BulletedListProps {
|
|
7
|
+
items: string[];
|
|
8
|
+
size?: BulletedListSize;
|
|
9
|
+
}
|
|
10
|
+
declare const BulletedList: ({ items, size }: BulletedListProps) => import("react").JSX.Element;
|
|
11
|
+
export default BulletedList;
|