@app-studio/web 0.9.35 → 0.9.37
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/dist/components/Calendar/Calendar/Calendar.props.d.ts +8 -0
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.props.d.ts +5 -0
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.state.d.ts +7 -3
- package/dist/components/OKR/OKR/OKR.props.d.ts +72 -0
- package/dist/components/OKR/OKR/OKR.style.d.ts +19 -0
- package/dist/components/OKR/OKR/OKR.view.d.ts +4 -0
- package/dist/components/OKR/OKR.d.ts +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/pages/okr.page.d.ts +3 -0
- package/dist/web.cjs.development.js +774 -199
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +774 -200
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +774 -199
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/README.md +2 -1
- package/docs/components/Calendar.mdx +3 -0
- package/docs/components/Flow.mdx +1 -0
- package/docs/components/KanbanBoard.mdx +4 -0
- package/docs/components/OKR.mdx +475 -0
- package/docs/components/Title.mdx +1 -0
- package/docs/components/Tree.mdx +1 -0
- package/docs/components.md +178 -0
- package/package.json +1 -1
- package/docs/api-reference/README.md +0 -103
- package/docs/api-reference/data-display/flow.md +0 -220
- package/docs/api-reference/data-display/tree.md +0 -210
- package/docs/api-reference/form/chat-input.md +0 -206
- package/docs/api-reference/utility/button.md +0 -145
- package/docs/api-reference/utility/title.md +0 -301
package/dist/web.esm.js
CHANGED
|
@@ -7604,7 +7604,12 @@ var cloneColumns = inputColumns => inputColumns.map(column => Object.assign({},
|
|
|
7604
7604
|
var useKanbanBoardState = _ref => {
|
|
7605
7605
|
var {
|
|
7606
7606
|
columns: initialColumns,
|
|
7607
|
-
onChange
|
|
7607
|
+
onChange,
|
|
7608
|
+
onCardMove,
|
|
7609
|
+
onCardCreate: onCardCreateProp,
|
|
7610
|
+
onCardDelete: onCardDeleteProp,
|
|
7611
|
+
onCardTitleChange: onCardTitleChangeProp,
|
|
7612
|
+
onCardDescriptionChange: onCardDescriptionChangeProp
|
|
7608
7613
|
} = _ref;
|
|
7609
7614
|
var [columns, setColumns] = useState(initialColumns);
|
|
7610
7615
|
var [draggedCardId, setDraggedCardId] = useState(null);
|
|
@@ -7681,11 +7686,16 @@ var useKanbanBoardState = _ref => {
|
|
|
7681
7686
|
cardId
|
|
7682
7687
|
};
|
|
7683
7688
|
if (options != null && options.shouldCommit) {
|
|
7689
|
+
var originalSourceColumn = prevColumns.find(c => c.id === sourceColumnId);
|
|
7690
|
+
var originalTargetColumn = prevColumns.find(c => c.id === targetColumnId);
|
|
7691
|
+
if (card && originalSourceColumn && originalTargetColumn) {
|
|
7692
|
+
onCardMove == null || onCardMove(card, originalSourceColumn, originalTargetColumn);
|
|
7693
|
+
}
|
|
7684
7694
|
onChange == null || onChange(updatedColumns);
|
|
7685
7695
|
}
|
|
7686
7696
|
return updatedColumns;
|
|
7687
7697
|
});
|
|
7688
|
-
}, [onChange]);
|
|
7698
|
+
}, [onChange, onCardMove]);
|
|
7689
7699
|
var handleCardDragStart = useCallback((columnId, cardId, event) => {
|
|
7690
7700
|
dragStateRef.current = {
|
|
7691
7701
|
columnId,
|
|
@@ -7744,6 +7754,62 @@ var useKanbanBoardState = _ref => {
|
|
|
7744
7754
|
shouldCommit: true
|
|
7745
7755
|
});
|
|
7746
7756
|
}, [applyMove, getRelativeDropPosition]);
|
|
7757
|
+
var handleCardCreate = useCallback((card, column) => {
|
|
7758
|
+
if (onCardCreateProp) {
|
|
7759
|
+
onCardCreateProp(card, column);
|
|
7760
|
+
return;
|
|
7761
|
+
}
|
|
7762
|
+
setColumns(prevColumns => {
|
|
7763
|
+
var updatedColumns = prevColumns.map(col => col.id === column.id ? Object.assign({}, col, {
|
|
7764
|
+
cards: [...col.cards, card]
|
|
7765
|
+
}) : col);
|
|
7766
|
+
onChange == null || onChange(updatedColumns);
|
|
7767
|
+
return updatedColumns;
|
|
7768
|
+
});
|
|
7769
|
+
}, [onChange, onCardCreateProp]);
|
|
7770
|
+
var handleCardDelete = useCallback((card, column) => {
|
|
7771
|
+
if (onCardDeleteProp) {
|
|
7772
|
+
onCardDeleteProp(card, column);
|
|
7773
|
+
return;
|
|
7774
|
+
}
|
|
7775
|
+
setColumns(prevColumns => {
|
|
7776
|
+
var updatedColumns = prevColumns.map(col => col.id === column.id ? Object.assign({}, col, {
|
|
7777
|
+
cards: col.cards.filter(c => c.id !== card.id)
|
|
7778
|
+
}) : col);
|
|
7779
|
+
onChange == null || onChange(updatedColumns);
|
|
7780
|
+
return updatedColumns;
|
|
7781
|
+
});
|
|
7782
|
+
}, [onChange, onCardDeleteProp]);
|
|
7783
|
+
var handleCardTitleChange = useCallback((card, column, newTitle) => {
|
|
7784
|
+
if (onCardTitleChangeProp) {
|
|
7785
|
+
onCardTitleChangeProp(card, column, newTitle);
|
|
7786
|
+
return;
|
|
7787
|
+
}
|
|
7788
|
+
setColumns(prevColumns => {
|
|
7789
|
+
var updatedColumns = prevColumns.map(col => col.id === column.id ? Object.assign({}, col, {
|
|
7790
|
+
cards: col.cards.map(c => c.id === card.id ? Object.assign({}, c, {
|
|
7791
|
+
title: newTitle
|
|
7792
|
+
}) : c)
|
|
7793
|
+
}) : col);
|
|
7794
|
+
onChange == null || onChange(updatedColumns);
|
|
7795
|
+
return updatedColumns;
|
|
7796
|
+
});
|
|
7797
|
+
}, [onChange, onCardTitleChangeProp]);
|
|
7798
|
+
var handleCardDescriptionChange = useCallback((card, column, newDescription) => {
|
|
7799
|
+
if (onCardDescriptionChangeProp) {
|
|
7800
|
+
onCardDescriptionChangeProp(card, column, newDescription);
|
|
7801
|
+
return;
|
|
7802
|
+
}
|
|
7803
|
+
setColumns(prevColumns => {
|
|
7804
|
+
var updatedColumns = prevColumns.map(col => col.id === column.id ? Object.assign({}, col, {
|
|
7805
|
+
cards: col.cards.map(c => c.id === card.id ? Object.assign({}, c, {
|
|
7806
|
+
description: newDescription
|
|
7807
|
+
}) : c)
|
|
7808
|
+
}) : col);
|
|
7809
|
+
onChange == null || onChange(updatedColumns);
|
|
7810
|
+
return updatedColumns;
|
|
7811
|
+
});
|
|
7812
|
+
}, [onChange, onCardDescriptionChangeProp]);
|
|
7747
7813
|
return {
|
|
7748
7814
|
columns,
|
|
7749
7815
|
draggedCardId,
|
|
@@ -7753,7 +7819,11 @@ var useKanbanBoardState = _ref => {
|
|
|
7753
7819
|
onColumnDragOver: handleColumnDragOver,
|
|
7754
7820
|
onCardDragOver: handleCardDragOver,
|
|
7755
7821
|
onColumnDrop: handleColumnDrop,
|
|
7756
|
-
onCardDrop: handleCardDrop
|
|
7822
|
+
onCardDrop: handleCardDrop,
|
|
7823
|
+
onCardCreate: handleCardCreate,
|
|
7824
|
+
onCardDelete: handleCardDelete,
|
|
7825
|
+
onCardTitleChange: handleCardTitleChange,
|
|
7826
|
+
onCardDescriptionChange: handleCardDescriptionChange
|
|
7757
7827
|
};
|
|
7758
7828
|
};
|
|
7759
7829
|
|
|
@@ -7771,18 +7841,94 @@ var KanbanBoardView = _ref => {
|
|
|
7771
7841
|
onColumnDragOver,
|
|
7772
7842
|
onCardDragOver,
|
|
7773
7843
|
onColumnDrop,
|
|
7774
|
-
onCardDrop
|
|
7844
|
+
onCardDrop,
|
|
7845
|
+
onCardCreate,
|
|
7846
|
+
onCardDelete,
|
|
7847
|
+
onCardTitleChange,
|
|
7848
|
+
onCardDescriptionChange
|
|
7775
7849
|
} = _ref;
|
|
7776
|
-
var
|
|
7850
|
+
var [editingCardId, setEditingCardId] = React.useState(null);
|
|
7851
|
+
var [editingDescriptionCardId, setEditingDescriptionCardId] = React.useState(null);
|
|
7852
|
+
var [editedTitle, setEditedTitle] = React.useState('');
|
|
7853
|
+
var [editedDescription, setEditedDescription] = React.useState('');
|
|
7854
|
+
var handleTitleClick = React.useCallback(card => {
|
|
7855
|
+
setEditingCardId(card.id);
|
|
7856
|
+
setEditedTitle(card.title);
|
|
7857
|
+
}, []);
|
|
7858
|
+
var handleDescriptionClick = React.useCallback(card => {
|
|
7859
|
+
setEditingDescriptionCardId(card.id);
|
|
7860
|
+
setEditedDescription(card.description || '');
|
|
7861
|
+
}, []);
|
|
7862
|
+
var handleTitleChange = React.useCallback(event => {
|
|
7863
|
+
setEditedTitle(event.target.value);
|
|
7864
|
+
}, []);
|
|
7865
|
+
var handleDescriptionChange = React.useCallback(event => {
|
|
7866
|
+
setEditedDescription(event.target.value);
|
|
7867
|
+
}, []);
|
|
7868
|
+
var handleTitleBlur = React.useCallback((card, column) => {
|
|
7869
|
+
if (editingCardId === card.id) {
|
|
7870
|
+
onCardTitleChange == null || onCardTitleChange(card, column, editedTitle);
|
|
7871
|
+
setEditingCardId(null);
|
|
7872
|
+
}
|
|
7873
|
+
}, [editingCardId, editedTitle, onCardTitleChange]);
|
|
7874
|
+
var handleDescriptionBlur = React.useCallback((card, column) => {
|
|
7875
|
+
if (editingDescriptionCardId === card.id) {
|
|
7876
|
+
onCardDescriptionChange == null || onCardDescriptionChange(card, column, editedDescription);
|
|
7877
|
+
setEditingDescriptionCardId(null);
|
|
7878
|
+
}
|
|
7879
|
+
}, [editingDescriptionCardId, editedDescription, onCardDescriptionChange]);
|
|
7880
|
+
var handleTitleKeyDown = React.useCallback((event, card, column) => {
|
|
7881
|
+
if (event.key === 'Enter') {
|
|
7882
|
+
handleTitleBlur(card, column);
|
|
7883
|
+
}
|
|
7884
|
+
}, [handleTitleBlur]);
|
|
7885
|
+
var handleDescriptionKeyDown = React.useCallback((event, card, column) => {
|
|
7886
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
7887
|
+
event.preventDefault();
|
|
7888
|
+
handleDescriptionBlur(card, column);
|
|
7889
|
+
}
|
|
7890
|
+
}, [handleDescriptionBlur]);
|
|
7891
|
+
var renderDefaultCard = React.useCallback((card, column) => (/*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
7777
7892
|
gap: 4,
|
|
7778
7893
|
alignItems: "flex-start"
|
|
7779
|
-
}, views == null ? void 0 : views.cardContent), /*#__PURE__*/React.createElement(
|
|
7894
|
+
}, views == null ? void 0 : views.cardContent), editingCardId === card.id ? (/*#__PURE__*/React.createElement("input", {
|
|
7895
|
+
type: "text",
|
|
7896
|
+
value: editedTitle,
|
|
7897
|
+
onChange: handleTitleChange,
|
|
7898
|
+
onBlur: () => handleTitleBlur(card, column),
|
|
7899
|
+
onKeyDown: event => handleTitleKeyDown(event, card, column),
|
|
7900
|
+
autoFocus: true,
|
|
7901
|
+
style: {
|
|
7902
|
+
border: '1px solid #d0d5dd',
|
|
7903
|
+
borderRadius: '4px',
|
|
7904
|
+
padding: '4px 8px',
|
|
7905
|
+
fontSize: '14px',
|
|
7906
|
+
fontWeight: '600',
|
|
7907
|
+
width: '100%'
|
|
7908
|
+
}
|
|
7909
|
+
})) : (/*#__PURE__*/React.createElement(Text, {
|
|
7780
7910
|
weight: "semiBold",
|
|
7781
|
-
size: "sm"
|
|
7782
|
-
}, card.title), card.description && (/*#__PURE__*/React.createElement(Text, {
|
|
7783
7911
|
size: "sm",
|
|
7784
|
-
|
|
7785
|
-
}, card.
|
|
7912
|
+
onClick: () => handleTitleClick(card)
|
|
7913
|
+
}, card.title)), card.description && (editingDescriptionCardId === card.id ? (/*#__PURE__*/React.createElement("textarea", {
|
|
7914
|
+
value: editedDescription,
|
|
7915
|
+
onChange: handleDescriptionChange,
|
|
7916
|
+
onBlur: () => handleDescriptionBlur(card, column),
|
|
7917
|
+
onKeyDown: event => handleDescriptionKeyDown(event, card, column),
|
|
7918
|
+
autoFocus: true,
|
|
7919
|
+
style: {
|
|
7920
|
+
border: '1px solid #d0d5dd',
|
|
7921
|
+
borderRadius: '4px',
|
|
7922
|
+
padding: '4px 8px',
|
|
7923
|
+
fontSize: '14px',
|
|
7924
|
+
width: '100%',
|
|
7925
|
+
minHeight: '60px'
|
|
7926
|
+
}
|
|
7927
|
+
})) : (/*#__PURE__*/React.createElement(Text, {
|
|
7928
|
+
size: "sm",
|
|
7929
|
+
color: "#475467",
|
|
7930
|
+
onClick: () => handleDescriptionClick(card)
|
|
7931
|
+
}, card.description))))), [views == null ? void 0 : views.cardContent, editingCardId, editedTitle, editingDescriptionCardId, editedDescription, handleTitleBlur, handleTitleChange, handleTitleClick, handleTitleKeyDown, handleDescriptionBlur, handleDescriptionChange, handleDescriptionClick, handleDescriptionKeyDown]);
|
|
7786
7932
|
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
7787
7933
|
display: "flex",
|
|
7788
7934
|
alignItems: "flex-start",
|
|
@@ -7806,27 +7952,21 @@ var KanbanBoardView = _ref => {
|
|
|
7806
7952
|
}, views == null ? void 0 : views.columnHeader), renderColumnHeader ? renderColumnHeader(column) : (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
7807
7953
|
weight: "semiBold",
|
|
7808
7954
|
size: "md"
|
|
7809
|
-
}, views == null ? void 0 : views.columnTitle), column.title))
|
|
7955
|
+
}, views == null ? void 0 : views.columnTitle), column.title)), /*#__PURE__*/React.createElement(View, {
|
|
7956
|
+
onClick: () => onCardCreate == null ? void 0 : onCardCreate({
|
|
7957
|
+
id: "new-card-" + Date.now(),
|
|
7958
|
+
title: 'Nouvelle carte'
|
|
7959
|
+
}, column)
|
|
7960
|
+
}, /*#__PURE__*/React.createElement(PlusIcon, {
|
|
7961
|
+
widthHeight: 16
|
|
7962
|
+
}))), /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
7810
7963
|
gap: 12,
|
|
7811
7964
|
minHeight: 40,
|
|
7812
7965
|
onDragOver: event => onColumnDragOver(column.id, event),
|
|
7813
7966
|
onDrop: event => onColumnDrop(column.id, event),
|
|
7814
7967
|
opacity: draggedCardId && hoveredColumnId === column.id ? 0.9 : undefined,
|
|
7815
7968
|
transition: "all 0.15s ease-in-out"
|
|
7816
|
-
}, views == null ? void 0 : views.columnBody), column.cards.
|
|
7817
|
-
padding: 12,
|
|
7818
|
-
borderWidth: "1px",
|
|
7819
|
-
borderStyle: "dashed",
|
|
7820
|
-
borderColor: "#d0d5dd",
|
|
7821
|
-
borderRadius: 8,
|
|
7822
|
-
backgroundColor: "rgba(255, 255, 255, 0.6)",
|
|
7823
|
-
textAlign: "center",
|
|
7824
|
-
color: "#667085",
|
|
7825
|
-
fontSize: "14px"
|
|
7826
|
-
}, views == null ? void 0 : views.emptyState), renderEmptyState ? renderEmptyState(column) : (/*#__PURE__*/React.createElement(Text, {
|
|
7827
|
-
size: "sm",
|
|
7828
|
-
color: "#667085"
|
|
7829
|
-
}, "Drop cards here")))), column.cards.map(card => (/*#__PURE__*/React.createElement(View, {
|
|
7969
|
+
}, views == null ? void 0 : views.columnBody), column.cards.map(card => (/*#__PURE__*/React.createElement(View, {
|
|
7830
7970
|
key: card.id,
|
|
7831
7971
|
position: "relative"
|
|
7832
7972
|
}, /*#__PURE__*/React.createElement(View, Object.assign({
|
|
@@ -7846,7 +7986,35 @@ var KanbanBoardView = _ref => {
|
|
|
7846
7986
|
event.stopPropagation();
|
|
7847
7987
|
onCardDrop(column.id, card.id, event);
|
|
7848
7988
|
}
|
|
7849
|
-
}, views == null ? void 0 : views.card),
|
|
7989
|
+
}, views == null ? void 0 : views.card), /*#__PURE__*/React.createElement(View, {
|
|
7990
|
+
display: "flex",
|
|
7991
|
+
justifyContent: "space-between",
|
|
7992
|
+
alignItems: "flex-start"
|
|
7993
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
7994
|
+
flexGrow: 1
|
|
7995
|
+
}, renderCard ? renderCard(card, column) : renderDefaultCard(card, column)), /*#__PURE__*/React.createElement(View, {
|
|
7996
|
+
onClick: () => onCardDelete == null ? void 0 : onCardDelete(card, column)
|
|
7997
|
+
}, /*#__PURE__*/React.createElement(TrashIcon, {
|
|
7998
|
+
widthHeight: 16
|
|
7999
|
+
}))))))), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
8000
|
+
padding: 12,
|
|
8001
|
+
borderWidth: "1px",
|
|
8002
|
+
borderStyle: "dashed",
|
|
8003
|
+
borderColor: "#d0d5dd",
|
|
8004
|
+
borderRadius: 8,
|
|
8005
|
+
backgroundColor: "rgba(255, 255, 255, 0.6)",
|
|
8006
|
+
textAlign: "center",
|
|
8007
|
+
color: "#667085",
|
|
8008
|
+
fontSize: "14px"
|
|
8009
|
+
}, views == null ? void 0 : views.emptyState, {
|
|
8010
|
+
onClick: () => onCardCreate == null ? void 0 : onCardCreate({
|
|
8011
|
+
id: "new-card-" + Date.now(),
|
|
8012
|
+
title: 'Nouvelle carte'
|
|
8013
|
+
}, column)
|
|
8014
|
+
}), renderEmptyState ? renderEmptyState(column) : (/*#__PURE__*/React.createElement(Text, {
|
|
8015
|
+
size: "sm",
|
|
8016
|
+
color: "#667085"
|
|
8017
|
+
}, "Create a new card")))), column.footer && (/*#__PURE__*/React.createElement(View, Object.assign({}, views == null ? void 0 : views.columnFooter), column.footer))))));
|
|
7850
8018
|
};
|
|
7851
8019
|
|
|
7852
8020
|
var KanbanBoardComponent = props => {
|
|
@@ -8273,11 +8441,111 @@ var iconButtonStyles = {
|
|
|
8273
8441
|
border: 'none'
|
|
8274
8442
|
};
|
|
8275
8443
|
|
|
8276
|
-
var
|
|
8444
|
+
var EventContent = _ref => {
|
|
8445
|
+
var {
|
|
8446
|
+
event,
|
|
8447
|
+
onTitleChange,
|
|
8448
|
+
onDescriptionChange,
|
|
8449
|
+
onEventDelete
|
|
8450
|
+
} = _ref;
|
|
8451
|
+
var [isEditingTitle, setIsEditingTitle] = useState(false);
|
|
8452
|
+
var [editedTitle, setEditedTitle] = useState(event.title);
|
|
8453
|
+
var [isEditingDescription, setIsEditingDescription] = useState(false);
|
|
8454
|
+
var [editedDescription, setEditedDescription] = useState(event.description || '');
|
|
8455
|
+
var handleTitleClick = useCallback(() => {
|
|
8456
|
+
setIsEditingTitle(true);
|
|
8457
|
+
setEditedTitle(event.title);
|
|
8458
|
+
}, [event.title]);
|
|
8459
|
+
var handleDescriptionClick = useCallback(() => {
|
|
8460
|
+
setIsEditingDescription(true);
|
|
8461
|
+
setEditedDescription(event.description || '');
|
|
8462
|
+
}, [event.description]);
|
|
8463
|
+
var handleTitleChange = useCallback(e => {
|
|
8464
|
+
setEditedTitle(e.target.value);
|
|
8465
|
+
}, []);
|
|
8466
|
+
var handleDescriptionChange = useCallback(e => {
|
|
8467
|
+
setEditedDescription(e.target.value);
|
|
8468
|
+
}, []);
|
|
8469
|
+
var handleTitleBlur = useCallback(() => {
|
|
8470
|
+
if (isEditingTitle) {
|
|
8471
|
+
onTitleChange(event, editedTitle);
|
|
8472
|
+
setIsEditingTitle(false);
|
|
8473
|
+
}
|
|
8474
|
+
}, [isEditingTitle, onTitleChange, event, editedTitle]);
|
|
8475
|
+
var handleDescriptionBlur = useCallback(() => {
|
|
8476
|
+
if (isEditingDescription) {
|
|
8477
|
+
onDescriptionChange(event, editedDescription);
|
|
8478
|
+
setIsEditingDescription(false);
|
|
8479
|
+
}
|
|
8480
|
+
}, [isEditingDescription, onDescriptionChange, event, editedDescription]);
|
|
8481
|
+
var handleTitleKeyDown = useCallback(e => {
|
|
8482
|
+
if (e.key === 'Enter') {
|
|
8483
|
+
handleTitleBlur();
|
|
8484
|
+
}
|
|
8485
|
+
}, [handleTitleBlur]);
|
|
8486
|
+
var handleDescriptionKeyDown = useCallback(e => {
|
|
8487
|
+
if (e.key === 'Enter' && !e.shiftKey) {
|
|
8488
|
+
e.preventDefault();
|
|
8489
|
+
handleDescriptionBlur();
|
|
8490
|
+
}
|
|
8491
|
+
}, [handleDescriptionBlur]);
|
|
8492
|
+
return /*#__PURE__*/React.createElement(Horizontal, {
|
|
8493
|
+
overflow: "hidden",
|
|
8494
|
+
textOverflow: "ellipsis",
|
|
8495
|
+
whiteSpace: "nowrap",
|
|
8496
|
+
width: "100%",
|
|
8497
|
+
justifyContent: "space-between"
|
|
8498
|
+
}, isEditingTitle ? (/*#__PURE__*/React.createElement("input", {
|
|
8499
|
+
type: "text",
|
|
8500
|
+
value: editedTitle,
|
|
8501
|
+
onChange: handleTitleChange,
|
|
8502
|
+
onBlur: handleTitleBlur,
|
|
8503
|
+
onKeyDown: handleTitleKeyDown,
|
|
8504
|
+
autoFocus: true,
|
|
8505
|
+
style: {
|
|
8506
|
+
border: '1px solid #d0d5dd',
|
|
8507
|
+
borderRadius: '4px',
|
|
8508
|
+
padding: '2px 4px',
|
|
8509
|
+
fontSize: '11px',
|
|
8510
|
+
fontWeight: '500',
|
|
8511
|
+
width: '100%'
|
|
8512
|
+
}
|
|
8513
|
+
})) : (/*#__PURE__*/React.createElement(Text$1, {
|
|
8514
|
+
fontSize: 11,
|
|
8515
|
+
fontWeight: 500,
|
|
8516
|
+
onClick: handleTitleClick
|
|
8517
|
+
}, event.title)), event.description && (isEditingDescription ? (/*#__PURE__*/React.createElement("textarea", {
|
|
8518
|
+
value: editedDescription,
|
|
8519
|
+
onChange: handleDescriptionChange,
|
|
8520
|
+
onBlur: handleDescriptionBlur,
|
|
8521
|
+
onKeyDown: handleDescriptionKeyDown,
|
|
8522
|
+
autoFocus: true,
|
|
8523
|
+
style: {
|
|
8524
|
+
border: '1px solid #d0d5dd',
|
|
8525
|
+
borderRadius: '4px',
|
|
8526
|
+
padding: '2px 4px',
|
|
8527
|
+
fontSize: '11px',
|
|
8528
|
+
width: '100%',
|
|
8529
|
+
minHeight: '40px',
|
|
8530
|
+
marginTop: '4px'
|
|
8531
|
+
}
|
|
8532
|
+
})) : (/*#__PURE__*/React.createElement(Text$1, {
|
|
8533
|
+
fontSize: 11,
|
|
8534
|
+
color: "color.gray.600",
|
|
8535
|
+
onClick: handleDescriptionClick
|
|
8536
|
+
}, event.description))), /*#__PURE__*/React.createElement(Center, {
|
|
8537
|
+
onClick: () => onEventDelete(event),
|
|
8538
|
+
cursor: "pointer",
|
|
8539
|
+
marginLeft: 4
|
|
8540
|
+
}, /*#__PURE__*/React.createElement(TrashIcon, {
|
|
8541
|
+
widthHeight: 12
|
|
8542
|
+
})));
|
|
8543
|
+
};
|
|
8544
|
+
var ResizeHandle = _ref2 => {
|
|
8277
8545
|
var {
|
|
8278
8546
|
direction,
|
|
8279
8547
|
onMouseDown
|
|
8280
|
-
} =
|
|
8548
|
+
} = _ref2;
|
|
8281
8549
|
var [isHovered, setIsHovered] = useState(false);
|
|
8282
8550
|
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
8283
8551
|
position: "absolute",
|
|
@@ -8302,7 +8570,7 @@ var ResizeHandle = _ref => {
|
|
|
8302
8570
|
var MONTH_EVENT_ROW_HEIGHT = 22;
|
|
8303
8571
|
var MONTH_EVENT_ROW_GAP = 4;
|
|
8304
8572
|
var MONTH_EVENT_TOP_OFFSET = 32;
|
|
8305
|
-
var Calendar =
|
|
8573
|
+
var Calendar = _ref3 => {
|
|
8306
8574
|
var {
|
|
8307
8575
|
initialDate = new Date(),
|
|
8308
8576
|
initialView = 'month',
|
|
@@ -8314,11 +8582,14 @@ var Calendar = _ref2 => {
|
|
|
8314
8582
|
onDateChange,
|
|
8315
8583
|
onViewChange,
|
|
8316
8584
|
onEventAdd,
|
|
8585
|
+
onEventTitleChange,
|
|
8586
|
+
onEventDescriptionChange,
|
|
8587
|
+
onEventDelete,
|
|
8317
8588
|
views = {},
|
|
8318
8589
|
width = '100%',
|
|
8319
8590
|
maxWidth = 1200,
|
|
8320
8591
|
weekStartsOn = 0
|
|
8321
|
-
} =
|
|
8592
|
+
} = _ref3;
|
|
8322
8593
|
var {
|
|
8323
8594
|
getColor
|
|
8324
8595
|
} = useTheme();
|
|
@@ -8345,6 +8616,31 @@ var Calendar = _ref2 => {
|
|
|
8345
8616
|
React.useEffect(() => {
|
|
8346
8617
|
setLocalEvents(events);
|
|
8347
8618
|
}, [events]);
|
|
8619
|
+
var handleEventTitleChange = useCallback((event, newTitle) => {
|
|
8620
|
+
if (onEventTitleChange) {
|
|
8621
|
+
onEventTitleChange(event, newTitle);
|
|
8622
|
+
return;
|
|
8623
|
+
}
|
|
8624
|
+
setLocalEvents(prevEvents => prevEvents.map(ev => ev.id === event.id ? Object.assign({}, ev, {
|
|
8625
|
+
title: newTitle
|
|
8626
|
+
}) : ev));
|
|
8627
|
+
}, [onEventTitleChange]);
|
|
8628
|
+
var handleEventDescriptionChange = useCallback((event, newDescription) => {
|
|
8629
|
+
if (onEventDescriptionChange) {
|
|
8630
|
+
onEventDescriptionChange(event, newDescription);
|
|
8631
|
+
return;
|
|
8632
|
+
}
|
|
8633
|
+
setLocalEvents(prevEvents => prevEvents.map(ev => ev.id === event.id ? Object.assign({}, ev, {
|
|
8634
|
+
description: newDescription
|
|
8635
|
+
}) : ev));
|
|
8636
|
+
}, [onEventDescriptionChange]);
|
|
8637
|
+
var handleEventDelete = useCallback(event => {
|
|
8638
|
+
if (onEventDelete) {
|
|
8639
|
+
onEventDelete(event);
|
|
8640
|
+
return;
|
|
8641
|
+
}
|
|
8642
|
+
setLocalEvents(prevEvents => prevEvents.filter(ev => ev.id !== event.id));
|
|
8643
|
+
}, [onEventDelete]);
|
|
8348
8644
|
// Get the month start for current date
|
|
8349
8645
|
var currentMonth = useMemo(() => getFirstDayOfMonth(currentDate), [currentDate]);
|
|
8350
8646
|
// Generate calendar dates based on view
|
|
@@ -8705,12 +9001,12 @@ var Calendar = _ref2 => {
|
|
|
8705
9001
|
top: event.segmentRow * (MONTH_EVENT_ROW_HEIGHT + MONTH_EVENT_ROW_GAP) + "px",
|
|
8706
9002
|
onMouseDown: e => handleEventMouseDown(e, event),
|
|
8707
9003
|
title: event.title
|
|
8708
|
-
}, views.event), /*#__PURE__*/React.createElement(
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
}
|
|
9004
|
+
}, views.event), /*#__PURE__*/React.createElement(EventContent, {
|
|
9005
|
+
event: event,
|
|
9006
|
+
onTitleChange: handleEventTitleChange,
|
|
9007
|
+
onDescriptionChange: handleEventDescriptionChange,
|
|
9008
|
+
onEventDelete: handleEventDelete
|
|
9009
|
+
}), showLeftHandle && (/*#__PURE__*/React.createElement(ResizeHandle, {
|
|
8714
9010
|
direction: "left",
|
|
8715
9011
|
onMouseDown: e => handleResizeStart(e, event, 'left')
|
|
8716
9012
|
})), showRightHandle && (/*#__PURE__*/React.createElement(ResizeHandle, {
|
|
@@ -8771,12 +9067,12 @@ var Calendar = _ref2 => {
|
|
|
8771
9067
|
userSelect: "none",
|
|
8772
9068
|
onMouseDown: e => handleEventMouseDown(e, event),
|
|
8773
9069
|
title: event.title
|
|
8774
|
-
}, views.event), /*#__PURE__*/React.createElement(
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
}
|
|
9070
|
+
}, views.event), /*#__PURE__*/React.createElement(EventContent, {
|
|
9071
|
+
event: event,
|
|
9072
|
+
onTitleChange: handleEventTitleChange,
|
|
9073
|
+
onDescriptionChange: handleEventDescriptionChange,
|
|
9074
|
+
onEventDelete: handleEventDelete
|
|
9075
|
+
}), /*#__PURE__*/React.createElement(ResizeHandle, {
|
|
8780
9076
|
direction: "left",
|
|
8781
9077
|
onMouseDown: e => handleResizeStart(e, event, 'left')
|
|
8782
9078
|
}), /*#__PURE__*/React.createElement(ResizeHandle, {
|
|
@@ -8823,7 +9119,7 @@ var Calendar = _ref2 => {
|
|
|
8823
9119
|
}, views.timeSlot), dayEvents.filter(event => {
|
|
8824
9120
|
// Simple check if event starts in this hour
|
|
8825
9121
|
if (event.start.includes('T')) {
|
|
8826
|
-
var eventHour = parseInt(event.start.split('T')
|
|
9122
|
+
var eventHour = parseInt(event.start.split('T').split(':'));
|
|
8827
9123
|
return eventHour === hour;
|
|
8828
9124
|
}
|
|
8829
9125
|
return false;
|
|
@@ -8836,7 +9132,12 @@ var Calendar = _ref2 => {
|
|
|
8836
9132
|
borderLeftColor: colorConfig.border,
|
|
8837
9133
|
color: colorConfig.text,
|
|
8838
9134
|
marginBottom: 4
|
|
8839
|
-
}, views.event),
|
|
9135
|
+
}, views.event), /*#__PURE__*/React.createElement(EventContent, {
|
|
9136
|
+
event: event,
|
|
9137
|
+
onTitleChange: handleEventTitleChange,
|
|
9138
|
+
onDescriptionChange: handleEventDescriptionChange,
|
|
9139
|
+
onEventDelete: handleEventDelete
|
|
9140
|
+
}));
|
|
8840
9141
|
})));
|
|
8841
9142
|
}));
|
|
8842
9143
|
};
|
|
@@ -19528,6 +19829,404 @@ NavigationMenu.Trigger = NavigationMenuTrigger;
|
|
|
19528
19829
|
NavigationMenu.Content = NavigationMenuContent;
|
|
19529
19830
|
NavigationMenu.Link = NavigationMenuLink;
|
|
19530
19831
|
|
|
19832
|
+
var _excluded$X = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
19833
|
+
var ProgressBarView = _ref => {
|
|
19834
|
+
var {
|
|
19835
|
+
value = 0,
|
|
19836
|
+
max = 100,
|
|
19837
|
+
color = 'theme.primary',
|
|
19838
|
+
backgroundColor = 'color.gray.200',
|
|
19839
|
+
height = 8,
|
|
19840
|
+
radius = 4,
|
|
19841
|
+
views,
|
|
19842
|
+
themeMode: elementMode
|
|
19843
|
+
} = _ref,
|
|
19844
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$X);
|
|
19845
|
+
var {
|
|
19846
|
+
getColor,
|
|
19847
|
+
themeMode
|
|
19848
|
+
} = useTheme();
|
|
19849
|
+
var currentMode = elementMode ? elementMode : themeMode;
|
|
19850
|
+
var percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
19851
|
+
var trackColor = getColor(backgroundColor, {
|
|
19852
|
+
themeMode: currentMode
|
|
19853
|
+
});
|
|
19854
|
+
var barColor = getColor(color, {
|
|
19855
|
+
themeMode: currentMode
|
|
19856
|
+
});
|
|
19857
|
+
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
19858
|
+
role: "progressbar",
|
|
19859
|
+
"aria-valuenow": value,
|
|
19860
|
+
"aria-valuemin": 0,
|
|
19861
|
+
"aria-valuemax": max,
|
|
19862
|
+
width: "100%",
|
|
19863
|
+
height: height,
|
|
19864
|
+
backgroundColor: trackColor,
|
|
19865
|
+
borderRadius: radius,
|
|
19866
|
+
overflow: "hidden"
|
|
19867
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
19868
|
+
width: percentage + "%",
|
|
19869
|
+
height: "100%",
|
|
19870
|
+
backgroundColor: barColor,
|
|
19871
|
+
borderRadius: radius
|
|
19872
|
+
}, views == null ? void 0 : views.bar)));
|
|
19873
|
+
};
|
|
19874
|
+
|
|
19875
|
+
/**
|
|
19876
|
+
* ProgressBar component displays completion status of a task or process.
|
|
19877
|
+
*/
|
|
19878
|
+
var ProgressBarComponent = props => (/*#__PURE__*/React.createElement(ProgressBarView, Object.assign({}, props)));
|
|
19879
|
+
var ProgressBar = ProgressBarComponent;
|
|
19880
|
+
|
|
19881
|
+
var getThemes$2 = themeMode => {
|
|
19882
|
+
return {
|
|
19883
|
+
default: {
|
|
19884
|
+
indicator: {
|
|
19885
|
+
backgroundColor: 'color.gray.400'
|
|
19886
|
+
},
|
|
19887
|
+
label: {
|
|
19888
|
+
color: 'color.gray.700'
|
|
19889
|
+
}
|
|
19890
|
+
},
|
|
19891
|
+
info: {
|
|
19892
|
+
indicator: {
|
|
19893
|
+
backgroundColor: 'color.blue.500'
|
|
19894
|
+
},
|
|
19895
|
+
label: {
|
|
19896
|
+
color: 'color.blue.700'
|
|
19897
|
+
}
|
|
19898
|
+
},
|
|
19899
|
+
success: {
|
|
19900
|
+
indicator: {
|
|
19901
|
+
backgroundColor: 'color.green.500'
|
|
19902
|
+
},
|
|
19903
|
+
label: {
|
|
19904
|
+
color: 'color.green.700'
|
|
19905
|
+
}
|
|
19906
|
+
},
|
|
19907
|
+
warning: {
|
|
19908
|
+
indicator: {
|
|
19909
|
+
backgroundColor: 'color.orange.500'
|
|
19910
|
+
},
|
|
19911
|
+
label: {
|
|
19912
|
+
color: 'color.orange.700'
|
|
19913
|
+
}
|
|
19914
|
+
},
|
|
19915
|
+
error: {
|
|
19916
|
+
indicator: {
|
|
19917
|
+
backgroundColor: 'color.red.500'
|
|
19918
|
+
},
|
|
19919
|
+
label: {
|
|
19920
|
+
color: 'color.red.700'
|
|
19921
|
+
}
|
|
19922
|
+
}
|
|
19923
|
+
};
|
|
19924
|
+
};
|
|
19925
|
+
|
|
19926
|
+
var _excluded$Y = ["label", "status", "views", "themeMode"];
|
|
19927
|
+
var StatusIndicatorView = _ref => {
|
|
19928
|
+
var {
|
|
19929
|
+
label,
|
|
19930
|
+
status = 'default',
|
|
19931
|
+
views,
|
|
19932
|
+
themeMode: elementMode
|
|
19933
|
+
} = _ref,
|
|
19934
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Y);
|
|
19935
|
+
var {
|
|
19936
|
+
themeMode
|
|
19937
|
+
} = useTheme();
|
|
19938
|
+
var themes = getThemes$2();
|
|
19939
|
+
return /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
19940
|
+
alignItems: "center",
|
|
19941
|
+
gap: 8,
|
|
19942
|
+
role: "status-indicator"
|
|
19943
|
+
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
19944
|
+
role: "status-dot",
|
|
19945
|
+
width: "8px",
|
|
19946
|
+
height: "8px",
|
|
19947
|
+
borderRadius: "50%"
|
|
19948
|
+
}, themes[status].indicator, views == null ? void 0 : views.indicator)), label && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
19949
|
+
role: "status-label",
|
|
19950
|
+
fontSize: "14px",
|
|
19951
|
+
lineHeight: "20px"
|
|
19952
|
+
}, themes[status].label, views == null ? void 0 : views.label), label)));
|
|
19953
|
+
};
|
|
19954
|
+
|
|
19955
|
+
var StatusIndicator = props => (/*#__PURE__*/React.createElement(StatusIndicatorView, Object.assign({}, props)));
|
|
19956
|
+
|
|
19957
|
+
var getOKRTheme = mode => {
|
|
19958
|
+
var isDark = mode === 'dark';
|
|
19959
|
+
return {
|
|
19960
|
+
container: {
|
|
19961
|
+
width: '100%',
|
|
19962
|
+
gap: 16
|
|
19963
|
+
},
|
|
19964
|
+
objectiveCard: {
|
|
19965
|
+
backgroundColor: isDark ? 'rgba(15, 23, 42, 0.6)' : 'color.white',
|
|
19966
|
+
borderColor: isDark ? 'rgba(148, 163, 184, 0.24)' : 'color.gray.200',
|
|
19967
|
+
borderWidth: '1px',
|
|
19968
|
+
borderStyle: 'solid',
|
|
19969
|
+
borderRadius: 16,
|
|
19970
|
+
padding: 24,
|
|
19971
|
+
gap: 20
|
|
19972
|
+
},
|
|
19973
|
+
tag: {
|
|
19974
|
+
display: 'inline-flex',
|
|
19975
|
+
alignItems: 'center',
|
|
19976
|
+
padding: '4px 10px',
|
|
19977
|
+
borderRadius: 999,
|
|
19978
|
+
backgroundColor: isDark ? 'rgba(148, 163, 184, 0.16)' : 'color.gray.100'
|
|
19979
|
+
},
|
|
19980
|
+
keyResultItem: {
|
|
19981
|
+
padding: 16,
|
|
19982
|
+
borderRadius: 12,
|
|
19983
|
+
borderWidth: '1px',
|
|
19984
|
+
borderStyle: 'solid',
|
|
19985
|
+
borderColor: isDark ? 'rgba(148, 163, 184, 0.18)' : 'color.gray.200',
|
|
19986
|
+
backgroundColor: isDark ? 'rgba(15, 23, 42, 0.35)' : 'color.gray.50',
|
|
19987
|
+
gap: 12
|
|
19988
|
+
},
|
|
19989
|
+
divider: {
|
|
19990
|
+
height: 1,
|
|
19991
|
+
backgroundColor: isDark ? 'rgba(148, 163, 184, 0.24)' : 'color.gray.200',
|
|
19992
|
+
width: '100%'
|
|
19993
|
+
}
|
|
19994
|
+
};
|
|
19995
|
+
};
|
|
19996
|
+
var STATUS_METADATA = {
|
|
19997
|
+
notStarted: {
|
|
19998
|
+
indicator: 'info',
|
|
19999
|
+
label: 'Not started'
|
|
20000
|
+
},
|
|
20001
|
+
onTrack: {
|
|
20002
|
+
indicator: 'success',
|
|
20003
|
+
label: 'On track'
|
|
20004
|
+
},
|
|
20005
|
+
atRisk: {
|
|
20006
|
+
indicator: 'warning',
|
|
20007
|
+
label: 'At risk'
|
|
20008
|
+
},
|
|
20009
|
+
offTrack: {
|
|
20010
|
+
indicator: 'error',
|
|
20011
|
+
label: 'Off track'
|
|
20012
|
+
},
|
|
20013
|
+
achieved: {
|
|
20014
|
+
indicator: 'success',
|
|
20015
|
+
label: 'Achieved'
|
|
20016
|
+
}
|
|
20017
|
+
};
|
|
20018
|
+
var deriveStatusFromProgress = progress => {
|
|
20019
|
+
if (progress >= 100) {
|
|
20020
|
+
return 'achieved';
|
|
20021
|
+
}
|
|
20022
|
+
if (progress >= 70) {
|
|
20023
|
+
return 'onTrack';
|
|
20024
|
+
}
|
|
20025
|
+
if (progress >= 40) {
|
|
20026
|
+
return 'atRisk';
|
|
20027
|
+
}
|
|
20028
|
+
if (progress > 0) {
|
|
20029
|
+
return 'offTrack';
|
|
20030
|
+
}
|
|
20031
|
+
return 'notStarted';
|
|
20032
|
+
};
|
|
20033
|
+
var clampProgress = value => {
|
|
20034
|
+
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
20035
|
+
return 0;
|
|
20036
|
+
}
|
|
20037
|
+
return Math.max(0, Math.min(100, Math.round(value)));
|
|
20038
|
+
};
|
|
20039
|
+
|
|
20040
|
+
var formatPercentage = value => value + "%";
|
|
20041
|
+
var formatConfidence = confidence => {
|
|
20042
|
+
if (!confidence) {
|
|
20043
|
+
return undefined;
|
|
20044
|
+
}
|
|
20045
|
+
return confidence.charAt(0).toUpperCase() + confidence.slice(1);
|
|
20046
|
+
};
|
|
20047
|
+
var getObjectiveProgress = objective => {
|
|
20048
|
+
if (typeof objective.progress === 'number') {
|
|
20049
|
+
return clampProgress(objective.progress);
|
|
20050
|
+
}
|
|
20051
|
+
if (!objective.keyResults.length) {
|
|
20052
|
+
return 0;
|
|
20053
|
+
}
|
|
20054
|
+
var total = objective.keyResults.reduce((acc, keyResult) => {
|
|
20055
|
+
var _keyResult$progress;
|
|
20056
|
+
return acc + ((_keyResult$progress = keyResult.progress) != null ? _keyResult$progress : 0);
|
|
20057
|
+
}, 0);
|
|
20058
|
+
return clampProgress(total / objective.keyResults.length);
|
|
20059
|
+
};
|
|
20060
|
+
var renderStatusIndicator = (status, themeMode, views) => {
|
|
20061
|
+
var metadata = STATUS_METADATA[status];
|
|
20062
|
+
return /*#__PURE__*/React.createElement(StatusIndicator, {
|
|
20063
|
+
themeMode: themeMode,
|
|
20064
|
+
status: metadata.indicator,
|
|
20065
|
+
label: metadata.label,
|
|
20066
|
+
views: views
|
|
20067
|
+
});
|
|
20068
|
+
};
|
|
20069
|
+
var OKRView = _ref => {
|
|
20070
|
+
var {
|
|
20071
|
+
objectives,
|
|
20072
|
+
themeMode: elementMode,
|
|
20073
|
+
views,
|
|
20074
|
+
onKeyResultClick,
|
|
20075
|
+
renderObjectiveFooter,
|
|
20076
|
+
renderKeyResultFooter
|
|
20077
|
+
} = _ref;
|
|
20078
|
+
var {
|
|
20079
|
+
themeMode
|
|
20080
|
+
} = useTheme();
|
|
20081
|
+
var currentMode = elementMode || themeMode || 'light';
|
|
20082
|
+
var theme = getOKRTheme(currentMode);
|
|
20083
|
+
var secondaryTextColor = currentMode === 'dark' ? 'color.gray.200' : 'color.gray.600';
|
|
20084
|
+
var subtleTextColor = currentMode === 'dark' ? 'color.gray.300' : 'color.gray.500';
|
|
20085
|
+
var tagTextColor = currentMode === 'dark' ? 'color.gray.100' : 'color.gray.700';
|
|
20086
|
+
return /*#__PURE__*/React.createElement(Vertical, Object.assign({}, theme.container, views == null ? void 0 : views.container), objectives.map(objective => {
|
|
20087
|
+
var _objective$status, _objective$tags, _views$objectiveProgr, _views$objectiveProgr2, _views$objectiveProgr3, _views$objectiveProgr4;
|
|
20088
|
+
var objectiveProgress = getObjectiveProgress(objective);
|
|
20089
|
+
var objectiveStatus = (_objective$status = objective.status) != null ? _objective$status : deriveStatusFromProgress(objectiveProgress);
|
|
20090
|
+
var objectiveFooter = renderObjectiveFooter == null ? void 0 : renderObjectiveFooter(objective);
|
|
20091
|
+
return /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
20092
|
+
key: objective.id
|
|
20093
|
+
}, theme.objectiveCard, views == null ? void 0 : views.objectiveCard), /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20094
|
+
justifyContent: "space-between",
|
|
20095
|
+
alignItems: "flex-start",
|
|
20096
|
+
flexWrap: "wrap",
|
|
20097
|
+
gap: 16
|
|
20098
|
+
}, views == null ? void 0 : views.objectiveHeader), /*#__PURE__*/React.createElement(Vertical, {
|
|
20099
|
+
gap: 10,
|
|
20100
|
+
minWidth: 240
|
|
20101
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20102
|
+
size: "lg",
|
|
20103
|
+
weight: "semiBold"
|
|
20104
|
+
}, views == null ? void 0 : views.objectiveTitle), objective.title), objective.description && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20105
|
+
size: "sm",
|
|
20106
|
+
color: secondaryTextColor
|
|
20107
|
+
}, views == null ? void 0 : views.objectiveDescription), objective.description)), (_objective$tags = objective.tags) != null && _objective$tags.length ? (/*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20108
|
+
gap: 8,
|
|
20109
|
+
flexWrap: "wrap"
|
|
20110
|
+
}, views == null ? void 0 : views.objectiveTags), objective.tags.map(tag => (/*#__PURE__*/React.createElement(View, Object.assign({
|
|
20111
|
+
key: tag
|
|
20112
|
+
}, theme.tag, views == null ? void 0 : views.tag), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20113
|
+
size: "xs",
|
|
20114
|
+
weight: "medium",
|
|
20115
|
+
color: tagTextColor
|
|
20116
|
+
}, views == null ? void 0 : views.tagText), tag)))))) : null), /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
20117
|
+
gap: 8,
|
|
20118
|
+
alignItems: "flex-end",
|
|
20119
|
+
minWidth: 160
|
|
20120
|
+
}, views == null ? void 0 : views.objectiveMeta), objective.owner && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20121
|
+
size: "sm",
|
|
20122
|
+
color: secondaryTextColor
|
|
20123
|
+
}, views == null ? void 0 : views.objectiveOwner), "Owner: ", objective.owner)), objective.timeframe && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20124
|
+
size: "sm",
|
|
20125
|
+
color: subtleTextColor
|
|
20126
|
+
}, views == null ? void 0 : views.objectiveTimeframe), objective.timeframe)), renderStatusIndicator(objectiveStatus, currentMode, views == null ? void 0 : views.objectiveStatus))), /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
20127
|
+
gap: 8
|
|
20128
|
+
}, views == null ? void 0 : views.objectiveProgressSection), /*#__PURE__*/React.createElement(Horizontal, {
|
|
20129
|
+
justifyContent: "space-between",
|
|
20130
|
+
alignItems: "center"
|
|
20131
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20132
|
+
size: "sm",
|
|
20133
|
+
color: secondaryTextColor
|
|
20134
|
+
}, views == null ? void 0 : views.objectiveProgressLabel), "Progress"), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20135
|
+
size: "sm",
|
|
20136
|
+
weight: "semiBold"
|
|
20137
|
+
}, views == null ? void 0 : views.objectiveProgressValue), formatPercentage(objectiveProgress))), /*#__PURE__*/React.createElement(ProgressBar, {
|
|
20138
|
+
value: objectiveProgress,
|
|
20139
|
+
max: 100,
|
|
20140
|
+
views: {
|
|
20141
|
+
container: Object.assign({
|
|
20142
|
+
width: '100%'
|
|
20143
|
+
}, (_views$objectiveProgr = views == null || (_views$objectiveProgr2 = views.objectiveProgressBar) == null ? void 0 : _views$objectiveProgr2.container) != null ? _views$objectiveProgr : {}),
|
|
20144
|
+
bar: Object.assign({}, (_views$objectiveProgr3 = views == null || (_views$objectiveProgr4 = views.objectiveProgressBar) == null ? void 0 : _views$objectiveProgr4.bar) != null ? _views$objectiveProgr3 : {})
|
|
20145
|
+
}
|
|
20146
|
+
})), /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
20147
|
+
gap: 16
|
|
20148
|
+
}, views == null ? void 0 : views.keyResultList), objective.keyResults.map((keyResult, index) => {
|
|
20149
|
+
var _keyResult$status, _keyResult$tags, _views$keyResultProgr, _views$keyResultProgr2, _views$keyResultProgr3, _views$keyResultProgr4;
|
|
20150
|
+
var progress = clampProgress(keyResult.progress);
|
|
20151
|
+
var keyResultStatus = (_keyResult$status = keyResult.status) != null ? _keyResult$status : deriveStatusFromProgress(progress);
|
|
20152
|
+
var keyResultFooter = renderKeyResultFooter == null ? void 0 : renderKeyResultFooter(keyResult, objective);
|
|
20153
|
+
var showDivider = index < objective.keyResults.length - 1;
|
|
20154
|
+
return /*#__PURE__*/React.createElement(Vertical, {
|
|
20155
|
+
key: keyResult.id,
|
|
20156
|
+
gap: 12
|
|
20157
|
+
}, /*#__PURE__*/React.createElement(Vertical, Object.assign({
|
|
20158
|
+
role: onKeyResultClick ? 'button' : undefined,
|
|
20159
|
+
cursor: onKeyResultClick ? 'pointer' : undefined,
|
|
20160
|
+
onClick: onKeyResultClick ? () => onKeyResultClick(keyResult, objective) : undefined
|
|
20161
|
+
}, theme.keyResultItem, views == null ? void 0 : views.keyResultItem), /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20162
|
+
justifyContent: "space-between",
|
|
20163
|
+
alignItems: "flex-start",
|
|
20164
|
+
flexWrap: "wrap",
|
|
20165
|
+
gap: 16
|
|
20166
|
+
}, views == null ? void 0 : views.keyResultHeader), /*#__PURE__*/React.createElement(Vertical, {
|
|
20167
|
+
gap: 8,
|
|
20168
|
+
minWidth: 220
|
|
20169
|
+
}, /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20170
|
+
size: "md",
|
|
20171
|
+
weight: "medium"
|
|
20172
|
+
}, views == null ? void 0 : views.keyResultTitle), keyResult.title), keyResult.description && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20173
|
+
size: "sm",
|
|
20174
|
+
color: secondaryTextColor
|
|
20175
|
+
}, views == null ? void 0 : views.keyResultDescription), keyResult.description)), (keyResult.metric || keyResult.target || keyResult.current || keyResult.confidence || keyResult.lastUpdated) && (/*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20176
|
+
gap: 12,
|
|
20177
|
+
flexWrap: "wrap"
|
|
20178
|
+
}, views == null ? void 0 : views.keyResultMeta), keyResult.metric && (/*#__PURE__*/React.createElement(Text, {
|
|
20179
|
+
size: "xs",
|
|
20180
|
+
color: secondaryTextColor
|
|
20181
|
+
}, "Metric: ", keyResult.metric)), keyResult.current && (/*#__PURE__*/React.createElement(Text, {
|
|
20182
|
+
size: "xs",
|
|
20183
|
+
color: secondaryTextColor
|
|
20184
|
+
}, "Current: ", keyResult.current)), keyResult.target && (/*#__PURE__*/React.createElement(Text, {
|
|
20185
|
+
size: "xs",
|
|
20186
|
+
color: secondaryTextColor
|
|
20187
|
+
}, "Target: ", keyResult.target)), keyResult.confidence && (/*#__PURE__*/React.createElement(Text, {
|
|
20188
|
+
size: "xs",
|
|
20189
|
+
color: secondaryTextColor
|
|
20190
|
+
}, "Confidence:", ' ', formatConfidence(keyResult.confidence))), keyResult.lastUpdated && (/*#__PURE__*/React.createElement(Text, {
|
|
20191
|
+
size: "xs",
|
|
20192
|
+
color: subtleTextColor
|
|
20193
|
+
}, "Updated: ", keyResult.lastUpdated)))), (_keyResult$tags = keyResult.tags) != null && _keyResult$tags.length ? (/*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20194
|
+
gap: 8,
|
|
20195
|
+
flexWrap: "wrap"
|
|
20196
|
+
}, views == null ? void 0 : views.keyResultTags), keyResult.tags.map(tag => (/*#__PURE__*/React.createElement(View, Object.assign({
|
|
20197
|
+
key: tag
|
|
20198
|
+
}, theme.tag, views == null ? void 0 : views.keyResultTag), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20199
|
+
size: "xs",
|
|
20200
|
+
weight: "medium",
|
|
20201
|
+
color: tagTextColor
|
|
20202
|
+
}, views == null ? void 0 : views.keyResultTagText), tag)))))) : null), /*#__PURE__*/React.createElement(Vertical, {
|
|
20203
|
+
gap: 8,
|
|
20204
|
+
alignItems: "flex-end"
|
|
20205
|
+
}, keyResult.owner && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20206
|
+
size: "xs",
|
|
20207
|
+
color: secondaryTextColor
|
|
20208
|
+
}, views == null ? void 0 : views.keyResultOwner), "Owner: ", keyResult.owner)), renderStatusIndicator(keyResultStatus, currentMode, views == null ? void 0 : views.keyResultStatus))), /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
20209
|
+
alignItems: "center",
|
|
20210
|
+
gap: 12
|
|
20211
|
+
}, views == null ? void 0 : views.keyResultProgressSection), /*#__PURE__*/React.createElement(ProgressBar, {
|
|
20212
|
+
value: progress,
|
|
20213
|
+
max: 100,
|
|
20214
|
+
views: {
|
|
20215
|
+
container: Object.assign({
|
|
20216
|
+
width: '100%'
|
|
20217
|
+
}, (_views$keyResultProgr = views == null || (_views$keyResultProgr2 = views.keyResultProgressBar) == null ? void 0 : _views$keyResultProgr2.container) != null ? _views$keyResultProgr : {}),
|
|
20218
|
+
bar: Object.assign({}, (_views$keyResultProgr3 = views == null || (_views$keyResultProgr4 = views.keyResultProgressBar) == null ? void 0 : _views$keyResultProgr4.bar) != null ? _views$keyResultProgr3 : {})
|
|
20219
|
+
}
|
|
20220
|
+
}), /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
20221
|
+
size: "xs",
|
|
20222
|
+
weight: "semiBold"
|
|
20223
|
+
}, views == null ? void 0 : views.keyResultProgressValue), formatPercentage(progress))), keyResultFooter ? (/*#__PURE__*/React.createElement(View, Object.assign({}, views == null ? void 0 : views.footer), keyResultFooter)) : null), showDivider ? /*#__PURE__*/React.createElement(View, Object.assign({}, theme.divider)) : null);
|
|
20224
|
+
})), objectiveFooter ? (/*#__PURE__*/React.createElement(View, Object.assign({}, views == null ? void 0 : views.footer), objectiveFooter)) : null);
|
|
20225
|
+
}));
|
|
20226
|
+
};
|
|
20227
|
+
|
|
20228
|
+
var OKR = props => /*#__PURE__*/React.createElement(OKRView, Object.assign({}, props));
|
|
20229
|
+
|
|
19531
20230
|
var defaultStyles = {};
|
|
19532
20231
|
// Create a context that includes both styles and the onClick function
|
|
19533
20232
|
var TableContext = /*#__PURE__*/createContext({
|
|
@@ -20310,7 +21009,7 @@ var HighlightStyles = {
|
|
|
20310
21009
|
})
|
|
20311
21010
|
};
|
|
20312
21011
|
|
|
20313
|
-
var _excluded$
|
|
21012
|
+
var _excluded$Z = ["text", "typingSpeed", "pauseTime", "onComplete", "showCursor", "cursorColor", "textStyle", "as"];
|
|
20314
21013
|
/**
|
|
20315
21014
|
* A component that creates a typewriter effect for text
|
|
20316
21015
|
*/
|
|
@@ -20324,7 +21023,7 @@ var TypewriterEffect = _ref => {
|
|
|
20324
21023
|
cursorColor = 'currentColor',
|
|
20325
21024
|
textStyle
|
|
20326
21025
|
} = _ref,
|
|
20327
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
21026
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$Z);
|
|
20328
21027
|
// Convert text to array if it's a string
|
|
20329
21028
|
var textArray = Array.isArray(text) ? text : [text];
|
|
20330
21029
|
// State for the currently displayed text
|
|
@@ -20391,7 +21090,7 @@ var TypewriterEffect = _ref => {
|
|
|
20391
21090
|
}))))));
|
|
20392
21091
|
};
|
|
20393
21092
|
|
|
20394
|
-
var _excluded$
|
|
21093
|
+
var _excluded$_ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "centered", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration"];
|
|
20395
21094
|
function escapeRegExp(string) {
|
|
20396
21095
|
return string.replace(/[.*+?^${}()|[\\]\\/g, '\\$&');
|
|
20397
21096
|
}
|
|
@@ -20413,7 +21112,7 @@ var TitleView = _ref => {
|
|
|
20413
21112
|
highlightTypewriter: propHighlightTypewriter = false,
|
|
20414
21113
|
highlightTypewriterDuration = 3000
|
|
20415
21114
|
} = _ref,
|
|
20416
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
21115
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$_);
|
|
20417
21116
|
var {
|
|
20418
21117
|
ref,
|
|
20419
21118
|
inView
|
|
@@ -20688,7 +21387,7 @@ var getToggleVariants = (color, isLight) => ({
|
|
|
20688
21387
|
}
|
|
20689
21388
|
});
|
|
20690
21389
|
|
|
20691
|
-
var _excluded
|
|
21390
|
+
var _excluded$$ = ["children", "shape", "variant", "isHovered", "setIsHovered", "isDisabled", "isToggle", "setIsToggled", "onToggle", "views", "backgroundColor", "color", "themeMode"];
|
|
20692
21391
|
var ToggleView = _ref => {
|
|
20693
21392
|
var _ref2;
|
|
20694
21393
|
var {
|
|
@@ -20708,7 +21407,7 @@ var ToggleView = _ref => {
|
|
|
20708
21407
|
// 2nd candidate for main color
|
|
20709
21408
|
themeMode: elementMode
|
|
20710
21409
|
} = _ref,
|
|
20711
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded
|
|
21410
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$$);
|
|
20712
21411
|
/* theme helpers */
|
|
20713
21412
|
var {
|
|
20714
21413
|
getColor,
|
|
@@ -20752,7 +21451,7 @@ var ToggleView = _ref => {
|
|
|
20752
21451
|
}, props, views == null ? void 0 : views.container), children);
|
|
20753
21452
|
};
|
|
20754
21453
|
|
|
20755
|
-
var _excluded$
|
|
21454
|
+
var _excluded$10 = ["children", "shape", "variant", "isDisabled", "isToggled", "onToggle"];
|
|
20756
21455
|
// Destructuring properties from ToggleProps to be used within the ToggleComponent.
|
|
20757
21456
|
var ToggleComponent = _ref => {
|
|
20758
21457
|
var {
|
|
@@ -20764,7 +21463,7 @@ var ToggleComponent = _ref => {
|
|
|
20764
21463
|
isToggled = false,
|
|
20765
21464
|
onToggle
|
|
20766
21465
|
} = _ref,
|
|
20767
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
21466
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$10);
|
|
20768
21467
|
// Initializing toggle state and set state functions using the custom hook useToggleState.
|
|
20769
21468
|
var {
|
|
20770
21469
|
isHovered,
|
|
@@ -21099,7 +21798,7 @@ var DropdownMenuItemStates = {
|
|
|
21099
21798
|
}
|
|
21100
21799
|
};
|
|
21101
21800
|
|
|
21102
|
-
var _excluded
|
|
21801
|
+
var _excluded$11 = ["children", "views"],
|
|
21103
21802
|
_excluded2$f = ["items", "side", "align", "views"],
|
|
21104
21803
|
_excluded3$9 = ["item", "views"],
|
|
21105
21804
|
_excluded4$8 = ["views"],
|
|
@@ -21140,7 +21839,7 @@ var DropdownMenuTrigger = _ref2 => {
|
|
|
21140
21839
|
children,
|
|
21141
21840
|
views
|
|
21142
21841
|
} = _ref2,
|
|
21143
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded
|
|
21842
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$11);
|
|
21144
21843
|
var {
|
|
21145
21844
|
isOpen,
|
|
21146
21845
|
setIsOpen,
|
|
@@ -21393,7 +22092,7 @@ var DropdownMenuView = _ref6 => {
|
|
|
21393
22092
|
}));
|
|
21394
22093
|
};
|
|
21395
22094
|
|
|
21396
|
-
var _excluded$
|
|
22095
|
+
var _excluded$12 = ["trigger", "items", "size", "variant", "side", "align", "defaultOpen", "views"];
|
|
21397
22096
|
/**
|
|
21398
22097
|
* DropdownMenu component for displaying a menu when clicking on a trigger element.
|
|
21399
22098
|
*/
|
|
@@ -21408,7 +22107,7 @@ var DropdownMenuComponent = _ref => {
|
|
|
21408
22107
|
defaultOpen = false,
|
|
21409
22108
|
views
|
|
21410
22109
|
} = _ref,
|
|
21411
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
22110
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$12);
|
|
21412
22111
|
var {
|
|
21413
22112
|
isOpen,
|
|
21414
22113
|
setIsOpen,
|
|
@@ -21822,7 +22521,7 @@ var DefaultColorPalette$1 = [
|
|
|
21822
22521
|
category: 'neutral'
|
|
21823
22522
|
}];
|
|
21824
22523
|
|
|
21825
|
-
var _excluded$
|
|
22524
|
+
var _excluded$13 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "predefinedColors", "showCustomInput", "showRecentColors", "isOpen", "selectedColor", "recentColors", "customColor", "handleToggle", "handleColorSelect", "handleCustomColorChange", "handleCustomColorSubmit", "triggerRef", "dropdownRef"];
|
|
21826
22525
|
var ColorPickerView = _ref => {
|
|
21827
22526
|
var {
|
|
21828
22527
|
// Basic props
|
|
@@ -21857,7 +22556,7 @@ var ColorPickerView = _ref => {
|
|
|
21857
22556
|
dropdownRef
|
|
21858
22557
|
// Other props
|
|
21859
22558
|
} = _ref,
|
|
21860
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
22559
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$13);
|
|
21861
22560
|
var {
|
|
21862
22561
|
getColor
|
|
21863
22562
|
} = useTheme();
|
|
@@ -24187,7 +24886,7 @@ var useEmojiPickerState = props => {
|
|
|
24187
24886
|
};
|
|
24188
24887
|
};
|
|
24189
24888
|
|
|
24190
|
-
var _excluded$
|
|
24889
|
+
var _excluded$14 = ["id", "name", "label", "placeholder", "helperText", "views", "size", "shape", "variant", "error", "isDisabled", "isReadOnly", "showSearch", "showCategories", "showRecentEmojis", "enabledCategories", "isOpen", "selectedEmoji", "recentEmojis", "searchQuery", "activeCategory", "filteredEmojis", "handleToggle", "handleEmojiSelect", "handleSearchChange", "handleCategoryChange", "triggerRef", "dropdownRef"];
|
|
24191
24890
|
var EmojiPickerView = _ref => {
|
|
24192
24891
|
var {
|
|
24193
24892
|
// Basic props
|
|
@@ -24225,7 +24924,7 @@ var EmojiPickerView = _ref => {
|
|
|
24225
24924
|
dropdownRef
|
|
24226
24925
|
// Other props
|
|
24227
24926
|
} = _ref,
|
|
24228
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
24927
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$14);
|
|
24229
24928
|
var {
|
|
24230
24929
|
getColor
|
|
24231
24930
|
} = useTheme();
|
|
@@ -24414,7 +25113,7 @@ var MenubarItemStates = {
|
|
|
24414
25113
|
}
|
|
24415
25114
|
};
|
|
24416
25115
|
|
|
24417
|
-
var _excluded$
|
|
25116
|
+
var _excluded$15 = ["children", "orientation", "size", "variant", "views"];
|
|
24418
25117
|
// Create context for the Menubar
|
|
24419
25118
|
var MenubarContext = /*#__PURE__*/createContext({
|
|
24420
25119
|
activeMenuId: null,
|
|
@@ -24451,7 +25150,7 @@ var MenubarRoot = _ref2 => {
|
|
|
24451
25150
|
variant = 'default',
|
|
24452
25151
|
views
|
|
24453
25152
|
} = _ref2,
|
|
24454
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
25153
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$15);
|
|
24455
25154
|
var Container = orientation === 'horizontal' ? Horizontal : Vertical;
|
|
24456
25155
|
return /*#__PURE__*/React.createElement(Container, Object.assign({
|
|
24457
25156
|
role: "menubar",
|
|
@@ -24771,7 +25470,7 @@ var MenubarView = _ref8 => {
|
|
|
24771
25470
|
})))))));
|
|
24772
25471
|
};
|
|
24773
25472
|
|
|
24774
|
-
var _excluded$
|
|
25473
|
+
var _excluded$16 = ["items", "orientation", "size", "variant", "defaultActiveMenuId", "defaultOpenMenuId", "views"];
|
|
24775
25474
|
/**
|
|
24776
25475
|
* Menubar component for creating horizontal or vertical menu bars with dropdown menus.
|
|
24777
25476
|
*/
|
|
@@ -24785,7 +25484,7 @@ var MenubarComponent = _ref => {
|
|
|
24785
25484
|
defaultOpenMenuId = null,
|
|
24786
25485
|
views
|
|
24787
25486
|
} = _ref,
|
|
24788
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
25487
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$16);
|
|
24789
25488
|
var {
|
|
24790
25489
|
activeMenuId,
|
|
24791
25490
|
setActiveMenuId,
|
|
@@ -24967,7 +25666,7 @@ var DisabledButtonStyles = {
|
|
|
24967
25666
|
}
|
|
24968
25667
|
};
|
|
24969
25668
|
|
|
24970
|
-
var _excluded$
|
|
25669
|
+
var _excluded$17 = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "visiblePageNumbers", "views"];
|
|
24971
25670
|
var PaginationView = _ref => {
|
|
24972
25671
|
var {
|
|
24973
25672
|
currentPage,
|
|
@@ -24998,7 +25697,7 @@ var PaginationView = _ref => {
|
|
|
24998
25697
|
visiblePageNumbers,
|
|
24999
25698
|
views
|
|
25000
25699
|
} = _ref,
|
|
25001
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
25700
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$17);
|
|
25002
25701
|
var handlePageChange = page => {
|
|
25003
25702
|
if (page < 1 || page > totalPages || page === currentPage) {
|
|
25004
25703
|
return;
|
|
@@ -25117,7 +25816,7 @@ var PaginationView = _ref => {
|
|
|
25117
25816
|
}, option.label))))));
|
|
25118
25817
|
};
|
|
25119
25818
|
|
|
25120
|
-
var _excluded$
|
|
25819
|
+
var _excluded$18 = ["currentPage", "totalPages", "onPageChange", "pageSize", "pageSizeOptions", "onPageSizeChange", "showPageSizeSelector", "showPageInfo", "maxPageButtons", "showFirstLastButtons", "size", "variant", "shape", "views"];
|
|
25121
25820
|
/**
|
|
25122
25821
|
* Pagination component for navigating through pages of content.
|
|
25123
25822
|
*/
|
|
@@ -25138,7 +25837,7 @@ var PaginationComponent = _ref => {
|
|
|
25138
25837
|
shape = 'rounded',
|
|
25139
25838
|
views
|
|
25140
25839
|
} = _ref,
|
|
25141
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
25840
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$18);
|
|
25142
25841
|
var {
|
|
25143
25842
|
visiblePageNumbers
|
|
25144
25843
|
} = usePaginationState(currentPage, totalPages, maxPageButtons);
|
|
@@ -25162,55 +25861,6 @@ var PaginationComponent = _ref => {
|
|
|
25162
25861
|
};
|
|
25163
25862
|
var Pagination = PaginationComponent;
|
|
25164
25863
|
|
|
25165
|
-
var _excluded$17 = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
|
|
25166
|
-
var ProgressBarView = _ref => {
|
|
25167
|
-
var {
|
|
25168
|
-
value = 0,
|
|
25169
|
-
max = 100,
|
|
25170
|
-
color = 'theme.primary',
|
|
25171
|
-
backgroundColor = 'color.gray.200',
|
|
25172
|
-
height = 8,
|
|
25173
|
-
radius = 4,
|
|
25174
|
-
views,
|
|
25175
|
-
themeMode: elementMode
|
|
25176
|
-
} = _ref,
|
|
25177
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$17);
|
|
25178
|
-
var {
|
|
25179
|
-
getColor,
|
|
25180
|
-
themeMode
|
|
25181
|
-
} = useTheme();
|
|
25182
|
-
var currentMode = elementMode ? elementMode : themeMode;
|
|
25183
|
-
var percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
25184
|
-
var trackColor = getColor(backgroundColor, {
|
|
25185
|
-
themeMode: currentMode
|
|
25186
|
-
});
|
|
25187
|
-
var barColor = getColor(color, {
|
|
25188
|
-
themeMode: currentMode
|
|
25189
|
-
});
|
|
25190
|
-
return /*#__PURE__*/React.createElement(View, Object.assign({
|
|
25191
|
-
role: "progressbar",
|
|
25192
|
-
"aria-valuenow": value,
|
|
25193
|
-
"aria-valuemin": 0,
|
|
25194
|
-
"aria-valuemax": max,
|
|
25195
|
-
width: "100%",
|
|
25196
|
-
height: height,
|
|
25197
|
-
backgroundColor: trackColor,
|
|
25198
|
-
borderRadius: radius,
|
|
25199
|
-
overflow: "hidden"
|
|
25200
|
-
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
25201
|
-
width: percentage + "%",
|
|
25202
|
-
height: "100%",
|
|
25203
|
-
backgroundColor: barColor,
|
|
25204
|
-
borderRadius: radius
|
|
25205
|
-
}, views == null ? void 0 : views.bar)));
|
|
25206
|
-
};
|
|
25207
|
-
|
|
25208
|
-
/**
|
|
25209
|
-
* ProgressBar component displays completion status of a task or process.
|
|
25210
|
-
*/
|
|
25211
|
-
var ProgressBarComponent = props => (/*#__PURE__*/React.createElement(ProgressBarView, Object.assign({}, props)));
|
|
25212
|
-
var ProgressBar = ProgressBarComponent;
|
|
25213
|
-
|
|
25214
25864
|
/**
|
|
25215
25865
|
* Separator Styles
|
|
25216
25866
|
*
|
|
@@ -25264,7 +25914,7 @@ var DefaultSeparatorStyles = {
|
|
|
25264
25914
|
}
|
|
25265
25915
|
};
|
|
25266
25916
|
|
|
25267
|
-
var _excluded$
|
|
25917
|
+
var _excluded$19 = ["orientation", "variant", "thickness", "color", "spacing", "label", "decorative", "views", "themeMode"];
|
|
25268
25918
|
var SeparatorView = _ref => {
|
|
25269
25919
|
var {
|
|
25270
25920
|
orientation = 'horizontal',
|
|
@@ -25276,7 +25926,7 @@ var SeparatorView = _ref => {
|
|
|
25276
25926
|
decorative = false,
|
|
25277
25927
|
views
|
|
25278
25928
|
} = _ref,
|
|
25279
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
25929
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$19);
|
|
25280
25930
|
// Access theme if needed for future enhancements
|
|
25281
25931
|
var {
|
|
25282
25932
|
themeMode
|
|
@@ -25344,7 +25994,7 @@ var SeparatorComponent = props => {
|
|
|
25344
25994
|
var Separator = SeparatorComponent;
|
|
25345
25995
|
var Divider = SeparatorComponent;
|
|
25346
25996
|
|
|
25347
|
-
var _excluded$
|
|
25997
|
+
var _excluded$1a = ["isSupported", "isSharing", "onShare", "label", "children", "icon", "size", "isDisabled", "isLoading", "iconPosition", "disableWhenUnsupported"];
|
|
25348
25998
|
var ICON_SIZE_MAP = {
|
|
25349
25999
|
xs: 12,
|
|
25350
26000
|
sm: 14,
|
|
@@ -25367,7 +26017,7 @@ var ShareButtonView = _ref => {
|
|
|
25367
26017
|
iconPosition,
|
|
25368
26018
|
disableWhenUnsupported = true
|
|
25369
26019
|
} = _ref,
|
|
25370
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
26020
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1a);
|
|
25371
26021
|
var resolvedSize = size != null ? size : 'md';
|
|
25372
26022
|
var resolvedIcon = icon != null ? icon : (/*#__PURE__*/React.createElement(ShareIcon, {
|
|
25373
26023
|
widthHeight: ICON_SIZE_MAP[resolvedSize],
|
|
@@ -25469,14 +26119,14 @@ var useShareButton = props => {
|
|
|
25469
26119
|
};
|
|
25470
26120
|
};
|
|
25471
26121
|
|
|
25472
|
-
var _excluded$
|
|
26122
|
+
var _excluded$1b = ["shareData", "onShareStart", "onShareSuccess", "onShareCancel", "onShareError", "onUnsupported", "onClick"];
|
|
25473
26123
|
var ShareButtonComponent = props => {
|
|
25474
26124
|
var {
|
|
25475
26125
|
isSupported,
|
|
25476
26126
|
isSharing,
|
|
25477
26127
|
handleShare
|
|
25478
26128
|
} = useShareButton(props);
|
|
25479
|
-
var viewProps = _objectWithoutPropertiesLoose(props, _excluded$
|
|
26129
|
+
var viewProps = _objectWithoutPropertiesLoose(props, _excluded$1b);
|
|
25480
26130
|
return /*#__PURE__*/React.createElement(ShareButtonView, Object.assign({}, viewProps, {
|
|
25481
26131
|
isSupported: isSupported,
|
|
25482
26132
|
isSharing: isSharing,
|
|
@@ -25485,82 +26135,6 @@ var ShareButtonComponent = props => {
|
|
|
25485
26135
|
};
|
|
25486
26136
|
var ShareButton = ShareButtonComponent;
|
|
25487
26137
|
|
|
25488
|
-
var getThemes$2 = themeMode => {
|
|
25489
|
-
return {
|
|
25490
|
-
default: {
|
|
25491
|
-
indicator: {
|
|
25492
|
-
backgroundColor: 'color.gray.400'
|
|
25493
|
-
},
|
|
25494
|
-
label: {
|
|
25495
|
-
color: 'color.gray.700'
|
|
25496
|
-
}
|
|
25497
|
-
},
|
|
25498
|
-
info: {
|
|
25499
|
-
indicator: {
|
|
25500
|
-
backgroundColor: 'color.blue.500'
|
|
25501
|
-
},
|
|
25502
|
-
label: {
|
|
25503
|
-
color: 'color.blue.700'
|
|
25504
|
-
}
|
|
25505
|
-
},
|
|
25506
|
-
success: {
|
|
25507
|
-
indicator: {
|
|
25508
|
-
backgroundColor: 'color.green.500'
|
|
25509
|
-
},
|
|
25510
|
-
label: {
|
|
25511
|
-
color: 'color.green.700'
|
|
25512
|
-
}
|
|
25513
|
-
},
|
|
25514
|
-
warning: {
|
|
25515
|
-
indicator: {
|
|
25516
|
-
backgroundColor: 'color.orange.500'
|
|
25517
|
-
},
|
|
25518
|
-
label: {
|
|
25519
|
-
color: 'color.orange.700'
|
|
25520
|
-
}
|
|
25521
|
-
},
|
|
25522
|
-
error: {
|
|
25523
|
-
indicator: {
|
|
25524
|
-
backgroundColor: 'color.red.500'
|
|
25525
|
-
},
|
|
25526
|
-
label: {
|
|
25527
|
-
color: 'color.red.700'
|
|
25528
|
-
}
|
|
25529
|
-
}
|
|
25530
|
-
};
|
|
25531
|
-
};
|
|
25532
|
-
|
|
25533
|
-
var _excluded$1b = ["label", "status", "views", "themeMode"];
|
|
25534
|
-
var StatusIndicatorView = _ref => {
|
|
25535
|
-
var {
|
|
25536
|
-
label,
|
|
25537
|
-
status = 'default',
|
|
25538
|
-
views,
|
|
25539
|
-
themeMode: elementMode
|
|
25540
|
-
} = _ref,
|
|
25541
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$1b);
|
|
25542
|
-
var {
|
|
25543
|
-
themeMode
|
|
25544
|
-
} = useTheme();
|
|
25545
|
-
var themes = getThemes$2();
|
|
25546
|
-
return /*#__PURE__*/React.createElement(Horizontal, Object.assign({
|
|
25547
|
-
alignItems: "center",
|
|
25548
|
-
gap: 8,
|
|
25549
|
-
role: "status-indicator"
|
|
25550
|
-
}, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
|
|
25551
|
-
role: "status-dot",
|
|
25552
|
-
width: "8px",
|
|
25553
|
-
height: "8px",
|
|
25554
|
-
borderRadius: "50%"
|
|
25555
|
-
}, themes[status].indicator, views == null ? void 0 : views.indicator)), label && (/*#__PURE__*/React.createElement(Text, Object.assign({
|
|
25556
|
-
role: "status-label",
|
|
25557
|
-
fontSize: "14px",
|
|
25558
|
-
lineHeight: "20px"
|
|
25559
|
-
}, themes[status].label, views == null ? void 0 : views.label), label)));
|
|
25560
|
-
};
|
|
25561
|
-
|
|
25562
|
-
var StatusIndicator = props => (/*#__PURE__*/React.createElement(StatusIndicatorView, Object.assign({}, props)));
|
|
25563
|
-
|
|
25564
26138
|
var useSidebarState = function useSidebarState(defaultExpanded, expanded, onExpandedChange, breakpoint) {
|
|
25565
26139
|
if (defaultExpanded === void 0) {
|
|
25566
26140
|
defaultExpanded = true;
|
|
@@ -37193,5 +37767,5 @@ var AgentEval = props => {
|
|
|
37193
37767
|
return /*#__PURE__*/React.createElement(AgentEvalView, Object.assign({}, props, evalState));
|
|
37194
37768
|
};
|
|
37195
37769
|
|
|
37196
|
-
export { Accordion, AgentChat, AgentEval, AgentSession, AgentTrace, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AttachmentPreview, AudioIcon, AudioInput, AudioWaveform, Avatar, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, Calendar, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, Flow, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, KanbanBoard, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, Tree, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
37770
|
+
export { Accordion, AgentChat, AgentEval, AgentSession, AgentTrace, Alert, ArrowIcon, AspectRatio, AttachmentIcon, AttachmentPreview, AudioIcon, AudioInput, AudioWaveform, Avatar, Background, Badge, BatteryIcon, BluetoothIcon, BoldArrowIcon, BookmarkIcon, Button, Calendar, CalendarIcon, CameraIcon, Card, Carousel, Chart, ChartIcon, ChatInput, CheckIcon, Checkbox, ChevronIcon, ClockIcon, CloseEyeIcon, CloseIcon, CloudIcon, ColorInput, ColorPicker, ComboBox, Command, ContextMenu, CookieConsent, CopyIcon, CountryPicker, CropIcon, DatePicker, DeleteIcon, Divider, DocumentIcon, DownloadIcon, DragAndDrop, DragAndDropComponent, DragHandleIcon, DragHandleLinesIcon, DropdownMenu, DustBinIcon, EditIcon, EmojiPicker, ErrorIcon, ExternalLinkIcon, FacebookIcon, FileIcon, FileImage, FileSVG, FilterIcon, Flow, FolderIcon, FormikChatInput, FormikCheckbox, FormikColorInput, FormikComboBox, FormikCountryPicker, FormikDatePicker, FormikForm, FormikOTPInput, FormikPassword, FormikSelect, FormikSlider, FormikSwitch, FormikTagInput, FormikTextArea, FormikTextField, FormikUploader, GiftIcon, HeartIcon, HelpIcon, HomeIcon, HoverCard, Icon, ImageIcon, InfoIcon, InstagramIcon, KanbanBoard, LikeIcon, Link, LinkedinIcon, Loader, LoadingSpinnerIcon, LocationIcon, LockIcon, LogoutIcon, MagicWandIcon, MediaPreview, MenuIcon, Menubar, MessageLayout, MessageView, MicrophoneIcon, MinusIcon, Modal, MoonIcon, NavigationMenu, NotificationIcon, OKR, OTPInput, OpenEyeIcon, Pagination, PanelIcon, Password, PauseIcon, PlayIcon, PlusIcon, PowerOffIcon, PrintIcon, ProfileIcon, ProgressBar, RefreshIcon, Resizable, RotateIcon, SaveIcon, SearchIcon, Select, SendIcon, Separator, SettingsIcon, ShapeIcon, ShareButton, ShareIcon, ShieldIcon, Sidebar, Slider, SliderIcon, SpinnerIcon, StarIcon, StatusIndicator, StopIcon, SuccessIcon, Switch, Table, Tabs, TagInput, Text, TextArea, TextField, TextIcon, ThreadsIcon, TickIcon, Title, Toast, Toggle, ToggleGroup, Tooltip, TrashIcon, Tree, TwitchIcon, TwitterIcon, UnLikeIcon, UnlockIcon, UploadIcon, Uploader, UserIcon, VideoIcon, WarningIcon, WifiIcon, XIcon, YoutubeIcon, ZoomInIcon, ZoomOutIcon, hideMessage, hideModal, showMessage, showModal, showToast, useMessageStore, useModalStore, useToast$1 as useToast };
|
|
37197
37771
|
//# sourceMappingURL=web.esm.js.map
|