ropav 0.0.9 → 0.0.11
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 -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 +79 -28
- package/dist/collapse.css +29 -27
- package/dist/collapse.js +44 -10
- package/dist/color-input.css +137 -107
- package/dist/color-input.js +91 -17
- package/dist/color-picker.css +309 -303
- package/dist/color-picker.js +250 -77
- 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 +16 -4
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/index.d.ts +5 -4
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion/types.d.ts +10 -5
- package/dist/components/accordion/useAccordion.d.ts +1 -1
- package/dist/components/alert/alert.d.ts +3 -3
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/alert/index.js +2 -2
- package/dist/components/alert/types.d.ts +5 -2
- package/dist/components/alert/useAlertColor.d.ts +1 -1
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +1 -1
- package/dist/components/aspect-ratio/index.d.ts +3 -2
- package/dist/components/aspect-ratio/index.js +2 -2
- package/dist/components/aspect-ratio/types.d.ts +4 -1
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +3 -3
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/types.d.ts +5 -2
- package/dist/components/avatar/useAvatarColor.d.ts +1 -1
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/index.d.ts +3 -3
- package/dist/components/badge/index.js +2 -2
- package/dist/components/badge/types.d.ts +5 -2
- package/dist/components/badge/useBadgeColor.d.ts +1 -1
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/index.d.ts +3 -2
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/types.d.ts +5 -2
- package/dist/components/button/useButtonColor.d.ts +1 -1
- package/dist/components/button-group/button-group.d.ts +1 -1
- package/dist/components/button-group/index.d.ts +3 -2
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-group/types.d.ts +4 -1
- package/dist/components/button-link/button-link.d.ts +1 -1
- package/dist/components/button-link/index.d.ts +3 -2
- package/dist/components/button-link/index.js +2 -2
- package/dist/components/button-link/types.d.ts +5 -2
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/index.d.ts +3 -2
- package/dist/components/card/index.js +2 -2
- package/dist/components/card/types.d.ts +5 -1
- package/dist/components/checkbox/checkbox.d.ts +5 -2
- package/dist/components/checkbox/index.d.ts +3 -2
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/types.d.ts +7 -2
- package/dist/components/checkbox/useCheckbox.d.ts +4 -2
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +4 -3
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/types.d.ts +9 -2
- package/dist/components/collapse/useCollapse.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +1 -1
- package/dist/components/color-input/index.d.ts +3 -2
- package/dist/components/color-input/index.js +2 -2
- package/dist/components/color-input/types.d.ts +8 -4
- package/dist/components/color-input/useColorInput.d.ts +5 -5
- package/dist/components/color-input/useColorInputEyeDropper.d.ts +1 -1
- package/dist/components/color-input/useColorInputPopover.d.ts +2 -2
- package/dist/components/color-input/useColorInputValue.d.ts +1 -1
- package/dist/components/color-picker/color-picker-saturation.d.ts +1 -1
- package/dist/components/color-picker/color-picker-slider.d.ts +1 -1
- package/dist/components/color-picker/color-picker-utils.d.ts +1 -1
- package/dist/components/color-picker/color-picker.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +3 -3
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +13 -1
- package/dist/components/color-picker/useColorPickerDrag.d.ts +7 -2
- package/dist/components/color-picker/useColorPickerSwatches.d.ts +1 -1
- package/dist/components/color-picker/useColorPickerValue.d.ts +2 -2
- package/dist/components/color-swatch/color-swatch.d.ts +1 -1
- package/dist/components/color-swatch/index.d.ts +3 -2
- package/dist/components/color-swatch/index.js +2 -1
- package/dist/components/color-swatch/types.d.ts +4 -1
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +15 -6
- package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +724 -0
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/index.d.ts +55 -3
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +142 -6
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +21 -12
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +6 -4
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +4 -3
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +2 -2
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +5 -5
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +25 -5
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +3 -3
- package/dist/components/field/field.d.ts +2 -2
- package/dist/components/field/index.d.ts +3 -2
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/types.d.ts +4 -1
- package/dist/components/field/useField.d.ts +1 -1
- package/dist/components/floating/index.d.ts +1 -0
- package/dist/components/floating/index.js +0 -0
- package/dist/components/floating/types.d.ts +31 -0
- package/dist/components/floating/useFloatingPosition.d.ts +38 -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/icon-button.d.ts +1 -1
- package/dist/components/icon-button/index.d.ts +3 -2
- package/dist/components/icon-button/index.js +2 -1
- package/dist/components/icon-button/types.d.ts +5 -2
- package/dist/components/input/index.d.ts +3 -2
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/types.d.ts +4 -1
- package/dist/components/input/useInput.d.ts +2 -2
- package/dist/components/modal/index.d.ts +3 -2
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/modal/types.d.ts +9 -2
- package/dist/components/modal/useModal.d.ts +1 -1
- package/dist/components/number-input/index.d.ts +3 -2
- package/dist/components/number-input/index.js +2 -2
- package/dist/components/number-input/number-input.d.ts +1 -1
- package/dist/components/number-input/types.d.ts +5 -2
- package/dist/components/number-input/useNumberInput.d.ts +2 -2
- package/dist/components/overlay/index.d.ts +3 -2
- package/dist/components/overlay/index.js +2 -1
- package/dist/components/overlay/overlay.d.ts +1 -1
- package/dist/components/overlay/types.d.ts +4 -1
- package/dist/components/overlay/useOverlay.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +21 -11
- package/dist/components/popover/usePopover.d.ts +11 -2
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/progress.d.ts +1 -1
- package/dist/components/progress/types.d.ts +5 -2
- package/dist/components/progress/useProgress.d.ts +2 -2
- package/dist/components/radio/index.d.ts +4 -3
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio-group.d.ts +1 -1
- package/dist/components/radio/radio.d.ts +9 -4
- package/dist/components/radio/types.d.ts +21 -4
- package/dist/components/radio/useRadio.d.ts +10 -5
- package/dist/components/select/index.d.ts +3 -2
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/types.d.ts +4 -1
- package/dist/components/select/useSelect.d.ts +4 -3
- package/dist/components/slider/index.d.ts +4 -4
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +37 -0
- package/dist/components/slider/range-slider.d.ts +8 -13
- package/dist/components/slider/slider.d.ts +5 -2
- package/dist/components/slider/sliderCore.d.ts +35 -0
- package/dist/components/slider/types.d.ts +14 -7
- package/dist/components/slider/useRangeSlider.d.ts +5 -7
- package/dist/components/slider/useRangeSliderPointer.d.ts +19 -0
- package/dist/components/slider/useRangeSliderTooltipCollision.d.ts +31 -2
- package/dist/components/slider/useRangeSliderTooltipState.d.ts +23 -0
- package/dist/components/slider/useSlider.d.ts +11 -15
- package/dist/components/switch/index.d.ts +3 -2
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.ts +5 -2
- package/dist/components/switch/types.d.ts +7 -2
- package/dist/components/switch/useSwitch.d.ts +4 -2
- package/dist/components/tabs/index.d.ts +7 -6
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/tabs-content.d.ts +2 -2
- package/dist/components/tabs/tabs-list.d.ts +4 -4
- package/dist/components/tabs/tabs-trigger.d.ts +5 -5
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/types.d.ts +13 -4
- package/dist/components/tabs/useTabs.d.ts +1 -1
- package/dist/components/teleport-provider/index.d.ts +2 -0
- package/dist/components/teleport-provider/index.js +2 -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 +5 -0
- package/dist/components/textarea/index.d.ts +3 -2
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +5 -2
- package/dist/components/textarea/types.d.ts +6 -1
- package/dist/components/textarea/useTextarea.d.ts +3 -2
- package/dist/components/toast/defaults.d.ts +7 -0
- package/dist/components/toast/index.d.ts +7 -0
- package/dist/components/toast/index.js +2 -0
- package/dist/components/toast/toast-provider.d.ts +21 -0
- package/dist/components/toast/toast-viewport.d.ts +34 -0
- package/dist/components/toast/toast.d.ts +31 -0
- package/dist/components/toast/types.d.ts +110 -0
- package/dist/components/toast/useToast.d.ts +4 -0
- package/dist/components/toast/useToastColor.d.ts +3 -0
- package/dist/components/toast/useToastState.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts +3 -2
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +14 -13
- package/dist/components/tooltip/useTooltip.d.ts +15 -3
- package/dist/dropdown-menu.css +191 -107
- package/dist/dropdown-menu.js +1729 -107
- package/dist/field.css +41 -39
- package/dist/field.js +40 -16
- 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 +35 -30
- package/dist/index.js +36 -31
- package/dist/input.css +122 -120
- package/dist/input.js +47 -34
- package/dist/input2.js +9 -0
- package/dist/legacy-unlayered.css +5461 -0
- package/dist/modal.css +129 -127
- package/dist/modal.js +160 -200
- package/dist/number-input.css +87 -85
- package/dist/number-input.js +61 -17
- 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 +295 -189
- 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 +154 -56
- package/dist/select.css +244 -242
- package/dist/select.js +92 -47
- package/dist/slider.css +1109 -904
- package/dist/slider.js +1118 -923
- 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 +89 -33
- 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 +77 -29
- package/dist/toast.css +236 -0
- package/dist/toast.js +739 -0
- package/dist/tooltip.css +137 -107
- package/dist/tooltip.js +182 -223
- package/dist/tooltip2.js +8 -0
- package/dist/useClickOutside.js +1 -1
- package/dist/useFloatingPosition.js +1284 -0
- package/dist/useFocusTrap.js +130 -0
- package/dist/useTeleportTarget.js +29 -0
- package/dist/utils/componentColors.d.ts +60 -0
- package/docs/public-styles-api.md +133 -0
- package/docs/public-tokens.md +545 -0
- package/package.json +44 -12
- package/src/styles/_tokens.scss +33 -28
- package/src/styles/_utilities.scss +11 -9
- package/src/styles/styles-manifest.json +4125 -0
- package/dist/components/slider/useRangeSliderTooltipTransition.d.ts +0 -4
package/dist/checkbox.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import './checkbox.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 { n as getComponentColorValue, r as getComponentContrastColor } from "./componentColors.js";
|
|
4
5
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
6
|
import { t as check_default } from "./check.js";
|
|
6
7
|
import { t as minus_default } from "./minus.js";
|
|
7
8
|
import { t as useControlState } from "./useControlState.js";
|
|
8
|
-
import { VaporTransition, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, next,
|
|
9
|
+
import { VaporTransition, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, next, ref, renderEffect, setBlockKey, setDynamicProps, setInsertionState, setStaticTemplateRef, template, unref } from "vue";
|
|
9
10
|
//#region src/components/checkbox/useCheckbox.ts
|
|
10
11
|
function getCheckboxColorStyle(color, autoContrast) {
|
|
11
12
|
const colorValue = getComponentColorValue(color);
|
|
@@ -17,6 +18,7 @@ function getCheckboxColorStyle(color, autoContrast) {
|
|
|
17
18
|
return style;
|
|
18
19
|
}
|
|
19
20
|
function useCheckbox(props, emitUpdate) {
|
|
21
|
+
const inputRef = ref(null);
|
|
20
22
|
const control = useControlState(props);
|
|
21
23
|
const rootClass = computed(() => bem("rp-checkbox", {
|
|
22
24
|
checked: props.modelValue,
|
|
@@ -31,21 +33,27 @@ function useCheckbox(props, emitUpdate) {
|
|
|
31
33
|
function onChange(e) {
|
|
32
34
|
emitUpdate(e.target.checked);
|
|
33
35
|
}
|
|
36
|
+
function focus(options) {
|
|
37
|
+
inputRef.value?.focus(options);
|
|
38
|
+
}
|
|
34
39
|
return {
|
|
40
|
+
inputRef,
|
|
35
41
|
control,
|
|
36
42
|
rootClass,
|
|
37
43
|
rootStyle,
|
|
38
|
-
onChange
|
|
44
|
+
onChange,
|
|
45
|
+
focus
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
48
|
//#endregion
|
|
42
49
|
//#region src/components/checkbox/checkbox.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
43
|
-
var t0 = template("<span data-v-
|
|
44
|
-
var t1 = template("<label data-v-
|
|
50
|
+
var t0 = template("<span data-v-bad0fe43>");
|
|
51
|
+
var t1 = template("<label data-v-bad0fe43><input data-v-bad0fe43><span data-v-bad0fe43></span>", 1);
|
|
45
52
|
//#endregion
|
|
46
53
|
//#region src/components/checkbox/checkbox.vue
|
|
47
54
|
var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
48
55
|
name: "RpCheckbox",
|
|
56
|
+
inheritAttrs: false,
|
|
49
57
|
__name: "checkbox",
|
|
50
58
|
props: {
|
|
51
59
|
id: {},
|
|
@@ -74,41 +82,75 @@ var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
74
82
|
indeterminate: {
|
|
75
83
|
type: Boolean,
|
|
76
84
|
default: false
|
|
77
|
-
}
|
|
85
|
+
},
|
|
86
|
+
inputAttrs: {},
|
|
87
|
+
classNames: {},
|
|
88
|
+
styles: {}
|
|
78
89
|
},
|
|
79
90
|
emits: ["update:modelValue"],
|
|
80
|
-
setup(__props, { emit: __emit, slots: $slots }) {
|
|
91
|
+
setup(__props, { expose: __expose, emit: __emit, slots: $slots }) {
|
|
81
92
|
const props = __props;
|
|
82
93
|
const emit = __emit;
|
|
83
|
-
const { control, rootClass, rootStyle, onChange } = useCheckbox(props, (value) => {
|
|
94
|
+
const { inputRef, control, rootClass, rootStyle, onChange, focus } = useCheckbox(props, (value) => {
|
|
84
95
|
emit("update:modelValue", value);
|
|
85
96
|
});
|
|
97
|
+
const state = computed(() => props.indeterminate ? "indeterminate" : props.modelValue ? "checked" : "unchecked");
|
|
98
|
+
const { getPartAttrs, getRootAttrs } = useStylesApi(props, "root");
|
|
99
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
100
|
+
class: rootClass.value,
|
|
101
|
+
style: rootStyle.value,
|
|
102
|
+
"data-disabled": presence(control.disabled),
|
|
103
|
+
"data-invalid": presence(control.invalid),
|
|
104
|
+
"data-state": state.value
|
|
105
|
+
}));
|
|
106
|
+
const nativeInputAttrs = computed(() => {
|
|
107
|
+
const { class: compatibilityClass, style: compatibilityStyle, onChange: compatibilityOnChange, ...attrs } = props.inputAttrs ?? {};
|
|
108
|
+
return {
|
|
109
|
+
...attrs,
|
|
110
|
+
...getPartAttrs("input", {
|
|
111
|
+
class: "rp-checkbox__native",
|
|
112
|
+
compatibilityClass,
|
|
113
|
+
compatibilityStyle
|
|
114
|
+
}),
|
|
115
|
+
onChange(event) {
|
|
116
|
+
onChange(event);
|
|
117
|
+
compatibilityOnChange?.(event);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
__expose({
|
|
122
|
+
nativeElement: inputRef,
|
|
123
|
+
focus
|
|
124
|
+
});
|
|
86
125
|
const n13 = t1();
|
|
87
126
|
const n0 = child(n13);
|
|
88
127
|
const n8 = next(n0, 1);
|
|
89
|
-
|
|
128
|
+
setStaticTemplateRef(n0, inputRef, null, "inputRef");
|
|
90
129
|
renderEffect(() => {
|
|
91
130
|
const _control = unref(control);
|
|
92
|
-
const _indeterminate = __props.indeterminate;
|
|
93
131
|
const _modelValue = __props.modelValue;
|
|
94
|
-
const
|
|
132
|
+
const _indeterminate = __props.indeterminate;
|
|
95
133
|
const _control_required = _control.required;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
134
|
+
setDynamicProps(n13, [rootAttrs.value]);
|
|
135
|
+
setDynamicProps(n0, [nativeInputAttrs.value, {
|
|
136
|
+
id: _control.id,
|
|
137
|
+
name: __props.name,
|
|
138
|
+
type: "checkbox",
|
|
139
|
+
checked: _modelValue,
|
|
140
|
+
disabled: _control.disabled || void 0,
|
|
141
|
+
required: _control_required || void 0,
|
|
142
|
+
indeterminate: _indeterminate,
|
|
143
|
+
"aria-checked": _indeterminate ? "mixed" : _modelValue,
|
|
144
|
+
"aria-label": __props.ariaLabel || void 0,
|
|
145
|
+
"aria-labelledby": _control.ariaLabelledby,
|
|
146
|
+
"aria-describedby": _control.ariaDescribedby,
|
|
147
|
+
"aria-invalid": _control.invalid || void 0,
|
|
148
|
+
"aria-required": _control_required || void 0,
|
|
149
|
+
"data-disabled": unref(presence)(_control.disabled),
|
|
150
|
+
"data-invalid": unref(presence)(_control.invalid),
|
|
151
|
+
"data-state": state.value
|
|
152
|
+
}]);
|
|
153
|
+
setDynamicProps(n8, [unref(getPartAttrs)("indicator", { class: "rp-checkbox__box" })]);
|
|
112
154
|
});
|
|
113
155
|
setInsertionState(n8, null, 0);
|
|
114
156
|
createComponent(VaporTransition, {
|
|
@@ -128,12 +170,21 @@ var checkbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
128
170
|
setInsertionState(n13, null, 2);
|
|
129
171
|
createIf(() => $slots.default, () => {
|
|
130
172
|
const n12 = t0();
|
|
173
|
+
renderEffect(() => setDynamicProps(n12, [unref(getPartAttrs)("label", { class: "rp-checkbox__label" })]));
|
|
131
174
|
setInsertionState(n12, null, 0);
|
|
132
175
|
createSlot("default", null, null, 1);
|
|
133
176
|
return n12;
|
|
134
177
|
});
|
|
135
178
|
return n13;
|
|
136
179
|
}
|
|
137
|
-
}), [["__scopeId", "data-v-
|
|
180
|
+
}), [["__scopeId", "data-v-bad0fe43"]]);
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/components/checkbox/types.ts
|
|
183
|
+
var checkboxParts = [
|
|
184
|
+
"root",
|
|
185
|
+
"input",
|
|
186
|
+
"indicator",
|
|
187
|
+
"label"
|
|
188
|
+
];
|
|
138
189
|
//#endregion
|
|
139
|
-
export { checkbox_default as t };
|
|
190
|
+
export { checkbox_default as n, checkboxParts as t };
|
package/dist/collapse.css
CHANGED
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-collapse[data-v-a380be0d] {
|
|
3
|
+
--_rp-collapse-duration: var(--rp-transition-fast);
|
|
4
|
+
display: block;
|
|
5
|
+
min-width: 0;
|
|
6
|
+
font-family: var(--rp-font-family);
|
|
7
|
+
color: var(--rp-color-text);
|
|
7
8
|
}
|
|
8
|
-
.rp-collapse--disabled[data-v-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
.rp-collapse--disabled[data-v-a380be0d] {
|
|
10
|
+
opacity: var(--rp-opacity-disabled);
|
|
11
|
+
cursor: not-allowed;
|
|
11
12
|
}
|
|
12
|
-
.rp-collapse__content[data-v-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
13
|
+
.rp-collapse__content[data-v-a380be0d] {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
display: grid;
|
|
16
|
+
min-width: 0;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
color: var(--rp-color-text);
|
|
19
|
+
font-size: var(--rp-font-size-md);
|
|
20
|
+
line-height: var(--rp-line-height-md);
|
|
21
|
+
grid-template-rows: 1fr;
|
|
22
|
+
transition: grid-template-rows var(--_rp-collapse-duration), opacity var(--_rp-collapse-duration);
|
|
22
23
|
}
|
|
23
|
-
.rp-collapse__inner[data-v-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
.rp-collapse__inner[data-v-a380be0d] {
|
|
25
|
+
min-height: 0;
|
|
26
|
+
min-width: 0;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
}
|
|
29
|
+
.rp-collapse-content-enter-from[data-v-a380be0d],
|
|
30
|
+
.rp-collapse-content-leave-to[data-v-a380be0d] {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
grid-template-rows: 0fr;
|
|
27
33
|
}
|
|
28
|
-
.rp-collapse-content-enter-from[data-v-a78ac964],
|
|
29
|
-
.rp-collapse-content-leave-to[data-v-a78ac964] {
|
|
30
|
-
opacity: 0;
|
|
31
|
-
grid-template-rows: 0fr;
|
|
32
34
|
}
|
package/dist/collapse.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import './collapse.css';
|
|
2
|
+
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
2
3
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
3
4
|
import { t as useCollapse } from "./useCollapse.js";
|
|
4
|
-
import { VaporTransition, applyVShow, child, createComponent, createIf, createSlot, defineVaporComponent, extend, renderEffect, setDynamicProps, setInsertionState, template, unref } from "vue";
|
|
5
|
+
import { VaporTransition, applyVShow, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, renderEffect, setDynamicProps, setInsertionState, template, unref } from "vue";
|
|
5
6
|
//#region src/components/collapse/collapse.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
6
|
-
var t0 = template("<section data-v-
|
|
7
|
-
var t1 = template("<div data-v-
|
|
7
|
+
var t0 = template("<section data-v-a380be0d><div data-v-a380be0d class=rp-collapse__inner>");
|
|
8
|
+
var t1 = template("<div data-v-a380be0d>", 1);
|
|
8
9
|
//#endregion
|
|
9
10
|
//#region src/components/collapse/collapse.vue
|
|
10
11
|
var collapse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
11
12
|
name: "RpCollapse",
|
|
13
|
+
inheritAttrs: false,
|
|
12
14
|
__name: "collapse",
|
|
13
15
|
props: {
|
|
14
16
|
id: {},
|
|
@@ -27,19 +29,44 @@ var collapse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
27
29
|
role: { default: "region" },
|
|
28
30
|
ariaLabel: {},
|
|
29
31
|
ariaDescribedby: {},
|
|
30
|
-
ariaLabelledby: {}
|
|
32
|
+
ariaLabelledby: {},
|
|
33
|
+
classNames: {},
|
|
34
|
+
styles: {}
|
|
31
35
|
},
|
|
32
36
|
emits: ["update:open"],
|
|
33
37
|
setup(__props, { emit: __emit }) {
|
|
34
38
|
const props = __props;
|
|
35
39
|
const emit = __emit;
|
|
36
|
-
const { isOpen, shouldRenderContent, rootProps, contentProps, triggerSlotProps, contentSlotProps } = useCollapse(props, (open) => {
|
|
40
|
+
const { isOpen, isDisabled, state, shouldRenderContent, rootProps: internalRootProps, triggerProps, contentProps, triggerSlotProps, contentSlotProps } = useCollapse(props, (open) => {
|
|
37
41
|
emit("update:open", open);
|
|
38
42
|
});
|
|
43
|
+
const { getPartAttrs, getRootAttrs } = useStylesApi(props, "root");
|
|
44
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
45
|
+
...internalRootProps.value,
|
|
46
|
+
"data-disabled": presence(isDisabled.value)
|
|
47
|
+
}));
|
|
48
|
+
const publicTriggerProps = computed(() => {
|
|
49
|
+
const partAttrs = getPartAttrs("trigger");
|
|
50
|
+
return {
|
|
51
|
+
...triggerProps.value,
|
|
52
|
+
...props.classNames?.trigger !== void 0 ? { class: partAttrs.class } : {},
|
|
53
|
+
...props.styles?.trigger !== void 0 ? { style: partAttrs.style } : {},
|
|
54
|
+
"data-state": state.value,
|
|
55
|
+
"data-disabled": presence(isDisabled.value)
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
const publicTriggerSlotProps = computed(() => ({
|
|
59
|
+
...triggerSlotProps.value,
|
|
60
|
+
triggerProps: publicTriggerProps.value
|
|
61
|
+
}));
|
|
62
|
+
const publicContentProps = computed(() => ({
|
|
63
|
+
...contentProps.value,
|
|
64
|
+
...getPartAttrs("content", { class: contentProps.value.class })
|
|
65
|
+
}));
|
|
39
66
|
const n7 = t1();
|
|
40
|
-
renderEffect(() => setDynamicProps(n7, [
|
|
67
|
+
renderEffect(() => setDynamicProps(n7, [rootAttrs.value]));
|
|
41
68
|
setInsertionState(n7, null, 0);
|
|
42
|
-
createSlot("trigger", { $: [() =>
|
|
69
|
+
createSlot("trigger", { $: [() => publicTriggerSlotProps.value] }, null, 1);
|
|
43
70
|
setInsertionState(n7, null, 1);
|
|
44
71
|
createComponent(VaporTransition, {
|
|
45
72
|
name: "rp-collapse-content",
|
|
@@ -48,7 +75,7 @@ var collapse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
48
75
|
return createIf(() => unref(shouldRenderContent), () => {
|
|
49
76
|
const n5 = t0();
|
|
50
77
|
const n4 = child(n5);
|
|
51
|
-
renderEffect(() => setDynamicProps(n5, [
|
|
78
|
+
renderEffect(() => setDynamicProps(n5, [publicContentProps.value]));
|
|
52
79
|
setInsertionState(n4, null, 0);
|
|
53
80
|
createSlot("default", { $: [() => unref(contentSlotProps)] }, null, 1);
|
|
54
81
|
applyVShow(n5, () => unref(isOpen));
|
|
@@ -57,6 +84,13 @@ var collapse_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
57
84
|
}, { _: 8 }));
|
|
58
85
|
return n7;
|
|
59
86
|
}
|
|
60
|
-
}), [["__scopeId", "data-v-
|
|
87
|
+
}), [["__scopeId", "data-v-a380be0d"]]);
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/components/collapse/types.ts
|
|
90
|
+
var collapseParts = [
|
|
91
|
+
"root",
|
|
92
|
+
"trigger",
|
|
93
|
+
"content"
|
|
94
|
+
];
|
|
61
95
|
//#endregion
|
|
62
|
-
export { collapse_default as t };
|
|
96
|
+
export { collapse_default as n, collapseParts as t };
|
package/dist/color-input.css
CHANGED
|
@@ -1,108 +1,138 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-color-input[data-v-cf9bd64a] {
|
|
3
|
+
--_rp-color-input-height: var(--rp-size-control-md);
|
|
4
|
+
--_rp-color-input-preview-size: calc(var(--_rp-color-input-height) / 2);
|
|
5
|
+
--_rp-color-input-preview-inset: calc(
|
|
6
|
+
(var(--_rp-color-input-height) - var(--_rp-color-input-preview-size)) / 2
|
|
7
|
+
);
|
|
8
|
+
--_rp-color-input-empty-tile: var(--rp-color-gray-3);
|
|
9
|
+
--_rp-color-input-empty-tile-alt: var(--rp-color-white);
|
|
10
|
+
--_rp-color-input-empty-grid: conic-gradient(
|
|
11
|
+
var(--_rp-color-input-empty-tile) 25%,
|
|
12
|
+
var(--_rp-color-input-empty-tile-alt) 0 50%,
|
|
13
|
+
var(--_rp-color-input-empty-tile) 0 75%,
|
|
14
|
+
var(--_rp-color-input-empty-tile-alt) 0
|
|
15
|
+
);
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
max-width: 100%;
|
|
18
|
+
font-family: var(--rp-font-family);
|
|
19
|
+
vertical-align: middle;
|
|
20
|
+
}
|
|
21
|
+
.rp-color-input--size-xs[data-v-cf9bd64a] {
|
|
22
|
+
--_rp-color-input-height: var(--rp-size-control-xs);
|
|
23
|
+
}
|
|
24
|
+
.rp-color-input--size-sm[data-v-cf9bd64a] {
|
|
25
|
+
--_rp-color-input-height: var(--rp-size-control-sm);
|
|
26
|
+
}
|
|
27
|
+
.rp-color-input--size-md[data-v-cf9bd64a] {
|
|
28
|
+
--_rp-color-input-height: var(--rp-size-control-md);
|
|
29
|
+
}
|
|
30
|
+
.rp-color-input--size-lg[data-v-cf9bd64a] {
|
|
31
|
+
--_rp-color-input-height: var(--rp-size-control-lg);
|
|
32
|
+
}
|
|
33
|
+
.rp-color-input--size-xl[data-v-cf9bd64a] {
|
|
34
|
+
--_rp-color-input-height: var(--rp-size-control-xl);
|
|
35
|
+
}
|
|
36
|
+
html.dark .rp-color-input[data-v-cf9bd64a], [data-rp-color-scheme=dark] .rp-color-input[data-v-cf9bd64a] {
|
|
37
|
+
--_rp-color-input-empty-tile: var(--rp-color-dark-6);
|
|
38
|
+
--_rp-color-input-empty-tile-alt: var(--rp-color-dark-4);
|
|
39
|
+
}
|
|
40
|
+
.rp-color-input[data-v-cf9bd64a] .rp-input {
|
|
41
|
+
width: 100%;
|
|
42
|
+
min-width: 180px;
|
|
43
|
+
padding-inline-start: calc(var(--_rp-color-input-preview-inset) - var(--rp-border-width-thin));
|
|
44
|
+
}
|
|
45
|
+
.rp-color-input[data-v-cf9bd64a] .rp-popover__content {
|
|
46
|
+
min-width: auto;
|
|
47
|
+
padding: var(--rp-spacing-3);
|
|
48
|
+
padding-inline: calc(var(--_rp-color-input-preview-inset) - var(--rp-border-width-thin));
|
|
49
|
+
}
|
|
50
|
+
.rp-color-input[data-v-cf9bd64a] .rp-color-picker {
|
|
51
|
+
--_rp-color-picker-size: min(
|
|
52
|
+
var(--_rp-color-picker-saturation-width),
|
|
53
|
+
calc(100vw - var(--rp-spacing-12))
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
.rp-color-input__preview[data-v-cf9bd64a] {
|
|
57
|
+
--_rp-color-swatch-radius: 50%;
|
|
58
|
+
width: var(--_rp-color-input-preview-size);
|
|
59
|
+
height: var(--_rp-color-input-preview-size);
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
border-radius: 50%;
|
|
62
|
+
pointer-events: none;
|
|
63
|
+
}
|
|
64
|
+
.rp-color-input__preview--empty[data-v-cf9bd64a] {
|
|
65
|
+
box-sizing: border-box;
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
background: var(--_rp-color-input-empty-grid);
|
|
68
|
+
background-size: calc(var(--_rp-color-input-preview-size) / 2) calc(var(--_rp-color-input-preview-size) / 2);
|
|
69
|
+
border: var(--rp-border-width-thin) dashed var(--rp-color-control-border);
|
|
70
|
+
}
|
|
71
|
+
.rp-color-input__eye-dropper[data-v-cf9bd64a] {
|
|
72
|
+
padding: 0;
|
|
73
|
+
font: inherit;
|
|
74
|
+
background: none;
|
|
75
|
+
border: none;
|
|
76
|
+
cursor: pointer;
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
border-radius: var(--rp-radius-xs);
|
|
81
|
+
color: var(--rp-color-control-icon);
|
|
82
|
+
transition: color var(--rp-transition-fast), opacity var(--rp-transition-fast);
|
|
83
|
+
}
|
|
84
|
+
.rp-color-input__eye-dropper[data-v-cf9bd64a]:hover:not(:disabled) {
|
|
85
|
+
color: var(--rp-color-control-fg);
|
|
86
|
+
}
|
|
87
|
+
.rp-color-input__eye-dropper[data-v-cf9bd64a]:focus-visible {
|
|
88
|
+
outline: var(--rp-border-width-medium) solid var(--rp-color-focus-ring);
|
|
89
|
+
outline-offset: 2px;
|
|
90
|
+
}
|
|
91
|
+
.rp-color-input__eye-dropper[data-v-cf9bd64a]:disabled {
|
|
92
|
+
cursor: not-allowed;
|
|
93
|
+
opacity: var(--rp-opacity-disabled);
|
|
94
|
+
}
|
|
95
|
+
.rp-color-input__eye-dropper-icon[data-v-cf9bd64a] {
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
width: 1em;
|
|
99
|
+
height: 1em;
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
102
|
+
.rp-color-input__eye-dropper-icon svg[data-v-cf9bd64a] {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: 100%;
|
|
105
|
+
}
|
|
106
|
+
.rp-color-input__eye-dropper-icon[data-v-cf9bd64a] > svg {
|
|
107
|
+
width: 100%;
|
|
108
|
+
height: 100%;
|
|
109
|
+
}
|
|
110
|
+
.rp-popover__content.rp-color-input__popover {
|
|
111
|
+
--_rp-color-input-height: var(--rp-size-control-md);
|
|
112
|
+
--_rp-color-input-preview-size: calc(var(--_rp-color-input-height) / 2);
|
|
113
|
+
--_rp-color-input-preview-inset: calc(
|
|
114
|
+
(var(--_rp-color-input-height) - var(--_rp-color-input-preview-size)) / 2
|
|
115
|
+
);
|
|
116
|
+
min-width: auto;
|
|
117
|
+
padding: var(--rp-spacing-3);
|
|
118
|
+
padding-inline: calc(var(--_rp-color-input-preview-inset) - var(--rp-border-width-thin));
|
|
119
|
+
}
|
|
120
|
+
.rp-color-input__popover--size-xs {
|
|
121
|
+
--_rp-color-input-height: var(--rp-size-control-xs);
|
|
122
|
+
}
|
|
123
|
+
.rp-color-input__popover--size-sm {
|
|
124
|
+
--_rp-color-input-height: var(--rp-size-control-sm);
|
|
125
|
+
}
|
|
126
|
+
.rp-color-input__popover--size-lg {
|
|
127
|
+
--_rp-color-input-height: var(--rp-size-control-lg);
|
|
128
|
+
}
|
|
129
|
+
.rp-color-input__popover--size-xl {
|
|
130
|
+
--_rp-color-input-height: var(--rp-size-control-xl);
|
|
131
|
+
}
|
|
132
|
+
.rp-color-input__popover .rp-color-picker {
|
|
133
|
+
--_rp-color-picker-size: min(
|
|
134
|
+
var(--_rp-color-picker-saturation-width),
|
|
135
|
+
calc(100vw - var(--rp-spacing-12))
|
|
136
|
+
);
|
|
137
|
+
}
|
|
108
138
|
}
|