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/README.md
CHANGED
|
@@ -36,3 +36,12 @@ Import the components you need:
|
|
|
36
36
|
```ts
|
|
37
37
|
import { Button } from 'ropav';
|
|
38
38
|
```
|
|
39
|
+
|
|
40
|
+
## Styling contract
|
|
41
|
+
|
|
42
|
+
Use typed `classNames` and `styles`, documented state attributes, and variables listed in the packaged styles manifest. DOM nesting, internal selectors and undocumented variables are private implementation details.
|
|
43
|
+
|
|
44
|
+
See the [Public Styles API](./docs/public-styles-api.md) and [public token table](./docs/public-tokens.md). Layered consumers should declare `reset, ropav.tokens, ropav.components, app`; `ropav/legacy-unlayered.css` is the temporary compatibility import for unlayered resets.
|
|
45
|
+
|
|
46
|
+
For headless Tooltip, HoverCard and custom menu markup, see the
|
|
47
|
+
[public floating API](./docs/public-floating-api.md).
|
package/dist/accordion.css
CHANGED
|
@@ -1,112 +1,116 @@
|
|
|
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
|
-
.rp-accordion-item
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
.rp-accordion-item--
|
|
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
|
-
.rp-accordion-item__trigger[data-v-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
.rp-accordion-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
.rp-accordion-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
.rp-accordion-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-accordion[data-v-e732f2da] {
|
|
3
|
+
--_rp-accordion-radius: var(--rp-radius-sm);
|
|
4
|
+
--_rp-accordion-duration: var(--rp-transition-fast);
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: grid;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
font-family: var(--rp-font-family);
|
|
10
|
+
color: var(--rp-color-text);
|
|
11
|
+
background-color: var(--rp-color-default);
|
|
12
|
+
border: var(--rp-border-width-thin) solid var(--rp-color-default-border);
|
|
13
|
+
border-radius: var(--_rp-accordion-radius);
|
|
14
|
+
}
|
|
15
|
+
.rp-accordion--disabled[data-v-e732f2da] {
|
|
16
|
+
opacity: var(--rp-opacity-disabled);
|
|
17
|
+
cursor: not-allowed;
|
|
18
|
+
}
|
|
19
|
+
.rp-accordion--horizontal[data-v-e732f2da] {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: stretch;
|
|
22
|
+
}
|
|
23
|
+
}@layer ropav.components {
|
|
24
|
+
.rp-accordion-item[data-v-5b00ef39] {
|
|
25
|
+
--_rp-accordion-duration: var(--rp-transition-fast);
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
border-top: var(--rp-border-width-thin) solid var(--rp-color-default-border);
|
|
29
|
+
}
|
|
30
|
+
.rp-accordion-item[data-v-5b00ef39]:first-child {
|
|
31
|
+
border-top: 0;
|
|
32
|
+
}
|
|
33
|
+
.rp-accordion-item--horizontal[data-v-5b00ef39] {
|
|
34
|
+
flex: 1 1 0;
|
|
35
|
+
border-top: 0;
|
|
36
|
+
border-left: var(--rp-border-width-thin) solid var(--rp-color-default-border);
|
|
37
|
+
}
|
|
38
|
+
.rp-accordion-item--horizontal[data-v-5b00ef39]:first-child {
|
|
39
|
+
border-left: 0;
|
|
40
|
+
}
|
|
41
|
+
.rp-accordion-item--disabled[data-v-5b00ef39] {
|
|
42
|
+
opacity: var(--rp-opacity-disabled);
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
.rp-accordion-item__heading[data-v-5b00ef39] {
|
|
46
|
+
margin: 0;
|
|
47
|
+
font: inherit;
|
|
48
|
+
}
|
|
49
|
+
.rp-accordion-item__trigger[data-v-5b00ef39] {
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
box-sizing: border-box;
|
|
54
|
+
width: 100%;
|
|
55
|
+
min-height: var(--rp-size-control-lg);
|
|
56
|
+
gap: var(--rp-spacing-3);
|
|
57
|
+
padding: var(--rp-spacing-3) var(--rp-spacing-4);
|
|
58
|
+
color: var(--rp-color-text);
|
|
59
|
+
font-family: var(--rp-font-family);
|
|
60
|
+
font-size: var(--rp-font-size-md);
|
|
61
|
+
font-weight: var(--rp-font-weight-medium);
|
|
62
|
+
line-height: var(--rp-line-height-xs);
|
|
63
|
+
text-align: left;
|
|
64
|
+
appearance: none;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
background: transparent;
|
|
67
|
+
border: 0;
|
|
68
|
+
transition: background-color var(--_rp-accordion-duration), color var(--_rp-accordion-duration);
|
|
69
|
+
}
|
|
70
|
+
.rp-accordion-item__trigger[data-v-5b00ef39]:hover:not(:disabled) {
|
|
71
|
+
background-color: var(--rp-color-default-hover);
|
|
72
|
+
}
|
|
73
|
+
.rp-accordion-item__trigger[data-v-5b00ef39]:focus-visible {
|
|
74
|
+
outline: none;
|
|
75
|
+
border-color: var(--rp-color-control-border-focus);
|
|
76
|
+
box-shadow: 0 0 0 var(--rp-border-width-medium) var(--rp-color-focus-ring);
|
|
77
|
+
}
|
|
78
|
+
.rp-accordion-item__trigger[data-v-5b00ef39]:disabled {
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
81
|
+
.rp-accordion-item__title[data-v-5b00ef39] {
|
|
82
|
+
min-width: 0;
|
|
83
|
+
}
|
|
84
|
+
.rp-accordion-item__icon[data-v-5b00ef39] {
|
|
85
|
+
display: inline-flex;
|
|
86
|
+
flex: 0 0 auto;
|
|
87
|
+
color: var(--rp-color-control-icon);
|
|
88
|
+
transition: transform var(--_rp-accordion-duration);
|
|
89
|
+
}
|
|
90
|
+
.rp-accordion-item--open .rp-accordion-item__icon[data-v-5b00ef39] {
|
|
91
|
+
transform: rotate(180deg);
|
|
92
|
+
}
|
|
93
|
+
.rp-accordion-item__content[data-v-5b00ef39] {
|
|
94
|
+
box-sizing: border-box;
|
|
95
|
+
display: grid;
|
|
96
|
+
min-width: 0;
|
|
97
|
+
overflow: hidden;
|
|
98
|
+
padding: 0 var(--rp-spacing-4) var(--rp-spacing-4);
|
|
99
|
+
color: var(--rp-color-text);
|
|
100
|
+
font-size: var(--rp-font-size-md);
|
|
101
|
+
line-height: var(--rp-line-height-md);
|
|
102
|
+
grid-template-rows: 1fr;
|
|
103
|
+
transition: grid-template-rows var(--_rp-accordion-duration), opacity var(--_rp-accordion-duration), padding-bottom var(--_rp-accordion-duration);
|
|
104
|
+
}
|
|
105
|
+
.rp-accordion-item__inner[data-v-5b00ef39] {
|
|
106
|
+
min-height: 0;
|
|
107
|
+
min-width: 0;
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
}
|
|
110
|
+
.rp-accordion-content-enter-from[data-v-5b00ef39],
|
|
111
|
+
.rp-accordion-content-leave-to[data-v-5b00ef39] {
|
|
112
|
+
opacity: 0;
|
|
113
|
+
grid-template-rows: 0fr;
|
|
114
|
+
padding-bottom: 0;
|
|
115
|
+
}
|
|
112
116
|
}
|
package/dist/accordion.js
CHANGED
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import './accordion.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 useRequiredInject } from "./useRequiredInject.js";
|
|
5
6
|
import { t as useCollapse } from "./useCollapse.js";
|
|
6
7
|
import { VaporTransition, applyVShow, child, computed, createComponent, createIf, createSlot, defineVaporComponent, extend, markRaw, next, provide, ref, renderEffect, setDynamicProps, setInsertionState, setText, template, toDisplayString, unref, useId } from "vue";
|
|
7
8
|
//#region src/components/accordion/types.ts
|
|
9
|
+
var accordionParts = ["root"];
|
|
10
|
+
var accordionItemParts = [
|
|
11
|
+
"root",
|
|
12
|
+
"trigger",
|
|
13
|
+
"title",
|
|
14
|
+
"icon",
|
|
15
|
+
"content"
|
|
16
|
+
];
|
|
8
17
|
var accordionKey = Symbol("accordion");
|
|
9
18
|
//#endregion
|
|
10
19
|
//#region src/components/accordion/useAccordion.ts
|
|
@@ -232,11 +241,12 @@ function useAccordionItem(props) {
|
|
|
232
241
|
}
|
|
233
242
|
//#endregion
|
|
234
243
|
//#region src/components/accordion/accordion.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
235
|
-
var t0$2 = template("<div data-v-
|
|
244
|
+
var t0$2 = template("<div data-v-e732f2da>", 1);
|
|
236
245
|
//#endregion
|
|
237
246
|
//#region src/components/accordion/accordion.vue
|
|
238
247
|
var accordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
239
248
|
name: "RpAccordion",
|
|
249
|
+
inheritAttrs: false,
|
|
240
250
|
__name: "accordion",
|
|
241
251
|
props: {
|
|
242
252
|
id: {},
|
|
@@ -261,22 +271,29 @@ var accordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
261
271
|
orientation: { default: "vertical" },
|
|
262
272
|
ariaLabel: {},
|
|
263
273
|
describedby: {},
|
|
264
|
-
labelledby: {}
|
|
274
|
+
labelledby: {},
|
|
275
|
+
classNames: {},
|
|
276
|
+
styles: {}
|
|
265
277
|
},
|
|
266
278
|
emits: ["update:modelValue"],
|
|
267
279
|
setup(__props, { emit: __emit }) {
|
|
268
280
|
const props = __props;
|
|
269
281
|
const emit = __emit;
|
|
270
|
-
const { rootProps } = useAccordion(props, (value) => {
|
|
282
|
+
const { rootProps: internalRootProps } = useAccordion(props, (value) => {
|
|
271
283
|
emit("update:modelValue", value);
|
|
272
284
|
});
|
|
285
|
+
const { getRootAttrs } = useStylesApi(props, "root");
|
|
286
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
287
|
+
...internalRootProps.value,
|
|
288
|
+
"data-disabled": presence(props.disabled)
|
|
289
|
+
}));
|
|
273
290
|
const n1 = t0$2();
|
|
274
|
-
renderEffect(() => setDynamicProps(n1, [
|
|
291
|
+
renderEffect(() => setDynamicProps(n1, [rootAttrs.value]));
|
|
275
292
|
setInsertionState(n1, null, 0);
|
|
276
293
|
createSlot("default", null, null, 1);
|
|
277
294
|
return n1;
|
|
278
295
|
}
|
|
279
|
-
}), [["__scopeId", "data-v-
|
|
296
|
+
}), [["__scopeId", "data-v-e732f2da"]]);
|
|
280
297
|
//#endregion
|
|
281
298
|
//#region ~icons/lucide/chevron-down
|
|
282
299
|
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=\"m6 9l6 6l6-6\">", 3, 1);
|
|
@@ -290,13 +307,14 @@ var chevron_down_default = markRaw(defineVaporComponent({
|
|
|
290
307
|
//#endregion
|
|
291
308
|
//#region src/components/accordion/accordion-item.vue?vue&type=script&setup=true&vapor=true&lang.ts
|
|
292
309
|
var t0 = template(" ");
|
|
293
|
-
var t1 = template("<button data-v-
|
|
294
|
-
var t2 = template("<section data-v-
|
|
295
|
-
var t3 = template("<div data-v-
|
|
310
|
+
var t1 = template("<button data-v-5b00ef39><span data-v-5b00ef39></span><span data-v-5b00ef39>");
|
|
311
|
+
var t2 = template("<section data-v-5b00ef39><div data-v-5b00ef39 class=rp-accordion-item__inner>");
|
|
312
|
+
var t3 = template("<div data-v-5b00ef39><h3 data-v-5b00ef39 class=rp-accordion-item__heading>", 1);
|
|
296
313
|
//#endregion
|
|
297
314
|
//#region src/components/accordion/accordion-item.vue
|
|
298
315
|
var accordion_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineVaporComponent({
|
|
299
316
|
name: "RpAccordionItem",
|
|
317
|
+
inheritAttrs: false,
|
|
300
318
|
__name: "accordion-item",
|
|
301
319
|
props: {
|
|
302
320
|
id: {},
|
|
@@ -313,25 +331,51 @@ var accordion_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
313
331
|
role: { default: "region" },
|
|
314
332
|
ariaLabel: {},
|
|
315
333
|
ariaDescribedby: {},
|
|
316
|
-
ariaLabelledby: {}
|
|
334
|
+
ariaLabelledby: {},
|
|
335
|
+
classNames: {},
|
|
336
|
+
styles: {}
|
|
317
337
|
},
|
|
318
338
|
setup(__props) {
|
|
319
|
-
const
|
|
339
|
+
const props = __props;
|
|
340
|
+
const { rootProps: internalRootProps, triggerProps: internalTriggerProps, contentProps, triggerSlotProps, contentSlotProps, isOpen, shouldRenderContent } = useAccordionItem(props);
|
|
341
|
+
const { getPartAttrs, getRootAttrs } = useStylesApi(props, "root");
|
|
342
|
+
const rootAttrs = computed(() => getRootAttrs({
|
|
343
|
+
...internalRootProps.value,
|
|
344
|
+
"data-disabled": presence(internalRootProps.value["data-disabled"])
|
|
345
|
+
}));
|
|
346
|
+
const publicTriggerProps = computed(() => ({
|
|
347
|
+
...internalTriggerProps.value,
|
|
348
|
+
...getPartAttrs("trigger", { class: internalTriggerProps.value.class }),
|
|
349
|
+
"data-state": internalRootProps.value["data-state"],
|
|
350
|
+
"data-disabled": presence(internalRootProps.value["data-disabled"])
|
|
351
|
+
}));
|
|
352
|
+
const publicTriggerSlotProps = computed(() => ({
|
|
353
|
+
...triggerSlotProps.value,
|
|
354
|
+
triggerProps: publicTriggerProps.value
|
|
355
|
+
}));
|
|
356
|
+
const publicContentProps = computed(() => ({
|
|
357
|
+
...contentProps.value,
|
|
358
|
+
...getPartAttrs("content", { class: contentProps.value.class })
|
|
359
|
+
}));
|
|
320
360
|
const n16 = t3();
|
|
321
361
|
const n9 = child(n16);
|
|
322
|
-
renderEffect(() => setDynamicProps(n16, [
|
|
362
|
+
renderEffect(() => setDynamicProps(n16, [rootAttrs.value]));
|
|
323
363
|
setInsertionState(n9, null, 0);
|
|
324
|
-
createSlot("trigger", { $: [() =>
|
|
364
|
+
createSlot("trigger", { $: [() => publicTriggerSlotProps.value] }, () => {
|
|
325
365
|
const n8 = t1();
|
|
326
366
|
const n5 = child(n8);
|
|
327
367
|
const n7 = next(n5, 1);
|
|
328
|
-
renderEffect(() =>
|
|
368
|
+
renderEffect(() => {
|
|
369
|
+
setDynamicProps(n8, [publicTriggerProps.value]);
|
|
370
|
+
setDynamicProps(n5, [unref(getPartAttrs)("title", { class: "rp-accordion-item__title" })]);
|
|
371
|
+
});
|
|
329
372
|
setInsertionState(n5, null, 0);
|
|
330
373
|
createSlot("title", null, () => {
|
|
331
374
|
const n4 = t0();
|
|
332
375
|
renderEffect(() => setText(n4, toDisplayString(__props.title)));
|
|
333
376
|
return n4;
|
|
334
377
|
}, 1);
|
|
378
|
+
renderEffect(() => setDynamicProps(n7, [unref(getPartAttrs)("icon", { class: "rp-accordion-item__icon" }), { "aria-hidden": "true" }]));
|
|
335
379
|
setInsertionState(n7, null, 0);
|
|
336
380
|
createComponent(unref(chevron_down_default));
|
|
337
381
|
return n8;
|
|
@@ -344,7 +388,7 @@ var accordion_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
344
388
|
return createIf(() => unref(shouldRenderContent), () => {
|
|
345
389
|
const n14 = t2();
|
|
346
390
|
const n13 = child(n14);
|
|
347
|
-
renderEffect(() => setDynamicProps(n14, [
|
|
391
|
+
renderEffect(() => setDynamicProps(n14, [publicContentProps.value]));
|
|
348
392
|
setInsertionState(n13, null, 0);
|
|
349
393
|
createSlot("default", { $: [() => unref(contentSlotProps)] }, null, 1);
|
|
350
394
|
applyVShow(n14, () => unref(isOpen));
|
|
@@ -353,6 +397,6 @@ var accordion_item_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
353
397
|
}, { _: 8 }));
|
|
354
398
|
return n16;
|
|
355
399
|
}
|
|
356
|
-
}), [["__scopeId", "data-v-
|
|
400
|
+
}), [["__scopeId", "data-v-5b00ef39"]]);
|
|
357
401
|
//#endregion
|
|
358
|
-
export { useAccordionItem as i, accordion_default as n, useAccordion as r, accordion_item_default as t };
|
|
402
|
+
export { accordionItemParts as a, useAccordionItem as i, accordion_default as n, accordionParts as o, useAccordion as r, accordion_item_default as t };
|
package/dist/alert.css
CHANGED
|
@@ -1,109 +1,111 @@
|
|
|
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
|
-
|
|
108
|
-
|
|
1
|
+
@layer ropav.components {
|
|
2
|
+
.rp-alert[data-v-8e95a4b4] {
|
|
3
|
+
--_rp-alert-bg: var(--rp-color-cyan-light);
|
|
4
|
+
--_rp-alert-fg: var(--rp-color-text);
|
|
5
|
+
--_rp-alert-title-fg: var(--rp-color-cyan-light-color);
|
|
6
|
+
--_rp-alert-icon-fg: var(--rp-color-cyan-light-color);
|
|
7
|
+
--_rp-alert-border: transparent;
|
|
8
|
+
--_rp-alert-radius: var(--rp-radius-sm);
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: flex-start;
|
|
12
|
+
width: 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
padding: var(--rp-spacing-4);
|
|
15
|
+
gap: var(--rp-spacing-3);
|
|
16
|
+
color: var(--_rp-alert-fg);
|
|
17
|
+
font-family: var(--rp-font-family);
|
|
18
|
+
font-size: var(--rp-font-size-sm);
|
|
19
|
+
line-height: var(--rp-line-height-md);
|
|
20
|
+
background-color: var(--_rp-alert-bg);
|
|
21
|
+
border: var(--rp-border-width-thin) solid var(--_rp-alert-border);
|
|
22
|
+
border-radius: var(--_rp-alert-radius);
|
|
23
|
+
transition: background-color var(--rp-transition-fast), color var(--rp-transition-fast), border-color var(--rp-transition-fast);
|
|
24
|
+
}
|
|
25
|
+
.rp-alert--radius-none[data-v-8e95a4b4] {
|
|
26
|
+
--_rp-alert-radius: var(--rp-radius-none);
|
|
27
|
+
}
|
|
28
|
+
.rp-alert--radius-xs[data-v-8e95a4b4] {
|
|
29
|
+
--_rp-alert-radius: var(--rp-radius-xs);
|
|
30
|
+
}
|
|
31
|
+
.rp-alert--radius-sm[data-v-8e95a4b4] {
|
|
32
|
+
--_rp-alert-radius: var(--rp-radius-sm);
|
|
33
|
+
}
|
|
34
|
+
.rp-alert--radius-md[data-v-8e95a4b4] {
|
|
35
|
+
--_rp-alert-radius: var(--rp-radius-md);
|
|
36
|
+
}
|
|
37
|
+
.rp-alert--radius-lg[data-v-8e95a4b4] {
|
|
38
|
+
--_rp-alert-radius: var(--rp-radius-lg);
|
|
39
|
+
}
|
|
40
|
+
.rp-alert--radius-xl[data-v-8e95a4b4] {
|
|
41
|
+
--_rp-alert-radius: var(--rp-radius-xl);
|
|
42
|
+
}
|
|
43
|
+
.rp-alert__icon[data-v-8e95a4b4] {
|
|
44
|
+
display: inline-flex;
|
|
45
|
+
flex: 0 0 auto;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
margin-top: 0.125rem;
|
|
49
|
+
color: var(--_rp-alert-icon-fg);
|
|
50
|
+
line-height: 0;
|
|
51
|
+
}
|
|
52
|
+
.rp-alert__icon[data-v-8e95a4b4] > svg {
|
|
53
|
+
display: block;
|
|
54
|
+
width: 1rem;
|
|
55
|
+
height: 1rem;
|
|
56
|
+
}
|
|
57
|
+
.rp-alert__content[data-v-8e95a4b4] {
|
|
58
|
+
display: grid;
|
|
59
|
+
flex: 1 1 auto;
|
|
60
|
+
min-width: 0;
|
|
61
|
+
gap: var(--rp-spacing-1);
|
|
62
|
+
}
|
|
63
|
+
.rp-alert__title[data-v-8e95a4b4] {
|
|
64
|
+
color: var(--_rp-alert-title-fg);
|
|
65
|
+
font-size: var(--rp-font-size-md);
|
|
66
|
+
font-weight: var(--rp-font-weight-semibold);
|
|
67
|
+
line-height: var(--rp-line-height-xs);
|
|
68
|
+
}
|
|
69
|
+
.rp-alert__description[data-v-8e95a4b4] {
|
|
70
|
+
margin: 0;
|
|
71
|
+
}
|
|
72
|
+
.rp-alert__body[data-v-8e95a4b4], .rp-alert__description[data-v-8e95a4b4] {
|
|
73
|
+
min-width: 0;
|
|
74
|
+
color: var(--_rp-alert-fg);
|
|
75
|
+
}
|
|
76
|
+
.rp-alert__action[data-v-8e95a4b4] {
|
|
77
|
+
display: inline-flex;
|
|
78
|
+
flex: 0 0 auto;
|
|
79
|
+
align-items: center;
|
|
80
|
+
margin-left: auto;
|
|
81
|
+
}
|
|
82
|
+
.rp-alert__close[data-v-8e95a4b4] {
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
display: inline-flex;
|
|
85
|
+
flex: 0 0 auto;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
width: 1.75rem;
|
|
89
|
+
height: 1.75rem;
|
|
90
|
+
margin: calc(var(--rp-spacing-1) * -1) calc(var(--rp-spacing-1) * -1) calc(var(--rp-spacing-1) * -1) 0;
|
|
91
|
+
padding: 0;
|
|
92
|
+
color: var(--_rp-alert-icon-fg);
|
|
93
|
+
background: transparent;
|
|
94
|
+
border: 0;
|
|
95
|
+
border-radius: var(--rp-radius-sm);
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
transition: background-color var(--rp-transition-fast), color var(--rp-transition-fast);
|
|
98
|
+
}
|
|
99
|
+
.rp-alert__close[data-v-8e95a4b4]:hover {
|
|
100
|
+
background-color: color-mix(in srgb, var(--_rp-alert-icon-fg) 12%, transparent);
|
|
101
|
+
}
|
|
102
|
+
.rp-alert__close[data-v-8e95a4b4]:focus-visible {
|
|
103
|
+
outline: var(--rp-border-width-medium) solid var(--rp-color-focus-ring);
|
|
104
|
+
outline-offset: 2px;
|
|
105
|
+
}
|
|
106
|
+
.rp-alert__close[data-v-8e95a4b4] > svg {
|
|
107
|
+
display: block;
|
|
108
|
+
width: 1rem;
|
|
109
|
+
height: 1rem;
|
|
110
|
+
}
|
|
109
111
|
}
|