@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,32 @@
|
|
|
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 { InfoSign } from "@blueprintjs/icons";
|
|
18
|
+
import classnames from "classnames";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import styles from "./InfoBanner.module.css.js";
|
|
21
|
+
export function InfoBanner({
|
|
22
|
+
message,
|
|
23
|
+
className
|
|
24
|
+
}) {
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: classnames(styles.infoBanner, className)
|
|
27
|
+
}, /*#__PURE__*/React.createElement(InfoSign, {
|
|
28
|
+
className: styles.icon,
|
|
29
|
+
size: 14
|
|
30
|
+
}), /*#__PURE__*/React.createElement("span", null, message));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=InfoBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBanner.js","names":["InfoSign","classnames","React","styles","InfoBanner","message","className","createElement","infoBanner","icon","size"],"sources":["InfoBanner.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 { InfoSign } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./InfoBanner.module.css\";\n\nexport interface InfoBannerProps {\n message: string;\n className?: string;\n}\n\nexport function InfoBanner({\n message,\n className,\n}: InfoBannerProps): React.ReactElement {\n return (\n <div className={classnames(styles.infoBanner, className)}>\n <InfoSign className={styles.icon} size={14} />\n <span>{message}</span>\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,yBAAyB;AAO5C,OAAO,SAASC,UAAUA,CAAC;EACzBC,OAAO;EACPC;AACe,CAAC,EAAsB;EACtC,oBACEJ,KAAA,CAAAK,aAAA;IAAKD,SAAS,EAAEL,UAAU,CAACE,MAAM,CAACK,UAAU,EAAEF,SAAS;EAAE,gBACvDJ,KAAA,CAAAK,aAAA,CAACP,QAAQ;IAACM,SAAS,EAAEH,MAAM,CAACM,IAAK;IAACC,IAAI,EAAE;EAAG,CAAE,CAAC,eAC9CR,KAAA,CAAAK,aAAA,eAAOF,OAAc,CAClB,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
.infoBanner {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
21
|
+
padding: var(--osdk-cbac-info-banner-padding);
|
|
22
|
+
background: var(--osdk-cbac-info-banner-bg);
|
|
23
|
+
color: var(--osdk-cbac-info-banner-color);
|
|
24
|
+
font-size: var(--osdk-cbac-info-banner-font-size);
|
|
25
|
+
border-radius: var(--osdk-cbac-info-banner-border-radius);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.icon {
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 classnames from "classnames";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import styles from "./MarkingButton.module.css.js";
|
|
21
|
+
import { getDisplayLabel, isDisallowed } from "./selectionStateHelpers.js";
|
|
22
|
+
const selectionStateClassMap = {
|
|
23
|
+
SELECTED: styles.selected,
|
|
24
|
+
IMPLIED: styles.implied,
|
|
25
|
+
DISALLOWED: styles.disallowed,
|
|
26
|
+
IMPLIED_DISALLOWED: styles.impliedDisallowed,
|
|
27
|
+
NONE: undefined
|
|
28
|
+
};
|
|
29
|
+
export function MarkingButton({
|
|
30
|
+
label,
|
|
31
|
+
selectionState,
|
|
32
|
+
onToggle,
|
|
33
|
+
disabled
|
|
34
|
+
}) {
|
|
35
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
className: classnames(styles.markingButton, selectionStateClassMap[selectionState]),
|
|
37
|
+
onClick: onToggle,
|
|
38
|
+
disabled: disabled ?? isDisallowed(selectionState),
|
|
39
|
+
"aria-pressed": selectionState === "SELECTED" || selectionState === "IMPLIED"
|
|
40
|
+
}, getDisplayLabel(label, selectionState));
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=MarkingButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkingButton.js","names":["Button","classnames","React","styles","getDisplayLabel","isDisallowed","selectionStateClassMap","SELECTED","selected","IMPLIED","implied","DISALLOWED","disallowed","IMPLIED_DISALLOWED","impliedDisallowed","NONE","undefined","MarkingButton","label","selectionState","onToggle","disabled","createElement","className","markingButton","onClick"],"sources":["MarkingButton.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 classnames from \"classnames\";\nimport React from \"react\";\nimport type { MarkingSelectionState } from \"../types.js\";\nimport styles from \"./MarkingButton.module.css\";\nimport { getDisplayLabel, isDisallowed } from \"./selectionStateHelpers.js\";\n\nexport interface MarkingButtonProps {\n label: string;\n selectionState: MarkingSelectionState;\n onToggle: () => void;\n disabled?: boolean;\n}\n\nconst selectionStateClassMap: Record<\n MarkingSelectionState,\n string | undefined\n> = {\n SELECTED: styles.selected,\n IMPLIED: styles.implied,\n DISALLOWED: styles.disallowed,\n IMPLIED_DISALLOWED: styles.impliedDisallowed,\n NONE: undefined,\n};\n\nexport function MarkingButton({\n label,\n selectionState,\n onToggle,\n disabled,\n}: MarkingButtonProps): React.ReactElement {\n return (\n <Button\n className={classnames(\n styles.markingButton,\n selectionStateClassMap[selectionState],\n )}\n onClick={onToggle}\n disabled={disabled ?? isDisallowed(selectionState)}\n aria-pressed={selectionState === \"SELECTED\"\n || selectionState === \"IMPLIED\"}\n >\n {getDisplayLabel(label, selectionState)}\n </Button>\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,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,4BAA4B;AAC/C,SAASC,eAAe,EAAEC,YAAY,QAAQ,4BAA4B;AAS1E,MAAMC,sBAGL,GAAG;EACFC,QAAQ,EAAEJ,MAAM,CAACK,QAAQ;EACzBC,OAAO,EAAEN,MAAM,CAACO,OAAO;EACvBC,UAAU,EAAER,MAAM,CAACS,UAAU;EAC7BC,kBAAkB,EAAEV,MAAM,CAACW,iBAAiB;EAC5CC,IAAI,EAAEC;AACR,CAAC;AAED,OAAO,SAASC,aAAaA,CAAC;EAC5BC,KAAK;EACLC,cAAc;EACdC,QAAQ;EACRC;AACkB,CAAC,EAAsB;EACzC,oBACEnB,KAAA,CAAAoB,aAAA,CAACtB,MAAM;IACLuB,SAAS,EAAEtB,UAAU,CACnBE,MAAM,CAACqB,aAAa,EACpBlB,sBAAsB,CAACa,cAAc,CACvC,CAAE;IACFM,OAAO,EAAEL,QAAS;IAClBC,QAAQ,EAAEA,QAAQ,IAAIhB,YAAY,CAACc,cAAc,CAAE;IACnD,gBAAcA,cAAc,KAAK,UAAU,IACtCA,cAAc,KAAK;EAAU,GAEjCf,eAAe,CAACc,KAAK,EAAEC,cAAc,CAChC,CAAC;AAEb","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
.markingButton {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
text-align: center;
|
|
22
|
+
padding: var(--osdk-cbac-marking-button-padding);
|
|
23
|
+
border-radius: var(--osdk-cbac-marking-button-border-radius);
|
|
24
|
+
font-size: var(--osdk-cbac-marking-button-font-size);
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
border: none;
|
|
28
|
+
border-right: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
29
|
+
border-bottom: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
30
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
31
|
+
background: var(--osdk-cbac-marking-button-bg-default);
|
|
32
|
+
transition: background var(--osdk-emphasis-transition-duration)
|
|
33
|
+
var(--osdk-emphasis-ease-default),
|
|
34
|
+
border-color var(--osdk-emphasis-transition-duration)
|
|
35
|
+
var(--osdk-emphasis-ease-default),
|
|
36
|
+
color var(--osdk-emphasis-transition-duration)
|
|
37
|
+
var(--osdk-emphasis-ease-default);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.markingButton:hover:not(:disabled):not(.disallowed):not(.impliedDisallowed) {
|
|
41
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.selected {
|
|
45
|
+
color: var(--osdk-cbac-marking-button-color-selected);
|
|
46
|
+
background: var(--osdk-cbac-marking-button-bg-selected);
|
|
47
|
+
border-color: var(--osdk-cbac-marking-button-border-color-selected);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.selected:hover:not(:disabled) {
|
|
51
|
+
background: var(--osdk-intent-primary-hover);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.implied {
|
|
55
|
+
color: var(--osdk-cbac-marking-button-color-implied);
|
|
56
|
+
background: var(--osdk-cbac-marking-button-bg-implied);
|
|
57
|
+
border-color: var(--osdk-cbac-marking-button-border-color-implied);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.disallowed,
|
|
61
|
+
.impliedDisallowed {
|
|
62
|
+
color: var(--osdk-cbac-marking-button-color-disallowed);
|
|
63
|
+
background: var(--osdk-cbac-marking-button-bg-disallowed);
|
|
64
|
+
border-color: var(--osdk-cbac-marking-button-border-color-disallowed);
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
opacity: var(--osdk-cbac-disabled-opacity);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.markingButton:focus-visible {
|
|
70
|
+
outline: var(--osdk-focus-outline);
|
|
71
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.markingButton:disabled {
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// CSS Module proxy for MarkingButton.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"markingButton": "MarkingButton-module__markingButton___Ra7r3hu1",
|
|
4
|
+
"disallowed": "MarkingButton-module__disallowed___gqq-bTvz",
|
|
5
|
+
"impliedDisallowed": "MarkingButton-module__impliedDisallowed___cpzuUIxC",
|
|
6
|
+
"selected": "MarkingButton-module__selected___HC8AEwJx",
|
|
7
|
+
"implied": "MarkingButton-module__implied___dIs7pIKM"
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default styles;
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { Popover } from "@base-ui/react/popover";
|
|
19
|
+
import classnames from "classnames";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import styles from "./OverflowButton.module.css.js";
|
|
22
|
+
import { OverflowItem } from "./OverflowItem.js";
|
|
23
|
+
export function OverflowButton({
|
|
24
|
+
overflowMarkings,
|
|
25
|
+
hasActiveOverflow,
|
|
26
|
+
onMarkingToggle
|
|
27
|
+
}) {
|
|
28
|
+
const [open, setOpen] = React.useState(false);
|
|
29
|
+
return /*#__PURE__*/React.createElement(Popover.Root, {
|
|
30
|
+
open: open,
|
|
31
|
+
onOpenChange: setOpen
|
|
32
|
+
}, /*#__PURE__*/React.createElement(Popover.Trigger, {
|
|
33
|
+
render: /*#__PURE__*/React.createElement(Button, {
|
|
34
|
+
className: classnames(styles.moreButton, hasActiveOverflow && styles.moreButtonActive)
|
|
35
|
+
}, "+", overflowMarkings.length, " more")
|
|
36
|
+
}), /*#__PURE__*/React.createElement(Popover.Portal, null, /*#__PURE__*/React.createElement(Popover.Positioner, {
|
|
37
|
+
side: "bottom",
|
|
38
|
+
align: "start"
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Popover.Popup, {
|
|
40
|
+
className: styles.overflowList
|
|
41
|
+
}, overflowMarkings.map(marking => /*#__PURE__*/React.createElement(OverflowItem, {
|
|
42
|
+
key: marking.id,
|
|
43
|
+
id: marking.id,
|
|
44
|
+
label: marking.label,
|
|
45
|
+
selectionState: marking.selectionState,
|
|
46
|
+
disabled: marking.disabled,
|
|
47
|
+
onToggle: onMarkingToggle
|
|
48
|
+
}))))));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=OverflowButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowButton.js","names":["Button","Popover","classnames","React","styles","OverflowItem","OverflowButton","overflowMarkings","hasActiveOverflow","onMarkingToggle","open","setOpen","useState","createElement","Root","onOpenChange","Trigger","render","className","moreButton","moreButtonActive","length","Portal","Positioner","side","align","Popup","overflowList","map","marking","key","id","label","selectionState","disabled","onToggle"],"sources":["OverflowButton.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 { Popover } from \"@base-ui/react/popover\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport type { MarkingSelectionState } from \"../types.js\";\nimport styles from \"./OverflowButton.module.css\";\nimport { OverflowItem } from \"./OverflowItem.js\";\n\nexport interface OverflowButtonProps {\n overflowMarkings: ReadonlyArray<{\n id: string;\n label: string;\n selectionState: MarkingSelectionState;\n disabled?: boolean;\n }>;\n hasActiveOverflow: boolean;\n onMarkingToggle: (markingId: string) => void;\n}\n\nexport function OverflowButton({\n overflowMarkings,\n hasActiveOverflow,\n onMarkingToggle,\n}: OverflowButtonProps): React.ReactElement {\n const [open, setOpen] = React.useState(false);\n\n return (\n <Popover.Root open={open} onOpenChange={setOpen}>\n <Popover.Trigger\n render={\n <Button\n className={classnames(\n styles.moreButton,\n hasActiveOverflow && styles.moreButtonActive,\n )}\n >\n +{overflowMarkings.length} more\n </Button>\n }\n />\n <Popover.Portal>\n <Popover.Positioner side=\"bottom\" align=\"start\">\n <Popover.Popup className={styles.overflowList}>\n {overflowMarkings.map((marking) => (\n <OverflowItem\n key={marking.id}\n id={marking.id}\n label={marking.label}\n selectionState={marking.selectionState}\n disabled={marking.disabled}\n onToggle={onMarkingToggle}\n />\n ))}\n </Popover.Popup>\n </Popover.Positioner>\n </Popover.Portal>\n </Popover.Root>\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,OAAO,QAAQ,wBAAwB;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,6BAA6B;AAChD,SAASC,YAAY,QAAQ,mBAAmB;AAahD,OAAO,SAASC,cAAcA,CAAC;EAC7BC,gBAAgB;EAChBC,iBAAiB;EACjBC;AACmB,CAAC,EAAsB;EAC1C,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAAC,KAAK,CAAC;EAE7C,oBACET,KAAA,CAAAU,aAAA,CAACZ,OAAO,CAACa,IAAI;IAACJ,IAAI,EAAEA,IAAK;IAACK,YAAY,EAAEJ;EAAQ,gBAC9CR,KAAA,CAAAU,aAAA,CAACZ,OAAO,CAACe,OAAO;IACdC,MAAM,eACJd,KAAA,CAAAU,aAAA,CAACb,MAAM;MACLkB,SAAS,EAAEhB,UAAU,CACnBE,MAAM,CAACe,UAAU,EACjBX,iBAAiB,IAAIJ,MAAM,CAACgB,gBAC9B;IAAE,GACH,GACE,EAACb,gBAAgB,CAACc,MAAM,EAAC,OACpB;EACT,CACF,CAAC,eACFlB,KAAA,CAAAU,aAAA,CAACZ,OAAO,CAACqB,MAAM,qBACbnB,KAAA,CAAAU,aAAA,CAACZ,OAAO,CAACsB,UAAU;IAACC,IAAI,EAAC,QAAQ;IAACC,KAAK,EAAC;EAAO,gBAC7CtB,KAAA,CAAAU,aAAA,CAACZ,OAAO,CAACyB,KAAK;IAACR,SAAS,EAAEd,MAAM,CAACuB;EAAa,GAC3CpB,gBAAgB,CAACqB,GAAG,CAAEC,OAAO,iBAC5B1B,KAAA,CAAAU,aAAA,CAACR,YAAY;IACXyB,GAAG,EAAED,OAAO,CAACE,EAAG;IAChBA,EAAE,EAAEF,OAAO,CAACE,EAAG;IACfC,KAAK,EAAEH,OAAO,CAACG,KAAM;IACrBC,cAAc,EAAEJ,OAAO,CAACI,cAAe;IACvCC,QAAQ,EAAEL,OAAO,CAACK,QAAS;IAC3BC,QAAQ,EAAE1B;EAAgB,CAC3B,CACF,CACY,CACG,CACN,CACJ,CAAC;AAEnB","ignoreList":[]}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
.moreButton {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
text-align: center;
|
|
22
|
+
padding: var(--osdk-cbac-overflow-button-padding);
|
|
23
|
+
font-size: var(--osdk-cbac-overflow-button-font-size);
|
|
24
|
+
font-family: inherit;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
border: none;
|
|
27
|
+
border-right: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
28
|
+
border-bottom: 1px solid var(--osdk-cbac-marking-button-border-color-default);
|
|
29
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
30
|
+
background: var(--osdk-cbac-marking-button-bg-default);
|
|
31
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.moreButton:hover {
|
|
35
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.moreButton:focus-visible {
|
|
39
|
+
outline: var(--osdk-focus-outline);
|
|
40
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.moreButtonActive {
|
|
44
|
+
color: var(--osdk-intent-primary-rest);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.overflowList {
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
max-height: var(--osdk-cbac-overflow-list-max-height);
|
|
51
|
+
overflow-y: auto;
|
|
52
|
+
padding: calc(var(--osdk-surface-spacing) * 0.5);
|
|
53
|
+
background: var(--osdk-surface-background-color-default);
|
|
54
|
+
border: 1px solid var(--osdk-surface-border-color-default);
|
|
55
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
56
|
+
box-shadow: var(--osdk-surface-elevation-2);
|
|
57
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// CSS Module proxy for OverflowButton.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"moreButton": "OverflowButton-module__moreButton___cpjbpYWQ",
|
|
4
|
+
"moreButtonActive": "OverflowButton-module__moreButtonActive___zNMk3W-5",
|
|
5
|
+
"overflowList": "OverflowButton-module__overflowList___7llfP4BH"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default styles;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 classnames from "classnames";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import styles from "./OverflowItem.module.css.js";
|
|
21
|
+
import { getDisplayLabel, isDisallowed, isImplied } from "./selectionStateHelpers.js";
|
|
22
|
+
export const OverflowItem = /*#__PURE__*/React.memo(function ({
|
|
23
|
+
id,
|
|
24
|
+
label,
|
|
25
|
+
selectionState,
|
|
26
|
+
disabled,
|
|
27
|
+
onToggle
|
|
28
|
+
}) {
|
|
29
|
+
const handleClick = React.useCallback(() => {
|
|
30
|
+
onToggle(id);
|
|
31
|
+
}, [onToggle, id]);
|
|
32
|
+
const disallowed = isDisallowed(selectionState);
|
|
33
|
+
const isSelected = selectionState === "SELECTED";
|
|
34
|
+
const implied = isImplied(selectionState);
|
|
35
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
36
|
+
className: classnames(styles.overflowItem, (isSelected || implied) && styles.overflowItemSelected, disallowed && styles.overflowItemDisabled),
|
|
37
|
+
onClick: handleClick,
|
|
38
|
+
disabled: disabled ?? disallowed,
|
|
39
|
+
"aria-pressed": isSelected || implied
|
|
40
|
+
}, getDisplayLabel(label, selectionState));
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=OverflowItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverflowItem.js","names":["Button","classnames","React","styles","getDisplayLabel","isDisallowed","isImplied","OverflowItem","memo","id","label","selectionState","disabled","onToggle","handleClick","useCallback","disallowed","isSelected","implied","createElement","className","overflowItem","overflowItemSelected","overflowItemDisabled","onClick"],"sources":["OverflowItem.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 classnames from \"classnames\";\nimport React from \"react\";\nimport type { MarkingSelectionState } from \"../types.js\";\nimport styles from \"./OverflowItem.module.css\";\nimport {\n getDisplayLabel,\n isDisallowed,\n isImplied,\n} from \"./selectionStateHelpers.js\";\n\nexport interface OverflowItemProps {\n id: string;\n label: string;\n selectionState: MarkingSelectionState;\n disabled?: boolean;\n onToggle: (markingId: string) => void;\n}\n\nexport const OverflowItem: React.MemoExoticComponent<\n (props: OverflowItemProps) => React.ReactElement\n> = React.memo(function OverflowItem({\n id,\n label,\n selectionState,\n disabled,\n onToggle,\n}: OverflowItemProps): React.ReactElement {\n const handleClick = React.useCallback(() => {\n onToggle(id);\n }, [onToggle, id]);\n\n const disallowed = isDisallowed(selectionState);\n const isSelected = selectionState === \"SELECTED\";\n const implied = isImplied(selectionState);\n\n return (\n <Button\n className={classnames(\n styles.overflowItem,\n (isSelected || implied) && styles.overflowItemSelected,\n disallowed && styles.overflowItemDisabled,\n )}\n onClick={handleClick}\n disabled={disabled ?? disallowed}\n aria-pressed={isSelected || implied}\n >\n {getDisplayLabel(label, selectionState)}\n </Button>\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,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,2BAA2B;AAC9C,SACEC,eAAe,EACfC,YAAY,EACZC,SAAS,QACJ,4BAA4B;AAUnC,OAAO,MAAMC,YAEZ,gBAAGL,KAAK,CAACM,IAAI,CAAC,UAAsB;EACnCC,EAAE;EACFC,KAAK;EACLC,cAAc;EACdC,QAAQ;EACRC;AACiB,CAAC,EAAsB;EACxC,MAAMC,WAAW,GAAGZ,KAAK,CAACa,WAAW,CAAC,MAAM;IAC1CF,QAAQ,CAACJ,EAAE,CAAC;EACd,CAAC,EAAE,CAACI,QAAQ,EAAEJ,EAAE,CAAC,CAAC;EAElB,MAAMO,UAAU,GAAGX,YAAY,CAACM,cAAc,CAAC;EAC/C,MAAMM,UAAU,GAAGN,cAAc,KAAK,UAAU;EAChD,MAAMO,OAAO,GAAGZ,SAAS,CAACK,cAAc,CAAC;EAEzC,oBACET,KAAA,CAAAiB,aAAA,CAACnB,MAAM;IACLoB,SAAS,EAAEnB,UAAU,CACnBE,MAAM,CAACkB,YAAY,EACnB,CAACJ,UAAU,IAAIC,OAAO,KAAKf,MAAM,CAACmB,oBAAoB,EACtDN,UAAU,IAAIb,MAAM,CAACoB,oBACvB,CAAE;IACFC,OAAO,EAAEV,WAAY;IACrBF,QAAQ,EAAEA,QAAQ,IAAII,UAAW;IACjC,gBAAcC,UAAU,IAAIC;EAAQ,GAEnCd,eAAe,CAACM,KAAK,EAAEC,cAAc,CAChC,CAAC;AAEb,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
.overflowItem {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
width: 100%;
|
|
21
|
+
text-align: left;
|
|
22
|
+
padding: var(--osdk-surface-spacing)
|
|
23
|
+
calc(var(--osdk-surface-spacing) * 1.5);
|
|
24
|
+
font-size: var(--osdk-cbac-overflow-button-font-size);
|
|
25
|
+
font-family: inherit;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
border: none;
|
|
28
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
29
|
+
color: var(--osdk-cbac-marking-button-color-default);
|
|
30
|
+
background: transparent;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.overflowItem:hover:not(:disabled) {
|
|
34
|
+
background: var(--osdk-surface-background-color-default-hover);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.overflowItem:focus-visible {
|
|
38
|
+
outline: var(--osdk-focus-outline);
|
|
39
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.overflowItemSelected {
|
|
43
|
+
color: var(--osdk-intent-primary-rest);
|
|
44
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.overflowItemDisabled {
|
|
48
|
+
color: var(--osdk-cbac-marking-button-color-disallowed);
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
opacity: var(--osdk-cbac-disabled-opacity);
|
|
51
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// CSS Module proxy for OverflowItem.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"overflowItem": "OverflowItem-module__overflowItem___VAefeIsF",
|
|
4
|
+
"overflowItemSelected": "OverflowItem-module__overflowItemSelected___5UNc9Ql9",
|
|
5
|
+
"overflowItemDisabled": "OverflowItem-module__overflowItemDisabled___UKHy9SIU"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default styles;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { WarningSign } from "@blueprintjs/icons";
|
|
18
|
+
import classnames from "classnames";
|
|
19
|
+
import React from "react";
|
|
20
|
+
import styles from "./ValidationWarning.module.css.js";
|
|
21
|
+
export function ValidationWarning({
|
|
22
|
+
requiredMarkingGroups,
|
|
23
|
+
className
|
|
24
|
+
}) {
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: classnames(styles.validationWarning, className)
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: styles.header
|
|
29
|
+
}, /*#__PURE__*/React.createElement(WarningSign, {
|
|
30
|
+
className: styles.icon,
|
|
31
|
+
size: 14
|
|
32
|
+
}), /*#__PURE__*/React.createElement("span", null, "To complete a valid classification, at least one marking from each of the following sets needs to be selected:")), /*#__PURE__*/React.createElement("ol", {
|
|
33
|
+
className: styles.groupList
|
|
34
|
+
}, requiredMarkingGroups.map((group, index) => /*#__PURE__*/React.createElement("li", {
|
|
35
|
+
key: group.markingNames.join(","),
|
|
36
|
+
className: styles.groupItem
|
|
37
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
38
|
+
className: styles.groupNumber
|
|
39
|
+
}, index + 1, "."), group.markingNames.map(name => /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
key: name,
|
|
41
|
+
className: styles.chip
|
|
42
|
+
}, name))))));
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ValidationWarning.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidationWarning.js","names":["WarningSign","classnames","React","styles","ValidationWarning","requiredMarkingGroups","className","createElement","validationWarning","header","icon","size","groupList","map","group","index","key","markingNames","join","groupItem","groupNumber","name","chip"],"sources":["ValidationWarning.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 { WarningSign } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport type { RequiredMarkingGroup } from \"../types.js\";\nimport styles from \"./ValidationWarning.module.css\";\n\nexport interface ValidationWarningProps {\n requiredMarkingGroups: ReadonlyArray<RequiredMarkingGroup>;\n className?: string;\n}\n\nexport function ValidationWarning({\n requiredMarkingGroups,\n className,\n}: ValidationWarningProps): React.ReactElement {\n return (\n <div className={classnames(styles.validationWarning, className)}>\n <div className={styles.header}>\n <WarningSign className={styles.icon} size={14} />\n <span>\n To complete a valid classification, at least one marking from each of\n the following sets needs to be selected:\n </span>\n </div>\n <ol className={styles.groupList}>\n {requiredMarkingGroups.map((group, index) => (\n <li key={group.markingNames.join(\",\")} className={styles.groupItem}>\n <span className={styles.groupNumber}>{index + 1}.</span>\n {group.markingNames.map((name) => (\n <span key={name} className={styles.chip}>{name}</span>\n ))}\n </li>\n ))}\n </ol>\n </div>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,oBAAoB;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAOC,MAAM,MAAM,gCAAgC;AAOnD,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,qBAAqB;EACrBC;AACsB,CAAC,EAAsB;EAC7C,oBACEJ,KAAA,CAAAK,aAAA;IAAKD,SAAS,EAAEL,UAAU,CAACE,MAAM,CAACK,iBAAiB,EAAEF,SAAS;EAAE,gBAC9DJ,KAAA,CAAAK,aAAA;IAAKD,SAAS,EAAEH,MAAM,CAACM;EAAO,gBAC5BP,KAAA,CAAAK,aAAA,CAACP,WAAW;IAACM,SAAS,EAAEH,MAAM,CAACO,IAAK;IAACC,IAAI,EAAE;EAAG,CAAE,CAAC,eACjDT,KAAA,CAAAK,aAAA,eAAM,gHAGA,CACH,CAAC,eACNL,KAAA,CAAAK,aAAA;IAAID,SAAS,EAAEH,MAAM,CAACS;EAAU,GAC7BP,qBAAqB,CAACQ,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,kBACtCb,KAAA,CAAAK,aAAA;IAAIS,GAAG,EAAEF,KAAK,CAACG,YAAY,CAACC,IAAI,CAAC,GAAG,CAAE;IAACZ,SAAS,EAAEH,MAAM,CAACgB;EAAU,gBACjEjB,KAAA,CAAAK,aAAA;IAAMD,SAAS,EAAEH,MAAM,CAACiB;EAAY,GAAEL,KAAK,GAAG,CAAC,EAAC,GAAO,CAAC,EACvDD,KAAK,CAACG,YAAY,CAACJ,GAAG,CAAEQ,IAAI,iBAC3BnB,KAAA,CAAAK,aAAA;IAAMS,GAAG,EAAEK,IAAK;IAACf,SAAS,EAAEH,MAAM,CAACmB;EAAK,GAAED,IAAW,CACtD,CACC,CACL,CACC,CACD,CAAC;AAEV","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
.validationWarning {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
21
|
+
padding: var(--osdk-cbac-validation-warning-padding);
|
|
22
|
+
background: var(--osdk-cbac-validation-warning-bg);
|
|
23
|
+
color: var(--osdk-cbac-validation-warning-color);
|
|
24
|
+
font-size: var(--osdk-cbac-validation-warning-font-size);
|
|
25
|
+
border-radius: var(--osdk-cbac-validation-warning-border-radius);
|
|
26
|
+
max-height: var(--osdk-cbac-validation-warning-max-height);
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.header {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: calc(var(--osdk-surface-spacing) * 1.5);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.icon {
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.groupList {
|
|
41
|
+
list-style: none;
|
|
42
|
+
margin: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
padding-left: calc(var(--osdk-surface-spacing) * 3);
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: var(--osdk-surface-spacing);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.groupItem {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
gap: var(--osdk-surface-spacing);
|
|
54
|
+
flex-wrap: wrap;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.groupNumber {
|
|
58
|
+
font-weight: var(--osdk-typography-weight-bold);
|
|
59
|
+
flex-shrink: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.chip {
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: 0 var(--osdk-surface-spacing);
|
|
66
|
+
border: 1px solid var(--osdk-cbac-validation-warning-chip-border-color);
|
|
67
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
68
|
+
background: var(--osdk-cbac-validation-warning-chip-bg);
|
|
69
|
+
font-size: var(--osdk-cbac-validation-warning-font-size);
|
|
70
|
+
color: var(--osdk-typography-color-default-rest);
|
|
71
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// CSS Module proxy for ValidationWarning.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"validationWarning": "ValidationWarning-module__validationWarning___oADBKhG-",
|
|
4
|
+
"header": "ValidationWarning-module__header___ylq-kIOW",
|
|
5
|
+
"icon": "ValidationWarning-module__icon___PuGol1EB",
|
|
6
|
+
"groupList": "ValidationWarning-module__groupList___ua5t3Rm2",
|
|
7
|
+
"groupItem": "ValidationWarning-module__groupItem___0BGH5HxZ",
|
|
8
|
+
"groupNumber": "ValidationWarning-module__groupNumber___rTdfnH3f",
|
|
9
|
+
"chip": "ValidationWarning-module__chip___3EH1UeL0"
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default styles;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
export function isDisallowed(state) {
|
|
18
|
+
return state === "DISALLOWED" || state === "IMPLIED_DISALLOWED";
|
|
19
|
+
}
|
|
20
|
+
export function isImplied(state) {
|
|
21
|
+
return state === "IMPLIED" || state === "IMPLIED_DISALLOWED";
|
|
22
|
+
}
|
|
23
|
+
export function getDisplayLabel(label, state) {
|
|
24
|
+
return isImplied(state) ? `(${label})` : label;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=selectionStateHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionStateHelpers.js","names":["isDisallowed","state","isImplied","getDisplayLabel","label"],"sources":["selectionStateHelpers.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 type { MarkingSelectionState } from \"../types.js\";\n\nexport function isDisallowed(state: MarkingSelectionState): boolean {\n return state === \"DISALLOWED\" || state === \"IMPLIED_DISALLOWED\";\n}\n\nexport function isImplied(state: MarkingSelectionState): boolean {\n return state === \"IMPLIED\" || state === \"IMPLIED_DISALLOWED\";\n}\n\nexport function getDisplayLabel(\n label: string,\n state: MarkingSelectionState,\n): string {\n return isImplied(state) ? `(${label})` : label;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,SAASA,YAAYA,CAACC,KAA4B,EAAW;EAClE,OAAOA,KAAK,KAAK,YAAY,IAAIA,KAAK,KAAK,oBAAoB;AACjE;AAEA,OAAO,SAASC,SAASA,CAACD,KAA4B,EAAW;EAC/D,OAAOA,KAAK,KAAK,SAAS,IAAIA,KAAK,KAAK,oBAAoB;AAC9D;AAEA,OAAO,SAASE,eAAeA,CAC7BC,KAAa,EACbH,KAA4B,EACpB;EACR,OAAOC,SAAS,CAACD,KAAK,CAAC,GAAG,IAAIG,KAAK,GAAG,GAAGA,KAAK;AAChD","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["types.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\nexport type MarkingSelectionState =\n | \"SELECTED\"\n | \"IMPLIED\"\n | \"DISALLOWED\"\n | \"IMPLIED_DISALLOWED\";\n\nexport interface CbacBannerData {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n markingIds: string[];\n}\n\nexport interface PickerMarkingCategory {\n id: string;\n name: string;\n description: string;\n categoryType: \"CONJUNCTIVE\" | \"DISJUNCTIVE\";\n markingType: \"MANDATORY\" | \"CBAC\";\n}\n\nexport interface PickerMarking {\n id: string;\n categoryId: string;\n name: string;\n description?: string;\n}\n\nexport interface CategoryMarkingGroup {\n category: PickerMarkingCategory;\n markings: PickerMarking[];\n}\n\nexport interface RequiredMarkingGroup {\n markingNames: string[];\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["types.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\nexport type MarkingSelectionState =\n | \"NONE\"\n | \"SELECTED\"\n | \"IMPLIED\"\n | \"DISALLOWED\"\n | \"IMPLIED_DISALLOWED\";\n\nexport interface CbacBannerData {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n markingIds: string[];\n}\n\nexport interface PickerMarkingCategory {\n id: string;\n name: string;\n description: string;\n categoryType: \"CONJUNCTIVE\" | \"DISJUNCTIVE\";\n markingType: \"MANDATORY\" | \"CBAC\";\n}\n\nexport interface PickerMarking {\n id: string;\n categoryId: string;\n name: string;\n description?: string;\n}\n\nexport interface CategoryMarkingGroup {\n category: PickerMarkingCategory;\n markings: PickerMarking[];\n}\n\nexport interface RequiredMarkingGroup {\n markingNames: string[];\n}\n"],"mappings":"","ignoreList":[]}
|