@osdk/react-components 0.2.0-beta.1 → 0.2.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 +35 -0
- package/README.md +21 -5
- package/build/browser/base-components/action-button/ActionButton.js +31 -0
- package/build/browser/base-components/action-button/ActionButton.js.map +1 -0
- package/build/browser/base-components/action-button/ActionButton.module.css +70 -0
- package/build/browser/base-components/action-button/ActionButton.module.css.js +8 -0
- package/build/browser/base-components/checkbox/Checkbox.js +27 -32
- package/build/browser/base-components/checkbox/Checkbox.module.css +79 -0
- package/build/browser/base-components/checkbox/Checkbox.module.css.js +7 -0
- package/build/browser/base-components/combobox/Combobox.js +124 -0
- package/build/browser/base-components/combobox/Combobox.js.map +1 -0
- package/build/browser/base-components/combobox/Combobox.module.css +177 -0
- package/build/browser/base-components/combobox/Combobox.module.css.js +16 -0
- package/build/browser/base-components/dialog/Dialog.js +52 -0
- package/build/browser/base-components/dialog/Dialog.js.map +1 -0
- package/build/browser/base-components/dialog/Dialog.module.css +101 -0
- package/build/browser/base-components/dialog/Dialog.module.css.js +13 -0
- package/build/browser/base-components/draggable-list/DraggableList.js +155 -0
- package/build/browser/base-components/draggable-list/DraggableList.js.map +1 -0
- package/build/browser/base-components/draggable-list/DraggableList.module.css +108 -0
- package/build/browser/base-components/draggable-list/DraggableList.module.css.js +11 -0
- package/build/browser/base-components/search-bar/SearchBar.js +44 -0
- package/build/browser/base-components/search-bar/SearchBar.js.map +1 -0
- package/build/browser/base-components/search-bar/SearchBar.module.css +53 -0
- package/build/browser/base-components/search-bar/SearchBar.module.css.js +8 -0
- package/build/browser/base-components/select/Select.js +89 -0
- package/build/browser/base-components/select/Select.js.map +1 -0
- package/build/browser/base-components/select/Select.module.css +138 -0
- package/build/browser/base-components/select/Select.module.css.js +11 -0
- package/build/browser/base-components/switch/Switch.js +33 -0
- package/build/browser/base-components/switch/Switch.js.map +1 -0
- package/build/browser/base-components/switch/Switch.module.css +91 -0
- package/build/browser/base-components/switch/Switch.module.css.js +7 -0
- package/build/browser/filter-list/FilterListApi.js.map +1 -1
- package/build/browser/filter-list/FilterListItemApi.js.map +1 -1
- package/build/browser/filter-list/__tests__/filterStateToWhereClause.test.js +296 -0
- package/build/browser/filter-list/__tests__/filterStateToWhereClause.test.js.map +1 -0
- package/build/browser/filter-list/__tests__/getFilterKey.test.js +53 -0
- package/build/browser/filter-list/__tests__/getFilterKey.test.js.map +1 -0
- package/build/browser/filter-list/__tests__/testUtils.js +192 -0
- package/build/browser/filter-list/__tests__/testUtils.js.map +1 -0
- package/build/browser/filter-list/hooks/__tests__/useFilterListState.test.js +128 -0
- package/build/browser/filter-list/hooks/__tests__/useFilterListState.test.js.map +1 -0
- package/build/browser/filter-list/hooks/useDebouncedValue.js +52 -0
- package/build/browser/filter-list/hooks/useDebouncedValue.js.map +1 -0
- package/build/browser/filter-list/hooks/useFilterListState.js +119 -0
- package/build/browser/filter-list/hooks/useFilterListState.js.map +1 -0
- package/build/browser/filter-list/hooks/usePropertyAggregation.js +92 -0
- package/build/browser/filter-list/hooks/usePropertyAggregation.js.map +1 -0
- package/build/browser/filter-list/types/AddFilterMenuTypes.js +2 -0
- package/build/browser/filter-list/types/AddFilterMenuTypes.js.map +1 -0
- package/build/browser/filter-list/types/CustomRendererTypes.js +2 -0
- package/build/browser/filter-list/types/CustomRendererTypes.js.map +1 -0
- package/build/browser/filter-list/types/KeywordSearchTypes.js +2 -0
- package/build/browser/filter-list/types/KeywordSearchTypes.js.map +1 -0
- package/build/browser/filter-list/types/LinkedFilterTypes.js +2 -0
- package/build/browser/filter-list/types/LinkedFilterTypes.js.map +1 -0
- package/build/browser/filter-list/types/index.js +21 -0
- package/build/browser/filter-list/types/index.js.map +1 -0
- package/build/browser/filter-list/utils/assertUnreachable.js +25 -0
- package/build/browser/filter-list/utils/assertUnreachable.js.map +1 -0
- package/build/browser/filter-list/utils/coerceFilterValue.js +33 -0
- package/build/browser/filter-list/utils/coerceFilterValue.js.map +1 -0
- package/build/browser/filter-list/utils/filterStateToWhereClause.js +337 -0
- package/build/browser/filter-list/utils/filterStateToWhereClause.js.map +1 -0
- package/build/browser/filter-list/utils/filterValues.js +55 -0
- package/build/browser/filter-list/utils/filterValues.js.map +1 -0
- package/build/browser/filter-list/utils/getFilterKey.js +34 -0
- package/build/browser/filter-list/utils/getFilterKey.js.map +1 -0
- package/build/browser/object-table/CellContextMenu.js +23 -20
- package/build/browser/object-table/CellContextMenu.module.css +20 -0
- package/build/browser/object-table/CellContextMenu.module.css.js +6 -0
- package/build/browser/object-table/ColumnConfigDialog.js +259 -0
- package/build/browser/object-table/ColumnConfigDialog.js.map +1 -0
- package/build/browser/object-table/ColumnConfigDialog.module.css +247 -0
- package/build/browser/object-table/ColumnConfigDialog.module.css.js +29 -0
- package/build/browser/object-table/LoadingCell.js +24 -29
- package/build/browser/object-table/LoadingCell.module.css +48 -0
- package/build/browser/object-table/LoadingCell.module.css.js +8 -0
- package/build/browser/object-table/LoadingRow.js +24 -50
- package/build/browser/object-table/LoadingStateTable.js +49 -343
- package/build/browser/object-table/LoadingStateTable.js.map +1 -1
- package/build/browser/object-table/MultiColumnSortDialog.js +178 -0
- package/build/browser/object-table/MultiColumnSortDialog.js.map +1 -0
- package/build/browser/object-table/MultiColumnSortDialog.module.css +195 -0
- package/build/browser/object-table/MultiColumnSortDialog.module.css.js +22 -0
- package/build/browser/object-table/NonIdealState.js +23 -20
- package/build/browser/object-table/NonIdealState.module.css +27 -0
- package/build/browser/object-table/NonIdealState.module.css.js +7 -0
- package/build/browser/object-table/ObjectTable.js +43 -13
- package/build/browser/object-table/ObjectTable.js.map +1 -1
- package/build/browser/object-table/ObjectTableApi.js.map +1 -1
- package/build/browser/object-table/SortableItemsList.js +35 -0
- package/build/browser/object-table/SortableItemsList.js.map +1 -0
- package/build/browser/object-table/Table.js +54 -934
- package/build/browser/object-table/Table.js.map +1 -1
- package/build/browser/object-table/Table.module.css +29 -0
- package/build/browser/object-table/Table.module.css.js +6 -0
- package/build/browser/object-table/TableBody.js +36 -260
- package/build/browser/object-table/TableBody.module.css +20 -0
- package/build/browser/object-table/TableBody.module.css.js +6 -0
- package/build/browser/object-table/TableCell.js +31 -111
- package/build/browser/object-table/TableCell.module.css +73 -0
- package/build/browser/object-table/TableCell.module.css.js +8 -0
- package/build/browser/object-table/TableHeader.js +126 -216
- package/build/browser/object-table/TableHeader.js.map +1 -1
- package/build/browser/object-table/TableHeader.module.css +106 -0
- package/build/browser/object-table/TableHeader.module.css.js +10 -0
- package/build/browser/object-table/TableHeaderContent.js +21 -18
- package/build/browser/object-table/TableHeaderContent.module.css +30 -0
- package/build/browser/object-table/TableHeaderContent.module.css.js +6 -0
- package/build/browser/object-table/TableHeaderWithPopover.js +110 -93
- package/build/browser/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/browser/object-table/TableHeaderWithPopover.module.css +141 -0
- package/build/browser/object-table/TableHeaderWithPopover.module.css.js +17 -0
- package/build/browser/object-table/TableRow.js +26 -144
- package/build/browser/object-table/TableRow.module.css +60 -0
- package/build/browser/object-table/TableRow.module.css.js +6 -0
- package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js +160 -138
- package/build/browser/object-table/hooks/__tests__/useColumnVisibility.test.js.map +1 -1
- package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js +3 -0
- package/build/browser/object-table/hooks/__tests__/useRowSelection.test.js.map +1 -1
- package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js +27 -82
- package/build/browser/object-table/hooks/__tests__/useSelectionColumn.test.js.map +1 -1
- package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js +290 -0
- package/build/browser/object-table/hooks/__tests__/useTableSorting.test.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnDefs.js +7 -2
- package/build/browser/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/browser/object-table/hooks/useColumnResize.js +45 -0
- package/build/browser/object-table/hooks/useColumnResize.js.map +1 -0
- package/build/browser/object-table/hooks/useColumnVisibility.js +52 -20
- package/build/browser/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/browser/object-table/hooks/useRowSelection.js +8 -7
- package/build/browser/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/browser/object-table/hooks/useSelectionColumn.js +15 -6
- package/build/browser/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/browser/object-table/utils/types.js +2 -0
- package/build/browser/object-table/utils/types.js.map +1 -0
- package/build/browser/public/experimental.js +1 -0
- package/build/browser/public/experimental.js.map +1 -1
- package/build/browser/styles.css +1875 -0
- package/build/cjs/public/experimental.cjs +1036 -197
- package/build/cjs/public/experimental.cjs.map +1 -1
- package/build/cjs/public/experimental.css +659 -29
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/cjs/public/experimental.d.cts +435 -44
- package/build/esm/base-components/action-button/ActionButton.js +31 -0
- package/build/esm/base-components/action-button/ActionButton.js.map +1 -0
- package/build/esm/base-components/action-button/ActionButton.module.css +70 -0
- package/build/esm/base-components/checkbox/Checkbox.module.css +1 -1
- package/build/esm/base-components/combobox/Combobox.js +124 -0
- package/build/esm/base-components/combobox/Combobox.js.map +1 -0
- package/build/esm/base-components/combobox/Combobox.module.css +177 -0
- package/build/esm/base-components/dialog/Dialog.js +52 -0
- package/build/esm/base-components/dialog/Dialog.js.map +1 -0
- package/build/esm/base-components/dialog/Dialog.module.css +101 -0
- package/build/esm/base-components/draggable-list/DraggableList.js +155 -0
- package/build/esm/base-components/draggable-list/DraggableList.js.map +1 -0
- package/build/esm/base-components/draggable-list/DraggableList.module.css +108 -0
- package/build/esm/base-components/search-bar/SearchBar.js +44 -0
- package/build/esm/base-components/search-bar/SearchBar.js.map +1 -0
- package/build/esm/base-components/search-bar/SearchBar.module.css +53 -0
- package/build/esm/base-components/select/Select.js +89 -0
- package/build/esm/base-components/select/Select.js.map +1 -0
- package/build/esm/base-components/select/Select.module.css +138 -0
- package/build/esm/base-components/switch/Switch.js +33 -0
- package/build/esm/base-components/switch/Switch.js.map +1 -0
- package/build/esm/base-components/switch/Switch.module.css +91 -0
- package/build/esm/filter-list/FilterListApi.js.map +1 -1
- package/build/esm/filter-list/FilterListItemApi.js.map +1 -1
- package/build/esm/filter-list/__tests__/filterStateToWhereClause.test.js +296 -0
- package/build/esm/filter-list/__tests__/filterStateToWhereClause.test.js.map +1 -0
- package/build/esm/filter-list/__tests__/getFilterKey.test.js +53 -0
- package/build/esm/filter-list/__tests__/getFilterKey.test.js.map +1 -0
- package/build/esm/filter-list/__tests__/testUtils.js +192 -0
- package/build/esm/filter-list/__tests__/testUtils.js.map +1 -0
- package/build/esm/filter-list/hooks/__tests__/useFilterListState.test.js +128 -0
- package/build/esm/filter-list/hooks/__tests__/useFilterListState.test.js.map +1 -0
- package/build/esm/filter-list/hooks/useDebouncedValue.js +52 -0
- package/build/esm/filter-list/hooks/useDebouncedValue.js.map +1 -0
- package/build/esm/filter-list/hooks/useFilterListState.js +119 -0
- package/build/esm/filter-list/hooks/useFilterListState.js.map +1 -0
- package/build/esm/filter-list/hooks/usePropertyAggregation.js +92 -0
- package/build/esm/filter-list/hooks/usePropertyAggregation.js.map +1 -0
- package/build/esm/filter-list/types/AddFilterMenuTypes.js +2 -0
- package/build/esm/filter-list/types/AddFilterMenuTypes.js.map +1 -0
- package/build/esm/filter-list/types/CustomRendererTypes.js +2 -0
- package/build/esm/filter-list/types/CustomRendererTypes.js.map +1 -0
- package/build/esm/filter-list/types/KeywordSearchTypes.js +2 -0
- package/build/esm/filter-list/types/KeywordSearchTypes.js.map +1 -0
- package/build/esm/filter-list/types/LinkedFilterTypes.js +2 -0
- package/build/esm/filter-list/types/LinkedFilterTypes.js.map +1 -0
- package/build/esm/filter-list/types/index.js +21 -0
- package/build/esm/filter-list/types/index.js.map +1 -0
- package/build/esm/filter-list/utils/assertUnreachable.js +25 -0
- package/build/esm/filter-list/utils/assertUnreachable.js.map +1 -0
- package/build/esm/filter-list/utils/coerceFilterValue.js +33 -0
- package/build/esm/filter-list/utils/coerceFilterValue.js.map +1 -0
- package/build/esm/filter-list/utils/filterStateToWhereClause.js +337 -0
- package/build/esm/filter-list/utils/filterStateToWhereClause.js.map +1 -0
- package/build/esm/filter-list/utils/filterValues.js +55 -0
- package/build/esm/filter-list/utils/filterValues.js.map +1 -0
- package/build/esm/filter-list/utils/getFilterKey.js +34 -0
- package/build/esm/filter-list/utils/getFilterKey.js.map +1 -0
- package/build/esm/object-table/ColumnConfigDialog.js +259 -0
- package/build/esm/object-table/ColumnConfigDialog.js.map +1 -0
- package/build/esm/object-table/ColumnConfigDialog.module.css +247 -0
- package/build/esm/object-table/LoadingStateTable.js +4 -4
- package/build/esm/object-table/LoadingStateTable.js.map +1 -1
- package/build/esm/object-table/MultiColumnSortDialog.js +178 -0
- package/build/esm/object-table/MultiColumnSortDialog.js.map +1 -0
- package/build/esm/object-table/MultiColumnSortDialog.module.css +195 -0
- package/build/esm/object-table/NonIdealState.module.css +2 -3
- package/build/esm/object-table/ObjectTable.js +43 -13
- package/build/esm/object-table/ObjectTable.js.map +1 -1
- package/build/esm/object-table/ObjectTableApi.js.map +1 -1
- package/build/esm/object-table/SortableItemsList.js +35 -0
- package/build/esm/object-table/SortableItemsList.js.map +1 -0
- package/build/esm/object-table/Table.js +9 -7
- package/build/esm/object-table/Table.js.map +1 -1
- package/build/esm/object-table/Table.module.css +9 -2
- package/build/esm/object-table/TableCell.module.css +11 -0
- package/build/esm/object-table/TableHeader.js +93 -6
- package/build/esm/object-table/TableHeader.js.map +1 -1
- package/build/esm/object-table/TableHeader.module.css +7 -2
- package/build/esm/object-table/TableHeaderWithPopover.js +53 -22
- package/build/esm/object-table/TableHeaderWithPopover.js.map +1 -1
- package/build/esm/object-table/TableHeaderWithPopover.module.css +54 -23
- package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js +160 -138
- package/build/esm/object-table/hooks/__tests__/useColumnVisibility.test.js.map +1 -1
- package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js +3 -0
- package/build/esm/object-table/hooks/__tests__/useRowSelection.test.js.map +1 -1
- package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js +27 -82
- package/build/esm/object-table/hooks/__tests__/useSelectionColumn.test.js.map +1 -1
- package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js +290 -0
- package/build/esm/object-table/hooks/__tests__/useTableSorting.test.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnDefs.js +7 -2
- package/build/esm/object-table/hooks/useColumnDefs.js.map +1 -1
- package/build/esm/object-table/hooks/useColumnResize.js +45 -0
- package/build/esm/object-table/hooks/useColumnResize.js.map +1 -0
- package/build/esm/object-table/hooks/useColumnVisibility.js +52 -20
- package/build/esm/object-table/hooks/useColumnVisibility.js.map +1 -1
- package/build/esm/object-table/hooks/useRowSelection.js +8 -7
- package/build/esm/object-table/hooks/useRowSelection.js.map +1 -1
- package/build/esm/object-table/hooks/useSelectionColumn.js +15 -6
- package/build/esm/object-table/hooks/useSelectionColumn.js.map +1 -1
- package/build/esm/object-table/utils/types.js +2 -0
- package/build/esm/object-table/utils/types.js.map +1 -0
- package/build/esm/public/experimental.js +1 -0
- package/build/esm/public/experimental.js.map +1 -1
- package/build/types/base-components/action-button/ActionButton.d.ts +5 -0
- package/build/types/base-components/action-button/ActionButton.d.ts.map +1 -0
- package/build/types/base-components/combobox/Combobox.d.ts +52 -0
- package/build/types/base-components/combobox/Combobox.d.ts.map +1 -0
- package/build/types/base-components/dialog/Dialog.d.ts +10 -0
- package/build/types/base-components/dialog/Dialog.d.ts.map +1 -0
- package/build/types/base-components/draggable-list/DraggableList.d.ts +17 -0
- package/build/types/base-components/draggable-list/DraggableList.d.ts.map +1 -0
- package/build/types/base-components/search-bar/SearchBar.d.ts +11 -0
- package/build/types/base-components/search-bar/SearchBar.d.ts.map +1 -0
- package/build/types/base-components/select/Select.d.ts +34 -0
- package/build/types/base-components/select/Select.d.ts.map +1 -0
- package/build/types/base-components/switch/Switch.d.ts +10 -0
- package/build/types/base-components/switch/Switch.d.ts.map +1 -0
- package/build/types/filter-list/FilterListApi.d.ts +63 -12
- package/build/types/filter-list/FilterListApi.d.ts.map +1 -1
- package/build/types/filter-list/FilterListItemApi.d.ts +101 -53
- package/build/types/filter-list/FilterListItemApi.d.ts.map +1 -1
- package/build/types/filter-list/__tests__/filterStateToWhereClause.test.d.ts +1 -0
- package/build/types/filter-list/__tests__/filterStateToWhereClause.test.d.ts.map +1 -0
- package/build/types/filter-list/__tests__/getFilterKey.test.d.ts +1 -0
- package/build/types/filter-list/__tests__/getFilterKey.test.d.ts.map +1 -0
- package/build/types/filter-list/__tests__/testUtils.d.ts +59 -0
- package/build/types/filter-list/__tests__/testUtils.d.ts.map +1 -0
- package/build/types/filter-list/hooks/__tests__/useFilterListState.test.d.ts +1 -0
- package/build/types/filter-list/hooks/__tests__/useFilterListState.test.d.ts.map +1 -0
- package/build/types/filter-list/hooks/useDebouncedValue.d.ts +11 -0
- package/build/types/filter-list/hooks/useDebouncedValue.d.ts.map +1 -0
- package/build/types/filter-list/hooks/useFilterListState.d.ts +11 -0
- package/build/types/filter-list/hooks/useFilterListState.d.ts.map +1 -0
- package/build/types/filter-list/hooks/usePropertyAggregation.d.ts +20 -0
- package/build/types/filter-list/hooks/usePropertyAggregation.d.ts.map +1 -0
- package/build/types/filter-list/types/AddFilterMenuTypes.d.ts +61 -0
- package/build/types/filter-list/types/AddFilterMenuTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/CustomRendererTypes.d.ts +76 -0
- package/build/types/filter-list/types/CustomRendererTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/KeywordSearchTypes.d.ts +56 -0
- package/build/types/filter-list/types/KeywordSearchTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/LinkedFilterTypes.d.ts +70 -0
- package/build/types/filter-list/types/LinkedFilterTypes.d.ts.map +1 -0
- package/build/types/filter-list/types/index.d.ts +4 -0
- package/build/types/filter-list/types/index.d.ts.map +1 -0
- package/build/types/filter-list/utils/assertUnreachable.d.ts +6 -0
- package/build/types/filter-list/utils/assertUnreachable.d.ts.map +1 -0
- package/build/types/filter-list/utils/coerceFilterValue.d.ts +11 -0
- package/build/types/filter-list/utils/coerceFilterValue.d.ts.map +1 -0
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts +16 -0
- package/build/types/filter-list/utils/filterStateToWhereClause.d.ts.map +1 -0
- package/build/types/filter-list/utils/filterValues.d.ts +5 -0
- package/build/types/filter-list/utils/filterValues.d.ts.map +1 -0
- package/build/types/filter-list/utils/getFilterKey.d.ts +3 -0
- package/build/types/filter-list/utils/getFilterKey.d.ts.map +1 -0
- package/build/types/object-table/ColumnConfigDialog.d.ts +18 -0
- package/build/types/object-table/ColumnConfigDialog.d.ts.map +1 -0
- package/build/types/object-table/LoadingStateTable.d.ts.map +1 -1
- package/build/types/object-table/MultiColumnSortDialog.d.ts +15 -0
- package/build/types/object-table/MultiColumnSortDialog.d.ts.map +1 -0
- package/build/types/object-table/ObjectTable.d.ts +1 -1
- package/build/types/object-table/ObjectTable.d.ts.map +1 -1
- package/build/types/object-table/ObjectTableApi.d.ts +41 -6
- package/build/types/object-table/ObjectTableApi.d.ts.map +1 -1
- package/build/types/object-table/SortableItemsList.d.ts +13 -0
- package/build/types/object-table/SortableItemsList.d.ts.map +1 -0
- package/build/types/object-table/Table.d.ts +12 -1
- package/build/types/object-table/Table.d.ts.map +1 -1
- package/build/types/object-table/TableHeader.d.ts +3 -1
- package/build/types/object-table/TableHeader.d.ts.map +1 -1
- package/build/types/object-table/TableHeaderWithPopover.d.ts +30 -6
- package/build/types/object-table/TableHeaderWithPopover.d.ts.map +1 -1
- package/build/types/object-table/hooks/useColumnResize.d.ts +10 -0
- package/build/types/object-table/hooks/useColumnResize.d.ts.map +1 -0
- package/build/types/object-table/hooks/useColumnVisibility.d.ts +18 -7
- package/build/types/object-table/hooks/useColumnVisibility.d.ts.map +1 -1
- package/build/types/object-table/hooks/useRowSelection.d.ts +5 -4
- package/build/types/object-table/hooks/useRowSelection.d.ts.map +1 -1
- package/build/types/object-table/utils/types.d.ts +5 -0
- package/build/types/object-table/utils/types.d.ts.map +1 -0
- package/build/types/public/experimental.d.ts +2 -0
- package/build/types/public/experimental.d.ts.map +1 -1
- package/package.json +16 -8
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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
|
+
.osdkComboboxInputWrapper {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: var(--osdk-combobox-spacing, var(--bp-surface-spacing));
|
|
21
|
+
width: 100%;
|
|
22
|
+
min-height: 30px;
|
|
23
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 1.5)
|
|
24
|
+
calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 2);
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
border-radius: var(--osdk-combobox-border-radius, var(--bp-surface-borderRadius));
|
|
27
|
+
border: var(--osdk-combobox-border-width, var(--bp-surface-borderWidth)) solid
|
|
28
|
+
var(--osdk-combobox-border-color, var(--bp-surface-borderColor-default));
|
|
29
|
+
background-color: var(--osdk-combobox-input-bg, var(--bp-surface-colorRest-default));
|
|
30
|
+
transition: border-color var(--osdk-combobox-transition-duration, var(--bp-emphasis-transitionDuration))
|
|
31
|
+
var(--osdk-combobox-transition-ease, var(--bp-emphasis-ease-default));
|
|
32
|
+
|
|
33
|
+
&:focus-within {
|
|
34
|
+
border-color: var(--osdk-combobox-focus-border-color, var(--bp-intent-primary-rest));
|
|
35
|
+
outline: var(--osdk-combobox-focus-width, var(--bp-emphasis-focusWidth)) solid
|
|
36
|
+
var(--osdk-combobox-focus-color, var(--bp-emphasis-focusColor));
|
|
37
|
+
outline-offset: var(--osdk-combobox-focus-offset, var(--bp-emphasis-focusOffset));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.osdkComboboxSearchIcon {
|
|
42
|
+
flex-shrink: 0;
|
|
43
|
+
color: var(--osdk-combobox-icon-color, var(--bp-iconography-colorMuted));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.osdkComboboxInput {
|
|
47
|
+
flex: 1;
|
|
48
|
+
min-width: 0;
|
|
49
|
+
border: none;
|
|
50
|
+
background: transparent;
|
|
51
|
+
font-family: var(--osdk-combobox-font-family, var(--bp-typography-family-default));
|
|
52
|
+
font-size: var(--osdk-combobox-font-size, var(--bp-typography-size-bodyMedium));
|
|
53
|
+
line-height: var(--osdk-combobox-line-height, var(--bp-typography-lineHeight-default));
|
|
54
|
+
color: var(--osdk-combobox-input-color, var(--bp-typography-colorRest-default));
|
|
55
|
+
outline: none;
|
|
56
|
+
|
|
57
|
+
&::placeholder {
|
|
58
|
+
color: var(--osdk-combobox-placeholder-color, var(--bp-typography-colorMuted));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.osdkComboboxPositioner {
|
|
63
|
+
z-index: var(--osdk-combobox-z-index, var(--bp-surface-zIndex-3));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.osdkComboboxPopup {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
min-width: var(--anchor-width);
|
|
70
|
+
max-height: var(--available-height);
|
|
71
|
+
overflow-y: auto;
|
|
72
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 1.5);
|
|
73
|
+
box-sizing: border-box;
|
|
74
|
+
border-radius: var(--osdk-combobox-border-radius, var(--bp-surface-borderRadius));
|
|
75
|
+
border: var(--osdk-combobox-border-width, var(--bp-surface-borderWidth)) solid
|
|
76
|
+
var(--osdk-combobox-border-color, var(--bp-surface-borderColor-default));
|
|
77
|
+
background-color: var(--osdk-combobox-popup-bg, var(--bp-surface-colorRest-default));
|
|
78
|
+
box-shadow: var(--osdk-combobox-popup-shadow, var(--bp-surface-shadow-2));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.osdkComboboxItem {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 1.5)
|
|
85
|
+
calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 2);
|
|
86
|
+
border-radius: var(--osdk-combobox-border-radius, var(--bp-surface-borderRadius));
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
font-family: var(--osdk-combobox-font-family, var(--bp-typography-family-default));
|
|
89
|
+
font-size: var(--osdk-combobox-font-size, var(--bp-typography-size-bodyMedium));
|
|
90
|
+
line-height: var(--osdk-combobox-line-height, var(--bp-typography-lineHeight-default));
|
|
91
|
+
color: var(--osdk-combobox-item-color, var(--bp-typography-colorRest-default));
|
|
92
|
+
transition: background-color var(--osdk-combobox-transition-duration, var(--bp-emphasis-transitionDuration))
|
|
93
|
+
var(--osdk-combobox-transition-ease, var(--bp-emphasis-ease-default));
|
|
94
|
+
|
|
95
|
+
&[data-highlighted] {
|
|
96
|
+
background-color: var(--osdk-combobox-item-bg-highlighted, var(--bp-surface-colorHover-default));
|
|
97
|
+
outline: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&[data-selected] {
|
|
101
|
+
background-color: var(--osdk-combobox-item-bg-selected, var(--bp-surface-depthLayer-primary));
|
|
102
|
+
color: var(--osdk-combobox-item-color-selected, var(--bp-intent-primary-rest));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[data-disabled] {
|
|
106
|
+
cursor: not-allowed;
|
|
107
|
+
opacity: 0.5;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.osdkComboboxChips {
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
gap: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 1.5);
|
|
115
|
+
margin-bottom: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 2);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.osdkComboboxChip {
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
gap: var(--osdk-combobox-spacing, var(--bp-surface-spacing));
|
|
122
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 0.5)
|
|
123
|
+
calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 1.5);
|
|
124
|
+
border-radius: var(--osdk-combobox-border-radius, var(--bp-surface-borderRadius));
|
|
125
|
+
background-color: var(--osdk-combobox-chip-bg, var(--bp-surface-colorHover-default));
|
|
126
|
+
font-family: var(--osdk-combobox-font-family, var(--bp-typography-family-default));
|
|
127
|
+
font-size: var(--osdk-combobox-chip-font-size, var(--bp-typography-size-bodySmall));
|
|
128
|
+
line-height: var(--osdk-combobox-line-height, var(--bp-typography-lineHeight-default));
|
|
129
|
+
color: var(--osdk-combobox-chip-color, var(--bp-typography-colorRest-default));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.osdkComboboxChipRemove {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
padding: 0;
|
|
137
|
+
border: none;
|
|
138
|
+
background: transparent;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
color: var(--osdk-combobox-chip-remove-color, var(--bp-iconography-colorMuted));
|
|
141
|
+
transition: color var(--osdk-combobox-transition-duration, var(--bp-emphasis-transitionDuration))
|
|
142
|
+
var(--osdk-combobox-transition-ease, var(--bp-emphasis-ease-default));
|
|
143
|
+
|
|
144
|
+
&:hover {
|
|
145
|
+
color: var(--osdk-combobox-chip-remove-color-hover, var(--bp-typography-colorRest-default));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.osdkComboboxClear {
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 0.5);
|
|
154
|
+
border: none;
|
|
155
|
+
background: transparent;
|
|
156
|
+
cursor: pointer;
|
|
157
|
+
color: var(--osdk-combobox-clear-color, var(--bp-iconography-colorMuted));
|
|
158
|
+
border-radius: var(--osdk-combobox-border-radius, var(--bp-surface-borderRadius));
|
|
159
|
+
transition: color var(--osdk-combobox-transition-duration, var(--bp-emphasis-transitionDuration))
|
|
160
|
+
var(--osdk-combobox-transition-ease, var(--bp-emphasis-ease-default)),
|
|
161
|
+
background-color var(--osdk-combobox-transition-duration, var(--bp-emphasis-transitionDuration))
|
|
162
|
+
var(--osdk-combobox-transition-ease, var(--bp-emphasis-ease-default));
|
|
163
|
+
|
|
164
|
+
&:hover {
|
|
165
|
+
color: var(--osdk-combobox-clear-color-hover, var(--bp-typography-colorRest-default));
|
|
166
|
+
background-color: var(--osdk-combobox-clear-bg-hover, var(--bp-surface-colorHover-default));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.osdkComboboxEmpty {
|
|
171
|
+
padding: calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 3)
|
|
172
|
+
calc(var(--osdk-combobox-spacing, var(--bp-surface-spacing)) * 2);
|
|
173
|
+
text-align: center;
|
|
174
|
+
color: var(--osdk-combobox-empty-color, var(--bp-typography-colorMuted));
|
|
175
|
+
font-family: var(--osdk-combobox-font-family, var(--bp-typography-family-default));
|
|
176
|
+
font-size: var(--osdk-combobox-font-size, var(--bp-typography-size-bodyMedium));
|
|
177
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// CSS Module proxy for Combobox.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"osdkComboboxInputWrapper": "Combobox-module__osdkComboboxInputWrapper___QJ-WZal7",
|
|
4
|
+
"osdkComboboxSearchIcon": "Combobox-module__osdkComboboxSearchIcon___jepAa-OV",
|
|
5
|
+
"osdkComboboxInput": "Combobox-module__osdkComboboxInput___9516ISdK",
|
|
6
|
+
"osdkComboboxPositioner": "Combobox-module__osdkComboboxPositioner___hKb8oXuo",
|
|
7
|
+
"osdkComboboxPopup": "Combobox-module__osdkComboboxPopup___J-p7AW55",
|
|
8
|
+
"osdkComboboxItem": "Combobox-module__osdkComboboxItem___aw0l3CKj",
|
|
9
|
+
"osdkComboboxChips": "Combobox-module__osdkComboboxChips___LX40CFj-",
|
|
10
|
+
"osdkComboboxChip": "Combobox-module__osdkComboboxChip___9O7-N50F",
|
|
11
|
+
"osdkComboboxChipRemove": "Combobox-module__osdkComboboxChipRemove___QTqMJiEh",
|
|
12
|
+
"osdkComboboxClear": "Combobox-module__osdkComboboxClear___ylbP7z6a",
|
|
13
|
+
"osdkComboboxEmpty": "Combobox-module__osdkComboboxEmpty___rfSN-zlQ"
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default styles;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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 { Dialog as BaseUIDialog } from "@base-ui/react/dialog";
|
|
18
|
+
import { Cross } from "@blueprintjs/icons";
|
|
19
|
+
import classnames from "classnames";
|
|
20
|
+
import React from "react";
|
|
21
|
+
import styles from "./Dialog.module.css.js";
|
|
22
|
+
export function Dialog({
|
|
23
|
+
isOpen,
|
|
24
|
+
onOpenChange,
|
|
25
|
+
title,
|
|
26
|
+
children,
|
|
27
|
+
footer,
|
|
28
|
+
className
|
|
29
|
+
}) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(BaseUIDialog.Root, {
|
|
31
|
+
open: isOpen,
|
|
32
|
+
onOpenChange: onOpenChange
|
|
33
|
+
}, /*#__PURE__*/React.createElement(BaseUIDialog.Portal, null, /*#__PURE__*/React.createElement(BaseUIDialog.Backdrop, {
|
|
34
|
+
className: styles.backdrop
|
|
35
|
+
}), /*#__PURE__*/React.createElement(BaseUIDialog.Popup, {
|
|
36
|
+
className: classnames(styles.popup, className)
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: styles.header
|
|
39
|
+
}, /*#__PURE__*/React.createElement(BaseUIDialog.Title, {
|
|
40
|
+
className: styles.title
|
|
41
|
+
}, title), /*#__PURE__*/React.createElement(BaseUIDialog.Close, {
|
|
42
|
+
className: styles.closeButton,
|
|
43
|
+
"aria-label": "Close dialog"
|
|
44
|
+
}, /*#__PURE__*/React.createElement(Cross, {
|
|
45
|
+
className: styles.closeIcon
|
|
46
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: styles.body
|
|
48
|
+
}, children), footer != null && /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: styles.footer
|
|
50
|
+
}, footer))));
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=Dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dialog.js","names":["Dialog","BaseUIDialog","Cross","classnames","React","styles","isOpen","onOpenChange","title","children","footer","className","createElement","Root","open","Portal","Backdrop","backdrop","Popup","popup","header","Title","Close","closeButton","closeIcon","body"],"sources":["Dialog.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { Dialog as BaseUIDialog } from \"@base-ui/react/dialog\";\nimport { Cross } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Dialog.module.css\";\n\nexport interface DialogProps {\n isOpen: boolean;\n onOpenChange: () => void;\n title: React.ReactNode;\n children: React.ReactNode;\n footer?: React.ReactNode;\n className?: string;\n}\n\nexport function Dialog({\n isOpen,\n onOpenChange,\n title,\n children,\n footer,\n className,\n}: DialogProps): React.ReactElement {\n return (\n <BaseUIDialog.Root open={isOpen} onOpenChange={onOpenChange}>\n <BaseUIDialog.Portal>\n <BaseUIDialog.Backdrop className={styles.backdrop} />\n <BaseUIDialog.Popup\n className={classnames(\n styles.popup,\n className,\n )}\n >\n <div className={styles.header}>\n <BaseUIDialog.Title className={styles.title}>\n {title}\n </BaseUIDialog.Title>\n <BaseUIDialog.Close\n className={styles.closeButton}\n aria-label=\"Close dialog\"\n >\n <Cross className={styles.closeIcon} />\n </BaseUIDialog.Close>\n </div>\n <div className={styles.body}>{children}</div>\n {footer != null && <div className={styles.footer}>{footer}</div>}\n </BaseUIDialog.Popup>\n </BaseUIDialog.Portal>\n </BaseUIDialog.Root>\n );\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,MAAM,IAAIC,YAAY,QAAQ,uBAAuB;AAC9D,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,qBAAqB;AAWxC,OAAO,SAASL,MAAMA,CAAC;EACrBM,MAAM;EACNC,YAAY;EACZC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACNC;AACW,CAAC,EAAsB;EAClC,oBACEP,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACY,IAAI;IAACC,IAAI,EAAER,MAAO;IAACC,YAAY,EAAEA;EAAa,gBAC1DH,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACc,MAAM,qBAClBX,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACe,QAAQ;IAACL,SAAS,EAAEN,MAAM,CAACY;EAAS,CAAE,CAAC,eACrDb,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACiB,KAAK;IACjBP,SAAS,EAAER,UAAU,CACnBE,MAAM,CAACc,KAAK,EACZR,SACF;EAAE,gBAEFP,KAAA,CAAAQ,aAAA;IAAKD,SAAS,EAAEN,MAAM,CAACe;EAAO,gBAC5BhB,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACoB,KAAK;IAACV,SAAS,EAAEN,MAAM,CAACG;EAAM,GACzCA,KACiB,CAAC,eACrBJ,KAAA,CAAAQ,aAAA,CAACX,YAAY,CAACqB,KAAK;IACjBX,SAAS,EAAEN,MAAM,CAACkB,WAAY;IAC9B,cAAW;EAAc,gBAEzBnB,KAAA,CAAAQ,aAAA,CAACV,KAAK;IAACS,SAAS,EAAEN,MAAM,CAACmB;EAAU,CAAE,CACnB,CACjB,CAAC,eACNpB,KAAA,CAAAQ,aAAA;IAAKD,SAAS,EAAEN,MAAM,CAACoB;EAAK,GAAEhB,QAAc,CAAC,EAC5CC,MAAM,IAAI,IAAI,iBAAIN,KAAA,CAAAQ,aAAA;IAAKD,SAAS,EAAEN,MAAM,CAACK;EAAO,GAAEA,MAAY,CAC7C,CACD,CACJ,CAAC;AAExB","ignoreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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
|
+
.backdrop {
|
|
18
|
+
position: fixed;
|
|
19
|
+
inset: 0;
|
|
20
|
+
background-color: var(--osdk-dialog-backdrop-bg);
|
|
21
|
+
z-index: var(--osdk-surface-z-index-1);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.popup {
|
|
25
|
+
position: fixed;
|
|
26
|
+
top: 50%;
|
|
27
|
+
left: 50%;
|
|
28
|
+
transform: translate(-50%, -50%);
|
|
29
|
+
min-width: var(--osdk-dialog-min-width);
|
|
30
|
+
max-width: var(--osdk-dialog-max-width);
|
|
31
|
+
min-height: var(--osdk-dialog-min-height);
|
|
32
|
+
max-height: var(--osdk-dialog-max-height);
|
|
33
|
+
background-color: var(--osdk-dialog-bg);
|
|
34
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
35
|
+
box-shadow: var(--osdk-dialog-shadow);
|
|
36
|
+
z-index: var(--osdk-surface-z-index-2);
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: column;
|
|
39
|
+
|
|
40
|
+
&:focus {
|
|
41
|
+
outline: none;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.header {
|
|
46
|
+
display: flex;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
align-items: center;
|
|
49
|
+
padding: var(--osdk-dialog-header-padding);
|
|
50
|
+
border-bottom: var(--osdk-surface-border);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.title {
|
|
54
|
+
font-size: var(--osdk-dialog-title-font-size);
|
|
55
|
+
font-weight: var(--osdk-dialog-title-font-weight);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.body {
|
|
59
|
+
display: flex;
|
|
60
|
+
padding: var(--osdk-dialog-body-padding);
|
|
61
|
+
overflow-y: auto;
|
|
62
|
+
flex: 1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.footer {
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: flex-end;
|
|
68
|
+
gap: calc(var(--osdk-surface-spacing) * 2);
|
|
69
|
+
padding: var(--osdk-dialog-footer-padding);
|
|
70
|
+
border-top: var(--osdk-surface-border);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.closeButton {
|
|
74
|
+
background: none;
|
|
75
|
+
border: none;
|
|
76
|
+
padding: calc(var(--osdk-surface-spacing) * 0.5);
|
|
77
|
+
cursor: pointer;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
82
|
+
|
|
83
|
+
&:hover {
|
|
84
|
+
background-color: var(--osdk-surface-background-color-default-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&:focus {
|
|
88
|
+
outline: none;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:focus-visible {
|
|
92
|
+
outline: var(--osdk-focus-outline);
|
|
93
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.closeIcon {
|
|
98
|
+
width: var(--osdk-iconography-size-small);
|
|
99
|
+
height: var(--osdk-iconography-size-small);
|
|
100
|
+
color: var(--osdk-typography-color-muted);
|
|
101
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// CSS Module proxy for Dialog.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"backdrop": "Dialog-module__backdrop___LaM-OTQa",
|
|
4
|
+
"popup": "Dialog-module__popup___7Hd9wHIO",
|
|
5
|
+
"header": "Dialog-module__header___uvnNEIbj",
|
|
6
|
+
"title": "Dialog-module__title___fyskXl6s",
|
|
7
|
+
"body": "Dialog-module__body___pHE35h4X",
|
|
8
|
+
"footer": "Dialog-module__footer___H9pEEz3w",
|
|
9
|
+
"closeButton": "Dialog-module__closeButton___vnkQctUO",
|
|
10
|
+
"closeIcon": "Dialog-module__closeIcon___L7JMZyxZ"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default styles;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2025 Palantir Technologies, Inc. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { Button } from "@base-ui/react/button";
|
|
19
|
+
import { DragHandleVertical, SmallCross, Trash } from "@blueprintjs/icons";
|
|
20
|
+
import { closestCenter, DndContext as BaseDndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core";
|
|
21
|
+
import { SortableContext, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
22
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
23
|
+
import classNames from "classnames";
|
|
24
|
+
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
|
25
|
+
import styles from "./DraggableList.module.css.js";
|
|
26
|
+
function DraggableListItem({
|
|
27
|
+
item,
|
|
28
|
+
onRemove,
|
|
29
|
+
removeIconVariant = "trash",
|
|
30
|
+
renderContent
|
|
31
|
+
}) {
|
|
32
|
+
const {
|
|
33
|
+
attributes,
|
|
34
|
+
listeners,
|
|
35
|
+
setNodeRef,
|
|
36
|
+
transform,
|
|
37
|
+
transition,
|
|
38
|
+
isDragging
|
|
39
|
+
} = useSortable({
|
|
40
|
+
id: item.id
|
|
41
|
+
});
|
|
42
|
+
const style = {
|
|
43
|
+
transform: CSS.Transform.toString(transform),
|
|
44
|
+
transition
|
|
45
|
+
};
|
|
46
|
+
const handleRemove = useCallback(() => {
|
|
47
|
+
onRemove?.(item.id);
|
|
48
|
+
}, [item.id, onRemove]);
|
|
49
|
+
const RemoveIcon = removeIconVariant === "trash" ? Trash : SmallCross;
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
ref: setNodeRef,
|
|
52
|
+
style: style,
|
|
53
|
+
className: styles.draggableItem,
|
|
54
|
+
"data-dragging": isDragging
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
56
|
+
className: styles.dragHandle,
|
|
57
|
+
"aria-label": `Reorder ${item.label}`
|
|
58
|
+
}, attributes, listeners), /*#__PURE__*/React.createElement(DragHandleVertical, {
|
|
59
|
+
className: styles.icon
|
|
60
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: styles.itemContent
|
|
62
|
+
}, renderContent ? renderContent(item) : item.label), onRemove && /*#__PURE__*/React.createElement(Button, {
|
|
63
|
+
className: styles.removeButton,
|
|
64
|
+
onClick: handleRemove,
|
|
65
|
+
"aria-label": `Remove ${item.label}`
|
|
66
|
+
}, /*#__PURE__*/React.createElement(RemoveIcon, {
|
|
67
|
+
className: styles.icon
|
|
68
|
+
})));
|
|
69
|
+
}
|
|
70
|
+
export function DraggableList({
|
|
71
|
+
items,
|
|
72
|
+
onReorder,
|
|
73
|
+
onRemove,
|
|
74
|
+
removeIconVariant = "cross",
|
|
75
|
+
renderContent,
|
|
76
|
+
emptyMessage,
|
|
77
|
+
className
|
|
78
|
+
}) {
|
|
79
|
+
const itemIds = useMemo(() => items.map(item => item.id), [items]);
|
|
80
|
+
const sensors = useSensors(useSensor(PointerSensor, {
|
|
81
|
+
activationConstraint: {
|
|
82
|
+
distance: 5
|
|
83
|
+
}
|
|
84
|
+
}), useSensor(KeyboardSensor, {
|
|
85
|
+
coordinateGetter: sortableKeyboardCoordinates
|
|
86
|
+
}));
|
|
87
|
+
const handleDragEnd = useCallback(event => {
|
|
88
|
+
const {
|
|
89
|
+
active,
|
|
90
|
+
over
|
|
91
|
+
} = event;
|
|
92
|
+
if (over && active.id !== over.id) {
|
|
93
|
+
const oldIndex = items.findIndex(item => item.id === active.id);
|
|
94
|
+
const newIndex = items.findIndex(item => item.id === over.id);
|
|
95
|
+
onReorder(oldIndex, newIndex);
|
|
96
|
+
}
|
|
97
|
+
}, [items, onReorder]);
|
|
98
|
+
const containerRef = useRef(null);
|
|
99
|
+
useKeyboardEvents(containerRef);
|
|
100
|
+
|
|
101
|
+
// TODO: Revert when @types/react is fixed
|
|
102
|
+
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
ref: containerRef,
|
|
105
|
+
className: classNames(styles.draggableListContainer, className)
|
|
106
|
+
}, /*#__PURE__*/React.createElement(BaseDndContext, {
|
|
107
|
+
sensors: sensors,
|
|
108
|
+
collisionDetection: closestCenter,
|
|
109
|
+
onDragEnd: handleDragEnd
|
|
110
|
+
}, /*#__PURE__*/React.createElement(SortableContext, {
|
|
111
|
+
items: itemIds,
|
|
112
|
+
strategy: verticalListSortingStrategy
|
|
113
|
+
}, items.map(item => /*#__PURE__*/React.createElement(DraggableListItem, {
|
|
114
|
+
key: item.id,
|
|
115
|
+
item: item,
|
|
116
|
+
onRemove: onRemove,
|
|
117
|
+
removeIconVariant: removeIconVariant,
|
|
118
|
+
renderContent: renderContent
|
|
119
|
+
})))), items.length === 0 && emptyMessage && /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: styles.emptyState
|
|
121
|
+
}, emptyMessage));
|
|
122
|
+
}
|
|
123
|
+
const useKeyboardEvents = containerRef => {
|
|
124
|
+
// Base UI's DialogPopup calls stopPropagation on arrow key events, which
|
|
125
|
+
// prevents them from reaching @dnd-kit's document-level KeyboardSensor
|
|
126
|
+
// listener. We use a native capture-phase listener to intercept arrow keys
|
|
127
|
+
// before the dialog can swallow them, and re-dispatch them on the document
|
|
128
|
+
// so @dnd-kit can process keyboard-driven reordering.
|
|
129
|
+
useEffect(() => {
|
|
130
|
+
const el = containerRef.current;
|
|
131
|
+
if (el == null) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const ARROW_KEYS = new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]);
|
|
135
|
+
function handleCapture(event) {
|
|
136
|
+
if (!ARROW_KEYS.has(event.key)) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Only intercept when a drag is active (an item has [data-dragging="true"])
|
|
141
|
+
if (el.querySelector("[data-dragging=\"true\"]") == null) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
event.stopPropagation();
|
|
145
|
+
document.dispatchEvent(new KeyboardEvent("keydown", {
|
|
146
|
+
key: event.key,
|
|
147
|
+
code: event.code,
|
|
148
|
+
bubbles: true
|
|
149
|
+
}));
|
|
150
|
+
}
|
|
151
|
+
el.addEventListener("keydown", handleCapture, true);
|
|
152
|
+
return () => el.removeEventListener("keydown", handleCapture, true);
|
|
153
|
+
}, [containerRef]);
|
|
154
|
+
};
|
|
155
|
+
//# sourceMappingURL=DraggableList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DraggableList.js","names":["Button","DragHandleVertical","SmallCross","Trash","closestCenter","DndContext","BaseDndContext","KeyboardSensor","PointerSensor","useSensor","useSensors","SortableContext","sortableKeyboardCoordinates","useSortable","verticalListSortingStrategy","CSS","classNames","React","useCallback","useEffect","useMemo","useRef","styles","DraggableListItem","item","onRemove","removeIconVariant","renderContent","attributes","listeners","setNodeRef","transform","transition","isDragging","id","style","Transform","toString","handleRemove","RemoveIcon","createElement","ref","className","draggableItem","_extends","dragHandle","label","icon","itemContent","removeButton","onClick","DraggableList","items","onReorder","emptyMessage","itemIds","map","sensors","activationConstraint","distance","coordinateGetter","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","containerRef","useKeyboardEvents","draggableListContainer","collisionDetection","onDragEnd","strategy","key","length","emptyState","el","current","ARROW_KEYS","Set","handleCapture","has","querySelector","stopPropagation","document","dispatchEvent","KeyboardEvent","code","bubbles","addEventListener","removeEventListener"],"sources":["DraggableList.tsx"],"sourcesContent":["/*\n * Copyright 2025 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 { DragHandleVertical, SmallCross, Trash } from \"@blueprintjs/icons\";\nimport {\n closestCenter,\n DndContext as BaseDndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport type { RefObject } from \"react\";\nimport React, { useCallback, useEffect, useMemo, useRef } from \"react\";\nimport styles from \"./DraggableList.module.css\";\n\nexport interface DraggableItem {\n id: string;\n label: string;\n}\n\ntype RemoveIconVariant = \"trash\" | \"cross\";\n\ninterface DraggableListItemProps<T extends DraggableItem> {\n item: T;\n onRemove?: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n}\n\nfunction DraggableListItem<T extends DraggableItem>({\n item,\n onRemove,\n removeIconVariant = \"trash\",\n renderContent,\n}: DraggableListItemProps<T>): React.ReactElement {\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id: item.id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const handleRemove = useCallback(() => {\n onRemove?.(item.id);\n }, [item.id, onRemove]);\n\n const RemoveIcon = removeIconVariant === \"trash\" ? Trash : SmallCross;\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={styles.draggableItem}\n data-dragging={isDragging}\n >\n <div\n className={styles.dragHandle}\n aria-label={`Reorder ${item.label}`}\n {...attributes}\n {...listeners}\n >\n <DragHandleVertical className={styles.icon} />\n </div>\n <div className={styles.itemContent}>\n {renderContent ? renderContent(item) : item.label}\n </div>\n {onRemove && (\n <Button\n className={styles.removeButton}\n onClick={handleRemove}\n aria-label={`Remove ${item.label}`}\n >\n <RemoveIcon className={styles.icon} />\n </Button>\n )}\n </div>\n );\n}\n\nexport interface DraggableListProps<T extends DraggableItem> {\n items: T[];\n onReorder: (fromIndex: number, toIndex: number) => void;\n onRemove: (id: string) => void;\n removeIconVariant?: RemoveIconVariant;\n renderContent?: (item: T) => React.ReactNode;\n emptyMessage?: string;\n className?: string;\n}\n\nexport function DraggableList<T extends DraggableItem>({\n items,\n onReorder,\n onRemove,\n removeIconVariant = \"cross\",\n renderContent,\n emptyMessage,\n className,\n}: DraggableListProps<T>): React.ReactElement {\n const itemIds = useMemo(() => items.map((item) => item.id), [items]);\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const handleDragEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = items.findIndex((item) => item.id === active.id);\n const newIndex = items.findIndex((item) => item.id === over.id);\n onReorder(oldIndex, newIndex);\n }\n },\n [items, onReorder],\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n useKeyboardEvents(containerRef);\n\n // TODO: Revert when @types/react is fixed\n const DndContext = BaseDndContext as any;\n\n return (\n <div\n ref={containerRef}\n className={classNames(styles.draggableListContainer, className)}\n >\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {items.map((item) => (\n <DraggableListItem<T>\n key={item.id}\n item={item}\n onRemove={onRemove}\n removeIconVariant={removeIconVariant}\n renderContent={renderContent}\n />\n ))}\n </SortableContext>\n </DndContext>\n {items.length === 0 && emptyMessage && (\n <div className={styles.emptyState}>{emptyMessage}</div>\n )}\n </div>\n );\n}\n\nconst useKeyboardEvents = (containerRef: RefObject<HTMLDivElement>) => {\n // Base UI's DialogPopup calls stopPropagation on arrow key events, which\n // prevents them from reaching @dnd-kit's document-level KeyboardSensor\n // listener. We use a native capture-phase listener to intercept arrow keys\n // before the dialog can swallow them, and re-dispatch them on the document\n // so @dnd-kit can process keyboard-driven reordering.\n useEffect(() => {\n const el = containerRef.current;\n if (el == null) {\n return;\n }\n\n const ARROW_KEYS = new Set([\n \"ArrowUp\",\n \"ArrowDown\",\n \"ArrowLeft\",\n \"ArrowRight\",\n ]);\n\n function handleCapture(event: KeyboardEvent) {\n if (!ARROW_KEYS.has(event.key)) {\n return;\n }\n\n // Only intercept when a drag is active (an item has [data-dragging=\"true\"])\n if (el!.querySelector(\"[data-dragging=\\\"true\\\"]\") == null) {\n return;\n }\n\n event.stopPropagation();\n\n document.dispatchEvent(\n new KeyboardEvent(\"keydown\", {\n key: event.key,\n code: event.code,\n bubbles: true,\n }),\n );\n }\n\n el.addEventListener(\"keydown\", handleCapture, true);\n return () => el.removeEventListener(\"keydown\", handleCapture, true);\n }, [containerRef]);\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 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
|
+
.draggableListContainer {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
gap: var(--osdk-draggable-item-gap);
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.draggableItem {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--osdk-draggable-item-gap);
|
|
28
|
+
padding: var(--osdk-draggable-item-padding);
|
|
29
|
+
background-color: var(--osdk-draggable-item-bg);
|
|
30
|
+
border: var(--osdk-draggable-item-border);
|
|
31
|
+
border-radius: var(--osdk-draggable-item-border-radius);
|
|
32
|
+
width: 100%;
|
|
33
|
+
touch-action: none;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.draggableItem[data-dragging="true"] {
|
|
38
|
+
opacity: 0.5;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.dragHandle {
|
|
42
|
+
display: flex;
|
|
43
|
+
cursor: grab;
|
|
44
|
+
color: var(--osdk-draggable-item-drag-icon-color);
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
color: var(--osdk-draggable-item-drag-icon-color-hover);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:active {
|
|
51
|
+
cursor: grabbing;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus {
|
|
55
|
+
outline: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: var(--osdk-focus-outline);
|
|
60
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.itemContent {
|
|
65
|
+
flex: 1;
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.removeButton {
|
|
72
|
+
background: none;
|
|
73
|
+
border: none;
|
|
74
|
+
padding: var(--osdk-surface-spacing);
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
color: var(--osdk-draggable-item-drag-icon-color);
|
|
80
|
+
border-radius: var(--osdk-surface-border-radius);
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
color: var(--osdk-typography-color-danger-rest);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:active {
|
|
87
|
+
color: var(--osdk-typography-color-danger-rest);
|
|
88
|
+
background: oklch(
|
|
89
|
+
from var(--osdk-surface-background-color-danger-hover) l c h / 0.2
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:focus {
|
|
94
|
+
outline: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&:focus-visible {
|
|
98
|
+
outline: var(--osdk-focus-outline);
|
|
99
|
+
outline-offset: var(--osdk-focus-visible-outline-offset);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.emptyState {
|
|
104
|
+
padding: calc(var(--osdk-surface-spacing) * 5);
|
|
105
|
+
text-align: center;
|
|
106
|
+
color: var(--osdk-typography-color-muted);
|
|
107
|
+
font-style: italic;
|
|
108
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// CSS Module proxy for DraggableList.module.css
|
|
2
|
+
const styles = {
|
|
3
|
+
"draggableListContainer": "DraggableList-module__draggableListContainer___78U2PaLj",
|
|
4
|
+
"draggableItem": "DraggableList-module__draggableItem___yzxaMynW",
|
|
5
|
+
"dragHandle": "DraggableList-module__dragHandle___Ds-CeRi4",
|
|
6
|
+
"itemContent": "DraggableList-module__itemContent___lUjVl8eM",
|
|
7
|
+
"removeButton": "DraggableList-module__removeButton___--alST9G",
|
|
8
|
+
"emptyState": "DraggableList-module__emptyState___l25Qs23u"
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default styles;
|