@peculiar/certificates-viewer 3.10.1 → 4.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -64
- package/components/actions.js +21 -0
- package/components/actions.js.map +1 -0
- package/components/arrow_top.js +34 -0
- package/components/arrow_top.js.map +1 -0
- package/components/attribute-certificate-viewer.js +281 -0
- package/components/attribute-certificate-viewer.js.map +1 -0
- package/components/button-menu.js +52 -0
- package/components/button-menu.js.map +1 -0
- package/components/button.js +74 -0
- package/components/button.js.map +1 -0
- package/components/certificate-viewer.js +300 -0
- package/components/certificate-viewer.js.map +1 -0
- package/components/circular-progress.js +48 -0
- package/components/circular-progress.js.map +1 -0
- package/components/crl-viewer.js +263 -0
- package/components/crl-viewer.js.map +1 -0
- package/components/cross.js +47 -0
- package/components/cross.js.map +1 -0
- package/components/csr-viewer.js +233 -0
- package/components/csr-viewer.js.map +1 -0
- package/components/custom-elements.d.ts +2 -0
- package/components/download.js +500 -0
- package/components/download.js.map +1 -0
- package/components/highlight-words.js +60 -0
- package/components/highlight-words.js.map +1 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +11 -0
- package/components/index.js.map +1 -0
- package/components/index2.js +299 -0
- package/components/index2.js.map +1 -0
- package/components/issuer_name.js +26 -0
- package/components/issuer_name.js.map +1 -0
- package/components/miscellaneous.js +13393 -0
- package/components/miscellaneous.js.map +1 -0
- package/components/package.json +9 -0
- package/components/peculiar-attribute-certificate-viewer.d.ts +11 -0
- package/components/peculiar-attribute-certificate-viewer.js +11 -0
- package/components/peculiar-attribute-certificate-viewer.js.map +1 -0
- package/components/peculiar-button-menu.d.ts +11 -0
- package/components/peculiar-button-menu.js +11 -0
- package/components/peculiar-button-menu.js.map +1 -0
- package/components/peculiar-certificate-decoder.d.ts +11 -0
- package/components/peculiar-certificate-decoder.js +234 -0
- package/components/peculiar-certificate-decoder.js.map +1 -0
- package/components/peculiar-certificate-viewer.d.ts +11 -0
- package/components/peculiar-certificate-viewer.js +11 -0
- package/components/peculiar-certificate-viewer.js.map +1 -0
- package/components/peculiar-certificates-viewer.d.ts +11 -0
- package/components/peculiar-certificates-viewer.js +344 -0
- package/components/peculiar-certificates-viewer.js.map +1 -0
- package/components/peculiar-circular-progress.d.ts +11 -0
- package/components/peculiar-circular-progress.js +11 -0
- package/components/peculiar-circular-progress.js.map +1 -0
- package/components/peculiar-crl-viewer.d.ts +11 -0
- package/components/peculiar-crl-viewer.js +11 -0
- package/components/peculiar-crl-viewer.js.map +1 -0
- package/components/peculiar-csr-viewer.d.ts +11 -0
- package/components/peculiar-csr-viewer.js +11 -0
- package/components/peculiar-csr-viewer.js.map +1 -0
- package/components/peculiar-highlight-words.d.ts +11 -0
- package/components/peculiar-highlight-words.js +11 -0
- package/components/peculiar-highlight-words.js.map +1 -0
- package/components/peculiar-text-hider.d.ts +11 -0
- package/components/peculiar-text-hider.js +42 -0
- package/components/peculiar-text-hider.js.map +1 -0
- package/components/subject_name.js +71 -0
- package/components/subject_name.js.map +1 -0
- package/dist/cjs/actions-19013d4a.js +23 -0
- package/dist/cjs/actions-19013d4a.js.map +1 -0
- package/dist/cjs/arrow_top-834fb7ec.js +37 -0
- package/dist/cjs/arrow_top-834fb7ec.js.map +1 -0
- package/dist/cjs/button-14e2b73f.js +77 -0
- package/dist/cjs/button-14e2b73f.js.map +1 -0
- package/dist/cjs/{certification_request-d5c6e32d.js → certification_request-c0cafa72.js} +236 -71
- package/dist/cjs/certification_request-c0cafa72.js.map +1 -0
- package/dist/cjs/{crl-5bce64c4.js → crl-b4322166.js} +8 -7
- package/dist/cjs/crl-b4322166.js.map +1 -0
- package/dist/cjs/cross-9872c473.js +51 -0
- package/dist/cjs/cross-9872c473.js.map +1 -0
- package/dist/cjs/download-254ddc57.js +23 -0
- package/dist/cjs/download-254ddc57.js.map +1 -0
- package/dist/cjs/{download-93f7b773.js → download-972dda8a.js} +2 -0
- package/dist/cjs/download-972dda8a.js.map +1 -0
- package/dist/cjs/index-efd561e9.js +2477 -0
- package/dist/cjs/index-efd561e9.js.map +1 -0
- package/dist/cjs/index.cjs.js +20 -1
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/link-6aea0be4.js +25 -0
- package/dist/cjs/link-6aea0be4.js.map +1 -0
- package/dist/cjs/loader.cjs.js +6 -12
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/{miscellaneous-cac1cd8b.js → miscellaneous-e43aaae5.js} +73 -70
- package/dist/cjs/miscellaneous-e43aaae5.js.map +1 -0
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +93 -35
- package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js +98 -0
- package/dist/cjs/peculiar-button-menu_3.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +30 -19
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +35 -11
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +145 -85
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar-text-hider.cjs.entry.js +7 -13
- package/dist/cjs/peculiar-text-hider.cjs.entry.js.map +1 -0
- package/dist/cjs/peculiar.cjs.js +10 -57
- package/dist/cjs/peculiar.cjs.js.map +1 -0
- package/dist/cjs/{x509_certificate-3760e0a8.js → x509_certificate-989b1435.js} +5 -4
- package/dist/cjs/x509_certificate-989b1435.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -16
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +189 -145
- package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js.map +1 -0
- package/dist/collection/components/button/button.js +14 -126
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/button/index.js +5 -0
- package/dist/collection/components/button/index.js.map +1 -0
- package/dist/collection/components/button-menu/button-menu.css +46 -0
- package/dist/collection/components/button-menu/button-menu.js +78 -0
- package/dist/collection/components/button-menu/button-menu.js.map +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.css +456 -44
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +109 -101
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js +6 -11
- package/dist/collection/components/certificate-details-parts/attributes/activity_description_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/as_string_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js +5 -6
- package/dist/collection/components/certificate-details-parts/attributes/basic_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/challenge_password_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/index.js +16 -15
- package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/insurance_value_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js +4 -3
- package/dist/collection/components/certificate-details-parts/attributes/name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js +5 -4
- package/dist/collection/components/certificate-details-parts/attributes/type_relationship_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/unstructured_name_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js +5 -5
- package/dist/collection/components/certificate-details-parts/attributes/valuation_ranking_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js +6 -13
- package/dist/collection/components/certificate-details-parts/attributes/web_gdpr_attribute.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/basic_information.js +4 -3
- package/dist/collection/components/certificate-details-parts/basic_information.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/archive_rev_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/as_string_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js +2 -1
- package/dist/collection/components/certificate-details-parts/extensions/attribute_value.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/authority_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/basic_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/basic_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +8 -12
- package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/ca_version_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +26 -27
- package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js +5 -7
- package/dist/collection/components/certificate-details-parts/extensions/certificate_template_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +8 -13
- package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/crl_distribution_points_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js +6 -6
- package/dist/collection/components/certificate-details-parts/extensions/crl_number_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/crl_reason_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/enroll_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js +5 -6
- package/dist/collection/components/certificate-details-parts/extensions/entrust_version_info_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +7 -7
- package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js +7 -6
- package/dist/collection/components/certificate-details-parts/extensions/general_name_part.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/index.js +46 -45
- package/dist/collection/components/certificate-details-parts/extensions/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js +7 -11
- package/dist/collection/components/certificate-details-parts/extensions/issuing_distribution_point_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/key_usage_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/lei_role_extennsion.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js +8 -11
- package/dist/collection/components/certificate-details-parts/extensions/logotype_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/name_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_cert_type_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js +5 -5
- package/dist/collection/components/certificate-details-parts/extensions/netscape_comment_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/policy_constraints_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js +5 -4
- package/dist/collection/components/certificate-details-parts/extensions/policy_mappings_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js +6 -7
- package/dist/collection/components/certificate-details-parts/extensions/private_key_usage_period_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +13 -16
- package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/subject_alternative_name_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +8 -9
- package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js +10 -15
- package/dist/collection/components/certificate-details-parts/extensions/subject_key_identifier_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js +7 -9
- package/dist/collection/components/certificate-details-parts/extensions/timestamp_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js +4 -3
- package/dist/collection/components/certificate-details-parts/extensions/tn_auth_list_extension.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/holder.js +8 -11
- package/dist/collection/components/certificate-details-parts/holder.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/index.js +1 -0
- package/dist/collection/components/certificate-details-parts/index.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer.js +5 -4
- package/dist/collection/components/certificate-details-parts/issuer.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/issuer_name.js +6 -4
- package/dist/collection/components/certificate-details-parts/issuer_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/miscellaneous.js +8 -13
- package/dist/collection/components/certificate-details-parts/miscellaneous.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/public_key.js +8 -7
- package/dist/collection/components/certificate-details-parts/public_key.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js +9 -11
- package/dist/collection/components/certificate-details-parts/revoked_certificates.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/row.js +13 -18
- package/dist/collection/components/certificate-details-parts/row.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/signature.js +5 -4
- package/dist/collection/components/certificate-details-parts/signature.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/subject_name.js +4 -3
- package/dist/collection/components/certificate-details-parts/subject_name.js.map +1 -0
- package/dist/collection/components/certificate-details-parts/thumbprints.js +4 -3
- package/dist/collection/components/certificate-details-parts/thumbprints.js.map +1 -0
- package/dist/collection/components/certificate-summary/certificate-summary.js +9 -77
- package/dist/collection/components/certificate-summary/certificate-summary.js.map +1 -0
- package/dist/collection/components/certificate-summary/index.js +5 -0
- package/dist/collection/components/certificate-summary/index.js.map +1 -0
- package/dist/collection/components/certificate-viewer/certificate-viewer.css +471 -104
- package/dist/collection/components/certificate-viewer/certificate-viewer.js +206 -178
- package/dist/collection/components/certificate-viewer/certificate-viewer.js.map +1 -0
- package/dist/collection/components/certificates-viewer/certificates-viewer.css +540 -267
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +261 -266
- package/dist/collection/components/certificates-viewer/certificates-viewer.js.map +1 -0
- package/dist/collection/components/circular-progress/circular-progress.css +2 -11
- package/dist/collection/components/circular-progress/circular-progress.js +60 -63
- package/dist/collection/components/circular-progress/circular-progress.js.map +1 -0
- package/dist/collection/components/crl-viewer/crl-viewer.js +166 -139
- package/dist/collection/components/crl-viewer/crl-viewer.js.map +1 -0
- package/dist/collection/components/csr-viewer/csr-viewer.js +149 -124
- package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -0
- package/dist/collection/components/highlight-words/highlight-words.css +1 -9
- package/dist/collection/components/highlight-words/highlight-words.js +35 -28
- package/dist/collection/components/highlight-words/highlight-words.js.map +1 -0
- package/dist/collection/components/icons/actions.js +16 -0
- package/dist/collection/components/icons/actions.js.map +1 -0
- package/dist/collection/components/icons/arrow_bottom.js +16 -0
- package/dist/collection/components/icons/arrow_bottom.js.map +1 -0
- package/dist/collection/components/icons/arrow_top.js +16 -0
- package/dist/collection/components/icons/arrow_top.js.map +1 -0
- package/dist/collection/components/icons/cross.js +16 -0
- package/dist/collection/components/icons/cross.js.map +1 -0
- package/dist/collection/components/icons/details.js +16 -0
- package/dist/collection/components/icons/details.js.map +1 -0
- package/dist/collection/components/icons/download.js +16 -0
- package/dist/collection/components/icons/download.js.map +1 -0
- package/dist/collection/components/icons/index.js +11 -0
- package/dist/collection/components/icons/index.js.map +1 -0
- package/dist/collection/components/icons/link.js +16 -0
- package/dist/collection/components/icons/link.js.map +1 -0
- package/dist/collection/components/link/index.js +5 -0
- package/dist/collection/components/link/index.js.map +1 -0
- package/dist/collection/components/link/link.js +9 -61
- package/dist/collection/components/link/link.js.map +1 -0
- package/dist/collection/components/text-hider/text-hider.css +9 -36
- package/dist/collection/components/text-hider/text-hider.js +21 -68
- package/dist/collection/components/text-hider/text-hider.js.map +1 -0
- package/dist/collection/components/typography/index.js +5 -0
- package/dist/collection/components/typography/index.js.map +1 -0
- package/dist/collection/components/typography/typography.js +39 -126
- package/dist/collection/components/typography/typography.js.map +1 -0
- package/dist/collection/constants/logs.js +1 -0
- package/dist/collection/constants/logs.js.map +1 -0
- package/dist/collection/constants/oids.js +1 -0
- package/dist/collection/constants/oids.js.map +1 -0
- package/dist/collection/crypto/asn_data.js +13 -7
- package/dist/collection/crypto/asn_data.js.map +1 -0
- package/dist/collection/crypto/attribute.js +11 -10
- package/dist/collection/crypto/attribute.js.map +1 -0
- package/dist/collection/crypto/crl.js +9 -8
- package/dist/collection/crypto/crl.js.map +1 -0
- package/dist/collection/crypto/csr.js +11 -10
- package/dist/collection/crypto/csr.js.map +1 -0
- package/dist/collection/crypto/extension.js +16 -15
- package/dist/collection/crypto/extension.js.map +1 -0
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/index.js.map +1 -0
- package/dist/collection/crypto/name.js +15 -9
- package/dist/collection/crypto/name.js.map +1 -0
- package/dist/collection/crypto/provider.js +4 -3
- package/dist/collection/crypto/provider.js.map +1 -0
- package/dist/collection/crypto/utils.js +4 -3
- package/dist/collection/crypto/utils.js.map +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +9 -8
- package/dist/collection/crypto/x509_attribute_certificate.js.map +1 -0
- package/dist/collection/crypto/x509_certificate.js +12 -11
- package/dist/collection/crypto/x509_certificate.js.map +1 -0
- package/dist/collection/index.js +5 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/locales/en.json +4 -3
- package/dist/collection/utils/date_formatter.js +3 -2
- package/dist/collection/utils/date_formatter.js.map +1 -0
- package/dist/collection/utils/download.js +3 -2
- package/dist/collection/utils/download.js.map +1 -0
- package/dist/collection/utils/download_from_buffer.js +1 -0
- package/dist/collection/utils/download_from_buffer.js.map +1 -0
- package/dist/collection/utils/get_string_by_oid.js +2 -1
- package/dist/collection/utils/get_string_by_oid.js.map +1 -0
- package/dist/collection/utils/index.js +2 -1
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/is_link.js +1 -0
- package/dist/collection/utils/is_link.js.map +1 -0
- package/dist/collection/utils/l10n.js +2 -1
- package/dist/collection/utils/l10n.js.map +1 -0
- package/dist/collection/utils/read_file.js +1 -0
- package/dist/collection/utils/read_file.js.map +1 -0
- package/dist/collection/utils/third_party_links.js +1 -0
- package/dist/collection/utils/third_party_links.js.map +1 -0
- package/dist/collection/utils/validator.js +1 -0
- package/dist/collection/utils/validator.js.map +1 -0
- package/dist/collection/www-copy/index.js +138 -32
- package/dist/esm/actions-8d745b2a.js +21 -0
- package/dist/esm/actions-8d745b2a.js.map +1 -0
- package/dist/esm/arrow_top-fc298828.js +34 -0
- package/dist/esm/arrow_top-fc298828.js.map +1 -0
- package/dist/esm/button-35146bdd.js +74 -0
- package/dist/esm/button-35146bdd.js.map +1 -0
- package/dist/esm/{certification_request-23cd5124.js → certification_request-5cadde9f.js} +171 -9
- package/dist/esm/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm/{crl-7f23c111.js → crl-11670c3e.js} +7 -6
- package/dist/esm/crl-11670c3e.js.map +1 -0
- package/dist/esm/cross-9ec9a759.js +47 -0
- package/dist/esm/cross-9ec9a759.js.map +1 -0
- package/dist/esm/download-0cc3077a.js +21 -0
- package/dist/esm/download-0cc3077a.js.map +1 -0
- package/dist/esm/{download-91511aeb.js → download-57c5bf8f.js} +2 -0
- package/dist/esm/download-57c5bf8f.js.map +1 -0
- package/dist/esm/index-4079bbb5.js +2448 -0
- package/dist/esm/index-4079bbb5.js.map +1 -0
- package/dist/esm/index.js +10 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/link-ad24c3be.js +23 -0
- package/dist/esm/link-ad24c3be.js.map +1 -0
- package/dist/esm/loader.js +6 -12
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/{miscellaneous-c7c0d04a.js → miscellaneous-7793a310.js} +40 -37
- package/dist/esm/miscellaneous-7793a310.js.map +1 -0
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +81 -23
- package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm/peculiar-button-menu_3.entry.js +92 -0
- package/dist/esm/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-decoder.entry.js +30 -19
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm/peculiar-certificate-viewer.entry.js +35 -11
- package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-certificates-viewer.entry.js +145 -85
- package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm/peculiar-text-hider.entry.js +7 -13
- package/dist/esm/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm/peculiar.js +8 -58
- package/dist/esm/peculiar.js.map +1 -0
- package/dist/esm/{x509_certificate-d8e0af2d.js → x509_certificate-dfae6999.js} +4 -3
- package/dist/esm/x509_certificate-dfae6999.js.map +1 -0
- package/dist/esm-es5/actions-8d745b2a.js +12 -0
- package/dist/esm-es5/actions-8d745b2a.js.map +1 -0
- package/dist/esm-es5/arrow_top-fc298828.js +19 -0
- package/dist/esm-es5/arrow_top-fc298828.js.map +1 -0
- package/dist/esm-es5/button-35146bdd.js +19 -0
- package/dist/esm-es5/button-35146bdd.js.map +1 -0
- package/dist/esm-es5/certification_request-5cadde9f.js +97 -0
- package/dist/esm-es5/certification_request-5cadde9f.js.map +1 -0
- package/dist/esm-es5/crl-11670c3e.js +33 -0
- package/dist/esm-es5/crl-11670c3e.js.map +1 -0
- package/dist/esm-es5/cross-9ec9a759.js +26 -0
- package/dist/esm-es5/cross-9ec9a759.js.map +1 -0
- package/dist/esm-es5/download-0cc3077a.js +12 -0
- package/dist/esm-es5/download-0cc3077a.js.map +1 -0
- package/dist/esm-es5/download-57c5bf8f.js +19 -0
- package/dist/esm-es5/download-57c5bf8f.js.map +1 -0
- package/dist/esm-es5/index-4079bbb5.js +6 -0
- package/dist/esm-es5/index-4079bbb5.js.map +1 -0
- package/dist/esm-es5/index.js +5 -0
- package/dist/esm-es5/index.js.map +1 -0
- package/dist/esm-es5/link-ad24c3be.js +12 -0
- package/dist/esm-es5/link-ad24c3be.js.map +1 -0
- package/dist/esm-es5/loader.js +5 -0
- package/dist/esm-es5/loader.js.map +1 -0
- package/dist/esm-es5/miscellaneous-7793a310.js +348 -0
- package/dist/esm-es5/miscellaneous-7793a310.js.map +1 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js +110 -0
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js +5 -0
- package/dist/esm-es5/peculiar-button-menu_3.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +12 -0
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +5 -0
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +12 -0
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js +5 -0
- package/dist/esm-es5/peculiar-text-hider.entry.js.map +1 -0
- package/dist/esm-es5/peculiar.js +5 -0
- package/dist/esm-es5/peculiar.js.map +1 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js +12 -0
- package/dist/esm-es5/x509_certificate-dfae6999.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/peculiar/index.esm.js +2 -1
- package/dist/peculiar/index.esm.js.map +1 -0
- package/dist/peculiar/locales/en.json +4 -3
- package/dist/peculiar/p-0b356bb5.js +6 -0
- package/dist/peculiar/p-0b356bb5.js.map +1 -0
- package/dist/peculiar/p-0b475f2a.system.entry.js +111 -0
- package/dist/peculiar/p-0b475f2a.system.entry.js.map +1 -0
- package/dist/peculiar/p-0fc2e2b4.js +19 -0
- package/dist/peculiar/p-0fc2e2b4.js.map +1 -0
- package/dist/peculiar/p-17e3c47b.js +12 -0
- package/dist/peculiar/p-17e3c47b.js.map +1 -0
- package/dist/peculiar/p-1844b807.system.entry.js +5 -0
- package/dist/peculiar/p-1844b807.system.entry.js.map +1 -0
- package/dist/peculiar/p-1ceb0fe3.js +12 -0
- package/dist/peculiar/p-1ceb0fe3.js.map +1 -0
- package/dist/peculiar/p-1de0381c.system.js +5 -0
- package/dist/peculiar/p-1de0381c.system.js.map +1 -0
- package/dist/peculiar/p-2fcad8cb.system.js +20 -0
- package/dist/peculiar/p-2fcad8cb.system.js.map +1 -0
- package/dist/peculiar/p-31586b23.system.js +13 -0
- package/dist/peculiar/p-31586b23.system.js.map +1 -0
- package/dist/peculiar/p-33196289.entry.js +5 -0
- package/dist/peculiar/p-33196289.entry.js.map +1 -0
- package/dist/peculiar/p-370cee20.js +26 -0
- package/dist/peculiar/p-370cee20.js.map +1 -0
- package/dist/peculiar/p-43eb3721.js +33 -0
- package/dist/peculiar/p-43eb3721.js.map +1 -0
- package/dist/peculiar/p-441109db.system.entry.js +13 -0
- package/dist/peculiar/p-441109db.system.entry.js.map +1 -0
- package/dist/peculiar/p-5151cb6f.system.entry.js +5 -0
- package/dist/peculiar/p-5151cb6f.system.entry.js.map +1 -0
- package/dist/peculiar/p-53784f15.system.entry.js +5 -0
- package/dist/peculiar/p-53784f15.system.entry.js.map +1 -0
- package/dist/peculiar/p-5aabeba7.system.js +6 -0
- package/dist/peculiar/p-5aabeba7.system.js.map +1 -0
- package/dist/peculiar/p-5ab007e9.entry.js +5 -0
- package/dist/peculiar/p-5ab007e9.entry.js.map +1 -0
- package/dist/peculiar/p-6667fe6e.system.js +34 -0
- package/dist/peculiar/p-6667fe6e.system.js.map +1 -0
- package/dist/peculiar/p-673336cf.entry.js +110 -0
- package/dist/peculiar/p-673336cf.entry.js.map +1 -0
- package/dist/peculiar/p-6cb88fd6.system.js +13 -0
- package/dist/peculiar/p-6cb88fd6.system.js.map +1 -0
- package/dist/peculiar/p-6e79b9c8.js +12 -0
- package/dist/peculiar/p-6e79b9c8.js.map +1 -0
- package/dist/peculiar/p-74c241e7.js +97 -0
- package/dist/peculiar/p-74c241e7.js.map +1 -0
- package/dist/peculiar/p-7f9beaa8.js +19 -0
- package/dist/peculiar/p-7f9beaa8.js.map +1 -0
- package/dist/peculiar/p-7f9fef87.entry.js +5 -0
- package/dist/peculiar/p-7f9fef87.entry.js.map +1 -0
- package/dist/peculiar/p-80832207.system.js +5 -0
- package/dist/peculiar/p-80832207.system.js.map +1 -0
- package/dist/peculiar/p-882e1281.entry.js +12 -0
- package/dist/peculiar/p-882e1281.entry.js.map +1 -0
- package/dist/peculiar/p-94a453d7.js +12 -0
- package/dist/peculiar/p-94a453d7.js.map +1 -0
- package/dist/peculiar/p-a053c132.js +19 -0
- package/dist/peculiar/p-a053c132.js.map +1 -0
- package/dist/peculiar/p-a6e2e335.js +348 -0
- package/dist/peculiar/p-a6e2e335.js.map +1 -0
- package/dist/peculiar/p-ae9189f6.system.js +19 -0
- package/dist/peculiar/p-ae9189f6.system.js.map +1 -0
- package/dist/peculiar/p-b313be9e.system.js +13 -0
- package/dist/peculiar/p-b313be9e.system.js.map +1 -0
- package/dist/peculiar/p-bcc86979.entry.js +12 -0
- package/dist/peculiar/p-bcc86979.entry.js.map +1 -0
- package/dist/peculiar/p-c0a298fd.system.js +97 -0
- package/dist/peculiar/p-c0a298fd.system.js.map +1 -0
- package/dist/peculiar/p-c362dc5e.system.js +348 -0
- package/dist/peculiar/p-c362dc5e.system.js.map +1 -0
- package/dist/peculiar/p-c99507d4.system.js +20 -0
- package/dist/peculiar/p-c99507d4.system.js.map +1 -0
- package/dist/peculiar/p-ddae2f8e.system.js +27 -0
- package/dist/peculiar/p-ddae2f8e.system.js.map +1 -0
- package/dist/peculiar/p-e39de121.system.entry.js +13 -0
- package/dist/peculiar/p-e39de121.system.entry.js.map +1 -0
- package/dist/peculiar/p-e6a3b4d4.system.js +13 -0
- package/dist/peculiar/p-e6a3b4d4.system.js.map +1 -0
- package/dist/peculiar/peculiar.css +1 -1
- package/dist/peculiar/peculiar.esm.js +2 -1
- package/dist/peculiar/peculiar.esm.js.map +1 -0
- package/dist/peculiar/peculiar.js +127 -0
- package/dist/types/components/attribute-certificate-viewer/attribute-certificate-viewer.d.ts +15 -3
- package/dist/types/components/button/button.d.ts +5 -16
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/button-menu/button-menu.d.ts +21 -0
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +9 -6
- package/dist/types/components/certificate-details-parts/miscellaneous.d.ts +1 -1
- package/dist/types/components/certificate-summary/certificate-summary.d.ts +4 -3
- package/dist/types/components/certificate-summary/index.d.ts +1 -0
- package/dist/types/components/certificate-viewer/certificate-viewer.d.ts +13 -5
- package/dist/types/components/certificates-viewer/certificates-viewer.d.ts +22 -11
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +13 -5
- package/dist/types/components/csr-viewer/csr-viewer.d.ts +13 -5
- package/dist/types/components/icons/actions.d.ts +12 -0
- package/dist/types/components/icons/arrow_bottom.d.ts +12 -0
- package/dist/types/components/icons/arrow_top.d.ts +12 -0
- package/dist/types/components/icons/cross.d.ts +12 -0
- package/dist/types/components/icons/details.d.ts +12 -0
- package/dist/types/components/icons/download.d.ts +12 -0
- package/dist/types/components/icons/index.d.ts +7 -0
- package/dist/types/components/icons/link.d.ts +12 -0
- package/dist/types/components/link/index.d.ts +1 -0
- package/dist/types/components/link/link.d.ts +6 -6
- package/dist/types/components/text-hider/text-hider.d.ts +0 -3
- package/dist/types/components/typography/index.d.ts +1 -0
- package/dist/types/components/typography/typography.d.ts +10 -20
- package/dist/types/components.d.ts +74 -175
- package/dist/types/crypto/attribute.d.ts +1 -1
- package/dist/types/crypto/extension.d.ts +1 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interface.d.ts +98 -6
- package/dist/types/stencil-public-runtime.d.ts +110 -23
- package/dist/types/utils/l10n.d.ts +5 -4
- package/dist/types/utils/read_file.d.ts +1 -1
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +22549 -0
- package/hydrate/package.json +6 -0
- package/loader/index.d.ts +10 -1
- package/loader/index.js +1 -1
- package/loader/package.json +1 -0
- package/package.json +6 -4
- package/dist/cjs/dom-f57e260e.js +0 -78
- package/dist/cjs/index-064e95c7.js +0 -1486
- package/dist/cjs/l10n-ddc7cff9.js +0 -169
- package/dist/cjs/peculiar-button-split_4.cjs.entry.js +0 -128
- package/dist/cjs/peculiar-button.cjs.entry.js +0 -40
- package/dist/cjs/peculiar-link.cjs.entry.js +0 -29
- package/dist/cjs/peculiar-typography.cjs.entry.js +0 -38
- package/dist/collection/components/button/button.css +0 -81
- package/dist/collection/components/button-split/button-split.css +0 -57
- package/dist/collection/components/button-split/button-split.js +0 -116
- package/dist/collection/components/certificate-summary/certificate-summary.css +0 -49
- package/dist/collection/components/link/link.css +0 -59
- package/dist/collection/components/typography/typography.css +0 -95
- package/dist/esm/dom-f1b08a97.js +0 -76
- package/dist/esm/index-bbd484d9.js +0 -1455
- package/dist/esm/l10n-d48f35ff.js +0 -165
- package/dist/esm/peculiar-button-split_4.entry.js +0 -121
- package/dist/esm/peculiar-button.entry.js +0 -36
- package/dist/esm/peculiar-link.entry.js +0 -25
- package/dist/esm/peculiar-typography.entry.js +0 -34
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/peculiar/p-01cea5c0.entry.js +0 -11
- package/dist/peculiar/p-3bfefa4a.entry.js +0 -18
- package/dist/peculiar/p-4e8169cb.entry.js +0 -4
- package/dist/peculiar/p-57b89412.entry.js +0 -4
- package/dist/peculiar/p-5b4eed12.entry.js +0 -4
- package/dist/peculiar/p-610b85e3.entry.js +0 -4
- package/dist/peculiar/p-6d37c8b5.entry.js +0 -4
- package/dist/peculiar/p-711b4e1e.js +0 -18
- package/dist/peculiar/p-81a88a33.js +0 -11
- package/dist/peculiar/p-918aeee4.entry.js +0 -4
- package/dist/peculiar/p-9f4ee110.js +0 -22
- package/dist/peculiar/p-a050e184.js +0 -69
- package/dist/peculiar/p-c24c26c2.js +0 -32
- package/dist/peculiar/p-df53fbcc.entry.js +0 -4
- package/dist/peculiar/p-ec250cc4.js +0 -12
- package/dist/peculiar/p-f7683ba5.js +0 -5
- package/dist/peculiar/p-fe05f51e.js +0 -79
- package/dist/types/components/button-split/button-split.d.ts +0 -21
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
import { h } from '@stencil/core/internal/client';
|
|
5
|
+
import { b as build } from './download.js';
|
|
6
|
+
import { R as RowTitle, l as l10n, f as RowValue, i as getStringByOID, af as TableRowTable } from './miscellaneous.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
function getPublicKeyModulus(publicKey) {
|
|
16
|
+
if (publicKey.params && 'modulus' in publicKey.params) {
|
|
17
|
+
let length = publicKey.params.modulus.byteLength;
|
|
18
|
+
if (length % 2) {
|
|
19
|
+
length -= 1;
|
|
20
|
+
}
|
|
21
|
+
return length * 8;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
function getPublicKeyExponent(publicKey) {
|
|
26
|
+
if (publicKey.params && 'publicExponent' in publicKey.params) {
|
|
27
|
+
return publicKey.params.publicExponent.byteLength === 3
|
|
28
|
+
? 65537
|
|
29
|
+
: 3;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const PublicKey = (props) => {
|
|
34
|
+
const { publicKey } = props;
|
|
35
|
+
if (!publicKey) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
function renderKeyDetails(key) {
|
|
39
|
+
return [
|
|
40
|
+
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
|
|
41
|
+
h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((key.params && 'namedCurve' in key.params) ? key.params.namedCurve : undefined) }),
|
|
42
|
+
h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(key) }),
|
|
43
|
+
h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(key) }),
|
|
44
|
+
h(RowValue, { name: l10n.getString('value'), value: build.Convert.ToHex(key.value), monospace: true, collapse: true }),
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
return [
|
|
48
|
+
h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
|
|
49
|
+
renderKeyDetails(publicKey),
|
|
50
|
+
(Array.isArray(publicKey.params) && publicKey.params.length && publicKey.params.map((param) => (h(TableRowTable, null, renderKeyDetails(param))))),
|
|
51
|
+
];
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @license
|
|
56
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
57
|
+
*
|
|
58
|
+
* This source code is licensed under the MIT license found in the
|
|
59
|
+
* LICENSE file in the root directory of this source tree.
|
|
60
|
+
*/
|
|
61
|
+
const SubjectName = (props) => {
|
|
62
|
+
const { name } = props;
|
|
63
|
+
return [
|
|
64
|
+
h(RowTitle, { value: l10n.getString('subjectName') }),
|
|
65
|
+
name.map((n) => (h(RowValue, { name: n.name || n.type, value: n.value }))),
|
|
66
|
+
];
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export { PublicKey as P, SubjectName as S };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=subject_name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"subject_name.js","mappings":";;;;;;;AAAA;;;;;;;AAgBA,SAAS,mBAAmB,CAAC,SAAqB;EAChD,IAAI,SAAS,CAAC,MAAM,IAAI,SAAS,IAAI,SAAS,CAAC,MAAM,EAAE;IACrD,IAAI,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IAEjD,IAAI,MAAM,GAAG,CAAC,EAAE;MACd,MAAM,IAAI,CAAC,CAAC;KACb;IAED,OAAO,MAAM,GAAG,CAAC,CAAC;GACnB;EAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,oBAAoB,CAAC,SAAqB;EACjD,IAAI,SAAS,CAAC,MAAM,IAAI,gBAAgB,IAAI,SAAS,CAAC,MAAM,EAAE;IAC5D,OAAO,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU,KAAK,CAAC;QACnD,KAAK;QACL,CAAC,CAAC;GACP;EAED,OAAO,IAAI,CAAC;AACd,CAAC;MAMY,SAAS,GAAyC,CAAC,KAAK;EACnE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;EAE5B,IAAI,CAAC,SAAS,EAAE;IACd,OAAO,IAAI,CAAC;GACb;EAED,SAAS,gBAAgB,CAAC,GAAe;IACvC,OAAO;MACL,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GACpC;MACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAClC,KAAK,EAAE,cAAc,CAAC,CAAC,GAAG,CAAC,MAAM,IAAI,YAAY,IAAI,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC,GACrG;MACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAChC,KAAK,EAAE,oBAAoB,CAAC,GAAG,CAAC,GAChC;MACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAC/B;MACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAEA,aAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAC/B,SAAS,QACT,QAAQ,SACR;KACH,CAAC;GACH;EAED,OAAO;IACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GACtC;IACF,gBAAgB,CAAC,SAAS,CAAC;KAC1B,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,SAAS,CAAC,MAAM,CAAC,MAAM,IAAI,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,MACxF,EAAC,aAAa,QACX,gBAAgB,CAAC,KAAK,CAAC,CACV,CACjB,CAAC;GACH,CAAC;AACJ;;ACzFA;;;;;;;MAmBa,WAAW,GAA2C,CAAC,KAAK;EACvE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;EAEvB,OAAO;IACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GACpC;IACF,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MACT,EAAC,QAAQ,IACP,IAAI,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,EACtB,KAAK,EAAE,CAAC,CAAC,KAAK,GACd,CACH,CAAC;GACH,CAAC;AACJ;;;;","names":["Convert"],"sources":["src/components/certificate-details-parts/public_key.tsx","src/components/certificate-details-parts/subject_name.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { Convert } from 'pvtsutils';\n\nimport { IPublicKey } from '../../crypto';\nimport { l10n, getStringByOID } from '../../utils';\n\nimport { RowTitle, RowValue, TableRowTable } from './row';\n\nfunction getPublicKeyModulus(publicKey: IPublicKey) {\n if (publicKey.params && 'modulus' in publicKey.params) {\n let length = publicKey.params.modulus.byteLength;\n\n if (length % 2) {\n length -= 1;\n }\n\n return length * 8;\n }\n\n return null;\n}\n\nfunction getPublicKeyExponent(publicKey: IPublicKey) {\n if (publicKey.params && 'publicExponent' in publicKey.params) {\n return publicKey.params.publicExponent.byteLength === 3\n ? 65537\n : 3;\n }\n\n return null;\n}\n\ninterface IPublicKeyProps {\n publicKey: IPublicKey;\n}\n\nexport const PublicKey: FunctionalComponent<IPublicKeyProps> = (props) => {\n const { publicKey } = props;\n\n if (!publicKey) {\n return null;\n }\n\n function renderKeyDetails(key: IPublicKey) {\n return [\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name={l10n.getString('namedCurve')}\n value={getStringByOID((key.params && 'namedCurve' in key.params) ? key.params.namedCurve : undefined)}\n />,\n <RowValue\n name={l10n.getString('exponent')}\n value={getPublicKeyExponent(key)}\n />,\n <RowValue\n name={l10n.getString('modulus')}\n value={getPublicKeyModulus(key)}\n />,\n <RowValue\n name={l10n.getString('value')}\n value={Convert.ToHex(key.value)}\n monospace\n collapse\n />,\n ];\n }\n\n return [\n <RowTitle\n value={l10n.getString('publicKeyInfo')}\n />,\n renderKeyDetails(publicKey),\n (Array.isArray(publicKey.params) && publicKey.params.length && publicKey.params.map((param) => (\n <TableRowTable>\n {renderKeyDetails(param)}\n </TableRowTable>\n ))),\n ];\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\n\nimport type { INameJSON } from '../../crypto/name';\nimport { l10n } from '../../utils';\n\nimport { RowTitle, RowValue } from './row';\n\ninterface ISubjectNameProps {\n name: INameJSON[];\n}\n\nexport const SubjectName: FunctionalComponent<ISubjectNameProps> = (props) => {\n const { name } = props;\n\n return [\n <RowTitle\n value={l10n.getString('subjectName')}\n />,\n name.map((n) => (\n <RowValue\n name={n.name || n.type}\n value={n.value}\n />\n )),\n ];\n};\n"],"version":3}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const index = require('./index-efd561e9.js');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const ActionsIcon = (props) => {
|
|
16
|
+
const { color = 'gray-10' } = props;
|
|
17
|
+
return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "31", fill: "none" },
|
|
18
|
+
index.h("path", { fill: `var(--pv-color-${color})`, d: "M15 13.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm14 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z" })));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.ActionsIcon = ActionsIcon;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=actions-19013d4a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"actions-19013d4a.js","mappings":";;;;;;;AAAA;;;;;;;MAWa,WAAW,GAA+C,CAAC,KAAK;EAC3E,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;EAEpC,QACEA,iBACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM;IAEXA,kBACE,IAAI,EAAE,kBAAkB,KAAK,GAAG,EAChC,CAAC,EAAC,2GAA2G,GAC7G,CACE,EACN;AACJ;;;;","names":["h"],"sources":["src/components/icons/actions.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ActionsIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"31\"\n fill=\"none\"\n >\n <path\n fill={`var(--pv-color-${color})`}\n d=\"M15 13.5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-7 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm14 0a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z\"\n />\n </svg>\n );\n};\n"],"version":3}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const index = require('./index-efd561e9.js');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const ArrowBottomIcon = (props) => {
|
|
16
|
+
const { color = 'gray-10' } = props;
|
|
17
|
+
return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", fill: "none" },
|
|
18
|
+
index.h("path", { stroke: `var(--pv-color-${color})`, "stroke-linecap": "round", "stroke-width": "1.5", d: "m19.222 12.778-3.851 4.279a.2.2 0 0 1-.297 0l-3.852-4.28" })));
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @license
|
|
23
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
const ArrowTopIcon = (props) => {
|
|
29
|
+
const { color = 'gray-10' } = props;
|
|
30
|
+
return (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", fill: "none" },
|
|
31
|
+
index.h("path", { stroke: `var(--pv-color-${color})`, "stroke-linecap": "round", "stroke-width": "1.5", d: "m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28" })));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.ArrowBottomIcon = ArrowBottomIcon;
|
|
35
|
+
exports.ArrowTopIcon = ArrowTopIcon;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=arrow_top-834fb7ec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"arrow_top-834fb7ec.js","mappings":";;;;;;;AAAA;;;;;;;MAWa,eAAe,GAA+C,CAAC,KAAK;EAC/E,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;EAEpC,QACEA,iBACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM;IAEXA,kBACE,MAAM,EAAE,kBAAkB,KAAK,GAAG,oBAEnB,OAAO,kBACT,KAAK,EAClB,CAAC,EAAC,0DAA0D,GAC5D,CACE,EACN;AACJ;;AC9BA;;;;;;;MAWa,YAAY,GAA+C,CAAC,KAAK;EAC5E,MAAM,EAAE,KAAK,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;EAEpC,QACEA,iBACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,IAAI,EAAC,MAAM;IAEXA,kBACE,MAAM,EAAE,kBAAkB,KAAK,GAAG,oBAEnB,OAAO,kBACT,KAAK,EAClB,CAAC,EAAC,wDAAwD,GAC1D,CACE,EACN;AACJ;;;;;","names":["h"],"sources":["src/components/icons/arrow_bottom.tsx","src/components/icons/arrow_top.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ArrowBottomIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n stroke={`var(--pv-color-${color})`}\n // eslint-disable-next-line react/no-unknown-property\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n d=\"m19.222 12.778-3.851 4.279a.2.2 0 0 1-.297 0l-3.852-4.28\"\n />\n </svg>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { ColorType } from '../../interface';\n\nexport const ArrowTopIcon: FunctionalComponent<{ color?: ColorType }> = (props) => {\n const { color = 'gray-10' } = props;\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"30\"\n height=\"30\"\n fill=\"none\"\n >\n <path\n stroke={`var(--pv-color-${color})`}\n // eslint-disable-next-line react/no-unknown-property\n stroke-linecap=\"round\"\n stroke-width=\"1.5\"\n d=\"m11.222 17.722 3.852-4.28a.2.2 0 0 1 .297 0l3.851 4.28\"\n />\n </svg>\n );\n};\n"],"version":3}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
const index = require('./index-efd561e9.js');
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @license
|
|
10
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
16
|
+
var t = {};
|
|
17
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
18
|
+
t[p] = s[p];
|
|
19
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
20
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
21
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
22
|
+
t[p[i]] = s[p[i]];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
const variantMapping = {
|
|
27
|
+
h1: 'h1',
|
|
28
|
+
h2: 'h2',
|
|
29
|
+
h3: 'h3',
|
|
30
|
+
h4: 'h4',
|
|
31
|
+
h5: 'h5',
|
|
32
|
+
s1: 'h6',
|
|
33
|
+
s2: 'h6',
|
|
34
|
+
b1: 'p',
|
|
35
|
+
b2: 'p',
|
|
36
|
+
b3: 'p',
|
|
37
|
+
btn1: 'span',
|
|
38
|
+
btn2: 'span',
|
|
39
|
+
c1: 'p',
|
|
40
|
+
c2: 'p',
|
|
41
|
+
};
|
|
42
|
+
const Typography = (props, children) => {
|
|
43
|
+
const { component: componentProp, variant = 'b2', color = 'black', class: classProp } = props, other = __rest(props, ["component", "variant", "color", "class"]);
|
|
44
|
+
const Component = componentProp || variantMapping[variant] || 'p';
|
|
45
|
+
return (index.h(Component, Object.assign({}, other, { class: {
|
|
46
|
+
typography: true,
|
|
47
|
+
[`t-${variant}`]: true,
|
|
48
|
+
[`c-${color}`]: true,
|
|
49
|
+
[classProp]: Boolean(classProp),
|
|
50
|
+
} }), children));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @license
|
|
55
|
+
* Copyright (c) Peculiar Ventures, LLC.
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the MIT license found in the
|
|
58
|
+
* LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/
|
|
60
|
+
const Button = (props, children) => {
|
|
61
|
+
const { href, class: classProp, startIcon, onClick, } = props;
|
|
62
|
+
const isLink = !!href;
|
|
63
|
+
const TagType = isLink ? 'a' : 'button';
|
|
64
|
+
return (index.h(TagType, { type: !isLink && 'button', href: isLink && href, target: isLink && '_blank', rel: isLink && 'noreferrer noopener', onClick: onClick, class: {
|
|
65
|
+
button: true,
|
|
66
|
+
// eslint-disable-next-line react/destructuring-assignment
|
|
67
|
+
m_no_padding: children.length === 0,
|
|
68
|
+
[classProp]: Boolean(classProp),
|
|
69
|
+
} },
|
|
70
|
+
startIcon,
|
|
71
|
+
children.length > 0 && (index.h(Typography, { variant: "b3", color: "black", component: "span" }, children))));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.Button = Button;
|
|
75
|
+
exports.Typography = Typography;
|
|
76
|
+
|
|
77
|
+
//# sourceMappingURL=button-14e2b73f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"button-14e2b73f.js","mappings":";;;;;;;AAAA;;;;;;;;;;;;;;;;;;AAkBA,MAAM,cAAc,GAAmF;EACrG,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,IAAI;EACR,EAAE,EAAE,GAAG;EACP,EAAE,EAAE,GAAG;EACP,EAAE,EAAE,GAAG;EACP,IAAI,EAAE,MAAM;EACZ,IAAI,EAAE,MAAM;EACZ,EAAE,EAAE,GAAG;EACP,EAAE,EAAE,GAAG;CACR,CAAC;MAEW,UAAU,GAAyC,CAAC,KAAK,EAAE,QAAQ;EAC9E,MAAM,EACJ,SAAS,EAAE,aAAa,EACxB,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,OAAO,EACf,KAAK,EAAE,SAAS,KAEd,KAAK,EADJ,KAAK,UACN,KAAK,EANH,0CAML,CAAQ,CAAC;EAEV,MAAM,SAAS,GAAG,aAAa,IAAI,cAAc,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC;EAElE,QACEA,QAAC,SAAS,oBACJ,KAAK,IACT,KAAK,EAAE;MACL,UAAU,EAAE,IAAI;MAChB,CAAC,KAAK,OAAO,EAAE,GAAG,IAAI;MACtB,CAAC,KAAK,KAAK,EAAE,GAAG,IAAI;MACpB,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;KAChC,KAEA,QAAQ,CACC,EACZ;AACJ;;AC3DA;;;;;;;MAkBa,MAAM,GAAqC,CAAC,KAAK,EAAE,QAAQ;EACtE,MAAM,EACJ,IAAI,EACJ,KAAK,EAAE,SAAS,EAChB,SAAS,EACT,OAAO,GACR,GAAG,KAAK,CAAC;EAEV,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC;EACtB,MAAM,OAAO,GAAG,MAAM,GAAG,GAAG,GAAG,QAAQ,CAAC;EAExC,QACEA,QAAC,OAAO,IACN,IAAI,EAAE,CAAC,MAAM,IAAI,QAAQ,EACzB,IAAI,EAAE,MAAM,IAAI,IAAI,EACpB,MAAM,EAAE,MAAM,IAAI,QAAQ,EAC1B,GAAG,EAAE,MAAM,IAAI,qBAAqB,EACpC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;MACL,MAAM,EAAE,IAAI;;MAEZ,YAAY,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;MACnC,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;KAChC;IAEA,SAAS;IAET,QAAQ,CAAC,MAAM,GAAG,CAAC,KAClBA,QAAC,UAAU,IACT,OAAO,EAAC,IAAI,EACZ,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,MAAM,IAEf,QAAQ,CACE,CACd,CACO,EACV;AACJ;;;;;","names":["h"],"sources":["src/components/typography/typography.tsx","src/components/button/button.tsx"],"sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h } from '@stencil/core';\nimport type { TypographyType, ColorType } from '../../interface';\n\ninterface TypographyProps {\n component?: keyof JSX.IntrinsicElements;\n variant?: TypographyType;\n color?: ColorType;\n class?: string;\n}\n\nconst variantMapping: Record<TypographyType, 'p' | 'span' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'> = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n s1: 'h6',\n s2: 'h6',\n b1: 'p',\n b2: 'p',\n b3: 'p',\n btn1: 'span',\n btn2: 'span',\n c1: 'p',\n c2: 'p',\n};\n\nexport const Typography: FunctionalComponent<TypographyProps> = (props, children) => {\n const {\n component: componentProp,\n variant = 'b2',\n color = 'black',\n class: classProp,\n ...other\n } = props;\n\n const Component = componentProp || variantMapping[variant] || 'p';\n\n return (\n <Component\n {...other}\n class={{\n typography: true,\n [`t-${variant}`]: true,\n [`c-${color}`]: true,\n [classProp]: Boolean(classProp),\n }}\n >\n {children}\n </Component>\n );\n};\n","/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { FunctionalComponent, h, VNode } from '@stencil/core';\nimport { Typography } from '../typography';\n\nexport interface ButtonProps {\n href?: string;\n class?: string;\n startIcon?: VNode;\n onClick?: (event: MouseEvent) => void;\n}\n\nexport const Button: FunctionalComponent<ButtonProps> = (props, children) => {\n const {\n href,\n class: classProp,\n startIcon,\n onClick,\n } = props;\n\n const isLink = !!href;\n const TagType = isLink ? 'a' : 'button';\n\n return (\n <TagType\n type={!isLink && 'button'}\n href={isLink && href}\n target={isLink && '_blank'}\n rel={isLink && 'noreferrer noopener'}\n onClick={onClick}\n class={{\n button: true,\n // eslint-disable-next-line react/destructuring-assignment\n m_no_padding: children.length === 0,\n [classProp]: Boolean(classProp),\n }}\n >\n {startIcon}\n {/* eslint-disable-next-line react/destructuring-assignment */}\n {children.length > 0 && (\n <Typography\n variant=\"b3\"\n color=\"black\"\n component=\"span\"\n >\n {children}\n </Typography>\n )}\n </TagType>\n );\n};\n"],"version":3}
|