slack-blocks-to-jsx 0.1.1 → 0.1.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/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +284 -60
- package/dist/index.mjs +284 -60
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/readme.md +4 -0
- package/postcss.config.js +0 -9
package/dist/index.d.mts
CHANGED
|
@@ -478,6 +478,16 @@ type UsersSelectElement = {
|
|
|
478
478
|
* A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
|
|
479
479
|
*/
|
|
480
480
|
placeholder?: TextObject<"plain_text">;
|
|
481
|
+
/**
|
|
482
|
+
* This is custom property for you to pass the list of people to show in the select menu. (This is not a part of the official Slack API)
|
|
483
|
+
*/
|
|
484
|
+
people: {
|
|
485
|
+
id: string;
|
|
486
|
+
name: string;
|
|
487
|
+
image: string;
|
|
488
|
+
online: boolean;
|
|
489
|
+
sleeping: boolean;
|
|
490
|
+
}[];
|
|
481
491
|
};
|
|
482
492
|
type ConversationsSelectElement = {
|
|
483
493
|
type: "conversations_select";
|
|
@@ -841,7 +851,7 @@ type InputBlock = {
|
|
|
841
851
|
/**
|
|
842
852
|
* A plain-text input element, a checkbox element, a radio button element, a select menu element, a multi-select menu element, or a datepicker.
|
|
843
853
|
*/
|
|
844
|
-
element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | DatePickerElement;
|
|
854
|
+
element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | DatePickerElement | UsersSelectElement;
|
|
845
855
|
/**
|
|
846
856
|
* A boolean that indicates whether or not the use of elements in this block should dispatch a {@link https://api.slack.com/reference/interaction-payloads/block-actions ***block_actions*** payload}. Defaults to false.
|
|
847
857
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -478,6 +478,16 @@ type UsersSelectElement = {
|
|
|
478
478
|
* A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters.
|
|
479
479
|
*/
|
|
480
480
|
placeholder?: TextObject<"plain_text">;
|
|
481
|
+
/**
|
|
482
|
+
* This is custom property for you to pass the list of people to show in the select menu. (This is not a part of the official Slack API)
|
|
483
|
+
*/
|
|
484
|
+
people: {
|
|
485
|
+
id: string;
|
|
486
|
+
name: string;
|
|
487
|
+
image: string;
|
|
488
|
+
online: boolean;
|
|
489
|
+
sleeping: boolean;
|
|
490
|
+
}[];
|
|
481
491
|
};
|
|
482
492
|
type ConversationsSelectElement = {
|
|
483
493
|
type: "conversations_select";
|
|
@@ -841,7 +851,7 @@ type InputBlock = {
|
|
|
841
851
|
/**
|
|
842
852
|
* A plain-text input element, a checkbox element, a radio button element, a select menu element, a multi-select menu element, or a datepicker.
|
|
843
853
|
*/
|
|
844
|
-
element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | DatePickerElement;
|
|
854
|
+
element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | DatePickerElement | UsersSelectElement;
|
|
845
855
|
/**
|
|
846
856
|
* A boolean that indicates whether or not the use of elements in this block should dispatch a {@link https://api.slack.com/reference/interaction-payloads/block-actions ***block_actions*** payload}. Defaults to false.
|
|
847
857
|
*/
|
package/dist/index.js
CHANGED
|
@@ -479,7 +479,14 @@ var Header = (props) => {
|
|
|
479
479
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
480
480
|
var ImageElement = (props) => {
|
|
481
481
|
const { alt_text, image_url } = props.data;
|
|
482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "relative
|
|
482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
483
|
+
"img",
|
|
484
|
+
{
|
|
485
|
+
src: image_url,
|
|
486
|
+
alt: alt_text,
|
|
487
|
+
className: "w-[88px] h-[88px] rounded-lg overflow-hidden object-cover"
|
|
488
|
+
}
|
|
489
|
+
) });
|
|
483
490
|
};
|
|
484
491
|
|
|
485
492
|
// src/components/composition_objects/text_object.tsx
|
|
@@ -676,53 +683,242 @@ var CheckboxesElement = (props) => {
|
|
|
676
683
|
}) }) });
|
|
677
684
|
};
|
|
678
685
|
|
|
679
|
-
// src/components/
|
|
686
|
+
// src/components/elements/plain_text_input.tsx
|
|
687
|
+
var import_react3 = require("react");
|
|
680
688
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
689
|
+
var PlaintTextInput = (props) => {
|
|
690
|
+
const {
|
|
691
|
+
action_id,
|
|
692
|
+
dispatch_action_config,
|
|
693
|
+
focus_on_load,
|
|
694
|
+
initial_value,
|
|
695
|
+
max_length,
|
|
696
|
+
min_length,
|
|
697
|
+
multiline,
|
|
698
|
+
placeholder
|
|
699
|
+
} = props.data;
|
|
700
|
+
const [visible, setVisible] = (0, import_react3.useState)(focus_on_load != null ? focus_on_load : false);
|
|
701
|
+
const [value, setValue] = (0, import_react3.useState)(initial_value || "");
|
|
702
|
+
(0, import_react3.useEffect)(() => {
|
|
703
|
+
const handleClickOutside = (e) => {
|
|
704
|
+
var _a, _b;
|
|
705
|
+
const target = e.target;
|
|
706
|
+
console.log({ target });
|
|
707
|
+
console.log(target.id);
|
|
708
|
+
if (target.id !== "static_select_popup" && target.id !== "static_select_dropdown_button" && ((_a = target.parentElement) == null ? void 0 : _a.id) !== "static_select_popup" && ((_b = target.parentElement) == null ? void 0 : _b.id) !== "static_select_dropdown_button")
|
|
709
|
+
setVisible(false);
|
|
710
|
+
};
|
|
711
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
712
|
+
return () => {
|
|
713
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
714
|
+
};
|
|
715
|
+
}, []);
|
|
716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id: action_id, className: "relative text-small w-full", tabIndex: 0, children: [
|
|
717
|
+
!value && placeholder && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute left-2 top-2 text-black-primary.3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(TextObject, { data: placeholder }) }),
|
|
718
|
+
!value && !placeholder && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "absolute left-2 top-2 text-black-primary.3", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
719
|
+
TextObject,
|
|
720
|
+
{
|
|
721
|
+
data: {
|
|
722
|
+
type: "plain_text",
|
|
723
|
+
text: "Write something"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
) }),
|
|
727
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
728
|
+
"textarea",
|
|
729
|
+
{
|
|
730
|
+
value,
|
|
731
|
+
onChange: (e) => setValue(e.target.value),
|
|
732
|
+
className: "w-full focus:outline-none rounded border border-black-primary.3 p-2",
|
|
733
|
+
minLength: min_length,
|
|
734
|
+
maxLength: max_length,
|
|
735
|
+
style: {
|
|
736
|
+
maxHeight: "200px",
|
|
737
|
+
minHeight: "80px",
|
|
738
|
+
height: "100px"
|
|
739
|
+
},
|
|
740
|
+
"aria-label": "Select an item"
|
|
741
|
+
}
|
|
742
|
+
)
|
|
743
|
+
] });
|
|
744
|
+
};
|
|
745
|
+
|
|
746
|
+
// src/components/elements/users_select_element.tsx
|
|
747
|
+
var import_react4 = require("react");
|
|
748
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
749
|
+
var UsersSelectElement = (props) => {
|
|
750
|
+
const { action_id, focus_on_load, placeholder, type, confirm, initial_user, people } = props.data;
|
|
751
|
+
const [visible, setVisible] = (0, import_react4.useState)(focus_on_load || false);
|
|
752
|
+
const [search, setSearch] = (0, import_react4.useState)("");
|
|
753
|
+
const [selected, setSelected] = (0, import_react4.useState)("");
|
|
754
|
+
(0, import_react4.useEffect)(() => {
|
|
755
|
+
const handleClickOutside = (e) => {
|
|
756
|
+
var _a, _b;
|
|
757
|
+
const target = e.target;
|
|
758
|
+
console.log({ target });
|
|
759
|
+
console.log(target.id);
|
|
760
|
+
if (target.id !== "static_select_popup" && target.id !== "static_select_dropdown_button" && ((_a = target.parentElement) == null ? void 0 : _a.id) !== "static_select_popup" && ((_b = target.parentElement) == null ? void 0 : _b.id) !== "static_select_dropdown_button")
|
|
761
|
+
setVisible(false);
|
|
762
|
+
};
|
|
763
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
764
|
+
return () => {
|
|
765
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
766
|
+
};
|
|
767
|
+
}, []);
|
|
768
|
+
const filteredOptions = people.filter((person) => {
|
|
769
|
+
const search_query = search.toLowerCase().trim();
|
|
770
|
+
if (!search_query)
|
|
771
|
+
return true;
|
|
772
|
+
const name = person.name.toLowerCase();
|
|
773
|
+
return name.includes(search_query);
|
|
774
|
+
}, []);
|
|
775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
776
|
+
"div",
|
|
777
|
+
{
|
|
778
|
+
id: action_id,
|
|
779
|
+
className: "py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3",
|
|
780
|
+
tabIndex: 0,
|
|
781
|
+
children: [
|
|
782
|
+
visible && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
783
|
+
"div",
|
|
784
|
+
{
|
|
785
|
+
className: "absolute top-[24px] -left-3 bg-white-secondary border border-gray-primary rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",
|
|
786
|
+
id: "static_select_popup",
|
|
787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col", children: filteredOptions.map((option, i) => {
|
|
788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
789
|
+
"button",
|
|
790
|
+
{
|
|
791
|
+
className: "h-7 px-6 flex group items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary",
|
|
792
|
+
tabIndex: 0,
|
|
793
|
+
type: "button",
|
|
794
|
+
onClick: () => {
|
|
795
|
+
setVisible(false);
|
|
796
|
+
setSelected(option.id);
|
|
797
|
+
},
|
|
798
|
+
children: [
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("img", { src: option.image, alt: option.name, className: "w-5 h-5 rounded-md" }),
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
801
|
+
TextObject,
|
|
802
|
+
{
|
|
803
|
+
data: {
|
|
804
|
+
type: "mrkdwn",
|
|
805
|
+
text: `*${option.name}*`
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
),
|
|
809
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "relative", children: [
|
|
810
|
+
option.online && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
811
|
+
"div",
|
|
812
|
+
{
|
|
813
|
+
className: `bg-green-secondary w-[9px] h-[9px] rounded-full shrink-0`
|
|
814
|
+
}
|
|
815
|
+
),
|
|
816
|
+
!option.online && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-[9px] h-[9px] rounded-full border-[1.5px] shrink-0 border-black-secondary" }),
|
|
817
|
+
option.sleeping && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "absolute -top-[5px] -right-[5px] h-[10px] w-[10px] rounded-full bg-white-secondary flex justify-center z-[10] text-[8px] leading-[8px] font-semibold group-hover:bg-blue-primary", children: "z" })
|
|
818
|
+
] }),
|
|
819
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-black-primary", children: option.name })
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
i
|
|
823
|
+
);
|
|
824
|
+
}) })
|
|
825
|
+
}
|
|
826
|
+
),
|
|
827
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
828
|
+
"input",
|
|
829
|
+
{
|
|
830
|
+
type: "text",
|
|
831
|
+
value: search,
|
|
832
|
+
onClick: () => setVisible(true),
|
|
833
|
+
onChange: (e) => setSearch(e.currentTarget.value),
|
|
834
|
+
className: "w-full py-1 pr-7 focus:outline-none",
|
|
835
|
+
tabIndex: -1,
|
|
836
|
+
"aria-label": "Select an item"
|
|
837
|
+
}
|
|
838
|
+
),
|
|
839
|
+
!search && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "absolute w-full h-full pointer-events-none flex items-center text-black-primary.3", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
840
|
+
TextObject,
|
|
841
|
+
{
|
|
842
|
+
data: placeholder != null ? placeholder : {
|
|
843
|
+
type: "plain_text",
|
|
844
|
+
text: "Pick an option"
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
) }),
|
|
848
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
849
|
+
"button",
|
|
850
|
+
{
|
|
851
|
+
className: "absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary z-10 h-full",
|
|
852
|
+
id: "static_select_dropdown_button",
|
|
853
|
+
onClick: () => {
|
|
854
|
+
setVisible((prev) => !prev);
|
|
855
|
+
},
|
|
856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
857
|
+
"svg",
|
|
858
|
+
{
|
|
859
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
860
|
+
fill: "none",
|
|
861
|
+
viewBox: "0 0 24 24",
|
|
862
|
+
strokeWidth: "3",
|
|
863
|
+
stroke: "currentColor",
|
|
864
|
+
className: "w-3 h-3",
|
|
865
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })
|
|
866
|
+
}
|
|
867
|
+
)
|
|
868
|
+
}
|
|
869
|
+
)
|
|
870
|
+
]
|
|
871
|
+
}
|
|
872
|
+
);
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
// src/components/blocks/actions.tsx
|
|
876
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
681
877
|
var Actions = (props) => {
|
|
682
878
|
const { elements, block_id } = props.data;
|
|
683
|
-
return /* @__PURE__ */ (0,
|
|
879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
684
880
|
"div",
|
|
685
881
|
{
|
|
686
882
|
id: block_id,
|
|
687
883
|
className: "mb-2 text-primary flex w-full text-black-primary items-center slack_blocks_to_jsx__actions",
|
|
688
|
-
children: /* @__PURE__ */ (0,
|
|
884
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex flex-wrap", children: elements.map((element, i) => {
|
|
689
885
|
if (element.type === "button") {
|
|
690
|
-
return /* @__PURE__ */ (0,
|
|
886
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-2 mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ButtonElement, { data: element }) }, i);
|
|
691
887
|
}
|
|
692
888
|
if (element.type === "static_select") {
|
|
693
|
-
return /* @__PURE__ */ (0,
|
|
889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-2 mr-2", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(StaticSelectElement, { data: element }) }, i);
|
|
694
890
|
}
|
|
695
|
-
return /* @__PURE__ */ (0,
|
|
891
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "mt-2 mr-2" }, i);
|
|
696
892
|
}) })
|
|
697
893
|
}
|
|
698
894
|
);
|
|
699
895
|
};
|
|
700
896
|
|
|
701
897
|
// src/components/blocks/context.tsx
|
|
702
|
-
var
|
|
898
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
703
899
|
var Context = (props) => {
|
|
704
900
|
const { elements, block_id } = props.data;
|
|
705
|
-
return /* @__PURE__ */ (0,
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
706
902
|
"div",
|
|
707
903
|
{
|
|
708
904
|
id: block_id,
|
|
709
905
|
className: "my-1 text-primary flex w-full text-black-primary flex-wrap items-center overflow-hidden slack_blocks_to_jsx__context",
|
|
710
906
|
children: elements.slice(0, 10).map((element, i) => {
|
|
711
907
|
if (element.type !== "image") {
|
|
712
|
-
return /* @__PURE__ */ (0,
|
|
908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-black-secondary text-small pr-3 flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(TextObject, { data: element }) }, i);
|
|
713
909
|
}
|
|
714
|
-
return /* @__PURE__ */ (0,
|
|
910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ImageElement, { data: element }) }, i);
|
|
715
911
|
})
|
|
716
912
|
}
|
|
717
913
|
);
|
|
718
914
|
};
|
|
719
915
|
|
|
720
916
|
// src/components/blocks/divider.tsx
|
|
721
|
-
var
|
|
917
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
722
918
|
var Divider = (props) => {
|
|
723
919
|
const { data } = props;
|
|
724
920
|
const { block_id } = data;
|
|
725
|
-
return /* @__PURE__ */ (0,
|
|
921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
726
922
|
"div",
|
|
727
923
|
{
|
|
728
924
|
id: block_id,
|
|
@@ -744,18 +940,18 @@ var Header2 = (props) => {
|
|
|
744
940
|
};
|
|
745
941
|
|
|
746
942
|
// src/components/blocks/image.tsx
|
|
747
|
-
var
|
|
748
|
-
var
|
|
943
|
+
var import_react5 = require("react");
|
|
944
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
749
945
|
var Image = (props) => {
|
|
750
946
|
const { block_id, alt_text, image_url, image_bytes, image_height, image_width } = props.data;
|
|
751
|
-
const [showImage, setShowImage] = (0,
|
|
752
|
-
return /* @__PURE__ */ (0,
|
|
753
|
-
/* @__PURE__ */ (0,
|
|
754
|
-
/* @__PURE__ */ (0,
|
|
947
|
+
const [showImage, setShowImage] = (0, import_react5.useState)(true);
|
|
948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { id: block_id, className: "my-2 flex flex-col gap-2 slack_blocks_to_jsx__image", children: [
|
|
949
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "text-black-secondary text-small flex gap-1 items-center", children: [
|
|
950
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { children: [
|
|
755
951
|
alt_text,
|
|
756
952
|
image_bytes && ` (${Math.round(image_bytes / 1e3)} kB)`
|
|
757
953
|
] }),
|
|
758
|
-
/* @__PURE__ */ (0,
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", { className: "w-[15px] h-[15px]", onClick: () => setShowImage((prev) => !prev), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
759
955
|
"svg",
|
|
760
956
|
{
|
|
761
957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -771,7 +967,7 @@ var Image = (props) => {
|
|
|
771
967
|
style: {
|
|
772
968
|
transform: showImage ? "rotate(0deg)" : "rotate(-90deg)"
|
|
773
969
|
},
|
|
774
|
-
children: /* @__PURE__ */ (0,
|
|
970
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
775
971
|
"path",
|
|
776
972
|
{
|
|
777
973
|
fill: "currentColor",
|
|
@@ -782,7 +978,7 @@ var Image = (props) => {
|
|
|
782
978
|
}
|
|
783
979
|
) })
|
|
784
980
|
] }),
|
|
785
|
-
showImage && /* @__PURE__ */ (0,
|
|
981
|
+
showImage && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "rounded-md overflow-hidden relative max-w-max", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
786
982
|
"img",
|
|
787
983
|
{
|
|
788
984
|
src: image_url,
|
|
@@ -797,9 +993,37 @@ var Image = (props) => {
|
|
|
797
993
|
};
|
|
798
994
|
|
|
799
995
|
// src/components/blocks/input.tsx
|
|
996
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
800
997
|
var Input = (props) => {
|
|
801
|
-
const { type } = props.data;
|
|
802
|
-
|
|
998
|
+
const { element: given_element, label, block_id, hint, optional, type } = props.data;
|
|
999
|
+
const element = given_element ? getElementComponent(given_element) : null;
|
|
1000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1001
|
+
"div",
|
|
1002
|
+
{
|
|
1003
|
+
id: block_id,
|
|
1004
|
+
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__input flex w-full text-black-primary`,
|
|
1005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "grow", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
1006
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1007
|
+
TextObject,
|
|
1008
|
+
{
|
|
1009
|
+
data: {
|
|
1010
|
+
type: "mrkdwn",
|
|
1011
|
+
text: `*${label.text}*`,
|
|
1012
|
+
emoji: label.emoji,
|
|
1013
|
+
verbatim: label.verbatim
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
),
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "mb-1 flex flex-col gap-1", children: [
|
|
1018
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "relative shrink-0", children: element }),
|
|
1019
|
+
(hint || given_element.type === "plain_text_input") && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "text-black-secondary text-small flex gap-1", children: [
|
|
1020
|
+
hint && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "inline", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TextObject, { data: hint }) }),
|
|
1021
|
+
given_element.type === "plain_text_input" && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: "\u21B5 Please 'enter' to submit" })
|
|
1022
|
+
] })
|
|
1023
|
+
] })
|
|
1024
|
+
] }) })
|
|
1025
|
+
}
|
|
1026
|
+
);
|
|
803
1027
|
};
|
|
804
1028
|
|
|
805
1029
|
// src/components/blocks/rich-text.tsx
|
|
@@ -809,24 +1033,24 @@ var RichText = (props) => {
|
|
|
809
1033
|
};
|
|
810
1034
|
|
|
811
1035
|
// src/components/blocks/section.tsx
|
|
812
|
-
var
|
|
1036
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
813
1037
|
var Section = (props) => {
|
|
814
1038
|
const { accessory, fields, text, block_id } = props.data;
|
|
815
1039
|
const element = accessory ? getElementComponent(accessory) : null;
|
|
816
1040
|
const is_stacked = accessory ? is_accessory_stacked(accessory) : false;
|
|
817
|
-
return /* @__PURE__ */ (0,
|
|
1041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
818
1042
|
"div",
|
|
819
1043
|
{
|
|
820
1044
|
id: block_id,
|
|
821
1045
|
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary ${is_stacked ? "flex-col" : ""}`,
|
|
822
1046
|
children: [
|
|
823
|
-
/* @__PURE__ */ (0,
|
|
824
|
-
text && /* @__PURE__ */ (0,
|
|
825
|
-
fields && /* @__PURE__ */ (0,
|
|
826
|
-
return /* @__PURE__ */ (0,
|
|
1047
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "grow", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex flex-col gap-3", children: [
|
|
1048
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TextObject, { data: text }),
|
|
1049
|
+
fields && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "grid grid-col-2 w-full", children: fields.map((field, i) => {
|
|
1050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TextObject, { data: field }, i);
|
|
827
1051
|
}) })
|
|
828
1052
|
] }) }),
|
|
829
|
-
element && is_stacked ? element : /* @__PURE__ */ (0,
|
|
1053
|
+
element && is_stacked ? element : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "ml-2 mb-1 relative shrink-0", children: element })
|
|
830
1054
|
]
|
|
831
1055
|
}
|
|
832
1056
|
);
|
|
@@ -839,43 +1063,47 @@ var Video = (props) => {
|
|
|
839
1063
|
};
|
|
840
1064
|
|
|
841
1065
|
// src/components/index.tsx
|
|
842
|
-
var
|
|
1066
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
843
1067
|
var getBlockComponent = (block) => {
|
|
844
1068
|
if (block.type === "divider")
|
|
845
|
-
return /* @__PURE__ */ (0,
|
|
1069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Divider, { data: block });
|
|
846
1070
|
if (block.type === "section")
|
|
847
|
-
return /* @__PURE__ */ (0,
|
|
1071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Section, { data: block });
|
|
848
1072
|
if (block.type === "image")
|
|
849
|
-
return /* @__PURE__ */ (0,
|
|
1073
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Image, { data: block });
|
|
850
1074
|
if (block.type === "context")
|
|
851
|
-
return /* @__PURE__ */ (0,
|
|
1075
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Context, { data: block });
|
|
852
1076
|
if (block.type === "actions")
|
|
853
|
-
return /* @__PURE__ */ (0,
|
|
1077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Actions, { data: block });
|
|
854
1078
|
if (block.type === "file")
|
|
855
|
-
return /* @__PURE__ */ (0,
|
|
1079
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(File, { data: block });
|
|
856
1080
|
if (block.type === "header")
|
|
857
|
-
return /* @__PURE__ */ (0,
|
|
1081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Header2, { data: block });
|
|
858
1082
|
if (block.type === "input")
|
|
859
|
-
return /* @__PURE__ */ (0,
|
|
1083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Input, { data: block });
|
|
860
1084
|
if (block.type === "video")
|
|
861
|
-
return /* @__PURE__ */ (0,
|
|
1085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Video, { data: block });
|
|
862
1086
|
if (block.type === "rich_text")
|
|
863
|
-
return /* @__PURE__ */ (0,
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(RichText, { data: block });
|
|
864
1088
|
return null;
|
|
865
1089
|
};
|
|
866
1090
|
var getElementComponent = (element) => {
|
|
867
1091
|
if (element.type === "button")
|
|
868
|
-
return /* @__PURE__ */ (0,
|
|
1092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ButtonElement, { data: element });
|
|
869
1093
|
if (element.type === "checkboxes")
|
|
870
|
-
return /* @__PURE__ */ (0,
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(CheckboxesElement, { data: element });
|
|
1095
|
+
if (element.type === "image")
|
|
1096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ImageElement, { data: element });
|
|
1097
|
+
if (element.type === "plain_text_input")
|
|
1098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PlaintTextInput, { data: element });
|
|
1099
|
+
if (element.type === "users_select")
|
|
1100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(UsersSelectElement, { data: element });
|
|
871
1101
|
if (element.type === "datepicker")
|
|
872
1102
|
return null;
|
|
873
1103
|
if (element.type === "datetimepicker")
|
|
874
1104
|
return null;
|
|
875
1105
|
if (element.type === "email_text_input")
|
|
876
1106
|
return null;
|
|
877
|
-
if (element.type === "image")
|
|
878
|
-
return null;
|
|
879
1107
|
if (element.type === "multi_static_select")
|
|
880
1108
|
return null;
|
|
881
1109
|
if (element.type === "multi_external_select")
|
|
@@ -890,16 +1118,12 @@ var getElementComponent = (element) => {
|
|
|
890
1118
|
return null;
|
|
891
1119
|
if (element.type === "overflow")
|
|
892
1120
|
return null;
|
|
893
|
-
if (element.type === "plain_text_input")
|
|
894
|
-
return null;
|
|
895
1121
|
if (element.type === "radio_buttons")
|
|
896
1122
|
return null;
|
|
897
1123
|
if (element.type === "static_select")
|
|
898
1124
|
return null;
|
|
899
1125
|
if (element.type === "external_select")
|
|
900
1126
|
return null;
|
|
901
|
-
if (element.type === "users_select")
|
|
902
|
-
return null;
|
|
903
1127
|
if (element.type === "conversations_select")
|
|
904
1128
|
return null;
|
|
905
1129
|
if (element.type === "channels_select")
|
|
@@ -912,14 +1136,14 @@ var getElementComponent = (element) => {
|
|
|
912
1136
|
};
|
|
913
1137
|
|
|
914
1138
|
// src/block_wrapper.tsx
|
|
915
|
-
var
|
|
1139
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
916
1140
|
var BlockWrapper = (props) => {
|
|
917
1141
|
const { children } = props;
|
|
918
|
-
return /* @__PURE__ */ (0,
|
|
1142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "text-base break-words font-normal", children });
|
|
919
1143
|
};
|
|
920
1144
|
|
|
921
1145
|
// src/message.tsx
|
|
922
|
-
var
|
|
1146
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
923
1147
|
var Message = (props) => {
|
|
924
1148
|
const {
|
|
925
1149
|
blocks,
|
|
@@ -930,13 +1154,13 @@ var Message = (props) => {
|
|
|
930
1154
|
style,
|
|
931
1155
|
showBlockKitDebug = false
|
|
932
1156
|
} = props;
|
|
933
|
-
return /* @__PURE__ */ (0,
|
|
1157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { id: "slack_blocks_to_jsx", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
934
1158
|
"section",
|
|
935
1159
|
{
|
|
936
1160
|
className: `flex gap-2 w-full max-w-[600px] slack_blocks_to_jsx relative ${className}`,
|
|
937
1161
|
style,
|
|
938
1162
|
children: [
|
|
939
|
-
showBlockKitDebug && /* @__PURE__ */ (0,
|
|
1163
|
+
showBlockKitDebug && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
940
1164
|
"a",
|
|
941
1165
|
{
|
|
942
1166
|
target: "_blank",
|
|
@@ -948,14 +1172,14 @@ var Message = (props) => {
|
|
|
948
1172
|
children: "Open in Slack Block Kit Builder"
|
|
949
1173
|
}
|
|
950
1174
|
),
|
|
951
|
-
/* @__PURE__ */ (0,
|
|
952
|
-
/* @__PURE__ */ (0,
|
|
953
|
-
/* @__PURE__ */ (0,
|
|
954
|
-
/* @__PURE__ */ (0,
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: logo, className: "w-9 h-9", alt: name }) }),
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Header, { name, time }),
|
|
1178
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: blocks.map((block, i) => {
|
|
955
1179
|
const element = getBlockComponent(block);
|
|
956
1180
|
if (!element)
|
|
957
1181
|
return null;
|
|
958
|
-
return /* @__PURE__ */ (0,
|
|
1182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BlockWrapper, { children: element }, i);
|
|
959
1183
|
}) })
|
|
960
1184
|
] })
|
|
961
1185
|
]
|
package/dist/index.mjs
CHANGED
|
@@ -443,7 +443,14 @@ var Header = (props) => {
|
|
|
443
443
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
444
444
|
var ImageElement = (props) => {
|
|
445
445
|
const { alt_text, image_url } = props.data;
|
|
446
|
-
return /* @__PURE__ */ jsx2("div", { className: "relative
|
|
446
|
+
return /* @__PURE__ */ jsx2("div", { className: "relative", children: /* @__PURE__ */ jsx2(
|
|
447
|
+
"img",
|
|
448
|
+
{
|
|
449
|
+
src: image_url,
|
|
450
|
+
alt: alt_text,
|
|
451
|
+
className: "w-[88px] h-[88px] rounded-lg overflow-hidden object-cover"
|
|
452
|
+
}
|
|
453
|
+
) });
|
|
447
454
|
};
|
|
448
455
|
|
|
449
456
|
// src/components/composition_objects/text_object.tsx
|
|
@@ -640,53 +647,242 @@ var CheckboxesElement = (props) => {
|
|
|
640
647
|
}) }) });
|
|
641
648
|
};
|
|
642
649
|
|
|
650
|
+
// src/components/elements/plain_text_input.tsx
|
|
651
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
652
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
653
|
+
var PlaintTextInput = (props) => {
|
|
654
|
+
const {
|
|
655
|
+
action_id,
|
|
656
|
+
dispatch_action_config,
|
|
657
|
+
focus_on_load,
|
|
658
|
+
initial_value,
|
|
659
|
+
max_length,
|
|
660
|
+
min_length,
|
|
661
|
+
multiline,
|
|
662
|
+
placeholder
|
|
663
|
+
} = props.data;
|
|
664
|
+
const [visible, setVisible] = useState3(focus_on_load != null ? focus_on_load : false);
|
|
665
|
+
const [value, setValue] = useState3(initial_value || "");
|
|
666
|
+
useEffect3(() => {
|
|
667
|
+
const handleClickOutside = (e) => {
|
|
668
|
+
var _a, _b;
|
|
669
|
+
const target = e.target;
|
|
670
|
+
console.log({ target });
|
|
671
|
+
console.log(target.id);
|
|
672
|
+
if (target.id !== "static_select_popup" && target.id !== "static_select_dropdown_button" && ((_a = target.parentElement) == null ? void 0 : _a.id) !== "static_select_popup" && ((_b = target.parentElement) == null ? void 0 : _b.id) !== "static_select_dropdown_button")
|
|
673
|
+
setVisible(false);
|
|
674
|
+
};
|
|
675
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
676
|
+
return () => {
|
|
677
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
678
|
+
};
|
|
679
|
+
}, []);
|
|
680
|
+
return /* @__PURE__ */ jsxs4("div", { id: action_id, className: "relative text-small w-full", tabIndex: 0, children: [
|
|
681
|
+
!value && placeholder && /* @__PURE__ */ jsx7("div", { className: "absolute left-2 top-2 text-black-primary.3", children: /* @__PURE__ */ jsx7(TextObject, { data: placeholder }) }),
|
|
682
|
+
!value && !placeholder && /* @__PURE__ */ jsx7("div", { className: "absolute left-2 top-2 text-black-primary.3", children: /* @__PURE__ */ jsx7(
|
|
683
|
+
TextObject,
|
|
684
|
+
{
|
|
685
|
+
data: {
|
|
686
|
+
type: "plain_text",
|
|
687
|
+
text: "Write something"
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
) }),
|
|
691
|
+
/* @__PURE__ */ jsx7(
|
|
692
|
+
"textarea",
|
|
693
|
+
{
|
|
694
|
+
value,
|
|
695
|
+
onChange: (e) => setValue(e.target.value),
|
|
696
|
+
className: "w-full focus:outline-none rounded border border-black-primary.3 p-2",
|
|
697
|
+
minLength: min_length,
|
|
698
|
+
maxLength: max_length,
|
|
699
|
+
style: {
|
|
700
|
+
maxHeight: "200px",
|
|
701
|
+
minHeight: "80px",
|
|
702
|
+
height: "100px"
|
|
703
|
+
},
|
|
704
|
+
"aria-label": "Select an item"
|
|
705
|
+
}
|
|
706
|
+
)
|
|
707
|
+
] });
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
// src/components/elements/users_select_element.tsx
|
|
711
|
+
import { useEffect as useEffect4, useState as useState4 } from "react";
|
|
712
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
713
|
+
var UsersSelectElement = (props) => {
|
|
714
|
+
const { action_id, focus_on_load, placeholder, type, confirm, initial_user, people } = props.data;
|
|
715
|
+
const [visible, setVisible] = useState4(focus_on_load || false);
|
|
716
|
+
const [search, setSearch] = useState4("");
|
|
717
|
+
const [selected, setSelected] = useState4("");
|
|
718
|
+
useEffect4(() => {
|
|
719
|
+
const handleClickOutside = (e) => {
|
|
720
|
+
var _a, _b;
|
|
721
|
+
const target = e.target;
|
|
722
|
+
console.log({ target });
|
|
723
|
+
console.log(target.id);
|
|
724
|
+
if (target.id !== "static_select_popup" && target.id !== "static_select_dropdown_button" && ((_a = target.parentElement) == null ? void 0 : _a.id) !== "static_select_popup" && ((_b = target.parentElement) == null ? void 0 : _b.id) !== "static_select_dropdown_button")
|
|
725
|
+
setVisible(false);
|
|
726
|
+
};
|
|
727
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
728
|
+
return () => {
|
|
729
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
730
|
+
};
|
|
731
|
+
}, []);
|
|
732
|
+
const filteredOptions = people.filter((person) => {
|
|
733
|
+
const search_query = search.toLowerCase().trim();
|
|
734
|
+
if (!search_query)
|
|
735
|
+
return true;
|
|
736
|
+
const name = person.name.toLowerCase();
|
|
737
|
+
return name.includes(search_query);
|
|
738
|
+
}, []);
|
|
739
|
+
return /* @__PURE__ */ jsxs5(
|
|
740
|
+
"div",
|
|
741
|
+
{
|
|
742
|
+
id: action_id,
|
|
743
|
+
className: "py-1 px-2 h-7 min-h-[28px] relative flex items-center justify-between rounded text-small w-[190px] border border-black-primary.3",
|
|
744
|
+
tabIndex: 0,
|
|
745
|
+
children: [
|
|
746
|
+
visible && /* @__PURE__ */ jsx8(
|
|
747
|
+
"div",
|
|
748
|
+
{
|
|
749
|
+
className: "absolute top-[24px] -left-3 bg-white-secondary border border-gray-primary rounded-[6px] shadow-custom_shadow-1 w-[322px] max-w-[322px] max-h-[240px] overflow-auto py-3 z-20",
|
|
750
|
+
id: "static_select_popup",
|
|
751
|
+
children: /* @__PURE__ */ jsx8("div", { className: "flex flex-col", children: filteredOptions.map((option, i) => {
|
|
752
|
+
return /* @__PURE__ */ jsxs5(
|
|
753
|
+
"button",
|
|
754
|
+
{
|
|
755
|
+
className: "h-7 px-6 flex group items-center gap-2 select-none cursor-pointer hover:bg-blue-primary hover:text-white-primary",
|
|
756
|
+
tabIndex: 0,
|
|
757
|
+
type: "button",
|
|
758
|
+
onClick: () => {
|
|
759
|
+
setVisible(false);
|
|
760
|
+
setSelected(option.id);
|
|
761
|
+
},
|
|
762
|
+
children: [
|
|
763
|
+
/* @__PURE__ */ jsx8("img", { src: option.image, alt: option.name, className: "w-5 h-5 rounded-md" }),
|
|
764
|
+
/* @__PURE__ */ jsx8(
|
|
765
|
+
TextObject,
|
|
766
|
+
{
|
|
767
|
+
data: {
|
|
768
|
+
type: "mrkdwn",
|
|
769
|
+
text: `*${option.name}*`
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
),
|
|
773
|
+
/* @__PURE__ */ jsxs5("div", { className: "relative", children: [
|
|
774
|
+
option.online && /* @__PURE__ */ jsx8(
|
|
775
|
+
"div",
|
|
776
|
+
{
|
|
777
|
+
className: `bg-green-secondary w-[9px] h-[9px] rounded-full shrink-0`
|
|
778
|
+
}
|
|
779
|
+
),
|
|
780
|
+
!option.online && /* @__PURE__ */ jsx8("div", { className: "w-[9px] h-[9px] rounded-full border-[1.5px] shrink-0 border-black-secondary" }),
|
|
781
|
+
option.sleeping && /* @__PURE__ */ jsx8("div", { className: "absolute -top-[5px] -right-[5px] h-[10px] w-[10px] rounded-full bg-white-secondary flex justify-center z-[10] text-[8px] leading-[8px] font-semibold group-hover:bg-blue-primary", children: "z" })
|
|
782
|
+
] }),
|
|
783
|
+
/* @__PURE__ */ jsx8("div", { className: "text-black-primary", children: option.name })
|
|
784
|
+
]
|
|
785
|
+
},
|
|
786
|
+
i
|
|
787
|
+
);
|
|
788
|
+
}) })
|
|
789
|
+
}
|
|
790
|
+
),
|
|
791
|
+
/* @__PURE__ */ jsx8(
|
|
792
|
+
"input",
|
|
793
|
+
{
|
|
794
|
+
type: "text",
|
|
795
|
+
value: search,
|
|
796
|
+
onClick: () => setVisible(true),
|
|
797
|
+
onChange: (e) => setSearch(e.currentTarget.value),
|
|
798
|
+
className: "w-full py-1 pr-7 focus:outline-none",
|
|
799
|
+
tabIndex: -1,
|
|
800
|
+
"aria-label": "Select an item"
|
|
801
|
+
}
|
|
802
|
+
),
|
|
803
|
+
!search && /* @__PURE__ */ jsx8("div", { className: "absolute w-full h-full pointer-events-none flex items-center text-black-primary.3", children: /* @__PURE__ */ jsx8(
|
|
804
|
+
TextObject,
|
|
805
|
+
{
|
|
806
|
+
data: placeholder != null ? placeholder : {
|
|
807
|
+
type: "plain_text",
|
|
808
|
+
text: "Pick an option"
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
) }),
|
|
812
|
+
/* @__PURE__ */ jsx8(
|
|
813
|
+
"button",
|
|
814
|
+
{
|
|
815
|
+
className: "absolute right-1 top-1/2 flex justify-center items-center w-5 -translate-y-1/2 text-black-secondary z-10 h-full",
|
|
816
|
+
id: "static_select_dropdown_button",
|
|
817
|
+
onClick: () => {
|
|
818
|
+
setVisible((prev) => !prev);
|
|
819
|
+
},
|
|
820
|
+
children: /* @__PURE__ */ jsx8(
|
|
821
|
+
"svg",
|
|
822
|
+
{
|
|
823
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
824
|
+
fill: "none",
|
|
825
|
+
viewBox: "0 0 24 24",
|
|
826
|
+
strokeWidth: "3",
|
|
827
|
+
stroke: "currentColor",
|
|
828
|
+
className: "w-3 h-3",
|
|
829
|
+
children: /* @__PURE__ */ jsx8("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })
|
|
830
|
+
}
|
|
831
|
+
)
|
|
832
|
+
}
|
|
833
|
+
)
|
|
834
|
+
]
|
|
835
|
+
}
|
|
836
|
+
);
|
|
837
|
+
};
|
|
838
|
+
|
|
643
839
|
// src/components/blocks/actions.tsx
|
|
644
|
-
import { jsx as
|
|
840
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
645
841
|
var Actions = (props) => {
|
|
646
842
|
const { elements, block_id } = props.data;
|
|
647
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ jsx9(
|
|
648
844
|
"div",
|
|
649
845
|
{
|
|
650
846
|
id: block_id,
|
|
651
847
|
className: "mb-2 text-primary flex w-full text-black-primary items-center slack_blocks_to_jsx__actions",
|
|
652
|
-
children: /* @__PURE__ */
|
|
848
|
+
children: /* @__PURE__ */ jsx9("div", { className: "flex flex-wrap", children: elements.map((element, i) => {
|
|
653
849
|
if (element.type === "button") {
|
|
654
|
-
return /* @__PURE__ */
|
|
850
|
+
return /* @__PURE__ */ jsx9("div", { className: "mt-2 mr-2", children: /* @__PURE__ */ jsx9(ButtonElement, { data: element }) }, i);
|
|
655
851
|
}
|
|
656
852
|
if (element.type === "static_select") {
|
|
657
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ jsx9("div", { className: "mt-2 mr-2", children: /* @__PURE__ */ jsx9(StaticSelectElement, { data: element }) }, i);
|
|
658
854
|
}
|
|
659
|
-
return /* @__PURE__ */
|
|
855
|
+
return /* @__PURE__ */ jsx9("div", { className: "mt-2 mr-2" }, i);
|
|
660
856
|
}) })
|
|
661
857
|
}
|
|
662
858
|
);
|
|
663
859
|
};
|
|
664
860
|
|
|
665
861
|
// src/components/blocks/context.tsx
|
|
666
|
-
import { jsx as
|
|
862
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
667
863
|
var Context = (props) => {
|
|
668
864
|
const { elements, block_id } = props.data;
|
|
669
|
-
return /* @__PURE__ */
|
|
865
|
+
return /* @__PURE__ */ jsx10(
|
|
670
866
|
"div",
|
|
671
867
|
{
|
|
672
868
|
id: block_id,
|
|
673
869
|
className: "my-1 text-primary flex w-full text-black-primary flex-wrap items-center overflow-hidden slack_blocks_to_jsx__context",
|
|
674
870
|
children: elements.slice(0, 10).map((element, i) => {
|
|
675
871
|
if (element.type !== "image") {
|
|
676
|
-
return /* @__PURE__ */
|
|
872
|
+
return /* @__PURE__ */ jsx10("span", { className: "text-black-secondary text-small pr-3 flex items-center", children: /* @__PURE__ */ jsx10(TextObject, { data: element }) }, i);
|
|
677
873
|
}
|
|
678
|
-
return /* @__PURE__ */
|
|
874
|
+
return /* @__PURE__ */ jsx10("span", { children: /* @__PURE__ */ jsx10(ImageElement, { data: element }) }, i);
|
|
679
875
|
})
|
|
680
876
|
}
|
|
681
877
|
);
|
|
682
878
|
};
|
|
683
879
|
|
|
684
880
|
// src/components/blocks/divider.tsx
|
|
685
|
-
import { jsx as
|
|
881
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
686
882
|
var Divider = (props) => {
|
|
687
883
|
const { data } = props;
|
|
688
884
|
const { block_id } = data;
|
|
689
|
-
return /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ jsx11(
|
|
690
886
|
"div",
|
|
691
887
|
{
|
|
692
888
|
id: block_id,
|
|
@@ -708,18 +904,18 @@ var Header2 = (props) => {
|
|
|
708
904
|
};
|
|
709
905
|
|
|
710
906
|
// src/components/blocks/image.tsx
|
|
711
|
-
import { useState as
|
|
712
|
-
import { jsx as
|
|
907
|
+
import { useState as useState5 } from "react";
|
|
908
|
+
import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
713
909
|
var Image = (props) => {
|
|
714
910
|
const { block_id, alt_text, image_url, image_bytes, image_height, image_width } = props.data;
|
|
715
|
-
const [showImage, setShowImage] =
|
|
716
|
-
return /* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
718
|
-
/* @__PURE__ */
|
|
911
|
+
const [showImage, setShowImage] = useState5(true);
|
|
912
|
+
return /* @__PURE__ */ jsxs6("div", { id: block_id, className: "my-2 flex flex-col gap-2 slack_blocks_to_jsx__image", children: [
|
|
913
|
+
/* @__PURE__ */ jsxs6("div", { className: "text-black-secondary text-small flex gap-1 items-center", children: [
|
|
914
|
+
/* @__PURE__ */ jsxs6("span", { children: [
|
|
719
915
|
alt_text,
|
|
720
916
|
image_bytes && ` (${Math.round(image_bytes / 1e3)} kB)`
|
|
721
917
|
] }),
|
|
722
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx12("button", { className: "w-[15px] h-[15px]", onClick: () => setShowImage((prev) => !prev), children: /* @__PURE__ */ jsx12(
|
|
723
919
|
"svg",
|
|
724
920
|
{
|
|
725
921
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -735,7 +931,7 @@ var Image = (props) => {
|
|
|
735
931
|
style: {
|
|
736
932
|
transform: showImage ? "rotate(0deg)" : "rotate(-90deg)"
|
|
737
933
|
},
|
|
738
|
-
children: /* @__PURE__ */
|
|
934
|
+
children: /* @__PURE__ */ jsx12(
|
|
739
935
|
"path",
|
|
740
936
|
{
|
|
741
937
|
fill: "currentColor",
|
|
@@ -746,7 +942,7 @@ var Image = (props) => {
|
|
|
746
942
|
}
|
|
747
943
|
) })
|
|
748
944
|
] }),
|
|
749
|
-
showImage && /* @__PURE__ */
|
|
945
|
+
showImage && /* @__PURE__ */ jsx12("div", { className: "rounded-md overflow-hidden relative max-w-max", children: /* @__PURE__ */ jsx12(
|
|
750
946
|
"img",
|
|
751
947
|
{
|
|
752
948
|
src: image_url,
|
|
@@ -761,9 +957,37 @@ var Image = (props) => {
|
|
|
761
957
|
};
|
|
762
958
|
|
|
763
959
|
// src/components/blocks/input.tsx
|
|
960
|
+
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
764
961
|
var Input = (props) => {
|
|
765
|
-
const { type } = props.data;
|
|
766
|
-
|
|
962
|
+
const { element: given_element, label, block_id, hint, optional, type } = props.data;
|
|
963
|
+
const element = given_element ? getElementComponent(given_element) : null;
|
|
964
|
+
return /* @__PURE__ */ jsx13(
|
|
965
|
+
"div",
|
|
966
|
+
{
|
|
967
|
+
id: block_id,
|
|
968
|
+
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__input flex w-full text-black-primary`,
|
|
969
|
+
children: /* @__PURE__ */ jsx13("div", { className: "grow", children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-2", children: [
|
|
970
|
+
/* @__PURE__ */ jsx13(
|
|
971
|
+
TextObject,
|
|
972
|
+
{
|
|
973
|
+
data: {
|
|
974
|
+
type: "mrkdwn",
|
|
975
|
+
text: `*${label.text}*`,
|
|
976
|
+
emoji: label.emoji,
|
|
977
|
+
verbatim: label.verbatim
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
),
|
|
981
|
+
/* @__PURE__ */ jsxs7("div", { className: "mb-1 flex flex-col gap-1", children: [
|
|
982
|
+
/* @__PURE__ */ jsx13("div", { className: "relative shrink-0", children: element }),
|
|
983
|
+
(hint || given_element.type === "plain_text_input") && /* @__PURE__ */ jsxs7("div", { className: "text-black-secondary text-small flex gap-1", children: [
|
|
984
|
+
hint && /* @__PURE__ */ jsx13("div", { className: "inline", children: /* @__PURE__ */ jsx13(TextObject, { data: hint }) }),
|
|
985
|
+
given_element.type === "plain_text_input" && /* @__PURE__ */ jsx13("p", { children: "\u21B5 Please 'enter' to submit" })
|
|
986
|
+
] })
|
|
987
|
+
] })
|
|
988
|
+
] }) })
|
|
989
|
+
}
|
|
990
|
+
);
|
|
767
991
|
};
|
|
768
992
|
|
|
769
993
|
// src/components/blocks/rich-text.tsx
|
|
@@ -773,24 +997,24 @@ var RichText = (props) => {
|
|
|
773
997
|
};
|
|
774
998
|
|
|
775
999
|
// src/components/blocks/section.tsx
|
|
776
|
-
import { jsx as
|
|
1000
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
777
1001
|
var Section = (props) => {
|
|
778
1002
|
const { accessory, fields, text, block_id } = props.data;
|
|
779
1003
|
const element = accessory ? getElementComponent(accessory) : null;
|
|
780
1004
|
const is_stacked = accessory ? is_accessory_stacked(accessory) : false;
|
|
781
|
-
return /* @__PURE__ */
|
|
1005
|
+
return /* @__PURE__ */ jsxs8(
|
|
782
1006
|
"div",
|
|
783
1007
|
{
|
|
784
1008
|
id: block_id,
|
|
785
1009
|
className: `mt-2 mb-1 text-primary slack_blocks_to_jsx__section flex w-full text-black-primary ${is_stacked ? "flex-col" : ""}`,
|
|
786
1010
|
children: [
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
text && /* @__PURE__ */
|
|
789
|
-
fields && /* @__PURE__ */
|
|
790
|
-
return /* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ jsx14("div", { className: "grow", children: /* @__PURE__ */ jsxs8("div", { className: "flex flex-col gap-3", children: [
|
|
1012
|
+
text && /* @__PURE__ */ jsx14(TextObject, { data: text }),
|
|
1013
|
+
fields && /* @__PURE__ */ jsx14("div", { className: "grid grid-col-2 w-full", children: fields.map((field, i) => {
|
|
1014
|
+
return /* @__PURE__ */ jsx14(TextObject, { data: field }, i);
|
|
791
1015
|
}) })
|
|
792
1016
|
] }) }),
|
|
793
|
-
element && is_stacked ? element : /* @__PURE__ */
|
|
1017
|
+
element && is_stacked ? element : /* @__PURE__ */ jsx14("div", { className: "ml-2 mb-1 relative shrink-0", children: element })
|
|
794
1018
|
]
|
|
795
1019
|
}
|
|
796
1020
|
);
|
|
@@ -803,43 +1027,47 @@ var Video = (props) => {
|
|
|
803
1027
|
};
|
|
804
1028
|
|
|
805
1029
|
// src/components/index.tsx
|
|
806
|
-
import { jsx as
|
|
1030
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
807
1031
|
var getBlockComponent = (block) => {
|
|
808
1032
|
if (block.type === "divider")
|
|
809
|
-
return /* @__PURE__ */
|
|
1033
|
+
return /* @__PURE__ */ jsx15(Divider, { data: block });
|
|
810
1034
|
if (block.type === "section")
|
|
811
|
-
return /* @__PURE__ */
|
|
1035
|
+
return /* @__PURE__ */ jsx15(Section, { data: block });
|
|
812
1036
|
if (block.type === "image")
|
|
813
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx15(Image, { data: block });
|
|
814
1038
|
if (block.type === "context")
|
|
815
|
-
return /* @__PURE__ */
|
|
1039
|
+
return /* @__PURE__ */ jsx15(Context, { data: block });
|
|
816
1040
|
if (block.type === "actions")
|
|
817
|
-
return /* @__PURE__ */
|
|
1041
|
+
return /* @__PURE__ */ jsx15(Actions, { data: block });
|
|
818
1042
|
if (block.type === "file")
|
|
819
|
-
return /* @__PURE__ */
|
|
1043
|
+
return /* @__PURE__ */ jsx15(File, { data: block });
|
|
820
1044
|
if (block.type === "header")
|
|
821
|
-
return /* @__PURE__ */
|
|
1045
|
+
return /* @__PURE__ */ jsx15(Header2, { data: block });
|
|
822
1046
|
if (block.type === "input")
|
|
823
|
-
return /* @__PURE__ */
|
|
1047
|
+
return /* @__PURE__ */ jsx15(Input, { data: block });
|
|
824
1048
|
if (block.type === "video")
|
|
825
|
-
return /* @__PURE__ */
|
|
1049
|
+
return /* @__PURE__ */ jsx15(Video, { data: block });
|
|
826
1050
|
if (block.type === "rich_text")
|
|
827
|
-
return /* @__PURE__ */
|
|
1051
|
+
return /* @__PURE__ */ jsx15(RichText, { data: block });
|
|
828
1052
|
return null;
|
|
829
1053
|
};
|
|
830
1054
|
var getElementComponent = (element) => {
|
|
831
1055
|
if (element.type === "button")
|
|
832
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsx15(ButtonElement, { data: element });
|
|
833
1057
|
if (element.type === "checkboxes")
|
|
834
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ jsx15(CheckboxesElement, { data: element });
|
|
1059
|
+
if (element.type === "image")
|
|
1060
|
+
return /* @__PURE__ */ jsx15(ImageElement, { data: element });
|
|
1061
|
+
if (element.type === "plain_text_input")
|
|
1062
|
+
return /* @__PURE__ */ jsx15(PlaintTextInput, { data: element });
|
|
1063
|
+
if (element.type === "users_select")
|
|
1064
|
+
return /* @__PURE__ */ jsx15(UsersSelectElement, { data: element });
|
|
835
1065
|
if (element.type === "datepicker")
|
|
836
1066
|
return null;
|
|
837
1067
|
if (element.type === "datetimepicker")
|
|
838
1068
|
return null;
|
|
839
1069
|
if (element.type === "email_text_input")
|
|
840
1070
|
return null;
|
|
841
|
-
if (element.type === "image")
|
|
842
|
-
return null;
|
|
843
1071
|
if (element.type === "multi_static_select")
|
|
844
1072
|
return null;
|
|
845
1073
|
if (element.type === "multi_external_select")
|
|
@@ -854,16 +1082,12 @@ var getElementComponent = (element) => {
|
|
|
854
1082
|
return null;
|
|
855
1083
|
if (element.type === "overflow")
|
|
856
1084
|
return null;
|
|
857
|
-
if (element.type === "plain_text_input")
|
|
858
|
-
return null;
|
|
859
1085
|
if (element.type === "radio_buttons")
|
|
860
1086
|
return null;
|
|
861
1087
|
if (element.type === "static_select")
|
|
862
1088
|
return null;
|
|
863
1089
|
if (element.type === "external_select")
|
|
864
1090
|
return null;
|
|
865
|
-
if (element.type === "users_select")
|
|
866
|
-
return null;
|
|
867
1091
|
if (element.type === "conversations_select")
|
|
868
1092
|
return null;
|
|
869
1093
|
if (element.type === "channels_select")
|
|
@@ -876,14 +1100,14 @@ var getElementComponent = (element) => {
|
|
|
876
1100
|
};
|
|
877
1101
|
|
|
878
1102
|
// src/block_wrapper.tsx
|
|
879
|
-
import { jsx as
|
|
1103
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
880
1104
|
var BlockWrapper = (props) => {
|
|
881
1105
|
const { children } = props;
|
|
882
|
-
return /* @__PURE__ */
|
|
1106
|
+
return /* @__PURE__ */ jsx16("div", { className: "text-base break-words font-normal", children });
|
|
883
1107
|
};
|
|
884
1108
|
|
|
885
1109
|
// src/message.tsx
|
|
886
|
-
import { jsx as
|
|
1110
|
+
import { jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
887
1111
|
var Message = (props) => {
|
|
888
1112
|
const {
|
|
889
1113
|
blocks,
|
|
@@ -894,13 +1118,13 @@ var Message = (props) => {
|
|
|
894
1118
|
style,
|
|
895
1119
|
showBlockKitDebug = false
|
|
896
1120
|
} = props;
|
|
897
|
-
return /* @__PURE__ */
|
|
1121
|
+
return /* @__PURE__ */ jsx17("div", { id: "slack_blocks_to_jsx", children: /* @__PURE__ */ jsxs9(
|
|
898
1122
|
"section",
|
|
899
1123
|
{
|
|
900
1124
|
className: `flex gap-2 w-full max-w-[600px] slack_blocks_to_jsx relative ${className}`,
|
|
901
1125
|
style,
|
|
902
1126
|
children: [
|
|
903
|
-
showBlockKitDebug && /* @__PURE__ */
|
|
1127
|
+
showBlockKitDebug && /* @__PURE__ */ jsx17(
|
|
904
1128
|
"a",
|
|
905
1129
|
{
|
|
906
1130
|
target: "_blank",
|
|
@@ -912,14 +1136,14 @@ var Message = (props) => {
|
|
|
912
1136
|
children: "Open in Slack Block Kit Builder"
|
|
913
1137
|
}
|
|
914
1138
|
),
|
|
915
|
-
/* @__PURE__ */
|
|
916
|
-
/* @__PURE__ */
|
|
917
|
-
/* @__PURE__ */
|
|
918
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ jsx17("div", { className: "shrink-0", children: /* @__PURE__ */ jsx17("img", { src: logo, className: "w-9 h-9", alt: name }) }),
|
|
1140
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex flex-col w-full", children: [
|
|
1141
|
+
/* @__PURE__ */ jsx17(Header, { name, time }),
|
|
1142
|
+
/* @__PURE__ */ jsx17("div", { children: blocks.map((block, i) => {
|
|
919
1143
|
const element = getBlockComponent(block);
|
|
920
1144
|
if (!element)
|
|
921
1145
|
return null;
|
|
922
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ jsx17(BlockWrapper, { children: element }, i);
|
|
923
1147
|
}) })
|
|
924
1148
|
] })
|
|
925
1149
|
]
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");#slack_blocks_to_jsx :is(.pointer-events-none){pointer-events:none}#slack_blocks_to_jsx :is(.visible){visibility:visible}#slack_blocks_to_jsx :is(.absolute){position:absolute}#slack_blocks_to_jsx :is(.relative){position:relative}#slack_blocks_to_jsx :is(.-left-3){left:-.75rem}#slack_blocks_to_jsx :is(.right-0){right:0}#slack_blocks_to_jsx :is(.right-1){right:.25rem}#slack_blocks_to_jsx :is(.top-0){top:0}#slack_blocks_to_jsx :is(.top-1\/2){top:50%}#slack_blocks_to_jsx :is(.top-\[24px\]){top:24px}#slack_blocks_to_jsx :is(.z-10){z-index:10}#slack_blocks_to_jsx :is(.z-20){z-index:20}#slack_blocks_to_jsx :is(.my-1){margin-bottom:.25rem;margin-top:.25rem}#slack_blocks_to_jsx :is(.my-2){margin-bottom:.5rem;margin-top:.5rem}#slack_blocks_to_jsx :is(.mb-1){margin-bottom:.25rem}#slack_blocks_to_jsx :is(.mb-2){margin-bottom:.5rem}#slack_blocks_to_jsx :is(.ml-2){margin-left:.5rem}#slack_blocks_to_jsx :is(.mr-2){margin-right:.5rem}#slack_blocks_to_jsx :is(.mt-1){margin-top:.25rem}#slack_blocks_to_jsx :is(.mt-2){margin-top:.5rem}#slack_blocks_to_jsx :is(.block){display:block}#slack_blocks_to_jsx :is(.flex){display:flex}#slack_blocks_to_jsx :is(.grid){display:grid}#slack_blocks_to_jsx :is(.h-3){height:.75rem}#slack_blocks_to_jsx :is(.h-5){height:1.25rem}#slack_blocks_to_jsx :is(.h-7){height:1.75rem}#slack_blocks_to_jsx :is(.h-9){height:2.25rem}#slack_blocks_to_jsx :is(.h-\[14px\]){height:14px}#slack_blocks_to_jsx :is(.h-\[15px\]){height:15px}#slack_blocks_to_jsx :is(.h-\[25\.25px\]){height:25.25px}#slack_blocks_to_jsx :is(.h-\[28px\]){height:28px}#slack_blocks_to_jsx :is(.h-full){height:100%}#slack_blocks_to_jsx :is(.max-h-\[240px\]){max-height:240px}#slack_blocks_to_jsx :is(.min-h-\[28px\]){min-height:28px}#slack_blocks_to_jsx :is(.w-3){width:.75rem}#slack_blocks_to_jsx :is(.w-5){width:1.25rem}#slack_blocks_to_jsx :is(.w-6){width:1.5rem}#slack_blocks_to_jsx :is(.w-9){width:2.25rem}#slack_blocks_to_jsx :is(.w-\[15px\]){width:15px}#slack_blocks_to_jsx :is(.w-\[190px\]){width:190px}#slack_blocks_to_jsx :is(.w-\[27px\]){width:27px}#slack_blocks_to_jsx :is(.w-\[322px\]){width:322px}#slack_blocks_to_jsx :is(.w-full){width:100%}#slack_blocks_to_jsx :is(.min-w-\[56px\]){min-width:56px}#slack_blocks_to_jsx :is(.max-w-\[322px\]){max-width:322px}#slack_blocks_to_jsx :is(.max-w-\[600px\]){max-width:600px}#slack_blocks_to_jsx :is(.max-w-max){max-width:-moz-max-content;max-width:max-content}#slack_blocks_to_jsx :is(.shrink-0){flex-shrink:0}#slack_blocks_to_jsx :is(.grow){flex-grow:1}#slack_blocks_to_jsx :is(.-translate-y-1\/2){--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.cursor-pointer){cursor:pointer}#slack_blocks_to_jsx :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}#slack_blocks_to_jsx :is(.flex-col){flex-direction:column}#slack_blocks_to_jsx :is(.flex-wrap){flex-wrap:wrap}#slack_blocks_to_jsx :is(.items-center){align-items:center}#slack_blocks_to_jsx :is(.items-baseline){align-items:baseline}#slack_blocks_to_jsx :is(.justify-center){justify-content:center}#slack_blocks_to_jsx :is(.justify-between){justify-content:space-between}#slack_blocks_to_jsx :is(.gap-1){gap:.25rem}#slack_blocks_to_jsx :is(.gap-2){gap:.5rem}#slack_blocks_to_jsx :is(.gap-3){gap:.75rem}#slack_blocks_to_jsx :is(.gap-\[5px\]){gap:5px}#slack_blocks_to_jsx :is(.overflow-auto){overflow:auto}#slack_blocks_to_jsx :is(.overflow-hidden){overflow:hidden}#slack_blocks_to_jsx :is(.truncate){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#slack_blocks_to_jsx :is(.whitespace-nowrap){white-space:nowrap}#slack_blocks_to_jsx :is(.break-words){overflow-wrap:break-word}#slack_blocks_to_jsx :is(.rounded){border-radius:.25rem}#slack_blocks_to_jsx :is(.rounded-\[2px\]){border-radius:2px}#slack_blocks_to_jsx :is(.rounded-\[6px\]){border-radius:6px}#slack_blocks_to_jsx :is(.rounded-md){border-radius:.375rem}#slack_blocks_to_jsx :is(.border){border-width:1px}#slack_blocks_to_jsx :is(.border-b){border-bottom-width:1px}#slack_blocks_to_jsx :is(.border-solid){border-style:solid}#slack_blocks_to_jsx :is(.border-black-primary){--tw-border-opacity:1;border-color:rgb(29 28 29/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-black-primary\.3){border-color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.border-gray-primary){--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary){--tw-border-opacity:1;border-color:rgb(0 122 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary\.3){border-color:rgba(0,122,90,.3)}#slack_blocks_to_jsx :is(.border-red-primary){--tw-border-opacity:1;border-color:rgb(224 30 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-red-primary\.3){border-color:rgba(224,30,90,.3)}#slack_blocks_to_jsx :is(.bg-black-primary\/\[0\.13\]){background-color:rgba(29,28,29,.13)}#slack_blocks_to_jsx :is(.bg-white-secondary){--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.px-2){padding-left:.5rem;padding-right:.5rem}#slack_blocks_to_jsx :is(.px-6){padding-left:1.5rem;padding-right:1.5rem}#slack_blocks_to_jsx :is(.px-\[3px\]){padding-left:3px;padding-right:3px}#slack_blocks_to_jsx :is(.py-1){padding-bottom:.25rem;padding-top:.25rem}#slack_blocks_to_jsx :is(.py-3){padding-bottom:.75rem;padding-top:.75rem}#slack_blocks_to_jsx :is(.py-\[1px\]){padding-bottom:1px;padding-top:1px}#slack_blocks_to_jsx :is(.pb-\[1px\]){padding-bottom:1px}#slack_blocks_to_jsx :is(.pr-3){padding-right:.75rem}#slack_blocks_to_jsx :is(.pr-7){padding-right:1.75rem}#slack_blocks_to_jsx :is(.pt-0){padding-top:0}#slack_blocks_to_jsx :is(.text-center){text-align:center}#slack_blocks_to_jsx :is(.text-\[10px\]){font-size:10px}#slack_blocks_to_jsx :is(.text-\[15px\]){font-size:15px}#slack_blocks_to_jsx :is(.text-base){font-size:15px;line-height:1.46668}#slack_blocks_to_jsx :is(.text-small){font-size:13px;line-height:1.38461538}#slack_blocks_to_jsx :is(.text-xs){font-size:.75rem;line-height:1rem}#slack_blocks_to_jsx :is(.font-black){font-weight:900}#slack_blocks_to_jsx :is(.font-normal){font-weight:400}#slack_blocks_to_jsx :is(.font-semibold){font-weight:600}#slack_blocks_to_jsx :is(.uppercase){text-transform:uppercase}#slack_blocks_to_jsx :is(.leading-\[12\.5px\]){line-height:12.5px}#slack_blocks_to_jsx :is(.leading-\[17\.6px\]){line-height:17.6px}#slack_blocks_to_jsx :is(.text-black-primary){--tw-text-opacity:1;color:rgb(29 28 29/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-black-primary\.3){color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.text-black-primary\/\[0\.7\]){color:rgba(29,28,29,.7)}#slack_blocks_to_jsx :is(.text-black-secondary){--tw-text-opacity:1;color:rgb(97 96 97/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-500){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-primary){--tw-text-opacity:1;color:rgb(18 100 163/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-green-primary){--tw-text-opacity:1;color:rgb(0 122 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-red-primary){--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.underline){text-decoration-line:underline}#slack_blocks_to_jsx :is(.shadow-custom_shadow-1){--tw-shadow-color:rgba(29,28,29,.13) 0px 0px 0px 1px,rgba(0,0,0,.12) 0px 5px 10px 0px;--tw-shadow:var(--tw-shadow-colored)}#slack_blocks_to_jsx :is(.outline){outline-style:solid}#slack_blocks_to_jsx :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.slack_blocks_to_jsx{font-family:Open Sans,sans-serif!important;white-space:pre-wrap!important}.slack_blocks_to_jsx *,.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{border:0 solid #e5e7eb;box-sizing:border-box}.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{--tw-content:""}.slack_blocks_to_jsx :host,.slack_blocks_to_jsx html{line-height:1.5;-webkit-text-size-adjust:100%;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.slack_blocks_to_jsx body{line-height:inherit;margin:0}.slack_blocks_to_jsx hr{border-top-width:1px;color:inherit;height:0}.slack_blocks_to_jsx abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.slack_blocks_to_jsx h1,.slack_blocks_to_jsx h2,.slack_blocks_to_jsx h3,.slack_blocks_to_jsx h4,.slack_blocks_to_jsx h5,.slack_blocks_to_jsx h6{font-size:inherit;font-weight:inherit}.slack_blocks_to_jsx a{color:inherit;text-decoration:inherit}.slack_blocks_to_jsx b,.slack_blocks_to_jsx strong{font-weight:bolder}.slack_blocks_to_jsx code,.slack_blocks_to_jsx kbd,.slack_blocks_to_jsx pre,.slack_blocks_to_jsx samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}.slack_blocks_to_jsx small{font-size:80%}.slack_blocks_to_jsx sub,.slack_blocks_to_jsx sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.slack_blocks_to_jsx sub{bottom:-.25em}.slack_blocks_to_jsx sup{top:-.5em}.slack_blocks_to_jsx table{border-collapse:collapse;border-color:inherit;text-indent:0}.slack_blocks_to_jsx button,.slack_blocks_to_jsx input,.slack_blocks_to_jsx optgroup,.slack_blocks_to_jsx select,.slack_blocks_to_jsx textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}.slack_blocks_to_jsx button,.slack_blocks_to_jsx select{text-transform:none}.slack_blocks_to_jsx [type=button],.slack_blocks_to_jsx [type=reset],.slack_blocks_to_jsx [type=submit],.slack_blocks_to_jsx button{-webkit-appearance:button;background-color:initial;background-image:none}.slack_blocks_to_jsx :-moz-focusring{outline:auto}.slack_blocks_to_jsx :-moz-ui-invalid{box-shadow:none}.slack_blocks_to_jsx progress{vertical-align:initial}.slack_blocks_to_jsx ::-webkit-inner-spin-button,.slack_blocks_to_jsx ::-webkit-outer-spin-button{height:auto}.slack_blocks_to_jsx [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.slack_blocks_to_jsx ::-webkit-search-decoration{-webkit-appearance:none}.slack_blocks_to_jsx ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.slack_blocks_to_jsx summary{display:list-item}.slack_blocks_to_jsx blockquote,.slack_blocks_to_jsx dd,.slack_blocks_to_jsx dl,.slack_blocks_to_jsx fieldset,.slack_blocks_to_jsx figure,.slack_blocks_to_jsx h1,.slack_blocks_to_jsx h2,.slack_blocks_to_jsx h3,.slack_blocks_to_jsx h4,.slack_blocks_to_jsx h5,.slack_blocks_to_jsx h6,.slack_blocks_to_jsx hr,.slack_blocks_to_jsx p,.slack_blocks_to_jsx pre{margin:0}.slack_blocks_to_jsx fieldset,.slack_blocks_to_jsx legend{padding:0}.slack_blocks_to_jsx menu,.slack_blocks_to_jsx ol,.slack_blocks_to_jsx ul{list-style:none;margin:0;padding:0}.slack_blocks_to_jsx dialog{padding:0}.slack_blocks_to_jsx textarea{resize:vertical}.slack_blocks_to_jsx input::-moz-placeholder,.slack_blocks_to_jsx textarea::-moz-placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx input::placeholder,.slack_blocks_to_jsx textarea::placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx [role=button],.slack_blocks_to_jsx button{cursor:pointer}.slack_blocks_to_jsx :disabled{cursor:default}.slack_blocks_to_jsx audio,.slack_blocks_to_jsx canvas,.slack_blocks_to_jsx embed,.slack_blocks_to_jsx iframe,.slack_blocks_to_jsx img,.slack_blocks_to_jsx object,.slack_blocks_to_jsx svg,.slack_blocks_to_jsx video{display:block;vertical-align:middle}.slack_blocks_to_jsx img,.slack_blocks_to_jsx video{height:auto;max-width:100%}.slack_blocks_to_jsx [hidden]{display:none}.slack_blocks_to_jsx *,.slack_blocks_to_jsx ::backdrop,.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.slack_blocks_to_jsx .slack_code{display:block;margin-bottom:.25rem;margin-top:.25rem;padding:.5rem;width:100%}.slack_blocks_to_jsx .slack_code,.slack_blocks_to_jsx .slack_inline_code{background-color:rgba(29,28,29,.04);border-color:rgba(29,28,29,.13);border-radius:3px;border-width:1px;font-size:.75rem;line-height:1rem;line-height:1.5;overflow-wrap:break-word;white-space:pre-wrap}.slack_blocks_to_jsx .slack_inline_code{display:inline-block;padding:.125rem 3px 1px;--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}.slack_blocks_to_jsx .slack_bold,.slack_blocks_to_jsx .slack_bold code{font-weight:600}.slack_blocks_to_jsx .slack_blockquote{display:block}.slack_blocks_to_jsx .slack_inline_blockquote{display:inline-block}#slack_blocks_to_jsx :is(.hover\:bg-blue-primary:hover){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.hover\:text-white-primary:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}
|
|
1
|
+
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&display=swap");#slack_blocks_to_jsx :is(.pointer-events-none){pointer-events:none}#slack_blocks_to_jsx :is(.visible){visibility:visible}#slack_blocks_to_jsx :is(.absolute){position:absolute}#slack_blocks_to_jsx :is(.relative){position:relative}#slack_blocks_to_jsx :is(.-left-3){left:-.75rem}#slack_blocks_to_jsx :is(.-right-\[5px\]){right:-5px}#slack_blocks_to_jsx :is(.-top-\[5px\]){top:-5px}#slack_blocks_to_jsx :is(.left-2){left:.5rem}#slack_blocks_to_jsx :is(.right-0){right:0}#slack_blocks_to_jsx :is(.right-1){right:.25rem}#slack_blocks_to_jsx :is(.top-0){top:0}#slack_blocks_to_jsx :is(.top-1\/2){top:50%}#slack_blocks_to_jsx :is(.top-2){top:.5rem}#slack_blocks_to_jsx :is(.top-\[24px\]){top:24px}#slack_blocks_to_jsx :is(.z-10){z-index:10}#slack_blocks_to_jsx :is(.z-20){z-index:20}#slack_blocks_to_jsx :is(.z-\[10\]){z-index:10}#slack_blocks_to_jsx :is(.my-1){margin-bottom:.25rem;margin-top:.25rem}#slack_blocks_to_jsx :is(.my-2){margin-bottom:.5rem;margin-top:.5rem}#slack_blocks_to_jsx :is(.mb-1){margin-bottom:.25rem}#slack_blocks_to_jsx :is(.mb-2){margin-bottom:.5rem}#slack_blocks_to_jsx :is(.ml-2){margin-left:.5rem}#slack_blocks_to_jsx :is(.mr-2){margin-right:.5rem}#slack_blocks_to_jsx :is(.mt-1){margin-top:.25rem}#slack_blocks_to_jsx :is(.mt-2){margin-top:.5rem}#slack_blocks_to_jsx :is(.block){display:block}#slack_blocks_to_jsx :is(.inline){display:inline}#slack_blocks_to_jsx :is(.flex){display:flex}#slack_blocks_to_jsx :is(.grid){display:grid}#slack_blocks_to_jsx :is(.h-3){height:.75rem}#slack_blocks_to_jsx :is(.h-5){height:1.25rem}#slack_blocks_to_jsx :is(.h-7){height:1.75rem}#slack_blocks_to_jsx :is(.h-9){height:2.25rem}#slack_blocks_to_jsx :is(.h-\[10px\]){height:10px}#slack_blocks_to_jsx :is(.h-\[14px\]){height:14px}#slack_blocks_to_jsx :is(.h-\[15px\]){height:15px}#slack_blocks_to_jsx :is(.h-\[28px\]){height:28px}#slack_blocks_to_jsx :is(.h-\[88px\]){height:88px}#slack_blocks_to_jsx :is(.h-\[9px\]){height:9px}#slack_blocks_to_jsx :is(.h-full){height:100%}#slack_blocks_to_jsx :is(.max-h-\[240px\]){max-height:240px}#slack_blocks_to_jsx :is(.min-h-\[28px\]){min-height:28px}#slack_blocks_to_jsx :is(.w-3){width:.75rem}#slack_blocks_to_jsx :is(.w-5){width:1.25rem}#slack_blocks_to_jsx :is(.w-9){width:2.25rem}#slack_blocks_to_jsx :is(.w-\[10px\]){width:10px}#slack_blocks_to_jsx :is(.w-\[15px\]){width:15px}#slack_blocks_to_jsx :is(.w-\[190px\]){width:190px}#slack_blocks_to_jsx :is(.w-\[27px\]){width:27px}#slack_blocks_to_jsx :is(.w-\[322px\]){width:322px}#slack_blocks_to_jsx :is(.w-\[88px\]){width:88px}#slack_blocks_to_jsx :is(.w-\[9px\]){width:9px}#slack_blocks_to_jsx :is(.w-full){width:100%}#slack_blocks_to_jsx :is(.min-w-\[56px\]){min-width:56px}#slack_blocks_to_jsx :is(.max-w-\[322px\]){max-width:322px}#slack_blocks_to_jsx :is(.max-w-\[600px\]){max-width:600px}#slack_blocks_to_jsx :is(.max-w-max){max-width:-moz-max-content;max-width:max-content}#slack_blocks_to_jsx :is(.shrink-0){flex-shrink:0}#slack_blocks_to_jsx :is(.grow){flex-grow:1}#slack_blocks_to_jsx :is(.-translate-y-1\/2){--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.transform){transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#slack_blocks_to_jsx :is(.cursor-pointer){cursor:pointer}#slack_blocks_to_jsx :is(.select-none){-webkit-user-select:none;-moz-user-select:none;user-select:none}#slack_blocks_to_jsx :is(.flex-col){flex-direction:column}#slack_blocks_to_jsx :is(.flex-wrap){flex-wrap:wrap}#slack_blocks_to_jsx :is(.items-center){align-items:center}#slack_blocks_to_jsx :is(.items-baseline){align-items:baseline}#slack_blocks_to_jsx :is(.justify-center){justify-content:center}#slack_blocks_to_jsx :is(.justify-between){justify-content:space-between}#slack_blocks_to_jsx :is(.gap-1){gap:.25rem}#slack_blocks_to_jsx :is(.gap-2){gap:.5rem}#slack_blocks_to_jsx :is(.gap-3){gap:.75rem}#slack_blocks_to_jsx :is(.gap-\[5px\]){gap:5px}#slack_blocks_to_jsx :is(.overflow-auto){overflow:auto}#slack_blocks_to_jsx :is(.overflow-hidden){overflow:hidden}#slack_blocks_to_jsx :is(.truncate){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#slack_blocks_to_jsx :is(.whitespace-nowrap){white-space:nowrap}#slack_blocks_to_jsx :is(.break-words){overflow-wrap:break-word}#slack_blocks_to_jsx :is(.rounded){border-radius:.25rem}#slack_blocks_to_jsx :is(.rounded-\[2px\]){border-radius:2px}#slack_blocks_to_jsx :is(.rounded-\[6px\]){border-radius:6px}#slack_blocks_to_jsx :is(.rounded-full){border-radius:9999px}#slack_blocks_to_jsx :is(.rounded-lg){border-radius:.5rem}#slack_blocks_to_jsx :is(.rounded-md){border-radius:.375rem}#slack_blocks_to_jsx :is(.border){border-width:1px}#slack_blocks_to_jsx :is(.border-\[1\.5px\]){border-width:1.5px}#slack_blocks_to_jsx :is(.border-b){border-bottom-width:1px}#slack_blocks_to_jsx :is(.border-solid){border-style:solid}#slack_blocks_to_jsx :is(.border-black-primary){--tw-border-opacity:1;border-color:rgb(29 28 29/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-black-primary\.3){border-color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.border-black-secondary){--tw-border-opacity:1;border-color:rgb(97 96 97/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-gray-primary){--tw-border-opacity:1;border-color:rgb(221 221 221/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary){--tw-border-opacity:1;border-color:rgb(0 122 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-green-primary\.3){border-color:rgba(0,122,90,.3)}#slack_blocks_to_jsx :is(.border-red-primary){--tw-border-opacity:1;border-color:rgb(224 30 90/var(--tw-border-opacity))}#slack_blocks_to_jsx :is(.border-red-primary\.3){border-color:rgba(224,30,90,.3)}#slack_blocks_to_jsx :is(.bg-black-primary\/\[0\.13\]){background-color:rgba(29,28,29,.13)}#slack_blocks_to_jsx :is(.bg-green-secondary){--tw-bg-opacity:1;background-color:rgb(32 162 113/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.bg-white-secondary){--tw-bg-opacity:1;background-color:rgb(248 248 248/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.object-cover){-o-object-fit:cover;object-fit:cover}#slack_blocks_to_jsx :is(.p-2){padding:.5rem}#slack_blocks_to_jsx :is(.px-2){padding-left:.5rem;padding-right:.5rem}#slack_blocks_to_jsx :is(.px-6){padding-left:1.5rem;padding-right:1.5rem}#slack_blocks_to_jsx :is(.px-\[3px\]){padding-left:3px;padding-right:3px}#slack_blocks_to_jsx :is(.py-1){padding-bottom:.25rem;padding-top:.25rem}#slack_blocks_to_jsx :is(.py-3){padding-bottom:.75rem;padding-top:.75rem}#slack_blocks_to_jsx :is(.py-\[1px\]){padding-bottom:1px;padding-top:1px}#slack_blocks_to_jsx :is(.pb-\[1px\]){padding-bottom:1px}#slack_blocks_to_jsx :is(.pr-3){padding-right:.75rem}#slack_blocks_to_jsx :is(.pr-7){padding-right:1.75rem}#slack_blocks_to_jsx :is(.pt-0){padding-top:0}#slack_blocks_to_jsx :is(.text-center){text-align:center}#slack_blocks_to_jsx :is(.text-\[10px\]){font-size:10px}#slack_blocks_to_jsx :is(.text-\[15px\]){font-size:15px}#slack_blocks_to_jsx :is(.text-\[8px\]){font-size:8px}#slack_blocks_to_jsx :is(.text-base){font-size:15px;line-height:1.46668}#slack_blocks_to_jsx :is(.text-small){font-size:13px;line-height:1.38461538}#slack_blocks_to_jsx :is(.text-xs){font-size:.75rem;line-height:1rem}#slack_blocks_to_jsx :is(.font-black){font-weight:900}#slack_blocks_to_jsx :is(.font-normal){font-weight:400}#slack_blocks_to_jsx :is(.font-semibold){font-weight:600}#slack_blocks_to_jsx :is(.uppercase){text-transform:uppercase}#slack_blocks_to_jsx :is(.leading-\[12\.5px\]){line-height:12.5px}#slack_blocks_to_jsx :is(.leading-\[17\.6px\]){line-height:17.6px}#slack_blocks_to_jsx :is(.leading-\[8px\]){line-height:8px}#slack_blocks_to_jsx :is(.text-black-primary){--tw-text-opacity:1;color:rgb(29 28 29/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-black-primary\.3){color:rgba(29,28,29,.3)}#slack_blocks_to_jsx :is(.text-black-primary\/\[0\.7\]){color:rgba(29,28,29,.7)}#slack_blocks_to_jsx :is(.text-black-secondary){--tw-text-opacity:1;color:rgb(97 96 97/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-500){--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-blue-primary){--tw-text-opacity:1;color:rgb(18 100 163/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-green-primary){--tw-text-opacity:1;color:rgb(0 122 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.text-red-primary){--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.underline){text-decoration-line:underline}#slack_blocks_to_jsx :is(.shadow-custom_shadow-1){--tw-shadow-color:rgba(29,28,29,.13) 0px 0px 0px 1px,rgba(0,0,0,.12) 0px 5px 10px 0px;--tw-shadow:var(--tw-shadow-colored)}#slack_blocks_to_jsx :is(.outline){outline-style:solid}#slack_blocks_to_jsx :is(.filter){filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.slack_blocks_to_jsx{font-family:Open Sans,sans-serif!important;white-space:pre-wrap!important}.slack_blocks_to_jsx *,.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{border:0 solid #e5e7eb;box-sizing:border-box}.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{--tw-content:""}.slack_blocks_to_jsx :host,.slack_blocks_to_jsx html{line-height:1.5;-webkit-text-size-adjust:100%;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}.slack_blocks_to_jsx body{line-height:inherit;margin:0}.slack_blocks_to_jsx hr{border-top-width:1px;color:inherit;height:0}.slack_blocks_to_jsx abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.slack_blocks_to_jsx h1,.slack_blocks_to_jsx h2,.slack_blocks_to_jsx h3,.slack_blocks_to_jsx h4,.slack_blocks_to_jsx h5,.slack_blocks_to_jsx h6{font-size:inherit;font-weight:inherit}.slack_blocks_to_jsx a{color:inherit;text-decoration:inherit}.slack_blocks_to_jsx b,.slack_blocks_to_jsx strong{font-weight:bolder}.slack_blocks_to_jsx code,.slack_blocks_to_jsx kbd,.slack_blocks_to_jsx pre,.slack_blocks_to_jsx samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}.slack_blocks_to_jsx small{font-size:80%}.slack_blocks_to_jsx sub,.slack_blocks_to_jsx sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}.slack_blocks_to_jsx sub{bottom:-.25em}.slack_blocks_to_jsx sup{top:-.5em}.slack_blocks_to_jsx table{border-collapse:collapse;border-color:inherit;text-indent:0}.slack_blocks_to_jsx button,.slack_blocks_to_jsx input,.slack_blocks_to_jsx optgroup,.slack_blocks_to_jsx select,.slack_blocks_to_jsx textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;line-height:inherit;margin:0;padding:0}.slack_blocks_to_jsx button,.slack_blocks_to_jsx select{text-transform:none}.slack_blocks_to_jsx [type=button],.slack_blocks_to_jsx [type=reset],.slack_blocks_to_jsx [type=submit],.slack_blocks_to_jsx button{-webkit-appearance:button;background-color:initial;background-image:none}.slack_blocks_to_jsx :-moz-focusring{outline:auto}.slack_blocks_to_jsx :-moz-ui-invalid{box-shadow:none}.slack_blocks_to_jsx progress{vertical-align:initial}.slack_blocks_to_jsx ::-webkit-inner-spin-button,.slack_blocks_to_jsx ::-webkit-outer-spin-button{height:auto}.slack_blocks_to_jsx [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.slack_blocks_to_jsx ::-webkit-search-decoration{-webkit-appearance:none}.slack_blocks_to_jsx ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.slack_blocks_to_jsx summary{display:list-item}.slack_blocks_to_jsx blockquote,.slack_blocks_to_jsx dd,.slack_blocks_to_jsx dl,.slack_blocks_to_jsx fieldset,.slack_blocks_to_jsx figure,.slack_blocks_to_jsx h1,.slack_blocks_to_jsx h2,.slack_blocks_to_jsx h3,.slack_blocks_to_jsx h4,.slack_blocks_to_jsx h5,.slack_blocks_to_jsx h6,.slack_blocks_to_jsx hr,.slack_blocks_to_jsx p,.slack_blocks_to_jsx pre{margin:0}.slack_blocks_to_jsx fieldset,.slack_blocks_to_jsx legend{padding:0}.slack_blocks_to_jsx menu,.slack_blocks_to_jsx ol,.slack_blocks_to_jsx ul{list-style:none;margin:0;padding:0}.slack_blocks_to_jsx dialog{padding:0}.slack_blocks_to_jsx textarea{resize:vertical}.slack_blocks_to_jsx input::-moz-placeholder,.slack_blocks_to_jsx textarea::-moz-placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx input::placeholder,.slack_blocks_to_jsx textarea::placeholder{color:#9ca3af;opacity:1}.slack_blocks_to_jsx [role=button],.slack_blocks_to_jsx button{cursor:pointer}.slack_blocks_to_jsx :disabled{cursor:default}.slack_blocks_to_jsx audio,.slack_blocks_to_jsx canvas,.slack_blocks_to_jsx embed,.slack_blocks_to_jsx iframe,.slack_blocks_to_jsx img,.slack_blocks_to_jsx object,.slack_blocks_to_jsx svg,.slack_blocks_to_jsx video{display:block;vertical-align:middle}.slack_blocks_to_jsx img,.slack_blocks_to_jsx video{height:auto;max-width:100%}.slack_blocks_to_jsx [hidden]{display:none}.slack_blocks_to_jsx *,.slack_blocks_to_jsx ::backdrop,.slack_blocks_to_jsx :after,.slack_blocks_to_jsx :before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.slack_blocks_to_jsx .slack_code{display:block;margin-bottom:.25rem;margin-top:.25rem;padding:.5rem;width:100%}.slack_blocks_to_jsx .slack_code,.slack_blocks_to_jsx .slack_inline_code{background-color:rgba(29,28,29,.04);border-color:rgba(29,28,29,.13);border-radius:3px;border-width:1px;font-size:.75rem;line-height:1rem;line-height:1.5;overflow-wrap:break-word;white-space:pre-wrap}.slack_blocks_to_jsx .slack_inline_code{display:inline-block;padding:.125rem 3px 1px;--tw-text-opacity:1;color:rgb(224 30 90/var(--tw-text-opacity))}.slack_blocks_to_jsx .slack_bold,.slack_blocks_to_jsx .slack_bold code{font-weight:600}.slack_blocks_to_jsx .slack_blockquote{display:block}.slack_blocks_to_jsx .slack_inline_blockquote{display:inline-block}#slack_blocks_to_jsx :is(.hover\:bg-blue-primary:hover){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}#slack_blocks_to_jsx :is(.hover\:text-white-primary:hover){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}#slack_blocks_to_jsx :is(.focus\:outline-none:focus){outline:2px solid transparent;outline-offset:2px}#slack_blocks_to_jsx :is(.group:hover .group-hover\:bg-blue-primary){--tw-bg-opacity:1;background-color:rgb(18 100 163/var(--tw-bg-opacity))}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -10,3 +10,7 @@
|
|
|
10
10
|
`import type { Block } from "slack-blocks-to-jsx"`
|
|
11
11
|
|
|
12
12
|
`const blocks: Block[] = [...your slack blocks]`
|
|
13
|
+
|
|
14
|
+
`<Message time={new Date()} name="Your Company" logo="https://commons.wikimedia.org/wiki/File:Google_%22G%22_logo.svg" blocks={blocks} />`
|
|
15
|
+
|
|
16
|
+
Note: This library is under development, if you need any functionality and it is not working/available yet in the library please raise an issue [here](https://github.com/themashcodee/slack-blocks-to-jsx/issues). I will try to fix it asap :).
|