pxd 0.0.52 → 0.0.53
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/README.md +6 -3
- package/dist/components/active-graph/index.d.vue.ts +0 -2
- package/dist/components/active-graph/index.vue +35 -37
- package/dist/components/avatar/index.d.vue.ts +2 -2
- package/dist/components/avatar/index.vue +17 -16
- package/dist/components/avatar-group/index.d.vue.ts +1 -1
- package/dist/components/avatar-group/index.vue +4 -1
- package/dist/components/badge/cn.d.ts +90 -0
- package/dist/components/badge/cn.js +44 -0
- package/dist/components/badge/index.d.vue.ts +5 -33
- package/dist/components/badge/index.vue +10 -56
- package/dist/components/book/index.vue +90 -17
- package/dist/components/browser/index.vue +21 -6
- package/dist/components/button/cn.d.ts +121 -0
- package/dist/components/button/cn.js +55 -0
- package/dist/components/button/index.d.vue.ts +8 -14
- package/dist/components/button/index.vue +22 -74
- package/dist/components/carousel-group/index.d.vue.ts +1 -1
- package/dist/components/carousel-group/index.vue +32 -28
- package/dist/components/checkbox/cn.d.ts +67 -0
- package/dist/components/checkbox/cn.js +31 -0
- package/dist/components/checkbox/index.vue +9 -19
- package/dist/components/chip/cn.d.ts +49 -0
- package/dist/components/chip/cn.js +26 -0
- package/dist/components/chip/index.vue +13 -21
- package/dist/components/choicebox/index.vue +1 -1
- package/dist/components/choicebox-group/index.vue +6 -3
- package/dist/components/collapse/index.vue +7 -1
- package/dist/components/collapse-group/index.vue +7 -7
- package/dist/components/command-menu/index.vue +9 -8
- package/dist/components/command-menu-group/index.vue +4 -1
- package/dist/components/config-provider/index.d.vue.ts +1 -0
- package/dist/components/config-provider/index.vue +2 -1
- package/dist/components/countdown/index.vue +2 -10
- package/dist/components/dash-line/index.vue +22 -16
- package/dist/components/description/index.vue +4 -2
- package/dist/components/drawer/index.vue +19 -11
- package/dist/components/empty-state/index.vue +3 -1
- package/dist/components/error/cn.d.ts +22 -0
- package/dist/components/error/cn.js +15 -0
- package/dist/components/error/index.vue +13 -14
- package/dist/components/fader/index.vue +30 -14
- package/dist/components/gauge/index.vue +6 -6
- package/dist/components/grid/index.vue +16 -12
- package/dist/components/grid-item/index.vue +4 -4
- package/dist/components/hold-button/index.vue +19 -13
- package/dist/components/input/cn.d.ts +73 -0
- package/dist/components/input/cn.js +36 -0
- package/dist/components/input/index.d.vue.ts +14 -16
- package/dist/components/input/index.vue +74 -101
- package/dist/components/intersection-observer/index.vue +7 -3
- package/dist/components/kbd/index.vue +2 -2
- package/dist/components/link-button/index.d.vue.ts +8 -8
- package/dist/components/link-button/index.vue +17 -25
- package/dist/components/list/index.d.vue.ts +0 -1
- package/dist/components/list/index.vue +58 -57
- package/dist/components/list-item/cn.d.ts +22 -0
- package/dist/components/list-item/cn.js +15 -0
- package/dist/components/list-item/index.d.vue.ts +3 -3
- package/dist/components/list-item/index.vue +14 -25
- package/dist/components/loading-bar/cn.d.ts +70 -0
- package/dist/components/loading-bar/cn.js +32 -0
- package/dist/components/loading-bar/index.d.vue.ts +2 -0
- package/dist/components/loading-bar/index.vue +68 -61
- package/dist/components/loading-dots/index.vue +12 -4
- package/dist/components/menu/index.d.vue.ts +2 -2
- package/dist/components/menu/index.vue +4 -4
- package/dist/components/message/index.vue +82 -48
- package/dist/components/message-item/index.vue +7 -2
- package/dist/components/modal/index.vue +20 -12
- package/dist/components/more-button/index.d.vue.ts +1 -3
- package/dist/components/more-button/index.vue +7 -17
- package/dist/components/note/cn.d.ts +121 -0
- package/dist/components/note/cn.js +66 -0
- package/dist/components/note/index.d.vue.ts +3 -39
- package/dist/components/note/index.vue +18 -37
- package/dist/components/number-input/index.d.vue.ts +19 -10
- package/dist/components/number-input/index.vue +121 -75
- package/dist/components/overlay/index.vue +4 -20
- package/dist/components/pagination/index.vue +25 -8
- package/dist/components/pin-input/cn.d.ts +46 -0
- package/dist/components/pin-input/cn.js +25 -0
- package/dist/components/pin-input/index.vue +11 -20
- package/dist/components/placeholder/index.vue +11 -4
- package/dist/components/popover/index.d.vue.ts +4 -3
- package/dist/components/popover/index.vue +107 -54
- package/dist/components/progress/cn.d.ts +19 -0
- package/dist/components/progress/cn.js +14 -0
- package/dist/components/progress/index.d.vue.ts +1 -1
- package/dist/components/progress/index.vue +21 -14
- package/dist/components/radio/cn.d.ts +46 -0
- package/dist/components/radio/cn.js +42 -0
- package/dist/components/radio/index.vue +11 -18
- package/dist/components/resizable/index.vue +8 -2
- package/dist/components/resizable-handle/index.vue +1 -0
- package/dist/components/resizable-panel/index.vue +12 -11
- package/dist/components/skeleton/cn.d.ts +43 -0
- package/dist/components/skeleton/cn.js +24 -0
- package/dist/components/skeleton/index.d.vue.ts +4 -3
- package/dist/components/skeleton/index.vue +11 -20
- package/dist/components/slider/index.d.vue.ts +1 -1
- package/dist/components/slider/index.vue +14 -12
- package/dist/components/snippet/cn.d.ts +52 -0
- package/dist/components/snippet/cn.js +27 -0
- package/dist/components/snippet/index.vue +21 -29
- package/dist/components/spinner/index.vue +3 -1
- package/dist/components/stack/cn.d.ts +70 -0
- package/dist/components/stack/cn.js +33 -0
- package/dist/components/stack/index.d.vue.ts +2 -2
- package/dist/components/stack/index.vue +16 -31
- package/dist/components/status-dot/index.vue +5 -1
- package/dist/components/switch/cn.d.ts +16 -0
- package/dist/components/switch/cn.js +13 -0
- package/dist/components/switch/index.vue +5 -11
- package/dist/components/switch-group/index.vue +7 -4
- package/dist/components/text/cn.d.ts +67 -0
- package/dist/components/text/cn.js +34 -0
- package/dist/components/text/index.d.vue.ts +1 -1
- package/dist/components/text/index.vue +16 -25
- package/dist/components/textarea/cn.d.ts +58 -0
- package/dist/components/textarea/cn.js +30 -0
- package/dist/components/textarea/index.d.vue.ts +2 -0
- package/dist/components/textarea/index.vue +17 -24
- package/dist/components/theme-switcher/index.vue +6 -3
- package/dist/components/time-picker/index.d.vue.ts +2 -2
- package/dist/components/time-picker/index.vue +45 -25
- package/dist/components/toggle/index.vue +10 -6
- package/dist/components/tooltip/index.vue +3 -3
- package/dist/components/virtual-list/index.vue +1 -7
- package/dist/composables/use-browser-observer.d.ts +1 -1
- package/dist/composables/use-browser-observer.js +19 -15
- package/dist/composables/use-config-provider-context.d.ts +1 -0
- package/dist/composables/use-config-provider-context.js +5 -10
- package/dist/composables/use-countdown.js +1 -3
- package/dist/composables/use-deferred-value.js +1 -5
- package/dist/composables/use-delay-change.js +1 -4
- package/dist/composables/use-delay-destroy.js +1 -5
- package/dist/composables/use-loading-bar.d.ts +6 -14
- package/dist/composables/use-loading-bar.js +3 -14
- package/dist/composables/use-message.d.ts +9 -3
- package/dist/composables/use-message.js +9 -9
- package/dist/composables/use-model-value.d.ts +1 -0
- package/dist/composables/use-model-value.js +4 -2
- package/dist/composables/use-outside-click.js +12 -8
- package/dist/composables/use-pointer-gesture.js +5 -1
- package/dist/composables/use-toggle-value.js +1 -4
- package/dist/composables/use-virtual-list.js +14 -7
- package/dist/contexts/avatar.js +4 -4
- package/dist/contexts/carousel.js +1 -4
- package/dist/contexts/checkbox.js +1 -4
- package/dist/contexts/choicebox.js +2 -8
- package/dist/contexts/collapse.js +1 -4
- package/dist/contexts/list.js +5 -8
- package/dist/contexts/radio.js +4 -4
- package/dist/contexts/resizable.js +1 -4
- package/dist/contexts/switch.js +2 -8
- package/dist/index.d.ts +1 -0
- package/dist/styles/source.css +106 -59
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tw.css +106 -59
- package/dist/types/components/avatar.d.ts +2 -2
- package/dist/types/components/button.d.ts +11 -4
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/input.d.ts +4 -5
- package/dist/types/components/list.d.ts +1 -1
- package/dist/types/components/switch.d.ts +1 -1
- package/dist/types/shared/props.d.ts +6 -4
- package/dist/types/shared/utils.d.ts +3 -1
- package/dist/utils/context.d.ts +2 -8
- package/dist/utils/date.d.ts +1 -1
- package/dist/utils/date.js +1 -5
- package/dist/utils/event.js +6 -18
- package/dist/utils/format.d.ts +1 -1
- package/dist/utils/format.js +1 -1
- package/dist/utils/is.d.ts +0 -1
- package/dist/utils/is.js +3 -2
- package/dist/utils/responsive.js +7 -4
- package/dist/utils/throttle.js +4 -2
- package/package.json +45 -43
- package/dist/components/_internal/fragment-container.vue.d.ts +0 -13
- package/dist/components/active-graph/index.vue.d.ts +0 -51
- package/dist/components/avatar/index.vue.d.ts +0 -34
- package/dist/components/avatar-group/index.vue.d.ts +0 -8
- package/dist/components/backtop/index.vue.d.ts +0 -21
- package/dist/components/badge/index.vue.d.ts +0 -52
- package/dist/components/book/index.vue.d.ts +0 -28
- package/dist/components/browser/index.vue.d.ts +0 -16
- package/dist/components/button/index.vue.d.ts +0 -29
- package/dist/components/carousel/index.vue.d.ts +0 -13
- package/dist/components/carousel-group/index.vue.d.ts +0 -35
- package/dist/components/checkbox/index.vue.d.ts +0 -26
- package/dist/components/checkbox-group/index.vue.d.ts +0 -28
- package/dist/components/chip/index.vue.d.ts +0 -24
- package/dist/components/choicebox/index.vue.d.ts +0 -16
- package/dist/components/choicebox-group/index.vue.d.ts +0 -24
- package/dist/components/collapse/index.vue.d.ts +0 -22
- package/dist/components/collapse-group/index.vue.d.ts +0 -20
- package/dist/components/command-menu/index.vue.d.ts +0 -42
- package/dist/components/command-menu-group/index.vue.d.ts +0 -17
- package/dist/components/command-menu-item/index.vue.d.ts +0 -13
- package/dist/components/config-provider/index.vue.d.ts +0 -22
- package/dist/components/countdown/index.vue.d.ts +0 -51
- package/dist/components/dash-line/index.vue.d.ts +0 -13
- package/dist/components/description/index.vue.d.ts +0 -20
- package/dist/components/drawer/index.vue.d.ts +0 -60
- package/dist/components/empty-state/index.vue.d.ts +0 -23
- package/dist/components/error/index.vue.d.ts +0 -22
- package/dist/components/fader/index.vue.d.ts +0 -12
- package/dist/components/gauge/index.vue.d.ts +0 -14
- package/dist/components/grid/index.vue.d.ts +0 -19
- package/dist/components/grid-item/index.vue.d.ts +0 -18
- package/dist/components/hold-button/index.vue.d.ts +0 -42
- package/dist/components/input/index.vue.d.ts +0 -55
- package/dist/components/intersection-observer/index.vue.d.ts +0 -39
- package/dist/components/kbd/index.vue.d.ts +0 -24
- package/dist/components/label/index.vue.d.ts +0 -13
- package/dist/components/link-button/index.vue.d.ts +0 -33
- package/dist/components/list/index.vue.d.ts +0 -44
- package/dist/components/list-item/index.vue.d.ts +0 -29
- package/dist/components/loading-bar/index.vue.d.ts +0 -15
- package/dist/components/loading-dots/index.vue.d.ts +0 -15
- package/dist/components/material/index.vue.d.ts +0 -18
- package/dist/components/menu/index.vue.d.ts +0 -33
- package/dist/components/message/index.vue.d.ts +0 -176
- package/dist/components/message-item/index.vue.d.ts +0 -15
- package/dist/components/modal/index.vue.d.ts +0 -58
- package/dist/components/more-button/index.vue.d.ts +0 -20
- package/dist/components/noise-background/index.vue.d.ts +0 -19
- package/dist/components/note/index.vue.d.ts +0 -64
- package/dist/components/number-input/index.vue.d.ts +0 -39
- package/dist/components/overlay/index.vue.d.ts +0 -35
- package/dist/components/pagination/index.vue.d.ts +0 -21
- package/dist/components/pin-input/index.vue.d.ts +0 -28
- package/dist/components/placeholder/index.vue.d.ts +0 -18
- package/dist/components/popover/index.vue.d.ts +0 -73
- package/dist/components/progress/index.vue.d.ts +0 -34
- package/dist/components/radio/index.vue.d.ts +0 -20
- package/dist/components/radio-group/index.vue.d.ts +0 -22
- package/dist/components/resizable/index.vue.d.ts +0 -19
- package/dist/components/resizable-handle/index.vue.d.ts +0 -3
- package/dist/components/resizable-panel/index.vue.d.ts +0 -20
- package/dist/components/scrollable/index.vue.d.ts +0 -0
- package/dist/components/skeleton/index.vue.d.ts +0 -26
- package/dist/components/slider/index.vue.d.ts +0 -26
- package/dist/components/snippet/index.vue.d.ts +0 -18
- package/dist/components/spinner/index.vue.d.ts +0 -3
- package/dist/components/stack/index.vue.d.ts +0 -30
- package/dist/components/status-dot/index.vue.d.ts +0 -11
- package/dist/components/switch/index.vue.d.ts +0 -20
- package/dist/components/switch-group/index.vue.d.ts +0 -23
- package/dist/components/teleport/index.vue.d.ts +0 -21
- package/dist/components/text/index.vue.d.ts +0 -26
- package/dist/components/textarea/index.vue.d.ts +0 -28
- package/dist/components/theme-switcher/index.vue.d.ts +0 -8
- package/dist/components/time-picker/index.vue.d.ts +0 -35
- package/dist/components/toggle/index.vue.d.ts +0 -41
- package/dist/components/tooltip/index.vue.d.ts +0 -32
- package/dist/components/virtual-list/index.vue.d.ts +0 -24
package/dist/styles/tw.css
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
--background-100-value: 0, 0%, 100%;
|
|
5
5
|
--background-200-value: 0, 0%, 97%;
|
|
6
6
|
|
|
7
|
-
--color-gray-alpha-100-value: hsla(0, 0%, 0%, .05);
|
|
8
|
-
--color-gray-alpha-200-value: hsla(0, 0%, 0%, .082);
|
|
9
|
-
--color-gray-alpha-300-value: hsla(0, 0%, 0%, .12);
|
|
10
|
-
--color-gray-alpha-400-value: hsla(0, 0%, 0%, .17);
|
|
11
|
-
--color-gray-alpha-500-value: hsla(0, 0%, 0%, .21);
|
|
12
|
-
--color-gray-alpha-600-value: hsla(0, 0%, 0%, .34);
|
|
13
|
-
--color-gray-alpha-700-value: hsla(0, 0%, 0%, .44);
|
|
14
|
-
--color-gray-alpha-800-value: hsla(0, 0%, 0%, .51);
|
|
15
|
-
--color-gray-alpha-900-value: hsla(0, 0%, 0%, .61);
|
|
16
|
-
--color-gray-alpha-1000-value: hsla(0, 0%, 0%, .91);
|
|
7
|
+
--color-gray-alpha-100-value: hsla(0, 0%, 0%, 0.05);
|
|
8
|
+
--color-gray-alpha-200-value: hsla(0, 0%, 0%, 0.082);
|
|
9
|
+
--color-gray-alpha-300-value: hsla(0, 0%, 0%, 0.12);
|
|
10
|
+
--color-gray-alpha-400-value: hsla(0, 0%, 0%, 0.17);
|
|
11
|
+
--color-gray-alpha-500-value: hsla(0, 0%, 0%, 0.21);
|
|
12
|
+
--color-gray-alpha-600-value: hsla(0, 0%, 0%, 0.34);
|
|
13
|
+
--color-gray-alpha-700-value: hsla(0, 0%, 0%, 0.44);
|
|
14
|
+
--color-gray-alpha-800-value: hsla(0, 0%, 0%, 0.51);
|
|
15
|
+
--color-gray-alpha-900-value: hsla(0, 0%, 0%, 0.61);
|
|
16
|
+
--color-gray-alpha-1000-value: hsla(0, 0%, 0%, 0.91);
|
|
17
17
|
|
|
18
18
|
--color-gray-100-value: 0, 0%, 95%;
|
|
19
19
|
--color-gray-200-value: 0, 0%, 93%;
|
|
@@ -103,24 +103,34 @@
|
|
|
103
103
|
--color-pink-900-value: 336, 65%, 45%;
|
|
104
104
|
--color-pink-1000-value: 333, 74%, 15%;
|
|
105
105
|
|
|
106
|
-
--default-transition-duration: .2s;
|
|
107
|
-
--default-transition-timing-function: ease-out;
|
|
108
|
-
|
|
109
106
|
--primary: var(--color-gray-1000-value);
|
|
110
107
|
--primary-hover: hsla(var(--primary), 70%);
|
|
111
108
|
--primary-active: hsla(var(--primary), 90%);
|
|
112
109
|
|
|
113
|
-
--radius: .5rem;
|
|
114
|
-
--
|
|
115
|
-
|
|
116
|
-
--
|
|
117
|
-
|
|
118
|
-
--shadow-border-
|
|
119
|
-
--shadow-border-
|
|
120
|
-
--shadow-border-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
--shadow-border-
|
|
110
|
+
--radius: 0.5rem;
|
|
111
|
+
--duration: 0.15s;
|
|
112
|
+
--timing-function: ease-out;
|
|
113
|
+
--ring: var(--primary);
|
|
114
|
+
|
|
115
|
+
--shadow-border-default-value: 0 0 0 1px rgba(0, 0, 0, 0.08);
|
|
116
|
+
--shadow-border-small-value: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
|
117
|
+
--shadow-border-medium-value:
|
|
118
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.04),
|
|
119
|
+
0px 8px 8px -8px rgba(0, 0, 0, 0.04);
|
|
120
|
+
--shadow-border-large-value:
|
|
121
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 2px 2px rgba(0, 0, 0, 0.04),
|
|
122
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04);
|
|
123
|
+
--shadow-border-tooltip-value:
|
|
124
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.02), 0px 4px 8px rgba(0, 0, 0, 0.04);
|
|
125
|
+
--shadow-border-menu-value:
|
|
126
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
127
|
+
0px 4px 8px -4px rgba(0, 0, 0, 0.04), 0px 16px 24px -8px rgba(0, 0, 0, 0.06);
|
|
128
|
+
--shadow-border-modal-value:
|
|
129
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
130
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04), 0px 24px 32px -8px rgba(0, 0, 0, 0.06);
|
|
131
|
+
--shadow-border-fullscreen-value:
|
|
132
|
+
0 0 0 1px rgba(0, 0, 0, 0.08), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
133
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04), 0px 24px 32px -8px rgba(0, 0, 0, 0.06);
|
|
124
134
|
|
|
125
135
|
-webkit-tap-highlight-color: transparent;
|
|
126
136
|
text-rendering: optimizeLegibility;
|
|
@@ -140,16 +150,16 @@
|
|
|
140
150
|
--background-100-value: 0, 0%, 5%;
|
|
141
151
|
--background-200-value: 0, 0%, 0%;
|
|
142
152
|
|
|
143
|
-
--color-gray-alpha-100-value: hsla(0, 0%, 100%, .06);
|
|
144
|
-
--color-gray-alpha-200-value: hsla(0, 0%, 100%, .09);
|
|
145
|
-
--color-gray-alpha-300-value: hsla(0, 0%, 100%, .13);
|
|
146
|
-
--color-gray-alpha-400-value: hsla(0, 0%, 100%, .14);
|
|
147
|
-
--color-gray-alpha-500-value: hsla(0, 0%, 100%, .24);
|
|
148
|
-
--color-gray-alpha-600-value: hsla(0, 0%, 100%, .51);
|
|
149
|
-
--color-gray-alpha-700-value: hsla(0, 0%, 100%, .54);
|
|
150
|
-
--color-gray-alpha-800-value: hsla(0, 0%, 100%, .47);
|
|
151
|
-
--color-gray-alpha-900-value: hsla(0, 0%, 100%, .61);
|
|
152
|
-
--color-gray-alpha-1000-value: hsla(0, 0%, 100%, .92);
|
|
153
|
+
--color-gray-alpha-100-value: hsla(0, 0%, 100%, 0.06);
|
|
154
|
+
--color-gray-alpha-200-value: hsla(0, 0%, 100%, 0.09);
|
|
155
|
+
--color-gray-alpha-300-value: hsla(0, 0%, 100%, 0.13);
|
|
156
|
+
--color-gray-alpha-400-value: hsla(0, 0%, 100%, 0.14);
|
|
157
|
+
--color-gray-alpha-500-value: hsla(0, 0%, 100%, 0.24);
|
|
158
|
+
--color-gray-alpha-600-value: hsla(0, 0%, 100%, 0.51);
|
|
159
|
+
--color-gray-alpha-700-value: hsla(0, 0%, 100%, 0.54);
|
|
160
|
+
--color-gray-alpha-800-value: hsla(0, 0%, 100%, 0.47);
|
|
161
|
+
--color-gray-alpha-900-value: hsla(0, 0%, 100%, 0.61);
|
|
162
|
+
--color-gray-alpha-1000-value: hsla(0, 0%, 100%, 0.92);
|
|
153
163
|
|
|
154
164
|
--color-gray-100-value: 0, 0%, 10%;
|
|
155
165
|
--color-gray-200-value: 0, 0%, 12%;
|
|
@@ -239,14 +249,27 @@
|
|
|
239
249
|
--color-pink-900-value: 341, 90%, 67%;
|
|
240
250
|
--color-pink-1000-value: 333, 90%, 96%;
|
|
241
251
|
|
|
242
|
-
--shadow-border-default-value: 0 0 0 1px rgba(255,255,255
|
|
243
|
-
--shadow-border-small-value:
|
|
244
|
-
|
|
245
|
-
--shadow-border-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
--shadow-border-
|
|
249
|
-
|
|
252
|
+
--shadow-border-default-value: 0 0 0 1px rgba(255, 255, 255, 0.145);
|
|
253
|
+
--shadow-border-small-value:
|
|
254
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
|
|
255
|
+
--shadow-border-medium-value:
|
|
256
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 2px 2px rgba(0, 0, 0, 0.32),
|
|
257
|
+
0px 8px 8px -8px rgba(0, 0, 0, 0.16);
|
|
258
|
+
--shadow-border-large-value:
|
|
259
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 2px 2px rgba(0, 0, 0, 0.04),
|
|
260
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04);
|
|
261
|
+
--shadow-border-tooltip-value:
|
|
262
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
263
|
+
0px 4px 8px rgba(0, 0, 0, 0.04);
|
|
264
|
+
--shadow-border-menu-value:
|
|
265
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
266
|
+
0px 4px 8px -4px rgba(0, 0, 0, 0.04), 0px 16px 24px -8px rgba(0, 0, 0, 0.06);
|
|
267
|
+
--shadow-border-modal-value:
|
|
268
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
269
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04), 0px 24px 32px -8px rgba(0, 0, 0, 0.06);
|
|
270
|
+
--shadow-border-fullscreen-value:
|
|
271
|
+
0 0 0 1px rgba(255, 255, 255, 0.145), 0px 1px 1px rgba(0, 0, 0, 0.02),
|
|
272
|
+
0px 8px 16px -4px rgba(0, 0, 0, 0.04), 0px 24px 32px -8px rgba(0, 0, 0, 0.06);
|
|
250
273
|
|
|
251
274
|
color-scheme: dark;
|
|
252
275
|
}
|
|
@@ -260,7 +283,9 @@
|
|
|
260
283
|
}
|
|
261
284
|
|
|
262
285
|
@theme inline {
|
|
263
|
-
--font-sans:
|
|
286
|
+
--font-sans:
|
|
287
|
+
'Inter', 'Inter Fallback', 'Geist', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji',
|
|
288
|
+
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
|
264
289
|
|
|
265
290
|
--color-primary: hsl(var(--primary));
|
|
266
291
|
--color-primary-hover: var(--primary-hover);
|
|
@@ -377,8 +402,8 @@
|
|
|
377
402
|
--color-pink-900: hsl(var(--color-pink-900-value));
|
|
378
403
|
--color-pink-1000: hsl(var(--color-pink-1000-value));
|
|
379
404
|
|
|
380
|
-
--default-transition-duration: var(--
|
|
381
|
-
--default-transition-timing-function: var(--
|
|
405
|
+
--default-transition-duration: var(--duration);
|
|
406
|
+
--default-transition-timing-function: var(--timing-function);
|
|
382
407
|
|
|
383
408
|
--z-1: 1;
|
|
384
409
|
--spacing-em: 1em;
|
|
@@ -403,6 +428,22 @@
|
|
|
403
428
|
--text-15px: 15px;
|
|
404
429
|
}
|
|
405
430
|
|
|
431
|
+
@utility default-animation-duration {
|
|
432
|
+
animation-duration: var(--default-transition-duration);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
@utility default-transition-duration {
|
|
436
|
+
transition-duration: var(--default-transition-duration);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@utility default-animation-timing-function {
|
|
440
|
+
animation-timing-function: var(--default-transition-timing-function);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
@utility default-transition-timing-function {
|
|
444
|
+
transition-timing-function: var(--default-transition-timing-function);
|
|
445
|
+
}
|
|
446
|
+
|
|
406
447
|
@utility scrollbar-hidden {
|
|
407
448
|
& {
|
|
408
449
|
scrollbar-width: none;
|
|
@@ -417,13 +458,17 @@
|
|
|
417
458
|
|
|
418
459
|
@utility peer-focus-ring {
|
|
419
460
|
.peer:focus-visible ~ & {
|
|
420
|
-
box-shadow:
|
|
461
|
+
box-shadow:
|
|
462
|
+
0 0 0 2px var(--color-background-100),
|
|
463
|
+
0 0 0 4px hsl(var(--ring));
|
|
421
464
|
}
|
|
422
465
|
}
|
|
423
466
|
|
|
424
467
|
@utility self-focus-ring {
|
|
425
468
|
&:focus-visible {
|
|
426
|
-
box-shadow:
|
|
469
|
+
box-shadow:
|
|
470
|
+
0 0 0 2px var(--color-background-100),
|
|
471
|
+
0 0 0 4px hsl(var(--ring));
|
|
427
472
|
}
|
|
428
473
|
}
|
|
429
474
|
|
|
@@ -446,7 +491,7 @@
|
|
|
446
491
|
@utility dvh-* {
|
|
447
492
|
height: calc(--value(integer) * 1vh);
|
|
448
493
|
|
|
449
|
-
@supports (height:1dvh) {
|
|
494
|
+
@supports (height: 1dvh) {
|
|
450
495
|
height: calc(--value(integer) * 1dvh);
|
|
451
496
|
}
|
|
452
497
|
}
|
|
@@ -454,7 +499,7 @@
|
|
|
454
499
|
@utility max-dvh-* {
|
|
455
500
|
max-height: calc(--value(integer) * 1vh);
|
|
456
501
|
|
|
457
|
-
@supports (height:1dvh) {
|
|
502
|
+
@supports (height: 1dvh) {
|
|
458
503
|
max-height: calc(--value(integer) * 1dvh);
|
|
459
504
|
}
|
|
460
505
|
}
|
|
@@ -470,13 +515,13 @@
|
|
|
470
515
|
border: 1px solid var(--border-color, var(--color-gray-alpha-300));
|
|
471
516
|
|
|
472
517
|
&:not(.is-disabled, .is-readonly):hover {
|
|
473
|
-
--border-color: hsla(var(--primary), .5);
|
|
518
|
+
--border-color: hsla(var(--primary), 0.5);
|
|
474
519
|
}
|
|
475
520
|
|
|
476
|
-
&:not(.is-disabled, .is-readonly)[data-focusing=
|
|
521
|
+
&:not(.is-disabled, .is-readonly)[data-focusing='true'],
|
|
477
522
|
&:not(.is-disabled, .is-readonly):focus-within {
|
|
478
523
|
--border-color: var(--color-primary);
|
|
479
|
-
box-shadow: 0 0 0 3px hsla(var(--primary), .2);
|
|
524
|
+
box-shadow: 0 0 0 3px hsla(var(--primary), 0.2);
|
|
480
525
|
}
|
|
481
526
|
|
|
482
527
|
&.is-error {
|
|
@@ -484,13 +529,15 @@
|
|
|
484
529
|
color: var(--color-red-900) !important;
|
|
485
530
|
}
|
|
486
531
|
|
|
487
|
-
&,
|
|
532
|
+
&,
|
|
533
|
+
&:focus-within,
|
|
534
|
+
&[data-focusing='true'] {
|
|
488
535
|
--border-color: hsl(var(--color-red-900-value));
|
|
489
536
|
box-shadow: 0 0 0 3px hsl(var(--color-red-300-value));
|
|
490
537
|
}
|
|
491
538
|
|
|
492
539
|
&:focus-within,
|
|
493
|
-
&[data-focusing=
|
|
540
|
+
&[data-focusing='true'],
|
|
494
541
|
&:not(.is-disabled, .is-readonly):hover {
|
|
495
542
|
--border-color: hsl(var(--color-red-900-value));
|
|
496
543
|
box-shadow: 0 0 0 3px hsl(var(--color-red-500-value));
|
|
@@ -503,14 +550,14 @@
|
|
|
503
550
|
content: '';
|
|
504
551
|
position: absolute;
|
|
505
552
|
inset: 0;
|
|
506
|
-
background: rgba(0, 0, 0, .4);
|
|
553
|
+
background: rgba(0, 0, 0, 0.4);
|
|
507
554
|
transition: opacity var(--default-transition-duration) var(--default-transition-timing-function);
|
|
508
555
|
pointer-events: none;
|
|
509
556
|
will-change: opacity;
|
|
510
557
|
z-index: 0;
|
|
511
558
|
}
|
|
512
559
|
|
|
513
|
-
[class*=
|
|
560
|
+
[class*='pxd-transition--'] {
|
|
514
561
|
transition-duration: var(--default-transition-duration);
|
|
515
562
|
transition-timing-function: var(--default-transition-timing-function);
|
|
516
563
|
}
|
|
@@ -521,7 +568,7 @@
|
|
|
521
568
|
will-change: opacity;
|
|
522
569
|
}
|
|
523
570
|
|
|
524
|
-
.pxd-container-mask[data-visible=
|
|
571
|
+
.pxd-container-mask[data-visible='false']::after,
|
|
525
572
|
.pxd-transition--fade-enter-from,
|
|
526
573
|
.pxd-transition--fade-leave-to {
|
|
527
574
|
opacity: 0;
|
|
@@ -537,7 +584,7 @@
|
|
|
537
584
|
.pxd-transition--fade-scale-enter-from,
|
|
538
585
|
.pxd-transition--fade-scale-leave-to {
|
|
539
586
|
opacity: 0;
|
|
540
|
-
transform: scale(var(--scale
|
|
587
|
+
transform: scale(var(--scale, 0.95));
|
|
541
588
|
}
|
|
542
589
|
|
|
543
590
|
.line-clamp {
|
|
@@ -565,6 +612,6 @@
|
|
|
565
612
|
|
|
566
613
|
@media (prefers-reduced-motion: reduce) {
|
|
567
614
|
:root {
|
|
568
|
-
--
|
|
615
|
+
--duration: 0 !important;
|
|
569
616
|
}
|
|
570
617
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface AvatarOptions {
|
|
2
2
|
src?: string
|
|
3
3
|
alt?: string
|
|
4
4
|
loading?: boolean
|
|
@@ -7,5 +7,5 @@ interface Options {
|
|
|
7
7
|
export interface AvatarGroupProps {
|
|
8
8
|
max?: number
|
|
9
9
|
size?: number | string
|
|
10
|
-
options?:
|
|
10
|
+
options?: AvatarOptions[]
|
|
11
11
|
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
ComponentAs,
|
|
3
|
+
ComponentShape,
|
|
4
|
+
ComponentSizeWithXs,
|
|
5
|
+
ComponentVariantWithDefault,
|
|
6
|
+
} from '../shared'
|
|
7
|
+
|
|
8
|
+
export type ButtonVariant = ComponentVariantWithDefault | 'ghost' | 'simple' | 'icon' | 'link'
|
|
2
9
|
|
|
3
10
|
export interface ButtonProps {
|
|
4
11
|
as?: ComponentAs
|
|
5
|
-
variant?:
|
|
12
|
+
variant?: ButtonVariant
|
|
6
13
|
size?: ComponentSizeWithXs
|
|
7
|
-
shape?:
|
|
14
|
+
shape?: ComponentShape
|
|
8
15
|
align?: 'left' | 'center' | 'right'
|
|
9
16
|
icon?: boolean
|
|
10
|
-
block?: boolean
|
|
11
17
|
loading?: boolean
|
|
12
18
|
disabled?: boolean
|
|
19
|
+
fullWidth?: boolean
|
|
13
20
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './avatar'
|
|
2
|
+
export * from './button'
|
|
3
|
+
export * from './carousel'
|
|
4
|
+
export * from './checkbox'
|
|
5
|
+
export * from './choicebox'
|
|
6
|
+
export * from './error'
|
|
7
|
+
export * from './input'
|
|
8
|
+
export * from './list'
|
|
9
|
+
export * from './popover'
|
|
10
|
+
export * from './radio'
|
|
11
|
+
export * from './switch'
|
|
12
|
+
export * from './time-picker'
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'vue'
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import type { ComponentSizeWithXs } from '../shared/props'
|
|
3
4
|
|
|
4
5
|
export interface InputProps {
|
|
5
6
|
size?: ComponentSizeWithXs
|
|
@@ -7,7 +8,6 @@ export interface InputProps {
|
|
|
7
8
|
min?: number | string
|
|
8
9
|
max?: number | string
|
|
9
10
|
align?: 'left' | 'center' | 'right'
|
|
10
|
-
label?: ComponentLabel
|
|
11
11
|
readonly?: boolean
|
|
12
12
|
disabled?: boolean
|
|
13
13
|
password?: boolean
|
|
@@ -18,13 +18,12 @@ export interface InputProps {
|
|
|
18
18
|
minlength?: number | string
|
|
19
19
|
maxlength?: number | string
|
|
20
20
|
clearable?: boolean
|
|
21
|
-
|
|
21
|
+
clearValue?: string | number | null | undefined
|
|
22
|
+
modelValue?: string | number | null | undefined
|
|
22
23
|
placeholder?: string
|
|
23
24
|
prefixStyle?: boolean
|
|
24
25
|
suffixStyle?: boolean
|
|
25
26
|
prefixClass?: ComponentClass
|
|
26
27
|
suffixClass?: ComponentClass
|
|
27
28
|
selectOnFocus?: boolean
|
|
28
|
-
parser?: (value?: any) => any
|
|
29
|
-
formatter?: (value?: any) => any
|
|
30
29
|
}
|
|
@@ -6,7 +6,7 @@ export interface ListOption extends Record<string, any> {
|
|
|
6
6
|
label?: ComponentLabel
|
|
7
7
|
disabled?: boolean
|
|
8
8
|
description?: ComponentLabel
|
|
9
|
-
onClick?: (
|
|
9
|
+
onClick?: (item: ListOptionSelected, ev: MouseEvent) => void
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type ListOptionSelected = Omit<ListOption, 'as' | 'onClick'>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentOption, ComponentSize } from '../shared'
|
|
2
2
|
|
|
3
3
|
export interface SwitchGroupProps {
|
|
4
|
-
block?: boolean
|
|
5
4
|
disabled?: boolean
|
|
6
5
|
required?: boolean
|
|
6
|
+
fullWidth?: boolean
|
|
7
7
|
size?: ComponentSize
|
|
8
8
|
options?: ComponentOption[]
|
|
9
9
|
modelValue?: string | number
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { VNode } from 'vue'
|
|
2
|
+
|
|
2
3
|
import type { Awaitable } from './utils'
|
|
3
4
|
|
|
4
5
|
export type ComponentVariant = 'primary' | 'error' | 'warning' | 'success'
|
|
@@ -7,6 +8,7 @@ export type ComponentVariantWithDefault = ComponentVariant | 'default'
|
|
|
7
8
|
export type ComponentSize = 'sm' | 'md' | 'lg'
|
|
8
9
|
export type ComponentSizeWithXs = ComponentSize | 'xs'
|
|
9
10
|
|
|
11
|
+
export type ComponentShape = 'default' | 'square' | 'rounded'
|
|
10
12
|
export type ComponentBreakpointKeys = 'xs' | 'sm' | 'md' | 'lg' | 'xl'
|
|
11
13
|
export type ComponentBreakpoint<T = string> = Record<ComponentBreakpointKeys, T>
|
|
12
14
|
|
|
@@ -19,10 +21,10 @@ export type ComponentClass = string | any[] | Record<string, any>
|
|
|
19
21
|
export type ComponentDirection = 'horizontal' | 'vertical'
|
|
20
22
|
|
|
21
23
|
export type BasePosition = 'top' | 'bottom' | 'left' | 'right'
|
|
22
|
-
export type ComponentPosition<Position extends string = BasePosition>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
export type ComponentPosition<Position extends string = BasePosition> =
|
|
25
|
+
| Position
|
|
26
|
+
| `${Position}-start`
|
|
27
|
+
| `${Position}-end`
|
|
26
28
|
|
|
27
29
|
export type ResponsiveValue<T> = T | Partial<ComponentBreakpoint<T>>
|
|
28
30
|
|
|
@@ -10,4 +10,6 @@ export type CSSValue = Numeric | CSSUnitValue
|
|
|
10
10
|
|
|
11
11
|
export type MaybeElement = Nullable<HTMLElement | SVGElement | ComponentPublicInstance>
|
|
12
12
|
export type MaybeElementRef<T extends MaybeElement = MaybeElement> = MaybeRefOrGetter<Nullable<T>>
|
|
13
|
-
export type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeRefOrGetter<
|
|
13
|
+
export type MaybeComputedElementRef<T extends MaybeElement = MaybeElement> = MaybeRefOrGetter<
|
|
14
|
+
Nullable<T>
|
|
15
|
+
>
|
package/dist/utils/context.d.ts
CHANGED
|
@@ -2,14 +2,8 @@ type InjectContextStrict<T> = ((fallback?: T) => T) & ((fallback: null) => T | n
|
|
|
2
2
|
/**
|
|
3
3
|
* @param providerComponentName - The name of the component providing the context.
|
|
4
4
|
*/
|
|
5
|
-
export declare function createContext<ContextValue>(providerComponentName: string): readonly [
|
|
6
|
-
|
|
7
|
-
InjectContextStrict<ContextValue>
|
|
8
|
-
];
|
|
9
|
-
export declare function createContext<ContextValue>(providerComponentName: string, fallbackValue: ContextValue): readonly [
|
|
10
|
-
(contextValue: ContextValue) => ContextValue,
|
|
11
|
-
InjectContextStrict<ContextValue>
|
|
12
|
-
];
|
|
5
|
+
export declare function createContext<ContextValue>(providerComponentName: string): readonly [(contextValue: ContextValue) => ContextValue, InjectContextStrict<ContextValue>];
|
|
6
|
+
export declare function createContext<ContextValue>(providerComponentName: string, fallbackValue: ContextValue): readonly [(contextValue: ContextValue) => ContextValue, InjectContextStrict<ContextValue>];
|
|
13
7
|
export declare function createContext<ContextValue>(providerComponentName: string, fallbackValue: null): readonly [
|
|
14
8
|
(contextValue: ContextValue) => ContextValue,
|
|
15
9
|
(fallback?: ContextValue | null) => ContextValue | null
|
package/dist/utils/date.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import dayjs from 'dayjs/esm/index.js';
|
|
2
2
|
import dayjsDurationPlugin from 'dayjs/esm/plugin/duration/index.js';
|
|
3
3
|
import dayjsMillisecondTokenPlugin from '../plugins/dayjs-millisecond-token.js';
|
|
4
|
-
export { dayjs, dayjsDurationPlugin, dayjsMillisecondTokenPlugin
|
|
4
|
+
export { dayjs, dayjsDurationPlugin, dayjsMillisecondTokenPlugin };
|
|
5
5
|
interface Result<T> {
|
|
6
6
|
years: number[];
|
|
7
7
|
months: number[];
|
package/dist/utils/date.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import dayjs from "dayjs/esm/index.js";
|
|
2
2
|
import dayjsDurationPlugin from "dayjs/esm/plugin/duration/index.js";
|
|
3
3
|
import dayjsMillisecondTokenPlugin from "../plugins/dayjs-millisecond-token.js";
|
|
4
|
-
export {
|
|
5
|
-
dayjs,
|
|
6
|
-
dayjsDurationPlugin,
|
|
7
|
-
dayjsMillisecondTokenPlugin
|
|
8
|
-
};
|
|
4
|
+
export { dayjs, dayjsDurationPlugin, dayjsMillisecondTokenPlugin };
|
|
9
5
|
export function getAllDatesBetween(startDate, endDate, format = "string") {
|
|
10
6
|
const start = dayjs(startDate);
|
|
11
7
|
const end = dayjs(endDate);
|
package/dist/utils/event.js
CHANGED
|
@@ -8,11 +8,7 @@ export function on(el, event, handler, options) {
|
|
|
8
8
|
return () => {
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
el.addEventListener(
|
|
12
|
-
event,
|
|
13
|
-
handler,
|
|
14
|
-
options
|
|
15
|
-
);
|
|
11
|
+
el.addEventListener(event, handler, options);
|
|
16
12
|
return () => {
|
|
17
13
|
off(el, event, handler, options);
|
|
18
14
|
};
|
|
@@ -21,24 +17,16 @@ export function off(el, event, handler, options) {
|
|
|
21
17
|
if (!el) {
|
|
22
18
|
return;
|
|
23
19
|
}
|
|
24
|
-
el.removeEventListener(
|
|
25
|
-
event,
|
|
26
|
-
handler,
|
|
27
|
-
options
|
|
28
|
-
);
|
|
20
|
+
el.removeEventListener(event, handler, options);
|
|
29
21
|
}
|
|
30
22
|
export function once(el, event, handler, options) {
|
|
31
23
|
if (!el) {
|
|
32
24
|
return;
|
|
33
25
|
}
|
|
34
|
-
el.addEventListener(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
...options,
|
|
39
|
-
once: true
|
|
40
|
-
}
|
|
41
|
-
);
|
|
26
|
+
el.addEventListener(event, handler, {
|
|
27
|
+
...options,
|
|
28
|
+
once: true
|
|
29
|
+
});
|
|
42
30
|
}
|
|
43
31
|
export function cachedOn(el, event, handler, options) {
|
|
44
32
|
if (!el) {
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare function pascalize(text: string): string;
|
|
|
9
9
|
export declare function uncapitalize(text: string): string;
|
|
10
10
|
/** 'kabab-case' -> 'Kabab Case' */
|
|
11
11
|
export declare function humanize(text: string): string;
|
|
12
|
-
export declare function isTruthyProp(value: unknown):
|
|
12
|
+
export declare function isTruthyProp(value: unknown): boolean;
|
|
13
13
|
export declare function clampValue(n: number, min: number, max: number): number;
|
|
14
14
|
export declare function isExternalLink(href: string): boolean;
|
|
15
15
|
export declare function toArray(value: unknown | unknown[]): any[];
|
package/dist/utils/format.js
CHANGED
|
@@ -16,7 +16,7 @@ export function humanize(text) {
|
|
|
16
16
|
return text.replace(/-/g, " ").replace(/\b\w/g, (char) => char.toUpperCase());
|
|
17
17
|
}
|
|
18
18
|
export function isTruthyProp(value) {
|
|
19
|
-
return value || value === "";
|
|
19
|
+
return Boolean(value) || value === "";
|
|
20
20
|
}
|
|
21
21
|
export function clampValue(n, min, max) {
|
|
22
22
|
return min != null && max != null ? Math.min(Math.max(n, min), max) : n;
|
package/dist/utils/is.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const isVue3: () => boolean;
|
|
2
2
|
export declare const isServer: () => boolean;
|
|
3
3
|
export declare const isTouchDevice: () => boolean;
|
|
4
|
-
export declare const isNotNullish: <T>(value: T) => value is NonNullable<T>;
|
|
5
4
|
export declare function isIOS(): boolean | "";
|
package/dist/utils/is.js
CHANGED
|
@@ -2,7 +2,8 @@ import { version } from "vue";
|
|
|
2
2
|
export const isVue3 = () => version.startsWith("3");
|
|
3
3
|
export const isServer = () => typeof document === "undefined";
|
|
4
4
|
export const isTouchDevice = () => isServer() ? false : "ontouchstart" in document;
|
|
5
|
-
export const isNotNullish = (value) => value != null;
|
|
6
5
|
export function isIOS() {
|
|
7
|
-
return !isServer() && navigator?.userAgent && (/iP(?:ad|hone|od)/.test(navigator.userAgent) ||
|
|
6
|
+
return !isServer() && navigator?.userAgent && (/iP(?:ad|hone|od)/.test(navigator.userAgent) || // The new iPad Pro Gen3 does not identify itself as iPad, but as Macintosh.
|
|
7
|
+
// https://github.com/vueuse/vueuse/issues/3577
|
|
8
|
+
navigator?.maxTouchPoints > 2 && /iPad|Macintosh/.test(navigator.userAgent));
|
|
8
9
|
}
|
package/dist/utils/responsive.js
CHANGED
|
@@ -3,8 +3,11 @@ export function getResponsiveValue(prop, xsValue, valueSetter) {
|
|
|
3
3
|
xsValue ? { xs: xsValue } : {},
|
|
4
4
|
typeof prop === "object" ? prop : {}
|
|
5
5
|
);
|
|
6
|
-
return Object.entries(formatted).reduce(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return Object.entries(formatted).reduce(
|
|
7
|
+
(acc, [bp, value]) => {
|
|
8
|
+
valueSetter(acc, bp, value);
|
|
9
|
+
return acc;
|
|
10
|
+
},
|
|
11
|
+
{}
|
|
12
|
+
);
|
|
10
13
|
}
|
package/dist/utils/throttle.js
CHANGED
|
@@ -2,10 +2,12 @@ export { throttle } from "es-toolkit/function";
|
|
|
2
2
|
export function throttleByRaf(callback) {
|
|
3
3
|
let timer;
|
|
4
4
|
const throttle2 = (...args) => {
|
|
5
|
-
|
|
5
|
+
if (timer) {
|
|
6
|
+
window.cancelAnimationFrame(timer);
|
|
7
|
+
}
|
|
6
8
|
timer = window.requestAnimationFrame(() => {
|
|
7
9
|
callback(...args);
|
|
8
|
-
timer =
|
|
10
|
+
timer = -1;
|
|
9
11
|
});
|
|
10
12
|
};
|
|
11
13
|
throttle2.cancel = () => {
|