@bikdotai/bik-component-library 0.0.850-beta.1 → 0.0.850-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js +14 -7
- package/dist/cjs/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js +1 -1
- package/dist/cjs/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js +5 -5
- package/dist/cjs/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js +1 -1
- package/dist/cjs/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/MentionPicker.js +24 -24
- package/dist/cjs/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js +4 -4
- package/dist/cjs/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js +2 -2
- package/dist/cjs/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js +1 -1
- package/dist/cjs/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js +1 -1
- package/dist/cjs/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js +1 -1
- package/dist/cjs/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js +2 -2
- package/dist/cjs/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js +1 -1
- package/dist/cjs/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js +1 -1
- package/dist/cjs/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js +1 -1
- package/dist/cjs/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.js +6 -4
- package/dist/cjs/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/cjs/components/button/themes.js +3 -3
- package/dist/cjs/components/button/themes.js.map +1 -1
- package/dist/cjs/components/datePicker/DatePicker.js +1 -1
- package/dist/cjs/components/datePicker/DatePicker.js.map +1 -1
- package/dist/cjs/components/datePicker/DatePicker.styled.js +14 -20
- package/dist/cjs/components/datePicker/DatePicker.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/ChipInput.js +1 -1
- package/dist/cjs/components/dropdown/ChipInput.js.map +1 -1
- package/dist/cjs/components/dropdown/Common.styled.js +5 -6
- package/dist/cjs/components/dropdown/Common.styled.js.map +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/cjs/components/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.js.map +1 -1
- package/dist/cjs/components/input/Input.styled.js +12 -25
- package/dist/cjs/components/input/Input.styled.js.map +1 -1
- package/dist/cjs/components/tabs/Tabs.js +1 -1
- package/dist/cjs/components/tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/tabs/Tabs.styles.js +8 -22
- package/dist/cjs/components/tabs/Tabs.styles.js.map +1 -1
- package/dist/cjs/components/tag/Tag.js +1 -1
- package/dist/cjs/components/tag/Tag.js.map +1 -1
- package/dist/cjs/components/tag/Tag.styled.js +0 -4
- package/dist/cjs/components/tag/Tag.styled.js.map +1 -1
- package/dist/cjs/components/tag/model.js.map +1 -1
- package/dist/cjs/editor/BikEditor.js +1 -1
- package/dist/cjs/editor/BikEditor.js.map +1 -1
- package/dist/cjs/editor/BikEditor.styles.js +4 -4
- package/dist/cjs/editor/BikEditor.styles.js.map +1 -1
- package/dist/cjs/editor/BikEditor.types.js.map +1 -1
- package/dist/cjs/editor/extensions/buildExtensions.js +2 -2
- package/dist/cjs/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/cjs/editor/extensions/mention/MentionChipNodeView.js +2 -0
- package/dist/cjs/editor/extensions/mention/MentionChipNodeView.js.map +1 -0
- package/dist/cjs/editor/extensions/mention/MentionExtension.js +1 -1
- package/dist/cjs/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js +17 -10
- package/dist/esm/components/agent-builder/AgentBuilder.styled.js.map +1 -1
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js +1 -1
- package/dist/esm/components/agent-builder/components/ConfigToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.d.ts +5 -0
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js +243 -227
- package/dist/esm/components/agent-builder/components/CreateSubAgentPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.d.ts +1 -1
- package/dist/esm/components/agent-builder/components/MentionEditor.js +93 -78
- package/dist/esm/components/agent-builder/components/MentionEditor.js.map +1 -1
- package/dist/esm/components/agent-builder/components/MentionPicker.js +179 -161
- package/dist/esm/components/agent-builder/components/MentionPicker.js.map +1 -1
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js +118 -109
- package/dist/esm/components/agent-builder/components/RestApiToolPanel.js.map +1 -1
- package/dist/esm/components/agent-builder/components/SelectableListSection.js +117 -110
- package/dist/esm/components/agent-builder/components/SelectableListSection.js.map +1 -1
- package/dist/esm/components/agent-builder/constants/tools.d.ts +10 -0
- package/dist/esm/components/agent-builder/constants/tools.js +27 -14
- package/dist/esm/components/agent-builder/constants/tools.js.map +1 -1
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.d.ts +6 -2
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js +46 -43
- package/dist/esm/components/agent-builder/context/AgentBuilderContext.js.map +1 -1
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js +132 -117
- package/dist/esm/components/agent-builder/steps/Step3HowItResponds.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/mentionSerialization.d.ts +3 -2
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js +24 -19
- package/dist/esm/components/agent-builder/utils/mentionSerialization.js.map +1 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.d.ts +9 -1
- package/dist/esm/components/agent-builder/utils/sourceIcons.js +15 -9
- package/dist/esm/components/agent-builder/utils/sourceIcons.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentListing.js +71 -69
- package/dist/esm/components/agent-listing/AgentListing.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentListing.model.d.ts +6 -0
- package/dist/esm/components/agent-listing/AgentTable.d.ts +2 -0
- package/dist/esm/components/agent-listing/AgentTable.js +29 -27
- package/dist/esm/components/agent-listing/AgentTable.js.map +1 -1
- package/dist/esm/components/agent-listing/AgentTableRow.d.ts +2 -0
- package/dist/esm/components/agent-listing/AgentTableRow.js +50 -36
- package/dist/esm/components/agent-listing/AgentTableRow.js.map +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.js +3 -1
- package/dist/esm/components/bik-layout/CommonStyles.js.map +1 -1
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/button/themes.js.map +1 -1
- package/dist/esm/components/datePicker/DatePicker.js +21 -22
- package/dist/esm/components/datePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/datePicker/DatePicker.styled.d.ts +0 -10
- package/dist/esm/components/datePicker/DatePicker.styled.js +16 -23
- package/dist/esm/components/datePicker/DatePicker.styled.js.map +1 -1
- package/dist/esm/components/dropdown/ChipInput.d.ts +0 -1
- package/dist/esm/components/dropdown/ChipInput.js +30 -37
- package/dist/esm/components/dropdown/ChipInput.js.map +1 -1
- package/dist/esm/components/dropdown/Common.styled.js +6 -7
- package/dist/esm/components/dropdown/Common.styled.js.map +1 -1
- package/dist/esm/components/dropdown/Dropdown.d.ts +0 -2
- package/dist/esm/components/dropdown/Dropdown.js +89 -96
- package/dist/esm/components/dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +95 -103
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.d.ts +0 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js +17 -17
- package/dist/esm/components/dropdown/OpenedDropdown/components/searchbox/SearchBox.js.map +1 -1
- package/dist/esm/components/dropdown/type.d.ts +0 -2
- package/dist/esm/components/input/Input.js +101 -104
- package/dist/esm/components/input/Input.js.map +1 -1
- package/dist/esm/components/input/Input.model.d.ts +0 -2
- package/dist/esm/components/input/Input.styled.d.ts +0 -2
- package/dist/esm/components/input/Input.styled.js +25 -38
- package/dist/esm/components/input/Input.styled.js.map +1 -1
- package/dist/esm/components/tabs/Tabs.js +81 -103
- package/dist/esm/components/tabs/Tabs.js.map +1 -1
- package/dist/esm/components/tabs/Tabs.model.d.ts +0 -7
- package/dist/esm/components/tabs/Tabs.styles.d.ts +0 -2
- package/dist/esm/components/tabs/Tabs.styles.js +9 -23
- package/dist/esm/components/tabs/Tabs.styles.js.map +1 -1
- package/dist/esm/components/tag/Tag.d.ts +1 -1
- package/dist/esm/components/tag/Tag.js +15 -17
- package/dist/esm/components/tag/Tag.js.map +1 -1
- package/dist/esm/components/tag/Tag.styled.d.ts +0 -1
- package/dist/esm/components/tag/Tag.styled.js +6 -10
- package/dist/esm/components/tag/Tag.styled.js.map +1 -1
- package/dist/esm/components/tag/model.d.ts +0 -5
- package/dist/esm/components/tag/model.js.map +1 -1
- package/dist/esm/editor/BikEditor.js +84 -83
- package/dist/esm/editor/BikEditor.js.map +1 -1
- package/dist/esm/editor/BikEditor.styles.js +4 -4
- package/dist/esm/editor/BikEditor.styles.js.map +1 -1
- package/dist/esm/editor/BikEditor.types.d.ts +7 -0
- package/dist/esm/editor/BikEditor.types.js.map +1 -1
- package/dist/esm/editor/extensions/buildExtensions.d.ts +1 -0
- package/dist/esm/editor/extensions/buildExtensions.js +13 -12
- package/dist/esm/editor/extensions/buildExtensions.js.map +1 -1
- package/dist/esm/editor/extensions/mention/MentionChipNodeView.d.ts +17 -0
- package/dist/esm/editor/extensions/mention/MentionChipNodeView.js +39 -0
- package/dist/esm/editor/extensions/mention/MentionChipNodeView.js.map +1 -0
- package/dist/esm/editor/extensions/mention/MentionExtension.d.ts +1 -1
- package/dist/esm/editor/extensions/mention/MentionExtension.js +67 -45
- package/dist/esm/editor/extensions/mention/MentionExtension.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagProps } from './model';
|
|
2
2
|
export declare const Tag: {
|
|
3
|
-
({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, alignIcon, noBorder, tagHtmlText, contentPadding, padding, height, leadingIconTooltip, trailingIconTooltip, tagColor, numberOfLines, backgroundColor, borderRadius, size,
|
|
3
|
+
({ tagText, LeadingIcon, TrailingIcon, onLeadingIconClicked, leadingIconId, trailingIconId, onTrailingIconClicked, theme, type, variant, version, cursor, alignIcon, noBorder, tagHtmlText, contentPadding, padding, height, leadingIconTooltip, trailingIconTooltip, tagColor, numberOfLines, backgroundColor, borderRadius, size, }: TagProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
displayName: string;
|
|
5
5
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { jsx as l, jsxs as G } from "react/jsx-runtime";
|
|
2
2
|
import m from "react";
|
|
3
3
|
import { Tooltip as $ } from "../tooltips/Tooltip.js";
|
|
4
4
|
import { AiBodyTiny as u, AiBodyCaption as B, BodyTiny as E, BodyCaption as T } from "../TypographyStyle.js";
|
|
5
|
-
import { ValidTagTypeMap as
|
|
6
|
-
import { Tag as
|
|
7
|
-
import { getTagIconColor as
|
|
8
|
-
const
|
|
5
|
+
import { ValidTagTypeMap as J } from "./model.js";
|
|
6
|
+
import { Tag as K } from "./Tag.styled.js";
|
|
7
|
+
import { getTagIconColor as Q } from "./themes.js";
|
|
8
|
+
const S = ({
|
|
9
9
|
tagText: k,
|
|
10
10
|
LeadingIcon: h,
|
|
11
11
|
TrailingIcon: n,
|
|
@@ -30,24 +30,23 @@ const U = ({
|
|
|
30
30
|
numberOfLines: r,
|
|
31
31
|
backgroundColor: V,
|
|
32
32
|
borderRadius: q,
|
|
33
|
-
size: o = "regular"
|
|
34
|
-
hoverBackgroundColor: D
|
|
33
|
+
size: o = "regular"
|
|
35
34
|
}) => {
|
|
36
35
|
let i = k;
|
|
37
|
-
const
|
|
36
|
+
const D = d;
|
|
38
37
|
let y = t;
|
|
39
|
-
|
|
40
|
-
const
|
|
38
|
+
J[c][t] || (y = "neutral"), c === "circle" && typeof i == "number" && i > 99 && (i = "99+");
|
|
39
|
+
const F = Q(d, y), s = {
|
|
41
40
|
height: c === "compressed" ? 12 : 16,
|
|
42
41
|
width: c === "compressed" ? 12 : 16,
|
|
43
|
-
color:
|
|
42
|
+
color: F,
|
|
44
43
|
style: { display: "block" }
|
|
45
44
|
};
|
|
46
45
|
return /* @__PURE__ */ l(
|
|
47
|
-
|
|
46
|
+
K,
|
|
48
47
|
{
|
|
49
48
|
cursor: j,
|
|
50
|
-
theme:
|
|
49
|
+
theme: D,
|
|
51
50
|
type: y,
|
|
52
51
|
variant: c,
|
|
53
52
|
version: x,
|
|
@@ -59,8 +58,7 @@ const U = ({
|
|
|
59
58
|
backgroundColor: V,
|
|
60
59
|
borderRadius: q,
|
|
61
60
|
size: o,
|
|
62
|
-
|
|
63
|
-
children: /* @__PURE__ */ J("div", { className: "container", children: [
|
|
61
|
+
children: /* @__PURE__ */ G("div", { className: "container", children: [
|
|
64
62
|
h && (g ? /* @__PURE__ */ l($, { ...g, children: /* @__PURE__ */ l(
|
|
65
63
|
"button",
|
|
66
64
|
{
|
|
@@ -129,8 +127,8 @@ const U = ({
|
|
|
129
127
|
}
|
|
130
128
|
);
|
|
131
129
|
};
|
|
132
|
-
|
|
130
|
+
S.displayName = "Tag";
|
|
133
131
|
export {
|
|
134
|
-
|
|
132
|
+
S as Tag
|
|
135
133
|
};
|
|
136
134
|
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sources":["../../../../src/components/tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport { Tooltip } from '../tooltips/Tooltip';\nimport {\n\tAiBodyCaption,\n\tAiBodyTiny,\n\tBodyCaption,\n\tBodyTiny,\n} from '../TypographyStyle';\nimport { TagProps, ValidTagTypeMap } from './model';\nimport * as Sc from './Tag.styled';\nimport { getTagIconColor } from './themes';\n\nexport const Tag = ({\n\ttagText,\n\tLeadingIcon,\n\tTrailingIcon,\n\tonLeadingIconClicked = undefined,\n\tleadingIconId,\n\ttrailingIconId,\n\tonTrailingIconClicked = undefined,\n\ttheme = 'light',\n\ttype = 'neutral',\n\tvariant = 'regular',\n\tversion,\n\tcursor,\n\talignIcon,\n\tnoBorder,\n\ttagHtmlText,\n\tcontentPadding,\n\tpadding,\n\theight,\n\tleadingIconTooltip,\n\ttrailingIconTooltip,\n\ttagColor,\n\tnumberOfLines,\n\tbackgroundColor,\n\tborderRadius,\n\tsize = 'regular',\n
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport { Tooltip } from '../tooltips/Tooltip';\nimport {\n\tAiBodyCaption,\n\tAiBodyTiny,\n\tBodyCaption,\n\tBodyTiny,\n} from '../TypographyStyle';\nimport { TagProps, ValidTagTypeMap } from './model';\nimport * as Sc from './Tag.styled';\nimport { getTagIconColor } from './themes';\n\nexport const Tag = ({\n\ttagText,\n\tLeadingIcon,\n\tTrailingIcon,\n\tonLeadingIconClicked = undefined,\n\tleadingIconId,\n\ttrailingIconId,\n\tonTrailingIconClicked = undefined,\n\ttheme = 'light',\n\ttype = 'neutral',\n\tvariant = 'regular',\n\tversion,\n\tcursor,\n\talignIcon,\n\tnoBorder,\n\ttagHtmlText,\n\tcontentPadding,\n\tpadding,\n\theight,\n\tleadingIconTooltip,\n\ttrailingIconTooltip,\n\ttagColor,\n\tnumberOfLines,\n\tbackgroundColor,\n\tborderRadius,\n\tsize = 'regular',\n}: TagProps) => {\n\tlet displayTagText = tagText;\n\tconst displayTheme = theme;\n\tlet displayType = type;\n\n\tif (!ValidTagTypeMap[variant][type]) {\n\t\tdisplayType = 'neutral';\n\t}\n\n\tif (variant === 'circle') {\n\t\tif (typeof displayTagText === 'number' && displayTagText > 99) {\n\t\t\tdisplayTagText = '99+';\n\t\t}\n\t}\n\n\tconst iconColor = getTagIconColor(theme, displayType);\n\tconst iconProps = {\n\t\theight: variant === 'compressed' ? 12 : 16,\n\t\twidth: variant === 'compressed' ? 12 : 16,\n\t\tcolor: iconColor,\n\t\tstyle: { display: 'block' },\n\t};\n\n\treturn (\n\t\t<Sc.Tag\n\t\t\tcursor={cursor}\n\t\t\ttheme={displayTheme}\n\t\t\ttype={displayType}\n\t\t\tvariant={variant}\n\t\t\tversion={version}\n\t\t\talignIcon={alignIcon}\n\t\t\tnoBorder={noBorder}\n\t\t\tcontentPadding={contentPadding}\n\t\t\tpadding={padding}\n\t\t\theight={height}\n\t\t\tbackgroundColor={backgroundColor}\n\t\t\tborderRadius={borderRadius}\n\t\t\tsize={size}\n\t\t>\n\t\t\t<div className=\"container\">\n\t\t\t\t{LeadingIcon &&\n\t\t\t\t\t(leadingIconTooltip ? (\n\t\t\t\t\t\t<Tooltip {...leadingIconTooltip}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"icon-leading\"\n\t\t\t\t\t\t\t\tonClick={onLeadingIconClicked}\n\t\t\t\t\t\t\t\tid={`${leadingIconId}-wrapper` || 'leading-icon-wrapper'}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{React.createElement(LeadingIcon, {\n\t\t\t\t\t\t\t\t\t...iconProps,\n\t\t\t\t\t\t\t\t\tid: leadingIconId || 'leading-icon',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tclassName=\"icon-leading\"\n\t\t\t\t\t\t\tonClick={onLeadingIconClicked}\n\t\t\t\t\t\t\tid={`${leadingIconId}-wrapper` || 'leading-icon-wrapper'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{React.createElement(LeadingIcon, {\n\t\t\t\t\t\t\t\t...iconProps,\n\t\t\t\t\t\t\t\tid: leadingIconId || 'leading-icon',\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t))}\n\n\t\t\t\t{tagHtmlText &&\n\t\t\t\t\t(type === 'ai' && theme === 'light' ? (\n\t\t\t\t\t\tsize === 'small' ? (\n\t\t\t\t\t\t\t<AiBodyTiny numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t\t{tagHtmlText}\n\t\t\t\t\t\t\t</AiBodyTiny>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<AiBodyCaption numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t\t{tagHtmlText}\n\t\t\t\t\t\t\t</AiBodyCaption>\n\t\t\t\t\t\t)\n\t\t\t\t\t) : size === 'small' ? (\n\t\t\t\t\t\t<BodyTiny className=\"text\" numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t{tagHtmlText}\n\t\t\t\t\t\t</BodyTiny>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BodyCaption className=\"text\" numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t{tagHtmlText}\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t))}\n\n\t\t\t\t{!tagHtmlText &&\n\t\t\t\t\tdisplayTagText !== '' &&\n\t\t\t\t\t(type === 'ai' && theme === 'light' ? (\n\t\t\t\t\t\tsize === 'small' ? (\n\t\t\t\t\t\t\t<AiBodyTiny numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t\t{displayTagText}\n\t\t\t\t\t\t\t</AiBodyTiny>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<AiBodyCaption numberOfLines={numberOfLines}>\n\t\t\t\t\t\t\t\t{displayTagText}\n\t\t\t\t\t\t\t</AiBodyCaption>\n\t\t\t\t\t\t)\n\t\t\t\t\t) : size === 'small' ? (\n\t\t\t\t\t\t<BodyTiny\n\t\t\t\t\t\t\tclassName=\"text\"\n\t\t\t\t\t\t\tcolor={tagColor}\n\t\t\t\t\t\t\tnumberOfLines={numberOfLines}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{displayTagText}\n\t\t\t\t\t\t</BodyTiny>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<BodyCaption\n\t\t\t\t\t\t\tclassName=\"text\"\n\t\t\t\t\t\t\tcolor={tagColor}\n\t\t\t\t\t\t\tnumberOfLines={numberOfLines}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{displayTagText}\n\t\t\t\t\t\t</BodyCaption>\n\t\t\t\t\t))}\n\n\t\t\t\t{TrailingIcon &&\n\t\t\t\t\t(trailingIconTooltip ? (\n\t\t\t\t\t\t<Tooltip {...trailingIconTooltip}>\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"icon-trailing\"\n\t\t\t\t\t\t\t\tonClick={onTrailingIconClicked}\n\t\t\t\t\t\t\t\tid={`${trailingIconId}-wrapper` || 'trailing-icon-wrapper'}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{React.createElement(TrailingIcon, {\n\t\t\t\t\t\t\t\t\t...iconProps,\n\t\t\t\t\t\t\t\t\tid: trailingIconId || 'trailing-icon',\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tclassName=\"icon-trailing\"\n\t\t\t\t\t\t\tonClick={onTrailingIconClicked}\n\t\t\t\t\t\t\tid={`${trailingIconId}-wrapper` || 'trailing-icon-wrapper'}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{React.createElement(TrailingIcon, {\n\t\t\t\t\t\t\t\t...iconProps,\n\t\t\t\t\t\t\t\tid: trailingIconId || 'trailing-icon',\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t))}\n\t\t\t</div>\n\t\t</Sc.Tag>\n\t);\n};\n\nTag.displayName = 'Tag';\n"],"names":["Tag","tagText","LeadingIcon","TrailingIcon","onLeadingIconClicked","leadingIconId","trailingIconId","onTrailingIconClicked","theme","type","variant","version","cursor","alignIcon","noBorder","tagHtmlText","contentPadding","padding","height","leadingIconTooltip","trailingIconTooltip","tagColor","numberOfLines","backgroundColor","borderRadius","size","displayTagText","displayTheme","displayType","ValidTagTypeMap","iconColor","getTagIconColor","iconProps","jsx","Sc.Tag","jsxs","Tooltip","React","AiBodyTiny","AiBodyCaption","BodyTiny","BodyCaption"],"mappings":"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"}
|
|
@@ -13,5 +13,4 @@ export declare const Tag: import('styled-components').StyledComponent<"div", any
|
|
|
13
13
|
backgroundColor?: string | undefined;
|
|
14
14
|
borderRadius?: string | number | undefined;
|
|
15
15
|
size?: "small" | "regular" | undefined;
|
|
16
|
-
hoverBackgroundColor?: string | undefined;
|
|
17
16
|
}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i from "styled-components";
|
|
2
|
-
import { getPadding as a, getBackgroundColor as
|
|
3
|
-
const
|
|
2
|
+
import { getPadding as a, getBackgroundColor as t, generateBorder as d, getTextColor as n } from "./themes.js";
|
|
3
|
+
const r = i.div`
|
|
4
4
|
cursor: ${(e) => e.cursor ?? "default"};
|
|
5
5
|
${(e) => e.size !== "small" && (e.variant === "regular" ? `display: block;
|
|
6
6
|
min-height: 26px;
|
|
@@ -11,17 +11,17 @@ const o = i.div`
|
|
|
11
11
|
gap: 6px;
|
|
12
12
|
${(e) => e.height ? `height: ${e.height}px; box-sizing: border-box;` : e.size === "small" ? "height: 16px; box-sizing: border-box;" : ""}
|
|
13
13
|
padding: ${(e) => e.padding ? e.padding : e.size === "small" ? "2px 6px" : e.contentPadding ? `${e.contentPadding}px` : a(e.variant)};
|
|
14
|
-
background: ${(e) => e.backgroundColor ??
|
|
14
|
+
background: ${(e) => e.backgroundColor ?? t(e.theme, e.type)};
|
|
15
15
|
|
|
16
16
|
border-radius: ${(e) => e.borderRadius !== void 0 ? typeof e.borderRadius == "number" ? `${e.borderRadius}px` : e.borderRadius : e.variant === "regular" ? "4px" : "12px"};
|
|
17
17
|
|
|
18
|
-
${(e) => !e.noBorder && e.theme === "light" && `border: ${e.version === "2.0" ? 0.5 : 1}px solid ${
|
|
18
|
+
${(e) => !e.noBorder && e.theme === "light" && `border: ${e.version === "2.0" ? 0.5 : 1}px solid ${d(
|
|
19
19
|
e.type,
|
|
20
20
|
e.theme
|
|
21
21
|
)};`}
|
|
22
22
|
|
|
23
23
|
.text {
|
|
24
|
-
color: ${(e) =>
|
|
24
|
+
color: ${(e) => n(e.theme, e.type)};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.icon-trailing {
|
|
@@ -33,13 +33,9 @@ const o = i.div`
|
|
|
33
33
|
all: unset;
|
|
34
34
|
display: flex;
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
${(e) => e.hoverBackgroundColor && `&:hover {
|
|
38
|
-
background: ${e.hoverBackgroundColor};
|
|
39
|
-
}`}
|
|
40
36
|
}
|
|
41
37
|
`;
|
|
42
38
|
export {
|
|
43
|
-
|
|
39
|
+
r as Tag
|
|
44
40
|
};
|
|
45
41
|
//# sourceMappingURL=Tag.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.styled.js","sources":["../../../../src/components/tag/Tag.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { TagTheme, TagType, TagVariant } from './model';\nimport {\n\tgenerateBorder,\n\tgetBackgroundColor,\n\tgetPadding,\n\tgetTextColor,\n} from './themes';\n\nexport const Tag = styled.div<{\n\ttheme: TagTheme;\n\ttype: TagType;\n\tvariant: TagVariant;\n\tversion?: '1.0' | '2.0' | '3.0';\n\tcursor?: string;\n\talignIcon?: string;\n\tnoBorder?: boolean;\n\tcontentPadding?: number;\n\tpadding?: string;\n\theight?: number;\n\tbackgroundColor?: string;\n\tborderRadius?: string | number;\n\tsize?: 'regular' | 'small';\n
|
|
1
|
+
{"version":3,"file":"Tag.styled.js","sources":["../../../../src/components/tag/Tag.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { TagTheme, TagType, TagVariant } from './model';\nimport {\n\tgenerateBorder,\n\tgetBackgroundColor,\n\tgetPadding,\n\tgetTextColor,\n} from './themes';\n\nexport const Tag = styled.div<{\n\ttheme: TagTheme;\n\ttype: TagType;\n\tvariant: TagVariant;\n\tversion?: '1.0' | '2.0' | '3.0';\n\tcursor?: string;\n\talignIcon?: string;\n\tnoBorder?: boolean;\n\tcontentPadding?: number;\n\tpadding?: string;\n\theight?: number;\n\tbackgroundColor?: string;\n\tborderRadius?: string | number;\n\tsize?: 'regular' | 'small';\n}>`\n\tcursor: ${(props) => props.cursor ?? 'default'};\n\t${(props) =>\n\t\tprops.size !== 'small' &&\n\t\t(props.variant === 'regular'\n\t\t\t? `display: block;\n\t\t min-height: 26px;\n\t\t`\n\t\t\t: `min-height: 20px;`)}\n\t.container {\n\t\tdisplay: flex;\n\t\talign-items: ${(props) => (props.alignIcon ? props.alignIcon : 'center')};\n\t\tgap: 6px;\n\t\t${(props) =>\n\t\t\tprops.height\n\t\t\t\t? `height: ${props.height}px; box-sizing: border-box;`\n\t\t\t\t: props.size === 'small'\n\t\t\t\t? 'height: 16px; box-sizing: border-box;'\n\t\t\t\t: ''}\n\t\tpadding: ${(props) =>\n\t\t\tprops.padding\n\t\t\t\t? props.padding\n\t\t\t\t: props.size === 'small'\n\t\t\t\t? '2px 6px'\n\t\t\t\t: props.contentPadding\n\t\t\t\t? `${props.contentPadding}px`\n\t\t\t\t: getPadding(props.variant)};\n\t\tbackground: ${(props) =>\n\t\t\tprops.backgroundColor ?? getBackgroundColor(props.theme, props.type)};\n\n\t\tborder-radius: ${(props) =>\n\t\t\tprops.borderRadius !== undefined\n\t\t\t\t? typeof props.borderRadius === 'number'\n\t\t\t\t\t? `${props.borderRadius}px`\n\t\t\t\t\t: props.borderRadius\n\t\t\t\t: props.variant === 'regular'\n\t\t\t\t? '4px'\n\t\t\t\t: '12px'};\n\n\t\t${(props) =>\n\t\t\t!props.noBorder &&\n\t\t\tprops.theme === 'light' &&\n\t\t\t`border: ${props.version === '2.0' ? 0.5 : 1}px solid ${generateBorder(\n\t\t\t\tprops.type,\n\t\t\t\tprops.theme,\n\t\t\t)};`}\n\n\t\t.text {\n\t\t\tcolor: ${(props) => getTextColor(props.theme, props.type)};\n\t\t}\n\n\t\t.icon-trailing {\n\t\t\tall: unset;\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t.icon-leading {\n\t\t\tall: unset;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n`;\n"],"names":["Tag","styled","props","getPadding","getBackgroundColor","generateBorder","getTextColor"],"mappings":";;AASO,MAAMA,IAAMC,EAAO;AAAA,WAef,CAACC,MAAUA,EAAM,UAAU,SAAS;AAAA,GAC5C,CAACA,MACFA,EAAM,SAAS,YACdA,EAAM,YAAY,YAChB;AAAA;AAAA,MAGA,oBAAoB;AAAA;AAAA;AAAA,iBAGR,CAACA,MAAWA,EAAM,YAAYA,EAAM,YAAY,QAAS;AAAA;AAAA,IAEtE,CAACA,MACFA,EAAM,SACH,WAAWA,EAAM,MAAM,gCACvBA,EAAM,SAAS,UACf,0CACA,EAAE;AAAA,aACK,CAACA,MACXA,EAAM,UACHA,EAAM,UACNA,EAAM,SAAS,UACf,YACAA,EAAM,iBACN,GAAGA,EAAM,cAAc,OACvBC,EAAWD,EAAM,OAAO,CAAC;AAAA,gBACf,CAACA,MACdA,EAAM,mBAAmBE,EAAmBF,EAAM,OAAOA,EAAM,IAAI,CAAC;AAAA;AAAA,mBAEpD,CAACA,MACjBA,EAAM,iBAAiB,SACpB,OAAOA,EAAM,gBAAiB,WAC7B,GAAGA,EAAM,YAAY,OACrBA,EAAM,eACPA,EAAM,YAAY,YAClB,QACA,MAAM;AAAA;AAAA,IAER,CAACA,MACF,CAACA,EAAM,YACPA,EAAM,UAAU,WAChB,WAAWA,EAAM,YAAY,QAAQ,MAAM,CAAC,YAAYG;AAAA,EACvDH,EAAM;AAAA,EACNA,EAAM;AACP,CAAC,GAAG;AAAA;AAAA;AAAA,YAGK,CAACA,MAAUI,EAAaJ,EAAM,OAAOA,EAAM,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -118,9 +118,4 @@ export interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {
|
|
|
118
118
|
* @default 'regular'
|
|
119
119
|
*/
|
|
120
120
|
size?: 'regular' | 'small';
|
|
121
|
-
/**
|
|
122
|
-
* Background color on hover.
|
|
123
|
-
* @default undefined (no hover effect)
|
|
124
|
-
*/
|
|
125
|
-
hoverBackgroundColor?: string;
|
|
126
121
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sources":["../../../../src/components/tag/model.ts"],"sourcesContent":["import React from 'react';\nimport { MouseEventHandler } from 'react';\nimport { TooltipProps } from '../tooltips/Tooltip';\n\nexport type TagTheme = 'light' | 'dark';\n\nexport type TagVariant = 'regular' | 'circle' | 'compressed';\n\nexport type TagType =\n\t| 'negative'\n\t| 'warning'\n\t| 'positive'\n\t| 'neutral'\n\t| 'white'\n\t| 'purple'\n\t| 'blue'\n\t| 'grey'\n\t| 'ai';\n\nexport const ValidTagTypeMap = {\n\tregular: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\twhite: true,\n\t\tpurple: true,\n\t\tblue: true,\n\t\tai: true,\n\t},\n\tcircle: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\tblue: true,\n\t\tgrey: true,\n\t\tai: true,\n\t},\n\tcompressed: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\twhite: true,\n\t\tpurple: true,\n\t\tblue: true,\n\t\tai: true,\n\t},\n};\n\nexport interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Set the theme of the Tag\n\t * @default default light\n\t */\n\ttheme?: TagTheme;\n\n\t/**\n\t * Set the color of the Tag\n\t * @default default neutral\n\t */\n\ttype?: TagType;\n\n\t/**\n\t * Set the color of the Tag\n\t * @default default regular\n\t */\n\tvariant?: TagVariant;\n\n\t/**\n\t * The icon component that is the right of the text\n\t * Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react\n\t * @default undefined\n\t */\n\tTrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\t/**\n\t * The right icon id,\n\t * @default trailing-icon\n\t */\n\ttrailingIconId?: string;\n\t/**\n\t * The right icon on click event, defaults to () => {}\n\t */\n\tonTrailingIconClicked?: MouseEventHandler<HTMLButtonElement>;\n\t/**\n\t * Tooltip props for the trailing icon\n\t * @default undefined\n\t */\n\ttrailingIconTooltip?: Omit<TooltipProps, 'children'>;\n\n\t/**\n\t * The icon component that is to the left of the text\n\t * Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react\n\t * @default undefined\n\t */\n\tLeadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\t/**\n\t * The right icon on click event, defaults to () => {}\n\t */\n\tonLeadingIconClicked?: MouseEventHandler<HTMLButtonElement>;\n\t/**\n\t * The left icon id,\n\t * @default leading-icon\n\t */\n\tleadingIconId?: string;\n\t/**\n\t * Tooltip props for the leading icon\n\t * @default undefined\n\t */\n\tleadingIconTooltip?: Omit<TooltipProps, 'children'>;\n\n\ttagText: string | number;\n\tversion?: '1.0' | '2.0' | '3.0';\n\t/** Custom CSS padding string, e.g. '4px 8px' */\n\tpadding?: string;\n\t/** Custom height in px */\n\theight?: number;\n\tcursor?: string;\n\talignIcon?: string;\n\tnoBorder?: boolean;\n\ttagHtmlText?: JSX.Element;\n\tcontentPadding?: number;\n\ttagColor?: string;\n\tnumberOfLines?: number;\n\t/**\n\t * Override the computed background color of the tag container.\n\t * @default undefined (uses theme/type color)\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * Override the border-radius of the tag container.\n\t * @default undefined (uses variant-based radius: 4px for regular, 12px otherwise)\n\t */\n\tborderRadius?: string | number;\n\t/**\n\t * Controls the size of the tag. 'small' sets height to 16px and uses tiny font.\n\t * @default 'regular'\n\t */\n\tsize?: 'regular' | 'small';\n
|
|
1
|
+
{"version":3,"file":"model.js","sources":["../../../../src/components/tag/model.ts"],"sourcesContent":["import React from 'react';\nimport { MouseEventHandler } from 'react';\nimport { TooltipProps } from '../tooltips/Tooltip';\n\nexport type TagTheme = 'light' | 'dark';\n\nexport type TagVariant = 'regular' | 'circle' | 'compressed';\n\nexport type TagType =\n\t| 'negative'\n\t| 'warning'\n\t| 'positive'\n\t| 'neutral'\n\t| 'white'\n\t| 'purple'\n\t| 'blue'\n\t| 'grey'\n\t| 'ai';\n\nexport const ValidTagTypeMap = {\n\tregular: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\twhite: true,\n\t\tpurple: true,\n\t\tblue: true,\n\t\tai: true,\n\t},\n\tcircle: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\tblue: true,\n\t\tgrey: true,\n\t\tai: true,\n\t},\n\tcompressed: {\n\t\tnegative: true,\n\t\twarning: true,\n\t\tpositive: true,\n\t\tneutral: true,\n\t\twhite: true,\n\t\tpurple: true,\n\t\tblue: true,\n\t\tai: true,\n\t},\n};\n\nexport interface TagProps extends React.BaseHTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Set the theme of the Tag\n\t * @default default light\n\t */\n\ttheme?: TagTheme;\n\n\t/**\n\t * Set the color of the Tag\n\t * @default default neutral\n\t */\n\ttype?: TagType;\n\n\t/**\n\t * Set the color of the Tag\n\t * @default default regular\n\t */\n\tvariant?: TagVariant;\n\n\t/**\n\t * The icon component that is the right of the text\n\t * Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react\n\t * @default undefined\n\t */\n\tTrailingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\t/**\n\t * The right icon id,\n\t * @default trailing-icon\n\t */\n\ttrailingIconId?: string;\n\t/**\n\t * The right icon on click event, defaults to () => {}\n\t */\n\tonTrailingIconClicked?: MouseEventHandler<HTMLButtonElement>;\n\t/**\n\t * Tooltip props for the trailing icon\n\t * @default undefined\n\t */\n\ttrailingIconTooltip?: Omit<TooltipProps, 'children'>;\n\n\t/**\n\t * The icon component that is to the left of the text\n\t * Referred to https://ozzie.sh/passing-icons-as-props-in-a-consistent-way-using-react\n\t * @default undefined\n\t */\n\tLeadingIcon?: React.FunctionComponent<React.SVGAttributes<SVGElement>>;\n\t/**\n\t * The right icon on click event, defaults to () => {}\n\t */\n\tonLeadingIconClicked?: MouseEventHandler<HTMLButtonElement>;\n\t/**\n\t * The left icon id,\n\t * @default leading-icon\n\t */\n\tleadingIconId?: string;\n\t/**\n\t * Tooltip props for the leading icon\n\t * @default undefined\n\t */\n\tleadingIconTooltip?: Omit<TooltipProps, 'children'>;\n\n\ttagText: string | number;\n\tversion?: '1.0' | '2.0' | '3.0';\n\t/** Custom CSS padding string, e.g. '4px 8px' */\n\tpadding?: string;\n\t/** Custom height in px */\n\theight?: number;\n\tcursor?: string;\n\talignIcon?: string;\n\tnoBorder?: boolean;\n\ttagHtmlText?: JSX.Element;\n\tcontentPadding?: number;\n\ttagColor?: string;\n\tnumberOfLines?: number;\n\t/**\n\t * Override the computed background color of the tag container.\n\t * @default undefined (uses theme/type color)\n\t */\n\tbackgroundColor?: string;\n\t/**\n\t * Override the border-radius of the tag container.\n\t * @default undefined (uses variant-based radius: 4px for regular, 12px otherwise)\n\t */\n\tborderRadius?: string | number;\n\t/**\n\t * Controls the size of the tag. 'small' sets height to 16px and uses tiny font.\n\t * @default 'regular'\n\t */\n\tsize?: 'regular' | 'small';\n}\n"],"names":["ValidTagTypeMap"],"mappings":"AAmBO,MAAMA,IAAkB;AAAA,EAC9B,SAAS;AAAA,IACR,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEL,QAAQ;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAAA,EAEL,YAAY;AAAA,IACX,UAAU;AAAA,IACV,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,IAAI;AAAA,EAAA;AAEN;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as u, jsx as
|
|
1
|
+
import { jsxs as u, jsx as d } from "react/jsx-runtime";
|
|
2
2
|
import { getMarkRange as xt } from "../node_modules/@tiptap/core/dist/index.js";
|
|
3
3
|
import { useEditor as vt, EditorContent as X } from "@tiptap/react";
|
|
4
4
|
import { forwardRef as bt, useState as A, useRef as a, useEffect as Et, useImperativeHandle as At } from "react";
|
|
5
5
|
import { BodyCaption as Y } from "../components/TypographyStyle.js";
|
|
6
|
-
import { BikEditorShell as Tt, BikJsonHeader as
|
|
6
|
+
import { BikEditorShell as Tt, BikJsonHeader as It, BikJsonBody as Rt, BikJsonEmptyState as Jt, BikJsonError as Mt } from "./BikEditor.styles.js";
|
|
7
7
|
import { DEFAULT_FORMAT_STATE as tt } from "./BikEditor.types.js";
|
|
8
|
-
import { buildJsonCodeBlockHtml as
|
|
8
|
+
import { buildJsonCodeBlockHtml as Lt, buildSectionedContent as et, normalizeHtml as s, extractActiveFormats as nt, extractContent as ot, getCodeBlockText as g, parseJson as p, extractBodyContent as Ot, extractSectionContent as Ft, setCodeBlockText as x, findSectionEndPos as rt, findSectionStartPos as zt, setSectionContentInEditor as T, insertInlineHtml as Nt } from "./BikEditor.utils.js";
|
|
9
9
|
import { buildExtensions as jt } from "./extensions/buildExtensions.js";
|
|
10
10
|
import { LinkBubbleMenu as Ht } from "./floating/LinkBubbleMenu.js";
|
|
11
11
|
import wt from "../icons/BIK AI specific/WandSparkles.js";
|
|
@@ -22,20 +22,20 @@ const $t = (k, v) => {
|
|
|
22
22
|
initialContent: C,
|
|
23
23
|
sections: y,
|
|
24
24
|
features: B,
|
|
25
|
-
disabled:
|
|
26
|
-
maxCharacters:
|
|
27
|
-
characterLimit:
|
|
25
|
+
disabled: it,
|
|
26
|
+
maxCharacters: I,
|
|
27
|
+
characterLimit: st,
|
|
28
28
|
shortcuts: ct,
|
|
29
29
|
sendShortcut: at,
|
|
30
|
-
mentions:
|
|
30
|
+
mentions: l,
|
|
31
31
|
slashCommands: S,
|
|
32
32
|
link: lt,
|
|
33
33
|
onPaste: dt,
|
|
34
|
-
onReady:
|
|
34
|
+
onReady: R,
|
|
35
35
|
onChange: J,
|
|
36
36
|
onSend: b,
|
|
37
|
-
onFocus:
|
|
38
|
-
onBlur:
|
|
37
|
+
onFocus: M,
|
|
38
|
+
onBlur: L,
|
|
39
39
|
onSelectionChange: O,
|
|
40
40
|
minHeight: ut,
|
|
41
41
|
maxHeight: mt,
|
|
@@ -46,53 +46,54 @@ const $t = (k, v) => {
|
|
|
46
46
|
renderJsonError: N
|
|
47
47
|
} = k, m = !!B?.jsonMode, [f, j] = A(null), [ht, H] = A(!1), [pt, w] = A(
|
|
48
48
|
m && !(C ?? "").trim()
|
|
49
|
-
), Ct = m ?
|
|
50
|
-
|
|
51
|
-
y.map((t) => ({ ...t, content:
|
|
52
|
-
) :
|
|
53
|
-
D.current =
|
|
49
|
+
), Ct = m ? Lt(C ?? "") : y?.length ? et(
|
|
50
|
+
s(C ?? ""),
|
|
51
|
+
y.map((t) => ({ ...t, content: s(t.content) }))
|
|
52
|
+
) : s(C ?? ""), E = a([]), P = a(!1), D = a(R);
|
|
53
|
+
D.current = R;
|
|
54
54
|
const q = a(J);
|
|
55
55
|
q.current = J;
|
|
56
56
|
const U = a(O);
|
|
57
57
|
U.current = O;
|
|
58
|
-
const $ = a(tt), W = a(
|
|
59
|
-
W.current =
|
|
60
|
-
const V = a(
|
|
61
|
-
V.current =
|
|
58
|
+
const $ = a(tt), W = a(M);
|
|
59
|
+
W.current = M;
|
|
60
|
+
const V = a(L);
|
|
61
|
+
V.current = L;
|
|
62
62
|
const _ = a(b);
|
|
63
63
|
_.current = b;
|
|
64
|
-
const Q = a(
|
|
65
|
-
Q.current =
|
|
66
|
-
const Z = a(
|
|
67
|
-
Z.current =
|
|
64
|
+
const Q = a(l?.agents ?? []);
|
|
65
|
+
Q.current = l?.agents ?? [];
|
|
66
|
+
const Z = a(l?.teams ?? []);
|
|
67
|
+
Z.current = l?.teams ?? [];
|
|
68
68
|
const G = a(S?.items ?? []);
|
|
69
69
|
G.current = S?.items ?? [];
|
|
70
70
|
const n = vt({
|
|
71
71
|
extensions: jt({
|
|
72
72
|
features: B,
|
|
73
73
|
placeholder: k.placeholder,
|
|
74
|
-
maxCharacters:
|
|
75
|
-
characterLimit:
|
|
74
|
+
maxCharacters: I,
|
|
75
|
+
characterLimit: st,
|
|
76
76
|
hasSections: (y?.length ?? 0) > 0,
|
|
77
77
|
mentions: {
|
|
78
|
-
agents:
|
|
79
|
-
teams:
|
|
78
|
+
agents: l ? Q : void 0,
|
|
79
|
+
teams: l ? Z : void 0
|
|
80
80
|
},
|
|
81
81
|
slashCommands: S ? G : void 0,
|
|
82
82
|
onPaste: dt,
|
|
83
83
|
onSend: b ? (t) => _.current?.(t) : void 0,
|
|
84
84
|
sendShortcut: at,
|
|
85
85
|
shortcuts: ct,
|
|
86
|
-
onMentionSelected:
|
|
86
|
+
onMentionSelected: l?.onSelect,
|
|
87
87
|
onSlashCommandSelected: S?.onSelect,
|
|
88
|
-
renderMentionItem:
|
|
89
|
-
renderMentionDropdown:
|
|
90
|
-
removeMentionTriggerOnDismiss:
|
|
88
|
+
renderMentionItem: l?.renderItem,
|
|
89
|
+
renderMentionDropdown: l?.renderDropdown,
|
|
90
|
+
removeMentionTriggerOnDismiss: l?.removeTriggerOnDismiss,
|
|
91
|
+
renderMentionChipIcon: l?.renderChipIcon,
|
|
91
92
|
renderSlashCommandItem: S?.renderItem,
|
|
92
93
|
renderSlashCommandDropdown: S?.renderDropdown
|
|
93
94
|
}),
|
|
94
95
|
content: Ct,
|
|
95
|
-
editable: !
|
|
96
|
+
editable: !it,
|
|
96
97
|
immediatelyRender: !1,
|
|
97
98
|
// SSR-safe — NEVER remove this
|
|
98
99
|
editorProps: {
|
|
@@ -114,7 +115,7 @@ const $t = (k, v) => {
|
|
|
114
115
|
onFocus: () => W.current?.(),
|
|
115
116
|
onBlur: () => V.current?.()
|
|
116
117
|
});
|
|
117
|
-
function
|
|
118
|
+
function i(t) {
|
|
118
119
|
n ? t(n) : E.current.push(t);
|
|
119
120
|
}
|
|
120
121
|
Et(() => {
|
|
@@ -126,34 +127,34 @@ const $t = (k, v) => {
|
|
|
126
127
|
v,
|
|
127
128
|
() => ({
|
|
128
129
|
// ── Focus ────────────────────────────────────────────────────────
|
|
129
|
-
focus: (t) =>
|
|
130
|
-
blur: () =>
|
|
130
|
+
focus: (t) => i((e) => e.commands.focus(t)),
|
|
131
|
+
blur: () => i((t) => t.commands.blur()),
|
|
131
132
|
// ── Content ──────────────────────────────────────────────────────
|
|
132
|
-
clearContent: () =>
|
|
133
|
+
clearContent: () => i((t) => t.commands.clearContent(!0)),
|
|
133
134
|
setContent: (t) => {
|
|
134
|
-
const e =
|
|
135
|
-
|
|
135
|
+
const e = s(t);
|
|
136
|
+
i((o) => o.commands.setContent(e, { emitUpdate: !0 }));
|
|
136
137
|
},
|
|
137
138
|
insertContent: (t) => {
|
|
138
|
-
const e =
|
|
139
|
-
|
|
139
|
+
const e = s(t);
|
|
140
|
+
i((o) => o.commands.insertContent(e));
|
|
140
141
|
},
|
|
141
142
|
insertInlineContent: (t) => {
|
|
142
|
-
|
|
143
|
+
i((e) => Nt(e, t));
|
|
143
144
|
},
|
|
144
145
|
insertAtStart: (t) => {
|
|
145
|
-
const e =
|
|
146
|
-
|
|
146
|
+
const e = s(t);
|
|
147
|
+
i((o) => o.commands.insertContentAt(1, e));
|
|
147
148
|
},
|
|
148
149
|
insertBlock: (t) => {
|
|
149
|
-
const e =
|
|
150
|
-
|
|
150
|
+
const e = s(t);
|
|
151
|
+
i(
|
|
151
152
|
(o) => o.commands.insertContentAt(o.state.doc.content.size, e)
|
|
152
153
|
);
|
|
153
154
|
},
|
|
154
155
|
appendInline: (t) => {
|
|
155
|
-
const e =
|
|
156
|
-
|
|
156
|
+
const e = s(t);
|
|
157
|
+
i(
|
|
157
158
|
(o) => o.commands.insertContentAt(o.state.doc.content.size - 1, e)
|
|
158
159
|
);
|
|
159
160
|
},
|
|
@@ -179,8 +180,8 @@ const $t = (k, v) => {
|
|
|
179
180
|
return { from: t, to: e };
|
|
180
181
|
},
|
|
181
182
|
insertAtPosition: (t, e) => {
|
|
182
|
-
const o =
|
|
183
|
-
|
|
183
|
+
const o = s(e);
|
|
184
|
+
i((r) => r.commands.insertContentAt(t, o));
|
|
184
185
|
},
|
|
185
186
|
getSelectedText: () => {
|
|
186
187
|
if (!n) return "";
|
|
@@ -198,16 +199,16 @@ const $t = (k, v) => {
|
|
|
198
199
|
// ── Character count ───────────────────────────────────────────────
|
|
199
200
|
getCharacterCount: () => ({
|
|
200
201
|
count: n?.storage.characterCount?.characters?.() ?? n?.getText().length ?? 0,
|
|
201
|
-
limit:
|
|
202
|
+
limit: I ?? null
|
|
202
203
|
}),
|
|
203
204
|
// ── Sections ─────────────────────────────────────────────────────
|
|
204
205
|
getSectionContent: (t) => n ? Ft(n, t) : { html: "", text: "", isEmpty: !0, characterCount: 0 },
|
|
205
206
|
setSectionContent: (t, e) => {
|
|
206
|
-
const o =
|
|
207
|
-
|
|
207
|
+
const o = s(e);
|
|
208
|
+
i((r) => T(r, t, o));
|
|
208
209
|
},
|
|
209
210
|
focusSection: (t) => {
|
|
210
|
-
|
|
211
|
+
i((e) => {
|
|
211
212
|
if (t === "body") {
|
|
212
213
|
let r = e.state.doc.content.size - 1;
|
|
213
214
|
e.state.doc.descendants((c, h) => (c.type.name === "sectionDivider" && r === e.state.doc.content.size - 1 && (r = h - 1), r === e.state.doc.content.size - 1)), r < 1 && (r = 1), e.chain().focus().setTextSelection(r).run();
|
|
@@ -221,27 +222,27 @@ const $t = (k, v) => {
|
|
|
221
222
|
});
|
|
222
223
|
},
|
|
223
224
|
clearSection: (t) => {
|
|
224
|
-
|
|
225
|
+
i((e) => T(e, t, "<p></p>"));
|
|
225
226
|
},
|
|
226
227
|
// ── Convenience body shorthands ───────────────────────────────────
|
|
227
228
|
getBodyContent: () => n ? Ot(n) : { html: "", text: "", isEmpty: !0, characterCount: 0 },
|
|
228
229
|
setBodyContent: (t) => {
|
|
229
|
-
const e =
|
|
230
|
-
|
|
230
|
+
const e = s(t);
|
|
231
|
+
i((o) => T(o, "body", e));
|
|
231
232
|
},
|
|
232
233
|
setBodyAndSections: (t, e) => {
|
|
233
234
|
const o = et(
|
|
234
|
-
|
|
235
|
+
s(t),
|
|
235
236
|
e.map((r) => ({
|
|
236
237
|
id: r.id,
|
|
237
|
-
content:
|
|
238
|
+
content: s(r.content)
|
|
238
239
|
}))
|
|
239
240
|
);
|
|
240
|
-
|
|
241
|
+
i((r) => r.commands.setContent(o, { emitUpdate: !0 }));
|
|
241
242
|
},
|
|
242
243
|
appendBodyContent: (t) => {
|
|
243
|
-
const e =
|
|
244
|
-
|
|
244
|
+
const e = s(t);
|
|
245
|
+
i((o) => {
|
|
245
246
|
const r = rt(o, "body");
|
|
246
247
|
o.commands.insertContentAt(r - 1, e, {
|
|
247
248
|
parseOptions: { preserveWhitespace: !0 }
|
|
@@ -249,8 +250,8 @@ const $t = (k, v) => {
|
|
|
249
250
|
});
|
|
250
251
|
},
|
|
251
252
|
insertAtSectionStart: (t, e) => {
|
|
252
|
-
const o =
|
|
253
|
-
|
|
253
|
+
const o = s(e);
|
|
254
|
+
i((r) => {
|
|
254
255
|
const c = zt(r, t);
|
|
255
256
|
c !== -1 && r.commands.insertContentAt(c, o, {
|
|
256
257
|
parseOptions: { preserveWhitespace: !0 }
|
|
@@ -258,8 +259,8 @@ const $t = (k, v) => {
|
|
|
258
259
|
});
|
|
259
260
|
},
|
|
260
261
|
insertAtSectionEnd: (t, e) => {
|
|
261
|
-
const o =
|
|
262
|
-
|
|
262
|
+
const o = s(e);
|
|
263
|
+
i((r) => {
|
|
263
264
|
const c = rt(r, t);
|
|
264
265
|
r.commands.insertContentAt(c, o, {
|
|
265
266
|
parseOptions: { preserveWhitespace: !0 }
|
|
@@ -298,7 +299,7 @@ const $t = (k, v) => {
|
|
|
298
299
|
removeLink: () => n?.chain().focus().extendMarkRange("link").unsetLink().run(),
|
|
299
300
|
insertEmoji: (t) => n?.chain().focus().insertContent(t).run(),
|
|
300
301
|
insertVariable: (t) => n?.chain().focus().insertContent(`{{${t}}}`).run(),
|
|
301
|
-
insertHtml: (t) => n?.commands.insertContent(
|
|
302
|
+
insertHtml: (t) => n?.commands.insertContent(s(t)),
|
|
302
303
|
undo: () => n?.chain().focus().undo().run(),
|
|
303
304
|
redo: () => n?.chain().focus().redo().run(),
|
|
304
305
|
canUndo: () => n?.can().undo() ?? !1,
|
|
@@ -310,14 +311,14 @@ const $t = (k, v) => {
|
|
|
310
311
|
// ── JSON body ─────────────────────────────────────────────────────
|
|
311
312
|
json: B?.jsonMode ? {
|
|
312
313
|
getText: () => n ? g(n) : "",
|
|
313
|
-
setText: (t) =>
|
|
314
|
+
setText: (t) => i((e) => x(e, t)),
|
|
314
315
|
parse: () => p(n ? g(n) : ""),
|
|
315
316
|
isValid: () => p(n ? g(n) : "").valid,
|
|
316
|
-
format: (t = 2) =>
|
|
317
|
+
format: (t = 2) => i((e) => {
|
|
317
318
|
const { valid: o, value: r } = p(g(e));
|
|
318
319
|
!o || r === null || x(e, JSON.stringify(r, null, t));
|
|
319
320
|
}),
|
|
320
|
-
minify: () =>
|
|
321
|
+
minify: () => i((t) => {
|
|
321
322
|
const { valid: e, value: o } = p(g(t));
|
|
322
323
|
!e || o === null || x(t, JSON.stringify(o));
|
|
323
324
|
})
|
|
@@ -343,8 +344,8 @@ const $t = (k, v) => {
|
|
|
343
344
|
style: ft,
|
|
344
345
|
className: gt,
|
|
345
346
|
children: [
|
|
346
|
-
m && /* @__PURE__ */ u(
|
|
347
|
-
/* @__PURE__ */
|
|
347
|
+
m && /* @__PURE__ */ u(It, { children: [
|
|
348
|
+
/* @__PURE__ */ d("span", { className: "bik-json-header-label", children: "JSON" }),
|
|
348
349
|
/* @__PURE__ */ u("div", { className: "bik-json-header-actions", children: [
|
|
349
350
|
/* @__PURE__ */ u(
|
|
350
351
|
"button",
|
|
@@ -354,27 +355,27 @@ const $t = (k, v) => {
|
|
|
354
355
|
disabled: !!f,
|
|
355
356
|
title: "Format JSON",
|
|
356
357
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ d(wt, { size: 16 }),
|
|
359
|
+
/* @__PURE__ */ d(Y, { children: "Beautify" })
|
|
359
360
|
]
|
|
360
361
|
}
|
|
361
362
|
),
|
|
362
363
|
/* @__PURE__ */ u("button", { type: "button", onClick: kt, title: "Copy JSON", children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
ht && /* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ d(Pt, { size: 16 }),
|
|
365
|
+
ht && /* @__PURE__ */ d(Y, { children: "Copied" })
|
|
365
366
|
] })
|
|
366
367
|
] })
|
|
367
368
|
] }),
|
|
368
|
-
m ? /* @__PURE__ */ u(
|
|
369
|
-
/* @__PURE__ */
|
|
369
|
+
m ? /* @__PURE__ */ u(Rt, { $error: !!f, children: [
|
|
370
|
+
/* @__PURE__ */ d(X, { editor: n }),
|
|
370
371
|
pt && /* @__PURE__ */ u(Jt, { "aria-hidden": !0, children: [
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ d(Dt, { size: 20 }),
|
|
373
|
+
/* @__PURE__ */ d("span", { children: k.placeholder ?? "Type or paste JSON here" })
|
|
373
374
|
] })
|
|
374
|
-
] }) : /* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
m && f ? N ? N(f) : /* @__PURE__ */ u(
|
|
377
|
-
/* @__PURE__ */
|
|
375
|
+
] }) : /* @__PURE__ */ d(X, { editor: n }),
|
|
376
|
+
/* @__PURE__ */ d(Ht, { editor: n, renderLinkTooltip: lt?.renderTooltip }),
|
|
377
|
+
m && f ? N ? N(f) : /* @__PURE__ */ u(Mt, { children: [
|
|
378
|
+
/* @__PURE__ */ d(qt, { size: 16 }),
|
|
378
379
|
/* @__PURE__ */ u("span", { children: [
|
|
379
380
|
f.line != null && /* @__PURE__ */ u("strong", { children: [
|
|
380
381
|
"Line ",
|