@xlui/xux-ui 0.3.0 → 1.1.0

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/package.json CHANGED
@@ -1,63 +1,70 @@
1
- {
2
- "name": "@xlui/xux-ui",
3
- "version": "0.3.0",
4
- "description": "VUE3 电商组件库",
5
- "author": "leheya",
6
- "license": "MIT",
7
- "main": "./dist/index.js",
8
- "module": "./dist/index.mjs",
9
- "types": "./dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "import": "./dist/index.mjs",
14
- "require": "./dist/index.js"
15
- },
16
- "./dist/index.css": "./dist/index.css",
17
- "./style.css": "./dist/index.css",
18
- "./*": {
19
- "types": "./dist/*.d.ts",
20
- "import": "./dist/*.mjs",
21
- "require": "./dist/*.js"
22
- }
23
- },
24
- "files": [
25
- "dist",
26
- "src",
27
- "README.md"
28
- ],
29
- "keywords": [
30
- "vue3",
31
- "vue3-ui",
32
- "components",
33
- "ui-library",
34
- "ecommerce",
35
- "电商组件",
36
- "ui-components"
37
- ],
38
- "repository": {
39
- "type": "git",
40
- "url": "https://gitee.com/leheya/xux"
41
- },
42
- "homepage": "https://gitee.com/leheya/xux",
43
- "bugs": {
44
- "url": "https://gitee.com/leheya/xux/issues"
45
- },
46
- "dependencies": {
47
- "dayjs": "^1.11.10"
48
- },
49
- "peerDependencies": {
50
- "vue": "^3.3.0"
51
- },
52
- "devDependencies": {
53
- "@vitejs/plugin-vue": "^5.0.3",
54
- "typescript": "^5.3.3",
55
- "vite": "^5.0.11",
56
- "vue": "^3.4.15",
57
- "vue-tsc": "^1.8.27"
58
- },
59
- "scripts": {
60
- "dev": "vite build --watch",
61
- "build": "vite build"
62
- }
63
- }
1
+ {
2
+ "name": "@xlui/xux-ui",
3
+ "version": "1.1.0",
4
+ "description": "VUE3 电商组件库",
5
+ "author": "leheya",
6
+ "license": "MIT",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.js"
15
+ },
16
+ "./dist/index.css": "./dist/index.css",
17
+ "./style.css": "./dist/index.css",
18
+ "./*": {
19
+ "types": "./dist/*.d.ts",
20
+ "import": "./dist/*.mjs",
21
+ "require": "./dist/*.js"
22
+ }
23
+ },
24
+ "files": [
25
+ "dist",
26
+ "src",
27
+ "README.md"
28
+ ],
29
+ "scripts": {
30
+ "dev": "vite build --watch",
31
+ "build": "vite build",
32
+ "prepublishOnly": "pnpm build"
33
+ },
34
+ "keywords": [
35
+ "vue3",
36
+ "vue3-ui",
37
+ "components",
38
+ "ui-library",
39
+ "ecommerce",
40
+ "电商组件",
41
+ "ui-components"
42
+ ],
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://gitee.com/leheya/xux"
46
+ },
47
+ "homepage": "https://gitee.com/leheya/xux",
48
+ "bugs": {
49
+ "url": "https://gitee.com/leheya/xux/issues"
50
+ },
51
+ "dependencies": {
52
+ "axios": "^1.12.2",
53
+ "dayjs": "^1.11.10",
54
+ "element-china-area-data": "^6.1.0",
55
+ "glob": "^11.0.3",
56
+ "pinyin": "^4.0.0",
57
+ "qrcode": "^1.5.4"
58
+ },
59
+ "peerDependencies": {
60
+ "vue": "^3.3.0"
61
+ },
62
+ "devDependencies": {
63
+ "@types/qrcode": "^1.5.5",
64
+ "@vitejs/plugin-vue": "^5.0.3",
65
+ "typescript": "^5.3.3",
66
+ "vite": "^5.0.11",
67
+ "vue": "^3.4.15",
68
+ "vue-tsc": "^1.8.27"
69
+ }
70
+ }
@@ -25,7 +25,7 @@
25
25
  </span>
26
26
 
27
27
  <!-- 按钮内容 -->
28
- <span class="x-btn-content">
28
+ <span class="x-btn-content ">
29
29
  <slot />
30
30
  </span>
31
31
 
@@ -358,15 +358,15 @@ function handleMouseDown(event: MouseEvent) {
358
358
  .x-btn-ghost.x-btn-primary {
359
359
  background-color: transparent;
360
360
  background: transparent;
361
- border-color: var(--x-color-primary, #ff6b35);
362
- color: var(--x-color-primary, #ff6b35);
361
+ border-color: var(--x-color-primary, #1a1a1a);
362
+ color: var(--x-color-primary, #1a1a1a);
363
363
  box-shadow: none;
364
364
  }
365
365
 
366
366
  .x-btn-ghost.x-btn-primary:hover:not(.x-btn-disabled):not(.x-btn-loading) {
367
- background-color: rgba(255, 107, 53, 0.1);
368
- background: rgba(255, 107, 53, 0.1);
369
- border-color: var(--x-color-primary, #ff6b35);
367
+ background-color: rgba(26, 26, 26, 0.1);
368
+ background: rgba(26, 26, 26, 0.1);
369
+ border-color: var(--x-color-primary, #1a1a1a);
370
370
  box-shadow: none;
371
371
  }
372
372
 
@@ -17,12 +17,19 @@
17
17
  </div>
18
18
 
19
19
  <!-- 选择器面板 -->
20
- <div v-if="isOpen" class="datetime-panel" :class="panelPosition">
20
+ <Transition
21
+ enter-active-class="panel-enter-active"
22
+ enter-from-class="panel-enter-from"
23
+ enter-to-class="panel-enter-to"
24
+ leave-active-class="panel-leave-active"
25
+ leave-from-class="panel-leave-from"
26
+ leave-to-class="panel-leave-to"
27
+ >
28
+ <div v-if="isOpen" class="datetime-panel" :class="panelPosition">
21
29
  <!-- 头部 -->
22
30
  <div class="datetime-header">
23
31
  <div class="datetime-title">{{ title }}</div>
24
32
  <XButton icon="mdi:close" size="small" @click="closePicker">
25
- <Icon icon="mdi:close" />
26
33
  </XButton>
27
34
  </div>
28
35
 
@@ -140,6 +147,7 @@
140
147
  </XButton>
141
148
  </div>
142
149
  </div>
150
+ </Transition>
143
151
 
144
152
  </div>
145
153
  </template>
@@ -445,31 +453,34 @@ export interface DateTimePickerProps {
445
453
  position: relative;
446
454
  display: flex;
447
455
  align-items: center;
448
- border: 1px solid #d1d5db;
456
+ border: 1px solid #e5e7eb;
449
457
  border-radius: 0.5rem;
450
458
  background-color: #ffffff;
451
- transition: all 0.2s ease;
459
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
452
460
  cursor: pointer;
461
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
453
462
  }
454
463
 
455
464
  .datetime-input-wrapper:hover {
456
465
  border-color: #1a1a1a;
466
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
457
467
  }
458
468
 
459
469
  .datetime-input-wrapper:focus-within {
460
470
  border-color: #1a1a1a;
461
- box-shadow: 0 0 0 1px #1a1a1a;
471
+ box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
462
472
  }
463
473
 
464
474
  .datetime-input {
465
475
  flex: 1;
466
- padding: 0.75rem 1rem;
476
+ padding: 0.625rem 0.875rem;
467
477
  border: none;
468
478
  outline: none;
469
479
  background: transparent;
470
480
  font-size: 0.875rem;
471
481
  color: #1a1a1a;
472
482
  cursor: pointer;
483
+ line-height: 1.5;
473
484
  }
474
485
 
475
486
  .datetime-input::placeholder {
@@ -480,10 +491,15 @@ export interface DateTimePickerProps {
480
491
  display: flex;
481
492
  align-items: center;
482
493
  justify-content: center;
483
- width: 2rem;
484
- height: 2rem;
494
+ width: 1.75rem;
495
+ height: 1.75rem;
485
496
  color: #6b7280;
486
497
  margin-right: 0.5rem;
498
+ transition: color 0.15s ease;
499
+ }
500
+
501
+ .datetime-input-wrapper:hover .datetime-icon {
502
+ color: #1a1a1a;
487
503
  }
488
504
 
489
505
  /* 尺寸变体 */
@@ -527,20 +543,49 @@ export interface DateTimePickerProps {
527
543
  background: #ffffff;
528
544
  border: 1px solid #e5e7eb;
529
545
  border-radius: 0.75rem;
530
- box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
546
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
531
547
  overflow: hidden;
532
- max-height: 400px;
533
- overflow-y: auto;
548
+ min-width: 320px;
549
+ backdrop-filter: blur(8px);
534
550
  }
535
551
 
536
552
  .panel-bottom {
537
553
  top: 100%;
538
- margin-top: 0.25rem;
554
+ margin-top: 0.5rem;
539
555
  }
540
556
 
541
557
  .panel-top {
542
558
  bottom: 100%;
543
- margin-bottom: 0.25rem;
559
+ margin-bottom: 0.5rem;
560
+ }
561
+
562
+ /* 面板动画 */
563
+ .panel-enter-active {
564
+ transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
565
+ }
566
+
567
+ .panel-leave-active {
568
+ transition: all 0.15s cubic-bezier(0.4, 0, 1, 1);
569
+ }
570
+
571
+ .panel-enter-from {
572
+ opacity: 0;
573
+ transform: translateY(-8px) scale(0.96);
574
+ }
575
+
576
+ .panel-enter-to {
577
+ opacity: 1;
578
+ transform: translateY(0) scale(1);
579
+ }
580
+
581
+ .panel-leave-from {
582
+ opacity: 1;
583
+ transform: translateY(0) scale(1);
584
+ }
585
+
586
+ .panel-leave-to {
587
+ opacity: 0;
588
+ transform: translateY(-8px) scale(0.96);
544
589
  }
545
590
 
546
591
  /* 头部 */
@@ -548,15 +593,16 @@ export interface DateTimePickerProps {
548
593
  display: flex;
549
594
  align-items: center;
550
595
  justify-content: space-between;
551
- padding: 1rem;
552
- border-bottom: 1px solid #e5e7eb;
553
- background-color: #f9fafb;
596
+ padding: 0.875rem 1rem;
597
+ border-bottom: 1px solid #f3f4f6;
598
+ background: linear-gradient(to bottom, #fafafa, #ffffff);
554
599
  }
555
600
 
556
601
  .datetime-title {
557
602
  font-weight: 600;
558
603
  color: #1a1a1a;
559
- font-size: 1rem;
604
+ font-size: 0.9375rem;
605
+ letter-spacing: -0.01em;
560
606
  }
561
607
 
562
608
  .datetime-close {
@@ -676,20 +722,24 @@ export interface DateTimePickerProps {
676
722
  display: flex;
677
723
  align-items: center;
678
724
  justify-content: center;
679
- height: 2.5rem;
680
- font-size: 0.875rem;
681
- color: #1a1a1a;
725
+ height: 2.25rem;
726
+ font-size: 0.8125rem;
727
+ color: #374151;
682
728
  cursor: pointer;
683
- border-radius: 0.375rem;
684
- transition: all 0.2s ease;
729
+ border-radius: 0.5rem;
730
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
731
+ font-weight: 500;
732
+ position: relative;
685
733
  }
686
734
 
687
- .date-cell:hover:not(.date-disabled) {
688
- background-color: #f3f4f6;
735
+ .date-cell:hover:not(.date-disabled):not(.date-selected) {
736
+ background-color: #f9fafb;
737
+ color: #1a1a1a;
738
+ transform: scale(1.05);
689
739
  }
690
740
 
691
741
  .date-other-month {
692
- color: #9ca3af;
742
+ color: #d1d5db;
693
743
  }
694
744
 
695
745
  .date-today {
@@ -698,19 +748,38 @@ export interface DateTimePickerProps {
698
748
  font-weight: 600;
699
749
  }
700
750
 
751
+ .date-today::after {
752
+ content: '';
753
+ position: absolute;
754
+ bottom: 0.25rem;
755
+ left: 50%;
756
+ transform: translateX(-50%);
757
+ width: 0.25rem;
758
+ height: 0.25rem;
759
+ border-radius: 50%;
760
+ background-color: #f59e0b;
761
+ }
762
+
701
763
  .date-selected {
702
764
  background-color: #1a1a1a;
703
765
  color: #ffffff;
704
766
  font-weight: 600;
767
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
768
+ }
769
+
770
+ .date-selected:hover {
771
+ transform: scale(1.05);
772
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
705
773
  }
706
774
 
707
775
  .date-disabled {
708
- color: #d1d5db;
776
+ color: #e5e7eb;
709
777
  cursor: not-allowed;
710
778
  }
711
779
 
712
780
  .date-disabled:hover {
713
781
  background-color: transparent;
782
+ transform: none;
714
783
  }
715
784
 
716
785
  /* 时间选择器 */
@@ -784,38 +853,51 @@ export interface DateTimePickerProps {
784
853
 
785
854
  .time-slider {
786
855
  width: 100%;
787
- height: 0.5rem;
856
+ height: 0.375rem;
788
857
  border-radius: 0.25rem;
789
- background: #e5e7eb;
858
+ background: linear-gradient(to right, #e5e7eb 0%, #e5e7eb 100%);
790
859
  outline: none;
791
860
  cursor: pointer;
792
861
  -webkit-appearance: none;
793
862
  appearance: none;
863
+ position: relative;
794
864
  }
795
865
 
796
866
  .time-slider::-webkit-slider-thumb {
797
867
  -webkit-appearance: none;
798
868
  appearance: none;
799
- width: 1.25rem;
800
- height: 1.25rem;
869
+ width: 1rem;
870
+ height: 1rem;
801
871
  border-radius: 50%;
802
872
  background: #1a1a1a;
803
873
  cursor: pointer;
804
- transition: all 0.2s ease;
874
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
875
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
805
876
  }
806
877
 
807
878
  .time-slider::-webkit-slider-thumb:hover {
808
- transform: scale(1.1);
879
+ transform: scale(1.15);
880
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
881
+ }
882
+
883
+ .time-slider::-webkit-slider-thumb:active {
884
+ transform: scale(1.05);
809
885
  }
810
886
 
811
887
  .time-slider::-moz-range-thumb {
812
- width: 1.25rem;
813
- height: 1.25rem;
888
+ width: 1rem;
889
+ height: 1rem;
814
890
  border-radius: 50%;
815
891
  background: #1a1a1a;
816
892
  cursor: pointer;
817
893
  border: none;
818
- transition: all 0.2s ease;
894
+ transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
895
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
896
+ }
897
+
898
+ .time-slider::-moz-range-thumb:hover {
899
+ transform: scale(1.15);
900
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
819
901
  }
820
902
 
821
903
  .slider-value {
@@ -828,10 +910,10 @@ export interface DateTimePickerProps {
828
910
  /* 底部操作 */
829
911
  .datetime-footer {
830
912
  display: flex;
831
- gap: 0.75rem;
832
- padding: 1rem;
833
- border-top: 1px solid #e5e7eb;
834
- background-color: #f9fafb;
913
+ gap: 0.625rem;
914
+ padding: 0.875rem 1rem;
915
+ border-top: 1px solid #f3f4f6;
916
+ background: linear-gradient(to top, #fafafa, #ffffff);
835
917
  }
836
918
 
837
919
  .btn {