strapi-plugin-oidc 1.7.5 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ const react = require("react");
7
7
  const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const reactIntl = require("react-intl");
10
- const index = require("./index-CLUIKIK3.js");
10
+ const index = require("./index-BSgVStns.js");
11
11
  const styled = require("styled-components");
12
12
  const lucideReact = require("lucide-react");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -70,15 +70,21 @@ const TagInputWrapper = styled__default.default(designSystem.Box)`
70
70
  flex-wrap: wrap;
71
71
  gap: 4px;
72
72
  align-items: center;
73
- padding: 8px 16px;
73
+ padding-inline: ${({ theme }) => theme.spaces[4]};
74
+ padding-block: ${({ theme }) => theme.spaces[3]};
74
75
  border-radius: 4px;
75
76
  border: 1px solid ${({ theme }) => theme.colors.neutral200};
76
77
  background-color: ${({ theme }) => theme.colors.neutral0};
77
78
  cursor: text;
78
79
  min-width: 220px;
79
- min-height: 4rem;
80
+ min-height: 4.8rem;
80
81
  flex: 0 0 auto;
81
82
 
83
+ ${({ theme }) => theme.breakpoints.medium} {
84
+ padding-block: ${({ theme }) => theme.spaces[2]};
85
+ min-height: 4rem;
86
+ }
87
+
82
88
  &:focus-within {
83
89
  border-color: ${({ theme }) => theme.colors.primary600};
84
90
  box-shadow: 0 0 0 2px ${({ theme }) => theme.colors.primary100};
@@ -143,7 +149,6 @@ function TagInputShell({
143
149
  inputProps,
144
150
  children
145
151
  }) {
146
- const inputId = react.useId();
147
152
  return /* @__PURE__ */ jsxRuntime.jsxs(TagInputWrapper, { ref: wrapperRef, onClick: () => inputRef.current?.focus(), children: [
148
153
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, wrap: "wrap", alignItems: "center", style: { flex: 1, minWidth: 0 }, children: [
149
154
  startIcon && /* @__PURE__ */ jsxRuntime.jsx(StartIconSlot, { children: startIcon }),
@@ -155,14 +160,6 @@ function TagInputShell({
155
160
  type: "text",
156
161
  placeholder: value.length === 0 ? placeholder : "",
157
162
  "aria-label": placeholder,
158
- autoComplete: "off",
159
- autoCorrect: "off",
160
- autoCapitalize: "off",
161
- spellCheck: false,
162
- name: `tag-input-${inputId}`,
163
- "data-form-type": "other",
164
- "data-lpignore": "true",
165
- "data-1p-ignore": "true",
166
163
  ...inputProps
167
164
  }
168
165
  )
@@ -747,6 +744,16 @@ function TagDateInput({ value = [], onChange, placeholder, startIcon }) {
747
744
  }
748
745
  );
749
746
  }
747
+ const SizedButton = styled__default.default(designSystem.Button)`
748
+ && {
749
+ height: 4.8rem;
750
+ }
751
+ ${({ theme }) => theme.breakpoints.medium} {
752
+ && {
753
+ height: 4rem;
754
+ }
755
+ }
756
+ `;
750
757
  const Icon = styled__default.default.span`
751
758
  display: inline-flex;
752
759
  align-items: center;
@@ -911,91 +918,98 @@ function Whitelist({
911
918
  return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
912
919
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "p", variant: "omega", textColor: "neutral600", marginBottom: 4, children: formatMessage(index.getTrad("whitelist.description")) }),
913
920
  useWhitelist && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
914
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 8, marginTop: 5, marginBottom: 5, alignItems: "stretch", wrap: "wrap", children: [
915
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
916
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(
917
- designSystem.Field.Input,
918
- {
919
- type: "text",
920
- disabled: loading,
921
- value: email,
922
- hasError: Boolean(email && !EMAIL_REGEX.test(email)),
923
- onChange: (e) => setEmail(e.currentTarget.value),
924
- placeholder: formatMessage(index.getTrad("whitelist.email.placeholder")),
925
- style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
926
- }
927
- ) }) }),
928
- /* @__PURE__ */ jsxRuntime.jsx(
929
- designSystem.Button,
930
- {
931
- size: "S",
932
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
933
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
934
- disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
935
- loading,
936
- onClick: onSaveEmail,
937
- children: formatMessage(index.getTrad("page.add"))
938
- }
939
- )
940
- ] }),
941
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
942
- /* @__PURE__ */ jsxRuntime.jsx(
943
- designSystem.Button,
944
- {
945
- size: "S",
946
- variant: "tertiary",
947
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
948
- onClick: onExport,
949
- disabled: users.length === 0,
950
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
951
- children: formatMessage(index.getTrad("whitelist.export"))
952
- }
953
- ),
954
- /* @__PURE__ */ jsxRuntime.jsx(
955
- designSystem.Button,
956
- {
957
- size: "S",
958
- variant: "tertiary",
959
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Upload, {}),
960
- onClick: () => fileInputRef.current?.click(),
961
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
962
- children: formatMessage(index.getTrad("whitelist.import"))
963
- }
964
- ),
965
- /* @__PURE__ */ jsxRuntime.jsx(
966
- "input",
967
- {
968
- ref: fileInputRef,
969
- type: "file",
970
- accept: ".json,application/json",
971
- style: { display: "none" },
972
- onChange: handleImport
973
- }
974
- ),
975
- /* @__PURE__ */ jsxRuntime.jsx(
976
- ConfirmDialog,
977
- {
978
- trigger: /* @__PURE__ */ jsxRuntime.jsx(
979
- designSystem.Button,
921
+ /* @__PURE__ */ jsxRuntime.jsxs(
922
+ designSystem.Flex,
923
+ {
924
+ gap: 8,
925
+ marginTop: 5,
926
+ marginBottom: 5,
927
+ alignItems: "stretch",
928
+ wrap: "wrap",
929
+ style: { rowGap: "0.8rem" },
930
+ children: [
931
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", style: { minWidth: "280px", flex: "1 1 280px" }, children: [
932
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: 1, minWidth: "200px" }, children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Root, { children: /* @__PURE__ */ jsxRuntime.jsx(
933
+ designSystem.Field.Input,
934
+ {
935
+ type: "text",
936
+ disabled: loading,
937
+ value: email,
938
+ hasError: Boolean(email && !EMAIL_REGEX.test(email)),
939
+ onChange: (e) => setEmail(e.currentTarget.value),
940
+ placeholder: formatMessage(index.getTrad("whitelist.email.placeholder")),
941
+ style: { fontSize: "1.4rem", lineHeight: "2.2rem" }
942
+ }
943
+ ) }) }),
944
+ /* @__PURE__ */ jsxRuntime.jsx(
945
+ SizedButton,
980
946
  {
981
947
  size: "S",
982
- variant: "danger-light",
983
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
948
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Plus, {}),
949
+ disabled: loading || email.trim() === "" || !EMAIL_REGEX.test(email),
950
+ loading,
951
+ onClick: onSaveEmail,
952
+ children: formatMessage(index.getTrad("page.add"))
953
+ }
954
+ )
955
+ ] }),
956
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
957
+ /* @__PURE__ */ jsxRuntime.jsx(
958
+ SizedButton,
959
+ {
960
+ size: "S",
961
+ variant: "tertiary",
962
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
963
+ onClick: onExport,
984
964
  disabled: users.length === 0,
985
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
986
- children: formatMessage(index.getTrad("whitelist.delete.all.label"))
965
+ children: formatMessage(index.getTrad("whitelist.export"))
987
966
  }
988
967
  ),
989
- title: formatMessage(index.getTrad("whitelist.delete.all.title")),
990
- body: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(index.getTrad("whitelist.delete.all.description"), {
991
- count: users.length
992
- }) }) }),
993
- confirmLabel: formatMessage(index.getTrad("whitelist.delete.all.label")),
994
- onConfirm: onDeleteAll
995
- }
996
- )
997
- ] })
998
- ] }),
968
+ /* @__PURE__ */ jsxRuntime.jsx(
969
+ SizedButton,
970
+ {
971
+ size: "S",
972
+ variant: "tertiary",
973
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Upload, {}),
974
+ onClick: () => fileInputRef.current?.click(),
975
+ children: formatMessage(index.getTrad("whitelist.import"))
976
+ }
977
+ ),
978
+ /* @__PURE__ */ jsxRuntime.jsx(
979
+ "input",
980
+ {
981
+ ref: fileInputRef,
982
+ type: "file",
983
+ accept: ".json,application/json",
984
+ style: { display: "none" },
985
+ onChange: handleImport
986
+ }
987
+ ),
988
+ /* @__PURE__ */ jsxRuntime.jsx(
989
+ ConfirmDialog,
990
+ {
991
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
992
+ SizedButton,
993
+ {
994
+ size: "S",
995
+ variant: "danger-light",
996
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
997
+ disabled: users.length === 0,
998
+ children: formatMessage(index.getTrad("whitelist.delete.all.label"))
999
+ }
1000
+ ),
1001
+ title: formatMessage(index.getTrad("whitelist.delete.all.title")),
1002
+ body: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", textAlign: "center", children: formatMessage(index.getTrad("whitelist.delete.all.description"), {
1003
+ count: users.length
1004
+ }) }) }),
1005
+ confirmLabel: formatMessage(index.getTrad("whitelist.delete.all.label")),
1006
+ onConfirm: onDeleteAll
1007
+ }
1008
+ )
1009
+ ] })
1010
+ ]
1011
+ }
1012
+ ),
999
1013
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Divider, {}),
1000
1014
  /* @__PURE__ */ jsxRuntime.jsxs(CustomTable, { colCount: 4, rowCount: users.length, children: [
1001
1015
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Thead, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Tr, { children: [
@@ -3601,6 +3615,8 @@ const AUDIT_ACTIONS = [
3601
3615
  "nonce_mismatch",
3602
3616
  "token_exchange_failed",
3603
3617
  "whitelist_rejected",
3618
+ "email_not_verified",
3619
+ "id_token_invalid",
3604
3620
  "logout",
3605
3621
  "session_expired",
3606
3622
  "user_created"
@@ -3740,14 +3756,13 @@ function AuditLog({ title } = {}) {
3740
3756
  title ?? /* @__PURE__ */ jsxRuntime.jsx("span", {}),
3741
3757
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
3742
3758
  /* @__PURE__ */ jsxRuntime.jsx(
3743
- designSystem.Button,
3759
+ SizedButton,
3744
3760
  {
3745
3761
  size: "S",
3746
3762
  variant: "tertiary",
3747
3763
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
3748
3764
  onClick: handleExport,
3749
3765
  disabled: pagination.total === 0,
3750
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3751
3766
  children: formatMessage(index.getTrad("auditlog.export"))
3752
3767
  }
3753
3768
  ),
@@ -3755,13 +3770,12 @@ function AuditLog({ title } = {}) {
3755
3770
  ConfirmDialog,
3756
3771
  {
3757
3772
  trigger: /* @__PURE__ */ jsxRuntime.jsx(
3758
- designSystem.Button,
3773
+ SizedButton,
3759
3774
  {
3760
3775
  size: "S",
3761
3776
  variant: "danger-light",
3762
3777
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
3763
3778
  disabled: pagination.total === 0,
3764
- style: { paddingTop: "1.1rem", paddingBottom: "1.1rem", height: "auto" },
3765
3779
  children: formatMessage(index.getTrad("auditlog.clear"))
3766
3780
  }
3767
3781
  ),
@@ -3842,13 +3856,12 @@ function AuditLog({ title } = {}) {
3842
3856
  }
3843
3857
  ),
3844
3858
  hasActiveFilters && /* @__PURE__ */ jsxRuntime.jsx(
3845
- designSystem.Button,
3859
+ SizedButton,
3846
3860
  {
3847
3861
  size: "S",
3848
3862
  variant: "danger-light",
3849
3863
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
3850
3864
  onClick: clearFilters,
3851
- style: { height: "4rem" },
3852
3865
  children: formatMessage(index.getTrad("auditlog.filters.clear"))
3853
3866
  }
3854
3867
  )
@@ -4369,7 +4382,7 @@ function HomePage$1() {
4369
4382
  ] }) })
4370
4383
  ] })
4371
4384
  ] }),
4372
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(
4385
+ /* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { justifyContent: "flex-end", marginBottom: 8, children: /* @__PURE__ */ jsxRuntime.jsx(
4373
4386
  designSystem.Button,
4374
4387
  {
4375
4388
  size: "L",
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-CLUIKIK3.js");
3
+ const index = require("./index-BSgVStns.js");
4
4
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-BfX_taLq.mjs";
1
+ import { i } from "./index-B-K4X_N9.mjs";
2
2
  export {
3
3
  i as default
4
4
  };