ropav 0.0.10 → 0.0.12
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 +9 -0
- package/dist/accordion.css +115 -111
- package/dist/accordion.js +60 -16
- package/dist/alert.css +110 -108
- package/dist/alert.js +48 -26
- package/dist/aspect-ratio.css +17 -15
- package/dist/aspect-ratio.js +20 -6
- package/dist/avatar.css +98 -96
- package/dist/avatar.js +27 -16
- package/dist/badge.css +95 -93
- package/dist/badge.js +29 -16
- package/dist/base.css +672 -671
- package/dist/button-group.css +39 -37
- package/dist/button-group.js +23 -12
- package/dist/button-link.css +160 -158
- package/dist/button-link.js +43 -24
- package/dist/button.css +160 -158
- package/dist/button.js +37 -19
- package/dist/card.css +109 -107
- package/dist/card.js +42 -17
- package/dist/checkbox.css +139 -137
- package/dist/checkbox.js +103 -33
- package/dist/collapse.css +29 -27
- package/dist/collapse.js +44 -10
- package/dist/color-input.css +137 -107
- package/dist/color-input.js +117 -30
- package/dist/color-picker.css +309 -303
- package/dist/color-picker.js +147 -54
- package/dist/color-picker2.js +9 -1
- package/dist/color-swatch.css +48 -46
- package/dist/color-swatch.js +15 -11
- package/dist/color-swatch2.js +4 -0
- package/dist/components/accordion/accordion-item.d.ts +13 -1
- package/dist/components/accordion/index.d.ts +2 -1
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion/types.d.ts +9 -4
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +2 -2
- package/dist/components/alert/types.d.ts +4 -1
- package/dist/components/aspect-ratio/index.d.ts +2 -1
- package/dist/components/aspect-ratio/index.js +2 -2
- package/dist/components/aspect-ratio/types.d.ts +4 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/types.d.ts +4 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +2 -2
- package/dist/components/badge/types.d.ts +4 -1
- package/dist/components/button/index.d.ts +2 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/types.d.ts +4 -1
- package/dist/components/button-group/index.d.ts +2 -1
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-group/types.d.ts +4 -1
- package/dist/components/button-link/index.d.ts +2 -1
- package/dist/components/button-link/index.js +2 -2
- package/dist/components/button-link/types.d.ts +4 -1
- package/dist/components/card/index.d.ts +2 -1
- package/dist/components/card/index.js +2 -2
- package/dist/components/card/types.d.ts +5 -1
- package/dist/components/checkbox/checkbox.d.ts +4 -1
- package/dist/components/checkbox/index.d.ts +2 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/types.d.ts +11 -2
- package/dist/components/checkbox/useCheckbox.d.ts +3 -1
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +2 -1
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/types.d.ts +9 -2
- package/dist/components/color-input/index.d.ts +2 -1
- package/dist/components/color-input/index.js +2 -2
- package/dist/components/color-input/types.d.ts +8 -2
- package/dist/components/color-input/useColorInput.d.ts +1 -1
- package/dist/components/color-input/useColorInputValue.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +13 -1
- package/dist/components/color-swatch/index.d.ts +2 -1
- package/dist/components/color-swatch/index.js +2 -1
- package/dist/components/color-swatch/types.d.ts +4 -1
- package/dist/components/dialog/dialog-close.d.ts +21 -0
- package/dist/components/dialog/dialog-content.d.ts +32 -0
- package/dist/components/dialog/dialog-core.d.ts +27 -0
- package/dist/components/dialog/dialog-description.d.ts +21 -0
- package/dist/components/dialog/dialog-overlay.d.ts +21 -0
- package/dist/components/dialog/dialog-portal.d.ts +21 -0
- package/dist/components/dialog/dialog-root.d.ts +28 -0
- package/dist/components/dialog/dialog-title.d.ts +21 -0
- package/dist/components/dialog/dialog-trigger.d.ts +23 -0
- package/dist/components/dialog/index.d.ts +9 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/types.d.ts +61 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +34 -0
- package/dist/components/dropdown-menu/dropdown-menu-context-trigger.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-item-indicator.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-item-row.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +24 -22
- package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +21 -0
- package/dist/components/dropdown-menu/dropdown-menu-outside.d.ts +3 -0
- package/dist/components/dropdown-menu/dropdown-menu-portal.d.ts +21 -0
- package/dist/components/dropdown-menu/dropdown-menu-primitive-core.d.ts +110 -0
- package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.d.ts +25 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-root.d.ts +30 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +34 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +6 -3
- package/dist/components/dropdown-menu/index.d.ts +32 -1
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +145 -6
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +15 -3
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +10 -3
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +2 -1
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +4 -4
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuPrimitiveContent.d.ts +27 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +14 -2
- package/dist/components/field/index.d.ts +2 -1
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/types.d.ts +4 -1
- package/dist/components/floating/index.d.ts +3 -0
- package/dist/components/floating/index.js +3 -0
- package/dist/components/floating/types.d.ts +105 -0
- package/dist/components/floating/useFloatingPosition.d.ts +15 -0
- package/dist/components/floating/useHoverDisclosure.d.ts +2 -0
- package/dist/components/focus-trap/focus-trap.d.ts +31 -0
- package/dist/components/focus-trap/index.d.ts +4 -0
- package/dist/components/focus-trap/index.js +3 -0
- package/dist/components/focus-trap/types.d.ts +41 -0
- package/dist/components/focus-trap/useFocusTrap.d.ts +2 -0
- package/dist/components/icon-button/index.d.ts +2 -1
- package/dist/components/icon-button/index.js +2 -1
- package/dist/components/icon-button/types.d.ts +4 -1
- package/dist/components/input/index.d.ts +2 -1
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/input.d.ts +4 -1
- package/dist/components/input/types.d.ts +7 -2
- package/dist/components/modal/index.d.ts +2 -1
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.d.ts +3 -1
- package/dist/components/modal/types.d.ts +11 -1
- package/dist/components/modal/useModal.d.ts +7 -4
- package/dist/components/number-input/index.d.ts +2 -1
- package/dist/components/number-input/index.js +2 -2
- package/dist/components/number-input/types.d.ts +7 -2
- package/dist/components/number-input/useNumberInput.d.ts +2 -1
- package/dist/components/overlay/index.d.ts +2 -1
- package/dist/components/overlay/index.js +2 -1
- package/dist/components/overlay/types.d.ts +4 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +20 -11
- package/dist/components/popover/usePopover.d.ts +9 -1
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/types.d.ts +4 -1
- package/dist/components/radio/index.d.ts +2 -1
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio.d.ts +8 -3
- package/dist/components/radio/types.d.ts +37 -4
- package/dist/components/radio/useRadio.d.ts +12 -4
- package/dist/components/select/index.d.ts +2 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.d.ts +4 -1
- package/dist/components/select/types.d.ts +10 -2
- package/dist/components/select/useSelect.d.ts +3 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +3 -0
- package/dist/components/slider/range-slider.d.ts +7 -4
- package/dist/components/slider/slider.d.ts +4 -1
- package/dist/components/slider/sliderCore.d.ts +4 -4
- package/dist/components/slider/types.d.ts +22 -4
- package/dist/components/slider/useRangeSlider.d.ts +2 -2
- package/dist/components/slider/useSlider.d.ts +2 -2
- package/dist/components/switch/index.d.ts +2 -1
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.ts +4 -1
- package/dist/components/switch/types.d.ts +11 -2
- package/dist/components/switch/useSwitch.d.ts +3 -1
- package/dist/components/tabs/index.d.ts +2 -1
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/types.d.ts +13 -4
- package/dist/components/teleport-provider/index.d.ts +3 -0
- package/dist/components/teleport-provider/index.js +3 -0
- package/dist/components/teleport-provider/teleport-provider.d.ts +21 -0
- package/dist/components/teleport-provider/types.d.ts +4 -0
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +6 -0
- package/dist/components/textarea/index.d.ts +2 -1
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +4 -1
- package/dist/components/textarea/types.d.ts +10 -2
- package/dist/components/textarea/useTextarea.d.ts +2 -1
- package/dist/components/toast/index.d.ts +3 -2
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-store.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +2 -2
- package/dist/components/toast/types.d.ts +20 -10
- package/dist/components/toast/useToast.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +13 -12
- package/dist/components/tooltip/useTooltip.d.ts +12 -2
- package/dist/composables/useOverlayLayer.d.ts +32 -0
- package/dist/dialog.js +510 -0
- package/dist/dropdown-menu.css +191 -108
- package/dist/dropdown-menu.js +1954 -198
- package/dist/field.css +41 -39
- package/dist/field.js +40 -16
- package/dist/floating.js +403 -0
- package/dist/focus-trap.js +80 -0
- package/dist/icon-button.css +193 -189
- package/dist/icon-button.js +23 -18
- package/dist/icon-button2.js +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +39 -32
- package/dist/input.css +122 -120
- package/dist/input.js +63 -40
- package/dist/input2.js +9 -0
- package/dist/legacy-unlayered.css +5382 -0
- package/dist/modal.css +129 -127
- package/dist/modal.js +182 -281
- package/dist/number-input.css +87 -85
- package/dist/number-input.js +98 -26
- package/dist/overlay.css +26 -24
- package/dist/overlay.js +17 -9
- package/dist/overlay2.js +4 -0
- package/dist/popover.css +140 -107
- package/dist/popover.js +276 -196
- package/dist/popover2.js +6 -1
- package/dist/progress.css +101 -99
- package/dist/progress.js +50 -28
- package/dist/radio.css +114 -105
- package/dist/radio.js +237 -61
- package/dist/select.css +255 -242
- package/dist/select.js +257 -94
- package/dist/slider.css +1090 -1031
- package/dist/slider.js +443 -175
- package/dist/styles-api.d.ts +22 -0
- package/dist/styles-api.js +49 -0
- package/dist/switch.css +120 -108
- package/dist/switch.js +112 -38
- package/dist/tabs.css +286 -278
- package/dist/tabs.js +60 -21
- package/dist/teleport-provider.js +15 -0
- package/dist/textarea.css +132 -130
- package/dist/textarea.js +83 -31
- package/dist/toast.css +229 -225
- package/dist/toast.js +189 -118
- package/dist/tooltip.css +61 -106
- package/dist/tooltip.js +184 -228
- package/dist/tooltip2.js +8 -0
- package/dist/useControlState.js +4 -0
- package/dist/useFloatingPosition.js +1317 -0
- package/dist/useFocusTrap.js +130 -0
- package/dist/useFormControl.js +107 -0
- package/dist/useOverlayLayer.js +262 -0
- package/dist/useTeleportTarget.js +40 -0
- package/docs/public-floating-api.md +148 -0
- package/docs/public-styles-api.md +134 -0
- package/docs/public-tokens.md +545 -0
- package/package.json +37 -9
- package/src/styles/_tokens.scss +33 -28
- package/src/styles/_utilities.scss +11 -9
- package/src/styles/styles-manifest.json +4125 -0
- package/dist/rafScheduler.js +0 -34
- package/dist/useClickOutside.js +0 -24
package/dist/number-input.css
CHANGED
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.rp-number-input[data-v-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.rp-number-input[data-v-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-number-input[data-v-eb2db673] {
|
|
3
|
+
--_rp-number-input-control-size: var(--_rp-input-height);
|
|
4
|
+
--_rp-number-input-text-align: left;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
vertical-align: middle;
|
|
7
|
+
}
|
|
8
|
+
.rp-number-input[data-v-eb2db673] .rp-input__native {
|
|
9
|
+
appearance: textfield;
|
|
10
|
+
text-align: var(--_rp-number-input-text-align);
|
|
11
|
+
}
|
|
12
|
+
.rp-number-input--text-align-center[data-v-eb2db673] {
|
|
13
|
+
--_rp-number-input-text-align: center;
|
|
14
|
+
}
|
|
15
|
+
.rp-number-input--text-align-right[data-v-eb2db673] {
|
|
16
|
+
--_rp-number-input-text-align: right;
|
|
17
|
+
}
|
|
18
|
+
.rp-number-input[data-v-eb2db673] .rp-input__native::-webkit-inner-spin-button,
|
|
19
|
+
.rp-number-input[data-v-eb2db673] .rp-input__native::-webkit-outer-spin-button {
|
|
20
|
+
margin: 0;
|
|
21
|
+
appearance: none;
|
|
22
|
+
}
|
|
23
|
+
.rp-number-input[data-v-eb2db673] .rp-input__left,
|
|
24
|
+
.rp-number-input[data-v-eb2db673] .rp-input__right {
|
|
25
|
+
align-self: stretch;
|
|
26
|
+
margin-block: calc(-1 * var(--rp-border-width-thin));
|
|
27
|
+
}
|
|
28
|
+
.rp-number-input[data-v-eb2db673] .rp-input__left {
|
|
29
|
+
margin-inline-start: calc(-1 * var(--_rp-input-padding-x));
|
|
30
|
+
}
|
|
31
|
+
.rp-number-input[data-v-eb2db673] .rp-input__right {
|
|
32
|
+
margin-inline-end: calc(-1 * var(--_rp-input-padding-x));
|
|
33
|
+
}
|
|
34
|
+
.rp-number-input__controls[data-v-eb2db673] {
|
|
35
|
+
display: inline-flex;
|
|
36
|
+
height: var(--_rp-input-height);
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
39
|
+
.rp-number-input__controls--left[data-v-eb2db673] {
|
|
40
|
+
border-inline-end: var(--rp-border-width-thin) solid var(--rp-color-control-border);
|
|
41
|
+
}
|
|
42
|
+
.rp-number-input__controls--right[data-v-eb2db673] {
|
|
43
|
+
border-inline-start: var(--rp-border-width-thin) solid var(--rp-color-control-border);
|
|
44
|
+
}
|
|
45
|
+
.rp-number-input__control[data-v-eb2db673] {
|
|
46
|
+
padding: 0;
|
|
47
|
+
font: inherit;
|
|
48
|
+
background: none;
|
|
49
|
+
border: none;
|
|
50
|
+
cursor: pointer;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
width: var(--_rp-number-input-control-size);
|
|
55
|
+
height: 100%;
|
|
56
|
+
min-width: 0;
|
|
57
|
+
min-height: 0;
|
|
58
|
+
color: var(--rp-color-control-icon);
|
|
59
|
+
transition: color var(--rp-transition-fast), background-color var(--rp-transition-fast), opacity var(--rp-transition-fast);
|
|
60
|
+
}
|
|
61
|
+
.rp-number-input__control + .rp-number-input__control[data-v-eb2db673] {
|
|
62
|
+
border-inline-start: var(--rp-border-width-thin) solid var(--rp-color-control-border);
|
|
63
|
+
}
|
|
64
|
+
.rp-number-input__control[data-v-eb2db673]:hover:not(:disabled) {
|
|
65
|
+
color: var(--rp-color-control-fg);
|
|
66
|
+
background-color: var(--rp-color-default-hover);
|
|
67
|
+
}
|
|
68
|
+
.rp-number-input__control[data-v-eb2db673]:disabled {
|
|
69
|
+
cursor: not-allowed;
|
|
70
|
+
opacity: var(--rp-opacity-disabled);
|
|
71
|
+
}
|
|
72
|
+
.rp-number-input__control-icon[data-v-eb2db673] {
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
width: 0.875em;
|
|
76
|
+
height: 0.875em;
|
|
77
|
+
flex-shrink: 0;
|
|
78
|
+
}
|
|
79
|
+
.rp-number-input__control-icon svg[data-v-eb2db673] {
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
82
|
+
}
|
|
83
|
+
.rp-number-input__control-icon[data-v-eb2db673] > svg {
|
|
84
|
+
display: block;
|
|
85
|
+
width: 100%;
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
86
88
|
}
|
package/dist/number-input.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import './number-input.css';
|
|
2
2
|
import { t as bem } from "./bem.js";
|
|
3
|
+
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
3
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
4
5
|
import { t as minus_default } from "./minus.js";
|
|
6
|
+
import { i as useFormControl, n as provideNestedFormControlOwner, o as useControllableValue } from "./useFormControl.js";
|
|
5
7
|
import { t as useControlState } from "./useControlState.js";
|
|
6
8
|
import { t as input_default } from "./input.js";
|
|
7
|
-
import { child, computed, createComponent, createFor, createIf, createSlot, defineVaporComponent, delegateEvents, markRaw, on,
|
|
9
|
+
import { child, computed, createComponent, createFor, createIf, createSlot, defineVaporComponent, delegateEvents, markRaw, on, ref, renderEffect, setDynamicProps, setInsertionState, setStaticTemplateRef, template, unref, withModifiers, withVaporModifiers } from "vue";
|
|
8
10
|
//#region ~icons/lucide/plus
|
|
9
11
|
var t0$1 = 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=\"M5 12h14m-7-7v14\">", 3, 1);
|
|
10
12
|
function render(_ctx) {
|
|
@@ -75,11 +77,12 @@ function normalizeNumberInputTextAlign(textAlign) {
|
|
|
75
77
|
function getModelInputValue(value) {
|
|
76
78
|
return value !== null && Number.isFinite(value) ? String(normalizeZero(value)) : "";
|
|
77
79
|
}
|
|
78
|
-
function useNumberInput(props, emitUpdate) {
|
|
80
|
+
function useNumberInput(props, emitUpdate, getValue = () => props.modelValue ?? null) {
|
|
79
81
|
const control = useControlState(props);
|
|
80
82
|
const bounds = computed(() => normalizeNumberInputBounds(props.min, props.max));
|
|
81
83
|
const nativeStep = computed(() => normalizeNumberInputStep(props.step));
|
|
82
|
-
const
|
|
84
|
+
const currentValue = computed(getValue);
|
|
85
|
+
const modelInputValue = computed(() => getModelInputValue(currentValue.value));
|
|
83
86
|
const isInteractive = computed(() => !control.disabled && !props.readonly);
|
|
84
87
|
const controlsPosition = computed(() => normalizeNumberInputControlsPosition(props.controlsPosition));
|
|
85
88
|
const textAlign = computed(() => normalizeNumberInputTextAlign(props.textAlign));
|
|
@@ -106,17 +109,17 @@ function useNumberInput(props, emitUpdate) {
|
|
|
106
109
|
}));
|
|
107
110
|
const canIncrement = computed(() => {
|
|
108
111
|
if (!isInteractive.value) return false;
|
|
109
|
-
if (
|
|
110
|
-
return bounds.value.max === void 0 ||
|
|
112
|
+
if (currentValue.value === null || !Number.isFinite(currentValue.value)) return true;
|
|
113
|
+
return bounds.value.max === void 0 || currentValue.value < bounds.value.max;
|
|
111
114
|
});
|
|
112
115
|
const canDecrement = computed(() => {
|
|
113
116
|
if (!isInteractive.value) return false;
|
|
114
|
-
if (
|
|
115
|
-
return bounds.value.min === void 0 ||
|
|
117
|
+
if (currentValue.value === null || !Number.isFinite(currentValue.value)) return true;
|
|
118
|
+
return bounds.value.min === void 0 || currentValue.value > bounds.value.min;
|
|
116
119
|
});
|
|
117
120
|
function emitStep(direction) {
|
|
118
121
|
if (!(direction === 1 ? canIncrement.value : canDecrement.value)) return false;
|
|
119
|
-
const current = Number.isFinite(
|
|
122
|
+
const current = Number.isFinite(currentValue.value) ? currentValue.value : null;
|
|
120
123
|
const next = stepNumberInputValue(current, direction, nativeStep.value, bounds.value);
|
|
121
124
|
if (current !== null && next === current) return false;
|
|
122
125
|
emitUpdate(next);
|
|
@@ -186,20 +189,23 @@ function useNumberInput(props, emitUpdate) {
|
|
|
186
189
|
}
|
|
187
190
|
//#endregion
|
|
188
191
|
//#region src/components/number-input/number-input.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
189
|
-
var t0 = template("<button data-v-
|
|
190
|
-
var t1 = template("<span data-v-
|
|
191
|
-
var t2 = template("<button data-v-
|
|
192
|
-
var t3 = template("<span data-v-
|
|
192
|
+
var t0 = template("<button data-v-eb2db673><span data-v-eb2db673 class=rp-number-input__control-icon aria-hidden=true></button>");
|
|
193
|
+
var t1 = template("<span data-v-eb2db673 class=\"rp-number-input__controls rp-number-input__controls--left\">");
|
|
194
|
+
var t2 = template("<button data-v-eb2db673><span data-v-eb2db673 class=rp-number-input__control-icon aria-hidden=true>");
|
|
195
|
+
var t3 = template("<span data-v-eb2db673 class=\"rp-number-input__controls rp-number-input__controls--right\">");
|
|
193
196
|
delegateEvents("mousedown");
|
|
194
197
|
//#endregion
|
|
195
198
|
//#region src/components/number-input/number-input.vue
|
|
196
199
|
var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
197
200
|
name: "RpNumberInput",
|
|
201
|
+
inheritAttrs: false,
|
|
198
202
|
__name: "number-input",
|
|
199
203
|
props: {
|
|
200
204
|
id: {},
|
|
201
205
|
name: {},
|
|
202
|
-
|
|
206
|
+
form: {},
|
|
207
|
+
modelValue: { default: void 0 },
|
|
208
|
+
defaultValue: { default: null },
|
|
203
209
|
min: {},
|
|
204
210
|
max: {},
|
|
205
211
|
step: { default: 1 },
|
|
@@ -242,13 +248,52 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
242
248
|
inputAttrs: {},
|
|
243
249
|
validationMessage: {},
|
|
244
250
|
incrementLabel: { default: "Increment value" },
|
|
245
|
-
decrementLabel: { default: "Decrement value" }
|
|
251
|
+
decrementLabel: { default: "Decrement value" },
|
|
252
|
+
classNames: {},
|
|
253
|
+
styles: {}
|
|
246
254
|
},
|
|
247
255
|
emits: ["update:modelValue"],
|
|
248
256
|
setup(__props, { emit: __emit }) {
|
|
249
257
|
const props = __props;
|
|
250
258
|
const emit = __emit;
|
|
251
|
-
const
|
|
259
|
+
const controllable = useControllableValue({
|
|
260
|
+
modelValue: () => props.modelValue,
|
|
261
|
+
defaultValue: () => props.defaultValue,
|
|
262
|
+
onChange: (value) => emit("update:modelValue", value)
|
|
263
|
+
});
|
|
264
|
+
const inputComponentRef = ref(null);
|
|
265
|
+
provideNestedFormControlOwner();
|
|
266
|
+
const { control, rootClass, nativeInputAttrs, modelInputValue, leftControls, rightControls, canIncrement, canDecrement, increment, decrement, onInputUpdate } = useNumberInput(props, (value) => controllable.setValue(value), () => controllable.value.value);
|
|
267
|
+
useFormControl({
|
|
268
|
+
elements: () => [inputComponentRef.value?.nativeElement],
|
|
269
|
+
isControlled: () => controllable.isControlled.value,
|
|
270
|
+
initializeDefault(element) {
|
|
271
|
+
element.defaultValue = getModelInputValue(controllable.initialValue);
|
|
272
|
+
},
|
|
273
|
+
validationMessage: () => props.validationMessage,
|
|
274
|
+
readResetValue(elements) {
|
|
275
|
+
controllable.resetValue(parseNumberInputValue(elements[0].value));
|
|
276
|
+
},
|
|
277
|
+
syncControlledValue(elements) {
|
|
278
|
+
elements[0].value = getModelInputValue(controllable.value.value);
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
const { attrs, getPartAttrs } = useStylesApi(props, "root");
|
|
282
|
+
const inputClassNames = computed(() => ({
|
|
283
|
+
root: [rootClass.value, props.classNames?.root],
|
|
284
|
+
input: props.classNames?.input
|
|
285
|
+
}));
|
|
286
|
+
const inputStyles = computed(() => ({
|
|
287
|
+
root: props.styles?.root,
|
|
288
|
+
input: props.styles?.input
|
|
289
|
+
}));
|
|
290
|
+
function getControlAttrs(controlType) {
|
|
291
|
+
return {
|
|
292
|
+
...getPartAttrs("control", { class: ["rp-number-input__control", `rp-number-input__control--${controlType}`] }),
|
|
293
|
+
"data-control": controlType,
|
|
294
|
+
"data-disabled": presence(isControlDisabled(controlType))
|
|
295
|
+
};
|
|
296
|
+
}
|
|
252
297
|
function focusNativeInput(event) {
|
|
253
298
|
const target = event.currentTarget;
|
|
254
299
|
if (!(target instanceof Element)) return;
|
|
@@ -263,10 +308,10 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
263
308
|
function onControlClick(event, controlType) {
|
|
264
309
|
if (controlType === "increment" ? increment() : decrement()) focusNativeInput(event);
|
|
265
310
|
}
|
|
266
|
-
|
|
267
|
-
class: () => unref(rootClass),
|
|
311
|
+
const n30 = createComponent(input_default, { $: [() => unref(attrs), {
|
|
268
312
|
id: () => unref(control).id,
|
|
269
313
|
name: () => __props.name,
|
|
314
|
+
form: () => unref(control).form,
|
|
270
315
|
"model-value": () => unref(modelInputValue),
|
|
271
316
|
type: "number",
|
|
272
317
|
size: () => __props.size,
|
|
@@ -281,9 +326,11 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
281
326
|
describedby: () => __props.describedby,
|
|
282
327
|
labelledby: () => __props.labelledby,
|
|
283
328
|
"input-attrs": () => unref(nativeInputAttrs),
|
|
329
|
+
"class-names": () => inputClassNames.value,
|
|
330
|
+
styles: () => inputStyles.value,
|
|
284
331
|
"validation-message": () => __props.validationMessage,
|
|
285
332
|
"onUpdate:modelValue": () => unref(onInputUpdate)
|
|
286
|
-
}, { $: [() => unref(leftControls).length ? {
|
|
333
|
+
}] }, { $: [() => unref(leftControls).length ? {
|
|
287
334
|
name: "left",
|
|
288
335
|
fn: () => {
|
|
289
336
|
const n13 = t1();
|
|
@@ -293,8 +340,17 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
293
340
|
const n11 = child(n12);
|
|
294
341
|
renderEffect(() => {
|
|
295
342
|
const _controlType = _for_item0.value;
|
|
296
|
-
|
|
297
|
-
|
|
343
|
+
setDynamicProps(n12, [
|
|
344
|
+
{
|
|
345
|
+
type: "button",
|
|
346
|
+
tabindex: "-1"
|
|
347
|
+
},
|
|
348
|
+
getControlAttrs(_controlType),
|
|
349
|
+
{
|
|
350
|
+
"aria-label": getControlLabel(_controlType),
|
|
351
|
+
disabled: isControlDisabled(_controlType)
|
|
352
|
+
}
|
|
353
|
+
]);
|
|
298
354
|
});
|
|
299
355
|
setInsertionState(n11, null, 0);
|
|
300
356
|
createIf(() => _for_item0.value === "increment", () => {
|
|
@@ -308,7 +364,6 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
308
364
|
}, 261);
|
|
309
365
|
n12.$evtmousedown = withVaporModifiers(() => {}, ["prevent"]);
|
|
310
366
|
on(n12, "click", withModifiers(($event) => onControlClick($event, _for_item0.value), ["stop"]));
|
|
311
|
-
setClass(n12, ["rp-number-input__control", `rp-number-input__control--${_for_item0.value}`]);
|
|
312
367
|
return n12;
|
|
313
368
|
}, (controlType) => controlType, 9);
|
|
314
369
|
return n13;
|
|
@@ -323,8 +378,17 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
323
378
|
const n26 = child(n27);
|
|
324
379
|
renderEffect(() => {
|
|
325
380
|
const _controlType = _for_item0.value;
|
|
326
|
-
|
|
327
|
-
|
|
381
|
+
setDynamicProps(n27, [
|
|
382
|
+
{
|
|
383
|
+
type: "button",
|
|
384
|
+
tabindex: "-1"
|
|
385
|
+
},
|
|
386
|
+
getControlAttrs(_controlType),
|
|
387
|
+
{
|
|
388
|
+
"aria-label": getControlLabel(_controlType),
|
|
389
|
+
disabled: isControlDisabled(_controlType)
|
|
390
|
+
}
|
|
391
|
+
]);
|
|
328
392
|
});
|
|
329
393
|
setInsertionState(n26, null, 0);
|
|
330
394
|
createIf(() => _for_item0.value === "increment", () => {
|
|
@@ -338,13 +402,21 @@ var number_input_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
338
402
|
}, 517);
|
|
339
403
|
n27.$evtmousedown = withVaporModifiers(() => {}, ["prevent"]);
|
|
340
404
|
on(n27, "click", withModifiers(($event) => onControlClick($event, _for_item0.value), ["stop"]));
|
|
341
|
-
setClass(n27, ["rp-number-input__control", `rp-number-input__control--${_for_item0.value}`]);
|
|
342
405
|
return n27;
|
|
343
406
|
}, (controlType) => controlType, 9);
|
|
344
407
|
return n28;
|
|
345
408
|
}
|
|
346
409
|
} : void 0] }, true);
|
|
410
|
+
setStaticTemplateRef(n30, inputComponentRef, null, "inputComponentRef");
|
|
411
|
+
return n30;
|
|
347
412
|
}
|
|
348
|
-
}), [["__scopeId", "data-v-
|
|
413
|
+
}), [["__scopeId", "data-v-eb2db673"]]);
|
|
414
|
+
//#endregion
|
|
415
|
+
//#region src/components/number-input/types.ts
|
|
416
|
+
var numberInputParts = [
|
|
417
|
+
"root",
|
|
418
|
+
"input",
|
|
419
|
+
"control"
|
|
420
|
+
];
|
|
349
421
|
//#endregion
|
|
350
|
-
export { number_input_default as t };
|
|
422
|
+
export { number_input_default as n, numberInputParts as t };
|
package/dist/overlay.css
CHANGED
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-overlay[data-v-972b25a9] {
|
|
3
|
+
--_rp-overlay-color: rgba(0, 0, 0, 0.55);
|
|
4
|
+
--_rp-overlay-opacity: 1;
|
|
5
|
+
--_rp-overlay-blur: 0px;
|
|
6
|
+
--_rp-overlay-z-index: 1;
|
|
7
|
+
position: absolute;
|
|
8
|
+
inset: 0;
|
|
9
|
+
z-index: var(--_rp-overlay-z-index);
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
display: block;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
background-color: var(--_rp-overlay-color);
|
|
15
|
+
border-radius: inherit;
|
|
16
|
+
opacity: var(--_rp-overlay-opacity);
|
|
17
|
+
pointer-events: none;
|
|
17
18
|
}
|
|
18
|
-
.rp-overlay--gradient[data-v-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
.rp-overlay--gradient[data-v-972b25a9] {
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
opacity: 1;
|
|
21
22
|
}
|
|
22
|
-
.rp-overlay--blurred[data-v-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
.rp-overlay--blurred[data-v-972b25a9] {
|
|
24
|
+
backdrop-filter: blur(var(--_rp-overlay-blur));
|
|
25
|
+
-webkit-backdrop-filter: blur(var(--_rp-overlay-blur));
|
|
26
|
+
}
|
|
27
|
+
.rp-overlay--interactive[data-v-972b25a9] {
|
|
28
|
+
pointer-events: auto;
|
|
25
29
|
}
|
|
26
|
-
.rp-overlay--interactive[data-v-d98cba01] {
|
|
27
|
-
pointer-events: auto;
|
|
28
30
|
}
|
package/dist/overlay.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import './overlay.css';
|
|
2
2
|
import { t as bem } from "./bem.js";
|
|
3
|
+
import { n as useStylesApi } from "./styles-api.js";
|
|
3
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
4
|
-
import { computed, createIf, defineVaporComponent, renderEffect,
|
|
5
|
+
import { computed, createIf, defineVaporComponent, renderEffect, setDynamicProps, template, unref } from "vue";
|
|
5
6
|
//#region src/components/overlay/useOverlay.ts
|
|
6
7
|
function getBlurValue(blur) {
|
|
7
8
|
if (blur == null || blur === "") return void 0;
|
|
@@ -45,11 +46,12 @@ function useOverlay(props) {
|
|
|
45
46
|
}
|
|
46
47
|
//#endregion
|
|
47
48
|
//#region src/components/overlay/overlay.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
48
|
-
var t0 = template("<div data-v-
|
|
49
|
+
var t0 = template("<div data-v-972b25a9>", 1);
|
|
49
50
|
//#endregion
|
|
50
51
|
//#region src/components/overlay/overlay.vue
|
|
51
52
|
var overlay_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
52
53
|
name: "RpOverlay",
|
|
54
|
+
inheritAttrs: false,
|
|
53
55
|
__name: "overlay",
|
|
54
56
|
props: {
|
|
55
57
|
color: { default: "rgba(0, 0, 0, 0.55)" },
|
|
@@ -64,19 +66,25 @@ var overlay_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
64
66
|
disabled: {
|
|
65
67
|
type: Boolean,
|
|
66
68
|
default: false
|
|
67
|
-
}
|
|
69
|
+
},
|
|
70
|
+
classNames: {},
|
|
71
|
+
styles: {}
|
|
68
72
|
},
|
|
69
73
|
setup(__props) {
|
|
70
|
-
const
|
|
74
|
+
const props = __props;
|
|
75
|
+
const { isRendered, rootClass, rootStyle } = useOverlay(props);
|
|
76
|
+
const { getRootAttrs } = useStylesApi(props, "root");
|
|
77
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
78
|
+
class: rootClass.value,
|
|
79
|
+
style: rootStyle.value,
|
|
80
|
+
"aria-hidden": "true"
|
|
81
|
+
}));
|
|
71
82
|
return createIf(() => unref(isRendered), () => {
|
|
72
83
|
const n2 = t0();
|
|
73
|
-
renderEffect(() =>
|
|
74
|
-
setClass(n2, unref(rootClass));
|
|
75
|
-
setStyle(n2, unref(rootStyle));
|
|
76
|
-
});
|
|
84
|
+
renderEffect(() => setDynamicProps(n2, [rootAttrs.value]));
|
|
77
85
|
return n2;
|
|
78
86
|
});
|
|
79
87
|
}
|
|
80
|
-
}), [["__scopeId", "data-v-
|
|
88
|
+
}), [["__scopeId", "data-v-972b25a9"]]);
|
|
81
89
|
//#endregion
|
|
82
90
|
export { overlay_default as t };
|
package/dist/overlay2.js
ADDED