@osdk/cbac-components 0.1.0-beta.0 → 0.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/build/browser/cbac-picker/base/CategoryMarkingGroup.js +80 -0
  3. package/build/browser/cbac-picker/base/CategoryMarkingGroup.js.map +1 -0
  4. package/build/browser/cbac-picker/base/CategoryMarkingGroup.module.css +44 -0
  5. package/build/browser/cbac-picker/base/CategoryMarkingGroup.module.css.js +9 -0
  6. package/build/browser/cbac-picker/base/InfoBanner.js +32 -0
  7. package/build/browser/cbac-picker/base/InfoBanner.js.map +1 -0
  8. package/build/browser/cbac-picker/base/InfoBanner.module.css +30 -0
  9. package/build/browser/cbac-picker/base/InfoBanner.module.css.js +7 -0
  10. package/build/browser/cbac-picker/base/MarkingButton.js +42 -0
  11. package/build/browser/cbac-picker/base/MarkingButton.js.map +1 -0
  12. package/build/browser/cbac-picker/base/MarkingButton.module.css +76 -0
  13. package/build/browser/cbac-picker/base/MarkingButton.module.css.js +10 -0
  14. package/build/browser/cbac-picker/base/OverflowButton.js +50 -0
  15. package/build/browser/cbac-picker/base/OverflowButton.js.map +1 -0
  16. package/build/browser/cbac-picker/base/OverflowButton.module.css +57 -0
  17. package/build/browser/cbac-picker/base/OverflowButton.module.css.js +8 -0
  18. package/build/browser/cbac-picker/base/OverflowItem.js +42 -0
  19. package/build/browser/cbac-picker/base/OverflowItem.js.map +1 -0
  20. package/build/browser/cbac-picker/base/OverflowItem.module.css +51 -0
  21. package/build/browser/cbac-picker/base/OverflowItem.module.css.js +8 -0
  22. package/build/browser/cbac-picker/base/ValidationWarning.js +44 -0
  23. package/build/browser/cbac-picker/base/ValidationWarning.js.map +1 -0
  24. package/build/browser/cbac-picker/base/ValidationWarning.module.css +71 -0
  25. package/build/browser/cbac-picker/base/ValidationWarning.module.css.js +12 -0
  26. package/build/browser/cbac-picker/base/selectionStateHelpers.js +26 -0
  27. package/build/browser/cbac-picker/base/selectionStateHelpers.js.map +1 -0
  28. package/build/browser/cbac-picker/types.js +2 -0
  29. package/build/browser/cbac-picker/types.js.map +1 -0
  30. package/build/browser/cbac-picker/utils/cbacPickerUtils.js +37 -0
  31. package/build/browser/cbac-picker/utils/cbacPickerUtils.js.map +1 -0
  32. package/build/browser/cbac-picker/utils/selectionLogic.js +91 -0
  33. package/build/browser/cbac-picker/utils/selectionLogic.js.map +1 -0
  34. package/build/browser/public/experimental.js +3 -1
  35. package/build/browser/public/experimental.js.map +1 -1
  36. package/build/browser/styles.css +347 -0
  37. package/build/cjs/public/experimental.cjs +76 -0
  38. package/build/cjs/public/experimental.cjs.map +1 -1
  39. package/build/cjs/public/experimental.d.cts +32 -1
  40. package/build/esm/cbac-picker/base/CategoryMarkingGroup.js +80 -0
  41. package/build/esm/cbac-picker/base/CategoryMarkingGroup.js.map +1 -0
  42. package/build/esm/cbac-picker/base/CategoryMarkingGroup.module.css +44 -0
  43. package/build/esm/cbac-picker/base/InfoBanner.js +32 -0
  44. package/build/esm/cbac-picker/base/InfoBanner.js.map +1 -0
  45. package/build/esm/cbac-picker/base/InfoBanner.module.css +30 -0
  46. package/build/esm/cbac-picker/base/MarkingButton.js +42 -0
  47. package/build/esm/cbac-picker/base/MarkingButton.js.map +1 -0
  48. package/build/esm/cbac-picker/base/MarkingButton.module.css +76 -0
  49. package/build/esm/cbac-picker/base/OverflowButton.js +50 -0
  50. package/build/esm/cbac-picker/base/OverflowButton.js.map +1 -0
  51. package/build/esm/cbac-picker/base/OverflowButton.module.css +57 -0
  52. package/build/esm/cbac-picker/base/OverflowItem.js +42 -0
  53. package/build/esm/cbac-picker/base/OverflowItem.js.map +1 -0
  54. package/build/esm/cbac-picker/base/OverflowItem.module.css +51 -0
  55. package/build/esm/cbac-picker/base/ValidationWarning.js +44 -0
  56. package/build/esm/cbac-picker/base/ValidationWarning.js.map +1 -0
  57. package/build/esm/cbac-picker/base/ValidationWarning.module.css +71 -0
  58. package/build/esm/cbac-picker/base/selectionStateHelpers.js +26 -0
  59. package/build/esm/cbac-picker/base/selectionStateHelpers.js.map +1 -0
  60. package/build/esm/cbac-picker/types.js +2 -0
  61. package/build/esm/cbac-picker/types.js.map +1 -0
  62. package/build/esm/cbac-picker/utils/cbacPickerUtils.js +37 -0
  63. package/build/esm/cbac-picker/utils/cbacPickerUtils.js.map +1 -0
  64. package/build/esm/cbac-picker/utils/selectionLogic.js +91 -0
  65. package/build/esm/cbac-picker/utils/selectionLogic.js.map +1 -0
  66. package/build/esm/public/experimental.js +3 -1
  67. package/build/esm/public/experimental.js.map +1 -1
  68. package/build/types/cbac-picker/base/CategoryMarkingGroup.d.ts +13 -0
  69. package/build/types/cbac-picker/base/CategoryMarkingGroup.d.ts.map +1 -0
  70. package/build/types/cbac-picker/base/InfoBanner.d.ts +6 -0
  71. package/build/types/cbac-picker/base/InfoBanner.d.ts.map +1 -0
  72. package/build/types/cbac-picker/base/MarkingButton.d.ts +9 -0
  73. package/build/types/cbac-picker/base/MarkingButton.d.ts.map +1 -0
  74. package/build/types/cbac-picker/base/OverflowButton.d.ts +13 -0
  75. package/build/types/cbac-picker/base/OverflowButton.d.ts.map +1 -0
  76. package/build/types/cbac-picker/base/OverflowItem.d.ts +10 -0
  77. package/build/types/cbac-picker/base/OverflowItem.d.ts.map +1 -0
  78. package/build/types/cbac-picker/base/ValidationWarning.d.ts +7 -0
  79. package/build/types/cbac-picker/base/ValidationWarning.d.ts.map +1 -0
  80. package/build/types/cbac-picker/base/selectionStateHelpers.d.ts +4 -0
  81. package/build/types/cbac-picker/base/selectionStateHelpers.d.ts.map +1 -0
  82. package/build/types/cbac-picker/types.d.ts +27 -0
  83. package/build/types/cbac-picker/types.d.ts.map +1 -0
  84. package/build/types/cbac-picker/utils/cbacPickerUtils.d.ts +10 -0
  85. package/build/types/cbac-picker/utils/cbacPickerUtils.d.ts.map +1 -0
  86. package/build/types/cbac-picker/utils/selectionLogic.d.ts +4 -0
  87. package/build/types/cbac-picker/utils/selectionLogic.d.ts.map +1 -0
  88. package/build/types/public/experimental.d.ts +2 -1
  89. package/build/types/public/experimental.d.ts.map +1 -1
  90. package/package.json +3 -3
@@ -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";
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,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";
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,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";
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,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";
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,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":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +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 | \"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":[]}
@@ -0,0 +1,37 @@
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
+ const UNMARKED_BACKGROUND_COLORS = ["#8F99A8"];
18
+ const UNMARKED_TEXT_COLOR = "#FFFFFF";
19
+ const UNMARKED_CLASSIFICATION_STRING = "UNMARKED";
20
+ export const EMPTY_ARRAY = [];
21
+ export function backgroundFromColors(backgroundColors) {
22
+ return backgroundColors.length > 1 ? `linear-gradient(to right, ${backgroundColors.join(", ")})` : backgroundColors[0] ?? "transparent";
23
+ }
24
+ export function resolveBannerDisplay(banner) {
25
+ return {
26
+ classificationString: banner?.classificationString ?? UNMARKED_CLASSIFICATION_STRING,
27
+ textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,
28
+ backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS
29
+ };
30
+ }
31
+ export function resolveRequiredGroups(categoryGroups, requiredMarkingGroups) {
32
+ const markingIdToName = new Map(categoryGroups.flatMap(g => g.markings).map(m => [m.id, m.name]));
33
+ return requiredMarkingGroups.map(ids => ({
34
+ markingNames: ids.map(id => markingIdToName.get(id) ?? id)
35
+ }));
36
+ }
37
+ //# sourceMappingURL=cbacPickerUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cbacPickerUtils.js","names":["UNMARKED_BACKGROUND_COLORS","UNMARKED_TEXT_COLOR","UNMARKED_CLASSIFICATION_STRING","EMPTY_ARRAY","backgroundFromColors","backgroundColors","length","join","resolveBannerDisplay","banner","classificationString","textColor","resolveRequiredGroups","categoryGroups","requiredMarkingGroups","markingIdToName","Map","flatMap","g","markings","map","m","id","name","ids","markingNames","get"],"sources":["cbacPickerUtils.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 {\n CategoryMarkingGroup,\n CbacBannerData,\n RequiredMarkingGroup,\n} from \"../types.js\";\nconst UNMARKED_BACKGROUND_COLORS: string[] = [\"#8F99A8\"];\nconst UNMARKED_TEXT_COLOR = \"#FFFFFF\";\nconst UNMARKED_CLASSIFICATION_STRING = \"UNMARKED\";\n\nexport const EMPTY_ARRAY: string[] = [];\n\nexport function backgroundFromColors(backgroundColors: string[]): string {\n return backgroundColors.length > 1\n ? `linear-gradient(to right, ${backgroundColors.join(\", \")})`\n : backgroundColors[0] ?? \"transparent\";\n}\n\nexport interface ResolvedBannerDisplay {\n classificationString: string;\n textColor: string;\n backgroundColors: string[];\n}\n\nexport function resolveBannerDisplay(\n banner: CbacBannerData | undefined,\n): ResolvedBannerDisplay {\n return {\n classificationString: banner?.classificationString\n ?? UNMARKED_CLASSIFICATION_STRING,\n textColor: banner?.textColor ?? UNMARKED_TEXT_COLOR,\n backgroundColors: banner?.backgroundColors ?? UNMARKED_BACKGROUND_COLORS,\n };\n}\n\nexport function resolveRequiredGroups(\n categoryGroups: CategoryMarkingGroup[],\n requiredMarkingGroups: string[][],\n): RequiredMarkingGroup[] {\n const markingIdToName = new Map(\n categoryGroups.flatMap((g) => g.markings).map((m) =>\n [m.id, m.name] as const\n ),\n );\n return requiredMarkingGroups.map((ids) => ({\n markingNames: ids.map((id) => markingIdToName.get(id) ?? id),\n }));\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,MAAMA,0BAAoC,GAAG,CAAC,SAAS,CAAC;AACxD,MAAMC,mBAAmB,GAAG,SAAS;AACrC,MAAMC,8BAA8B,GAAG,UAAU;AAEjD,OAAO,MAAMC,WAAqB,GAAG,EAAE;AAEvC,OAAO,SAASC,oBAAoBA,CAACC,gBAA0B,EAAU;EACvE,OAAOA,gBAAgB,CAACC,MAAM,GAAG,CAAC,GAC9B,6BAA6BD,gBAAgB,CAACE,IAAI,CAAC,IAAI,CAAC,GAAG,GAC3DF,gBAAgB,CAAC,CAAC,CAAC,IAAI,aAAa;AAC1C;AAQA,OAAO,SAASG,oBAAoBA,CAClCC,MAAkC,EACX;EACvB,OAAO;IACLC,oBAAoB,EAAED,MAAM,EAAEC,oBAAoB,IAC7CR,8BAA8B;IACnCS,SAAS,EAAEF,MAAM,EAAEE,SAAS,IAAIV,mBAAmB;IACnDI,gBAAgB,EAAEI,MAAM,EAAEJ,gBAAgB,IAAIL;EAChD,CAAC;AACH;AAEA,OAAO,SAASY,qBAAqBA,CACnCC,cAAsC,EACtCC,qBAAiC,EACT;EACxB,MAAMC,eAAe,GAAG,IAAIC,GAAG,CAC7BH,cAAc,CAACI,OAAO,CAAEC,CAAC,IAAKA,CAAC,CAACC,QAAQ,CAAC,CAACC,GAAG,CAAEC,CAAC,IAC9C,CAACA,CAAC,CAACC,EAAE,EAAED,CAAC,CAACE,IAAI,CACf,CACF,CAAC;EACD,OAAOT,qBAAqB,CAACM,GAAG,CAAEI,GAAG,KAAM;IACzCC,YAAY,EAAED,GAAG,CAACJ,GAAG,CAAEE,EAAE,IAAKP,eAAe,CAACW,GAAG,CAACJ,EAAE,CAAC,IAAIA,EAAE;EAC7D,CAAC,CAAC,CAAC;AACL","ignoreList":[]}