@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,24 @@
|
|
|
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-solution-selector {
|
|
9
|
+
@include bk.component-base(bk-solution-selector);
|
|
10
|
+
|
|
11
|
+
// Allow the element to shrink down to just the icon
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
flex-shrink: 4; // Shrink relatively fast (since there is no important information besides the icon)
|
|
14
|
+
min-width: 3rem;
|
|
15
|
+
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: bk.$spacing-2;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
.bk-solution-selector__icon {
|
|
21
|
+
--bk-icon-accent-color: #{bk.$theme-header-icon-background-default};
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
import { SolutionSelector } from './SolutionSelector.tsx';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type SolutionSelectorArgs = React.ComponentProps<typeof SolutionSelector>;
|
|
13
|
+
type Story = StoryObj<SolutionSelectorArgs>;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
component: SolutionSelector,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'centered',
|
|
19
|
+
},
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
},
|
|
25
|
+
render: (args) => <SolutionSelector {...args}/>,
|
|
26
|
+
} satisfies Meta<SolutionSelectorArgs>;
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
export const Standard: Story = {
|
|
30
|
+
name: 'SolutionSelector',
|
|
31
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { Icon } from '../../../components/graphics/Icon/Icon.tsx';
|
|
9
|
+
import { Button } from '../../../components/actions/Button/Button.tsx';
|
|
10
|
+
import { DropdownMenuProvider } from '../../../components/overlays/DropdownMenu/DropdownMenuProvider.tsx';
|
|
11
|
+
|
|
12
|
+
import cl from './SolutionSelector.module.scss';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export { cl as SolutionSelectorClassNames };
|
|
16
|
+
|
|
17
|
+
export type SolutionSelectorProps = Omit<ComponentProps<typeof Button>, 'label'> & {
|
|
18
|
+
/** Whether this component should be unstyled. */
|
|
19
|
+
unstyled?: undefined | boolean,
|
|
20
|
+
};
|
|
21
|
+
export const SolutionSelector = (props: SolutionSelectorProps) => {
|
|
22
|
+
const { unstyled = false, children, ...propsRest } = props;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<DropdownMenuProvider
|
|
26
|
+
placement="bottom-start"
|
|
27
|
+
items={
|
|
28
|
+
<>
|
|
29
|
+
<DropdownMenuProvider.Option optionKey="iam" icon="user" label="Identity & Access Management"/>
|
|
30
|
+
<DropdownMenuProvider.Option optionKey="key-insight" icon="key" label="Key Insight"/>
|
|
31
|
+
</>
|
|
32
|
+
}
|
|
33
|
+
>
|
|
34
|
+
{({ props }) =>
|
|
35
|
+
<Button unstyled
|
|
36
|
+
{...props({
|
|
37
|
+
...propsRest,
|
|
38
|
+
className: cx('bk', { [cl['bk-solution-selector']]: !unstyled }, propsRest.className),
|
|
39
|
+
})}
|
|
40
|
+
>
|
|
41
|
+
<Icon icon="solutions" className={cl['bk-solution-selector__icon']}
|
|
42
|
+
decoration={{ type: 'background-circle' }}
|
|
43
|
+
/>
|
|
44
|
+
Solutions
|
|
45
|
+
<Icon icon="caret-down"/>
|
|
46
|
+
</Button>
|
|
47
|
+
}
|
|
48
|
+
</DropdownMenuProvider>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
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-user-menu {
|
|
9
|
+
@include bk.component-base(bk-user-menu);
|
|
10
|
+
|
|
11
|
+
flex-shrink: 1; // Allow the user menu to shrink inside a parent flexbox
|
|
12
|
+
min-width: 1rem; // Allow it to shrink down to just the icon on small screens
|
|
13
|
+
max-width: 40ch;
|
|
14
|
+
margin-inline-start: bk.$spacing-3;
|
|
15
|
+
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
gap: bk.$spacing-3;
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
> .bk-user-menu__user-icon {
|
|
22
|
+
font-size: 1.2em;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
> .bk-user-menu__user-name {
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
text-wrap: nowrap;
|
|
28
|
+
text-overflow: ellipsis;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
|
|
9
|
+
import { UserMenu } from './UserMenu.tsx';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
type UserMenuArgs = React.ComponentProps<typeof UserMenu>;
|
|
13
|
+
type Story = StoryObj<UserMenuArgs>;
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
component: UserMenu,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'centered',
|
|
19
|
+
},
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
},
|
|
23
|
+
args: {
|
|
24
|
+
userName: 'Anand Kashyap',
|
|
25
|
+
},
|
|
26
|
+
render: (args) => <UserMenu {...args}/>,
|
|
27
|
+
} satisfies Meta<UserMenuArgs>;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export const Standard: Story = {
|
|
31
|
+
name: 'UserMenu',
|
|
32
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { Icon } from '../../../components/graphics/Icon/Icon.tsx';
|
|
9
|
+
import { Button } from '../../../components/actions/Button/Button.tsx';
|
|
10
|
+
import { DropdownMenuProvider } from '../../../components/overlays/DropdownMenu/DropdownMenuProvider.tsx';
|
|
11
|
+
|
|
12
|
+
import cl from './UserMenu.module.scss';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
export { cl as UserMenuClassNames };
|
|
16
|
+
|
|
17
|
+
export type UserMenuProps = Omit<ComponentProps<typeof Button>, 'label'> & {
|
|
18
|
+
/** Whether this component should be unstyled. */
|
|
19
|
+
unstyled?: undefined | boolean,
|
|
20
|
+
|
|
21
|
+
/** The user's name */
|
|
22
|
+
userName?: undefined | string,
|
|
23
|
+
};
|
|
24
|
+
export const UserMenu = (props: UserMenuProps) => {
|
|
25
|
+
const { unstyled = false, children, userName, ...propsRest } = props;
|
|
26
|
+
|
|
27
|
+
const renderContent = () => {
|
|
28
|
+
if (userName) {
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<Icon icon="user-profile" className={cx(cl['bk-user-menu__user-icon'])}/>
|
|
32
|
+
<span className={cx(cl['bk-user-menu__user-name'])}>{userName}</span>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return children;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<DropdownMenuProvider
|
|
41
|
+
placement="bottom-end"
|
|
42
|
+
items={
|
|
43
|
+
<>
|
|
44
|
+
<DropdownMenuProvider.Action itemKey="profile" label="Profile"
|
|
45
|
+
onActivate={({ close }) => {
|
|
46
|
+
console.log(`Activated profile`);
|
|
47
|
+
close();
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
<DropdownMenuProvider.Action itemKey="sign-out" label="Sign out"
|
|
51
|
+
onActivate={({ close }) => {
|
|
52
|
+
console.log(`Activated sign out`);
|
|
53
|
+
close();
|
|
54
|
+
}}
|
|
55
|
+
/>
|
|
56
|
+
</>
|
|
57
|
+
}
|
|
58
|
+
>
|
|
59
|
+
<Button unstyled
|
|
60
|
+
{...propsRest}
|
|
61
|
+
className={cx('bk', { [cl['bk-user-menu']]: !unstyled }, propsRest.className)}
|
|
62
|
+
>
|
|
63
|
+
{renderContent()}
|
|
64
|
+
</Button>
|
|
65
|
+
</DropdownMenuProvider>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
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
|
+
/* stylelint-disable no-duplicate-selectors */
|
|
5
|
+
/* stylelint-disable selector-class-pattern */
|
|
6
|
+
|
|
7
|
+
@use '../../../styling/defs.scss' as bk;
|
|
8
|
+
|
|
9
|
+
@layer baklava.components {
|
|
10
|
+
.bk-app-logo {
|
|
11
|
+
@include bk.component-base(bk-app-logo);
|
|
12
|
+
container-type: inline-size;
|
|
13
|
+
width: 200px;
|
|
14
|
+
aspect-ratio: 1 / 0.2;
|
|
15
|
+
|
|
16
|
+
--icon-size: 0.16fr;
|
|
17
|
+
|
|
18
|
+
place-self: center start;
|
|
19
|
+
|
|
20
|
+
// overflow: clip;
|
|
21
|
+
// user-select: none;
|
|
22
|
+
|
|
23
|
+
margin: 13px 10px;
|
|
24
|
+
margin-bottom: 7px;
|
|
25
|
+
|
|
26
|
+
> :global(._logo) {
|
|
27
|
+
display: grid;
|
|
28
|
+
grid:
|
|
29
|
+
'icon title' max-content
|
|
30
|
+
'icon subtitle' 1fr
|
|
31
|
+
/ var(--icon-size) 1fr;
|
|
32
|
+
column-gap: 4cqi;
|
|
33
|
+
|
|
34
|
+
> :global(._icon) { grid-area: icon; }
|
|
35
|
+
> :global(._title) { grid-area: title; }
|
|
36
|
+
> :global(._subtitle) { grid-area: subtitle; }
|
|
37
|
+
|
|
38
|
+
color: bk.$theme-text-logo-default;
|
|
39
|
+
|
|
40
|
+
> :global(._icon) {
|
|
41
|
+
align-self: center;
|
|
42
|
+
}
|
|
43
|
+
> :global(._title), > :global(._subtitle) {
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
text-overflow: ellipsis;
|
|
47
|
+
}
|
|
48
|
+
> :global(._title) {
|
|
49
|
+
align-self: end;
|
|
50
|
+
font-size: 9.4cqi;
|
|
51
|
+
}
|
|
52
|
+
> :global(._subtitle) {
|
|
53
|
+
align-self: start;
|
|
54
|
+
font-size: 7cqi;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/* Fortanix logo styling */
|
|
59
|
+
> :global(._title) {
|
|
60
|
+
@include bk.font(bk.$font-family-display, bk.$font-weight-bold);
|
|
61
|
+
line-height: 1;
|
|
62
|
+
align-self: start;
|
|
63
|
+
|
|
64
|
+
&::after {
|
|
65
|
+
display: inline-block;
|
|
66
|
+
content: '®';
|
|
67
|
+
margin-left: 0.5ch;
|
|
68
|
+
|
|
69
|
+
vertical-align: 1.8cap;
|
|
70
|
+
font-size: 0.3em;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
> :global(._subtitle) {
|
|
74
|
+
@include bk.font(bk.$font-family-display, bk.$font-weight-medium);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 logoImage from '../../../assets/images/fortanix_logo_icon.svg';
|
|
9
|
+
import cl from './Logo.module.scss';
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export type LogoProps = React.PropsWithChildren<ComponentProps<'figure'>>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Logo component.
|
|
16
|
+
*/
|
|
17
|
+
export const Logo = ({ ...propsRest }: LogoProps) => {
|
|
18
|
+
const subtitle = 'Data Security Manager';
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<figure
|
|
22
|
+
{...propsRest}
|
|
23
|
+
className={cx(
|
|
24
|
+
'bk',
|
|
25
|
+
cl['bk-app-logo'],
|
|
26
|
+
propsRest.className,
|
|
27
|
+
)}
|
|
28
|
+
>
|
|
29
|
+
<div className="_logo">
|
|
30
|
+
<div className="_icon">
|
|
31
|
+
<img alt={`Fortanix ${subtitle}`} src={logoImage}/>
|
|
32
|
+
</div>
|
|
33
|
+
<span className="_title">Fortanix</span>
|
|
34
|
+
<span className="_subtitle">{subtitle}</span>
|
|
35
|
+
</div>
|
|
36
|
+
</figure>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
// https://ryanmulligan.dev/blog/layout-breakouts/
|
|
8
|
+
// https://cloudfour.com/thinks/breaking-out-with-css-grid-layout/
|
|
9
|
+
@mixin grid-breakout($inset-content: bk.$spacing-2) {
|
|
10
|
+
--gap-content: #{$inset-content};
|
|
11
|
+
--size-content: calc(100% - var(--gap) * 2);
|
|
12
|
+
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-columns:
|
|
15
|
+
[full-start] var(--gap-content)
|
|
16
|
+
[content-start] var(--size-content) [content-end]
|
|
17
|
+
var(--gap-content) [full-end];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@layer baklava.components {
|
|
21
|
+
.bk-nav {
|
|
22
|
+
@include bk.component-base(bk-nav);
|
|
23
|
+
|
|
24
|
+
--bk-nav-inset-content: #{bk.$spacing-3};
|
|
25
|
+
//padding-block: var(--bk-nav-inset-content);
|
|
26
|
+
|
|
27
|
+
@include grid-breakout($inset-content: var(--bk-nav-inset-content));
|
|
28
|
+
|
|
29
|
+
menu {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
//row-gap: var(--bk-sizing-2);
|
|
33
|
+
|
|
34
|
+
.bk-nav__item {
|
|
35
|
+
@include bk.font(bk.$font-family-display);
|
|
36
|
+
|
|
37
|
+
.bk-nav__item__link {
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
|
|
40
|
+
/* Focus outline */
|
|
41
|
+
&:focus-visible {
|
|
42
|
+
outline: none !important;
|
|
43
|
+
box-shadow: inset 5px 0 var(--bk-focus-outline-color);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
padding-block: bk.$spacing-2;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
background: bk.$theme-side-nav-menu-background-hover;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
grid-column: full;
|
|
53
|
+
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: row;
|
|
56
|
+
gap: bk.$spacing-2;
|
|
57
|
+
|
|
58
|
+
.bk-nav__item__link__icon {
|
|
59
|
+
// ignore
|
|
60
|
+
}
|
|
61
|
+
.bk-nav__item__link__label {
|
|
62
|
+
// ignore
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&[aria-current] {
|
|
67
|
+
border-left-width: 4px;
|
|
68
|
+
border-left-color: bk.$theme-side-nav-menu-tab-default;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
import { userEvent, within } from '@storybook/test';
|
|
9
|
+
|
|
10
|
+
import { Nav } from './Nav.tsx';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
type LayoutArgs = React.ComponentProps<typeof Nav>;
|
|
14
|
+
type Story = StoryObj<LayoutArgs>;
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
component: Nav,
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: 'fullscreen',
|
|
20
|
+
},
|
|
21
|
+
tags: ['autodocs'],
|
|
22
|
+
argTypes: {
|
|
23
|
+
},
|
|
24
|
+
} satisfies Meta<LayoutArgs>;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export const Standard: Story = {
|
|
28
|
+
render: () => <Nav/>,
|
|
29
|
+
play: async ({ canvasElement }) => {
|
|
30
|
+
const canvas = within(canvasElement);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { Link } from '../../../components/actions/Link/Link.tsx';
|
|
9
|
+
import { Icon, type IconName } from '../../../components/graphics/Icon/Icon.tsx';
|
|
10
|
+
|
|
11
|
+
import cl from './Nav.module.scss';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
export type NavItemProps = React.PropsWithChildren<ComponentProps<'li'> & {
|
|
15
|
+
/** Whether this component should be unstyled. */
|
|
16
|
+
unstyled?: undefined | boolean,
|
|
17
|
+
|
|
18
|
+
href?: undefined | string,
|
|
19
|
+
icon?: undefined | IconName,
|
|
20
|
+
label?: undefined | string,
|
|
21
|
+
|
|
22
|
+
active?: undefined | boolean,
|
|
23
|
+
}>;
|
|
24
|
+
export const NavItem = (props: NavItemProps) => {
|
|
25
|
+
const { unstyled, children, className, href, label, icon, active, ...propsRest } = props;
|
|
26
|
+
const renderItem = () => {
|
|
27
|
+
if (label) {
|
|
28
|
+
return (
|
|
29
|
+
<Link unstyled href={href} className={cx(cl['bk-nav__item__link'])}>
|
|
30
|
+
{icon && <Icon className={cx(cl['bk-nav__item__link__icon'])} icon={icon}/>}
|
|
31
|
+
<span className={cx(cl['bk-nav__item__link__label'])}>{label}</span>
|
|
32
|
+
</Link>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
return children;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<li
|
|
40
|
+
aria-current={active ? 'page' : undefined}
|
|
41
|
+
{...propsRest}
|
|
42
|
+
className={cx(
|
|
43
|
+
{ [cl['bk-nav__item']]: !unstyled },
|
|
44
|
+
)}
|
|
45
|
+
>
|
|
46
|
+
{renderItem()}
|
|
47
|
+
</li>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type NavProps = React.PropsWithChildren<ComponentProps<'nav'> & {
|
|
52
|
+
/** Whether this component should be unstyled. */
|
|
53
|
+
unstyled?: undefined | boolean,
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Nav component.
|
|
57
|
+
*/
|
|
58
|
+
export const Nav = Object.assign(
|
|
59
|
+
({ unstyled, children, className, ...propsRest }: NavProps) => {
|
|
60
|
+
return (
|
|
61
|
+
<nav
|
|
62
|
+
{...propsRest}
|
|
63
|
+
className={cx(
|
|
64
|
+
'bk',
|
|
65
|
+
{ [cl['bk-nav']]: !unstyled },
|
|
66
|
+
)}
|
|
67
|
+
>
|
|
68
|
+
<menu>
|
|
69
|
+
{children}
|
|
70
|
+
</menu>
|
|
71
|
+
</nav>
|
|
72
|
+
);
|
|
73
|
+
},
|
|
74
|
+
{ NavItem },
|
|
75
|
+
);
|
|
@@ -0,0 +1,46 @@
|
|
|
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-app-layout-sidebar {
|
|
9
|
+
@include bk.component-base(bk-app-layout-sidebar);
|
|
10
|
+
container-type: inline-size;
|
|
11
|
+
|
|
12
|
+
align-self: start; /* https://ishadeed.com/article/position-sticky-css-grid */
|
|
13
|
+
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
|
|
17
|
+
&.bk-app-layout-sidebar--collapsible {
|
|
18
|
+
//width: calc(var(--bk-sizing-6) * 1.7);
|
|
19
|
+
|
|
20
|
+
transition: all 300ms ease-in-out;
|
|
21
|
+
transition-property: width, grid-template-columns;
|
|
22
|
+
|
|
23
|
+
&.-collapsed {
|
|
24
|
+
width: var(--bk-sizing-5);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.bk-app-layout-sidebar__action-collapse {
|
|
28
|
+
margin: var(--bk-sizing-2);
|
|
29
|
+
padding: var(--bk-sizing-1) var(--bk-sizing-2);
|
|
30
|
+
background: var(--bk-panel-color-background);
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Customize some components */
|
|
35
|
+
.bk-logo-with-text {
|
|
36
|
+
margin: var(--bk-sizing-3);
|
|
37
|
+
height: calc(var(--bk-sizing-4) + 18px);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* FIXME */
|
|
44
|
+
.bk-theme--dark.bk-layout__sidebar {
|
|
45
|
+
/* background: bk.$color-brand-300; */
|
|
46
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 type { Meta, StoryObj } from '@storybook/react';
|
|
6
|
+
import { userEvent, within } from '@storybook/test';
|
|
7
|
+
|
|
8
|
+
import { Sidebar } from './Sidebar.tsx';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type SidebarArgs = React.ComponentProps<typeof Sidebar>;
|
|
12
|
+
type Story = StoryObj<SidebarArgs>;
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
component: Sidebar,
|
|
16
|
+
parameters: {
|
|
17
|
+
layout: 'fullscreen',
|
|
18
|
+
},
|
|
19
|
+
tags: ['autodocs'],
|
|
20
|
+
argTypes: {
|
|
21
|
+
},
|
|
22
|
+
} satisfies Meta<SidebarArgs>;
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
export const Standard: Story = {
|
|
26
|
+
render: () => <Sidebar>Content</Sidebar>,
|
|
27
|
+
play: async ({ canvasElement }) => {
|
|
28
|
+
const canvas = within(canvasElement);
|
|
29
|
+
},
|
|
30
|
+
};
|
|
@@ -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
|
+
import { classNames as cx, type ComponentProps } from '../../../util/componentUtil.ts';
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
|
|
8
|
+
import cl from './Sidebar.module.scss';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
export type SidebarProps = React.PropsWithChildren<ComponentProps<'aside'> & {
|
|
12
|
+
/** Whether this component should be unstyled. */
|
|
13
|
+
unstyled?: undefined | boolean,
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Sidebar component (for app layout).
|
|
18
|
+
*/
|
|
19
|
+
export const Sidebar = ({ children, unstyled, ...propsRest }: SidebarProps) => {
|
|
20
|
+
return (
|
|
21
|
+
<aside
|
|
22
|
+
{...propsRest}
|
|
23
|
+
className={cx(
|
|
24
|
+
'bk',
|
|
25
|
+
{ [cl['bk-app-layout-sidebar']]: !unstyled },
|
|
26
|
+
//{ [cl['bk-app-layout-sidebar--collapsible']]: true },
|
|
27
|
+
propsRest.className,
|
|
28
|
+
)}
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
</aside>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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-form-layout {
|
|
9
|
+
@include bk.component-base(bk-form-layout);
|
|
10
|
+
|
|
11
|
+
min-width: 300px;
|
|
12
|
+
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: bk.$sizing-m;
|
|
16
|
+
|
|
17
|
+
padding-block: 1px;
|
|
18
|
+
}
|
|
19
|
+
}
|