x-next 1.17.0 → 1.18.1
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/AI_USAGE/catalog.md +1 -1
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +33 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +13 -16
- package/AI_USAGE/components/button.md +245 -34
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +44 -26
- package/AI_USAGE/components/date-picker.md +78 -3
- package/AI_USAGE/components/dialog-api.md +2 -2
- package/AI_USAGE/components/dialog.md +5 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +3 -3
- package/AI_USAGE/components/drawer.md +1 -1
- package/AI_USAGE/components/dropdown-api.md +8 -3
- package/AI_USAGE/components/dropdown.md +2 -2
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +2 -2
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +3 -3
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +3 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +1 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +3 -3
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/transfer-api.md +1 -1
- package/AI_USAGE/components/transfer.md +1 -1
- package/AI_USAGE/components/tree-select-api.md +1 -1
- package/AI_USAGE/components/tree-select.md +1 -1
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +1 -1
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +432 -88
- package/CHANGELOG.md +36 -0
- package/dist/_container/render-function.d.ts +2 -2
- package/dist/_styles/palette-aliases.d.ts +1 -0
- package/dist/components/_components/picker/input-range.vue.d.ts +1 -1
- package/dist/components/button/Button.d.ts +0 -9
- package/dist/components/button/appearance.d.ts +7 -0
- package/dist/components/button/index.d.ts +0 -16
- package/dist/components/button/props.d.ts +2 -6
- package/dist/components/color-picker/panel.d.ts +0 -9
- package/dist/components/date-picker/DatePanel.vue.d.ts +10 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +22 -25
- package/dist/components/date-picker/index.d.ts +156 -84
- package/dist/components/date-picker/utils.d.ts +4 -4
- package/dist/components/drawer/index.d.ts +0 -30
- package/dist/components/drawer/src/Drawer.vue.d.ts +0 -15
- package/dist/components/dropdown/Dropdown.vue.d.ts +1 -0
- package/dist/components/dropdown/DropdownButton.vue.d.ts +1 -15
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +1 -0
- package/dist/components/dropdown/context.d.ts +1 -0
- package/dist/components/dropdown/index.d.ts +8 -30
- package/dist/components/dropdown/use-keyboard.d.ts +1 -0
- package/dist/components/menu/MenuItem.d.ts +2 -2
- package/dist/components/menu/context.d.ts +3 -3
- package/dist/components/menu/index.d.ts +6 -6
- package/dist/components/menu/sub-menu-pop.vue.d.ts +2 -2
- package/dist/components/popconfirm/src/popup.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePanel.vue.d.ts +0 -15
- package/dist/components/time-picker/TimePicker.vue.d.ts +1 -16
- package/dist/components/time-picker/index.d.ts +2 -32
- package/dist/es/_styles/palette-aliases.js +102 -17
- package/dist/es/_utils/palette.js +54 -54
- package/dist/es/components/_components/picker/input-range.vue.js +12 -12
- package/dist/es/components/_components/picker/input-range.vue2.js +45 -45
- package/dist/es/components/_components/picker/input.vue2.js +24 -24
- package/dist/es/components/button/Button.js +77 -49
- package/dist/es/components/button/appearance.js +7 -0
- package/dist/es/components/button/props.js +0 -4
- package/dist/es/components/date-picker/DatePanel.vue.js +47 -47
- package/dist/es/components/date-picker/DatePanel.vue2.js +68 -59
- package/dist/es/components/date-picker/DatePicker.vue.js +65 -59
- package/dist/es/components/date-picker/DatePicker.vue2.js +387 -284
- package/dist/es/components/date-picker/index.js +57 -36
- package/dist/es/components/date-picker/utils.js +132 -122
- package/dist/es/components/dialog/Dialog.js +43 -40
- package/dist/es/components/dialog/props.js +1 -1
- package/dist/es/components/dropdown/Dropdown.vue2.js +66 -50
- package/dist/es/components/dropdown/dropdown-panel.vue2.js +48 -43
- package/dist/es/components/dropdown/use-keyboard.js +36 -28
- package/dist/es/components/popover/Popover.js +72 -32
- package/dist/es/directives/wave.js +14 -8
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dialog.css +1 -1
- package/dist/style/link.css +1 -1
- package/dist/style/message-box.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -1
|
@@ -1660,7 +1660,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
1660
1660
|
displayValue1: import('vue').ComputedRef<string | undefined>;
|
|
1661
1661
|
changeFocusedInput: (index: number) => void;
|
|
1662
1662
|
onChange: (e: Event) => void;
|
|
1663
|
-
onFocus: (e: Event) => void;
|
|
1663
|
+
onFocus: (e: Event, index: number) => void;
|
|
1664
1664
|
onBlur: (e: Event) => void;
|
|
1665
1665
|
onPressEnter: () => void;
|
|
1666
1666
|
onClear: (e: Event) => void;
|
|
@@ -2782,10 +2782,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2782
2782
|
type: PropType<import('..').ButtonShape>;
|
|
2783
2783
|
default: undefined;
|
|
2784
2784
|
};
|
|
2785
|
-
link: {
|
|
2786
|
-
type: PropType<boolean>;
|
|
2787
|
-
default: boolean;
|
|
2788
|
-
};
|
|
2789
2785
|
type: {
|
|
2790
2786
|
type: PropType<import('..').ButtonTypes>;
|
|
2791
2787
|
default: string;
|
|
@@ -2820,7 +2816,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2820
2816
|
type: import('..').ButtonTypes;
|
|
2821
2817
|
size: import('..').ButtonSize;
|
|
2822
2818
|
disabled: boolean;
|
|
2823
|
-
link: boolean;
|
|
2824
2819
|
loading: boolean;
|
|
2825
2820
|
block: boolean;
|
|
2826
2821
|
loadingFill: boolean;
|
|
@@ -2864,10 +2859,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2864
2859
|
type: PropType<import('..').ButtonShape>;
|
|
2865
2860
|
default: undefined;
|
|
2866
2861
|
};
|
|
2867
|
-
link: {
|
|
2868
|
-
type: PropType<boolean>;
|
|
2869
|
-
default: boolean;
|
|
2870
|
-
};
|
|
2871
2862
|
type: {
|
|
2872
2863
|
type: PropType<import('..').ButtonTypes>;
|
|
2873
2864
|
default: string;
|
|
@@ -2902,7 +2893,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2902
2893
|
type: import('..').ButtonTypes;
|
|
2903
2894
|
size: import('..').ButtonSize;
|
|
2904
2895
|
disabled: boolean;
|
|
2905
|
-
link: boolean;
|
|
2906
2896
|
loading: boolean;
|
|
2907
2897
|
block: boolean;
|
|
2908
2898
|
loadingFill: boolean;
|
|
@@ -2936,10 +2926,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2936
2926
|
type: PropType<import('..').ButtonShape>;
|
|
2937
2927
|
default: undefined;
|
|
2938
2928
|
};
|
|
2939
|
-
link: {
|
|
2940
|
-
type: PropType<boolean>;
|
|
2941
|
-
default: boolean;
|
|
2942
|
-
};
|
|
2943
2929
|
type: {
|
|
2944
2930
|
type: PropType<import('..').ButtonTypes>;
|
|
2945
2931
|
default: string;
|
|
@@ -2974,7 +2960,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
2974
2960
|
type: import('..').ButtonTypes;
|
|
2975
2961
|
size: import('..').ButtonSize;
|
|
2976
2962
|
disabled: boolean;
|
|
2977
|
-
link: boolean;
|
|
2978
2963
|
loading: boolean;
|
|
2979
2964
|
block: boolean;
|
|
2980
2965
|
loadingFill: boolean;
|
|
@@ -1576,7 +1576,7 @@ export declare const TimePicker: {
|
|
|
1576
1576
|
displayValue1: import('vue').ComputedRef<string | undefined>;
|
|
1577
1577
|
changeFocusedInput: (index: number) => void;
|
|
1578
1578
|
onChange: (e: Event) => void;
|
|
1579
|
-
onFocus: (e: Event) => void;
|
|
1579
|
+
onFocus: (e: Event, index: number) => void;
|
|
1580
1580
|
onBlur: (e: Event) => void;
|
|
1581
1581
|
onPressEnter: () => void;
|
|
1582
1582
|
onClear: (e: Event) => void;
|
|
@@ -2698,10 +2698,6 @@ export declare const TimePicker: {
|
|
|
2698
2698
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
2699
2699
|
default: undefined;
|
|
2700
2700
|
};
|
|
2701
|
-
link: {
|
|
2702
|
-
type: import('vue').PropType<boolean>;
|
|
2703
|
-
default: boolean;
|
|
2704
|
-
};
|
|
2705
2701
|
type: {
|
|
2706
2702
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
2707
2703
|
default: string;
|
|
@@ -2736,7 +2732,6 @@ export declare const TimePicker: {
|
|
|
2736
2732
|
type: import('..').ButtonTypes;
|
|
2737
2733
|
size: import('..').ButtonSize;
|
|
2738
2734
|
disabled: boolean;
|
|
2739
|
-
link: boolean;
|
|
2740
2735
|
loading: boolean;
|
|
2741
2736
|
block: boolean;
|
|
2742
2737
|
loadingFill: boolean;
|
|
@@ -2780,10 +2775,6 @@ export declare const TimePicker: {
|
|
|
2780
2775
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
2781
2776
|
default: undefined;
|
|
2782
2777
|
};
|
|
2783
|
-
link: {
|
|
2784
|
-
type: import('vue').PropType<boolean>;
|
|
2785
|
-
default: boolean;
|
|
2786
|
-
};
|
|
2787
2778
|
type: {
|
|
2788
2779
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
2789
2780
|
default: string;
|
|
@@ -2818,7 +2809,6 @@ export declare const TimePicker: {
|
|
|
2818
2809
|
type: import('..').ButtonTypes;
|
|
2819
2810
|
size: import('..').ButtonSize;
|
|
2820
2811
|
disabled: boolean;
|
|
2821
|
-
link: boolean;
|
|
2822
2812
|
loading: boolean;
|
|
2823
2813
|
block: boolean;
|
|
2824
2814
|
loadingFill: boolean;
|
|
@@ -2852,10 +2842,6 @@ export declare const TimePicker: {
|
|
|
2852
2842
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
2853
2843
|
default: undefined;
|
|
2854
2844
|
};
|
|
2855
|
-
link: {
|
|
2856
|
-
type: import('vue').PropType<boolean>;
|
|
2857
|
-
default: boolean;
|
|
2858
|
-
};
|
|
2859
2845
|
type: {
|
|
2860
2846
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
2861
2847
|
default: string;
|
|
@@ -2890,7 +2876,6 @@ export declare const TimePicker: {
|
|
|
2890
2876
|
type: import('..').ButtonTypes;
|
|
2891
2877
|
size: import('..').ButtonSize;
|
|
2892
2878
|
disabled: boolean;
|
|
2893
|
-
link: boolean;
|
|
2894
2879
|
loading: boolean;
|
|
2895
2880
|
block: boolean;
|
|
2896
2881
|
loadingFill: boolean;
|
|
@@ -4908,7 +4893,7 @@ export declare const TimePicker: {
|
|
|
4908
4893
|
displayValue1: import('vue').ComputedRef<string | undefined>;
|
|
4909
4894
|
changeFocusedInput: (index: number) => void;
|
|
4910
4895
|
onChange: (e: Event) => void;
|
|
4911
|
-
onFocus: (e: Event) => void;
|
|
4896
|
+
onFocus: (e: Event, index: number) => void;
|
|
4912
4897
|
onBlur: (e: Event) => void;
|
|
4913
4898
|
onPressEnter: () => void;
|
|
4914
4899
|
onClear: (e: Event) => void;
|
|
@@ -6030,10 +6015,6 @@ export declare const TimePicker: {
|
|
|
6030
6015
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
6031
6016
|
default: undefined;
|
|
6032
6017
|
};
|
|
6033
|
-
link: {
|
|
6034
|
-
type: import('vue').PropType<boolean>;
|
|
6035
|
-
default: boolean;
|
|
6036
|
-
};
|
|
6037
6018
|
type: {
|
|
6038
6019
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
6039
6020
|
default: string;
|
|
@@ -6068,7 +6049,6 @@ export declare const TimePicker: {
|
|
|
6068
6049
|
type: import('..').ButtonTypes;
|
|
6069
6050
|
size: import('..').ButtonSize;
|
|
6070
6051
|
disabled: boolean;
|
|
6071
|
-
link: boolean;
|
|
6072
6052
|
loading: boolean;
|
|
6073
6053
|
block: boolean;
|
|
6074
6054
|
loadingFill: boolean;
|
|
@@ -6112,10 +6092,6 @@ export declare const TimePicker: {
|
|
|
6112
6092
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
6113
6093
|
default: undefined;
|
|
6114
6094
|
};
|
|
6115
|
-
link: {
|
|
6116
|
-
type: import('vue').PropType<boolean>;
|
|
6117
|
-
default: boolean;
|
|
6118
|
-
};
|
|
6119
6095
|
type: {
|
|
6120
6096
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
6121
6097
|
default: string;
|
|
@@ -6150,7 +6126,6 @@ export declare const TimePicker: {
|
|
|
6150
6126
|
type: import('..').ButtonTypes;
|
|
6151
6127
|
size: import('..').ButtonSize;
|
|
6152
6128
|
disabled: boolean;
|
|
6153
|
-
link: boolean;
|
|
6154
6129
|
loading: boolean;
|
|
6155
6130
|
block: boolean;
|
|
6156
6131
|
loadingFill: boolean;
|
|
@@ -6184,10 +6159,6 @@ export declare const TimePicker: {
|
|
|
6184
6159
|
type: import('vue').PropType<import('..').ButtonShape>;
|
|
6185
6160
|
default: undefined;
|
|
6186
6161
|
};
|
|
6187
|
-
link: {
|
|
6188
|
-
type: import('vue').PropType<boolean>;
|
|
6189
|
-
default: boolean;
|
|
6190
|
-
};
|
|
6191
6162
|
type: {
|
|
6192
6163
|
type: import('vue').PropType<import('..').ButtonTypes>;
|
|
6193
6164
|
default: string;
|
|
@@ -6222,7 +6193,6 @@ export declare const TimePicker: {
|
|
|
6222
6193
|
type: import('..').ButtonTypes;
|
|
6223
6194
|
size: import('..').ButtonSize;
|
|
6224
6195
|
disabled: boolean;
|
|
6225
|
-
link: boolean;
|
|
6226
6196
|
loading: boolean;
|
|
6227
6197
|
block: boolean;
|
|
6228
6198
|
loadingFill: boolean;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
const r = {
|
|
2
|
+
primary: "rgb(28 97 255 / 100%)",
|
|
3
|
+
success: "rgb(0 168 9 / 100%)",
|
|
4
|
+
danger: "rgb(224 34 37 / 100%)",
|
|
5
|
+
strong: "rgb(255 130 0 / 100%)",
|
|
6
|
+
warning: "rgb(255 184 0 / 100%)"
|
|
7
|
+
}, o = {
|
|
2
8
|
primary: {
|
|
9
|
+
"--x-alert-color-focus-ring": "var(--x-color-primary-text)",
|
|
10
|
+
"--x-alert-info-color-bg": "var(--x-color-primary-light-1)",
|
|
11
|
+
"--x-alert-info-color-icon": "var(--x-color-primary-text)",
|
|
12
|
+
"--x-button-color-bg-primary-outline-active": "color-mix(in srgb, var(--x-button-color-text-primary) 5%, var(--x-color-transparent))",
|
|
13
|
+
"--x-button-color-bg-primary-outline-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 3%, var(--x-color-transparent))",
|
|
3
14
|
"--x-button-color-bg-primary-solid": "var(--x-color-primary-solid)",
|
|
4
15
|
"--x-button-color-bg-primary-solid-active": "var(--x-color-primary-solid-active)",
|
|
5
16
|
"--x-button-color-bg-primary-solid-hover": "var(--x-color-primary-solid-hover)",
|
|
@@ -8,12 +19,16 @@ const r = {
|
|
|
8
19
|
"--x-button-color-bg-primary-subtle-hover": "var(--x-color-primary-subtle-hover)",
|
|
9
20
|
"--x-button-color-border-primary": "var(--x-color-primary-solid)",
|
|
10
21
|
"--x-button-color-text-primary": "var(--x-color-primary-button-text)",
|
|
22
|
+
"--x-button-color-text-primary-active": "color-mix(in srgb, var(--x-button-color-text-primary) 84%, var(--x-color-black))",
|
|
23
|
+
"--x-button-color-text-primary-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-black))",
|
|
24
|
+
"--x-button-color-wave-primary": "var(--x-button-color-bg-primary-solid)",
|
|
11
25
|
"--x-chart-color-series-1": "var(--x-color-primary-solid)",
|
|
12
26
|
"--x-checkbox-mask-color-bg_checked": "var(--x-color-primary-6)",
|
|
13
27
|
"--x-checkbox-mask-color-bg_checked_disabled": "var(--x-color-primary-light-3)",
|
|
14
28
|
"--x-color-border-focus": "var(--x-color-primary-6)",
|
|
15
29
|
"--x-color-menu-dark-hover": "var(--x-color-primary)",
|
|
16
30
|
"--x-color-menu-dark-submenu-selected-bg": "color-mix(in srgb, var(--x-color-primary) 45%, transparent)",
|
|
31
|
+
"--x-color-picker-color-mode-bg_active": "var(--x-color-primary-subtle)",
|
|
17
32
|
"--x-color-picker-color-swatch_active": "var(--x-color-primary-text)",
|
|
18
33
|
"--x-color-picker-color-text_active": "var(--x-color-primary-text)",
|
|
19
34
|
"--x-color-primary-button-text": "var(--x-color-primary-text)",
|
|
@@ -54,7 +69,7 @@ const r = {
|
|
|
54
69
|
"--x-input-feedback-icon-color_validating": "var(--x-field-status-validating-icon)",
|
|
55
70
|
"--x-input-tag-color-border_default_focus": "var(--x-field-color-border-focus)",
|
|
56
71
|
"--x-input-tag-color-shadow_default_focus": "var(--x-field-color-shadow-focus)",
|
|
57
|
-
"--x-link-background-color": "var(--x-color-primary-
|
|
72
|
+
"--x-link-background-color": "var(--x-color-primary-subtle)",
|
|
58
73
|
"--x-link-color-focus": "var(--x-color-primary-text)",
|
|
59
74
|
"--x-link-color-text": "var(--x-color-primary-text)",
|
|
60
75
|
"--x-menu-color-label-item-selected": "var(--x-color-primary-6)",
|
|
@@ -110,6 +125,9 @@ const r = {
|
|
|
110
125
|
"--x-upload-color-border-hover": "var(--x-color-primary)"
|
|
111
126
|
},
|
|
112
127
|
success: {
|
|
128
|
+
"--x-alert-success-color-bg": "var(--x-color-success-light-1)",
|
|
129
|
+
"--x-button-color-bg-success-outline-active": "color-mix(in srgb, var(--x-button-color-text-success) 5%, var(--x-color-transparent))",
|
|
130
|
+
"--x-button-color-bg-success-outline-hover": "color-mix(in srgb, var(--x-button-color-text-success) 3%, var(--x-color-transparent))",
|
|
113
131
|
"--x-button-color-bg-success-solid": "var(--x-color-success-solid)",
|
|
114
132
|
"--x-button-color-bg-success-solid-active": "var(--x-color-success-solid-active)",
|
|
115
133
|
"--x-button-color-bg-success-solid-hover": "var(--x-color-success-solid-hover)",
|
|
@@ -118,6 +136,9 @@ const r = {
|
|
|
118
136
|
"--x-button-color-bg-success-subtle-hover": "var(--x-color-success-subtle-hover)",
|
|
119
137
|
"--x-button-color-border-success": "var(--x-color-success-solid)",
|
|
120
138
|
"--x-button-color-text-success": "var(--x-color-success-button-text)",
|
|
139
|
+
"--x-button-color-text-success-active": "color-mix(in srgb, var(--x-button-color-text-success) 84%, var(--x-color-black))",
|
|
140
|
+
"--x-button-color-text-success-hover": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-black))",
|
|
141
|
+
"--x-button-color-wave-success": "var(--x-button-color-bg-success-solid)",
|
|
121
142
|
"--x-chart-color-series-2": "var(--x-color-success-solid)",
|
|
122
143
|
"--x-color-success-button-text": "var(--x-color-success-text)",
|
|
123
144
|
"--x-color-success-light-1": "var(--x-color-success-1)",
|
|
@@ -136,13 +157,16 @@ const r = {
|
|
|
136
157
|
"--x-field-status-success-text": "var(--x-color-success-text)",
|
|
137
158
|
"--x-input-feedback-icon-color_success": "var(--x-field-status-success-icon)",
|
|
138
159
|
"--x-link-color-text-success": "var(--x-color-success-text)",
|
|
139
|
-
"--x-link-success-background-color": "var(--x-color-success-
|
|
160
|
+
"--x-link-success-background-color": "var(--x-color-success-subtle)",
|
|
140
161
|
"--x-message-color-accent-success": "var(--x-color-success-solid)",
|
|
141
162
|
"--x-message-color-icon-bg-success": "var(--x-color-success-subtle)",
|
|
142
163
|
"--x-notification-color-accent-success": "var(--x-color-success-solid)",
|
|
143
164
|
"--x-notification-color-icon-bg-success": "var(--x-color-success-subtle)"
|
|
144
165
|
},
|
|
145
166
|
danger: {
|
|
167
|
+
"--x-alert-error-color-bg": "var(--x-color-danger-light-1)",
|
|
168
|
+
"--x-button-color-bg-danger-outline-active": "color-mix(in srgb, var(--x-button-color-text-danger) 5%, var(--x-color-transparent))",
|
|
169
|
+
"--x-button-color-bg-danger-outline-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 3%, var(--x-color-transparent))",
|
|
146
170
|
"--x-button-color-bg-danger-solid": "var(--x-color-danger-solid)",
|
|
147
171
|
"--x-button-color-bg-danger-solid-active": "var(--x-color-danger-solid-active)",
|
|
148
172
|
"--x-button-color-bg-danger-solid-hover": "var(--x-color-danger-solid-hover)",
|
|
@@ -151,6 +175,9 @@ const r = {
|
|
|
151
175
|
"--x-button-color-bg-danger-subtle-hover": "var(--x-color-danger-subtle-hover)",
|
|
152
176
|
"--x-button-color-border-danger": "var(--x-color-danger-solid)",
|
|
153
177
|
"--x-button-color-text-danger": "var(--x-color-danger-button-text)",
|
|
178
|
+
"--x-button-color-text-danger-active": "color-mix(in srgb, var(--x-button-color-text-danger) 84%, var(--x-color-black))",
|
|
179
|
+
"--x-button-color-text-danger-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-black))",
|
|
180
|
+
"--x-button-color-wave-danger": "var(--x-button-color-bg-danger-solid)",
|
|
154
181
|
"--x-chart-color-series-4": "var(--x-color-danger-solid)",
|
|
155
182
|
"--x-color-danger-button-text": "var(--x-color-danger-text)",
|
|
156
183
|
"--x-color-danger-light-1": "var(--x-color-danger-1)",
|
|
@@ -183,7 +210,7 @@ const r = {
|
|
|
183
210
|
"--x-input-tag-color-border_error_focus": "var(--x-field-color-border-error)",
|
|
184
211
|
"--x-input-tag-color-shadow_error_focus": "var(--x-field-status-error-shadow-color-focus)",
|
|
185
212
|
"--x-link-color-text-danger": "var(--x-color-danger-text)",
|
|
186
|
-
"--x-link-danger-background-color": "var(--x-color-danger-
|
|
213
|
+
"--x-link-danger-background-color": "var(--x-color-danger-subtle)",
|
|
187
214
|
"--x-message-color-accent-error": "var(--x-color-danger-solid)",
|
|
188
215
|
"--x-message-color-icon-bg-error": "var(--x-color-danger-subtle)",
|
|
189
216
|
"--x-notification-color-accent-error": "var(--x-color-danger-solid)",
|
|
@@ -194,6 +221,9 @@ const r = {
|
|
|
194
221
|
"--x-picker-color-shadow_error_focus": "var(--x-field-status-error-shadow-color-focus)"
|
|
195
222
|
},
|
|
196
223
|
strong: {
|
|
224
|
+
"--x-alert-strong-color-bg": "var(--x-color-strong-subtle)",
|
|
225
|
+
"--x-button-color-bg-strong-outline-active": "color-mix(in srgb, var(--x-button-color-text-strong) 5%, var(--x-color-transparent))",
|
|
226
|
+
"--x-button-color-bg-strong-outline-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 3%, var(--x-color-transparent))",
|
|
197
227
|
"--x-button-color-bg-strong-solid": "var(--x-color-strong-solid)",
|
|
198
228
|
"--x-button-color-bg-strong-solid-active": "var(--x-color-strong-solid-active)",
|
|
199
229
|
"--x-button-color-bg-strong-solid-hover": "var(--x-color-strong-solid-hover)",
|
|
@@ -202,6 +232,9 @@ const r = {
|
|
|
202
232
|
"--x-button-color-bg-strong-subtle-hover": "var(--x-color-strong-subtle-hover)",
|
|
203
233
|
"--x-button-color-border-strong": "var(--x-color-strong-solid)",
|
|
204
234
|
"--x-button-color-text-strong": "var(--x-color-strong-button-text)",
|
|
235
|
+
"--x-button-color-text-strong-active": "color-mix(in srgb, var(--x-button-color-text-strong) 84%, var(--x-color-black))",
|
|
236
|
+
"--x-button-color-text-strong-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-black))",
|
|
237
|
+
"--x-button-color-wave-strong": "var(--x-button-color-bg-strong-solid)",
|
|
205
238
|
"--x-chart-color-series-3": "var(--x-color-strong-solid)",
|
|
206
239
|
"--x-color-strong-button-text": "var(--x-color-strong-text)",
|
|
207
240
|
"--x-color-strong-solid": "var(--x-color-strong-6)",
|
|
@@ -212,13 +245,16 @@ const r = {
|
|
|
212
245
|
"--x-color-strong-subtle-hover": "color-mix(in srgb, var(--x-color-strong-subtle) 90%, var(--x-color-strong-button-text))",
|
|
213
246
|
"--x-color-strong-text": "var(--x-color-strong)",
|
|
214
247
|
"--x-link-color-text-strong": "var(--x-color-strong-text)",
|
|
215
|
-
"--x-link-strong-background-color": "var(--x-color-strong-
|
|
248
|
+
"--x-link-strong-background-color": "var(--x-color-strong-subtle)",
|
|
216
249
|
"--x-message-color-accent-strong": "var(--x-color-strong-solid)",
|
|
217
250
|
"--x-message-color-icon-bg-strong": "var(--x-color-strong-subtle)",
|
|
218
251
|
"--x-notification-color-accent-strong": "var(--x-color-strong-solid)",
|
|
219
252
|
"--x-notification-color-icon-bg-strong": "var(--x-color-strong-subtle)"
|
|
220
253
|
},
|
|
221
254
|
warning: {
|
|
255
|
+
"--x-alert-warning-color-bg": "var(--x-color-warning-light-1)",
|
|
256
|
+
"--x-button-color-bg-warning-outline-active": "color-mix(in srgb, var(--x-button-color-text-warning) 5%, var(--x-color-transparent))",
|
|
257
|
+
"--x-button-color-bg-warning-outline-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 3%, var(--x-color-transparent))",
|
|
222
258
|
"--x-button-color-bg-warning-solid": "var(--x-color-warning-solid)",
|
|
223
259
|
"--x-button-color-bg-warning-solid-active": "var(--x-color-warning-solid-active)",
|
|
224
260
|
"--x-button-color-bg-warning-solid-hover": "var(--x-color-warning-solid-hover)",
|
|
@@ -227,6 +263,9 @@ const r = {
|
|
|
227
263
|
"--x-button-color-bg-warning-subtle-hover": "var(--x-color-warning-subtle-hover)",
|
|
228
264
|
"--x-button-color-border-warning": "var(--x-color-warning-solid)",
|
|
229
265
|
"--x-button-color-text-warning": "var(--x-color-warning-button-text)",
|
|
266
|
+
"--x-button-color-text-warning-active": "color-mix(in srgb, var(--x-button-color-text-warning) 84%, var(--x-color-black))",
|
|
267
|
+
"--x-button-color-text-warning-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-black))",
|
|
268
|
+
"--x-button-color-wave-warning": "var(--x-button-color-bg-warning-solid)",
|
|
230
269
|
"--x-chart-color-series-5": "var(--x-color-warning-solid)",
|
|
231
270
|
"--x-color-warning-button-text": "var(--x-color-warning-text)",
|
|
232
271
|
"--x-color-warning-light-1": "var(--x-color-warning-1)",
|
|
@@ -245,42 +284,88 @@ const r = {
|
|
|
245
284
|
"--x-field-status-warning-text": "var(--x-color-warning-text)",
|
|
246
285
|
"--x-input-feedback-icon-color_warning": "var(--x-field-status-warning-icon)",
|
|
247
286
|
"--x-link-color-text-warning": "var(--x-color-warning-text)",
|
|
248
|
-
"--x-link-warning-background-color": "var(--x-color-warning-
|
|
287
|
+
"--x-link-warning-background-color": "var(--x-color-warning-subtle)",
|
|
249
288
|
"--x-message-color-accent-warning": "var(--x-color-warning-solid)",
|
|
250
289
|
"--x-message-color-icon-bg-warning": "var(--x-color-warning-subtle)",
|
|
251
290
|
"--x-notification-color-accent-warning": "var(--x-color-warning-solid)",
|
|
252
291
|
"--x-notification-color-icon-bg-warning": "var(--x-color-warning-subtle)"
|
|
253
292
|
}
|
|
254
|
-
},
|
|
293
|
+
}, c = {
|
|
255
294
|
primary: {
|
|
256
|
-
"--x-color-
|
|
257
|
-
"--x-color-
|
|
295
|
+
"--x-alert-color-focus-ring": "var(--x-color-text-1)",
|
|
296
|
+
"--x-alert-info-color-bg": "var(--x-color-primary-subtle)",
|
|
297
|
+
"--x-alert-info-color-icon": "var(--x-color-primary-8)",
|
|
298
|
+
"--x-button-color-text-primary-active": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-black))",
|
|
299
|
+
"--x-button-color-text-primary-hover": "color-mix(in srgb, var(--x-button-color-text-primary) 92%, var(--x-color-white))",
|
|
300
|
+
"--x-color-picker-color-mode-bg_active": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
301
|
+
"--x-color-primary-button-text": "var(--x-color-primary-8)",
|
|
302
|
+
"--x-color-primary-subtle": "#39479f",
|
|
303
|
+
"--x-color-primary-text": "var(--x-color-primary-8)",
|
|
304
|
+
"--x-field-status-validating-bg": "color-mix(in srgb, var(--x-color-primary-subtle) 12%, var(--x-color-bg-surface))",
|
|
305
|
+
"--x-field-status-validating-bg-hover": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
258
306
|
"--x-heatmap-color-level-1": "var(--x-color-primary-3)",
|
|
259
307
|
"--x-heatmap-color-level-2": "var(--x-color-primary-4)",
|
|
260
308
|
"--x-heatmap-color-level-3": "var(--x-color-primary-5)",
|
|
261
309
|
"--x-heatmap-color-level-4": "var(--x-color-primary-6)",
|
|
262
310
|
"--x-heatmap-color-level-5": "var(--x-color-primary-7)",
|
|
263
|
-
"--x-
|
|
264
|
-
"--x-
|
|
311
|
+
"--x-message-color-accent-info": "var(--x-color-primary-text)",
|
|
312
|
+
"--x-message-color-accent-loading": "var(--x-color-primary-text)",
|
|
313
|
+
"--x-notification-color-accent-info": "var(--x-color-primary-text)",
|
|
314
|
+
"--x-table-color-bg-body-row_active": "color-mix(in srgb, var(--x-color-primary-subtle) 20%, var(--x-color-bg-surface))",
|
|
315
|
+
"--x-tag-color-better-blue-border-hover": "color-mix(in srgb, var(--x-color-primary-subtle) 88%, var(--x-color-primary-text))"
|
|
265
316
|
},
|
|
266
317
|
success: {
|
|
267
|
-
"--x-
|
|
268
|
-
"--x-color-success-
|
|
318
|
+
"--x-alert-success-color-bg": "var(--x-color-success-subtle)",
|
|
319
|
+
"--x-button-color-text-success-active": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-black))",
|
|
320
|
+
"--x-button-color-text-success-hover": "color-mix(in srgb, var(--x-button-color-text-success) 92%, var(--x-color-white))",
|
|
321
|
+
"--x-color-success-button-text": "var(--x-color-success-8)",
|
|
322
|
+
"--x-color-success-subtle": "#2d733d",
|
|
323
|
+
"--x-color-success-text": "var(--x-color-success-8)",
|
|
324
|
+
"--x-field-status-success-bg": "color-mix(in srgb, var(--x-color-success-subtle) 12%, var(--x-color-bg-surface))",
|
|
325
|
+
"--x-field-status-success-bg-hover": "color-mix(in srgb, var(--x-color-success-subtle) 20%, var(--x-color-bg-surface))",
|
|
326
|
+
"--x-message-color-accent-success": "var(--x-color-success-text)",
|
|
327
|
+
"--x-notification-color-accent-success": "var(--x-color-success-text)"
|
|
269
328
|
},
|
|
270
329
|
danger: {
|
|
330
|
+
"--x-alert-error-color-bg": "var(--x-color-danger-subtle)",
|
|
331
|
+
"--x-button-color-text-danger-active": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-black))",
|
|
332
|
+
"--x-button-color-text-danger-hover": "color-mix(in srgb, var(--x-button-color-text-danger) 92%, var(--x-color-white))",
|
|
271
333
|
"--x-color-danger-button-text": "var(--x-color-danger-8)",
|
|
272
|
-
"--x-color-danger-
|
|
334
|
+
"--x-color-danger-subtle": "#4d212a",
|
|
335
|
+
"--x-color-danger-text": "var(--x-color-danger-8)",
|
|
336
|
+
"--x-field-color-bg-error": "var(--x-field-status-error-bg)",
|
|
337
|
+
"--x-field-color-bg-error-hover": "var(--x-field-status-error-bg-hover)",
|
|
338
|
+
"--x-field-status-error-bg": "color-mix(in srgb, var(--x-color-danger-subtle) 12%, var(--x-color-bg-surface))",
|
|
339
|
+
"--x-field-status-error-bg-hover": "color-mix(in srgb, var(--x-color-danger-subtle) 20%, var(--x-color-bg-surface))",
|
|
340
|
+
"--x-message-color-accent-error": "var(--x-color-danger-text)",
|
|
341
|
+
"--x-notification-color-accent-error": "var(--x-color-danger-text)"
|
|
273
342
|
},
|
|
274
343
|
strong: {
|
|
344
|
+
"--x-button-color-text-strong-active": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-black))",
|
|
345
|
+
"--x-button-color-text-strong-hover": "color-mix(in srgb, var(--x-button-color-text-strong) 92%, var(--x-color-white))",
|
|
275
346
|
"--x-color-strong-button-text": "var(--x-color-strong-7)",
|
|
276
|
-
"--x-color-strong-
|
|
347
|
+
"--x-color-strong-subtle": "#70432b",
|
|
348
|
+
"--x-color-strong-text": "var(--x-color-strong-7)",
|
|
349
|
+
"--x-message-color-accent-strong": "var(--x-color-strong-text)",
|
|
350
|
+
"--x-notification-color-accent-strong": "var(--x-color-strong-text)"
|
|
277
351
|
},
|
|
278
352
|
warning: {
|
|
353
|
+
"--x-alert-warning-color-bg": "var(--x-color-warning-subtle)",
|
|
354
|
+
"--x-button-color-text-warning-active": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-black))",
|
|
355
|
+
"--x-button-color-text-warning-hover": "color-mix(in srgb, var(--x-button-color-text-warning) 92%, var(--x-color-white))",
|
|
279
356
|
"--x-color-warning-button-text": "var(--x-color-warning-7)",
|
|
280
|
-
"--x-color-warning-
|
|
357
|
+
"--x-color-warning-subtle": "#7b582d",
|
|
358
|
+
"--x-color-warning-subtle-active": "color-mix(in srgb, var(--x-color-warning-subtle) 84%, var(--x-color-warning-button-text))",
|
|
359
|
+
"--x-color-warning-subtle-hover": "color-mix(in srgb, var(--x-color-warning-subtle) 90%, var(--x-color-warning-button-text))",
|
|
360
|
+
"--x-color-warning-text": "var(--x-color-warning-7)",
|
|
361
|
+
"--x-field-status-warning-bg": "color-mix(in srgb, var(--x-color-warning-subtle) 12%, var(--x-color-bg-surface))",
|
|
362
|
+
"--x-field-status-warning-bg-hover": "color-mix(in srgb, var(--x-color-warning-subtle) 20%, var(--x-color-bg-surface))",
|
|
363
|
+
"--x-message-color-accent-warning": "var(--x-color-warning-text)",
|
|
364
|
+
"--x-notification-color-accent-warning": "var(--x-color-warning-text)"
|
|
281
365
|
}
|
|
282
366
|
};
|
|
283
367
|
export {
|
|
284
|
-
r as
|
|
285
|
-
o as
|
|
368
|
+
r as DEFAULT_PALETTE_SEEDS,
|
|
369
|
+
o as PALETTE_ALIASES,
|
|
370
|
+
c as PALETTE_ALIASES_DARK
|
|
286
371
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { PALETTE_ALIASES as
|
|
2
|
-
const
|
|
3
|
-
if (typeof
|
|
4
|
-
const
|
|
5
|
-
if (
|
|
6
|
-
const
|
|
7
|
-
if (!/^(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(
|
|
8
|
-
const
|
|
9
|
-
return
|
|
1
|
+
import { PALETTE_ALIASES as y, PALETTE_ALIASES_DARK as A, DEFAULT_PALETTE_SEEDS as d } from "../_styles/palette-aliases.js";
|
|
2
|
+
const _ = 2.05, g = 95.5, E = 22, S = [1, 0.8, 0.6, 0.4, 0.2], $ = [1 / 3, 2 / 3, 1], H = 90, L = 300, m = (s, i, c) => Math.min(c, Math.max(i, s)), p = (s) => {
|
|
3
|
+
if (typeof s != "string") return null;
|
|
4
|
+
const i = s.trim();
|
|
5
|
+
if (i.startsWith("#")) {
|
|
6
|
+
const e = i.slice(1);
|
|
7
|
+
if (!/^(?:[0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e)) return null;
|
|
8
|
+
const u = e.length === 3 ? [...e].map((a) => a + a).join("") : e.length === 6 || e.length === 8 ? e.slice(0, 6) : null;
|
|
9
|
+
return u ? [0, 2, 4].map((a) => parseInt(u.slice(a, a + 2), 16)) : null;
|
|
10
10
|
}
|
|
11
|
-
const
|
|
12
|
-
if (!
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
const l =
|
|
18
|
-
return l.some((
|
|
19
|
-
},
|
|
20
|
-
const
|
|
11
|
+
const c = i.match(/^rgba?\(([^)]+)\)$/i);
|
|
12
|
+
if (!c) return null;
|
|
13
|
+
const r = c[1].trim(), o = r.includes(",") ? r.split(",").map((e) => e.trim()) : r.split(/\s*\/\s*/)[0].split(/\s+/), t = r.includes(",") ? o[3] : r.includes("/") ? r.split("/")[1].trim() : void 0;
|
|
14
|
+
if (r.split("/").length > 2 || o.length < 3 || o.length > (r.includes(",") ? 4 : 3)) return null;
|
|
15
|
+
const n = /^[+-]?(?:\d+\.?\d*|\.\d+)%?$/;
|
|
16
|
+
if (o.slice(0, 3).some((e) => !n.test(e)) || t !== void 0 && !n.test(t)) return null;
|
|
17
|
+
const l = o.slice(0, 3).map((e) => e.endsWith("%") ? Math.round(parseFloat(e) / 100 * 255) : Number(e));
|
|
18
|
+
return l.some((e) => !Number.isFinite(e)) ? null : l.map((e) => m(Math.round(e), 0, 255));
|
|
19
|
+
}, P = ([s, i, c]) => {
|
|
20
|
+
const r = s / 255, o = i / 255, t = c / 255, n = Math.max(r, o, t), l = Math.min(r, o, t), e = n - l, u = (n + l) / 2;
|
|
21
21
|
let a = 0, h = 0;
|
|
22
|
-
return
|
|
23
|
-
}, I = ({ h:
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
if (!
|
|
30
|
-
throw new Error(`[x-next] generatePalette: 无法解析种子色 "${
|
|
31
|
-
const { h:
|
|
22
|
+
return e !== 0 && (h = u > 0.5 ? e / (2 - n - l) : e / (n + l), n === r ? a = (o - t) / e + (o < t ? 6 : 0) : n === o ? a = (t - r) / e + 2 : a = (r - o) / e + 4, a *= 60), { h: a, s: h * 100, l: u * 100 };
|
|
23
|
+
}, I = ({ h: s, s: i, l: c }) => {
|
|
24
|
+
const r = m(i, 0, 100) / 100, o = m(c, 0, 100) / 100, t = (s % 360 + 360) % 360, n = (1 - Math.abs(2 * o - 1)) * r, l = n * (1 - Math.abs(t / 60 % 2 - 1)), e = o - n / 2;
|
|
25
|
+
let u;
|
|
26
|
+
return t < 60 ? u = [n, l, 0] : t < 120 ? u = [l, n, 0] : t < 180 ? u = [0, n, l] : t < 240 ? u = [0, l, n] : t < 300 ? u = [l, 0, n] : u = [n, 0, l], u.map((a) => m(Math.round((a + e) * 255), 0, 255));
|
|
27
|
+
}, R = (s) => `#${s.map((i) => m(Math.round(i), 0, 255).toString(16).padStart(2, "0")).join("")}`, v = (s) => s <= H || s >= L ? 1 : -1, T = (s, i = {}) => {
|
|
28
|
+
const c = p(s);
|
|
29
|
+
if (!c)
|
|
30
|
+
throw new Error(`[x-next] generatePalette: 无法解析种子色 "${s}"`);
|
|
31
|
+
const { h: r, s: o, l: t } = P(c), n = v(r), { dark: l = !1 } = i, e = l ? Math.min(E, t) : Math.max(g, t), u = l ? Math.max(g, t) : Math.min(E, t), a = [];
|
|
32
32
|
for (let h = 0; h < 9; h += 1) {
|
|
33
33
|
let f;
|
|
34
|
-
h < 5 ? f =
|
|
35
|
-
const
|
|
36
|
-
a.push(
|
|
34
|
+
h < 5 ? f = t + (e - t) * S[h] : h === 5 ? f = t : f = t + (u - t) * $[h - 6];
|
|
35
|
+
const M = 5 - h, b = n * _ * M * (l ? -1 : 1);
|
|
36
|
+
a.push(R(I({ h: r + b, s: o, l: m(f, 0, 100) })));
|
|
37
37
|
}
|
|
38
38
|
return a;
|
|
39
|
-
}, G = (
|
|
40
|
-
const { name:
|
|
41
|
-
if (
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
}, G = (s, i = {}) => {
|
|
40
|
+
const { name: c = "primary", target: r, dark: o } = i, t = T(s, { dark: o }), n = r ?? (typeof document < "u" ? document.documentElement : null);
|
|
41
|
+
if (n) {
|
|
42
|
+
n.style.setProperty(`--x-color-${c}`, t[5]), t.forEach((l, e) => {
|
|
43
|
+
n.style.setProperty(`--x-color-${c}-${e + 1}`, l);
|
|
44
44
|
});
|
|
45
|
-
for (const [l,
|
|
46
|
-
|
|
45
|
+
for (const [l, e] of Object.entries(x(c, o, t[5])))
|
|
46
|
+
n.style.setProperty(l, e);
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
},
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
Object.entries(i).map(([s, e]) => [s, (n == null ? void 0 : n[s]) ?? e])
|
|
48
|
+
return t;
|
|
49
|
+
}, x = (s, i, c) => {
|
|
50
|
+
const r = y[s] ?? {}, o = i ? A[s] : void 0, t = Object.fromEntries(
|
|
51
|
+
Object.entries(r).map(([n, l]) => [n, (o == null ? void 0 : o[n]) ?? l])
|
|
53
52
|
);
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
return i && c && d[s] && JSON.stringify(p(c)) !== JSON.stringify(p(d[s])) && (t[`--x-color-${s}-subtle`] = `color-mix(in srgb, var(--x-color-${s}-1) 72%, var(--x-color-${s}-8))`), t;
|
|
54
|
+
}, O = (s, i = !1) => {
|
|
55
|
+
const c = T(s, { dark: i });
|
|
56
56
|
return {
|
|
57
|
-
"--x-color-primary":
|
|
58
|
-
...Object.fromEntries(
|
|
59
|
-
...
|
|
57
|
+
"--x-color-primary": c[5],
|
|
58
|
+
...Object.fromEntries(c.map((r, o) => [`--x-color-primary-${o + 1}`, r])),
|
|
59
|
+
...x("primary", i, c[5])
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
export {
|
|
63
63
|
G as applyThemeColor,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
T as generatePalette,
|
|
65
|
+
O as getThemeColorStyles,
|
|
66
66
|
I as hslToRgb,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
p as parseColor,
|
|
68
|
+
P as rgbToHsl,
|
|
69
|
+
R as toHex
|
|
70
70
|
};
|