yc-design-vue 2.3.2 → 2.3.3

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.
@@ -164,7 +164,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
164
164
  (_a = timePickerRef.value) == null ? void 0 : _a.jump(newDate, oldDate);
165
165
  },
166
166
  {
167
- immediate: true
167
+ immediate: true,
168
+ deep: true
168
169
  }
169
170
  );
170
171
  return (_ctx, _cache) => {
@@ -182,7 +183,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
182
183
  "show-now": "",
183
184
  onConfirm: unref(handleConfirm),
184
185
  onShortcutSelect: unref(handleShortcut),
185
- onNowClick: unref(handleNowClick)
186
+ onNowClick: _cache[9] || (_cache[9] = ($event) => {
187
+ unref(handleNowClick)((val, oldVal) => {
188
+ var _a;
189
+ (_a = timePickerRef.value) == null ? void 0 : _a.jump(unref(dayjs)(val), oldVal ? unref(dayjs)(oldVal) : void 0);
190
+ });
191
+ })
186
192
  }, createSlots({
187
193
  default: withCtx(() => {
188
194
  var _a, _b, _c, _d, _e, _f, _g;
@@ -313,7 +319,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
313
319
  ]),
314
320
  key: "0"
315
321
  } : void 0
316
- ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect", "onNowClick"])
322
+ ]), 1032, ["locale", "preview-shortcut", "shortcuts", "shortcuts-position", "confirm-btn-disabled", "show-confirm-btn", "show-footer", "onConfirm", "onShortcutSelect"])
317
323
  ]),
318
324
  _: 3
319
325
  }),
@@ -228,8 +228,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
228
228
  "is-today": unref(isToday)(date, "week"),
229
229
  hoverable: false,
230
230
  class: normalizeClass({
231
- "yc-week-picker-cell-first": !i,
232
- "yc-week-picker-cell-last": i == time.length - 1
231
+ "yc-week-picker-cell-first": !k,
232
+ "yc-week-picker-cell-last": k == time.length - 1
233
233
  })
234
234
  }, createSlots({ _: 2 }, [
235
235
  $slots.cell ? {
@@ -34,7 +34,7 @@ export default function usePicker(params: {
34
34
  };
35
35
  getWeeksOfMonth: (year: number, month: number, startOfWeek?: import('..').DayStartOfWeek) => import('../../_shared/utils').WeekData[];
36
36
  getDaysOfMonth: (year: number, month: number, dayStartOfWeek?: number) => import('../../_shared/utils').DayData[][];
37
- handleNowClick: () => void;
37
+ handleNowClick: (onSet: (value: Date, oldValue: Date | "") => void) => void;
38
38
  handleSelect: (date: Date) => void;
39
39
  handleConfirm: () => Promise<void>;
40
40
  handleShortcut: (shortcut: ShortcutType, hover: boolean) => void;
@@ -132,8 +132,11 @@ function usePicker(params) {
132
132
  await sleep(0);
133
133
  computedVisible.value = false;
134
134
  };
135
- const handleNowClick = () => {
136
- computedValue.value = /* @__PURE__ */ new Date();
135
+ const handleNowClick = (onSet) => {
136
+ const value = /* @__PURE__ */ new Date();
137
+ const oldValue = getDateFromFormat(computedValue.value);
138
+ computedValue.value = value;
139
+ onSet(value, oldValue);
137
140
  if (showTime == null ? void 0 : showTime.value) return;
138
141
  isConfirm = true;
139
142
  computedVisible.value = false;
@@ -1 +1 @@
1
- .yc-picker{position:relative;padding:4px 11px 4px 4px;background-color:var(--color-fill-2);border:1px solid transparent;border-radius:var(--border-radius-small);transition:all .1s cubic-bezier(0, 0, 1, 1);line-height:1.5715;display:inline-flex;align-items:center}.yc-picker:not(.yc-picker-disabled):not(.yc-picker-focus):hover{background-color:var(--color-fill-3);border-color:transparent}.yc-picker .yc-picker-has-prefix,.yc-picker .yc-picker-input.yc-picker-suffix,.yc-picker .yc-picker-separator{flex-shrink:0}.yc-picker .yc-picker-prefix{margin-right:4px;font-size:14px;color:var(--color-text-2)}.yc-picker .yc-picker-input{flex:1;height:100%;display:flex;align-items:center}.yc-picker .yc-picker-input input{height:100%;width:100%;padding:0;padding-left:8px;background-color:transparent;border:none;outline:none;text-align:left;color:var(--color-text-2);transition:all .1s cubic-bezier(0, 0, 1, 1)}.yc-picker .yc-picker-input input::placeholder{color:var(--color-text-3)}.yc-picker .yc-picker-separator{min-width:10px;padding:0 8px;color:var(--color-text-3)}.yc-picker .yc-picker-suffix{margin-left:4px;display:flex;align-items:center}.yc-picker .yc-picker-suffix .yc-icon-button{display:none}.yc-picker .yc-picker-suffix .yc-picker-suffix-icon{color:var(--color-text-2);font-size:14px;display:flex;justify-content:center;align-items:center}.yc-picker-has-prefix{padding-left:12px}.yc-picker-allow-clear:hover .yc-picker-suffix .yc-icon-button{display:flex}.yc-picker-allow-clear:hover .yc-picker-suffix .yc-picker-suffix-icon{display:none}.yc-picker-focus{background-color:var(--color-bg-1);border-color:rgb(var(--primary-6));box-shadow:0 0 0 0 var(--color-primary-light-2)}.yc-picker-range .yc-picker-input-active input{background:var(--color-fill-2)}.yc-picker-error{background-color:var(--color-danger-light-1);border-color:transparent}.yc-picker-error:not(.yc-picker-disabled):not(.yc-picker-focus):hover{background-color:var(--color-danger-light-2)}.yc-picker-error.yc-picker-focus{background-color:var(--color-bg-2);border-color:rgb(var(--danger-6));box-shadow:0 0 0 0 var(--color-danger-light-2)}.yc-picker-disabled{cursor:not-allowed;color:var(--color-text-4);background-color:var(--color-fill-2);border-color:transparent}.yc-picker-disabled .yc-picker-input input{cursor:not-allowed}.yc-picker-disabled .yc-picker-input input::placeholder{color:var(--color-text-4)}.yc-picker-disabled .yc-picker-suffix .yc-picker-suffix-icon{color:var(--color-text-4)}.yc-picker-size-mini{height:24px}.yc-picker-size-mini input{font-size:12px}.yc-picker-size-small{height:28px}.yc-picker-size-small input{font-size:14px}.yc-picker-size-medium{height:32px}.yc-picker-size-medium input{font-size:14px}.yc-picker-size-large{height:36px}.yc-picker-size-large input{font-size:14px}.yc-timepicker-container{overflow:hidden;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:var(--border-radius-medium);box-shadow:0 2px 5px rgba(0,0,0,0.1)}.yc-timepicker-container .yc-timepicker{position:relative;display:flex;padding:0}.yc-timepicker-container .yc-timepicker .yc-timepicker-column{overflow:hidden;width:64px;height:224px}.yc-timepicker-container .yc-timepicker .yc-timepicker-column:not(:last-child){border-right:1px solid var(--color-neutral-3)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container{scroll-behavior:unset}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell{padding:4px 0;color:var(--color-text-1);font-weight:500;cursor:pointer}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell .yc-timepicker-cell-inner{height:24px;padding-left:24px;font-size:14px;line-height:24px}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell .yc-timepicker-cell-inner:hover{background-color:var(--color-fill-2)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell-selected .yc-timepicker-cell-inner{font-weight:500;background-color:var(--color-fill-2)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell-disabled{color:var(--color-text-4);cursor:not-allowed}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul::after{display:block;width:100%;height:192px;content:''}.yc-timepicker-container .yc-timepicker-footer-extra-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);color:var(--color-text-1);font-size:12px}.yc-timepicker-container .yc-timepicker-footer-btn-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);display:flex;justify-content:space-between}
1
+ .yc-picker{position:relative;padding:4px 11px 4px 4px;background-color:var(--color-fill-2);border:1px solid transparent;border-radius:var(--border-radius-small);transition:all .1s cubic-bezier(0, 0, 1, 1);line-height:1.5715;display:inline-flex;align-items:center}.yc-picker:not(.yc-picker-disabled):not(.yc-picker-focus):hover{background-color:var(--color-fill-3);border-color:transparent}.yc-picker .yc-picker-has-prefix,.yc-picker .yc-picker-input.yc-picker-suffix,.yc-picker .yc-picker-separator{flex-shrink:0}.yc-picker .yc-picker-prefix{margin-right:4px;font-size:14px;color:var(--color-text-2)}.yc-picker .yc-picker-input{flex:1;height:100%;display:flex;align-items:center}.yc-picker .yc-picker-input input{height:100%;width:100%;padding:0;padding-left:8px;background-color:transparent;border:none;outline:none;text-align:left;color:var(--color-text-2);transition:all .1s cubic-bezier(0, 0, 1, 1)}.yc-picker .yc-picker-input input::placeholder{color:var(--color-text-3)}.yc-picker .yc-picker-separator{min-width:10px;padding:0 8px;color:var(--color-text-3)}.yc-picker .yc-picker-suffix{margin-left:4px;display:flex;align-items:center}.yc-picker .yc-picker-suffix .yc-icon-button{display:none}.yc-picker .yc-picker-suffix .yc-picker-suffix-icon{color:var(--color-text-2);font-size:14px;display:flex;justify-content:center;align-items:center}.yc-picker-has-prefix{padding-left:12px}.yc-picker-allow-clear:hover .yc-picker-suffix .yc-icon-button{display:flex}.yc-picker-allow-clear:hover .yc-picker-suffix .yc-picker-suffix-icon{display:none}.yc-picker-focus{background-color:var(--color-bg-1);border-color:rgb(var(--primary-6));box-shadow:0 0 0 0 var(--color-primary-light-2)}.yc-picker-range .yc-picker-input-active input{background:var(--color-fill-2)}.yc-picker-error{background-color:var(--color-danger-light-1);border-color:transparent}.yc-picker-error:not(.yc-picker-disabled):not(.yc-picker-focus):hover{background-color:var(--color-danger-light-2)}.yc-picker-error.yc-picker-focus{background-color:var(--color-bg-2);border-color:rgb(var(--danger-6));box-shadow:0 0 0 0 var(--color-danger-light-2)}.yc-picker-disabled{cursor:not-allowed;color:var(--color-text-4);background-color:var(--color-fill-2);border-color:transparent}.yc-picker-disabled .yc-picker-input input{cursor:not-allowed}.yc-picker-disabled .yc-picker-input input::placeholder{color:var(--color-text-4)}.yc-picker-disabled .yc-picker-suffix .yc-picker-suffix-icon{color:var(--color-text-4)}.yc-picker-size-mini{height:24px}.yc-picker-size-mini input{font-size:12px}.yc-picker-size-small{height:28px}.yc-picker-size-small input{font-size:14px}.yc-picker-size-medium{height:32px}.yc-picker-size-medium input{font-size:14px}.yc-picker-size-large{height:36px}.yc-picker-size-large input{font-size:14px}.yc-timepicker-container{overflow:hidden;background-color:var(--color-bg-popup);border:1px solid var(--color-neutral-3);border-radius:var(--border-radius-medium);box-shadow:0 2px 5px rgba(0,0,0,0.1)}.yc-timepicker-container .yc-timepicker{position:relative;display:flex;padding:0}.yc-timepicker-container .yc-timepicker .yc-timepicker-column{overflow:hidden;width:64px;height:224px}.yc-timepicker-container .yc-timepicker .yc-timepicker-column:not(:last-child){border-right:1px solid var(--color-neutral-3)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container{scroll-behavior:unset}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell{padding:4px 0;color:var(--color-text-1);font-weight:500;cursor:pointer}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell .yc-timepicker-cell-inner{height:24px;padding-left:24px;font-size:14px;line-height:24px}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell .yc-timepicker-cell-inner:hover{background-color:var(--color-fill-2)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell.yc-timepicker-cell-selected .yc-timepicker-cell-inner{font-weight:500;background-color:var(--color-fill-2)}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell.yc-timepicker-cell-disabled{color:var(--color-text-4);cursor:not-allowed}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul .yc-timepicker-cell.yc-timepicker-cell-disabled .yc-timepicker-cell-inner:hover{background-color:transparent}.yc-timepicker-container .yc-timepicker .yc-timepicker-column .yc-scrollbar .yc-scrollbar-container ul::after{display:block;width:100%;height:192px;content:''}.yc-timepicker-container .yc-timepicker-footer-extra-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);color:var(--color-text-1);font-size:12px}.yc-timepicker-container .yc-timepicker-footer-btn-wrapper{padding:8px;border-top:1px solid var(--color-neutral-3);display:flex;justify-content:space-between}
@@ -10,8 +10,8 @@ import "../_shared/utils/time.js";
10
10
  /* empty css */
11
11
  /* empty css */
12
12
  /* empty css */
13
- import _sfc_main$3 from "../_shared/icons/IconCopy.vue.js";
14
- import _sfc_main$1 from "../_shared/icons/IconEdit.vue.js";
13
+ import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
14
+ import _sfc_main$1 from "../_shared/icons/IconEdit.vue2.js";
15
15
  import _sfc_main$2 from "../_shared/icons/IconInfo.vue.js";
16
16
  import Input from "../Input/index.js";
17
17
  import Tooltip from "../Tooltip/index.js";
@@ -1,27 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import "../../node_modules/b-tween/dist/b-tween.es.js";
3
- import "../../node_modules/dayjs/dayjs.min.js";
4
- import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../utils/dom.js";
6
- import "../utils/locale.js";
7
- import "../utils/time.js";
8
- /* empty css */
9
- /* empty css */
10
- import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
- /* empty css */
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "IconCopy",
14
- setup(__props) {
15
- return (_ctx, _cache) => {
16
- return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
- createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
19
- ])]),
20
- _: 1
21
- }, 16);
22
- };
23
- }
24
- });
1
+ import _sfc_main from "./IconCopy.vue2.js";
25
2
  export {
26
3
  _sfc_main as default
27
4
  };
@@ -1,4 +1,27 @@
1
- import _sfc_main from "./IconCopy.vue.js";
1
+ import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../utils/dom.js";
6
+ import "../utils/locale.js";
7
+ import "../utils/time.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
+ /* empty css */
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "IconCopy",
14
+ setup(__props) {
15
+ return (_ctx, _cache) => {
16
+ return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
+ createElementVNode("path", { d: "M20 6h18a2 2 0 0 1 2 2v22M8 16v24c0 1.105.891 2 1.996 2h20.007A1.99 1.99 0 0 0 32 40.008V15.997A1.997 1.997 0 0 0 30 14H10a2 2 0 0 0-2 2Z" }, null, -1)
19
+ ])]),
20
+ _: 1
21
+ }, 16);
22
+ };
23
+ }
24
+ });
2
25
  export {
3
26
  _sfc_main as default
4
27
  };
@@ -1,27 +1,4 @@
1
- import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
- import "../../node_modules/b-tween/dist/b-tween.es.js";
3
- import "../../node_modules/dayjs/dayjs.min.js";
4
- import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
- import "../utils/dom.js";
6
- import "../utils/locale.js";
7
- import "../utils/time.js";
8
- /* empty css */
9
- /* empty css */
10
- import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
- /* empty css */
12
- const _sfc_main = /* @__PURE__ */ defineComponent({
13
- __name: "IconEdit",
14
- setup(__props) {
15
- return (_ctx, _cache) => {
16
- return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
- default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
- createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
19
- ])]),
20
- _: 1
21
- }, 16);
22
- };
23
- }
24
- });
1
+ import _sfc_main from "./IconEdit.vue2.js";
25
2
  export {
26
3
  _sfc_main as default
27
4
  };
@@ -1,4 +1,27 @@
1
- import _sfc_main from "./IconEdit.vue.js";
1
+ import { defineComponent, createBlock, openBlock, unref, normalizeProps, guardReactiveProps, withCtx, createElementVNode } from "vue";
2
+ import "../../node_modules/b-tween/dist/b-tween.es.js";
3
+ import "../../node_modules/dayjs/dayjs.min.js";
4
+ import "../../node_modules/tinycolor2/esm/tinycolor.js";
5
+ import "../utils/dom.js";
6
+ import "../utils/locale.js";
7
+ import "../utils/time.js";
8
+ /* empty css */
9
+ /* empty css */
10
+ import _sfc_main$1 from "../components/Icon/index.vue3.js";
11
+ /* empty css */
12
+ const _sfc_main = /* @__PURE__ */ defineComponent({
13
+ __name: "IconEdit",
14
+ setup(__props) {
15
+ return (_ctx, _cache) => {
16
+ return openBlock(), createBlock(unref(_sfc_main$1), normalizeProps(guardReactiveProps(_ctx.$attrs)), {
17
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [
18
+ createElementVNode("path", { d: "m30.48 19.038 5.733-5.734a1 1 0 0 0 0-1.414l-5.586-5.586a1 1 0 0 0-1.414 0l-5.734 5.734m7 7L15.763 33.754a1 1 0 0 1-.59.286l-6.048.708a1 1 0 0 1-1.113-1.069l.477-6.31a1 1 0 0 1 .29-.631l14.7-14.7m7 7-7-7M6 42h36" }, null, -1)
19
+ ])]),
20
+ _: 1
21
+ }, 16);
22
+ };
23
+ }
24
+ });
2
25
  export {
3
26
  _sfc_main as default
4
27
  };