@osdk/cbac-components 0.1.0-beta.1 → 0.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/build/browser/cbac-picker/base/BaseCbacBanner.js +64 -0
- package/build/browser/cbac-picker/base/BaseCbacBanner.js.map +1 -0
- package/build/browser/cbac-picker/base/BaseCbacBanner.module.css +74 -0
- package/build/browser/cbac-picker/base/BaseCbacBanner.module.css.js +9 -0
- package/build/browser/cbac-picker/base/BaseCbacPicker.js +70 -0
- package/build/browser/cbac-picker/base/BaseCbacPicker.js.map +1 -0
- package/build/browser/cbac-picker/base/BaseCbacPicker.module.css +42 -0
- package/build/browser/cbac-picker/base/BaseCbacPicker.module.css.js +9 -0
- package/build/browser/cbac-picker/base/BaseCbacPickerDialog.js +51 -0
- package/build/browser/cbac-picker/base/BaseCbacPickerDialog.js.map +1 -0
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.js +89 -0
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.js.map +1 -0
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.module.css +44 -0
- package/build/browser/cbac-picker/base/CategoryMarkingGroup.module.css.js +9 -0
- package/build/browser/cbac-picker/base/CbacPickerDialogFooter.js +42 -0
- package/build/browser/cbac-picker/base/CbacPickerDialogFooter.js.map +1 -0
- package/build/browser/cbac-picker/base/CbacPickerDialogFooter.module.css +19 -0
- package/build/browser/cbac-picker/base/CbacPickerDialogFooter.module.css.js +6 -0
- package/build/browser/cbac-picker/base/InfoBanner.js +32 -0
- package/build/browser/cbac-picker/base/InfoBanner.js.map +1 -0
- package/build/browser/cbac-picker/base/InfoBanner.module.css +30 -0
- package/build/browser/cbac-picker/base/InfoBanner.module.css.js +7 -0
- package/build/browser/cbac-picker/base/MarkingButton.js +42 -0
- package/build/browser/cbac-picker/base/MarkingButton.js.map +1 -0
- package/build/browser/cbac-picker/base/MarkingButton.module.css +76 -0
- package/build/browser/cbac-picker/base/MarkingButton.module.css.js +10 -0
- package/build/browser/cbac-picker/base/OverflowButton.js +50 -0
- package/build/browser/cbac-picker/base/OverflowButton.js.map +1 -0
- package/build/browser/cbac-picker/base/OverflowButton.module.css +57 -0
- package/build/browser/cbac-picker/base/OverflowButton.module.css.js +8 -0
- package/build/browser/cbac-picker/base/OverflowItem.js +42 -0
- package/build/browser/cbac-picker/base/OverflowItem.js.map +1 -0
- package/build/browser/cbac-picker/base/OverflowItem.module.css +51 -0
- package/build/browser/cbac-picker/base/OverflowItem.module.css.js +8 -0
- package/build/browser/cbac-picker/base/ValidationWarning.js +44 -0
- package/build/browser/cbac-picker/base/ValidationWarning.js.map +1 -0
- package/build/browser/cbac-picker/base/ValidationWarning.module.css +71 -0
- package/build/browser/cbac-picker/base/ValidationWarning.module.css.js +12 -0
- package/build/browser/cbac-picker/base/selectionStateHelpers.js +26 -0
- package/build/browser/cbac-picker/base/selectionStateHelpers.js.map +1 -0
- package/build/browser/cbac-picker/types.js.map +1 -1
- package/build/browser/cbac-picker/useCbacPickerState.js +85 -0
- package/build/browser/cbac-picker/useCbacPickerState.js.map +1 -0
- package/build/browser/styles.css +491 -0
- package/build/cjs/public/experimental.d.cts +1 -1
- package/build/esm/cbac-picker/base/BaseCbacBanner.js +64 -0
- package/build/esm/cbac-picker/base/BaseCbacBanner.js.map +1 -0
- package/build/esm/cbac-picker/base/BaseCbacBanner.module.css +74 -0
- package/build/esm/cbac-picker/base/BaseCbacPicker.js +70 -0
- package/build/esm/cbac-picker/base/BaseCbacPicker.js.map +1 -0
- package/build/esm/cbac-picker/base/BaseCbacPicker.module.css +42 -0
- package/build/esm/cbac-picker/base/BaseCbacPickerDialog.js +51 -0
- package/build/esm/cbac-picker/base/BaseCbacPickerDialog.js.map +1 -0
- package/build/esm/cbac-picker/base/CategoryMarkingGroup.js +89 -0
- package/build/esm/cbac-picker/base/CategoryMarkingGroup.js.map +1 -0
- package/build/esm/cbac-picker/base/CategoryMarkingGroup.module.css +44 -0
- package/build/esm/cbac-picker/base/CbacPickerDialogFooter.js +42 -0
- package/build/esm/cbac-picker/base/CbacPickerDialogFooter.js.map +1 -0
- package/build/esm/cbac-picker/base/CbacPickerDialogFooter.module.css +19 -0
- package/build/esm/cbac-picker/base/InfoBanner.js +32 -0
- package/build/esm/cbac-picker/base/InfoBanner.js.map +1 -0
- package/build/esm/cbac-picker/base/InfoBanner.module.css +30 -0
- package/build/esm/cbac-picker/base/MarkingButton.js +42 -0
- package/build/esm/cbac-picker/base/MarkingButton.js.map +1 -0
- package/build/esm/cbac-picker/base/MarkingButton.module.css +76 -0
- package/build/esm/cbac-picker/base/OverflowButton.js +50 -0
- package/build/esm/cbac-picker/base/OverflowButton.js.map +1 -0
- package/build/esm/cbac-picker/base/OverflowButton.module.css +57 -0
- package/build/esm/cbac-picker/base/OverflowItem.js +42 -0
- package/build/esm/cbac-picker/base/OverflowItem.js.map +1 -0
- package/build/esm/cbac-picker/base/OverflowItem.module.css +51 -0
- package/build/esm/cbac-picker/base/ValidationWarning.js +44 -0
- package/build/esm/cbac-picker/base/ValidationWarning.js.map +1 -0
- package/build/esm/cbac-picker/base/ValidationWarning.module.css +71 -0
- package/build/esm/cbac-picker/base/selectionStateHelpers.js +26 -0
- package/build/esm/cbac-picker/base/selectionStateHelpers.js.map +1 -0
- package/build/esm/cbac-picker/types.js.map +1 -1
- package/build/esm/cbac-picker/useCbacPickerState.js +85 -0
- package/build/esm/cbac-picker/useCbacPickerState.js.map +1 -0
- package/build/types/cbac-picker/base/BaseCbacBanner.d.ts +10 -0
- package/build/types/cbac-picker/base/BaseCbacBanner.d.ts.map +1 -0
- package/build/types/cbac-picker/base/BaseCbacPicker.d.ts +17 -0
- package/build/types/cbac-picker/base/BaseCbacPicker.d.ts.map +1 -0
- package/build/types/cbac-picker/base/BaseCbacPickerDialog.d.ts +11 -0
- package/build/types/cbac-picker/base/BaseCbacPickerDialog.d.ts.map +1 -0
- package/build/types/cbac-picker/base/CategoryMarkingGroup.d.ts +13 -0
- package/build/types/cbac-picker/base/CategoryMarkingGroup.d.ts.map +1 -0
- package/build/types/cbac-picker/base/CbacPickerDialogFooter.d.ts +8 -0
- package/build/types/cbac-picker/base/CbacPickerDialogFooter.d.ts.map +1 -0
- package/build/types/cbac-picker/base/InfoBanner.d.ts +6 -0
- package/build/types/cbac-picker/base/InfoBanner.d.ts.map +1 -0
- package/build/types/cbac-picker/base/MarkingButton.d.ts +9 -0
- package/build/types/cbac-picker/base/MarkingButton.d.ts.map +1 -0
- package/build/types/cbac-picker/base/OverflowButton.d.ts +13 -0
- package/build/types/cbac-picker/base/OverflowButton.d.ts.map +1 -0
- package/build/types/cbac-picker/base/OverflowItem.d.ts +10 -0
- package/build/types/cbac-picker/base/OverflowItem.d.ts.map +1 -0
- package/build/types/cbac-picker/base/ValidationWarning.d.ts +7 -0
- package/build/types/cbac-picker/base/ValidationWarning.d.ts.map +1 -0
- package/build/types/cbac-picker/base/selectionStateHelpers.d.ts +4 -0
- package/build/types/cbac-picker/base/selectionStateHelpers.d.ts.map +1 -0
- package/build/types/cbac-picker/types.d.ts +1 -1
- package/build/types/cbac-picker/types.d.ts.map +1 -1
- package/build/types/cbac-picker/useCbacPickerState.d.ts +11 -0
- package/build/types/cbac-picker/useCbacPickerState.d.ts.map +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useCbacBanner, useCbacMarkingRestrictions, useMarkingCategories, useMarkings } from "@osdk/react/experimental/admin";
|
|
18
|
+
import React from "react";
|
|
19
|
+
import { EMPTY_ARRAY, resolveRequiredGroups } from "./utils/cbacPickerUtils.js";
|
|
20
|
+
import { computeMarkingStates, groupMarkingsByCategory } from "./utils/selectionLogic.js";
|
|
21
|
+
const EMPTY_GROUPS = [];
|
|
22
|
+
function useStableArray(arr) {
|
|
23
|
+
const ref = React.useRef(arr);
|
|
24
|
+
if (arr.length !== ref.current.length || arr.some((id, i) => id !== ref.current[i])) {
|
|
25
|
+
ref.current = arr;
|
|
26
|
+
}
|
|
27
|
+
return ref.current;
|
|
28
|
+
}
|
|
29
|
+
export function useCbacPickerState(selectedIds) {
|
|
30
|
+
const stableSelectedIds = useStableArray(selectedIds);
|
|
31
|
+
const {
|
|
32
|
+
categories: rawCategories,
|
|
33
|
+
isLoading: categoriesLoading,
|
|
34
|
+
error: categoriesError
|
|
35
|
+
} = useMarkingCategories();
|
|
36
|
+
const {
|
|
37
|
+
markings: rawMarkings,
|
|
38
|
+
isLoading: markingsLoading,
|
|
39
|
+
error: markingsError
|
|
40
|
+
} = useMarkings();
|
|
41
|
+
const {
|
|
42
|
+
banner,
|
|
43
|
+
isLoading: bannerLoading,
|
|
44
|
+
error: bannerError
|
|
45
|
+
} = useCbacBanner({
|
|
46
|
+
markingIds: stableSelectedIds
|
|
47
|
+
});
|
|
48
|
+
const {
|
|
49
|
+
restrictions,
|
|
50
|
+
isLoading: restrictionsLoading,
|
|
51
|
+
error: restrictionsError
|
|
52
|
+
} = useCbacMarkingRestrictions({
|
|
53
|
+
markingIds: stableSelectedIds
|
|
54
|
+
});
|
|
55
|
+
const impliedMarkingIds = restrictions?.impliedMarkings ?? EMPTY_ARRAY;
|
|
56
|
+
const disallowedMarkingIds = restrictions?.disallowedMarkings ?? EMPTY_ARRAY;
|
|
57
|
+
const requiredMarkingGroups = restrictions?.requiredMarkings ?? EMPTY_GROUPS;
|
|
58
|
+
const isValid = restrictions?.isValid ?? true;
|
|
59
|
+
const isLoading = categoriesLoading || markingsLoading || restrictionsLoading || bannerLoading;
|
|
60
|
+
const error = React.useMemo(() => {
|
|
61
|
+
const errors = [categoriesError, markingsError, restrictionsError, bannerError].filter(e => e != null);
|
|
62
|
+
if (errors.length > 1) {
|
|
63
|
+
return new AggregateError(errors, errors.map(e => e.message).join("; "));
|
|
64
|
+
}
|
|
65
|
+
return errors[0];
|
|
66
|
+
}, [categoriesError, markingsError, restrictionsError, bannerError]);
|
|
67
|
+
const categoryGroups = React.useMemo(() => {
|
|
68
|
+
if (rawCategories === undefined || rawMarkings === undefined) {
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
return groupMarkingsByCategory(rawMarkings, rawCategories);
|
|
72
|
+
}, [rawMarkings, rawCategories]);
|
|
73
|
+
const markingStates = React.useMemo(() => computeMarkingStates(stableSelectedIds, impliedMarkingIds, disallowedMarkingIds), [stableSelectedIds, impliedMarkingIds, disallowedMarkingIds]);
|
|
74
|
+
const resolvedRequiredGroups = React.useMemo(() => resolveRequiredGroups(categoryGroups, requiredMarkingGroups), [categoryGroups, requiredMarkingGroups]);
|
|
75
|
+
return React.useMemo(() => ({
|
|
76
|
+
categoryGroups,
|
|
77
|
+
markingStates,
|
|
78
|
+
banner,
|
|
79
|
+
requiredMarkingGroups: resolvedRequiredGroups,
|
|
80
|
+
isValid,
|
|
81
|
+
isLoading,
|
|
82
|
+
error
|
|
83
|
+
}), [categoryGroups, markingStates, banner, resolvedRequiredGroups, isValid, isLoading, error]);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=useCbacPickerState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCbacPickerState.js","names":["useCbacBanner","useCbacMarkingRestrictions","useMarkingCategories","useMarkings","React","EMPTY_ARRAY","resolveRequiredGroups","computeMarkingStates","groupMarkingsByCategory","EMPTY_GROUPS","useStableArray","arr","ref","useRef","length","current","some","id","i","useCbacPickerState","selectedIds","stableSelectedIds","categories","rawCategories","isLoading","categoriesLoading","error","categoriesError","markings","rawMarkings","markingsLoading","markingsError","banner","bannerLoading","bannerError","markingIds","restrictions","restrictionsLoading","restrictionsError","impliedMarkingIds","impliedMarkings","disallowedMarkingIds","disallowedMarkings","requiredMarkingGroups","requiredMarkings","isValid","useMemo","errors","filter","e","AggregateError","map","message","join","categoryGroups","undefined","markingStates","resolvedRequiredGroups"],"sources":["useCbacPickerState.ts"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n useCbacBanner,\n useCbacMarkingRestrictions,\n useMarkingCategories,\n useMarkings,\n} from \"@osdk/react/experimental/admin\";\nimport React from \"react\";\nimport type {\n CategoryMarkingGroup,\n CbacBannerData,\n MarkingSelectionState,\n RequiredMarkingGroup,\n} from \"./types.js\";\nimport { EMPTY_ARRAY, resolveRequiredGroups } from \"./utils/cbacPickerUtils.js\";\nimport {\n computeMarkingStates,\n groupMarkingsByCategory,\n} from \"./utils/selectionLogic.js\";\n\nconst EMPTY_GROUPS: string[][] = [];\n\nexport interface UseCbacPickerStateResult {\n categoryGroups: CategoryMarkingGroup[];\n markingStates: Map<string, MarkingSelectionState>;\n banner: CbacBannerData | undefined;\n requiredMarkingGroups: RequiredMarkingGroup[];\n isValid: boolean;\n isLoading: boolean;\n error: Error | undefined;\n}\n\nfunction useStableArray(arr: string[]): string[] {\n const ref = React.useRef(arr);\n if (\n arr.length !== ref.current.length\n || arr.some((id, i) => id !== ref.current[i])\n ) {\n ref.current = arr;\n }\n return ref.current;\n}\n\nexport function useCbacPickerState(\n selectedIds: string[],\n): UseCbacPickerStateResult {\n const stableSelectedIds = useStableArray(selectedIds);\n const {\n categories: rawCategories,\n isLoading: categoriesLoading,\n error: categoriesError,\n } = useMarkingCategories();\n const {\n markings: rawMarkings,\n isLoading: markingsLoading,\n error: markingsError,\n } = useMarkings();\n const {\n banner,\n isLoading: bannerLoading,\n error: bannerError,\n } = useCbacBanner({ markingIds: stableSelectedIds });\n const {\n restrictions,\n isLoading: restrictionsLoading,\n error: restrictionsError,\n } = useCbacMarkingRestrictions({ markingIds: stableSelectedIds });\n\n const impliedMarkingIds = restrictions?.impliedMarkings ?? EMPTY_ARRAY;\n const disallowedMarkingIds = restrictions?.disallowedMarkings ?? EMPTY_ARRAY;\n const requiredMarkingGroups = restrictions?.requiredMarkings ?? EMPTY_GROUPS;\n const isValid = restrictions?.isValid ?? true;\n\n const isLoading = categoriesLoading || markingsLoading\n || restrictionsLoading || bannerLoading;\n\n const error = React.useMemo(() => {\n const errors = [\n categoriesError,\n markingsError,\n restrictionsError,\n bannerError,\n ].filter((e): e is Error => e != null);\n if (errors.length > 1) {\n return new AggregateError(\n errors,\n errors.map(e => e.message).join(\"; \"),\n );\n }\n return errors[0];\n }, [categoriesError, markingsError, restrictionsError, bannerError]);\n\n const categoryGroups = React.useMemo(\n (): CategoryMarkingGroup[] => {\n if (rawCategories === undefined || rawMarkings === undefined) {\n return [];\n }\n return groupMarkingsByCategory(rawMarkings, rawCategories);\n },\n [rawMarkings, rawCategories],\n );\n\n const markingStates = React.useMemo(\n () =>\n computeMarkingStates(\n stableSelectedIds,\n impliedMarkingIds,\n disallowedMarkingIds,\n ),\n [stableSelectedIds, impliedMarkingIds, disallowedMarkingIds],\n );\n\n const resolvedRequiredGroups = React.useMemo(\n () => resolveRequiredGroups(categoryGroups, requiredMarkingGroups),\n [categoryGroups, requiredMarkingGroups],\n );\n\n return React.useMemo(\n () => ({\n categoryGroups,\n markingStates,\n banner,\n requiredMarkingGroups: resolvedRequiredGroups,\n isValid,\n isLoading,\n error,\n }),\n [\n categoryGroups,\n markingStates,\n banner,\n resolvedRequiredGroups,\n isValid,\n isLoading,\n error,\n ],\n );\n}\n"],"mappings":"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","ignoreList":[]}
|
package/build/browser/styles.css
CHANGED
|
@@ -1,2 +1,493 @@
|
|
|
1
1
|
/* @osdk/cbac-components - Combined styles */
|
|
2
2
|
|
|
3
|
+
/* cbac-picker/base/BaseCbacBanner.module.css */
|
|
4
|
+
/*
|
|
5
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
.BaseCbacBanner-module__bannerRow___oxu42hEl {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
border-radius: var(--osdk-cbac-banner-border-radius);
|
|
24
|
+
width: 100%;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
background: var(--osdk-cbac-banner-bg);
|
|
27
|
+
color: var(--osdk-cbac-banner-color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.BaseCbacBanner-module__banner___IjvLA5g7 {
|
|
31
|
+
flex: 1;
|
|
32
|
+
padding: var(--osdk-cbac-banner-padding);
|
|
33
|
+
font-size: var(--osdk-cbac-banner-font-size);
|
|
34
|
+
font-weight: var(--osdk-cbac-banner-font-weight);
|
|
35
|
+
text-align: var(--osdk-cbac-banner-text-align);
|
|
36
|
+
font-family: inherit;
|
|
37
|
+
border: none;
|
|
38
|
+
background: transparent;
|
|
39
|
+
color: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.BaseCbacBanner-module__clickable___EhVZQgrU {
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.BaseCbacBanner-module__clickable___EhVZQgrU:focus-visible {
|
|
47
|
+
outline: var(--osdk-focus-outline);
|
|
48
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.BaseCbacBanner-module__clickable___EhVZQgrU:hover {
|
|
52
|
+
filter: brightness(0.9);
|
|
53
|
+
text-decoration: underline;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.BaseCbacBanner-module__dismissButton___pEhcnzSL {
|
|
57
|
+
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: center;
|
|
60
|
+
padding: calc(var(--osdk-surface-spacing) * 1);
|
|
61
|
+
margin-right: calc(var(--osdk-surface-spacing) * 1);
|
|
62
|
+
background: transparent;
|
|
63
|
+
border: none;
|
|
64
|
+
color: inherit;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
67
|
+
flex-shrink: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.BaseCbacBanner-module__dismissButton___pEhcnzSL:hover {
|
|
71
|
+
filter: brightness(0.8);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.BaseCbacBanner-module__dismissButton___pEhcnzSL:focus-visible {
|
|
75
|
+
outline: var(--osdk-focus-outline);
|
|
76
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
/* cbac-picker/base/BaseCbacPicker.module.css */
|
|
81
|
+
/*
|
|
82
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
83
|
+
*
|
|
84
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
85
|
+
* you may not use this file except in compliance with the License.
|
|
86
|
+
* You may obtain a copy of the License at
|
|
87
|
+
*
|
|
88
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
89
|
+
*
|
|
90
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
91
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
92
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
93
|
+
* See the License for the specific language governing permissions and
|
|
94
|
+
* limitations under the License.
|
|
95
|
+
*/
|
|
96
|
+
|
|
97
|
+
.BaseCbacPicker-module__picker___MceZY02I {
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: column;
|
|
100
|
+
gap: var(--osdk-cbac-picker-category-gap);
|
|
101
|
+
padding: var(--osdk-cbac-picker-padding);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.BaseCbacPicker-module__categoriesContainer___nXngi1OL {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: var(--osdk-cbac-picker-category-gap);
|
|
108
|
+
overflow-y: auto;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.BaseCbacPicker-module__innerBanner___VcvOQHCz {
|
|
112
|
+
border: 1px solid var(--osdk-cbac-banner-border-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.BaseCbacPicker-module__statusMessage___Rf2tId8K {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
padding: calc(var(--osdk-surface-spacing) * 5);
|
|
120
|
+
color: var(--osdk-typography-color-muted);
|
|
121
|
+
font-style: italic;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
/* cbac-picker/base/CategoryMarkingGroup.module.css */
|
|
126
|
+
/*
|
|
127
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
128
|
+
*
|
|
129
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
130
|
+
* you may not use this file except in compliance with the License.
|
|
131
|
+
* You may obtain a copy of the License at
|
|
132
|
+
*
|
|
133
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
134
|
+
*
|
|
135
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
136
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
137
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
138
|
+
* See the License for the specific language governing permissions and
|
|
139
|
+
* limitations under the License.
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
.CategoryMarkingGroup-module__categoryGroup___YLFH-t86 {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
gap: var(--osdk-cbac-marking-button-gap);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.CategoryMarkingGroup-module__categoryName___7n2BZ6EY {
|
|
149
|
+
font-size: var(--osdk-cbac-picker-category-title-font-size);
|
|
150
|
+
font-weight: var(--osdk-cbac-picker-category-title-font-weight);
|
|
151
|
+
color: var(--osdk-cbac-picker-category-title-color);
|
|
152
|
+
letter-spacing: var(--osdk-cbac-picker-category-title-letter-spacing);
|
|
153
|
+
margin: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.CategoryMarkingGroup-module__markingGrid___1y6ahlKa {
|
|
157
|
+
display: grid;
|
|
158
|
+
grid-template-columns: repeat(
|
|
159
|
+
var(--osdk-cbac-picker-marking-grid-columns),
|
|
160
|
+
1fr
|
|
161
|
+
);
|
|
162
|
+
border-top: 1px solid var(--osdk-cbac-picker-marking-grid-border-color);
|
|
163
|
+
border-left: 1px solid var(--osdk-cbac-picker-marking-grid-border-color);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.CategoryMarkingGroup-module__emptyCell___ByBo51l5 {
|
|
167
|
+
border-right: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
168
|
+
border-bottom: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
/* cbac-picker/base/CbacPickerDialogFooter.module.css */
|
|
173
|
+
/*
|
|
174
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
175
|
+
*
|
|
176
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
177
|
+
* you may not use this file except in compliance with the License.
|
|
178
|
+
* You may obtain a copy of the License at
|
|
179
|
+
*
|
|
180
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
181
|
+
*
|
|
182
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
183
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
184
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
185
|
+
* See the License for the specific language governing permissions and
|
|
186
|
+
* limitations under the License.
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
.CbacPickerDialogFooter-module__tooltipTriggerWrapper___J-ZltPM0 {
|
|
190
|
+
display: contents;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/* cbac-picker/base/InfoBanner.module.css */
|
|
195
|
+
/*
|
|
196
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
197
|
+
*
|
|
198
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
199
|
+
* you may not use this file except in compliance with the License.
|
|
200
|
+
* You may obtain a copy of the License at
|
|
201
|
+
*
|
|
202
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
203
|
+
*
|
|
204
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
205
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
206
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
207
|
+
* See the License for the specific language governing permissions and
|
|
208
|
+
* limitations under the License.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
.InfoBanner-module__infoBanner___UqeHvalP {
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
215
|
+
padding: var(--osdk-cbac-info-banner-padding);
|
|
216
|
+
background: var(--osdk-cbac-info-banner-bg);
|
|
217
|
+
color: var(--osdk-cbac-info-banner-color);
|
|
218
|
+
font-size: var(--osdk-cbac-info-banner-font-size);
|
|
219
|
+
border-radius: var(--osdk-cbac-info-banner-border-radius);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.InfoBanner-module__icon___Pl0HKY0f {
|
|
223
|
+
flex-shrink: 0;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
/* cbac-picker/base/MarkingButton.module.css */
|
|
228
|
+
/*
|
|
229
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
230
|
+
*
|
|
231
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
232
|
+
* you may not use this file except in compliance with the License.
|
|
233
|
+
* You may obtain a copy of the License at
|
|
234
|
+
*
|
|
235
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
236
|
+
*
|
|
237
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
238
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
239
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
240
|
+
* See the License for the specific language governing permissions and
|
|
241
|
+
* limitations under the License.
|
|
242
|
+
*/
|
|
243
|
+
|
|
244
|
+
.MarkingButton-module__markingButton___Ra7r3hu1 {
|
|
245
|
+
display: inline-flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
justify-content: center;
|
|
248
|
+
text-align: center;
|
|
249
|
+
padding: var(--osdk-cbac-marking-button-padding);
|
|
250
|
+
border-radius: var(--osdk-cbac-marking-button-border-radius);
|
|
251
|
+
font-size: var(--osdk-cbac-marking-button-font-size);
|
|
252
|
+
font-family: inherit;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
border: none;
|
|
255
|
+
border-right: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
256
|
+
border-bottom: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
257
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
258
|
+
background: var(--osdk-cbac-marking-button-bg-default);
|
|
259
|
+
transition: background var(--osdk-emphasis-transition-duration)
|
|
260
|
+
var(--osdk-emphasis-ease-default),
|
|
261
|
+
border-color var(--osdk-emphasis-transition-duration)
|
|
262
|
+
var(--osdk-emphasis-ease-default),
|
|
263
|
+
color var(--osdk-emphasis-transition-duration)
|
|
264
|
+
var(--osdk-emphasis-ease-default);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.MarkingButton-module__markingButton___Ra7r3hu1:hover:not(:disabled):not(.MarkingButton-module__disallowed___gqq-bTvz):not(.MarkingButton-module__impliedDisallowed___cpzuUIxC) {
|
|
268
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.MarkingButton-module__selected___HC8AEwJx {
|
|
272
|
+
color: var(--osdk-cbac-marking-button-color-selected);
|
|
273
|
+
background: var(--osdk-cbac-marking-button-bg-selected);
|
|
274
|
+
border-color: var(--osdk-cbac-marking-button-border-color-selected);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.MarkingButton-module__selected___HC8AEwJx:hover:not(:disabled) {
|
|
278
|
+
background: var(--osdk-intent-primary-hover);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.MarkingButton-module__implied___dIs7pIKM {
|
|
282
|
+
color: var(--osdk-cbac-marking-button-color-implied);
|
|
283
|
+
background: var(--osdk-cbac-marking-button-bg-implied);
|
|
284
|
+
border-color: var(--osdk-cbac-marking-button-border-color-implied);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.MarkingButton-module__disallowed___gqq-bTvz,
|
|
288
|
+
.MarkingButton-module__impliedDisallowed___cpzuUIxC {
|
|
289
|
+
color: var(--osdk-cbac-marking-button-color-disallowed);
|
|
290
|
+
background: var(--osdk-cbac-marking-button-bg-disallowed);
|
|
291
|
+
border-color: var(--osdk-cbac-marking-button-border-color-disallowed);
|
|
292
|
+
cursor: not-allowed;
|
|
293
|
+
opacity: var(--osdk-cbac-disabled-opacity);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.MarkingButton-module__markingButton___Ra7r3hu1:focus-visible {
|
|
297
|
+
outline: var(--osdk-focus-outline);
|
|
298
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.MarkingButton-module__markingButton___Ra7r3hu1:disabled {
|
|
302
|
+
cursor: not-allowed;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
/* cbac-picker/base/OverflowButton.module.css */
|
|
307
|
+
/*
|
|
308
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
309
|
+
*
|
|
310
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
311
|
+
* you may not use this file except in compliance with the License.
|
|
312
|
+
* You may obtain a copy of the License at
|
|
313
|
+
*
|
|
314
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
315
|
+
*
|
|
316
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
317
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
318
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
319
|
+
* See the License for the specific language governing permissions and
|
|
320
|
+
* limitations under the License.
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
.OverflowButton-module__moreButton___cpjbpYWQ {
|
|
324
|
+
display: inline-flex;
|
|
325
|
+
align-items: center;
|
|
326
|
+
justify-content: center;
|
|
327
|
+
text-align: center;
|
|
328
|
+
padding: var(--osdk-cbac-overflow-button-padding);
|
|
329
|
+
font-size: var(--osdk-cbac-overflow-button-font-size);
|
|
330
|
+
font-family: inherit;
|
|
331
|
+
cursor: pointer;
|
|
332
|
+
border: none;
|
|
333
|
+
border-right: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
334
|
+
border-bottom: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
335
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
336
|
+
background: var(--osdk-cbac-marking-button-bg-default);
|
|
337
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.OverflowButton-module__moreButton___cpjbpYWQ:hover {
|
|
341
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.OverflowButton-module__moreButton___cpjbpYWQ:focus-visible {
|
|
345
|
+
outline: var(--osdk-focus-outline);
|
|
346
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.OverflowButton-module__moreButtonActive___zNMk3W-5 {
|
|
350
|
+
color: var(--osdk-intent-primary-rest);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.OverflowButton-module__overflowList___7llfP4BH {
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-direction: column;
|
|
356
|
+
max-height: var(--osdk-cbac-overflow-list-max-height);
|
|
357
|
+
overflow-y: auto;
|
|
358
|
+
padding: calc(var(--osdk-surface-spacing) * 0.5);
|
|
359
|
+
background: var(--osdk-surface-background-color-default);
|
|
360
|
+
border: 1px solid var(--osdk-surface-border-color-default);
|
|
361
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
362
|
+
box-shadow: var(--osdk-surface-elevation-2);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
/* cbac-picker/base/OverflowItem.module.css */
|
|
367
|
+
/*
|
|
368
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
369
|
+
*
|
|
370
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
371
|
+
* you may not use this file except in compliance with the License.
|
|
372
|
+
* You may obtain a copy of the License at
|
|
373
|
+
*
|
|
374
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
375
|
+
*
|
|
376
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
377
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
378
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
379
|
+
* See the License for the specific language governing permissions and
|
|
380
|
+
* limitations under the License.
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
.OverflowItem-module__overflowItem___VAefeIsF {
|
|
384
|
+
display: flex;
|
|
385
|
+
align-items: center;
|
|
386
|
+
width: 100%;
|
|
387
|
+
text-align: left;
|
|
388
|
+
padding: var(--osdk-surface-spacing)
|
|
389
|
+
calc(var(--osdk-surface-spacing) * 1.5);
|
|
390
|
+
font-size: var(--osdk-cbac-overflow-button-font-size);
|
|
391
|
+
font-family: inherit;
|
|
392
|
+
cursor: pointer;
|
|
393
|
+
border: none;
|
|
394
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
395
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
396
|
+
background: transparent;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.OverflowItem-module__overflowItem___VAefeIsF:hover:not(:disabled) {
|
|
400
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.OverflowItem-module__overflowItem___VAefeIsF:focus-visible {
|
|
404
|
+
outline: var(--osdk-focus-outline);
|
|
405
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.OverflowItem-module__overflowItemSelected___5UNc9Ql9 {
|
|
409
|
+
color: var(--osdk-intent-primary-rest);
|
|
410
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.OverflowItem-module__overflowItemDisabled___UKHy9SIU {
|
|
414
|
+
color: var(--osdk-cbac-marking-button-color-disallowed);
|
|
415
|
+
cursor: not-allowed;
|
|
416
|
+
opacity: var(--osdk-cbac-disabled-opacity);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
/* cbac-picker/base/ValidationWarning.module.css */
|
|
421
|
+
/*
|
|
422
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
423
|
+
*
|
|
424
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
425
|
+
* you may not use this file except in compliance with the License.
|
|
426
|
+
* You may obtain a copy of the License at
|
|
427
|
+
*
|
|
428
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
429
|
+
*
|
|
430
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
431
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
432
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
433
|
+
* See the License for the specific language governing permissions and
|
|
434
|
+
* limitations under the License.
|
|
435
|
+
*/
|
|
436
|
+
|
|
437
|
+
.ValidationWarning-module__validationWarning___oADBKhG- {
|
|
438
|
+
display: flex;
|
|
439
|
+
flex-direction: column;
|
|
440
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
441
|
+
padding: var(--osdk-cbac-validation-warning-padding);
|
|
442
|
+
background: var(--osdk-cbac-validation-warning-bg);
|
|
443
|
+
color: var(--osdk-cbac-validation-warning-color);
|
|
444
|
+
font-size: var(--osdk-cbac-validation-warning-font-size);
|
|
445
|
+
border-radius: var(--osdk-cbac-validation-warning-border-radius);
|
|
446
|
+
max-height: var(--osdk-cbac-validation-warning-max-height);
|
|
447
|
+
overflow-y: auto;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.ValidationWarning-module__header___ylq-kIOW {
|
|
451
|
+
display: flex;
|
|
452
|
+
align-items: center;
|
|
453
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.ValidationWarning-module__icon___PuGol1EB {
|
|
457
|
+
flex-shrink: 0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.ValidationWarning-module__groupList___ua5t3Rm2 {
|
|
461
|
+
list-style: none;
|
|
462
|
+
margin: 0;
|
|
463
|
+
padding: 0;
|
|
464
|
+
padding-left: calc(var(--osdk-surface-spacing) * 3);
|
|
465
|
+
display: flex;
|
|
466
|
+
flex-direction: column;
|
|
467
|
+
gap: var(--osdk-surface-spacing);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.ValidationWarning-module__groupItem___0BGH5HxZ {
|
|
471
|
+
display: flex;
|
|
472
|
+
align-items: center;
|
|
473
|
+
gap: var(--osdk-surface-spacing);
|
|
474
|
+
flex-wrap: wrap;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.ValidationWarning-module__groupNumber___rTdfnH3f {
|
|
478
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
479
|
+
flex-shrink: 0;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.ValidationWarning-module__chip___3EH1UeL0 {
|
|
483
|
+
display: inline-flex;
|
|
484
|
+
align-items: center;
|
|
485
|
+
padding: 0 var(--osdk-surface-spacing);
|
|
486
|
+
border: 1px solid var(--osdk-cbac-validation-warning-chip-border-color);
|
|
487
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
488
|
+
background: var(--osdk-cbac-validation-warning-chip-bg);
|
|
489
|
+
font-size: var(--osdk-cbac-validation-warning-font-size);
|
|
490
|
+
color: var(--osdk-typography-color-default-rest);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type MarkingSelectionState = "SELECTED" | "IMPLIED" | "DISALLOWED" | "IMPLIED_DISALLOWED";
|
|
1
|
+
type MarkingSelectionState = "NONE" | "SELECTED" | "IMPLIED" | "DISALLOWED" | "IMPLIED_DISALLOWED";
|
|
2
2
|
interface CbacBannerData {
|
|
3
3
|
classificationString: string;
|
|
4
4
|
textColor: string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2026 Palantir Technologies, Inc. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { Button } from "@base-ui/react/button";
|
|
18
|
+
import { Cross } from "@blueprintjs/icons";
|
|
19
|
+
import classnames from "classnames";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import { backgroundFromColors } from "../utils/cbacPickerUtils.js";
|
|
22
|
+
import styles from "./BaseCbacBanner.module.css";
|
|
23
|
+
export function BaseCbacBanner({
|
|
24
|
+
classificationString,
|
|
25
|
+
textColor,
|
|
26
|
+
backgroundColors,
|
|
27
|
+
onClick,
|
|
28
|
+
onDismiss,
|
|
29
|
+
className
|
|
30
|
+
}) {
|
|
31
|
+
const bannerStyle = React.useMemo(() => ({
|
|
32
|
+
"--osdk-cbac-banner-bg": backgroundFromColors(backgroundColors),
|
|
33
|
+
"--osdk-cbac-banner-color": textColor
|
|
34
|
+
}), [textColor, backgroundColors]);
|
|
35
|
+
const handleDismiss = React.useCallback(e => {
|
|
36
|
+
e.stopPropagation();
|
|
37
|
+
onDismiss?.();
|
|
38
|
+
}, [onDismiss]);
|
|
39
|
+
const dismissButton = onDismiss != null ? /*#__PURE__*/React.createElement(Button, {
|
|
40
|
+
className: styles.dismissButton,
|
|
41
|
+
onClick: handleDismiss,
|
|
42
|
+
"aria-label": "Clear classification"
|
|
43
|
+
}, /*#__PURE__*/React.createElement(Cross, {
|
|
44
|
+
size: 12,
|
|
45
|
+
color: "currentColor"
|
|
46
|
+
})) : null;
|
|
47
|
+
if (onClick != null) {
|
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: classnames(styles.bannerRow, className),
|
|
50
|
+
style: bannerStyle
|
|
51
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
52
|
+
className: classnames(styles.banner, styles.clickable),
|
|
53
|
+
onClick: onClick,
|
|
54
|
+
"aria-label": "Edit classification"
|
|
55
|
+
}, classificationString), dismissButton);
|
|
56
|
+
}
|
|
57
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: classnames(styles.bannerRow, className),
|
|
59
|
+
style: bannerStyle
|
|
60
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
61
|
+
className: styles.banner
|
|
62
|
+
}, classificationString), dismissButton);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=BaseCbacBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseCbacBanner.js","names":["Button","Cross","classnames","React","backgroundFromColors","styles","BaseCbacBanner","classificationString","textColor","backgroundColors","onClick","onDismiss","className","bannerStyle","useMemo","handleDismiss","useCallback","e","stopPropagation","dismissButton","createElement","size","color","bannerRow","style","banner","clickable"],"sources":["BaseCbacBanner.tsx"],"sourcesContent":["/*\n * Copyright 2026 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Button } from \"@base-ui/react/button\";\nimport { Cross } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport { backgroundFromColors } from \"../utils/cbacPickerUtils.js\";\nimport styles from \"./BaseCbacBanner.module.css\";\n\nexport interface BaseCbacBannerProps {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n onClick?: () => void;\n onDismiss?: () => void;\n className?: string;\n}\n\nexport function BaseCbacBanner({\n classificationString,\n textColor,\n backgroundColors,\n onClick,\n onDismiss,\n className,\n}: BaseCbacBannerProps): React.ReactElement {\n const bannerStyle = React.useMemo((): React.CSSProperties => ({\n \"--osdk-cbac-banner-bg\": backgroundFromColors(backgroundColors),\n \"--osdk-cbac-banner-color\": textColor,\n } as React.CSSProperties), [textColor, backgroundColors]);\n\n const handleDismiss = React.useCallback(\n (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n },\n [onDismiss],\n );\n\n const dismissButton = onDismiss != null\n ? (\n <Button\n className={styles.dismissButton}\n onClick={handleDismiss}\n aria-label=\"Clear classification\"\n >\n <Cross size={12} color=\"currentColor\" />\n </Button>\n )\n : null;\n\n if (onClick != null) {\n return (\n <div\n className={classnames(styles.bannerRow, className)}\n style={bannerStyle}\n >\n <Button\n className={classnames(styles.banner, styles.clickable)}\n onClick={onClick}\n aria-label=\"Edit classification\"\n >\n {classificationString}\n </Button>\n {dismissButton}\n </div>\n );\n }\n\n return (\n <div\n className={classnames(styles.bannerRow, className)}\n style={bannerStyle}\n >\n <span className={styles.banner}>\n {classificationString}\n </span>\n {dismissButton}\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,QAAQ,6BAA6B;AAClE,OAAOC,MAAM,MAAM,6BAA6B;AAWhD,OAAO,SAASC,cAAcA,CAAC;EAC7BC,oBAAoB;EACpBC,SAAS;EACTC,gBAAgB;EAChBC,OAAO;EACPC,SAAS;EACTC;AACmB,CAAC,EAAsB;EAC1C,MAAMC,WAAW,GAAGV,KAAK,CAACW,OAAO,CAAC,OAA4B;IAC5D,uBAAuB,EAAEV,oBAAoB,CAACK,gBAAgB,CAAC;IAC/D,0BAA0B,EAAED;EAC9B,CAAC,CAAwB,EAAE,CAACA,SAAS,EAAEC,gBAAgB,CAAC,CAAC;EAEzD,MAAMM,aAAa,GAAGZ,KAAK,CAACa,WAAW,CACpCC,CAAmB,IAAK;IACvBA,CAAC,CAACC,eAAe,CAAC,CAAC;IACnBP,SAAS,GAAG,CAAC;EACf,CAAC,EACD,CAACA,SAAS,CACZ,CAAC;EAED,MAAMQ,aAAa,GAAGR,SAAS,IAAI,IAAI,gBAEnCR,KAAA,CAAAiB,aAAA,CAACpB,MAAM;IACLY,SAAS,EAAEP,MAAM,CAACc,aAAc;IAChCT,OAAO,EAAEK,aAAc;IACvB,cAAW;EAAsB,gBAEjCZ,KAAA,CAAAiB,aAAA,CAACnB,KAAK;IAACoB,IAAI,EAAE,EAAG;IAACC,KAAK,EAAC;EAAc,CAAE,CACjC,CAAC,GAET,IAAI;EAER,IAAIZ,OAAO,IAAI,IAAI,EAAE;IACnB,oBACEP,KAAA,CAAAiB,aAAA;MACER,SAAS,EAAEV,UAAU,CAACG,MAAM,CAACkB,SAAS,EAAEX,SAAS,CAAE;MACnDY,KAAK,EAAEX;IAAY,gBAEnBV,KAAA,CAAAiB,aAAA,CAACpB,MAAM;MACLY,SAAS,EAAEV,UAAU,CAACG,MAAM,CAACoB,MAAM,EAAEpB,MAAM,CAACqB,SAAS,CAAE;MACvDhB,OAAO,EAAEA,OAAQ;MACjB,cAAW;IAAqB,GAE/BH,oBACK,CAAC,EACRY,aACE,CAAC;EAEV;EAEA,oBACEhB,KAAA,CAAAiB,aAAA;IACER,SAAS,EAAEV,UAAU,CAACG,MAAM,CAACkB,SAAS,EAAEX,SAAS,CAAE;IACnDY,KAAK,EAAEX;EAAY,gBAEnBV,KAAA,CAAAiB,aAAA;IAAMR,SAAS,EAAEP,MAAM,CAACoB;EAAO,GAC5BlB,oBACG,CAAC,EACNY,aACE,CAAC;AAEV","ignoreList":[]}
|