@bagelink/vue 0.0.714 → 0.0.716

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Toolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText2/Toolbar.vue"],"names":[],"mappings":"AA8GA,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,kBAAkB,CAAA;;YAI1C,aAAa;;;;YAAb,aAAa;;;;AAsJ7C,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"Toolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText2/Toolbar.vue"],"names":[],"mappings":"AAwFA,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,kBAAkB,CAAA;;YAI1C,aAAa;;;;YAAb,aAAa;;;;AAkK7C,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText2/index.vue"],"names":[],"mappings":"AAgNA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;;gBAKjB,MAAM;oBAAkB,aAAa;;;;gBAArC,MAAM;oBAAkB,aAAa;;;;AAoOzE,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"index.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/inputs/RichText2/index.vue"],"names":[],"mappings":"AAkOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;;gBAKjB,MAAM;oBAAkB,aAAa;;;;gBAArC,MAAM;oBAAkB,aAAa;;;;AA8OzE,wBAOG;AAOH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AA8VA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAIN,KAAK,aAAa,EAClB,KAAK,MAAM,EAEX,MAAM,eAAe,CAAA;AAgLtB,iBAAS,cAAc;kBAmQI,GAAG;EAkC7B;AACD,QAAA,MAAM,eAAe;aAjdX,MAAM,EAAE;kBACH,MAAM;eACT,OAAO;iBACL,MAAM;iBACN,OAAO;eACT,OAAO;YACV,MAAM;gBACF,OAAO;kBACL,OAAO;WACd,aAAa;gBACR,OAAO;mBACJ,MAAM;gBACT,OAAO;;;;aAZV,MAAM,EAAE;kBACH,MAAM;eACT,OAAO;iBACL,MAAM;iBACN,OAAO;eACT,OAAO;YACV,MAAM;gBACF,OAAO;kBACL,OAAO;WACd,aAAa;gBACR,OAAO;mBACJ,MAAM;gBACT,OAAO;;;UA4clB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
1
+ {"version":3,"file":"SelectInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/form/inputs/SelectInput.vue"],"names":[],"mappings":"AAyWA,OAAO,wBAAwB,CAAA;AAC/B,OAAO,EAIN,KAAK,aAAa,EAClB,KAAK,MAAM,EAEX,MAAM,eAAe,CAAA;AAgLtB,iBAAS,cAAc;kBAyQI,GAAG;EAkC7B;AACD,QAAA,MAAM,eAAe;aAvdX,MAAM,EAAE;kBACH,MAAM;eACT,OAAO;iBACL,MAAM;iBACN,OAAO;eACT,OAAO;YACV,MAAM;gBACF,OAAO;kBACL,OAAO;WACd,aAAa;gBACR,OAAO;mBACJ,MAAM;gBACT,OAAO;;;;aAZV,MAAM,EAAE;kBACH,MAAM;eACT,OAAO;iBACL,MAAM;iBACN,OAAO;eACT,OAAO;YACV,MAAM;gBACF,OAAO;kBACL,OAAO;WACd,aAAa;gBACR,OAAO;mBACJ,MAAM;gBACT,OAAO;;;UAkdlB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
package/dist/index.cjs CHANGED
@@ -6500,7 +6500,7 @@ const _hoisted_3$k = [
6500
6500
  const _hoisted_4$e = { class: "infinite-wrapper" };
6501
6501
  const _hoisted_5$e = { class: "row first-row" };
6502
6502
  const _hoisted_6$9 = { key: 0 };
6503
- const _hoisted_7$5 = ["onClick"];
6503
+ const _hoisted_7$4 = ["onClick"];
6504
6504
  const _hoisted_8$2 = { class: "flex" };
6505
6505
  const _hoisted_9$2 = ["onClick"];
6506
6506
  const _hoisted_10$1 = { key: 0 };
@@ -6673,7 +6673,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
6673
6673
  }, null, 8, ["class"])
6674
6674
  ], 2)
6675
6675
  ])
6676
- ], 8, _hoisted_7$5);
6676
+ ], 8, _hoisted_7$4);
6677
6677
  }), 128))
6678
6678
  ]),
6679
6679
  vue.createElementVNode("tbody", null, [
@@ -6772,7 +6772,7 @@ const _hoisted_6$8 = {
6772
6772
  key: 0,
6773
6773
  class: "data-row"
6774
6774
  };
6775
- const _hoisted_7$4 = { class: "key" };
6775
+ const _hoisted_7$3 = { class: "key" };
6776
6776
  const _hoisted_8$1 = { class: "m-0" };
6777
6777
  const _hoisted_9$1 = {
6778
6778
  key: 0,
@@ -6841,7 +6841,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
6841
6841
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(computedSchema.value, ({ id, label }) => {
6842
6842
  return vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: id }, [
6843
6843
  !isUnset(itemData.value[id]) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$8, [
6844
- vue.createElementVNode("div", _hoisted_7$4, [
6844
+ vue.createElementVNode("div", _hoisted_7$3, [
6845
6845
  vue.createElementVNode("p", _hoisted_8$1, vue.toDisplayString(label), 1)
6846
6846
  ]),
6847
6847
  vue.createElementVNode("div", null, [
@@ -16319,8 +16319,7 @@ const _hoisted_4$c = {
16319
16319
  class: "ms-auto ps-05 me-05"
16320
16320
  };
16321
16321
  const _hoisted_5$c = ["value"];
16322
- const _hoisted_6$7 = { class: "selectinput-options" };
16323
- const _hoisted_7$3 = ["aria-selected", "onClick", "onKeydown"];
16322
+ const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
16324
16323
  const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16325
16324
  __name: "SelectInput",
16326
16325
  props: {
@@ -16485,7 +16484,9 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16485
16484
  placeholder: "Search",
16486
16485
  icon: "search"
16487
16486
  }, null, 8, ["modelValue"])) : vue.createCommentVNode("", true),
16488
- vue.createElementVNode("div", _hoisted_6$7, [
16487
+ vue.createElementVNode("div", {
16488
+ class: vue.normalizeClass(["selectinput-options", { multiselect: _ctx.multiselect }])
16489
+ }, [
16489
16490
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredOptions.value, (option2, i2) => {
16490
16491
  return vue.openBlock(), vue.createElementBlock("div", {
16491
16492
  key: `${option2}${i2}`,
@@ -16496,19 +16497,21 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16496
16497
  onClick: ($event) => select2(option2),
16497
16498
  onKeydown: vue.withKeys(($event) => select2(option2), ["enter"])
16498
16499
  }, [
16499
- isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$Q), {
16500
- key: 0,
16501
- icon: "check"
16502
- })) : vue.createCommentVNode("", true),
16503
- !isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$Q), {
16504
- key: 1,
16505
- class: "opacity-3",
16506
- icon: "fiber_manual_record"
16507
- })) : vue.createCommentVNode("", true),
16500
+ _ctx.multiselect ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
16501
+ isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$Q), {
16502
+ key: 0,
16503
+ icon: "select_check_box"
16504
+ })) : vue.createCommentVNode("", true),
16505
+ !isSelected(option2) ? (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$Q), {
16506
+ key: 1,
16507
+ class: "opacity-3",
16508
+ icon: "check_box_outline_blank"
16509
+ })) : vue.createCommentVNode("", true)
16510
+ ], 64)) : vue.createCommentVNode("", true),
16508
16511
  vue.createElementVNode("span", null, vue.toDisplayString(getLabel(option2)), 1)
16509
- ], 42, _hoisted_7$3);
16512
+ ], 42, _hoisted_6$7);
16510
16513
  }), 128))
16511
- ]),
16514
+ ], 2),
16512
16515
  vue.renderSlot(_ctx.$slots, "last", {}, void 0, true)
16513
16516
  ]),
16514
16517
  _: 3
@@ -16532,9 +16535,10 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16532
16535
  !_ctx.hideLabel ? (vue.openBlock(), vue.createElementBlock("p", _hoisted_3$g, vue.toDisplayString(selectedLabel.value), 1)) : vue.createCommentVNode("", true),
16533
16536
  _ctx.clearable && selectedItemCount.value > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$c, [
16534
16537
  vue.createVNode(vue.unref(Btn), {
16538
+ flat: "",
16535
16539
  thin: "",
16536
16540
  icon: "clear",
16537
- class: "color-primary bg-gray-20",
16541
+ class: "color-gray",
16538
16542
  onClick: _cache[0] || (_cache[0] = ($event) => {
16539
16543
  vue.isRef(selectedItems) ? selectedItems.value = [] : selectedItems = [];
16540
16544
  emitUpdate();
@@ -16562,7 +16566,7 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
16562
16566
  };
16563
16567
  }
16564
16568
  });
16565
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-a26862a2"]]);
16569
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-25fde24f"]]);
16566
16570
  /*!
16567
16571
  * vue-draggable-next v2.2.0
16568
16572
  * (c) 2023 Anish George
@@ -47156,7 +47160,7 @@ const _sfc_main$b = /* @__PURE__ */ vue.defineComponent({
47156
47160
  }
47157
47161
  });
47158
47162
  const _hoisted_1$f = {
47159
- class: "toolbar",
47163
+ class: "toolbar flex gap-025 pb-05 flex-wrap",
47160
47164
  role: "toolbar"
47161
47165
  };
47162
47166
  const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
@@ -47167,82 +47171,58 @@ const _sfc_main$a = /* @__PURE__ */ vue.defineComponent({
47167
47171
  emits: ["action"],
47168
47172
  setup(__props, { emit: __emit }) {
47169
47173
  const emit2 = __emit;
47170
- const colorPicker = vue.ref(null);
47171
- const fontSizeInput = vue.ref(null);
47174
+ vue.ref(null);
47175
+ vue.ref(null);
47172
47176
  const toolbarOptions = [
47177
+ { name: "separator" },
47173
47178
  { name: "bold", icon: "format_bold" },
47174
47179
  { name: "italic", icon: "format_italic" },
47175
47180
  { name: "underline", icon: "format_underlined" },
47176
- { name: "fontSize", icon: "format_size" },
47177
- { name: "fontFamily", icon: "font_download" },
47178
- { name: "textColor", icon: "text_format" },
47179
- { name: "backgroundColor", icon: "format_color_fill" },
47180
- { name: "alignLeft", icon: "format_align_left" },
47181
- { name: "alignCenter", icon: "format_align_center" },
47182
- { name: "alignRight", icon: "format_align_right" },
47183
- { name: "alignJustify", icon: "format_align_justify" },
47181
+ { name: "separator" },
47184
47182
  { name: "orderedList", icon: "format_list_numbered" },
47185
47183
  { name: "unorderedList", icon: "format_list_bulleted" },
47186
- { name: "indent", icon: "format_indent_increase" },
47187
- { name: "outdent", icon: "format_indent_decrease" },
47188
- { name: "link", icon: "link" },
47189
- { name: "image", icon: "image" },
47190
- { name: "table", icon: "table_chart" },
47191
- { name: "blockquote", icon: "format_quote" },
47192
- { name: "codeBlock", icon: "code" },
47193
- { name: "splitView", icon: "splitscreen_right" },
47194
- { name: "codeView", icon: "code" }
47184
+ { name: "separator" },
47185
+ { name: "link", icon: "add_link" },
47186
+ { name: "image", icon: "add_photo_alternate" },
47187
+ { name: "youtube", icon: "youtube_activity" },
47188
+ { name: "separator" },
47189
+ { name: "splitView", icon: "code" },
47190
+ { name: "clear", icon: "format_clear" }
47195
47191
  ];
47196
- function handleColorPick(type3) {
47197
- var _a2;
47198
- const color2 = (_a2 = colorPicker.value) == null ? void 0 : _a2.value;
47199
- if (color2) {
47200
- emit2("action", type3, color2);
47201
- }
47202
- }
47203
- function handleFontSizeChange() {
47204
- var _a2;
47205
- const size2 = (_a2 = fontSizeInput.value) == null ? void 0 : _a2.value;
47206
- if (size2) {
47207
- emit2("action", "fontSize", size2);
47208
- }
47192
+ function handleSelectChange(selectedOption) {
47193
+ emit2("action", "formatBlock", selectedOption);
47209
47194
  }
47210
47195
  return (_ctx, _cache) => {
47211
47196
  const _directive_tooltip = vue.resolveDirective("tooltip");
47212
47197
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
47213
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(toolbarOptions.filter((t) => _ctx.config.includes(t.name)), (action) => {
47214
- return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(Btn), {
47215
- key: action.name,
47216
- thin: "",
47217
- color: "light",
47218
- "aria-label": action.name,
47219
- icon: action.icon,
47220
- onClick: ($event) => emit2("action", action.name)
47221
- }, null, 8, ["aria-label", "icon", "onClick"])), [
47222
- [_directive_tooltip, action.name]
47223
- ]);
47224
- }), 128)),
47225
- _ctx.config.includes("textColor") || _ctx.config.includes("backgroundColor") ? (vue.openBlock(), vue.createElementBlock("input", {
47226
- key: 0,
47227
- ref_key: "colorPicker",
47228
- ref: colorPicker,
47229
- type: "color",
47230
- onChange: _cache[0] || (_cache[0] = ($event) => handleColorPick(_ctx.config.includes("textColor") ? "textColor" : "backgroundColor"))
47231
- }, null, 544)) : vue.createCommentVNode("", true),
47232
- _ctx.config.includes("fontSize") ? (vue.openBlock(), vue.createElementBlock("input", {
47233
- key: 1,
47234
- ref_key: "fontSizeInput",
47235
- ref: fontSizeInput,
47236
- type: "number",
47237
- min: "1",
47238
- max: "7",
47239
- onChange: handleFontSizeChange
47240
- }, null, 544)) : vue.createCommentVNode("", true)
47198
+ vue.createVNode(SelectInput, {
47199
+ class: "m-0 w150",
47200
+ options: ["Text", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Blockquote", "Code"],
47201
+ onChange: handleSelectChange
47202
+ }),
47203
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(toolbarOptions, (action, index2) => {
47204
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
47205
+ action.name !== "separator" && _ctx.config.includes(action.name) ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(Btn), {
47206
+ key: action.name,
47207
+ thin: "",
47208
+ flat: "",
47209
+ class: "rounded",
47210
+ "aria-label": action.name,
47211
+ icon: action.icon,
47212
+ onClick: ($event) => emit2("action", action.name)
47213
+ }, null, 8, ["aria-label", "icon", "onClick"])), [
47214
+ [_directive_tooltip, action.name]
47215
+ ]) : vue.createCommentVNode("", true),
47216
+ action.name === "separator" ? (vue.openBlock(), vue.createElementBlock("span", {
47217
+ key: `separator-${index2}`,
47218
+ class: "opacity-2 mb-025"
47219
+ }, "|")) : vue.createCommentVNode("", true)
47220
+ ], 64);
47221
+ }), 64))
47241
47222
  ]);
47242
47223
  };
47243
47224
  }
47244
47225
  });
47245
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-4c741194"]]);
47246
47226
  function applyFormatting(command2, value = "") {
47247
47227
  const selection = window.getSelection();
47248
47228
  if (selection && selection.rangeCount > 0) {
@@ -47415,8 +47395,11 @@ function createTable() {
47415
47395
  }
47416
47396
  }
47417
47397
  }
47418
- const _hoisted_1$e = { class: "rich-text-editor" };
47419
- const _hoisted_2$b = ["innerHTML"];
47398
+ const _hoisted_1$e = { class: "rich-text-editor round pt-05 px-1 pb-1" };
47399
+ const _hoisted_2$b = {
47400
+ key: 0,
47401
+ class: "preview-area bg-black color-white w-100 rounded p-1"
47402
+ };
47420
47403
  const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
47421
47404
  __name: "index",
47422
47405
  props: {
@@ -47450,7 +47433,9 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
47450
47433
  "blockquote",
47451
47434
  "codeBlock",
47452
47435
  "splitView",
47453
- "codeView"
47436
+ "youtube",
47437
+ "codeView",
47438
+ "clear"
47454
47439
  ];
47455
47440
  const config = vue.ref(props2.toolbarConfig || defaultConfig2);
47456
47441
  let contentHtml = vue.ref(props2.modelValue);
@@ -47533,15 +47518,15 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
47533
47518
  }
47534
47519
  return (_ctx, _cache) => {
47535
47520
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
47536
- vue.createVNode(Toolbar, {
47521
+ vue.createVNode(_sfc_main$a, {
47537
47522
  config: config.value,
47538
47523
  onAction: handleToolbarAction
47539
47524
  }, null, 8, ["config"]),
47540
47525
  vue.createElementVNode("div", {
47541
- class: vue.normalizeClass(["editor-container", { "split-view": vue.unref(isSplitView) }])
47526
+ class: vue.normalizeClass(["editor-container flex flex-stretch", { "split-view": vue.unref(isSplitView) }])
47542
47527
  }, [
47543
47528
  vue.createElementVNode("div", {
47544
- class: vue.normalizeClass(["content-area", { "code-view": vue.unref(isCodeView) }])
47529
+ class: vue.normalizeClass(["content-area rounded p-1 bg-white shadow-light w-100 grid", { "code-view": vue.unref(isCodeView) }])
47545
47530
  }, [
47546
47531
  vue.unref(isCodeView) ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("textarea", {
47547
47532
  key: 0,
@@ -47554,6 +47539,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
47554
47539
  ref_key: "editableContent",
47555
47540
  ref: editableContent,
47556
47541
  contenteditable: "true",
47542
+ class: "editableContent",
47557
47543
  role: "textbox",
47558
47544
  "aria-multiline": "true",
47559
47545
  tabindex: "0",
@@ -47561,17 +47547,13 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
47561
47547
  onKeydown: handleKeyDown2
47562
47548
  }, null, 544))
47563
47549
  ], 2),
47564
- vue.unref(isSplitView) ? (vue.openBlock(), vue.createElementBlock("div", {
47565
- key: 0,
47566
- class: "preview-area",
47567
- innerHTML: vue.unref(contentHtml)
47568
- }, null, 8, _hoisted_2$b)) : vue.createCommentVNode("", true)
47550
+ vue.unref(isSplitView) ? (vue.openBlock(), vue.createElementBlock("code", _hoisted_2$b, vue.toDisplayString(vue.unref(contentHtml)), 1)) : vue.createCommentVNode("", true)
47569
47551
  ], 2)
47570
47552
  ]);
47571
47553
  };
47572
47554
  }
47573
47555
  });
47574
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e3cd444d"]]);
47556
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d3f64de7"]]);
47575
47557
  const _hoisted_1$d = ["for"];
47576
47558
  const _hoisted_2$a = ["id", "name", "value"];
47577
47559
  const _hoisted_3$8 = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
package/dist/index.mjs CHANGED
@@ -6498,7 +6498,7 @@ const _hoisted_3$k = [
6498
6498
  const _hoisted_4$e = { class: "infinite-wrapper" };
6499
6499
  const _hoisted_5$e = { class: "row first-row" };
6500
6500
  const _hoisted_6$9 = { key: 0 };
6501
- const _hoisted_7$5 = ["onClick"];
6501
+ const _hoisted_7$4 = ["onClick"];
6502
6502
  const _hoisted_8$2 = { class: "flex" };
6503
6503
  const _hoisted_9$2 = ["onClick"];
6504
6504
  const _hoisted_10$1 = { key: 0 };
@@ -6671,7 +6671,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
6671
6671
  }, null, 8, ["class"])
6672
6672
  ], 2)
6673
6673
  ])
6674
- ], 8, _hoisted_7$5);
6674
+ ], 8, _hoisted_7$4);
6675
6675
  }), 128))
6676
6676
  ]),
6677
6677
  createElementVNode("tbody", null, [
@@ -6770,7 +6770,7 @@ const _hoisted_6$8 = {
6770
6770
  key: 0,
6771
6771
  class: "data-row"
6772
6772
  };
6773
- const _hoisted_7$4 = { class: "key" };
6773
+ const _hoisted_7$3 = { class: "key" };
6774
6774
  const _hoisted_8$1 = { class: "m-0" };
6775
6775
  const _hoisted_9$1 = {
6776
6776
  key: 0,
@@ -6839,7 +6839,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
6839
6839
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(computedSchema.value, ({ id, label }) => {
6840
6840
  return openBlock(), createElementBlock(Fragment$1, { key: id }, [
6841
6841
  !isUnset(itemData.value[id]) ? (openBlock(), createElementBlock("div", _hoisted_6$8, [
6842
- createElementVNode("div", _hoisted_7$4, [
6842
+ createElementVNode("div", _hoisted_7$3, [
6843
6843
  createElementVNode("p", _hoisted_8$1, toDisplayString(label), 1)
6844
6844
  ]),
6845
6845
  createElementVNode("div", null, [
@@ -16317,8 +16317,7 @@ const _hoisted_4$c = {
16317
16317
  class: "ms-auto ps-05 me-05"
16318
16318
  };
16319
16319
  const _hoisted_5$c = ["value"];
16320
- const _hoisted_6$7 = { class: "selectinput-options" };
16321
- const _hoisted_7$3 = ["aria-selected", "onClick", "onKeydown"];
16320
+ const _hoisted_6$7 = ["aria-selected", "onClick", "onKeydown"];
16322
16321
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
16323
16322
  __name: "SelectInput",
16324
16323
  props: {
@@ -16483,7 +16482,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
16483
16482
  placeholder: "Search",
16484
16483
  icon: "search"
16485
16484
  }, null, 8, ["modelValue"])) : createCommentVNode("", true),
16486
- createElementVNode("div", _hoisted_6$7, [
16485
+ createElementVNode("div", {
16486
+ class: normalizeClass(["selectinput-options", { multiselect: _ctx.multiselect }])
16487
+ }, [
16487
16488
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option2, i2) => {
16488
16489
  return openBlock(), createElementBlock("div", {
16489
16490
  key: `${option2}${i2}`,
@@ -16494,19 +16495,21 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
16494
16495
  onClick: ($event) => select2(option2),
16495
16496
  onKeydown: withKeys(($event) => select2(option2), ["enter"])
16496
16497
  }, [
16497
- isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$Q), {
16498
- key: 0,
16499
- icon: "check"
16500
- })) : createCommentVNode("", true),
16501
- !isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$Q), {
16502
- key: 1,
16503
- class: "opacity-3",
16504
- icon: "fiber_manual_record"
16505
- })) : createCommentVNode("", true),
16498
+ _ctx.multiselect ? (openBlock(), createElementBlock(Fragment$1, { key: 0 }, [
16499
+ isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$Q), {
16500
+ key: 0,
16501
+ icon: "select_check_box"
16502
+ })) : createCommentVNode("", true),
16503
+ !isSelected(option2) ? (openBlock(), createBlock(unref(_sfc_main$Q), {
16504
+ key: 1,
16505
+ class: "opacity-3",
16506
+ icon: "check_box_outline_blank"
16507
+ })) : createCommentVNode("", true)
16508
+ ], 64)) : createCommentVNode("", true),
16506
16509
  createElementVNode("span", null, toDisplayString(getLabel(option2)), 1)
16507
- ], 42, _hoisted_7$3);
16510
+ ], 42, _hoisted_6$7);
16508
16511
  }), 128))
16509
- ]),
16512
+ ], 2),
16510
16513
  renderSlot(_ctx.$slots, "last", {}, void 0, true)
16511
16514
  ]),
16512
16515
  _: 3
@@ -16530,9 +16533,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
16530
16533
  !_ctx.hideLabel ? (openBlock(), createElementBlock("p", _hoisted_3$g, toDisplayString(selectedLabel.value), 1)) : createCommentVNode("", true),
16531
16534
  _ctx.clearable && selectedItemCount.value > 0 ? (openBlock(), createElementBlock("div", _hoisted_4$c, [
16532
16535
  createVNode(unref(Btn), {
16536
+ flat: "",
16533
16537
  thin: "",
16534
16538
  icon: "clear",
16535
- class: "color-primary bg-gray-20",
16539
+ class: "color-gray",
16536
16540
  onClick: _cache[0] || (_cache[0] = ($event) => {
16537
16541
  isRef(selectedItems) ? selectedItems.value = [] : selectedItems = [];
16538
16542
  emitUpdate();
@@ -16560,7 +16564,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
16560
16564
  };
16561
16565
  }
16562
16566
  });
16563
- const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-a26862a2"]]);
16567
+ const SelectInput = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["__scopeId", "data-v-25fde24f"]]);
16564
16568
  /*!
16565
16569
  * vue-draggable-next v2.2.0
16566
16570
  * (c) 2023 Anish George
@@ -47154,7 +47158,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
47154
47158
  }
47155
47159
  });
47156
47160
  const _hoisted_1$f = {
47157
- class: "toolbar",
47161
+ class: "toolbar flex gap-025 pb-05 flex-wrap",
47158
47162
  role: "toolbar"
47159
47163
  };
47160
47164
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
@@ -47165,82 +47169,58 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
47165
47169
  emits: ["action"],
47166
47170
  setup(__props, { emit: __emit }) {
47167
47171
  const emit2 = __emit;
47168
- const colorPicker = ref(null);
47169
- const fontSizeInput = ref(null);
47172
+ ref(null);
47173
+ ref(null);
47170
47174
  const toolbarOptions = [
47175
+ { name: "separator" },
47171
47176
  { name: "bold", icon: "format_bold" },
47172
47177
  { name: "italic", icon: "format_italic" },
47173
47178
  { name: "underline", icon: "format_underlined" },
47174
- { name: "fontSize", icon: "format_size" },
47175
- { name: "fontFamily", icon: "font_download" },
47176
- { name: "textColor", icon: "text_format" },
47177
- { name: "backgroundColor", icon: "format_color_fill" },
47178
- { name: "alignLeft", icon: "format_align_left" },
47179
- { name: "alignCenter", icon: "format_align_center" },
47180
- { name: "alignRight", icon: "format_align_right" },
47181
- { name: "alignJustify", icon: "format_align_justify" },
47179
+ { name: "separator" },
47182
47180
  { name: "orderedList", icon: "format_list_numbered" },
47183
47181
  { name: "unorderedList", icon: "format_list_bulleted" },
47184
- { name: "indent", icon: "format_indent_increase" },
47185
- { name: "outdent", icon: "format_indent_decrease" },
47186
- { name: "link", icon: "link" },
47187
- { name: "image", icon: "image" },
47188
- { name: "table", icon: "table_chart" },
47189
- { name: "blockquote", icon: "format_quote" },
47190
- { name: "codeBlock", icon: "code" },
47191
- { name: "splitView", icon: "splitscreen_right" },
47192
- { name: "codeView", icon: "code" }
47182
+ { name: "separator" },
47183
+ { name: "link", icon: "add_link" },
47184
+ { name: "image", icon: "add_photo_alternate" },
47185
+ { name: "youtube", icon: "youtube_activity" },
47186
+ { name: "separator" },
47187
+ { name: "splitView", icon: "code" },
47188
+ { name: "clear", icon: "format_clear" }
47193
47189
  ];
47194
- function handleColorPick(type3) {
47195
- var _a2;
47196
- const color2 = (_a2 = colorPicker.value) == null ? void 0 : _a2.value;
47197
- if (color2) {
47198
- emit2("action", type3, color2);
47199
- }
47200
- }
47201
- function handleFontSizeChange() {
47202
- var _a2;
47203
- const size2 = (_a2 = fontSizeInput.value) == null ? void 0 : _a2.value;
47204
- if (size2) {
47205
- emit2("action", "fontSize", size2);
47206
- }
47190
+ function handleSelectChange(selectedOption) {
47191
+ emit2("action", "formatBlock", selectedOption);
47207
47192
  }
47208
47193
  return (_ctx, _cache) => {
47209
47194
  const _directive_tooltip = resolveDirective("tooltip");
47210
47195
  return openBlock(), createElementBlock("div", _hoisted_1$f, [
47211
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(toolbarOptions.filter((t) => _ctx.config.includes(t.name)), (action) => {
47212
- return withDirectives((openBlock(), createBlock(unref(Btn), {
47213
- key: action.name,
47214
- thin: "",
47215
- color: "light",
47216
- "aria-label": action.name,
47217
- icon: action.icon,
47218
- onClick: ($event) => emit2("action", action.name)
47219
- }, null, 8, ["aria-label", "icon", "onClick"])), [
47220
- [_directive_tooltip, action.name]
47221
- ]);
47222
- }), 128)),
47223
- _ctx.config.includes("textColor") || _ctx.config.includes("backgroundColor") ? (openBlock(), createElementBlock("input", {
47224
- key: 0,
47225
- ref_key: "colorPicker",
47226
- ref: colorPicker,
47227
- type: "color",
47228
- onChange: _cache[0] || (_cache[0] = ($event) => handleColorPick(_ctx.config.includes("textColor") ? "textColor" : "backgroundColor"))
47229
- }, null, 544)) : createCommentVNode("", true),
47230
- _ctx.config.includes("fontSize") ? (openBlock(), createElementBlock("input", {
47231
- key: 1,
47232
- ref_key: "fontSizeInput",
47233
- ref: fontSizeInput,
47234
- type: "number",
47235
- min: "1",
47236
- max: "7",
47237
- onChange: handleFontSizeChange
47238
- }, null, 544)) : createCommentVNode("", true)
47196
+ createVNode(SelectInput, {
47197
+ class: "m-0 w150",
47198
+ options: ["Text", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Heading 5", "Heading 6", "Blockquote", "Code"],
47199
+ onChange: handleSelectChange
47200
+ }),
47201
+ (openBlock(), createElementBlock(Fragment$1, null, renderList(toolbarOptions, (action, index2) => {
47202
+ return openBlock(), createElementBlock(Fragment$1, null, [
47203
+ action.name !== "separator" && _ctx.config.includes(action.name) ? withDirectives((openBlock(), createBlock(unref(Btn), {
47204
+ key: action.name,
47205
+ thin: "",
47206
+ flat: "",
47207
+ class: "rounded",
47208
+ "aria-label": action.name,
47209
+ icon: action.icon,
47210
+ onClick: ($event) => emit2("action", action.name)
47211
+ }, null, 8, ["aria-label", "icon", "onClick"])), [
47212
+ [_directive_tooltip, action.name]
47213
+ ]) : createCommentVNode("", true),
47214
+ action.name === "separator" ? (openBlock(), createElementBlock("span", {
47215
+ key: `separator-${index2}`,
47216
+ class: "opacity-2 mb-025"
47217
+ }, "|")) : createCommentVNode("", true)
47218
+ ], 64);
47219
+ }), 64))
47239
47220
  ]);
47240
47221
  };
47241
47222
  }
47242
47223
  });
47243
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-4c741194"]]);
47244
47224
  function applyFormatting(command2, value = "") {
47245
47225
  const selection = window.getSelection();
47246
47226
  if (selection && selection.rangeCount > 0) {
@@ -47413,8 +47393,11 @@ function createTable() {
47413
47393
  }
47414
47394
  }
47415
47395
  }
47416
- const _hoisted_1$e = { class: "rich-text-editor" };
47417
- const _hoisted_2$b = ["innerHTML"];
47396
+ const _hoisted_1$e = { class: "rich-text-editor round pt-05 px-1 pb-1" };
47397
+ const _hoisted_2$b = {
47398
+ key: 0,
47399
+ class: "preview-area bg-black color-white w-100 rounded p-1"
47400
+ };
47418
47401
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
47419
47402
  __name: "index",
47420
47403
  props: {
@@ -47448,7 +47431,9 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
47448
47431
  "blockquote",
47449
47432
  "codeBlock",
47450
47433
  "splitView",
47451
- "codeView"
47434
+ "youtube",
47435
+ "codeView",
47436
+ "clear"
47452
47437
  ];
47453
47438
  const config = ref(props2.toolbarConfig || defaultConfig2);
47454
47439
  let contentHtml = ref(props2.modelValue);
@@ -47531,15 +47516,15 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
47531
47516
  }
47532
47517
  return (_ctx, _cache) => {
47533
47518
  return openBlock(), createElementBlock("div", _hoisted_1$e, [
47534
- createVNode(Toolbar, {
47519
+ createVNode(_sfc_main$a, {
47535
47520
  config: config.value,
47536
47521
  onAction: handleToolbarAction
47537
47522
  }, null, 8, ["config"]),
47538
47523
  createElementVNode("div", {
47539
- class: normalizeClass(["editor-container", { "split-view": unref(isSplitView) }])
47524
+ class: normalizeClass(["editor-container flex flex-stretch", { "split-view": unref(isSplitView) }])
47540
47525
  }, [
47541
47526
  createElementVNode("div", {
47542
- class: normalizeClass(["content-area", { "code-view": unref(isCodeView) }])
47527
+ class: normalizeClass(["content-area rounded p-1 bg-white shadow-light w-100 grid", { "code-view": unref(isCodeView) }])
47543
47528
  }, [
47544
47529
  unref(isCodeView) ? withDirectives((openBlock(), createElementBlock("textarea", {
47545
47530
  key: 0,
@@ -47552,6 +47537,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
47552
47537
  ref_key: "editableContent",
47553
47538
  ref: editableContent,
47554
47539
  contenteditable: "true",
47540
+ class: "editableContent",
47555
47541
  role: "textbox",
47556
47542
  "aria-multiline": "true",
47557
47543
  tabindex: "0",
@@ -47559,17 +47545,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
47559
47545
  onKeydown: handleKeyDown2
47560
47546
  }, null, 544))
47561
47547
  ], 2),
47562
- unref(isSplitView) ? (openBlock(), createElementBlock("div", {
47563
- key: 0,
47564
- class: "preview-area",
47565
- innerHTML: unref(contentHtml)
47566
- }, null, 8, _hoisted_2$b)) : createCommentVNode("", true)
47548
+ unref(isSplitView) ? (openBlock(), createElementBlock("code", _hoisted_2$b, toDisplayString(unref(contentHtml)), 1)) : createCommentVNode("", true)
47567
47549
  ], 2)
47568
47550
  ]);
47569
47551
  };
47570
47552
  }
47571
47553
  });
47572
- const index = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-e3cd444d"]]);
47554
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d3f64de7"]]);
47573
47555
  const _hoisted_1$d = ["for"];
47574
47556
  const _hoisted_2$a = ["id", "name", "value"];
47575
47557
  const _hoisted_3$8 = { class: "flex w-100 gap-1 flex-wrap m_gap-05 m_gap-row-025" };
package/dist/style.css CHANGED
@@ -1295,30 +1295,37 @@ display: block;
1295
1295
  }
1296
1296
  .resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.v-popper__popper{z-index:10000;top:0;left:0;outline:none}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s;pointer-events:none}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__backdrop{position:absolute;top:0;left:0;width:100%;height:100%;display:none}.v-popper__inner{position:relative;box-sizing:border-box;overflow-y:auto}.v-popper__inner>div{position:relative;z-index:1;max-width:inherit;max-height:inherit}.v-popper__arrow-container{position:absolute;width:10px;height:10px}.v-popper__popper--arrow-overflow .v-popper__arrow-container,.v-popper__popper--no-positioning .v-popper__arrow-container{display:none}.v-popper__arrow-inner,.v-popper__arrow-outer{border-style:solid;position:absolute;top:0;left:0;width:0;height:0}.v-popper__arrow-inner{visibility:hidden;border-width:7px}.v-popper__arrow-outer{border-width:6px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{left:-2px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{left:-1px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer{border-bottom-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{border-top-width:0;border-left-color:transparent!important;border-right-color:transparent!important;border-top-color:transparent!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{top:-4px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{top:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{top:-1px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{border-left-width:0;border-left-color:transparent!important;border-top-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{left:-4px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{left:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-10px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer{border-right-width:0;border-top-color:transparent!important;border-right-color:transparent!important;border-bottom-color:transparent!important}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner{left:-2px}.v-popper--theme-tooltip .v-popper__inner{background:rgba(0,0,0,.8);color:#fff;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow-outer{border-color:#000c}.v-popper--theme-dropdown .v-popper__inner{background:#fff;color:#000;border-radius:6px;border:1px solid #ddd;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow-inner{visibility:visible;border-color:#fff}.v-popper--theme-dropdown .v-popper__arrow-outer{border-color:#ddd}
1297
1297
 
1298
- .selectinput[data-v-a26862a2] {
1298
+ .selectinput[data-v-25fde24f] {
1299
1299
  width: 100%;
1300
1300
  }
1301
- .selectinput-option[data-v-a26862a2] {
1301
+ .selectinput-option[data-v-25fde24f] {
1302
1302
  padding: 6px 12px;
1303
1303
  cursor: pointer;
1304
1304
  border-radius: 5px;
1305
1305
  transition: all 0.2s;
1306
1306
  display: grid;
1307
- grid-template-columns: 10px 1fr;
1307
+ grid-template-columns:1fr;
1308
1308
  justify-content: space-between;
1309
1309
  width: 100%;
1310
1310
  font-size: var(--input-font-size);
1311
+ margin-block: 0.15rem;
1312
+ }
1313
+ .selectinput-options.multiselect .selectinput-option[data-v-25fde24f] {
1314
+ grid-template-columns: 10px 1fr;
1311
1315
  }
1312
- .selectinput-options[data-v-a26862a2] {
1316
+ .selectinput-options[data-v-25fde24f] {
1313
1317
  max-height: 300px;
1314
1318
  overflow-y: auto;
1315
1319
  }
1316
- .selectinput-option[data-v-a26862a2]:hover {
1320
+ .selectinput-option[data-v-25fde24f]:hover {
1317
1321
  background: var(--bgl-gray-20);
1318
1322
  }
1319
- .isEmpty p[data-v-a26862a2] {
1323
+ .isEmpty p[data-v-25fde24f] {
1320
1324
  opacity: 0.3;
1321
1325
  }
1326
+ .selected[data-v-25fde24f]{
1327
+ background: var(--input-bg);
1328
+ }
1322
1329
 
1323
1330
  .bagel-input label {
1324
1331
  font-size: var(--label-font-size);
@@ -2194,75 +2201,78 @@ p {
2194
2201
  border-radius: var(--input-border-radius);
2195
2202
  }
2196
2203
 
2197
- .toolbar[data-v-4c741194] {
2198
- display: flex;
2199
- flex-wrap: wrap;
2200
- gap: 5px;
2201
- padding: 10px;
2202
- background-color: #f0f0f0;
2203
- border-bottom: 1px solid #ccc;
2204
- }
2205
- button[data-v-4c741194]:hover {
2206
- background-color: #e0e0e0;
2207
- }
2208
- input[type="color"][data-v-4c741194],
2209
- input[type="number"][data-v-4c741194] {
2210
- width: 40px;
2211
- height: 30px;
2212
- padding: 0;
2213
- border: 1px solid #ccc;
2214
- border-radius: 3px;
2204
+ .rich-text-editor[data-v-d3f64de7] {
2205
+ background: var(--input-bg);
2206
+ margin-bottom: 0.5rem;
2207
+ width: 100%;
2208
+ /* font-family: Arial, sans-serif; */
2209
+ /* max-width: 800px; */
2210
+ /* margin: 0 auto; */
2215
2211
  }
2216
-
2217
- .rich-text-editor[data-v-e3cd444d] {
2218
- font-family: Arial, sans-serif;
2219
- max-width: 800px;
2220
- margin: 0 auto;
2212
+ .editableContent[data-v-d3f64de7]{
2213
+ min-height: 100%;
2214
+ white-space: pre-wrap;
2215
+ outline: none;
2221
2216
  }
2222
- [contenteditable='true'][data-v-e3cd444d] {
2223
- white-space: pre-wrap;
2224
- word-wrap: break-word;
2217
+ /* [contenteditable='true'] {
2218
+ white-space: pre-wrap;
2219
+ word-wrap: break-word;
2225
2220
  outline: none;
2226
- border: none;
2227
2221
  height: 100%;
2222
+ } */
2223
+ .content-area[data-v-d3f64de7]{
2224
+ }
2225
+ .content-area[data-v-d3f64de7], .preview-area[data-v-d3f64de7]{
2226
+ min-height: 200px;
2228
2227
  }
2229
- .editor-container[data-v-e3cd444d] {
2228
+ .preview-area[data-v-d3f64de7]{}
2229
+
2230
+ /*
2231
+
2232
+ .editor-container {
2230
2233
  display: flex;
2231
2234
  border: 1px solid #ccc;
2232
2235
  border-radius: 4px;
2233
2236
  overflow: hidden;
2234
2237
  }
2235
- .content-area[data-v-e3cd444d],
2236
- .preview-area[data-v-e3cd444d] {
2238
+
2239
+ .content-area,
2240
+ .preview-area {
2237
2241
  flex: 1;
2238
2242
  min-height: 300px;
2239
2243
  padding: 10px;
2240
2244
  overflow-y: auto;
2241
2245
  }
2242
- .content-area[data-v-e3cd444d]:focus {
2246
+
2247
+ .content-area:focus {
2243
2248
  outline: none;
2244
2249
  }
2245
- .split-view .content-area[data-v-e3cd444d],
2246
- .split-view .preview-area[data-v-e3cd444d] {
2250
+
2251
+ .split-view .content-area,
2252
+ .split-view .preview-area {
2247
2253
  width: 50%;
2248
2254
  }
2249
- .preview-area[data-v-e3cd444d] {
2255
+
2256
+ .preview-area {
2250
2257
  background-color: #f9f9f9;
2251
2258
  border-left: 1px solid #ccc;
2252
- }
2253
- @media (max-width: 768px) {
2254
- .split-view[data-v-e3cd444d] {
2259
+ } */
2260
+
2261
+ /* @media (max-width: 768px) {
2262
+ .split-view {
2255
2263
  flex-direction: column;
2256
- }
2257
- .split-view .content-area[data-v-e3cd444d],
2258
- .split-view .preview-area[data-v-e3cd444d] {
2264
+ }
2265
+
2266
+ .split-view .content-area,
2267
+ .split-view .preview-area {
2259
2268
  width: 100%;
2260
- }
2261
- .preview-area[data-v-e3cd444d] {
2269
+ }
2270
+
2271
+ .preview-area {
2262
2272
  border-left: none;
2263
2273
  border-top: 1px solid #ccc;
2264
- }
2265
- }
2274
+ }
2275
+ } */
2266
2276
 
2267
2277
  .radio-input-list[data-v-ac3dc0e2]{
2268
2278
  width: auto;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.714",
4
+ "version": "0.0.716",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -1,5 +1,6 @@
1
1
  <script lang="ts" setup>
2
2
  import { Btn, type MaterialIcons } from '@bagelink/vue'
3
+ import SelectInput from '../SelectInput.vue'
3
4
  import type { ToolbarConfig, ToolbarConfigOption } from './richtext-types'
4
5
 
5
6
  defineProps<{ config: ToolbarConfig }>()
@@ -9,33 +10,26 @@ const colorPicker = $ref<HTMLInputElement | null>(null)
9
10
  const fontSizeInput = $ref<HTMLInputElement | null>(null)
10
11
 
11
12
  interface toolbarOption {
12
- name: ToolbarConfigOption
13
+ name: ToolbarConfigOption | 'separator'
13
14
  icon: MaterialIcons
14
15
  }
15
16
 
16
17
  const toolbarOptions: toolbarOption[] = [
18
+ { name: 'separator' },
17
19
  { name: 'bold', icon: 'format_bold' },
18
20
  { name: 'italic', icon: 'format_italic' },
19
21
  { name: 'underline', icon: 'format_underlined' },
20
- { name: 'fontSize', icon: 'format_size' },
21
- { name: 'fontFamily', icon: 'font_download' },
22
- { name: 'textColor', icon: 'text_format' },
23
- { name: 'backgroundColor', icon: 'format_color_fill' },
24
- { name: 'alignLeft', icon: 'format_align_left' },
25
- { name: 'alignCenter', icon: 'format_align_center' },
26
- { name: 'alignRight', icon: 'format_align_right' },
27
- { name: 'alignJustify', icon: 'format_align_justify' },
22
+ { name: 'separator' },
28
23
  { name: 'orderedList', icon: 'format_list_numbered' },
29
24
  { name: 'unorderedList', icon: 'format_list_bulleted' },
30
- { name: 'indent', icon: 'format_indent_increase' },
31
- { name: 'outdent', icon: 'format_indent_decrease' },
32
- { name: 'link', icon: 'link' },
33
- { name: 'image', icon: 'image' },
34
- { name: 'table', icon: 'table_chart' },
35
- { name: 'blockquote', icon: 'format_quote' },
36
- { name: 'codeBlock', icon: 'code' },
37
- { name: 'splitView', icon: 'splitscreen_right' },
38
- { name: 'codeView', icon: 'code' },
25
+ { name: 'separator' },
26
+ { name: 'link', icon: 'add_link' },
27
+ { name: 'image', icon: 'add_photo_alternate' },
28
+ { name: 'youtube', icon: 'youtube_activity' },
29
+ { name: 'separator' },
30
+ { name: 'splitView', icon: 'code' },
31
+ { name: 'clear', icon: 'format_clear' },
32
+
39
33
  ]
40
34
 
41
35
  function handleColorPick(type: 'textColor' | 'backgroundColor') {
@@ -51,57 +45,40 @@ function handleFontSizeChange() {
51
45
  emit('action', 'fontSize', size)
52
46
  }
53
47
  }
48
+ function handleSelectChange(selectedOption: string) {
49
+ emit('action', 'formatBlock', selectedOption)
50
+ }
54
51
  </script>
55
52
 
56
53
  <template>
57
- <div class="toolbar" role="toolbar">
58
- <Btn
59
- v-for="action in toolbarOptions.filter(t => config.includes(t.name))"
60
- :key="action.name"
61
- v-tooltip="action.name"
62
- thin
63
- color="light"
64
- :aria-label="action.name"
65
- :icon="action.icon"
66
- @click="emit('action', action.name)"
54
+ <div class="toolbar flex gap-025 pb-05 flex-wrap" role="toolbar">
55
+ <SelectInput
56
+ class="m-0 w150"
57
+ :options="['Text', 'Heading 1', 'Heading 2', 'Heading 3', 'Heading 4', 'Heading 5', 'Heading 6', 'Blockquote', 'Code']"
58
+ @change="handleSelectChange"
67
59
  />
68
- <input
69
- v-if="config.includes('textColor') || config.includes('backgroundColor')"
70
- ref="colorPicker"
71
- type="color"
72
- @change="handleColorPick(config.includes('textColor') ? 'textColor' : 'backgroundColor')"
73
- >
74
- <input
75
- v-if="config.includes('fontSize')"
76
- ref="fontSizeInput"
77
- type="number"
78
- min="1"
79
- max="7"
80
- @change="handleFontSizeChange"
81
- >
60
+
61
+ <template v-for="(action, index) in toolbarOptions">
62
+ <Btn
63
+ v-if="action.name !== 'separator' && config.includes(action.name)"
64
+ :key="action.name"
65
+ v-tooltip="action.name"
66
+ thin
67
+ flat
68
+ class="rounded"
69
+ :aria-label="action.name"
70
+ :icon="action.icon"
71
+ @click="emit('action', action.name)"
72
+ />
73
+ <span
74
+ v-if="action.name === 'separator'"
75
+ :key="`separator-${index}`"
76
+ class=" opacity-2 mb-025"
77
+ >|</span>
78
+ </template>
82
79
  </div>
83
80
  </template>
84
81
 
85
82
  <style scoped>
86
- .toolbar {
87
- display: flex;
88
- flex-wrap: wrap;
89
- gap: 5px;
90
- padding: 10px;
91
- background-color: #f0f0f0;
92
- border-bottom: 1px solid #ccc;
93
- }
94
83
 
95
- button:hover {
96
- background-color: #e0e0e0;
97
- }
98
-
99
- input[type="color"],
100
- input[type="number"] {
101
- width: 40px;
102
- height: 30px;
103
- padding: 0;
104
- border: 1px solid #ccc;
105
- border-radius: 3px;
106
- }
107
84
  </style>
@@ -30,7 +30,9 @@ const defaultConfig: ToolbarConfig = [
30
30
  'blockquote',
31
31
  'codeBlock',
32
32
  'splitView',
33
- 'codeView'
33
+ 'youtube',
34
+ 'codeView',
35
+ 'clear',
34
36
  ]
35
37
  const config = $ref<ToolbarConfig>(props.toolbarConfig || defaultConfig)
36
38
  let contentHtml = $ref(props.modelValue)
@@ -121,15 +123,16 @@ function handleKeyDown(event: KeyboardEvent) {
121
123
  </script>
122
124
 
123
125
  <template>
124
- <div class="rich-text-editor">
126
+ <div class="rich-text-editor round pt-05 px-1 pb-1">
125
127
  <Toolbar :config @action="handleToolbarAction" />
126
- <div class="editor-container" :class="{ 'split-view': isSplitView }">
127
- <div class="content-area" :class="{ 'code-view': isCodeView }">
128
+ <div class="editor-container flex flex-stretch" :class="{ 'split-view': isSplitView }">
129
+ <div class="content-area rounded p-1 bg-white shadow-light w-100 grid" :class="{ 'code-view': isCodeView }">
128
130
  <textarea v-if="isCodeView" v-model="contentHtml" @input="updateContent" />
129
131
  <div
130
132
  v-else
131
133
  ref="editableContent"
132
134
  contenteditable="true"
135
+ class="editableContent"
133
136
  role="textbox"
134
137
  aria-multiline="true"
135
138
  tabindex="0"
@@ -137,25 +140,40 @@ function handleKeyDown(event: KeyboardEvent) {
137
140
  @keydown="handleKeyDown"
138
141
  />
139
142
  </div>
140
- <div v-if="isSplitView" class="preview-area" v-html="contentHtml" />
143
+ <code v-if="isSplitView" class="preview-area bg-black color-white w-100 rounded p-1">{{ contentHtml }}</code>
141
144
  </div>
142
145
  </div>
143
146
  </template>
144
147
 
145
148
  <style scoped>
146
149
  .rich-text-editor {
147
- font-family: Arial, sans-serif;
148
- max-width: 800px;
149
- margin: 0 auto;
150
+ background: var(--input-bg);
151
+ margin-bottom: 0.5rem;
152
+ width: 100%;
153
+ /* font-family: Arial, sans-serif; */
154
+ /* max-width: 800px; */
155
+ /* margin: 0 auto; */
150
156
  }
151
-
152
- [contenteditable='true'] {
153
- white-space: pre-wrap;
154
- word-wrap: break-word;
157
+ .editableContent{
158
+ min-height: 100%;
159
+ white-space: pre-wrap;
160
+ outline: none;
161
+ }
162
+ /* [contenteditable='true'] {
163
+ white-space: pre-wrap;
164
+ word-wrap: break-word;
155
165
  outline: none;
156
- border: none;
157
166
  height: 100%;
167
+ } */
168
+ .content-area{
169
+ }
170
+ .content-area, .preview-area{
171
+ min-height: 200px;
172
+
158
173
  }
174
+ .preview-area{}
175
+
176
+ /*
159
177
 
160
178
  .editor-container {
161
179
  display: flex;
@@ -184,9 +202,9 @@ function handleKeyDown(event: KeyboardEvent) {
184
202
  .preview-area {
185
203
  background-color: #f9f9f9;
186
204
  border-left: 1px solid #ccc;
187
- }
205
+ } */
188
206
 
189
- @media (max-width: 768px) {
207
+ /* @media (max-width: 768px) {
190
208
  .split-view {
191
209
  flex-direction: column;
192
210
  }
@@ -200,5 +218,5 @@ function handleKeyDown(event: KeyboardEvent) {
200
218
  border-left: none;
201
219
  border-top: 1px solid #ccc;
202
220
  }
203
- }
221
+ } */
204
222
  </style>
@@ -203,9 +203,10 @@ onMounted(() => {
203
203
 
204
204
  <div v-if="clearable && selectedItemCount > 0" class="ms-auto ps-05 me-05">
205
205
  <Btn
206
+ flat
206
207
  thin
207
208
  icon="clear"
208
- class="color-primary bg-gray-20"
209
+ class="color-gray"
209
210
  @click="selectedItems = []; emitUpdate()"
210
211
  />
211
212
  </div>
@@ -238,7 +239,7 @@ onMounted(() => {
238
239
  placeholder="Search"
239
240
  icon="search"
240
241
  />
241
- <div class="selectinput-options">
242
+ <div class="selectinput-options" :class="{ multiselect }">
242
243
  <div
243
244
  v-for="(option, i) in filteredOptions"
244
245
  :key="`${option}${i}`"
@@ -250,12 +251,14 @@ onMounted(() => {
250
251
  @click="select(option)"
251
252
  @keydown.enter="select(option)"
252
253
  >
253
- <Icon v-if="isSelected(option)" icon="check" />
254
- <Icon
255
- v-if="!isSelected(option)"
256
- class="opacity-3"
257
- icon="fiber_manual_record"
258
- />
254
+ <template v-if="multiselect">
255
+ <Icon v-if="isSelected(option)" icon="select_check_box" />
256
+ <Icon
257
+ v-if="!isSelected(option)"
258
+ class="opacity-3"
259
+ icon="check_box_outline_blank"
260
+ />
261
+ </template>
259
262
  <span>
260
263
  {{ getLabel(option) }}
261
264
  </span>
@@ -278,10 +281,15 @@ onMounted(() => {
278
281
  border-radius: 5px;
279
282
  transition: all 0.2s;
280
283
  display: grid;
281
- grid-template-columns: 10px 1fr;
284
+ grid-template-columns:1fr;
282
285
  justify-content: space-between;
283
286
  width: 100%;
284
287
  font-size: var(--input-font-size);
288
+ margin-block: 0.15rem;
289
+ }
290
+ .selectinput-options.multiselect .selectinput-option {
291
+ grid-template-columns: 10px 1fr;
292
+
285
293
  }
286
294
 
287
295
  .selectinput-options {
@@ -295,6 +303,9 @@ onMounted(() => {
295
303
  .isEmpty p {
296
304
  opacity: 0.3;
297
305
  }
306
+ .selected{
307
+ background: var(--input-bg);
308
+ }
298
309
  </style>
299
310
 
300
311
  <style>