@una-ui/preset-edge 0.57.0-29157461.9be05d8 → 0.58.0-29161252.a68b03f
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/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { colors } from '@unocss/preset-mini/colors';
|
|
|
3
3
|
import { fonts } from '@unocss/preset-mini/rules';
|
|
4
4
|
import { handler, parseColor } from '@unocss/preset-mini/utils';
|
|
5
5
|
import { mergeDeep } from 'unocss';
|
|
6
|
-
import { s as shortcuts } from './shared/preset-edge.
|
|
6
|
+
import { s as shortcuts } from './shared/preset-edge.B3q7gadC.mjs';
|
|
7
7
|
|
|
8
8
|
function presetUna(options = {
|
|
9
9
|
// TODO: add options
|
|
@@ -1044,38 +1044,27 @@ const slider = [
|
|
|
1044
1044
|
|
|
1045
1045
|
const staticSwitch = {
|
|
1046
1046
|
// base
|
|
1047
|
-
"switch": "
|
|
1047
|
+
"switch": "h-1.25em w-2.25em switch-disabled inline-flex shrink-0 cursor-pointer items-center border-2 border-transparent rounded-full shadow-sm transition-colors",
|
|
1048
1048
|
"switch-disabled": "data-[disabled]:n-disabled",
|
|
1049
|
-
"switch-focus": "focus-visible:ring-brand focus-visible:ring-offset-base transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
1050
1049
|
// thumb
|
|
1051
|
-
"switch-thumb": "square-1em flex items-center justify-center
|
|
1050
|
+
"switch-thumb": "square-1em flex items-center justify-center pointer-events-none block rounded-full bg-base shadow-lg ring-0 transition-transform",
|
|
1052
1051
|
"switch-thumb-checked": "translate-x-1.01em",
|
|
1053
1052
|
"switch-thumb-unchecked": "translate-x-0.03em",
|
|
1054
|
-
//
|
|
1053
|
+
// icons
|
|
1055
1054
|
"switch-icon": "text-0.7em",
|
|
1056
1055
|
"switch-icon-unchecked": "text-muted",
|
|
1057
1056
|
"switch-icon-checked": "text-muted",
|
|
1058
1057
|
// loading
|
|
1059
1058
|
"switch-loading-icon": "text-gray animate-spin text-0.8em",
|
|
1060
|
-
"switch-loading-icon-name": "i-loading"
|
|
1059
|
+
"switch-loading-icon-name": "i-loading",
|
|
1060
|
+
"switch-focus-gray": "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-base focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
1061
1061
|
};
|
|
1062
1062
|
const dynamicSwitch = [
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
return `data-[state=checked]:n-${color}-600 dark:data-[state=checked]:n-${color}-500`;
|
|
1069
|
-
}
|
|
1070
|
-
],
|
|
1071
|
-
[
|
|
1072
|
-
/^switch-unchecked(?:-([^-]+))?(?:-([^-]+))?$/,
|
|
1073
|
-
([, color = "gray"], { theme }) => {
|
|
1074
|
-
const parsedColor = parseColor$1(color, theme);
|
|
1075
|
-
if ((parsedColor?.cssColor?.type === "rgb" || parsedColor?.cssColor?.type === "rgba") && parsedColor.cssColor.components)
|
|
1076
|
-
return `data-[state=unchecked]:n-${color}-200 dark:data-[state=unchecked]:n-${color}-700/58`;
|
|
1077
|
-
}
|
|
1078
|
-
]
|
|
1063
|
+
// base
|
|
1064
|
+
[/^switch-focus(-(\S+))?$/, ([, , c = "primary"]) => `focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-${c}-600 dark:focus-visible:ring-${c}-500 focus-visible:ring-offset-2 focus-visible:ring-offset-background`],
|
|
1065
|
+
// variants
|
|
1066
|
+
[/^switch-checked(-(\S+))?$/, ([, , c = "primary"]) => `data-[state=checked]:switch-focus-${c} data-[state=checked]:bg-${c}-600 dark:data-[state=checked]:bg-${c}-500`],
|
|
1067
|
+
[/^switch-unchecked(-(\S+))?$/, ([, , c = "gray"]) => `data-[state=unchecked]:switch-focus-${c} data-[state=unchecked]:bg-${c}-200 dark:data-[state=unchecked]:bg-${c}-700/58`]
|
|
1079
1068
|
];
|
|
1080
1069
|
const _switch = [
|
|
1081
1070
|
...dynamicSwitch,
|
package/dist/shortcuts.mjs
CHANGED