ropav 0.0.5 → 0.0.6
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 +20 -51
- package/dist/base.css +21 -0
- package/dist/button-group.css +50 -0
- package/dist/button-group.js +49 -0
- package/dist/button-group.js.map +1 -0
- package/dist/button.css +72 -42
- package/dist/button.js +41 -31
- package/dist/button.js.map +1 -1
- package/dist/checkbox.css +105 -102
- package/dist/checkbox.js +18 -6
- package/dist/checkbox.js.map +1 -1
- package/dist/componentColors.js +22 -0
- package/dist/componentColors.js.map +1 -0
- package/dist/components/button/button.d.ts +2 -0
- package/dist/components/button/types.d.ts +2 -1
- package/dist/components/button/useButtonColor.d.ts +13 -0
- package/dist/components/button-group/button-group.d.ts +21 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/button-group/index.js +2 -0
- package/dist/components/button-group/types.d.ts +10 -0
- package/dist/components/checkbox/types.d.ts +2 -1
- package/dist/components/checkbox/useCheckbox.d.ts +4 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.js +2 -0
- package/dist/components/progress/progress.d.ts +27 -0
- package/dist/components/progress/types.d.ts +24 -0
- package/dist/components/progress/useProgress.d.ts +28 -0
- package/dist/components/radio/types.d.ts +2 -1
- package/dist/components/radio/useRadio.d.ts +4 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.js +2 -0
- package/dist/components/slider/slider.d.ts +35 -0
- package/dist/components/slider/types.d.ts +50 -0
- package/dist/components/slider/useSlider.d.ts +50 -0
- package/dist/components/switch/types.d.ts +2 -1
- package/dist/components/switch/useSwitch.d.ts +3 -0
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/types.d.ts +5 -0
- package/dist/components/textarea/useTextarea.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.js +2 -0
- package/dist/components/tooltip/tooltip.d.ts +27 -0
- package/dist/components/tooltip/types.d.ts +29 -0
- package/dist/components/tooltip/useTooltip.d.ts +17 -0
- package/dist/icon-button.css +82 -49
- package/dist/icon-button.js +13 -9
- package/dist/icon-button.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -1
- package/dist/progress.css +125 -0
- package/dist/progress.js +177 -0
- package/dist/progress.js.map +1 -0
- package/dist/radio.css +83 -83
- package/dist/radio.js +18 -6
- package/dist/radio.js.map +1 -1
- package/dist/select.css +3 -1
- package/dist/select.js +7 -0
- package/dist/select.js.map +1 -1
- package/dist/slider.css +438 -0
- package/dist/slider.js +412 -0
- package/dist/slider.js.map +1 -0
- package/dist/switch.css +77 -77
- package/dist/switch.js +15 -6
- package/dist/switch.js.map +1 -1
- package/dist/textarea.css +33 -26
- package/dist/textarea.js +106 -15
- package/dist/textarea.js.map +1 -1
- package/dist/tooltip.css +136 -0
- package/dist/tooltip.js +384 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/useButtonColor.js +33 -0
- package/dist/useButtonColor.js.map +1 -0
- package/package.json +18 -2
- package/src/styles/_mixins.scss +17 -0
- package/src/styles/_utilities.scss +13 -0
- package/src/styles/base.scss +1 -0
- package/dist/loader-circle.js +0 -14
- package/dist/loader-circle.js.map +0 -1
package/dist/checkbox.css
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
.rp-checkbox[data-v-
|
|
2
|
-
--
|
|
3
|
-
--
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--
|
|
10
|
-
--
|
|
11
|
-
--
|
|
12
|
-
--
|
|
1
|
+
.rp-checkbox[data-v-8af73824] {
|
|
2
|
+
--_rp-checkbox-color: var(--_rp-checkbox-custom-color, var(--rp-color-control-selected-bg));
|
|
3
|
+
--_rp-checkbox-on-color: var(
|
|
4
|
+
--_rp-checkbox-custom-on-color,
|
|
5
|
+
var(--rp-color-control-selected-fg)
|
|
6
|
+
);
|
|
7
|
+
--_rp-checkbox-size: 18px;
|
|
8
|
+
--_rp-checkbox-icon-size: 14px;
|
|
9
|
+
--_rp-checkbox-font-size: var(--rp-font-size-base);
|
|
10
|
+
--_rp-checkbox-radius: 4px;
|
|
11
|
+
--_rp-checkbox-checked-bg: var(--_rp-checkbox-color);
|
|
12
|
+
--_rp-checkbox-checked-border: var(--_rp-checkbox-color);
|
|
13
|
+
--_rp-checkbox-checked-icon: var(--_rp-checkbox-on-color);
|
|
14
|
+
--_rp-checkbox-invalid-border: var(--rp-color-danger);
|
|
15
|
+
--_rp-checkbox-invalid-ring: color-mix(in srgb, var(--rp-color-danger) 32%, transparent);
|
|
13
16
|
display: inline-flex;
|
|
14
17
|
align-items: center;
|
|
15
18
|
cursor: pointer;
|
|
@@ -17,19 +20,19 @@
|
|
|
17
20
|
user-select: none;
|
|
18
21
|
vertical-align: top;
|
|
19
22
|
}
|
|
20
|
-
html.dark .rp-checkbox[data-v-
|
|
21
|
-
--
|
|
22
|
-
--
|
|
23
|
+
html.dark .rp-checkbox[data-v-8af73824] {
|
|
24
|
+
--_rp-checkbox-invalid-border: var(--rp-color-danger-fg);
|
|
25
|
+
--_rp-checkbox-invalid-ring: color-mix(in srgb, var(--rp-color-danger-fg) 32%, transparent);
|
|
23
26
|
}
|
|
24
|
-
.rp-checkbox--disabled[data-v-
|
|
27
|
+
.rp-checkbox--disabled[data-v-8af73824] {
|
|
25
28
|
opacity: var(--rp-opacity-disabled);
|
|
26
29
|
cursor: not-allowed;
|
|
27
30
|
}
|
|
28
|
-
.rp-checkbox[data-v-
|
|
31
|
+
.rp-checkbox[data-v-8af73824] {
|
|
29
32
|
gap: var(--rp-spacing-2);
|
|
30
|
-
font-size: var(--
|
|
33
|
+
font-size: var(--_rp-checkbox-font-size);
|
|
31
34
|
}
|
|
32
|
-
.rp-checkbox__native[data-v-
|
|
35
|
+
.rp-checkbox__native[data-v-8af73824] {
|
|
33
36
|
position: absolute;
|
|
34
37
|
width: 1px;
|
|
35
38
|
height: 1px;
|
|
@@ -41,139 +44,139 @@ html.dark .rp-checkbox[data-v-7333dac7] {
|
|
|
41
44
|
border-width: 0;
|
|
42
45
|
pointer-events: none;
|
|
43
46
|
}
|
|
44
|
-
.rp-checkbox__native:focus-visible + .rp-checkbox__box[data-v-
|
|
47
|
+
.rp-checkbox__native:focus-visible + .rp-checkbox__box[data-v-8af73824] {
|
|
45
48
|
border-color: var(--rp-color-primary);
|
|
46
49
|
box-shadow: 0 0 0 var(--rp-border-width-medium) var(--rp-color-focus-ring);
|
|
47
50
|
}
|
|
48
|
-
.rp-checkbox__box[data-v-
|
|
51
|
+
.rp-checkbox__box[data-v-8af73824] {
|
|
49
52
|
display: inline-flex;
|
|
50
53
|
align-items: center;
|
|
51
54
|
justify-content: center;
|
|
52
|
-
width: var(--
|
|
53
|
-
height: var(--
|
|
55
|
+
width: var(--_rp-checkbox-size);
|
|
56
|
+
height: var(--_rp-checkbox-size);
|
|
54
57
|
flex-shrink: 0;
|
|
55
58
|
border: var(--rp-border-width-medium) solid var(--rp-color-control-border);
|
|
56
|
-
border-radius: var(--
|
|
59
|
+
border-radius: var(--_rp-checkbox-radius);
|
|
57
60
|
background-color: var(--rp-color-control-bg);
|
|
58
61
|
transition: background-color var(--rp-transition-fast), border-color var(--rp-transition-fast);
|
|
59
62
|
}
|
|
60
|
-
.rp-checkbox--checked .rp-checkbox__box[data-v-
|
|
61
|
-
background-color: var(--
|
|
62
|
-
border-color: var(--
|
|
63
|
+
.rp-checkbox--checked .rp-checkbox__box[data-v-8af73824], .rp-checkbox--indeterminate .rp-checkbox__box[data-v-8af73824] {
|
|
64
|
+
background-color: var(--_rp-checkbox-checked-bg);
|
|
65
|
+
border-color: var(--_rp-checkbox-checked-border);
|
|
63
66
|
}
|
|
64
|
-
.rp-checkbox--invalid .rp-checkbox__box[data-v-
|
|
65
|
-
border-color: var(--
|
|
67
|
+
.rp-checkbox--invalid .rp-checkbox__box[data-v-8af73824] {
|
|
68
|
+
border-color: var(--_rp-checkbox-invalid-border);
|
|
66
69
|
}
|
|
67
|
-
.rp-checkbox--invalid .rp-checkbox__native:focus-visible + .rp-checkbox__box[data-v-
|
|
68
|
-
border-color: var(--
|
|
69
|
-
box-shadow: 0 0 0 var(--rp-border-width-medium) var(--
|
|
70
|
+
.rp-checkbox--invalid .rp-checkbox__native:focus-visible + .rp-checkbox__box[data-v-8af73824] {
|
|
71
|
+
border-color: var(--_rp-checkbox-invalid-border);
|
|
72
|
+
box-shadow: 0 0 0 var(--rp-border-width-medium) var(--_rp-checkbox-invalid-ring);
|
|
70
73
|
}
|
|
71
|
-
.rp-checkbox__icon[data-v-
|
|
72
|
-
width: var(--
|
|
73
|
-
height: var(--
|
|
74
|
-
color: var(--
|
|
74
|
+
.rp-checkbox__icon[data-v-8af73824] {
|
|
75
|
+
width: var(--_rp-checkbox-icon-size);
|
|
76
|
+
height: var(--_rp-checkbox-icon-size);
|
|
77
|
+
color: var(--_rp-checkbox-checked-icon);
|
|
75
78
|
transform-origin: center;
|
|
76
79
|
}
|
|
77
|
-
.rp-checkbox__icon[data-v-
|
|
80
|
+
.rp-checkbox__icon[data-v-8af73824] [stroke-width] {
|
|
78
81
|
stroke-width: 3;
|
|
79
82
|
}
|
|
80
|
-
.rp-checkbox__label[data-v-
|
|
83
|
+
.rp-checkbox__label[data-v-8af73824] {
|
|
81
84
|
line-height: var(--rp-line-height-normal);
|
|
82
85
|
color: var(--rp-color-text);
|
|
83
86
|
}
|
|
84
|
-
.rp-checkbox--color-primary[data-v-
|
|
85
|
-
--
|
|
86
|
-
--
|
|
87
|
+
.rp-checkbox--color-primary[data-v-8af73824] {
|
|
88
|
+
--_rp-checkbox-color: var(--rp-color-primary);
|
|
89
|
+
--_rp-checkbox-on-color: var(--rp-color-on-primary);
|
|
87
90
|
}
|
|
88
|
-
.rp-checkbox--color-secondary[data-v-
|
|
89
|
-
--
|
|
90
|
-
--
|
|
91
|
+
.rp-checkbox--color-secondary[data-v-8af73824] {
|
|
92
|
+
--_rp-checkbox-color: var(--rp-color-secondary);
|
|
93
|
+
--_rp-checkbox-on-color: var(--rp-color-on-secondary);
|
|
91
94
|
}
|
|
92
|
-
.rp-checkbox--color-success[data-v-
|
|
93
|
-
--
|
|
94
|
-
--
|
|
95
|
+
.rp-checkbox--color-success[data-v-8af73824] {
|
|
96
|
+
--_rp-checkbox-color: var(--rp-color-success);
|
|
97
|
+
--_rp-checkbox-on-color: var(--rp-color-on-success);
|
|
95
98
|
}
|
|
96
|
-
.rp-checkbox--color-warning[data-v-
|
|
97
|
-
--
|
|
98
|
-
--
|
|
99
|
+
.rp-checkbox--color-warning[data-v-8af73824] {
|
|
100
|
+
--_rp-checkbox-color: var(--rp-color-warning);
|
|
101
|
+
--_rp-checkbox-on-color: var(--rp-color-on-warning);
|
|
99
102
|
}
|
|
100
|
-
.rp-checkbox--color-danger[data-v-
|
|
101
|
-
--
|
|
102
|
-
--
|
|
103
|
+
.rp-checkbox--color-danger[data-v-8af73824] {
|
|
104
|
+
--_rp-checkbox-color: var(--rp-color-danger);
|
|
105
|
+
--_rp-checkbox-on-color: var(--rp-color-on-danger);
|
|
103
106
|
}
|
|
104
|
-
.rp-checkbox--color-info[data-v-
|
|
105
|
-
--
|
|
106
|
-
--
|
|
107
|
+
.rp-checkbox--color-info[data-v-8af73824] {
|
|
108
|
+
--_rp-checkbox-color: var(--rp-color-info);
|
|
109
|
+
--_rp-checkbox-on-color: var(--rp-color-on-info);
|
|
107
110
|
}
|
|
108
|
-
.rp-checkbox--color-neutral[data-v-
|
|
109
|
-
--
|
|
110
|
-
--
|
|
111
|
+
.rp-checkbox--color-neutral[data-v-8af73824] {
|
|
112
|
+
--_rp-checkbox-color: var(--rp-color-neutral);
|
|
113
|
+
--_rp-checkbox-on-color: var(--rp-color-on-neutral);
|
|
111
114
|
}
|
|
112
|
-
.rp-checkbox--outline[data-v-
|
|
113
|
-
--
|
|
114
|
-
--
|
|
115
|
-
--
|
|
115
|
+
.rp-checkbox--outline[data-v-8af73824] {
|
|
116
|
+
--_rp-checkbox-checked-bg: var(--rp-color-control-bg);
|
|
117
|
+
--_rp-checkbox-checked-border: var(--_rp-checkbox-color);
|
|
118
|
+
--_rp-checkbox-checked-icon: var(--_rp-checkbox-color);
|
|
116
119
|
}
|
|
117
|
-
.rp-checkbox--size-xs[data-v-
|
|
118
|
-
--
|
|
119
|
-
--
|
|
120
|
-
--
|
|
120
|
+
.rp-checkbox--size-xs[data-v-8af73824] {
|
|
121
|
+
--_rp-checkbox-size: 14px;
|
|
122
|
+
--_rp-checkbox-icon-size: 10px;
|
|
123
|
+
--_rp-checkbox-font-size: var(--rp-font-size-xs);
|
|
121
124
|
}
|
|
122
|
-
.rp-checkbox--size-sm[data-v-
|
|
123
|
-
--
|
|
124
|
-
--
|
|
125
|
-
--
|
|
125
|
+
.rp-checkbox--size-sm[data-v-8af73824] {
|
|
126
|
+
--_rp-checkbox-size: 16px;
|
|
127
|
+
--_rp-checkbox-icon-size: 12px;
|
|
128
|
+
--_rp-checkbox-font-size: var(--rp-font-size-sm);
|
|
126
129
|
}
|
|
127
|
-
.rp-checkbox--size-md[data-v-
|
|
128
|
-
--
|
|
129
|
-
--
|
|
130
|
-
--
|
|
130
|
+
.rp-checkbox--size-md[data-v-8af73824] {
|
|
131
|
+
--_rp-checkbox-size: 18px;
|
|
132
|
+
--_rp-checkbox-icon-size: 14px;
|
|
133
|
+
--_rp-checkbox-font-size: var(--rp-font-size-base);
|
|
131
134
|
}
|
|
132
|
-
.rp-checkbox--size-lg[data-v-
|
|
133
|
-
--
|
|
134
|
-
--
|
|
135
|
-
--
|
|
135
|
+
.rp-checkbox--size-lg[data-v-8af73824] {
|
|
136
|
+
--_rp-checkbox-size: 22px;
|
|
137
|
+
--_rp-checkbox-icon-size: 16px;
|
|
138
|
+
--_rp-checkbox-font-size: var(--rp-font-size-lg);
|
|
136
139
|
}
|
|
137
|
-
.rp-checkbox--size-xl[data-v-
|
|
138
|
-
--
|
|
139
|
-
--
|
|
140
|
-
--
|
|
140
|
+
.rp-checkbox--size-xl[data-v-8af73824] {
|
|
141
|
+
--_rp-checkbox-size: 26px;
|
|
142
|
+
--_rp-checkbox-icon-size: 20px;
|
|
143
|
+
--_rp-checkbox-font-size: var(--rp-font-size-xl);
|
|
141
144
|
}
|
|
142
|
-
.rp-checkbox--radius-xs[data-v-
|
|
143
|
-
--
|
|
145
|
+
.rp-checkbox--radius-xs[data-v-8af73824] {
|
|
146
|
+
--_rp-checkbox-radius: 2px;
|
|
144
147
|
}
|
|
145
|
-
.rp-checkbox--radius-sm[data-v-
|
|
146
|
-
--
|
|
148
|
+
.rp-checkbox--radius-sm[data-v-8af73824] {
|
|
149
|
+
--_rp-checkbox-radius: 4px;
|
|
147
150
|
}
|
|
148
|
-
.rp-checkbox--radius-md[data-v-
|
|
149
|
-
--
|
|
151
|
+
.rp-checkbox--radius-md[data-v-8af73824] {
|
|
152
|
+
--_rp-checkbox-radius: 6px;
|
|
150
153
|
}
|
|
151
|
-
.rp-checkbox--radius-lg[data-v-
|
|
152
|
-
--
|
|
154
|
+
.rp-checkbox--radius-lg[data-v-8af73824] {
|
|
155
|
+
--_rp-checkbox-radius: 8px;
|
|
153
156
|
}
|
|
154
|
-
.rp-checkbox--radius-xl[data-v-
|
|
155
|
-
--
|
|
157
|
+
.rp-checkbox--radius-xl[data-v-8af73824] {
|
|
158
|
+
--_rp-checkbox-radius: var(--rp-radius-full);
|
|
156
159
|
}
|
|
157
|
-
.rp-checkbox-icon-enter-active[data-v-
|
|
158
|
-
.rp-checkbox-icon-leave-active[data-v-
|
|
160
|
+
.rp-checkbox-icon-enter-active[data-v-8af73824],
|
|
161
|
+
.rp-checkbox-icon-leave-active[data-v-8af73824] {
|
|
159
162
|
transition: opacity var(--rp-transition-base), transform var(--rp-transition-base);
|
|
160
163
|
}
|
|
161
|
-
.rp-checkbox-icon-enter-from[data-v-
|
|
162
|
-
.rp-checkbox-icon-leave-to[data-v-
|
|
164
|
+
.rp-checkbox-icon-enter-from[data-v-8af73824],
|
|
165
|
+
.rp-checkbox-icon-leave-to[data-v-8af73824] {
|
|
163
166
|
opacity: 0;
|
|
164
167
|
transform: translateY(3px) scale(0.85);
|
|
165
168
|
}
|
|
166
|
-
.rp-checkbox-icon-enter-to[data-v-
|
|
167
|
-
.rp-checkbox-icon-leave-from[data-v-
|
|
169
|
+
.rp-checkbox-icon-enter-to[data-v-8af73824],
|
|
170
|
+
.rp-checkbox-icon-leave-from[data-v-8af73824] {
|
|
168
171
|
opacity: 1;
|
|
169
172
|
transform: translateY(0) scale(1);
|
|
170
173
|
}
|
|
171
|
-
.rp-checkbox-icon-leave-to[data-v-
|
|
174
|
+
.rp-checkbox-icon-leave-to[data-v-8af73824] {
|
|
172
175
|
transform: translateY(-3px) scale(0.85);
|
|
173
176
|
}
|
|
174
177
|
@media (prefers-reduced-motion: reduce) {
|
|
175
|
-
.rp-checkbox-icon-enter-active[data-v-
|
|
176
|
-
.rp-checkbox-icon-leave-active[data-v-
|
|
178
|
+
.rp-checkbox-icon-enter-active[data-v-8af73824],
|
|
179
|
+
.rp-checkbox-icon-leave-active[data-v-8af73824] {
|
|
177
180
|
transition: none;
|
|
178
181
|
}
|
|
179
182
|
}
|
package/dist/checkbox.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import './checkbox.css';
|
|
2
|
+
import { n as getComponentCustomColor, r as isComponentPresetColor } from "./componentColors.js";
|
|
2
3
|
import { n as bem, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
3
4
|
import { t as useControlState } from "./useControlState.js";
|
|
4
|
-
import { VaporTransition, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, markRaw, next, on, renderEffect, setAttr, setBlockKey, setClass, setInsertionState, setProp, template, unref } from "vue";
|
|
5
|
+
import { VaporTransition, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, markRaw, next, on, renderEffect, setAttr, setBlockKey, setClass, setInsertionState, setProp, setStyle, template, unref } from "vue";
|
|
5
6
|
//#region ~icons/lucide/check
|
|
6
7
|
var t0$2 = template("<svg viewBox=\"0 0 24 24\"width=1.2em height=1.2em><path fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 d=\"M20 6L9 17l-5-5\">", 3, 1);
|
|
7
8
|
function render$1(_ctx) {
|
|
@@ -23,6 +24,14 @@ var minus_default = markRaw(defineVaporComponent({
|
|
|
23
24
|
}));
|
|
24
25
|
//#endregion
|
|
25
26
|
//#region src/components/checkbox/useCheckbox.ts
|
|
27
|
+
function getCheckboxColorStyle(color) {
|
|
28
|
+
const customColor = getComponentCustomColor(color);
|
|
29
|
+
if (!customColor) return void 0;
|
|
30
|
+
return {
|
|
31
|
+
"--_rp-checkbox-custom-color": customColor,
|
|
32
|
+
"--_rp-checkbox-custom-on-color": "var(--rp-color-on-primary)"
|
|
33
|
+
};
|
|
34
|
+
}
|
|
26
35
|
function useCheckbox(props, emitUpdate) {
|
|
27
36
|
const control = useControlState(props);
|
|
28
37
|
const rootClass = computed(() => bem("rp-checkbox", {
|
|
@@ -31,23 +40,25 @@ function useCheckbox(props, emitUpdate) {
|
|
|
31
40
|
disabled: control.disabled,
|
|
32
41
|
invalid: control.invalid,
|
|
33
42
|
[props.variant ?? ""]: Boolean(props.variant),
|
|
34
|
-
[`color-${props.color}`]:
|
|
43
|
+
[`color-${props.color}`]: isComponentPresetColor(props.color),
|
|
35
44
|
[`size-${props.size}`]: Boolean(props.size),
|
|
36
45
|
[`radius-${props.radius}`]: Boolean(props.radius)
|
|
37
46
|
}));
|
|
47
|
+
const rootStyle = computed(() => getCheckboxColorStyle(props.color));
|
|
38
48
|
function onChange(e) {
|
|
39
49
|
emitUpdate(e.target.checked);
|
|
40
50
|
}
|
|
41
51
|
return {
|
|
42
52
|
control,
|
|
43
53
|
rootClass,
|
|
54
|
+
rootStyle,
|
|
44
55
|
onChange
|
|
45
56
|
};
|
|
46
57
|
}
|
|
47
58
|
//#endregion
|
|
48
59
|
//#region src/components/checkbox/checkbox.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
49
|
-
var t0 = template("<span data-v-
|
|
50
|
-
var t1 = template("<label data-v-
|
|
60
|
+
var t0 = template("<span data-v-8af73824 class=rp-checkbox__label>");
|
|
61
|
+
var t1 = template("<label data-v-8af73824><input data-v-8af73824 type=checkbox class=rp-checkbox__native><span data-v-8af73824 class=rp-checkbox__box></span>", 1);
|
|
51
62
|
//#endregion
|
|
52
63
|
//#region src/components/checkbox/checkbox.vue
|
|
53
64
|
var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
@@ -85,7 +96,7 @@ var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
85
96
|
setup(__props, { emit: __emit, slots: $slots }) {
|
|
86
97
|
const props = __props;
|
|
87
98
|
const emit = __emit;
|
|
88
|
-
const { control, rootClass, onChange } = useCheckbox(props, (value) => {
|
|
99
|
+
const { control, rootClass, rootStyle, onChange } = useCheckbox(props, (value) => {
|
|
89
100
|
emit("update:modelValue", value);
|
|
90
101
|
});
|
|
91
102
|
const n13 = t1();
|
|
@@ -99,6 +110,7 @@ var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
99
110
|
const _control_disabled = _control.disabled;
|
|
100
111
|
const _control_required = _control.required;
|
|
101
112
|
setClass(n13, unref(rootClass));
|
|
113
|
+
setStyle(n13, unref(rootStyle));
|
|
102
114
|
setAttr(n13, "data-disabled", _control_disabled || void 0);
|
|
103
115
|
setAttr(n13, "data-state", _indeterminate ? "indeterminate" : _modelValue ? "checked" : "unchecked");
|
|
104
116
|
setProp(n0, "id", _control.id);
|
|
@@ -138,7 +150,7 @@ var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
138
150
|
});
|
|
139
151
|
return n13;
|
|
140
152
|
}
|
|
141
|
-
}), [["__scopeId", "data-v-
|
|
153
|
+
}), [["__scopeId", "data-v-8af73824"]]);
|
|
142
154
|
//#endregion
|
|
143
155
|
export { checkbox_default as t };
|
|
144
156
|
|
package/dist/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","names":[],"sources":["../src/components/checkbox/useCheckbox.ts","../src/components/checkbox/checkbox.vue","../src/components/checkbox/checkbox.vue"],"sourcesContent":["import { computed } from 'vue';\nimport { useControlState } from '@/composables/useControlState';\nimport { bem } from '@/utils/bem';\nimport type { CheckboxProps } from './types';\n\nexport function useCheckbox(props: Readonly<CheckboxProps>, emitUpdate: (value: boolean) => void) {\n const control = useControlState(props);\n\n const rootClass = computed(() =>\n bem('rp-checkbox', {\n checked: props.modelValue,\n indeterminate: props.indeterminate,\n disabled: control.disabled,\n invalid: control.invalid,\n [props.variant ?? '']: Boolean(props.variant),\n [`color-${props.color}`]:
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":[],"sources":["../src/components/checkbox/useCheckbox.ts","../src/components/checkbox/checkbox.vue","../src/components/checkbox/checkbox.vue"],"sourcesContent":["import { computed, type CSSProperties } from 'vue';\nimport { useControlState } from '@/composables/useControlState';\nimport { getComponentCustomColor, isComponentPresetColor } from '@/utils/componentColors';\nimport { bem } from '@/utils/bem';\nimport type { CheckboxProps } from './types';\n\nfunction getCheckboxColorStyle(color: CheckboxProps['color']) {\n const customColor = getComponentCustomColor(color);\n if (!customColor) return undefined;\n\n return {\n '--_rp-checkbox-custom-color': customColor,\n '--_rp-checkbox-custom-on-color': 'var(--rp-color-on-primary)',\n } satisfies CSSProperties;\n}\n\nexport function useCheckbox(props: Readonly<CheckboxProps>, emitUpdate: (value: boolean) => void) {\n const control = useControlState(props);\n\n const rootClass = computed(() =>\n bem('rp-checkbox', {\n checked: props.modelValue,\n indeterminate: props.indeterminate,\n disabled: control.disabled,\n invalid: control.invalid,\n [props.variant ?? '']: Boolean(props.variant),\n [`color-${props.color}`]: isComponentPresetColor(props.color),\n [`size-${props.size}`]: Boolean(props.size),\n [`radius-${props.radius}`]: Boolean(props.radius),\n }),\n );\n\n const rootStyle = computed(() => getCheckboxColorStyle(props.color));\n\n function onChange(e: Event) {\n emitUpdate((e.target as HTMLInputElement).checked);\n }\n\n return {\n control,\n rootClass,\n rootStyle,\n onChange,\n };\n}\n","<template>\n <label\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-disabled=\"control.disabled || undefined\"\n :data-state=\"indeterminate ? 'indeterminate' : modelValue ? 'checked' : 'unchecked'\"\n >\n <input\n :id=\"control.id\"\n :name=\"name\"\n type=\"checkbox\"\n class=\"rp-checkbox__native\"\n :checked=\"modelValue\"\n :disabled=\"control.disabled || undefined\"\n :required=\"control.required || undefined\"\n :indeterminate=\"indeterminate\"\n :aria-checked=\"indeterminate ? 'mixed' : modelValue\"\n :aria-label=\"ariaLabel || undefined\"\n :aria-labelledby=\"control.ariaLabelledby\"\n :aria-describedby=\"control.ariaDescribedby\"\n :aria-invalid=\"control.invalid || undefined\"\n :aria-required=\"control.required || undefined\"\n @change=\"onChange\"\n />\n <span class=\"rp-checkbox__box\">\n <Transition name=\"rp-checkbox-icon\" mode=\"out-in\">\n <MinusIcon v-if=\"indeterminate\" key=\"minus\" class=\"rp-checkbox__icon\" />\n <CheckIcon v-else-if=\"modelValue\" key=\"check\" class=\"rp-checkbox__icon\" />\n </Transition>\n </span>\n <span v-if=\"$slots.default\" class=\"rp-checkbox__label\">\n <slot />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport CheckIcon from '~icons/lucide/check';\nimport MinusIcon from '~icons/lucide/minus';\nimport { useCheckbox } from './useCheckbox';\nimport type { CheckboxProps } from './types';\n\ndefineOptions({ name: 'RpCheckbox' });\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n disabled: undefined,\n required: undefined,\n invalid: undefined,\n indeterminate: false,\n});\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: boolean];\n}>();\n\nconst { control, rootClass, rootStyle, onChange } = useCheckbox(props, (value) => {\n emit('update:modelValue', value);\n});\n</script>\n\n<style src=\"./checkbox.scss\" lang=\"scss\" scoped></style>\n","<template>\n <label\n :class=\"rootClass\"\n :style=\"rootStyle\"\n :data-disabled=\"control.disabled || undefined\"\n :data-state=\"indeterminate ? 'indeterminate' : modelValue ? 'checked' : 'unchecked'\"\n >\n <input\n :id=\"control.id\"\n :name=\"name\"\n type=\"checkbox\"\n class=\"rp-checkbox__native\"\n :checked=\"modelValue\"\n :disabled=\"control.disabled || undefined\"\n :required=\"control.required || undefined\"\n :indeterminate=\"indeterminate\"\n :aria-checked=\"indeterminate ? 'mixed' : modelValue\"\n :aria-label=\"ariaLabel || undefined\"\n :aria-labelledby=\"control.ariaLabelledby\"\n :aria-describedby=\"control.ariaDescribedby\"\n :aria-invalid=\"control.invalid || undefined\"\n :aria-required=\"control.required || undefined\"\n @change=\"onChange\"\n />\n <span class=\"rp-checkbox__box\">\n <Transition name=\"rp-checkbox-icon\" mode=\"out-in\">\n <MinusIcon v-if=\"indeterminate\" key=\"minus\" class=\"rp-checkbox__icon\" />\n <CheckIcon v-else-if=\"modelValue\" key=\"check\" class=\"rp-checkbox__icon\" />\n </Transition>\n </span>\n <span v-if=\"$slots.default\" class=\"rp-checkbox__label\">\n <slot />\n </span>\n </label>\n</template>\n\n<script lang=\"ts\" setup vapor>\nimport CheckIcon from '~icons/lucide/check';\nimport MinusIcon from '~icons/lucide/minus';\nimport { useCheckbox } from './useCheckbox';\nimport type { CheckboxProps } from './types';\n\ndefineOptions({ name: 'RpCheckbox' });\n\nconst props = withDefaults(defineProps<CheckboxProps>(), {\n disabled: undefined,\n required: undefined,\n invalid: undefined,\n indeterminate: false,\n});\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: boolean];\n}>();\n\nconst { control, rootClass, rootStyle, onChange } = useCheckbox(props, (value) => {\n emit('update:modelValue', value);\n});\n</script>\n\n<style src=\"./checkbox.scss\" lang=\"scss\" scoped></style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,SAAS,sBAAsB,OAA+B;CAC1D,MAAM,cAAc,wBAAwB,KAAK;CACjD,IAAI,CAAC,aAAa,OAAO,KAAA;CAEzB,OAAO;EACH,+BAA+B;EAC/B,kCAAkC;CACtC;AACJ;AAEA,SAAgB,YAAY,OAAgC,YAAsC;CAC9F,MAAM,UAAU,gBAAgB,KAAK;CAErC,MAAM,YAAY,eACd,IAAI,eAAe;EACf,SAAS,MAAM;EACf,eAAe,MAAM;EACrB,UAAU,QAAQ;EAClB,SAAS,QAAQ;GAChB,MAAM,WAAW,KAAK,QAAQ,MAAM,OAAO;GAC3C,SAAS,MAAM,UAAU,uBAAuB,MAAM,KAAK;GAC3D,QAAQ,MAAM,SAAS,QAAQ,MAAM,IAAI;GACzC,UAAU,MAAM,WAAW,QAAQ,MAAM,MAAM;CACpD,CAAC,CACL;CAEA,MAAM,YAAY,eAAe,sBAAsB,MAAM,KAAK,CAAC;CAEnE,SAAS,SAAS,GAAU;EACxB,WAAY,EAAE,OAA4B,OAAO;CACrD;CAEA,OAAO;EACH;EACA;EACA;EACA;CACJ;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ECAA,MAAM,QAAQ;EAOd,MAAM,OAAO;EAIb,MAAM,EAAE,SAAS,WAAW,WAAW,aAAa,YAAY,QAAQ,UAAU;GAC9E,KAAK,qBAAqB,KAAK;EACnC,CAAC;;;;SAnCY,WAAM,MAAE,MAAA,QAAA,CAAQ,CAAA,CAAA,CAAA;;;;;;;iBApBb,MAAA,SAAA,CAAS;iBACT,MAAA,SAAA,CAAS;gBAChB,iBAAe,qBAAoB,KAAA,CAAS;gBAC5C,cAAY,iBAAa,kBAAqB,cAAU,YAAA,WAAA;eAGpD,MAAI,SAAO,EAAA;eACX,QAAM,QAAA,IAAI;eAGV,WAAS,WAAU;eACnB,YAAU,qBAAoB,KAAA,CAAS;eACvC,YAAU,qBAAoB,KAAA,CAAS;eACvC,iBAAe,cAAa;eAC5B,gBAAc,iBAAa,UAAa,WAAU;eAClD,cAAY,QAAA,aAAa,KAAA,CAAS;eAClC,mBAAiB,SAAO,cAAA;eACxB,oBAAkB,SAAO,eAAA;eACzB,gBAAc,SAAO,WAAY,KAAA,CAAS;eAC1C,iBAAe,qBAAoB,KAAA,CAAS;;;;GAIjC,MAAK;GAAmB,MAAK;;yBACpB,QAAA,qBAAa;uDAAc,OAAM,oBAAmB,CAAA;oBAAjC,OAAO;;2BACrB,QAAA,kBAAU;uDAAc,OAAM,oBAAmB,CAAA;oBAAjC,OAAO;;;;;iBAGzC,OAAM,eAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//#region src/utils/componentColors.ts
|
|
2
|
+
var componentColors = [
|
|
3
|
+
"primary",
|
|
4
|
+
"secondary",
|
|
5
|
+
"success",
|
|
6
|
+
"warning",
|
|
7
|
+
"danger",
|
|
8
|
+
"info",
|
|
9
|
+
"neutral"
|
|
10
|
+
];
|
|
11
|
+
var componentColorNames = new Set(componentColors);
|
|
12
|
+
function isComponentPresetColor(color) {
|
|
13
|
+
return Boolean(color && componentColorNames.has(color));
|
|
14
|
+
}
|
|
15
|
+
function getComponentCustomColor(color) {
|
|
16
|
+
if (!color || isComponentPresetColor(color)) return void 0;
|
|
17
|
+
return color;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { getComponentCustomColor as n, isComponentPresetColor as r, componentColors as t };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=componentColors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"componentColors.js","names":[],"sources":["../src/utils/componentColors.ts"],"sourcesContent":["export const componentColors = [\n 'primary',\n 'secondary',\n 'success',\n 'warning',\n 'danger',\n 'info',\n 'neutral',\n] as const;\n\nexport type ComponentColor = (typeof componentColors)[number];\n\nexport type ComponentColorValue = ComponentColor | (string & {});\n\nconst componentColorNames = new Set<string>(componentColors);\n\nexport function isComponentPresetColor(\n color: ComponentColorValue | undefined,\n): color is ComponentColor {\n return Boolean(color && componentColorNames.has(color));\n}\n\nexport function getComponentCustomColor(color: ComponentColorValue | undefined) {\n if (!color || isComponentPresetColor(color)) return undefined;\n\n return color;\n}\n"],"mappings":";AAAA,IAAa,kBAAkB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;AAMA,IAAM,sBAAsB,IAAI,IAAY,eAAe;AAE3D,SAAgB,uBACZ,OACuB;CACvB,OAAO,QAAQ,SAAS,oBAAoB,IAAI,KAAK,CAAC;AAC1D;AAEA,SAAgB,wBAAwB,OAAwC;CAC5E,IAAI,CAAC,SAAS,uBAAuB,KAAK,GAAG,OAAO,KAAA;CAEpD,OAAO;AACX"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentColorValue } from '../../utils/componentColors';
|
|
2
|
+
export type ButtonColor = ComponentColorValue;
|
|
2
3
|
export type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export type ButtonRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
5
|
export type ButtonVariant = 'solid' | 'subtle' | 'surface' | 'outline' | 'ghost' | 'plain';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonColor } from './types';
|
|
2
|
+
export declare function getButtonColorStyle(color: ButtonColor | undefined): {
|
|
3
|
+
'--_rp-button-custom-color': string & {};
|
|
4
|
+
'--_rp-button-custom-hover': string;
|
|
5
|
+
'--_rp-button-custom-active': string;
|
|
6
|
+
'--_rp-button-custom-on': string;
|
|
7
|
+
'--_rp-button-custom-subtle-bg': string;
|
|
8
|
+
'--_rp-button-custom-subtle-bg-hover': string;
|
|
9
|
+
'--_rp-button-custom-subtle-bg-active': string;
|
|
10
|
+
'--_rp-button-custom-border': string;
|
|
11
|
+
'--_rp-button-custom-border-hover': string;
|
|
12
|
+
'--_rp-button-custom-fg': string & {};
|
|
13
|
+
} | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ButtonGroupProps } from './types';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<ButtonGroupProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {}) => any;
|
|
10
|
+
};
|
|
11
|
+
emit: {};
|
|
12
|
+
}>) => import('vue').VNode & {
|
|
13
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
17
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
18
|
+
[K in keyof T]: T[K];
|
|
19
|
+
} : {
|
|
20
|
+
[K in keyof T as K]: T[K];
|
|
21
|
+
}) & {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
2
|
+
export interface ButtonGroupProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
orientation?: ButtonGroupOrientation;
|
|
5
|
+
attached?: boolean;
|
|
6
|
+
wrap?: boolean;
|
|
7
|
+
ariaLabel?: string;
|
|
8
|
+
describedby?: string;
|
|
9
|
+
labelledby?: string;
|
|
10
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentColorValue } from '../../utils/componentColors';
|
|
2
|
+
export type CheckboxColor = ComponentColorValue;
|
|
2
3
|
export type CheckboxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
4
|
export type CheckboxRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
5
|
export type CheckboxVariant = 'solid' | 'outline';
|
|
@@ -2,5 +2,9 @@ import { CheckboxProps } from './types';
|
|
|
2
2
|
export declare function useCheckbox(props: Readonly<CheckboxProps>, emitUpdate: (value: boolean) => void): {
|
|
3
3
|
control: import('../../composables/useControlState').ControlState;
|
|
4
4
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
5
|
+
rootStyle: import('vue').ComputedRef<{
|
|
6
|
+
'--_rp-checkbox-custom-color': string & {};
|
|
7
|
+
'--_rp-checkbox-custom-on-color': string;
|
|
8
|
+
} | undefined>;
|
|
5
9
|
onChange: (e: Event) => void;
|
|
6
10
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ProgressProps } from './types';
|
|
2
|
+
declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<ProgressProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {}) => any;
|
|
10
|
+
} & {
|
|
11
|
+
value?: (props: {
|
|
12
|
+
value: number;
|
|
13
|
+
formattedValue: string | number;
|
|
14
|
+
percent: number;
|
|
15
|
+
}) => any;
|
|
16
|
+
};
|
|
17
|
+
emit: {};
|
|
18
|
+
}>) => import('vue').VNode & {
|
|
19
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
20
|
+
};
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
24
|
+
[K in keyof T]: T[K];
|
|
25
|
+
} : {
|
|
26
|
+
[K in keyof T as K]: T[K];
|
|
27
|
+
}) & {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentColorValue } from '../../utils/componentColors';
|
|
2
|
+
export declare const progressColors: readonly ["primary", "secondary", "success", "warning", "danger", "info", "neutral"];
|
|
3
|
+
export declare const progressSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
4
|
+
export declare const progressRadiuses: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
|
|
5
|
+
export type ProgressColor = ComponentColorValue;
|
|
6
|
+
export type ProgressSize = (typeof progressSizes)[number];
|
|
7
|
+
export type ProgressRadius = (typeof progressRadiuses)[number];
|
|
8
|
+
export type ProgressValueFormatter = (value: number, percent: number) => string | number;
|
|
9
|
+
export interface ProgressProps {
|
|
10
|
+
id?: string;
|
|
11
|
+
value?: number | null;
|
|
12
|
+
min?: number;
|
|
13
|
+
max?: number;
|
|
14
|
+
color?: ProgressColor;
|
|
15
|
+
size?: ProgressSize;
|
|
16
|
+
radius?: ProgressRadius;
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
showValue?: boolean;
|
|
19
|
+
formatValue?: ProgressValueFormatter;
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
ariaValueText?: string | ProgressValueFormatter;
|
|
22
|
+
describedby?: string;
|
|
23
|
+
labelledby?: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ProgressProps } from './types';
|
|
3
|
+
type ProgressStateProps = Readonly<ProgressProps & {
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
indeterminate: boolean;
|
|
7
|
+
showValue: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function normalizeProgressBounds(min: number, max: number): {
|
|
10
|
+
min: number;
|
|
11
|
+
max: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function normalizeProgressValue(value: number | null | undefined, min: number, max: number): number;
|
|
14
|
+
export declare function getProgressValuePercent(value: number, min: number, max: number): number;
|
|
15
|
+
export declare function useProgress(props: ProgressStateProps): {
|
|
16
|
+
control: import('../../composables/useControlState').ControlState;
|
|
17
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
18
|
+
rootStyle: import('vue').ComputedRef<CSSProperties>;
|
|
19
|
+
isIndeterminate: import('vue').ComputedRef<boolean>;
|
|
20
|
+
normalizedValue: import('vue').ComputedRef<number>;
|
|
21
|
+
valuePercent: import('vue').ComputedRef<number>;
|
|
22
|
+
formattedValue: import('vue').ComputedRef<string | number>;
|
|
23
|
+
ariaValueText: import('vue').ComputedRef<string | undefined>;
|
|
24
|
+
ariaValueMin: import('vue').ComputedRef<number | undefined>;
|
|
25
|
+
ariaValueMax: import('vue').ComputedRef<number | undefined>;
|
|
26
|
+
ariaValueNow: import('vue').ComputedRef<number | undefined>;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InjectionKey } from 'vue';
|
|
2
|
-
|
|
2
|
+
import { ComponentColorValue } from '../../utils/componentColors';
|
|
3
|
+
export type RadioColor = ComponentColorValue;
|
|
3
4
|
export type RadioSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
5
|
export type RadioVariant = 'solid' | 'outline';
|
|
5
6
|
export interface RadioProps {
|