@dao-style/core 0.5.0 → 0.5.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.
@@ -24,6 +24,10 @@ declare const _default: import("vue").DefineComponent<{
24
24
  type: BooleanConstructor;
25
25
  default: boolean;
26
26
  };
27
+ noAnimation: {
28
+ type: BooleanConstructor;
29
+ default: boolean;
30
+ };
27
31
  }, {
28
32
  realTrigger: import("vue").ComputedRef<"manual" | PopperTrigger | PopperTrigger[]>;
29
33
  realOffset: import("vue").ComputedRef<number>;
@@ -35,17 +39,20 @@ declare const _default: import("vue").DefineComponent<{
35
39
  placement?: unknown;
36
40
  offset?: unknown;
37
41
  visible?: unknown;
42
+ noAnimation?: unknown;
38
43
  } & {
39
44
  offset: number;
40
45
  placement: Placement;
41
46
  appendTo: string | false | HTMLElement;
42
47
  trigger: "manual" | PopperTrigger | PopperTrigger[];
43
48
  visible: boolean;
49
+ noAnimation: boolean;
44
50
  } & {}>, {
45
51
  offset: number;
46
52
  placement: Placement;
47
53
  appendTo: string | false | HTMLElement;
48
54
  trigger: "manual" | PopperTrigger | PopperTrigger[];
49
55
  visible: boolean;
56
+ noAnimation: boolean;
50
57
  }>;
51
58
  export default _default;
@@ -7,6 +7,10 @@ declare const _default: import("vue").DefineComponent<{
7
7
  type: import("vue").PropType<boolean>;
8
8
  default: boolean;
9
9
  };
10
+ wrapperType: {
11
+ type: import("vue").PropType<"text" | "footer" | "switch" | "radio" | "checkbox" | undefined>;
12
+ default: undefined;
13
+ };
10
14
  paddingTop: {
11
15
  type: import("vue").PropType<string | number>;
12
16
  default: number;
@@ -39,9 +43,23 @@ declare const _default: import("vue").DefineComponent<{
39
43
  'is-required': boolean;
40
44
  }>;
41
45
  showLabel: import("vue").ComputedRef<string | boolean | import("vue").Slot>;
46
+ formClassNames: {
47
+ readonly text: {
48
+ readonly helper: "dao-form-item__helper-text";
49
+ readonly error: "dao-form-item__error-message";
50
+ };
51
+ readonly wrapper: {
52
+ readonly text: "dao-form-item__text-wrapper";
53
+ readonly radio: "dao-form-item__radio-wrapper";
54
+ readonly checkbox: "dao-form-item__checkbox-wrapper";
55
+ readonly switch: "dao-form-item__switch-wrapper";
56
+ readonly footer: "dao-form-item__footer-wrapper";
57
+ };
58
+ };
42
59
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
43
60
  label?: unknown;
44
61
  required?: unknown;
62
+ wrapperType?: unknown;
45
63
  paddingTop?: unknown;
46
64
  paddingBottom?: unknown;
47
65
  labelWidth?: unknown;
@@ -53,10 +71,13 @@ declare const _default: import("vue").DefineComponent<{
53
71
  paddingTop: string | number;
54
72
  paddingBottom: string | number;
55
73
  iconMessage: string;
56
- } & {}>, {
74
+ } & {
75
+ wrapperType?: "text" | "footer" | "switch" | "radio" | "checkbox" | undefined;
76
+ }>, {
57
77
  required: boolean;
58
78
  label: string;
59
79
  labelWidth: string;
80
+ wrapperType: "text" | "footer" | "switch" | "radio" | "checkbox" | undefined;
60
81
  paddingTop: string | number;
61
82
  paddingBottom: string | number;
62
83
  iconMessage: string;
@@ -37,6 +37,10 @@ export declare const formItemProps: {
37
37
  type: PropType<boolean>;
38
38
  default: boolean;
39
39
  };
40
+ wrapperType: {
41
+ type: PropType<"text" | "footer" | "switch" | "radio" | "checkbox" | undefined>;
42
+ default: undefined;
43
+ };
40
44
  paddingTop: {
41
45
  type: PropType<string | number>;
42
46
  default: number;
@@ -575,6 +575,8 @@ const navSubKey = Symbol("subNav");
575
575
  const breadcrumbKey = Symbol("breadcrumbKey");
576
576
  const ToggleItemKey = Symbol("toggleItem");
577
577
  const ExpansionStateKey = Symbol("expansionProps");
578
+ const DialogConfirmKey = Symbol("dialogConfirm");
579
+ const DialogCancelKey = Symbol("dialogCancel");
578
580
  var checkbox_vue_vue_type_style_index_0_lang = "";
579
581
  const modelValueAny = [String, Number, Boolean, BigInt, Symbol, Object, Set, Array];
580
582
  function getUnrefItem(set, item) {
@@ -3112,6 +3114,8 @@ const _sfc_main$C = defineComponent({
3112
3114
  onAfterLeave();
3113
3115
  }
3114
3116
  });
3117
+ provide(DialogConfirmKey, onConfirm);
3118
+ provide(DialogCancelKey, onCancel);
3115
3119
  return {
3116
3120
  computedPaddingTop,
3117
3121
  computedPaddingBottom,
@@ -3170,7 +3174,7 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
3170
3174
  renderSlot(_ctx.$slots, "after-title")
3171
3175
  ]),
3172
3176
  default: withCtx(() => [
3173
- renderSlot(_ctx.$slots, "header")
3177
+ renderSlot(_ctx.$slots, "header", { onCancel: _ctx.onCancel })
3174
3178
  ]),
3175
3179
  _: 3
3176
3180
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
@@ -3187,7 +3191,10 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
3187
3191
  onCancel: _ctx.onCancel
3188
3192
  }, {
3189
3193
  default: withCtx(() => [
3190
- renderSlot(_ctx.$slots, "footer")
3194
+ renderSlot(_ctx.$slots, "footer", {
3195
+ onConfirm: _ctx.onConfirm,
3196
+ onCancel: _ctx.onCancel
3197
+ })
3191
3198
  ]),
3192
3199
  _: 3
3193
3200
  }, 8, ["text-confirm", "text-cancel", "confirm-disabled", "confirm-loading", "onConfirm", "onCancel"])) : createCommentVNode("", true)
@@ -3272,7 +3279,8 @@ const _sfc_main$B = defineComponent({
3272
3279
  name: "DaoDrawer",
3273
3280
  components: {
3274
3281
  DaoButton,
3275
- DaoActionIcon
3282
+ DaoActionIcon,
3283
+ DaoEllipsis
3276
3284
  },
3277
3285
  props: drawerProps,
3278
3286
  emits: ["update:modelValue", "close", "confirm"],
@@ -3398,6 +3406,7 @@ const _hoisted_5$7 = {
3398
3406
  };
3399
3407
  const _hoisted_6$5 = { class: "dao-drawer__footer-group" };
3400
3408
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
3409
+ const _component_dao_ellipsis = resolveComponent("dao-ellipsis");
3401
3410
  const _component_dao_action_icon = resolveComponent("dao-action-icon");
3402
3411
  const _component_dao_button = resolveComponent("dao-button");
3403
3412
  return openBlock(), createElementBlock("div", null, [
@@ -3433,7 +3442,12 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
3433
3442
  !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
3434
3443
  renderSlot(_ctx.$slots, "header", {}, () => [
3435
3444
  createElementVNode("div", _hoisted_3$b, [
3436
- createElementVNode("span", null, toDisplayString(_ctx.title), 1),
3445
+ createVNode(_component_dao_ellipsis, { class: "dao-drawer__header--title-main" }, {
3446
+ default: withCtx(() => [
3447
+ createTextVNode(toDisplayString(_ctx.title), 1)
3448
+ ]),
3449
+ _: 1
3450
+ }),
3437
3451
  !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_action_icon, {
3438
3452
  key: 0,
3439
3453
  class: "dao-action-icon--close",
@@ -3509,6 +3523,10 @@ const _sfc_main$A = defineComponent({
3509
3523
  visible: {
3510
3524
  type: Boolean,
3511
3525
  default: false
3526
+ },
3527
+ noAnimation: {
3528
+ type: Boolean,
3529
+ default: false
3512
3530
  }
3513
3531
  },
3514
3532
  setup(props) {
@@ -3550,7 +3568,8 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
3550
3568
  "visible-arrow": false,
3551
3569
  offset: _ctx.realOffset,
3552
3570
  "model-value": _ctx.visible,
3553
- transition: "dao-fade-slide-default"
3571
+ transition: _ctx.noAnimation ? "" : "dao-fade-slide-default",
3572
+ delay: _ctx.noAnimation ? 0 : void 0
3554
3573
  }, {
3555
3574
  content: withCtx(() => [
3556
3575
  renderSlot(_ctx.$slots, "menu")
@@ -3561,7 +3580,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
3561
3580
  ])
3562
3581
  ]),
3563
3582
  _: 3
3564
- }, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
3583
+ }, 8, ["placement", "append-to", "trigger", "offset", "model-value", "transition", "delay"]);
3565
3584
  }
3566
3585
  var DaoDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$z]]);
3567
3586
  var dropdownMenu_vue_vue_type_style_index_0_lang = "";
@@ -3979,6 +3998,10 @@ const formItemProps = {
3979
3998
  type: Boolean,
3980
3999
  default: false
3981
4000
  },
4001
+ wrapperType: {
4002
+ type: String,
4003
+ default: void 0
4004
+ },
3982
4005
  paddingTop: {
3983
4006
  type: [Number, String],
3984
4007
  default: 0
@@ -4055,7 +4078,8 @@ const _sfc_main$u = defineComponent({
4055
4078
  labelStyle,
4056
4079
  contentStyle,
4057
4080
  formItemClass,
4058
- showLabel
4081
+ showLabel,
4082
+ formClassNames
4059
4083
  };
4060
4084
  }
4061
4085
  });
@@ -4097,7 +4121,12 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
4097
4121
  class: "dao-form-item__content",
4098
4122
  style: normalizeStyle(_ctx.contentStyle)
4099
4123
  }, [
4100
- renderSlot(_ctx.$slots, "default")
4124
+ _ctx.wrapperType ? (openBlock(), createElementBlock("div", {
4125
+ key: 0,
4126
+ class: normalizeClass(_ctx.formClassNames.wrapper[_ctx.wrapperType])
4127
+ }, [
4128
+ renderSlot(_ctx.$slots, "default")
4129
+ ], 2)) : renderSlot(_ctx.$slots, "default", { key: 1 })
4101
4130
  ], 4)
4102
4131
  ], 2);
4103
4132
  }
@@ -6859,7 +6888,7 @@ const _sfc_main$8 = defineComponent({
6859
6888
  const daoInputSearchRef = ref();
6860
6889
  const type = computed(() => searchText.value.includes(":") ? "value" : "key");
6861
6890
  const searchKey = computed(() => searchText.value.split(":")[0]);
6862
- const searchValue = computed(() => searchText.value.split(":")[1].trim());
6891
+ const searchValue = computed(() => searchText.value.slice(searchText.value.indexOf(":") + 1).trim());
6863
6892
  const selectedKey = computed(() => {
6864
6893
  if (type.value === "key") {
6865
6894
  return void 0;
@@ -6870,8 +6899,6 @@ const _sfc_main$8 = defineComponent({
6870
6899
  emit("search");
6871
6900
  searchText.value = "";
6872
6901
  visible.value = false;
6873
- daoInputSearchRef.value.input.focus();
6874
- daoInputSearchRef.value.input.click();
6875
6902
  };
6876
6903
  const singleHasChose = (searchOption) => {
6877
6904
  var _a2;
@@ -7024,7 +7051,8 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
7024
7051
  "append-to": false,
7025
7052
  trigger: "manual",
7026
7053
  visible: _ctx.visible && !!(_ctx.filteredKeys.length || _ctx.filteredValues.length),
7027
- placement: "bottom-start"
7054
+ placement: "bottom-start",
7055
+ "no-animation": ""
7028
7056
  }, {
7029
7057
  menu: withCtx(() => [
7030
7058
  createVNode(_component_dao_dropdown_menu, null, {
@@ -7244,7 +7272,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
7244
7272
  }), 128))
7245
7273
  ], 64);
7246
7274
  }), 128)),
7247
- createElementVNode("span", {
7275
+ createElementVNode("div", {
7248
7276
  class: "dao-toolbar__clear",
7249
7277
  onClick: _cache[3] || (_cache[3] = (...args) => _ctx.clearFilter && _ctx.clearFilter(...args))
7250
7278
  }, toDisplayString(_ctx.t("core.toolbar.clear")), 1)
@@ -8135,8 +8163,9 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
8135
8163
  createVNode(_component_dao_checkbox, {
8136
8164
  checked: _ctx.global.checked,
8137
8165
  indeterminate: _ctx.global.indeterminate,
8166
+ disabled: !_ctx.selectableRows.size,
8138
8167
  onChange: _ctx.toggleSelectedAll
8139
- }, null, 8, ["checked", "indeterminate", "onChange"])
8168
+ }, null, 8, ["checked", "indeterminate", "disabled", "onChange"])
8140
8169
  ])) : createCommentVNode("", true),
8141
8170
  _ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_6)) : createCommentVNode("", true),
8142
8171
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
@@ -9301,4 +9330,4 @@ var index = {
9301
9330
  install,
9302
9331
  locale
9303
9332
  };
9304
- export { DaoActionIcon as ActionIcon, breadcrumb as Breadcrumb, DaoBreadcrumbItem as BreadcrumbItem, DaoButton as Button, buttonGroup as ButtonGroup, card as Card, cardItem as CardItem, DaoCheckbox as Checkbox, checkboxGroup as CheckboxGroup, DaoBatchBar, DaoEllipsis, dialog as Dialog, DialogFooter, DialogHeader, drawer as Drawer, DaoDropdown as Dropdown, DaoDropdownItem as DropdownItem, DaoDropdownMenu as DropdownMenu, errorText as ErrorText, expansion as Expansion, expansionItem as ExpansionItem, form as Form, formGroup as FormGroup, formItem as FormItem, header as Header, helperText as HelperText, DaoIcon as Icon, DaoInput as Input, message as Message, nav as Nav, navHead as NavHead, navItem as NavItem, navSub as NavSub, DaoOption as Option, DaoPagination as Pagination, _sfc_main$G as Popover, DaoPopper as Popper, progress as Progress, radio as Radio, radioGroup as RadioGroup, DaoSelect as Select, _switch as Switch, tabItem as TabItem, _sfc_main$4 as TabNav, table as Table, tabs as Tabs, DaoTag as Tag, _sfc_main$Q as TextButton, DaoToolbar as Toolbar, _sfc_main$H as Tooltip, transfer as Transfer, transferPanel as TransferPanel, index as default, formClassNames, formItemProps, formKey, formProps };
9333
+ export { DaoActionIcon as ActionIcon, breadcrumb as Breadcrumb, DaoBreadcrumbItem as BreadcrumbItem, DaoButton as Button, buttonGroup as ButtonGroup, card as Card, cardItem as CardItem, DaoCheckbox as Checkbox, checkboxGroup as CheckboxGroup, DaoBatchBar, DaoEllipsis, dialog as Dialog, DialogCancelKey, DialogConfirmKey, DialogFooter, DialogHeader, drawer as Drawer, DaoDropdown as Dropdown, DaoDropdownItem as DropdownItem, DaoDropdownMenu as DropdownMenu, errorText as ErrorText, expansion as Expansion, expansionItem as ExpansionItem, ExpansionStateKey, form as Form, formGroup as FormGroup, formItem as FormItem, header as Header, helperText as HelperText, DaoIcon as Icon, DaoInput as Input, message as Message, nav as Nav, navHead as NavHead, navItem as NavItem, navSub as NavSub, DaoOption as Option, DaoPagination as Pagination, _sfc_main$G as Popover, DaoPopper as Popper, progress as Progress, radio as Radio, radioGroup as RadioGroup, DaoSelect as Select, _switch as Switch, tabItem as TabItem, _sfc_main$4 as TabNav, table as Table, tabs as Tabs, DaoTag as Tag, _sfc_main$Q as TextButton, ToggleItemKey, DaoToolbar as Toolbar, _sfc_main$H as Tooltip, transfer as Transfer, transferPanel as TransferPanel, addTabFnKey, breadcrumbKey, checkboxGroupChangeFnKey, checkboxGroupModelValueKey, checkboxUpdateGroupModelValueFnKey, index as default, formClassNames, formItemProps, formKey, formProps, navRootKey, navSubKey, placements$2 as placements, radioGroupKey, removeTabFnKey, tabModelValueKey };