ropav 0.1.5 → 0.1.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 +4 -0
- package/dist/accordion.js +11 -8
- package/dist/alert.css +18 -18
- package/dist/alert.js +18 -17
- package/dist/avatar.js +2 -2
- package/dist/badge.js +2 -2
- package/dist/base.css +18 -13
- package/dist/button-group.js +1 -1
- package/dist/button-link.js +10 -12
- package/dist/button.css +32 -27
- package/dist/button.js +10 -12
- package/dist/{useButtonColor.js → button.scss_vue_type_style_index_0_src_true_lang.js} +2 -1
- package/dist/card.js +1 -1
- package/dist/checkbox.css +32 -32
- package/dist/checkbox.js +6 -6
- package/dist/collapse.css +6 -6
- package/dist/collapse.js +4 -4
- package/dist/collectionNavigation.js +2 -2
- package/dist/color-input.css +19 -19
- package/dist/color-input.js +5 -5
- package/dist/color-picker.css +7 -7
- package/dist/color-picker.js +4 -5
- package/dist/color-swatch.js +1 -1
- package/dist/componentColors.js +42 -2
- package/dist/components/checkbox/useCheckbox.d.ts +1 -1
- package/dist/components/color-input/color-input.d.ts +2 -2
- package/dist/components/color-input/useColorInput.d.ts +1 -1
- package/dist/components/dialog/dialog-core.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu-primitive-core.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +2 -2
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +3 -4
- package/dist/components/input/useInput.d.ts +1 -1
- package/dist/components/number-input/useNumberInput.d.ts +1 -1
- package/dist/components/progress/useProgress.d.ts +1 -1
- package/dist/components/radio/useRadio.d.ts +2 -2
- package/dist/components/scroll-area/scrollAreaCore.d.ts +5 -0
- package/dist/components/scroll-area/types.d.ts +4 -0
- package/dist/components/scroll-area/useScrollArea.d.ts +1 -0
- package/dist/components/scroll-area/useScrollAreaMetrics.d.ts +3 -0
- package/dist/components/scroll-area/useScrollAreaPresentation.d.ts +3 -0
- package/dist/components/select/useSelect.d.ts +2 -1
- package/dist/components/select/useSelectNativeValue.d.ts +1 -7
- package/dist/components/slider/sliderCore.d.ts +2 -1
- package/dist/components/slider/useRangeSlider.d.ts +1 -1
- package/dist/components/slider/useSlider.d.ts +1 -1
- package/dist/components/switch/useSwitch.d.ts +1 -1
- package/dist/components/textarea/useTextarea.d.ts +1 -1
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/index.js +2 -0
- package/dist/composables/useControllableValue.d.ts +14 -0
- package/dist/dialog.js +8 -5
- package/dist/dropdown-menu.js +43 -29
- package/dist/field.js +1 -1
- package/dist/floating.js +19 -7
- package/dist/icon-button.css +12 -173
- package/dist/icon-button.js +5 -5
- package/dist/index.d.ts +5 -4
- package/dist/index.js +7 -5
- package/dist/input.css +24 -24
- package/dist/input.js +5 -5
- package/dist/modal.js +11 -7
- package/dist/number-input.css +18 -18
- package/dist/number-input.js +7 -7
- package/dist/overlay.js +1 -1
- package/dist/pagination.js +3 -3
- package/dist/popover.js +9 -6
- package/dist/progress.css +29 -21
- package/dist/progress.js +17 -10
- package/dist/radio.js +3 -3
- package/dist/scroll-area.css +10 -1
- package/dist/scroll-area.js +82 -25
- package/dist/select.css +45 -45
- package/dist/select.js +48 -26
- package/dist/slider.css +142 -142
- package/dist/slider.js +32 -38
- package/dist/switch.css +17 -17
- package/dist/switch.js +6 -6
- package/dist/tabs.css +3 -3
- package/dist/tabs.js +25 -15
- package/dist/textarea.css +26 -26
- package/dist/textarea.js +4 -4
- package/dist/toast.css +26 -26
- package/dist/toast.js +24 -19
- package/dist/tooltip.js +11 -8
- package/dist/useCollapse.js +12 -7
- package/dist/useControlState.js +1 -1
- package/dist/useControllableValue.js +8 -2
- package/dist/useFloatingPosition.js +4 -1140
- package/dist/useFormControl.js +3 -2
- package/dist/useOverlayZIndex.js +1 -1
- package/dist/useRequiredInject.js +1 -1
- package/docs/public-composables-api.md +52 -0
- package/package.json +45 -38
- package/src/styles/_mixins.scss +4 -0
- package/src/styles/_tokens.scss +12 -12
- package/src/styles/_variables.scss +1 -1
- package/dist/button-link.css +0 -167
- /package/dist/{composables → internal/composables}/useOverlayLayer.d.ts +0 -0
package/README.md
CHANGED
|
@@ -37,6 +37,10 @@ Import the components you need:
|
|
|
37
37
|
import { Button } from 'ropav';
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
Headless state utilities are available from `ropav/composables`. See the
|
|
41
|
+
[public composables API](./docs/public-composables-api.md) for their controlled and uncontrolled
|
|
42
|
+
state contracts.
|
|
43
|
+
|
|
40
44
|
## Custom color contrast
|
|
41
45
|
|
|
42
46
|
`autoContrast` selects foreground colors for preset colors and opaque custom color literals. A
|
package/dist/accordion.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import './accordion.css';
|
|
2
|
-
import { t as
|
|
2
|
+
import { t as useControllableValue } from "./useControllableValue.js";
|
|
3
3
|
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
4
|
-
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
4
|
import { t as useRequiredInject } from "./useRequiredInject.js";
|
|
5
|
+
import { t as bem } from "./bem.js";
|
|
6
6
|
import { t as useCollapse } from "./useCollapse.js";
|
|
7
|
-
import {
|
|
7
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
8
|
+
import { VaporTransition, applyVShow, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, markRaw, next, provide, renderEffect, setDynamicProps, setInsertionState, setText, template, toDisplayString, unref, useId } from "vue";
|
|
8
9
|
//#region src/components/accordion/types.ts
|
|
9
10
|
var accordionParts = ["root"];
|
|
10
11
|
var accordionItemParts = [
|
|
@@ -61,9 +62,12 @@ function useAccordion(props, emitUpdate) {
|
|
|
61
62
|
const isMultiple = computed(() => Boolean(props.multiple));
|
|
62
63
|
const isCollapsible = computed(() => props.collapsible !== false);
|
|
63
64
|
const isDisabled = computed(() => Boolean(props.disabled));
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const controllable = useControllableValue({
|
|
66
|
+
modelValue: () => props.modelValue,
|
|
67
|
+
defaultValue: () => props.defaultValue ?? null,
|
|
68
|
+
onChange: emitUpdate
|
|
69
|
+
});
|
|
70
|
+
const openValues = computed(() => normalizeValue(controllable.value.value, isMultiple.value));
|
|
67
71
|
const rootClass = computed(() => bem("rp-accordion", {
|
|
68
72
|
disabled: isDisabled.value,
|
|
69
73
|
multiple: isMultiple.value
|
|
@@ -79,8 +83,7 @@ function useAccordion(props, emitUpdate) {
|
|
|
79
83
|
}));
|
|
80
84
|
function setValues(nextValues) {
|
|
81
85
|
const nextModelValue = toModelValue(nextValues, isMultiple.value);
|
|
82
|
-
|
|
83
|
-
emitUpdate(nextModelValue);
|
|
86
|
+
controllable.setValue(nextModelValue);
|
|
84
87
|
}
|
|
85
88
|
function setItemOpen(value, open) {
|
|
86
89
|
if (isDisabled.value) return;
|
package/dist/alert.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ropav.components {
|
|
2
|
-
.rp-alert[data-v-
|
|
2
|
+
.rp-alert[data-v-9ae78ff5] {
|
|
3
3
|
--_rp-alert-bg: var(--rp-color-cyan-light);
|
|
4
4
|
--_rp-alert-fg: var(--rp-color-text);
|
|
5
5
|
--_rp-alert-title-fg: var(--rp-color-cyan-light-color);
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
border-radius: var(--_rp-alert-radius);
|
|
23
23
|
transition: background-color var(--rp-transition-fast), color var(--rp-transition-fast), border-color var(--rp-transition-fast);
|
|
24
24
|
}
|
|
25
|
-
.rp-alert--radius-none[data-v-
|
|
25
|
+
.rp-alert--radius-none[data-v-9ae78ff5] {
|
|
26
26
|
--_rp-alert-radius: var(--rp-radius-none);
|
|
27
27
|
}
|
|
28
|
-
.rp-alert--radius-xs[data-v-
|
|
28
|
+
.rp-alert--radius-xs[data-v-9ae78ff5] {
|
|
29
29
|
--_rp-alert-radius: var(--rp-radius-xs);
|
|
30
30
|
}
|
|
31
|
-
.rp-alert--radius-sm[data-v-
|
|
31
|
+
.rp-alert--radius-sm[data-v-9ae78ff5] {
|
|
32
32
|
--_rp-alert-radius: var(--rp-radius-sm);
|
|
33
33
|
}
|
|
34
|
-
.rp-alert--radius-md[data-v-
|
|
34
|
+
.rp-alert--radius-md[data-v-9ae78ff5] {
|
|
35
35
|
--_rp-alert-radius: var(--rp-radius-md);
|
|
36
36
|
}
|
|
37
|
-
.rp-alert--radius-lg[data-v-
|
|
37
|
+
.rp-alert--radius-lg[data-v-9ae78ff5] {
|
|
38
38
|
--_rp-alert-radius: var(--rp-radius-lg);
|
|
39
39
|
}
|
|
40
|
-
.rp-alert--radius-xl[data-v-
|
|
40
|
+
.rp-alert--radius-xl[data-v-9ae78ff5] {
|
|
41
41
|
--_rp-alert-radius: var(--rp-radius-xl);
|
|
42
42
|
}
|
|
43
|
-
.rp-alert__icon[data-v-
|
|
43
|
+
.rp-alert__icon[data-v-9ae78ff5] {
|
|
44
44
|
display: inline-flex;
|
|
45
45
|
flex: 0 0 auto;
|
|
46
46
|
align-items: center;
|
|
@@ -49,37 +49,37 @@
|
|
|
49
49
|
color: var(--_rp-alert-icon-fg);
|
|
50
50
|
line-height: 0;
|
|
51
51
|
}
|
|
52
|
-
.rp-alert__icon[data-v-
|
|
52
|
+
.rp-alert__icon[data-v-9ae78ff5] > svg {
|
|
53
53
|
display: block;
|
|
54
54
|
width: 1rem;
|
|
55
55
|
height: 1rem;
|
|
56
56
|
}
|
|
57
|
-
.rp-alert__content[data-v-
|
|
57
|
+
.rp-alert__content[data-v-9ae78ff5] {
|
|
58
58
|
display: grid;
|
|
59
59
|
flex: 1 1 auto;
|
|
60
60
|
min-width: 0;
|
|
61
61
|
gap: var(--rp-spacing-1);
|
|
62
62
|
}
|
|
63
|
-
.rp-alert__title[data-v-
|
|
63
|
+
.rp-alert__title[data-v-9ae78ff5] {
|
|
64
64
|
color: var(--_rp-alert-title-fg);
|
|
65
65
|
font-size: var(--rp-font-size-md);
|
|
66
66
|
font-weight: var(--rp-font-weight-semibold);
|
|
67
67
|
line-height: var(--rp-line-height-xs);
|
|
68
68
|
}
|
|
69
|
-
.rp-alert__description[data-v-
|
|
69
|
+
.rp-alert__description[data-v-9ae78ff5] {
|
|
70
70
|
margin: 0;
|
|
71
71
|
}
|
|
72
|
-
.rp-alert__body[data-v-
|
|
72
|
+
.rp-alert__body[data-v-9ae78ff5], .rp-alert__description[data-v-9ae78ff5] {
|
|
73
73
|
min-width: 0;
|
|
74
74
|
color: var(--_rp-alert-fg);
|
|
75
75
|
}
|
|
76
|
-
.rp-alert__action[data-v-
|
|
76
|
+
.rp-alert__action[data-v-9ae78ff5] {
|
|
77
77
|
display: inline-flex;
|
|
78
78
|
flex: 0 0 auto;
|
|
79
79
|
align-items: center;
|
|
80
80
|
margin-left: auto;
|
|
81
81
|
}
|
|
82
|
-
.rp-alert__close[data-v-
|
|
82
|
+
.rp-alert__close[data-v-9ae78ff5] {
|
|
83
83
|
box-sizing: border-box;
|
|
84
84
|
display: inline-flex;
|
|
85
85
|
flex: 0 0 auto;
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
cursor: pointer;
|
|
97
97
|
transition: background-color var(--rp-transition-fast), color var(--rp-transition-fast);
|
|
98
98
|
}
|
|
99
|
-
.rp-alert__close[data-v-
|
|
99
|
+
.rp-alert__close[data-v-9ae78ff5]:hover {
|
|
100
100
|
background-color: color-mix(in srgb, var(--_rp-alert-icon-fg) 12%, transparent);
|
|
101
101
|
}
|
|
102
|
-
.rp-alert__close[data-v-
|
|
102
|
+
.rp-alert__close[data-v-9ae78ff5]:focus-visible {
|
|
103
103
|
outline: var(--rp-border-width-medium) solid var(--rp-color-focus-ring);
|
|
104
104
|
outline-offset: 2px;
|
|
105
105
|
}
|
|
106
|
-
.rp-alert__close[data-v-
|
|
106
|
+
.rp-alert__close[data-v-9ae78ff5] > svg {
|
|
107
107
|
display: block;
|
|
108
108
|
width: 1rem;
|
|
109
109
|
height: 1rem;
|
package/dist/alert.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import './alert.css';
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as bem } from "./bem.js";
|
|
2
|
+
import { t as useControllableValue } from "./useControllableValue.js";
|
|
4
3
|
import { n as useStylesApi } from "./styles-api.js";
|
|
5
|
-
import {
|
|
4
|
+
import { t as bem } from "./bem.js";
|
|
6
5
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
7
|
-
import {
|
|
6
|
+
import { t as x_default } from "./x.js";
|
|
7
|
+
import { a as getComponentVariantColorRoles, t as componentColors } from "./componentColors.js";
|
|
8
|
+
import { computed, createComponent, createIf, createInvoker, createSlot, defineVaporComponent, delegateEvents, renderEffect, setDynamicProps, setInsertionState, setText, template, toDisplayString, txt, unref, useSlots } from "vue";
|
|
8
9
|
//#region src/components/alert/useAlertColor.ts
|
|
9
10
|
function getAlertColorStyle(color, variant, autoContrast, contrastColor) {
|
|
10
11
|
if (!color && !variant) return void 0;
|
|
@@ -27,12 +28,12 @@ function getAlertColorStyle(color, variant, autoContrast, contrastColor) {
|
|
|
27
28
|
}
|
|
28
29
|
//#endregion
|
|
29
30
|
//#region src/components/alert/alert.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
30
|
-
var t0 = template("<div data-v-
|
|
31
|
+
var t0 = template("<div data-v-9ae78ff5>");
|
|
31
32
|
var t1 = template(" ");
|
|
32
|
-
var t2 = template("<p data-v-
|
|
33
|
-
var t3 = template("<div data-v-
|
|
34
|
-
var t4 = template("<button data-v-
|
|
35
|
-
var t5 = template("<div data-v-
|
|
33
|
+
var t2 = template("<p data-v-9ae78ff5> ");
|
|
34
|
+
var t3 = template("<div data-v-9ae78ff5 class=rp-alert__content>");
|
|
35
|
+
var t4 = template("<button data-v-9ae78ff5>");
|
|
36
|
+
var t5 = template("<div data-v-9ae78ff5>", 1);
|
|
36
37
|
delegateEvents("click");
|
|
37
38
|
//#endregion
|
|
38
39
|
//#region src/components/alert/alert.vue
|
|
@@ -69,11 +70,12 @@ var alert_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
69
70
|
const props = __props;
|
|
70
71
|
const emit = __emit;
|
|
71
72
|
const slots = useSlots();
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
const controllableOpen = useControllableValue({
|
|
74
|
+
modelValue: () => props.open,
|
|
75
|
+
defaultValue: () => true,
|
|
76
|
+
onChange: (open) => emit("update:open", open)
|
|
75
77
|
});
|
|
76
|
-
const isOpen =
|
|
78
|
+
const isOpen = controllableOpen.value;
|
|
77
79
|
const hasTitle = computed(() => Boolean(props.title || slots.title));
|
|
78
80
|
const hasDescription = computed(() => Boolean(props.description));
|
|
79
81
|
const hasContent = computed(() => Boolean(hasTitle.value || hasDescription.value || slots.default));
|
|
@@ -91,11 +93,10 @@ var alert_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
91
93
|
role: resolvedRole.value
|
|
92
94
|
}));
|
|
93
95
|
function closeAlert() {
|
|
94
|
-
|
|
95
|
-
emit("update:open", false);
|
|
96
|
+
controllableOpen.setValue(false);
|
|
96
97
|
emit("close");
|
|
97
98
|
}
|
|
98
|
-
return createIf(() => isOpen
|
|
99
|
+
return createIf(() => unref(isOpen), () => {
|
|
99
100
|
const n30 = t5();
|
|
100
101
|
renderEffect(() => setDynamicProps(n30, [rootAttrs.value]));
|
|
101
102
|
setInsertionState(n30, null, 0);
|
|
@@ -164,7 +165,7 @@ var alert_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__
|
|
|
164
165
|
return n30;
|
|
165
166
|
});
|
|
166
167
|
}
|
|
167
|
-
}), [["__scopeId", "data-v-
|
|
168
|
+
}), [["__scopeId", "data-v-9ae78ff5"]]);
|
|
168
169
|
//#endregion
|
|
169
170
|
//#region src/components/alert/types.ts
|
|
170
171
|
var alertParts = [
|
package/dist/avatar.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './avatar.css';
|
|
2
|
-
import { t as bem } from "./bem.js";
|
|
3
2
|
import { n as useStylesApi } from "./styles-api.js";
|
|
4
|
-
import {
|
|
3
|
+
import { t as bem } from "./bem.js";
|
|
5
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
|
+
import { a as getComponentVariantColorRoles, t as componentColors } from "./componentColors.js";
|
|
6
6
|
import { computed, createComponent, createIf, createSlot, defineVaporComponent, markRaw, on, ref, renderEffect, setAttr, setClass, setDynamicProps, setInsertionState, setProp, setStyle, setText, template, toDisplayString, txt, unref, watch } from "vue";
|
|
7
7
|
//#region ~icons/lucide/user
|
|
8
8
|
var t0$1 = template("<svg viewBox=\"0 0 24 24\"width=1.2em height=1.2em><g fill=none stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2><path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\"></path><circle cx=12 cy=7 r=4>", 3, 1);
|
package/dist/badge.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './badge.css';
|
|
2
|
-
import { t as bem } from "./bem.js";
|
|
3
2
|
import { n as useStylesApi } from "./styles-api.js";
|
|
4
|
-
import {
|
|
3
|
+
import { t as bem } from "./bem.js";
|
|
5
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
|
+
import { a as getComponentVariantColorRoles, t as componentColors } from "./componentColors.js";
|
|
6
6
|
import { computed, createIf, createSlot, defineVaporComponent, renderEffect, setDynamicProps, setInsertionState, template, unref } from "vue";
|
|
7
7
|
//#region src/components/badge/useBadgeColor.ts
|
|
8
8
|
function getBadgeColorStyle(color, variant, autoContrast, contrastColor) {
|
package/dist/base.css
CHANGED
|
@@ -463,7 +463,7 @@
|
|
|
463
463
|
--rp-color-red-contrast: var(--rp-color-white);
|
|
464
464
|
--rp-color-red-light: var(--rp-color-red-1);
|
|
465
465
|
--rp-color-red-light-hover: var(--rp-color-red-2);
|
|
466
|
-
--rp-color-red-light-color: var(--rp-color-red-9);
|
|
466
|
+
--rp-color-red-light-color: color-mix(in srgb, var(--rp-color-red-9) 89%, var(--rp-color-black));
|
|
467
467
|
--rp-color-red-outline: var(--rp-color-red-6);
|
|
468
468
|
--rp-color-red-outline-hover: color-mix(in srgb, var(--rp-color-red-6) 5%, transparent);
|
|
469
469
|
--rp-color-pink-filled: var(--rp-color-pink-7);
|
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
--rp-color-violet-contrast: var(--rp-color-white);
|
|
488
488
|
--rp-color-violet-light: var(--rp-color-violet-1);
|
|
489
489
|
--rp-color-violet-light-hover: var(--rp-color-violet-2);
|
|
490
|
-
--rp-color-violet-light-color: var(--rp-color-violet-9);
|
|
490
|
+
--rp-color-violet-light-color: color-mix(in srgb, var(--rp-color-violet-9) 96%, var(--rp-color-black));
|
|
491
491
|
--rp-color-violet-outline: var(--rp-color-violet-6);
|
|
492
492
|
--rp-color-violet-outline-hover: color-mix(in srgb, var(--rp-color-violet-6) 5%, transparent);
|
|
493
493
|
--rp-color-indigo-filled: var(--rp-color-indigo-7);
|
|
@@ -495,7 +495,7 @@
|
|
|
495
495
|
--rp-color-indigo-contrast: var(--rp-color-white);
|
|
496
496
|
--rp-color-indigo-light: var(--rp-color-indigo-1);
|
|
497
497
|
--rp-color-indigo-light-hover: var(--rp-color-indigo-2);
|
|
498
|
-
--rp-color-indigo-light-color: var(--rp-color-indigo-9);
|
|
498
|
+
--rp-color-indigo-light-color: color-mix(in srgb, var(--rp-color-indigo-9) 93%, var(--rp-color-black));
|
|
499
499
|
--rp-color-indigo-outline: var(--rp-color-indigo-6);
|
|
500
500
|
--rp-color-indigo-outline-hover: color-mix(in srgb, var(--rp-color-indigo-6) 5%, transparent);
|
|
501
501
|
--rp-color-blue-filled: var(--rp-color-blue-8);
|
|
@@ -503,7 +503,7 @@
|
|
|
503
503
|
--rp-color-blue-contrast: var(--rp-color-white);
|
|
504
504
|
--rp-color-blue-light: var(--rp-color-blue-1);
|
|
505
505
|
--rp-color-blue-light-hover: var(--rp-color-blue-2);
|
|
506
|
-
--rp-color-blue-light-color: var(--rp-color-blue-9);
|
|
506
|
+
--rp-color-blue-light-color: color-mix(in srgb, var(--rp-color-blue-9) 92%, var(--rp-color-black));
|
|
507
507
|
--rp-color-blue-outline: var(--rp-color-blue-6);
|
|
508
508
|
--rp-color-blue-outline-hover: color-mix(in srgb, var(--rp-color-blue-6) 5%, transparent);
|
|
509
509
|
--rp-color-cyan-filled: var(--rp-color-cyan-9);
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
--rp-color-cyan-contrast: var(--rp-color-white);
|
|
512
512
|
--rp-color-cyan-light: var(--rp-color-cyan-1);
|
|
513
513
|
--rp-color-cyan-light-hover: var(--rp-color-cyan-2);
|
|
514
|
-
--rp-color-cyan-light-color: var(--rp-color-cyan-9);
|
|
514
|
+
--rp-color-cyan-light-color: color-mix(in srgb, var(--rp-color-cyan-9) 93%, var(--rp-color-black));
|
|
515
515
|
--rp-color-cyan-outline: var(--rp-color-cyan-6);
|
|
516
516
|
--rp-color-cyan-outline-hover: color-mix(in srgb, var(--rp-color-cyan-6) 5%, transparent);
|
|
517
517
|
--rp-color-teal-filled: var(--rp-color-teal-9);
|
|
@@ -519,7 +519,7 @@
|
|
|
519
519
|
--rp-color-teal-contrast: var(--rp-color-white);
|
|
520
520
|
--rp-color-teal-light: var(--rp-color-teal-1);
|
|
521
521
|
--rp-color-teal-light-hover: var(--rp-color-teal-2);
|
|
522
|
-
--rp-color-teal-light-color: var(--rp-color-teal-9);
|
|
522
|
+
--rp-color-teal-light-color: color-mix(in srgb, var(--rp-color-teal-9) 89%, var(--rp-color-black));
|
|
523
523
|
--rp-color-teal-outline: var(--rp-color-teal-6);
|
|
524
524
|
--rp-color-teal-outline-hover: color-mix(in srgb, var(--rp-color-teal-6) 5%, transparent);
|
|
525
525
|
--rp-color-green-filled: color-mix(in srgb, var(--rp-color-green-9) 98%, var(--rp-color-black));
|
|
@@ -527,7 +527,7 @@
|
|
|
527
527
|
--rp-color-green-contrast: var(--rp-color-white);
|
|
528
528
|
--rp-color-green-light: var(--rp-color-green-1);
|
|
529
529
|
--rp-color-green-light-hover: var(--rp-color-green-2);
|
|
530
|
-
--rp-color-green-light-color: var(--rp-color-green-9);
|
|
530
|
+
--rp-color-green-light-color: color-mix(in srgb, var(--rp-color-green-9) 84%, var(--rp-color-black));
|
|
531
531
|
--rp-color-green-outline: var(--rp-color-green-6);
|
|
532
532
|
--rp-color-green-outline-hover: color-mix(in srgb, var(--rp-color-green-6) 5%, transparent);
|
|
533
533
|
--rp-color-lime-filled: var(--rp-color-lime-6);
|
|
@@ -535,7 +535,7 @@
|
|
|
535
535
|
--rp-color-lime-contrast: var(--rp-color-lime-6-contrast);
|
|
536
536
|
--rp-color-lime-light: var(--rp-color-lime-1);
|
|
537
537
|
--rp-color-lime-light-hover: var(--rp-color-lime-2);
|
|
538
|
-
--rp-color-lime-light-color: var(--rp-color-lime-9);
|
|
538
|
+
--rp-color-lime-light-color: color-mix(in srgb, var(--rp-color-lime-9) 79%, var(--rp-color-black));
|
|
539
539
|
--rp-color-lime-outline: var(--rp-color-lime-6);
|
|
540
540
|
--rp-color-lime-outline-hover: color-mix(in srgb, var(--rp-color-lime-6) 5%, transparent);
|
|
541
541
|
--rp-color-yellow-filled: var(--rp-color-yellow-6);
|
|
@@ -543,7 +543,7 @@
|
|
|
543
543
|
--rp-color-yellow-contrast: var(--rp-color-yellow-6-contrast);
|
|
544
544
|
--rp-color-yellow-light: var(--rp-color-yellow-1);
|
|
545
545
|
--rp-color-yellow-light-hover: var(--rp-color-yellow-2);
|
|
546
|
-
--rp-color-yellow-light-color: var(--rp-color-yellow-9);
|
|
546
|
+
--rp-color-yellow-light-color: color-mix(in srgb, var(--rp-color-yellow-9) 72%, var(--rp-color-black));
|
|
547
547
|
--rp-color-yellow-outline: var(--rp-color-yellow-6);
|
|
548
548
|
--rp-color-yellow-outline-hover: color-mix(in srgb, var(--rp-color-yellow-6) 5%, transparent);
|
|
549
549
|
--rp-color-orange-filled: color-mix(in srgb, var(--rp-color-orange-9) 97%, var(--rp-color-black));
|
|
@@ -551,14 +551,14 @@
|
|
|
551
551
|
--rp-color-orange-contrast: var(--rp-color-white);
|
|
552
552
|
--rp-color-orange-light: var(--rp-color-orange-1);
|
|
553
553
|
--rp-color-orange-light-hover: var(--rp-color-orange-2);
|
|
554
|
-
--rp-color-orange-light-color: var(--rp-color-orange-9);
|
|
554
|
+
--rp-color-orange-light-color: color-mix(in srgb, var(--rp-color-orange-9) 81%, var(--rp-color-black));
|
|
555
555
|
--rp-color-orange-outline: var(--rp-color-orange-6);
|
|
556
556
|
--rp-color-orange-outline-hover: color-mix(in srgb, var(--rp-color-orange-6) 5%, transparent);
|
|
557
557
|
--rp-color-scheme: light;
|
|
558
558
|
--rp-color-bright: var(--rp-color-black);
|
|
559
559
|
--rp-color-text: var(--rp-color-black);
|
|
560
560
|
--rp-color-body: var(--rp-color-white);
|
|
561
|
-
--rp-color-placeholder: var(--rp-color-gray-
|
|
561
|
+
--rp-color-placeholder: var(--rp-color-gray-7);
|
|
562
562
|
--rp-color-default: var(--rp-color-white);
|
|
563
563
|
--rp-color-default-hover: var(--rp-color-gray-1);
|
|
564
564
|
--rp-color-default-color: var(--rp-color-black);
|
|
@@ -637,7 +637,7 @@
|
|
|
637
637
|
--rp-size-control-md: 42px;
|
|
638
638
|
--rp-size-control-lg: 50px;
|
|
639
639
|
--rp-size-control-xl: 60px;
|
|
640
|
-
--rp-opacity-disabled: 0.
|
|
640
|
+
--rp-opacity-disabled: 0.65;
|
|
641
641
|
--rp-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
642
642
|
--rp-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
|
|
643
643
|
--rp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
|
@@ -764,7 +764,7 @@
|
|
|
764
764
|
--rp-color-bright: var(--rp-color-white);
|
|
765
765
|
--rp-color-text: var(--rp-color-dark-0);
|
|
766
766
|
--rp-color-body: var(--rp-color-dark-7);
|
|
767
|
-
--rp-color-placeholder: var(--rp-color-dark-
|
|
767
|
+
--rp-color-placeholder: var(--rp-color-dark-1);
|
|
768
768
|
--rp-color-default: var(--rp-color-dark-6);
|
|
769
769
|
--rp-color-default-hover: var(--rp-color-dark-5);
|
|
770
770
|
--rp-color-default-color: var(--rp-color-white);
|
|
@@ -802,6 +802,11 @@
|
|
|
802
802
|
transform-origin: center;
|
|
803
803
|
animation: rp-spinner-spin 700ms linear infinite;
|
|
804
804
|
}
|
|
805
|
+
@media (prefers-reduced-motion: reduce) {
|
|
806
|
+
.rp-spinner {
|
|
807
|
+
animation: none;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
805
810
|
.rp-spinner > svg {
|
|
806
811
|
display: block;
|
|
807
812
|
width: 100%;
|
package/dist/button-group.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './button-group.css';
|
|
2
|
-
import { t as bem } from "./bem.js";
|
|
3
2
|
import { n as useStylesApi } from "./styles-api.js";
|
|
3
|
+
import { t as bem } from "./bem.js";
|
|
4
4
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
5
5
|
import { computed, createSlot, defineVaporComponent, renderEffect, setDynamicProps, setInsertionState, template } from "vue";
|
|
6
6
|
//#region src/components/button-group/button-group.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
package/dist/button-link.js
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import './button-link.css';
|
|
2
|
-
import { t as bem } from "./bem.js";
|
|
3
1
|
import { n as useStylesApi, t as presence } from "./styles-api.js";
|
|
4
|
-
import { t as
|
|
5
|
-
import { n as loader_circle_default, t as getButtonColorStyle } from "./
|
|
2
|
+
import { t as bem } from "./bem.js";
|
|
3
|
+
import { n as loader_circle_default, t as getButtonColorStyle } from "./button.scss_vue_type_style_index_0_src_true_lang.js";
|
|
6
4
|
import { child, computed, createComponent, createIf, createSlot, defineVaporComponent, renderEffect, setDynamicProps, setInsertionState, template, unref } from "vue";
|
|
7
5
|
//#region src/components/button-link/button-link.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
8
|
-
var t0 = template("<span
|
|
9
|
-
var t1 = template("<a
|
|
6
|
+
var t0 = template("<span>");
|
|
7
|
+
var t1 = template("<a><span class=rp-button__content><span></span>", 1);
|
|
10
8
|
//#endregion
|
|
11
9
|
//#region src/components/button-link/button-link.vue
|
|
12
|
-
var button_link_default =
|
|
10
|
+
var button_link_default = /* @__PURE__ */ defineVaporComponent({
|
|
13
11
|
name: "RpButtonLink",
|
|
14
12
|
inheritAttrs: false,
|
|
15
13
|
__name: "button-link",
|
|
@@ -93,7 +91,7 @@ var button_link_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
93
91
|
setInsertionState(n5, null, 0);
|
|
94
92
|
createSlot("loading", null, () => {
|
|
95
93
|
return createComponent(unref(loader_circle_default), { class: "rp-button__spinner" });
|
|
96
|
-
}
|
|
94
|
+
});
|
|
97
95
|
return n5;
|
|
98
96
|
});
|
|
99
97
|
setInsertionState(n16, 0);
|
|
@@ -101,23 +99,23 @@ var button_link_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
101
99
|
const n9 = t0();
|
|
102
100
|
renderEffect(() => setDynamicProps(n9, [unref(getPartAttrs)("left", { class: "rp-button__left" })]));
|
|
103
101
|
setInsertionState(n9, null, 0);
|
|
104
|
-
createSlot("left"
|
|
102
|
+
createSlot("left");
|
|
105
103
|
return n9;
|
|
106
104
|
});
|
|
107
105
|
renderEffect(() => setDynamicProps(n11, [unref(getPartAttrs)("label", { class: "rp-button__label" })]));
|
|
108
106
|
setInsertionState(n11, null, 0);
|
|
109
|
-
createSlot(
|
|
107
|
+
createSlot();
|
|
110
108
|
setInsertionState(n16, null, 2);
|
|
111
109
|
createIf(() => $slots.right, () => {
|
|
112
110
|
const n15 = t0();
|
|
113
111
|
renderEffect(() => setDynamicProps(n15, [unref(getPartAttrs)("right", { class: "rp-button__right" })]));
|
|
114
112
|
setInsertionState(n15, null, 0);
|
|
115
|
-
createSlot("right"
|
|
113
|
+
createSlot("right");
|
|
116
114
|
return n15;
|
|
117
115
|
});
|
|
118
116
|
return n17;
|
|
119
117
|
}
|
|
120
|
-
})
|
|
118
|
+
});
|
|
121
119
|
//#endregion
|
|
122
120
|
//#region src/components/button-link/types.ts
|
|
123
121
|
var buttonLinkParts = [
|
package/dist/button.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ropav.components {
|
|
2
|
-
.rp-button
|
|
2
|
+
.rp-button {
|
|
3
3
|
--_rp-button-bg: var(--rp-color-default);
|
|
4
4
|
--_rp-button-bg-hover: var(--rp-color-default-hover);
|
|
5
5
|
--_rp-button-bg-active: var(--rp-color-disabled);
|
|
@@ -39,110 +39,110 @@
|
|
|
39
39
|
font-size: var(--_rp-button-font-size);
|
|
40
40
|
border-radius: var(--_rp-button-radius);
|
|
41
41
|
}
|
|
42
|
-
.rp-button
|
|
42
|
+
.rp-button:hover:not(:disabled):not(.rp-button--disabled) {
|
|
43
43
|
background-color: var(--_rp-button-bg-hover);
|
|
44
44
|
border-color: var(--_rp-button-border-hover);
|
|
45
45
|
box-shadow: var(--_rp-button-shadow-hover);
|
|
46
46
|
color: var(--_rp-button-fg-hover);
|
|
47
47
|
}
|
|
48
|
-
.rp-button
|
|
48
|
+
.rp-button:active:not(:disabled):not(.rp-button--disabled) {
|
|
49
49
|
background-color: var(--_rp-button-bg-active);
|
|
50
50
|
border-color: var(--_rp-button-border-active);
|
|
51
51
|
box-shadow: var(--_rp-button-shadow-active);
|
|
52
52
|
color: var(--_rp-button-fg-active);
|
|
53
53
|
transform: translateY(1px);
|
|
54
54
|
}
|
|
55
|
-
.rp-button--size-xs
|
|
55
|
+
.rp-button--size-xs {
|
|
56
56
|
--_rp-button-height: var(--rp-size-control-xs);
|
|
57
57
|
--_rp-button-padding-x: 14px;
|
|
58
58
|
--_rp-button-font-size: var(--rp-font-size-xs);
|
|
59
59
|
}
|
|
60
|
-
.rp-button--size-sm
|
|
60
|
+
.rp-button--size-sm {
|
|
61
61
|
--_rp-button-height: var(--rp-size-control-sm);
|
|
62
62
|
--_rp-button-padding-x: 18px;
|
|
63
63
|
--_rp-button-font-size: var(--rp-font-size-sm);
|
|
64
64
|
}
|
|
65
|
-
.rp-button--size-md
|
|
65
|
+
.rp-button--size-md {
|
|
66
66
|
--_rp-button-height: var(--rp-size-control-md);
|
|
67
67
|
--_rp-button-padding-x: 22px;
|
|
68
68
|
--_rp-button-font-size: var(--rp-font-size-md);
|
|
69
69
|
}
|
|
70
|
-
.rp-button--size-lg
|
|
70
|
+
.rp-button--size-lg {
|
|
71
71
|
--_rp-button-height: var(--rp-size-control-lg);
|
|
72
72
|
--_rp-button-padding-x: 26px;
|
|
73
73
|
--_rp-button-font-size: var(--rp-font-size-lg);
|
|
74
74
|
}
|
|
75
|
-
.rp-button--size-xl
|
|
75
|
+
.rp-button--size-xl {
|
|
76
76
|
--_rp-button-height: var(--rp-size-control-xl);
|
|
77
77
|
--_rp-button-padding-x: 32px;
|
|
78
78
|
--_rp-button-font-size: var(--rp-font-size-xl);
|
|
79
79
|
}
|
|
80
|
-
.rp-button--radius-xs
|
|
80
|
+
.rp-button--radius-xs {
|
|
81
81
|
--_rp-button-radius: var(--rp-radius-xs);
|
|
82
82
|
}
|
|
83
|
-
.rp-button--radius-sm
|
|
83
|
+
.rp-button--radius-sm {
|
|
84
84
|
--_rp-button-radius: var(--rp-radius-sm);
|
|
85
85
|
}
|
|
86
|
-
.rp-button--radius-md
|
|
86
|
+
.rp-button--radius-md {
|
|
87
87
|
--_rp-button-radius: var(--rp-radius-md);
|
|
88
88
|
}
|
|
89
|
-
.rp-button--radius-lg
|
|
89
|
+
.rp-button--radius-lg {
|
|
90
90
|
--_rp-button-radius: var(--rp-radius-lg);
|
|
91
91
|
}
|
|
92
|
-
.rp-button--radius-xl
|
|
92
|
+
.rp-button--radius-xl {
|
|
93
93
|
--_rp-button-radius: var(--rp-radius-xl);
|
|
94
94
|
}
|
|
95
|
-
.rp-button--subtle
|
|
95
|
+
.rp-button--subtle {
|
|
96
96
|
--_rp-button-shadow: none;
|
|
97
97
|
--_rp-button-shadow-hover: none;
|
|
98
98
|
--_rp-button-shadow-active: none;
|
|
99
99
|
}
|
|
100
|
-
.rp-button--surface
|
|
100
|
+
.rp-button--surface {
|
|
101
101
|
--_rp-button-shadow: none;
|
|
102
102
|
--_rp-button-shadow-hover: none;
|
|
103
103
|
--_rp-button-shadow-active: none;
|
|
104
104
|
}
|
|
105
|
-
.rp-button--outline
|
|
105
|
+
.rp-button--outline {
|
|
106
106
|
--_rp-button-shadow: none;
|
|
107
107
|
--_rp-button-shadow-hover: none;
|
|
108
108
|
--_rp-button-shadow-active: none;
|
|
109
109
|
}
|
|
110
|
-
.rp-button--ghost
|
|
110
|
+
.rp-button--ghost {
|
|
111
111
|
--_rp-button-shadow: none;
|
|
112
112
|
--_rp-button-shadow-hover: none;
|
|
113
113
|
--_rp-button-shadow-active: none;
|
|
114
114
|
}
|
|
115
|
-
.rp-button--plain
|
|
115
|
+
.rp-button--plain {
|
|
116
116
|
--_rp-button-shadow: none;
|
|
117
117
|
--_rp-button-shadow-hover: none;
|
|
118
118
|
--_rp-button-shadow-active: none;
|
|
119
119
|
}
|
|
120
|
-
.rp-button
|
|
120
|
+
.rp-button:disabled, .rp-button--disabled {
|
|
121
121
|
opacity: var(--rp-opacity-disabled);
|
|
122
122
|
cursor: not-allowed;
|
|
123
123
|
box-shadow: none;
|
|
124
124
|
transform: none;
|
|
125
125
|
}
|
|
126
|
-
.rp-button
|
|
126
|
+
.rp-button:focus-visible {
|
|
127
127
|
outline: none;
|
|
128
128
|
border-color: var(--rp-color-control-border-focus);
|
|
129
129
|
box-shadow: 0 0 0 var(--rp-border-width-medium) var(--rp-color-focus-ring);
|
|
130
130
|
}
|
|
131
|
-
.rp-button--loading .rp-button__content
|
|
131
|
+
.rp-button--loading .rp-button__content {
|
|
132
132
|
opacity: 0;
|
|
133
133
|
}
|
|
134
|
-
.rp-button__content
|
|
134
|
+
.rp-button__content {
|
|
135
135
|
display: inline-flex;
|
|
136
136
|
align-items: center;
|
|
137
137
|
justify-content: center;
|
|
138
138
|
gap: var(--rp-spacing-2);
|
|
139
139
|
}
|
|
140
|
-
.rp-button__left
|
|
140
|
+
.rp-button__left, .rp-button__right {
|
|
141
141
|
display: inline-flex;
|
|
142
142
|
align-items: center;
|
|
143
143
|
flex-shrink: 0;
|
|
144
144
|
}
|
|
145
|
-
.rp-button__loading
|
|
145
|
+
.rp-button__loading {
|
|
146
146
|
display: inline-flex;
|
|
147
147
|
align-items: center;
|
|
148
148
|
justify-content: center;
|
|
@@ -151,15 +151,20 @@
|
|
|
151
151
|
left: 50%;
|
|
152
152
|
translate: -50% -50%;
|
|
153
153
|
}
|
|
154
|
-
.rp-button__spinner
|
|
154
|
+
.rp-button__spinner {
|
|
155
155
|
display: block;
|
|
156
156
|
width: 1em;
|
|
157
157
|
height: 1em;
|
|
158
158
|
flex-shrink: 0;
|
|
159
159
|
transform-origin: center;
|
|
160
|
-
animation: rp-spinner-spin
|
|
160
|
+
animation: rp-spinner-spin 700ms linear infinite;
|
|
161
161
|
}
|
|
162
|
-
@
|
|
162
|
+
@media (prefers-reduced-motion: reduce) {
|
|
163
|
+
.rp-button__spinner {
|
|
164
|
+
animation: none;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
@keyframes rp-spinner-spin {
|
|
163
168
|
to {
|
|
164
169
|
transform: rotate(360deg);
|
|
165
170
|
}
|