@fortanix/baklava 1.0.0-beta-20241114
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/CHANGELOG.md +6 -0
- package/LICENSE +373 -0
- package/README.md +43 -0
- package/app/Demo.tsx +33 -0
- package/app/index.html +12 -0
- package/app/lib.ts +54 -0
- package/app/main.tsx +32 -0
- package/dist/baklava.d.ts +752 -0
- package/dist/baklava.js +4962 -0
- package/dist/lib.css +1 -0
- package/package.json +102 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-100.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-200.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-300.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-500.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-600.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-700.woff2 +0 -0
- package/src/assets/fonts/montserrat/montserrat-v25-latin_latin-ext-regular.woff2 +0 -0
- package/src/assets/fonts/open-sans/open-sans-v23-latin-600.woff2 +0 -0
- package/src/assets/fonts/open-sans/open-sans-v23-latin-700.woff2 +0 -0
- package/src/assets/fonts/open-sans/open-sans-v23-latin-regular.woff2 +0 -0
- package/src/assets/fonts/source-code-pro/source-code-pro-v14-latin-regular.woff2 +0 -0
- package/src/assets/icons/_icons.ts +58 -0
- package/src/assets/icons/accounts.svg +11 -0
- package/src/assets/icons/alert.svg +3 -0
- package/src/assets/icons/apache.svg +3 -0
- package/src/assets/icons/apps.svg +5 -0
- package/src/assets/icons/assessment.svg +11 -0
- package/src/assets/icons/audit-log.svg +12 -0
- package/src/assets/icons/authentication.svg +12 -0
- package/src/assets/icons/calendar.svg +10 -0
- package/src/assets/icons/caret-down.svg +3 -0
- package/src/assets/icons/check.svg +3 -0
- package/src/assets/icons/cloud-accounts.svg +15 -0
- package/src/assets/icons/copy.svg +4 -0
- package/src/assets/icons/cross.svg +4 -0
- package/src/assets/icons/dashboard.svg +12 -0
- package/src/assets/icons/dataverse.svg +12 -0
- package/src/assets/icons/delete.svg +5 -0
- package/src/assets/icons/docs.svg +10 -0
- package/src/assets/icons/download.svg +11 -0
- package/src/assets/icons/edit-params.svg +3 -0
- package/src/assets/icons/edit.svg +10 -0
- package/src/assets/icons/email.svg +3 -0
- package/src/assets/icons/eye.svg +11 -0
- package/src/assets/icons/file-error.svg +17 -0
- package/src/assets/icons/file.svg +15 -0
- package/src/assets/icons/folder.svg +14 -0
- package/src/assets/icons/fortanix-ki.svg +13 -0
- package/src/assets/icons/graph.svg +9 -0
- package/src/assets/icons/groups.svg +10 -0
- package/src/assets/icons/hide.svg +3 -0
- package/src/assets/icons/home.svg +11 -0
- package/src/assets/icons/iam.svg +11 -0
- package/src/assets/icons/info.svg +4 -0
- package/src/assets/icons/infrastructure.svg +5 -0
- package/src/assets/icons/integrations.svg +3 -0
- package/src/assets/icons/key-link.svg +12 -0
- package/src/assets/icons/key.svg +4 -0
- package/src/assets/icons/no-login.svg +10 -0
- package/src/assets/icons/page-forward.svg +4 -0
- package/src/assets/icons/plugins.svg +4 -0
- package/src/assets/icons/policy.svg +13 -0
- package/src/assets/icons/print.svg +11 -0
- package/src/assets/icons/scripts.svg +4 -0
- package/src/assets/icons/search.svg +3 -0
- package/src/assets/icons/security-object.svg +5 -0
- package/src/assets/icons/services.svg +10 -0
- package/src/assets/icons/settings.svg +12 -0
- package/src/assets/icons/solutions.svg +3 -0
- package/src/assets/icons/success.svg +3 -0
- package/src/assets/icons/tasks.svg +10 -0
- package/src/assets/icons/user-profile.svg +3 -0
- package/src/assets/icons/user.svg +10 -0
- package/src/assets/icons/warning.svg +3 -0
- package/src/assets/icons/workflows.svg +11 -0
- package/src/assets/icons_new/Accounts.svg +11 -0
- package/src/assets/icons_new/Alert.svg +3 -0
- package/src/assets/icons_new/Apache.svg +3 -0
- package/src/assets/icons_new/Apps.svg +5 -0
- package/src/assets/icons_new/Assessment.svg +11 -0
- package/src/assets/icons_new/Audit Log.svg +12 -0
- package/src/assets/icons_new/Authentication.svg +12 -0
- package/src/assets/icons_new/Calendar.svg +10 -0
- package/src/assets/icons_new/Carrot Down.svg +3 -0
- package/src/assets/icons_new/Cloud Accounts.svg +15 -0
- package/src/assets/icons_new/Copy.svg +4 -0
- package/src/assets/icons_new/Dashboard.svg +12 -0
- package/src/assets/icons_new/Dataverse.svg +12 -0
- package/src/assets/icons_new/Delete.svg +5 -0
- package/src/assets/icons_new/Docs.svg +10 -0
- package/src/assets/icons_new/Download.svg +11 -0
- package/src/assets/icons_new/Edit Params.svg +3 -0
- package/src/assets/icons_new/Edit.svg +10 -0
- package/src/assets/icons_new/Email.svg +3 -0
- package/src/assets/icons_new/Eye.svg +11 -0
- package/src/assets/icons_new/Groups.svg +10 -0
- package/src/assets/icons_new/Hide.svg +3 -0
- package/src/assets/icons_new/Home.svg +11 -0
- package/src/assets/icons_new/IAM.svg +11 -0
- package/src/assets/icons_new/Info.svg +4 -0
- package/src/assets/icons_new/Infrastructure.svg +5 -0
- package/src/assets/icons_new/Integrations.svg +3 -0
- package/src/assets/icons_new/KI.svg +13 -0
- package/src/assets/icons_new/Key Link.svg +12 -0
- package/src/assets/icons_new/Key.svg +4 -0
- package/src/assets/icons_new/No Login.svg +10 -0
- package/src/assets/icons_new/Page FWD.svg +4 -0
- package/src/assets/icons_new/Plugins.svg +4 -0
- package/src/assets/icons_new/Policy.svg +13 -0
- package/src/assets/icons_new/Print.svg +11 -0
- package/src/assets/icons_new/Scripts.svg +4 -0
- package/src/assets/icons_new/Search.svg +3 -0
- package/src/assets/icons_new/Security Objects.svg +5 -0
- package/src/assets/icons_new/Services.svg +10 -0
- package/src/assets/icons_new/Settings.svg +12 -0
- package/src/assets/icons_new/Solutions.svg +3 -0
- package/src/assets/icons_new/Tasks.svg +10 -0
- package/src/assets/icons_new/User Account.svg +3 -0
- package/src/assets/icons_new/Users.svg +10 -0
- package/src/assets/icons_new/Workflows.svg +11 -0
- package/src/assets/icons_old/_icons.ts +172 -0
- package/src/assets/icons_old/account.svg +4 -0
- package/src/assets/icons_old/accounts.svg +4 -0
- package/src/assets/icons_old/add.svg +4 -0
- package/src/assets/icons_old/alert.svg +4 -0
- package/src/assets/icons_old/app.svg +4 -0
- package/src/assets/icons_old/arrow-drop-down.svg +4 -0
- package/src/assets/icons_old/arrow-drop-up.svg +4 -0
- package/src/assets/icons_old/arrow-expand.svg +4 -0
- package/src/assets/icons_old/arrow-left.svg +5 -0
- package/src/assets/icons_old/arrow-right.svg +4 -0
- package/src/assets/icons_old/audit-log.svg +4 -0
- package/src/assets/icons_old/bell.svg +4 -0
- package/src/assets/icons_old/billing.svg +4 -0
- package/src/assets/icons_old/bug.svg +4 -0
- package/src/assets/icons_old/builds.svg +4 -0
- package/src/assets/icons_old/calendar.svg +4 -0
- package/src/assets/icons_old/certificate.svg +4 -0
- package/src/assets/icons_old/check.svg +4 -0
- package/src/assets/icons_old/checkbox-checked.svg +4 -0
- package/src/assets/icons_old/checkbox-disabled.svg +4 -0
- package/src/assets/icons_old/checkbox-unchecked.svg +4 -0
- package/src/assets/icons_old/chevron-left.svg +4 -0
- package/src/assets/icons_old/chevron-right.svg +4 -0
- package/src/assets/icons_old/clear-all.svg +4 -0
- package/src/assets/icons_old/color-picker.svg +10 -0
- package/src/assets/icons_old/connection.svg +4 -0
- package/src/assets/icons_old/copy.svg +4 -0
- package/src/assets/icons_old/cross-thin.svg +4 -0
- package/src/assets/icons_old/cross.svg +4 -0
- package/src/assets/icons_old/crypto-policy.svg +4 -0
- package/src/assets/icons_old/customers.svg +4 -0
- package/src/assets/icons_old/dashboard.svg +4 -0
- package/src/assets/icons_old/data-center.svg +4 -0
- package/src/assets/icons_old/data-connector-read.svg +6 -0
- package/src/assets/icons_old/data-connector-write.svg +6 -0
- package/src/assets/icons_old/dataset.svg +3 -0
- package/src/assets/icons_old/dataverse.svg +6 -0
- package/src/assets/icons_old/delete.svg +4 -0
- package/src/assets/icons_old/deployment-deployed.svg +4 -0
- package/src/assets/icons_old/deployment-none.svg +4 -0
- package/src/assets/icons_old/derive.svg +4 -0
- package/src/assets/icons_old/docs.svg +4 -0
- package/src/assets/icons_old/document-blank.svg +4 -0
- package/src/assets/icons_old/domain.svg +4 -0
- package/src/assets/icons_old/download-cloud.svg +4 -0
- package/src/assets/icons_old/download.svg +4 -0
- package/src/assets/icons_old/edit-params.svg +4 -0
- package/src/assets/icons_old/edit.svg +4 -0
- package/src/assets/icons_old/em-app.svg +4 -0
- package/src/assets/icons_old/em-dashboard.svg +4 -0
- package/src/assets/icons_old/email.svg +4 -0
- package/src/assets/icons_old/empty-credential.svg +4 -0
- package/src/assets/icons_old/enterprise-badge.svg +6 -0
- package/src/assets/icons_old/environment-production.svg +4 -0
- package/src/assets/icons_old/environment-test.svg +4 -0
- package/src/assets/icons_old/event-critical.svg +4 -0
- package/src/assets/icons_old/event-error.svg +4 -0
- package/src/assets/icons_old/event-success.svg +4 -0
- package/src/assets/icons_old/event-warning.svg +4 -0
- package/src/assets/icons_old/expiration.svg +4 -0
- package/src/assets/icons_old/export.svg +4 -0
- package/src/assets/icons_old/external.svg +4 -0
- package/src/assets/icons_old/eye-closed.svg +4 -0
- package/src/assets/icons_old/eye.svg +4 -0
- package/src/assets/icons_old/file.svg +7 -0
- package/src/assets/icons_old/flag.svg +4 -0
- package/src/assets/icons_old/forbid.svg +4 -0
- package/src/assets/icons_old/fortanix-app-aci.svg +6 -0
- package/src/assets/icons_old/fortanix-app-edp.svg +4 -0
- package/src/assets/icons_old/fortanix-app-enclave-os.svg +4 -0
- package/src/assets/icons_old/frame-expand.svg +4 -0
- package/src/assets/icons_old/fresh.svg +4 -0
- package/src/assets/icons_old/generated.svg +4 -0
- package/src/assets/icons_old/gift.svg +4 -0
- package/src/assets/icons_old/global.svg +4 -0
- package/src/assets/icons_old/group.svg +4 -0
- package/src/assets/icons_old/help.svg +4 -0
- package/src/assets/icons_old/home-info.svg +5 -0
- package/src/assets/icons_old/home.svg +4 -0
- package/src/assets/icons_old/horizontal-collapse.svg +5 -0
- package/src/assets/icons_old/horizontal-expand.svg +5 -0
- package/src/assets/icons_old/hsm.svg +4 -0
- package/src/assets/icons_old/info.svg +4 -0
- package/src/assets/icons_old/install.svg +4 -0
- package/src/assets/icons_old/integration.svg +7 -0
- package/src/assets/icons_old/key-clone.svg +4 -0
- package/src/assets/icons_old/key-custodian-policy.svg +10 -0
- package/src/assets/icons_old/key-destroy.svg +4 -0
- package/src/assets/icons_old/key-download.svg +4 -0
- package/src/assets/icons_old/key-justification-policy.svg +5 -0
- package/src/assets/icons_old/key-link.svg +4 -0
- package/src/assets/icons_old/key-metadata-policy.svg +5 -0
- package/src/assets/icons_old/key-primary.svg +11 -0
- package/src/assets/icons_old/key-remove.svg +4 -0
- package/src/assets/icons_old/key-rotation.svg +4 -0
- package/src/assets/icons_old/key-undo-policy.svg +10 -0
- package/src/assets/icons_old/key-wrapping.svg +6 -0
- package/src/assets/icons_old/key.svg +4 -0
- package/src/assets/icons_old/leave-account.svg +4 -0
- package/src/assets/icons_old/link.svg +4 -0
- package/src/assets/icons_old/lock-closed.svg +4 -0
- package/src/assets/icons_old/lock.svg +4 -0
- package/src/assets/icons_old/locked-user.svg +4 -0
- package/src/assets/icons_old/marketplace.svg +4 -0
- package/src/assets/icons_old/minus.svg +4 -0
- package/src/assets/icons_old/monitoring.svg +4 -0
- package/src/assets/icons_old/no-logging.svg +4 -0
- package/src/assets/icons_old/node-cluster.svg +4 -0
- package/src/assets/icons_old/node.svg +4 -0
- package/src/assets/icons_old/operations.svg +13 -0
- package/src/assets/icons_old/options.svg +4 -0
- package/src/assets/icons_old/play.svg +4 -0
- package/src/assets/icons_old/plug.svg +4 -0
- package/src/assets/icons_old/plugin-clone.svg +4 -0
- package/src/assets/icons_old/plugin.svg +4 -0
- package/src/assets/icons_old/plugins.svg +4 -0
- package/src/assets/icons_old/pod.svg +4 -0
- package/src/assets/icons_old/print.svg +4 -0
- package/src/assets/icons_old/projects.svg +11 -0
- package/src/assets/icons_old/python.svg +4 -0
- package/src/assets/icons_old/quorum.svg +4 -0
- package/src/assets/icons_old/refresh.svg +4 -0
- package/src/assets/icons_old/regenerate.svg +4 -0
- package/src/assets/icons_old/region.svg +4 -0
- package/src/assets/icons_old/reports.svg +3 -0
- package/src/assets/icons_old/request-approve.svg +4 -0
- package/src/assets/icons_old/request-decline.svg +4 -0
- package/src/assets/icons_old/reseller.svg +4 -0
- package/src/assets/icons_old/script.svg +7 -0
- package/src/assets/icons_old/search.svg +4 -0
- package/src/assets/icons_old/service-account.svg +4 -0
- package/src/assets/icons_old/settings.svg +4 -0
- package/src/assets/icons_old/sidebar-closed.svg +8 -0
- package/src/assets/icons_old/sidebar-open.svg +8 -0
- package/src/assets/icons_old/sign-out.svg +4 -0
- package/src/assets/icons_old/sign.svg +4 -0
- package/src/assets/icons_old/software.svg +4 -0
- package/src/assets/icons_old/sql-aggregate.svg +7 -0
- package/src/assets/icons_old/sql.svg +7 -0
- package/src/assets/icons_old/stack.svg +4 -0
- package/src/assets/icons_old/star-empty.svg +4 -0
- package/src/assets/icons_old/star-fill.svg +4 -0
- package/src/assets/icons_old/subscription.svg +5 -0
- package/src/assets/icons_old/support.svg +11 -0
- package/src/assets/icons_old/switcher.svg +4 -0
- package/src/assets/icons_old/sysadmin.svg +4 -0
- package/src/assets/icons_old/tag.svg +4 -0
- package/src/assets/icons_old/target.svg +4 -0
- package/src/assets/icons_old/tasks.svg +4 -0
- package/src/assets/icons_old/tfa-user.svg +4 -0
- package/src/assets/icons_old/tfa.svg +4 -0
- package/src/assets/icons_old/tokenization.svg +4 -0
- package/src/assets/icons_old/tools.svg +4 -0
- package/src/assets/icons_old/transition-from.svg +4 -0
- package/src/assets/icons_old/transition-to.svg +4 -0
- package/src/assets/icons_old/upload.svg +4 -0
- package/src/assets/icons_old/user-remove.svg +3 -0
- package/src/assets/icons_old/user.svg +4 -0
- package/src/assets/icons_old/view-type-cards.svg +4 -0
- package/src/assets/icons_old/view-type-list.svg +4 -0
- package/src/assets/icons_old/view-type-table.svg +4 -0
- package/src/assets/icons_old/warning.svg +4 -0
- package/src/assets/icons_old/workflow.svg +3 -0
- package/src/assets/icons_old/wrap.svg +4 -0
- package/src/assets/icons_old/wrench.svg +4 -0
- package/src/assets/images/fortanix_logo_icon.svg +20 -0
- package/src/components/actions/Button/Button.module.scss +81 -0
- package/src/components/actions/Button/Button.stories.tsx +262 -0
- package/src/components/actions/Button/Button.tsx +133 -0
- package/src/components/actions/ButtonAsLink/ButtonAsLink.module.scss +13 -0
- package/src/components/actions/ButtonAsLink/ButtonAsLink.stories.tsx +49 -0
- package/src/components/actions/ButtonAsLink/ButtonAsLink.tsx +56 -0
- package/src/components/actions/Link/Link.module.scss +38 -0
- package/src/components/actions/Link/Link.stories.tsx +54 -0
- package/src/components/actions/Link/Link.tsx +59 -0
- package/src/components/actions/LinkAsButton/LinkAsButton.stories.tsx +70 -0
- package/src/components/actions/LinkAsButton/LinkAsButton.tsx +59 -0
- package/src/components/containers/Alert/Alert.module.scss +41 -0
- package/src/components/containers/Alert/Alert.stories.tsx +47 -0
- package/src/components/containers/Alert/Alert.tsx +65 -0
- package/src/components/containers/Banner/Banner.module.scss +100 -0
- package/src/components/containers/Banner/Banner.stories.tsx +198 -0
- package/src/components/containers/Banner/Banner.tsx +121 -0
- package/src/components/containers/Card/Card.module.scss +32 -0
- package/src/components/containers/Card/Card.stories.tsx +67 -0
- package/src/components/containers/Card/Card.tsx +48 -0
- package/src/components/containers/Dialog/Dialog.module.scss +166 -0
- package/src/components/containers/Dialog/Dialog.stories.tsx +32 -0
- package/src/components/containers/Dialog/Dialog.tsx +130 -0
- package/src/components/containers/Panel/Panel.module.scss +32 -0
- package/src/components/containers/Panel/Panel.stories.tsx +46 -0
- package/src/components/containers/Panel/Panel.tsx +48 -0
- package/src/components/forms/context/Form/Form.module.scss +11 -0
- package/src/components/forms/context/Form/Form.stories.tsx +99 -0
- package/src/components/forms/context/Form/Form.tsx +106 -0
- package/src/components/forms/context/Form/FormOptics.tsx +109 -0
- package/src/components/forms/context/SubmitButton/SubmitButton.module.scss +9 -0
- package/src/components/forms/context/SubmitButton/SubmitButton.stories.tsx +132 -0
- package/src/components/forms/context/SubmitButton/SubmitButton.tsx +98 -0
- package/src/components/forms/controls/Checkbox/Checkbox.module.scss +67 -0
- package/src/components/forms/controls/Checkbox/Checkbox.stories.tsx +119 -0
- package/src/components/forms/controls/Checkbox/Checkbox.tsx +53 -0
- package/src/components/forms/controls/Input/Input.module.scss +40 -0
- package/src/components/forms/controls/Input/Input.stories.tsx +55 -0
- package/src/components/forms/controls/Input/Input.tsx +44 -0
- package/src/components/forms/controls/SegmentedControl/SegmentedControl.module.scss +76 -0
- package/src/components/forms/controls/SegmentedControl/SegmentedControl.stories.tsx +92 -0
- package/src/components/forms/controls/SegmentedControl/SegmentedControl.tsx +103 -0
- package/src/components/forms/controls/Select/Select.module.scss +105 -0
- package/src/components/forms/controls/Select/Select.stories.tsx +43 -0
- package/src/components/forms/controls/Select/Select.tsx +166 -0
- package/src/components/forms/controls/Switch/Switch.module.scss +63 -0
- package/src/components/forms/controls/Switch/Switch.stories.tsx +50 -0
- package/src/components/forms/controls/Switch/Switch.tsx +46 -0
- package/src/components/forms/fields/CheckboxField/CheckboxField.module.scss +46 -0
- package/src/components/forms/fields/CheckboxField/CheckboxField.stories.tsx +74 -0
- package/src/components/forms/fields/CheckboxField/CheckboxField.tsx +118 -0
- package/src/components/forms/fields/CheckboxGroup/CheckboxGroup.module.scss +22 -0
- package/src/components/forms/fields/CheckboxGroup/CheckboxGroup.stories.tsx +36 -0
- package/src/components/forms/fields/CheckboxGroup/CheckboxGroup.tsx +37 -0
- package/src/components/forms/fields/InputField/InputField.module.scss +24 -0
- package/src/components/forms/fields/InputField/InputField.stories.tsx +57 -0
- package/src/components/forms/fields/InputField/InputField.tsx +72 -0
- package/src/components/graphics/Icon/Icon.module.scss +42 -0
- package/src/components/graphics/Icon/Icon.stories.tsx +67 -0
- package/src/components/graphics/Icon/Icon.tsx +50 -0
- package/src/components/graphics/PlaceholderEmpty/PlaceholderEmpty.module.scss +76 -0
- package/src/components/graphics/PlaceholderEmpty/PlaceholderEmpty.stories.tsx +101 -0
- package/src/components/graphics/PlaceholderEmpty/PlaceholderEmpty.tsx +91 -0
- package/src/components/graphics/ProgressBar/ProgressBar.module.scss +43 -0
- package/src/components/graphics/ProgressBar/ProgressBar.stories.tsx +70 -0
- package/src/components/graphics/ProgressBar/ProgressBar.tsx +58 -0
- package/src/components/graphics/Spinner/Spinner.module.scss +61 -0
- package/src/components/graphics/Spinner/Spinner.stories.tsx +56 -0
- package/src/components/graphics/Spinner/Spinner.tsx +41 -0
- package/src/components/lists/PropertyList/PropertyList.module.scss +33 -0
- package/src/components/lists/PropertyList/PropertyList.stories.tsx +45 -0
- package/src/components/lists/PropertyList/PropertyList.tsx +60 -0
- package/src/components/navigations/Stepper/Stepper.module.scss +88 -0
- package/src/components/navigations/Stepper/Stepper.stories.tsx +68 -0
- package/src/components/navigations/Stepper/Stepper.tsx +95 -0
- package/src/components/navigations/Tabs/Tabs.module.scss +71 -0
- package/src/components/navigations/Tabs/Tabs.stories.tsx +106 -0
- package/src/components/navigations/Tabs/Tabs.tsx +121 -0
- package/src/components/overlays/DropdownMenu/DropdownMenu.module.scss +113 -0
- package/src/components/overlays/DropdownMenu/DropdownMenu.stories.tsx +91 -0
- package/src/components/overlays/DropdownMenu/DropdownMenu.tsx +155 -0
- package/src/components/overlays/DropdownMenu/DropdownMenuProvider.module.scss +105 -0
- package/src/components/overlays/DropdownMenu/DropdownMenuProvider.stories.tsx +71 -0
- package/src/components/overlays/DropdownMenu/DropdownMenuProvider.tsx +168 -0
- package/src/components/overlays/Modal/Modal.module.scss +185 -0
- package/src/components/overlays/Modal/Modal.stories.tsx +144 -0
- package/src/components/overlays/Modal/Modal.tsx +202 -0
- package/src/components/overlays/Toast/Toast.module.scss +123 -0
- package/src/components/overlays/Toast/Toast.stories.tsx +219 -0
- package/src/components/overlays/Toast/Toast.tsx +233 -0
- package/src/components/overlays/Toast/ToastyOverride.scss +27 -0
- package/src/components/overlays/Tooltip/Tooltip.module.scss +162 -0
- package/src/components/overlays/Tooltip/Tooltip.stories.tsx +115 -0
- package/src/components/overlays/Tooltip/Tooltip.tsx +75 -0
- package/src/components/overlays/Tooltip/TooltipProvider.stories.tsx +169 -0
- package/src/components/overlays/Tooltip/TooltipProvider.tsx +164 -0
- package/src/components/util/Clipboard/Clipboard.tsx +11 -0
- package/src/components/util/Popover/Popover.tsx +219 -0
- package/src/docs/Changelog.mdx +7 -0
- package/src/docs/Colors.mdx +113 -0
- package/src/docs/Colors.module.scss +56 -0
- package/src/docs/Iconography.mdx +70 -0
- package/src/docs/Iconography.module.scss +37 -0
- package/src/docs/Introduction.mdx +26 -0
- package/src/docs/Typography.mdx +109 -0
- package/src/docs/Typography.module.scss +22 -0
- package/src/layouts/AppLayout/AppLayout.module.scss +110 -0
- package/src/layouts/AppLayout/AppLayout.stories.tsx +112 -0
- package/src/layouts/AppLayout/AppLayout.tsx +31 -0
- package/src/layouts/AppLayout/Breadcrumbs/Breadcrumbs.module.scss +47 -0
- package/src/layouts/AppLayout/Breadcrumbs/Breadcrumbs.stories.tsx +66 -0
- package/src/layouts/AppLayout/Breadcrumbs/Breadcrumbs.tsx +63 -0
- package/src/layouts/AppLayout/Header/AccountSelector.module.scss +24 -0
- package/src/layouts/AppLayout/Header/AccountSelector.stories.tsx +31 -0
- package/src/layouts/AppLayout/Header/AccountSelector.tsx +51 -0
- package/src/layouts/AppLayout/Header/Header.module.scss +74 -0
- package/src/layouts/AppLayout/Header/Header.stories.tsx +30 -0
- package/src/layouts/AppLayout/Header/Header.tsx +31 -0
- package/src/layouts/AppLayout/Header/SolutionSelector.module.scss +24 -0
- package/src/layouts/AppLayout/Header/SolutionSelector.stories.tsx +31 -0
- package/src/layouts/AppLayout/Header/SolutionSelector.tsx +50 -0
- package/src/layouts/AppLayout/Header/UserMenu.module.scss +31 -0
- package/src/layouts/AppLayout/Header/UserMenu.stories.tsx +32 -0
- package/src/layouts/AppLayout/Header/UserMenu.tsx +67 -0
- package/src/layouts/AppLayout/Logo/Logo.module.scss +78 -0
- package/src/layouts/AppLayout/Logo/Logo.tsx +38 -0
- package/src/layouts/AppLayout/Nav/Nav.module.scss +73 -0
- package/src/layouts/AppLayout/Nav/Nav.stories.tsx +32 -0
- package/src/layouts/AppLayout/Nav/Nav.tsx +75 -0
- package/src/layouts/AppLayout/Sidebar/Sidebar.module.scss +46 -0
- package/src/layouts/AppLayout/Sidebar/Sidebar.stories.tsx +30 -0
- package/src/layouts/AppLayout/Sidebar/Sidebar.tsx +33 -0
- package/src/layouts/FormLayout/FormLayout.module.scss +19 -0
- package/src/layouts/FormLayout/FormLayout.stories.tsx +64 -0
- package/src/layouts/FormLayout/FormLayout.tsx +32 -0
- package/src/styling/accessibility.css +24 -0
- package/src/styling/context/theming.scss +26 -0
- package/src/styling/context/theming_mixins.scss +79 -0
- package/src/styling/defs.scss +60 -0
- package/src/styling/fonts.css +126 -0
- package/src/styling/fonts_mixins.scss +16 -0
- package/src/styling/global.scss +49 -0
- package/src/styling/lib/normalize.css +78 -0
- package/src/styling/lib/reset-custom.css +58 -0
- package/src/styling/lib/reset.css +115 -0
- package/src/styling/main.scss +29 -0
- package/src/styling/variables.css +18 -0
- package/src/styling/variables.scss +928 -0
- package/src/styling/variables.ts +64 -0
- package/src/types/globals.d.ts +14 -0
- package/src/types/vite-env.d.ts +1 -0
- package/src/typography/BodyText/BodyText.mixins.scss +224 -0
- package/src/typography/BodyText/BodyText.module.scss +28 -0
- package/src/typography/BodyText/BodyText.stories.tsx +109 -0
- package/src/typography/BodyText/BodyText.tsx +30 -0
- package/src/typography/Heading/Heading.mixins.scss +42 -0
- package/src/typography/Heading/Heading.module.scss +15 -0
- package/src/typography/Heading/Heading.stories.tsx +112 -0
- package/src/typography/Heading/Heading.tsx +57 -0
- package/src/util/componentUtil.ts +19 -0
- package/src/util/drag.ts +197 -0
- package/src/util/reactUtil.ts +40 -0
- package/src/util/storybook/OverflowTester.css +13 -0
- package/src/util/storybook/OverflowTester.tsx +30 -0
- package/src/util/time.ts +12 -0
- package/src/util/types.ts +8 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
3
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
@use '../../../styling/defs.scss' as bk;
|
|
6
|
+
|
|
7
|
+
@layer baklava.components {
|
|
8
|
+
.bk-placeholder-empty {
|
|
9
|
+
@include bk.component-base(bk-placeholder-empty);
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
|
|
14
|
+
&.bk-placeholder-empty--large {
|
|
15
|
+
gap: bk.$spacing-6;
|
|
16
|
+
|
|
17
|
+
.bk-placeholder-empty__icon {
|
|
18
|
+
--bk-icon-size: 6rem;
|
|
19
|
+
max-height: 5rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.bk-placeholder-empty__content {
|
|
23
|
+
gap: bk.$spacing-4;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.bk-placeholder-empty__content__title {
|
|
27
|
+
font-size: 20px;
|
|
28
|
+
line-height: 20px;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.bk-placeholder-empty--small {
|
|
33
|
+
gap: bk.$spacing-4;
|
|
34
|
+
|
|
35
|
+
.bk-placeholder-empty__icon {
|
|
36
|
+
--bk-icon-size: 4rem;
|
|
37
|
+
max-height: 3rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.bk-placeholder-empty__content {
|
|
41
|
+
gap: bk.$spacing-2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.bk-placeholder-empty__content__title {
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
line-height: 14px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.bk-placeholder-empty__icon {
|
|
51
|
+
color: bk.$theme-empty-state-stoke-default;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.bk-placeholder-empty__content {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.bk-placeholder-empty__content__title {
|
|
61
|
+
color: bk.$theme-text-heading-default;
|
|
62
|
+
font-family: bk.$font-family-display;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.bk-placeholder-empty__content__subtitle {
|
|
66
|
+
max-width: 50%;
|
|
67
|
+
text-align: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.bk-placeholder-empty__content__action {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
gap: bk.$spacing-4;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
3
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
import { PlaceholderEmpty, PlaceholderEmptyAction } from './PlaceholderEmpty.tsx';
|
|
10
|
+
import { Button } from '../../actions/Button/Button.tsx';
|
|
11
|
+
import { Link } from '../../actions/Link/Link.tsx';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
type PlaceholderEmptyArgs = React.ComponentProps<typeof PlaceholderEmpty>;
|
|
15
|
+
type Story = StoryObj<PlaceholderEmptyArgs>;
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
component: PlaceholderEmpty,
|
|
19
|
+
parameters: {
|
|
20
|
+
layout: 'padded',
|
|
21
|
+
},
|
|
22
|
+
tags: ['autodocs'],
|
|
23
|
+
argTypes: {
|
|
24
|
+
},
|
|
25
|
+
args: {
|
|
26
|
+
title: 'No data to display',
|
|
27
|
+
},
|
|
28
|
+
render: (args) => <PlaceholderEmpty {...args}/>,
|
|
29
|
+
} satisfies Meta<PlaceholderEmptyArgs>;
|
|
30
|
+
|
|
31
|
+
const actions = (
|
|
32
|
+
<PlaceholderEmptyAction>
|
|
33
|
+
<Button variant="secondary">Button</Button>
|
|
34
|
+
<Button variant="primary">Button</Button>
|
|
35
|
+
</PlaceholderEmptyAction>
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const subtitle = (
|
|
39
|
+
<>
|
|
40
|
+
In case there is a secondary text to be added withIn case
|
|
41
|
+
there is a secondary text to be added with <Link>Link</Link>
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export const Standard: Story = {
|
|
46
|
+
name: 'Standard',
|
|
47
|
+
args: {},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const StandardWithSubtitle: Story = {
|
|
51
|
+
name: 'Standard with subtitle',
|
|
52
|
+
args: {
|
|
53
|
+
subtitle,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export const StandardWithButtons: Story = {
|
|
58
|
+
name: 'Standard with buttons',
|
|
59
|
+
args: {
|
|
60
|
+
actions,
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export const StandardWithSubtitleAndButtons: Story = {
|
|
65
|
+
name: 'Standard with subtitle and buttons',
|
|
66
|
+
args: {
|
|
67
|
+
subtitle,
|
|
68
|
+
actions,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const Small: Story = {
|
|
73
|
+
name: 'Small',
|
|
74
|
+
args: {
|
|
75
|
+
size: 'small',
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const SmallWithFolderIcon: Story = {
|
|
80
|
+
name: 'Small with folder icon',
|
|
81
|
+
args: {
|
|
82
|
+
size: 'small',
|
|
83
|
+
icon: 'folder',
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const SmallWithFileIcon: Story = {
|
|
88
|
+
name: 'Small with file icon',
|
|
89
|
+
args: {
|
|
90
|
+
size: 'small',
|
|
91
|
+
icon: 'file',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const SmallWithFileErrorIcon: Story = {
|
|
96
|
+
name: 'Small with file error icon',
|
|
97
|
+
args: {
|
|
98
|
+
size: 'small',
|
|
99
|
+
icon: 'file-error',
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
/* Copyright (c) Fortanix, Inc.
|
|
3
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
4
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
5
|
+
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { classNames as cx, type ComponentProps } from '../../../util/componentUtil.ts';
|
|
8
|
+
|
|
9
|
+
import { Icon, type IconName } from '../Icon/Icon.tsx';
|
|
10
|
+
|
|
11
|
+
import cl from './PlaceholderEmpty.module.scss';
|
|
12
|
+
|
|
13
|
+
export { cl as PlaceholderEmptyClassNames };
|
|
14
|
+
|
|
15
|
+
export type PlaceholderEmptySize = 'large' | 'small';
|
|
16
|
+
|
|
17
|
+
export type PlaceholderEmptyProps = React.PropsWithChildren<ComponentProps<'div'> & {
|
|
18
|
+
/** Whether this component should be unstyled. */
|
|
19
|
+
unstyled?: undefined | boolean,
|
|
20
|
+
|
|
21
|
+
/** A size of this component. Defaults to "large". */
|
|
22
|
+
size?: undefined | PlaceholderEmptySize,
|
|
23
|
+
|
|
24
|
+
/** An icon type of this component. Defaults to "graph". */
|
|
25
|
+
icon?: undefined | IconName,
|
|
26
|
+
|
|
27
|
+
/** A custom icon of this component. */
|
|
28
|
+
customIcon?: undefined | React.ReactNode,
|
|
29
|
+
|
|
30
|
+
/** A title of this component. Mandatory. */
|
|
31
|
+
title: string,
|
|
32
|
+
|
|
33
|
+
/** A sub message to be displayed next to the title. */
|
|
34
|
+
subtitle?: undefined | string | React.ReactNode,
|
|
35
|
+
|
|
36
|
+
/** Any additional actions to be shown in this component, such as a button. */
|
|
37
|
+
actions?: undefined | React.ReactNode,
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* A way to display the absence of data.
|
|
41
|
+
*/
|
|
42
|
+
export const PlaceholderEmpty = (props: PlaceholderEmptyProps) => {
|
|
43
|
+
const {
|
|
44
|
+
unstyled = false,
|
|
45
|
+
size = 'large',
|
|
46
|
+
icon = 'graph',
|
|
47
|
+
customIcon = null,
|
|
48
|
+
title = '',
|
|
49
|
+
subtitle = '',
|
|
50
|
+
actions = null,
|
|
51
|
+
children,
|
|
52
|
+
...propsRest
|
|
53
|
+
} = props;
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<div
|
|
57
|
+
{...propsRest}
|
|
58
|
+
className={cx({
|
|
59
|
+
bk: true,
|
|
60
|
+
[cl['bk-placeholder-empty']]: !unstyled,
|
|
61
|
+
[cl['bk-placeholder-empty--large']]: size === 'large',
|
|
62
|
+
[cl['bk-placeholder-empty--small']]: size === 'small',
|
|
63
|
+
}, propsRest.className)}
|
|
64
|
+
>
|
|
65
|
+
{customIcon || <Icon className={cl['bk-placeholder-empty__icon']} icon={icon} />}
|
|
66
|
+
|
|
67
|
+
<div className={cl['bk-placeholder-empty__content']}>
|
|
68
|
+
{title && (
|
|
69
|
+
<span className={cl['bk-placeholder-empty__content__title']}>{title}</span>
|
|
70
|
+
)}
|
|
71
|
+
{subtitle && (
|
|
72
|
+
<span className={cl['bk-placeholder-empty__content__subtitle']}>{subtitle}</span>
|
|
73
|
+
)}
|
|
74
|
+
{actions}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type PlaceholderEmptyActionProps = React.PropsWithChildren<ComponentProps<'div'>>;
|
|
81
|
+
/**
|
|
82
|
+
* A wrapper component, intended to easily add some styling to children's `<Button/>`'s.
|
|
83
|
+
* UX expects that such buttons are `<Button variant="tertiary"/>`.
|
|
84
|
+
*/
|
|
85
|
+
export const PlaceholderEmptyAction = (props: PlaceholderEmptyActionProps) => {
|
|
86
|
+
return (
|
|
87
|
+
<div className={cl['bk-placeholder-empty__content__action']}>
|
|
88
|
+
{props.children}
|
|
89
|
+
</div>
|
|
90
|
+
);
|
|
91
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
3
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
@use '../../../styling/defs.scss' as bk;
|
|
6
|
+
|
|
7
|
+
@layer baklava.components {
|
|
8
|
+
.bk-progress-bar {
|
|
9
|
+
@include bk.component-base(bk-progress-bar);
|
|
10
|
+
|
|
11
|
+
appearance: none; // undo default browser appearance
|
|
12
|
+
|
|
13
|
+
background: bk.$theme-progress-bar-track;
|
|
14
|
+
border: none;
|
|
15
|
+
border-radius: bk.$border-radius-m;
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 10px; // sizing not present on bk variables
|
|
18
|
+
}
|
|
19
|
+
// for now <progress> needs to be styled with browser-prefixes on Blink and Webkit
|
|
20
|
+
.bk-progress-bar::-moz-progress-bar {
|
|
21
|
+
background: bk.$theme-progress-bar-fill;
|
|
22
|
+
border-radius: bk.$border-radius-m;
|
|
23
|
+
}
|
|
24
|
+
.bk-progress-bar::-webkit-progress-bar {
|
|
25
|
+
background: bk.$theme-progress-bar-track;
|
|
26
|
+
border-radius: bk.$border-radius-m;
|
|
27
|
+
}
|
|
28
|
+
.bk-progress-bar::-webkit-progress-value {
|
|
29
|
+
background: bk.$theme-progress-bar-fill;
|
|
30
|
+
border-radius: bk.$border-radius-m;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.bk-progress-bar__label {
|
|
34
|
+
font-size: bk.$font-size-m;
|
|
35
|
+
font-weight: bk.$font-weight-semibold;
|
|
36
|
+
margin-bottom: bk.$sizing-2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.bk-progress-bar__hint-text {
|
|
40
|
+
font-size: bk.$font-size-s;
|
|
41
|
+
margin-top: -1 * bk.$sizing-1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
3
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
import { ProgressBar } from './ProgressBar.tsx';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type ProgressBarArgs = React.ComponentProps<typeof ProgressBar>;
|
|
13
|
+
type Story = StoryObj<ProgressBarArgs>;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
component: ProgressBar,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'padded',
|
|
19
|
+
},
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
},
|
|
23
|
+
args: {},
|
|
24
|
+
render: (args) => <ProgressBar {...args}/>,
|
|
25
|
+
} satisfies Meta<ProgressBarArgs>;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export const ProgressBarWithOptionalAttributes = {
|
|
29
|
+
name: 'Progress Bar with optional attributes',
|
|
30
|
+
args: {
|
|
31
|
+
progress: 50,
|
|
32
|
+
label: 'Label',
|
|
33
|
+
hintText: 'Hint text',
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const ProgressBar0: Story = {
|
|
38
|
+
name: 'Progress Bar on 0%',
|
|
39
|
+
args: {
|
|
40
|
+
progress: 0,
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const ProgressBar25: Story = {
|
|
45
|
+
name: 'Progress Bar on 25%',
|
|
46
|
+
args: {
|
|
47
|
+
progress: 25,
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const ProgressBar50: Story = {
|
|
52
|
+
name: 'Progress Bar on 50%',
|
|
53
|
+
args: {
|
|
54
|
+
progress: 50,
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const ProgressBar75: Story = {
|
|
59
|
+
name: 'Progress Bar on 75%',
|
|
60
|
+
args: {
|
|
61
|
+
progress: 75,
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const ProgressBar100: Story = {
|
|
66
|
+
name: 'Progress Bar on 100%',
|
|
67
|
+
args: {
|
|
68
|
+
progress: 100,
|
|
69
|
+
}
|
|
70
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
|
|
3
|
+
|* distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { classNames as cx, type ComponentProps } from '../../../util/componentUtil.ts';
|
|
7
|
+
|
|
8
|
+
import cl from './ProgressBar.module.scss';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export { cl as ProgressBarClassNames };
|
|
12
|
+
|
|
13
|
+
export type ProgressBarProps = React.PropsWithChildren<ComponentProps<'progress'> & {
|
|
14
|
+
/** Whether this component should be unstyled. */
|
|
15
|
+
unstyled?: undefined | boolean,
|
|
16
|
+
|
|
17
|
+
/** The progress it should be displaying as in percent, ranging from 0 to 100. */
|
|
18
|
+
progress: number,
|
|
19
|
+
|
|
20
|
+
/** An optional label, displayed as the progress bar title. */
|
|
21
|
+
label?: undefined | string,
|
|
22
|
+
|
|
23
|
+
/** An optional hint text, displayed after the progress bar. */
|
|
24
|
+
hintText?: undefined | string,
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* A way to display progress to complete a task or the time remaining.
|
|
28
|
+
*/
|
|
29
|
+
export const ProgressBar = (props: ProgressBarProps) => {
|
|
30
|
+
const {
|
|
31
|
+
unstyled = false,
|
|
32
|
+
progress = 0,
|
|
33
|
+
label = undefined,
|
|
34
|
+
hintText = undefined,
|
|
35
|
+
...propsRest
|
|
36
|
+
} = props;
|
|
37
|
+
return (
|
|
38
|
+
<div>
|
|
39
|
+
{label && (
|
|
40
|
+
<div className={cl['bk-progress-bar__label']}>{label}</div>
|
|
41
|
+
)}
|
|
42
|
+
<progress
|
|
43
|
+
{...propsRest}
|
|
44
|
+
className={cx({
|
|
45
|
+
bk: true,
|
|
46
|
+
[cl['bk-progress-bar']]: !unstyled,
|
|
47
|
+
}, propsRest.className)}
|
|
48
|
+
max="100"
|
|
49
|
+
value={progress}
|
|
50
|
+
>
|
|
51
|
+
{progress}%
|
|
52
|
+
</progress>
|
|
53
|
+
{hintText && (
|
|
54
|
+
<div className={cl['bk-progress-bar__hint-text']}>{hintText}</div>
|
|
55
|
+
)}
|
|
56
|
+
</div>
|
|
57
|
+
);
|
|
58
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|
|
3
|
+
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
@use '../../../styling/defs.scss' as bk;
|
|
6
|
+
|
|
7
|
+
@layer baklava.components {
|
|
8
|
+
@keyframes spin {
|
|
9
|
+
0% {
|
|
10
|
+
transform: rotate(0deg);
|
|
11
|
+
}
|
|
12
|
+
100% {
|
|
13
|
+
transform: rotate(360deg);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.bk-spinner {
|
|
18
|
+
@include bk.component-base(bk-spinner);
|
|
19
|
+
|
|
20
|
+
--bk-spinner-large-size: 88px;
|
|
21
|
+
--bk-spinner-large-thickness: 6px;
|
|
22
|
+
|
|
23
|
+
--bk-spinner-medium-size: 55px;
|
|
24
|
+
--bk-spinner-medium-thickness: 4px;
|
|
25
|
+
|
|
26
|
+
--bk-spinner-small-size: 18px;
|
|
27
|
+
--bk-spinner-small-thickness: 2px;
|
|
28
|
+
|
|
29
|
+
--antialias: 1px;
|
|
30
|
+
--progress: 0.6turn;
|
|
31
|
+
|
|
32
|
+
aspect-ratio: 1;
|
|
33
|
+
border-radius: 50%;
|
|
34
|
+
background: conic-gradient(bk.$theme-spinner-fill var(--progress), bk.$theme-spinner-track var(--progress));
|
|
35
|
+
|
|
36
|
+
// Note: for spinners the animation should be included even if `prefers-reduced-motion` is set
|
|
37
|
+
animation: spin 1s linear infinite;
|
|
38
|
+
|
|
39
|
+
&.bk-spinner--large {
|
|
40
|
+
width: var(--bk-spinner-large-size);
|
|
41
|
+
--mask-radius: calc(70% - calc(var(--bk-spinner-large-thickness)*1.5) / 100 * 70);
|
|
42
|
+
mask-image: radial-gradient(transparent 0 var(--mask-radius), black calc(var(--mask-radius) + var(--antialias)));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&.bk-spinner--medium {
|
|
46
|
+
width: var(--bk-spinner-medium-size);
|
|
47
|
+
--mask-radius: calc(70% - calc(var(--bk-spinner-medium-thickness)*1.5) / 100 * 70);
|
|
48
|
+
mask-image: radial-gradient(transparent 0 var(--mask-radius), black calc(var(--mask-radius) + var(--antialias)));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.bk-spinner--small {
|
|
52
|
+
width: var(--bk-spinner-small-size);
|
|
53
|
+
--mask-radius: calc(70% - calc(var(--bk-spinner-small-thickness)*2) / 100 * 70);
|
|
54
|
+
mask-image: radial-gradient(transparent 0 var(--mask-radius), black calc(var(--mask-radius) + var(--antialias)));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.bk-spinner--inline {
|
|
58
|
+
display: inline-block;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|
|
3
|
+
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
|
|
9
|
+
import { Spinner } from './Spinner.tsx';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type SpinnerArgs = React.ComponentProps<typeof Spinner>;
|
|
13
|
+
type Story = StoryObj<typeof Spinner>;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
component: Spinner,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'centered',
|
|
19
|
+
//design: { type: 'figma', url: '' },
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
argTypes: {},
|
|
23
|
+
args: {},
|
|
24
|
+
render: args => (
|
|
25
|
+
<Spinner {...args}/>
|
|
26
|
+
),
|
|
27
|
+
} satisfies Meta<SpinnerArgs>;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const SpinnerSmall: Story = {
|
|
31
|
+
name: 'Spinner Small',
|
|
32
|
+
args: {
|
|
33
|
+
size: 'small',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const SpinnerMedium: Story = {
|
|
38
|
+
name: 'Spinner Medium',
|
|
39
|
+
args: {
|
|
40
|
+
size: 'medium',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const SpinnerLarge: Story = {
|
|
45
|
+
name: 'Spinner Large',
|
|
46
|
+
args: {
|
|
47
|
+
size: 'large',
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const SpinnerInline: Story = {
|
|
52
|
+
name: 'Spinner Inline',
|
|
53
|
+
render: () => (
|
|
54
|
+
<p>Lorem ipsum sit dolor amet...<Spinner inline={true}/></p>
|
|
55
|
+
),
|
|
56
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|
|
3
|
+
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import { classNames as cx, type ComponentProps } from '../../../util/componentUtil.ts';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
|
+
import { icons } from '../../../assets/icons/_icons.ts';
|
|
9
|
+
import cl from './Spinner.module.scss';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export type SpinnerName = keyof typeof icons;
|
|
13
|
+
export { cl as SpinnerClassNames };
|
|
14
|
+
|
|
15
|
+
export type SpinnerProps = React.PropsWithChildren<ComponentProps<'div'> & {
|
|
16
|
+
/**
|
|
17
|
+
* If the spinner should be inline. Optional parameter. Defaults to false.
|
|
18
|
+
*/
|
|
19
|
+
inline?: undefined | boolean,
|
|
20
|
+
/**
|
|
21
|
+
* The size of spinner. Optional parameter. Can be "small", "medium" or "large". Defaults to "small".
|
|
22
|
+
*/
|
|
23
|
+
size?: undefined | 'large' | 'medium' | 'small',
|
|
24
|
+
}>;
|
|
25
|
+
export const Spinner = ({
|
|
26
|
+
inline,
|
|
27
|
+
size = 'small',
|
|
28
|
+
...props
|
|
29
|
+
}: SpinnerProps) => {
|
|
30
|
+
return (
|
|
31
|
+
<div
|
|
32
|
+
{...props}
|
|
33
|
+
className={cx({
|
|
34
|
+
bk: true,
|
|
35
|
+
[cl['bk-spinner']]: true,
|
|
36
|
+
[cl[`bk-spinner--${size}`]]: true,
|
|
37
|
+
[cl['bk-spinner--inline']]: inline,
|
|
38
|
+
}, props.className)}
|
|
39
|
+
/>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|
|
3
|
+
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
@use '../../../styling/defs.scss' as bk;
|
|
6
|
+
|
|
7
|
+
@layer baklava.components {
|
|
8
|
+
.bk-property-list {
|
|
9
|
+
@include bk.component-base(bk-property-list);
|
|
10
|
+
|
|
11
|
+
margin: bk.$sizing-0;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-flow: row wrap;
|
|
14
|
+
gap: bk.$sizing-xl bk.$sizing-l;
|
|
15
|
+
|
|
16
|
+
.bk-property-list__property {
|
|
17
|
+
> :is(dt, dd) {
|
|
18
|
+
font-size: bk.$font-size-m;
|
|
19
|
+
}
|
|
20
|
+
dt {
|
|
21
|
+
margin-top: bk.$sizing-4;
|
|
22
|
+
margin-bottom: bk.$sizing-2;
|
|
23
|
+
@include bk.font($family: bk.$font-family-display, $weight: bk.$font-weight-semibold);
|
|
24
|
+
|
|
25
|
+
//color: bk.$color-neutral-3;
|
|
26
|
+
//line-height: bk.$line-height-6;
|
|
27
|
+
}
|
|
28
|
+
dd {
|
|
29
|
+
margin-left: bk.$sizing-0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/* Copyright (c) Fortanix, Inc.
|
|
2
|
+
|* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
|
|
3
|
+
|* the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
4
|
+
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
|
|
9
|
+
import { PropertyList } from './PropertyList.tsx';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type PropertyListArgs = React.ComponentProps<typeof PropertyList>;
|
|
13
|
+
type Story = StoryObj<typeof PropertyList>;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
component: PropertyList,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'padded',
|
|
19
|
+
//design: { type: 'figma', url: '' },
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
argTypes: {},
|
|
23
|
+
args: {
|
|
24
|
+
unstyled: false,
|
|
25
|
+
},
|
|
26
|
+
render: (args) => <PropertyList {...args}/>,
|
|
27
|
+
} satisfies Meta<PropertyListArgs>;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const Standard: Story = {
|
|
31
|
+
args: {
|
|
32
|
+
children: (
|
|
33
|
+
<>
|
|
34
|
+
<PropertyList.Property
|
|
35
|
+
label="Key 1"
|
|
36
|
+
value="Value 1"
|
|
37
|
+
/>
|
|
38
|
+
<PropertyList.Property
|
|
39
|
+
label="Key 2"
|
|
40
|
+
value="Value 2"
|
|
41
|
+
/>
|
|
42
|
+
</>
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
};
|