@resee-movies/nuxt-ux 0.9.0 → 0.11.0
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/module.json +1 -1
- package/dist/module.mjs +3 -1
- package/dist/runtime/components/Menu.vue +2 -2
- package/dist/runtime/components/form/FormField.vue +11 -1
- package/dist/runtime/components/form/FormFieldBuilder.vue +6 -3
- package/dist/runtime/components/form/FormFieldBuilder.vue.d.ts +5 -1
- package/dist/runtime/components/form/FormFieldRadioGroup.vue +65 -0
- package/dist/runtime/components/form/FormFieldRadioGroup.vue.d.ts +19 -0
- package/dist/runtime/components/form/FormLabelInputPair.vue +7 -2
- package/dist/runtime/components/form/FormLabelInputPair.vue.d.ts +2 -0
- package/dist/runtime/components/form/element/FormElementSelectButton.vue +13 -41
- package/dist/runtime/components/form/element/FormElementSelectOptions.vue +12 -22
- package/dist/runtime/composables/use-query-parameters.d.ts +38 -0
- package/dist/runtime/composables/use-query-parameters.js +132 -0
- package/dist/runtime/composables/use-resee-breakpoints.d.ts +19 -0
- package/dist/runtime/composables/use-resee-breakpoints.js +16 -0
- package/dist/runtime/theme/css/brand/form.css +1 -3
- package/dist/runtime/theme/css/brand/gradient.css +1 -1
- package/dist/runtime/theme/css/brand/theme.css +1 -1
- package/dist/runtime/utils/form.d.ts +30 -1
- package/dist/runtime/utils/form.js +55 -1
- package/package.json +2 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -108,6 +108,7 @@ async function importCSS(nuxt = useNuxt(), options) {
|
|
|
108
108
|
function importModules(nuxt) {
|
|
109
109
|
const NuxtFonts = {
|
|
110
110
|
defaults: {
|
|
111
|
+
provider: "google",
|
|
111
112
|
families: [
|
|
112
113
|
{
|
|
113
114
|
name: "Archivo",
|
|
@@ -179,7 +180,8 @@ function importModules(nuxt) {
|
|
|
179
180
|
};
|
|
180
181
|
return {
|
|
181
182
|
"@nuxt/fonts": NuxtFonts,
|
|
182
|
-
"@primevue/nuxt-module": Primevue
|
|
183
|
+
"@primevue/nuxt-module": Primevue,
|
|
184
|
+
"@nuxtjs/device": {}
|
|
183
185
|
};
|
|
184
186
|
}
|
|
185
187
|
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
|
|
54
54
|
<script setup>
|
|
55
55
|
import { isString } from "@resee-movies/utilities/strings/is-string";
|
|
56
|
-
import { useBreakpoints, breakpointsTailwind } from "@vueuse/core";
|
|
57
56
|
import PrimeMenu, {} from "primevue/menu";
|
|
58
57
|
import { computed, ref, useAttrs, useId, useSlots } from "vue";
|
|
58
|
+
import { useReseeBreakpoints } from "../composables/use-resee-breakpoints";
|
|
59
59
|
import { blockBodyScroll } from "../utils/dom";
|
|
60
60
|
import IconTextPair from "./IconTextPair.vue";
|
|
61
61
|
import { TeleportId } from "../constants";
|
|
@@ -67,7 +67,7 @@ const slots = useSlots();
|
|
|
67
67
|
const menuId = useId();
|
|
68
68
|
const menu = ref();
|
|
69
69
|
const visible = ref(false);
|
|
70
|
-
const isSmall =
|
|
70
|
+
const isSmall = useReseeBreakpoints().smallerOrEqual("sm");
|
|
71
71
|
const props = defineProps({
|
|
72
72
|
model: { type: Array, required: true },
|
|
73
73
|
prefixText: { type: String, required: false, default: void 0 },
|
|
@@ -4,10 +4,20 @@
|
|
|
4
4
|
:as = "props.is"
|
|
5
5
|
:name = "props.name"
|
|
6
6
|
:resolver = "validatorFunction"
|
|
7
|
-
:class = "[
|
|
7
|
+
:class = "[
|
|
8
|
+
props.class,
|
|
9
|
+
{
|
|
10
|
+
'input-field': props.is !== 'fieldset',
|
|
11
|
+
'input-fieldset': props.is === 'fieldset',
|
|
12
|
+
disabled: isDisabled,
|
|
13
|
+
readonly: isReadonly,
|
|
14
|
+
required: props.required
|
|
15
|
+
}
|
|
16
|
+
]"
|
|
8
17
|
>
|
|
9
18
|
<FormLabelInputPair
|
|
10
19
|
:input-id = "inputId"
|
|
20
|
+
:label-is = "props.is === 'fieldset' ? 'legend' : void 0"
|
|
11
21
|
:label-id = "labelId"
|
|
12
22
|
:label-text = "labelText"
|
|
13
23
|
:label-position = "props.labelPosition"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="@container">
|
|
3
|
-
<div class="grid grid-cols-1 gap-x-4 gap-y-6
|
|
3
|
+
<div class="grid grid-cols-1 gap-x-4 gap-y-6 sm:@lg:grid-cols-2 sm:@lg:gap-y-7">
|
|
4
4
|
<template v-for="(field, index) of props.fields" :key="field.name ?? index">
|
|
5
5
|
<Component
|
|
6
6
|
:is = "getComponent(field)"
|
|
7
7
|
v-bind = "field"
|
|
8
8
|
:class = "{
|
|
9
|
-
'
|
|
9
|
+
'sm:@lg:col-span-2': field.width !== 'half'
|
|
10
10
|
}"
|
|
11
11
|
/>
|
|
12
12
|
</template>
|
|
@@ -25,6 +25,7 @@ import CheckboxField from "./FormFieldCheckbox.vue";
|
|
|
25
25
|
import SelectField from "./FormFieldSelect.vue";
|
|
26
26
|
import SelectButtonField from "./FormFieldSelectButton.vue";
|
|
27
27
|
import SubmitButton from "./FormSubmitButton.vue";
|
|
28
|
+
import RadioGroup from "./FormFieldRadioGroup.vue";
|
|
28
29
|
import TextField from "./FormFieldText.vue";
|
|
29
30
|
import TextareaField from "./FormFieldTextarea.vue";
|
|
30
31
|
import ToggleSwitchField from "./FormFieldToggleSwitch.vue";
|
|
@@ -40,6 +41,8 @@ function getComponent(field) {
|
|
|
40
41
|
return SelectField;
|
|
41
42
|
case "select-button":
|
|
42
43
|
return SelectButtonField;
|
|
44
|
+
case "radio":
|
|
45
|
+
return RadioGroup;
|
|
43
46
|
case "text":
|
|
44
47
|
return TextField;
|
|
45
48
|
case "textarea":
|
|
@@ -49,7 +52,7 @@ function getComponent(field) {
|
|
|
49
52
|
case "turnstile":
|
|
50
53
|
return TurnstileField;
|
|
51
54
|
case "submit":
|
|
52
|
-
return h(EmptyDiv, { class: "text-end" }, h(SubmitButton));
|
|
55
|
+
return h(EmptyDiv, { class: "text-end" }, { default: () => h(SubmitButton) });
|
|
53
56
|
default:
|
|
54
57
|
return "div";
|
|
55
58
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FormFieldCheckboxProps } from './FormFieldCheckbox.vue.js';
|
|
2
|
+
import type { FormFieldRadioGroupProps } from './FormFieldRadioGroup.vue.js';
|
|
2
3
|
import type { FormFieldSelectProps } from './FormFieldSelect.vue.js';
|
|
3
4
|
import type { FormFieldSelectButtonProps } from './FormFieldSelectButton.vue.js';
|
|
4
5
|
import type { FormFieldTextProps } from './FormFieldText.vue.js';
|
|
@@ -18,6 +19,9 @@ export interface SelectField extends FormFieldSelectProps, CommonOptions {
|
|
|
18
19
|
export interface SelectButtonField extends FormFieldSelectButtonProps, CommonOptions {
|
|
19
20
|
fieldType: 'select-button';
|
|
20
21
|
}
|
|
22
|
+
export interface RadioGroup extends FormFieldRadioGroupProps, CommonOptions {
|
|
23
|
+
fieldType: 'radio';
|
|
24
|
+
}
|
|
21
25
|
export interface TextField extends FormFieldTextProps, CommonOptions {
|
|
22
26
|
fieldType: 'text';
|
|
23
27
|
}
|
|
@@ -33,7 +37,7 @@ export interface TurnstileField extends FormFieldTurnstileProps, CommonOptions {
|
|
|
33
37
|
export interface SubmitButton extends FormSubmitButtonProps, CommonOptions {
|
|
34
38
|
fieldType: 'submit';
|
|
35
39
|
}
|
|
36
|
-
export type FormFieldBuilderOption = CheckboxField | SelectField | SelectButtonField | TextField | TextareaField | ToggleSwitchField | TurnstileField | SubmitButton;
|
|
40
|
+
export type FormFieldBuilderOption = CheckboxField | SelectField | SelectButtonField | RadioGroup | TextField | TextareaField | ToggleSwitchField | TurnstileField | SubmitButton;
|
|
37
41
|
export interface FormFieldBuilderProps {
|
|
38
42
|
fields: undefined | FormFieldBuilderOption[];
|
|
39
43
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FormField v-bind="props" is="fieldset" :validator="validatorFunction">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label" />
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<template #default="{ inputId, messageId, disabled, readonly, invalid }">
|
|
8
|
+
<template v-for="(option, index) of options" :key="`${inputId}_${index}`">
|
|
9
|
+
<FormLabelInputPair
|
|
10
|
+
:label-position = "props.optionLabelPosition"
|
|
11
|
+
:disabled = "disabled"
|
|
12
|
+
:readonly = "readonly"
|
|
13
|
+
:input-id = "`${inputId}_${index}`"
|
|
14
|
+
:label-text = "utils.getOptionLabel(option)"
|
|
15
|
+
>
|
|
16
|
+
<template #input>
|
|
17
|
+
<PrimeRadioButton
|
|
18
|
+
:value = "utils.getOptionValue(option)"
|
|
19
|
+
:input-id = "`${inputId}_${index}`"
|
|
20
|
+
:disabled = "disabled || utils.getOptionDisabled(option) || readonly"
|
|
21
|
+
:invalid = "invalid"
|
|
22
|
+
:pt:input:readonly = "readonly"
|
|
23
|
+
:pt:input:aria-describedby = "messageId"
|
|
24
|
+
class = "input-group"
|
|
25
|
+
/>
|
|
26
|
+
</template>
|
|
27
|
+
</FormLabelInputPair>
|
|
28
|
+
</template>
|
|
29
|
+
</template>
|
|
30
|
+
</FormField>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<script setup>
|
|
38
|
+
import PrimeRadioButton from "primevue/radiobutton";
|
|
39
|
+
import { computed } from "vue";
|
|
40
|
+
import { useOptionListMethods } from "../../utils/form";
|
|
41
|
+
import { createBooleanValidator } from "../../utils/validation";
|
|
42
|
+
import FormField from "./FormField.vue";
|
|
43
|
+
import FormLabelInputPair from "./FormLabelInputPair.vue";
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
options: { type: Array, required: true },
|
|
46
|
+
optionLabel: { type: String, required: false, default: void 0 },
|
|
47
|
+
optionValue: { type: String, required: false, default: void 0 },
|
|
48
|
+
optionDisabled: { type: String, required: false, default: void 0 },
|
|
49
|
+
optionLabelPosition: { type: String, required: false, default: "after" },
|
|
50
|
+
name: { type: String, required: true },
|
|
51
|
+
label: { type: String, required: false },
|
|
52
|
+
is: { type: String, required: false },
|
|
53
|
+
required: { type: Boolean, required: false },
|
|
54
|
+
disabled: { type: Boolean, required: false },
|
|
55
|
+
readonly: { type: Boolean, required: false },
|
|
56
|
+
fauxLabel: { type: Boolean, required: false },
|
|
57
|
+
labelSrOnly: { type: Boolean, required: false },
|
|
58
|
+
labelPosition: { type: String, required: false },
|
|
59
|
+
class: { type: null, required: false }
|
|
60
|
+
});
|
|
61
|
+
const utils = useOptionListMethods(props);
|
|
62
|
+
const validatorFunction = computed(() => {
|
|
63
|
+
return () => createBooleanValidator({ required: props.required });
|
|
64
|
+
});
|
|
65
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { FormFieldProps } from './FormField.vue.js';
|
|
2
|
+
import type { FormLabelInputPairProps } from './FormLabelInputPair.vue.js';
|
|
3
|
+
export interface FormFieldRadioGroupProps extends Omit<FormFieldProps, 'validator'> {
|
|
4
|
+
options: unknown[];
|
|
5
|
+
optionLabel?: string;
|
|
6
|
+
optionValue?: string;
|
|
7
|
+
optionDisabled?: string;
|
|
8
|
+
optionLabelPosition?: FormLabelInputPairProps['labelPosition'];
|
|
9
|
+
}
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<FormFieldRadioGroupProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FormFieldRadioGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
11
|
+
label?: (props: {}) => any;
|
|
12
|
+
}>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="['input-label-pair', `label-${props.labelPosition}`]">
|
|
3
3
|
<Component
|
|
4
|
-
:is = "
|
|
4
|
+
:is = "labelTagName"
|
|
5
5
|
:id = "props.labelId"
|
|
6
|
-
:for = "props.
|
|
6
|
+
:for = "labelTagName === 'label' ? props.inputId : void 0"
|
|
7
7
|
:class = "[
|
|
8
8
|
'input-label',
|
|
9
9
|
{
|
|
@@ -29,14 +29,19 @@
|
|
|
29
29
|
</script>
|
|
30
30
|
|
|
31
31
|
<script setup>
|
|
32
|
+
import { computed } from "vue";
|
|
32
33
|
const props = defineProps({
|
|
33
34
|
inputId: { type: String, required: false },
|
|
34
35
|
labelId: { type: String, required: false },
|
|
35
36
|
labelText: { type: String, required: false },
|
|
36
37
|
labelPosition: { type: String, required: false, default: "above" },
|
|
37
38
|
labelSrOnly: { type: Boolean, required: false, default: false },
|
|
39
|
+
labelIs: { type: String, required: false, default: void 0 },
|
|
38
40
|
required: { type: Boolean, required: false, default: false },
|
|
39
41
|
disabled: { type: Boolean, required: false, default: false },
|
|
40
42
|
fauxLabel: { type: Boolean, required: false, default: false }
|
|
41
43
|
});
|
|
44
|
+
const labelTagName = computed(
|
|
45
|
+
() => props.labelIs ?? (props.fauxLabel ? "span" : "label")
|
|
46
|
+
);
|
|
42
47
|
</script>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import type { HintedString } from '../../types/index.js';
|
|
1
2
|
export interface FormLabelInputPairProps {
|
|
2
3
|
inputId?: string;
|
|
3
4
|
labelId?: string;
|
|
4
5
|
labelText?: string;
|
|
5
6
|
labelPosition?: 'above' | 'below' | 'before' | 'after';
|
|
6
7
|
labelSrOnly?: boolean;
|
|
8
|
+
labelIs?: HintedString<'label' | 'legend' | 'span'>;
|
|
7
9
|
required?: boolean;
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
fauxLabel?: boolean;
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
:aria-labelledby = "props.ariaLabelledby"
|
|
6
6
|
:aria-describedby = "props.ariaDescribedby"
|
|
7
7
|
>
|
|
8
|
-
<template v-for="(option, index) of props.options" :key="getOptionRenderKey(option) ?? index">
|
|
8
|
+
<template v-for="(option, index) of props.options" :key="utils.getOptionRenderKey(option) ?? index">
|
|
9
9
|
<ToggleButton
|
|
10
10
|
class = "input-button"
|
|
11
11
|
severity = "unset"
|
|
12
|
-
:pressed = "
|
|
13
|
-
:text = "props.iconOnly ? void 0 : getOptionLabel(option)"
|
|
14
|
-
:icon = "getOptionIcon(option)"
|
|
12
|
+
:pressed = "utils.getOptionIndex(option, value) !== -1"
|
|
13
|
+
:text = "props.iconOnly ? void 0 : utils.getOptionLabel(option)"
|
|
14
|
+
:icon = "utils.getOptionIcon(option)"
|
|
15
15
|
:disabled = "getOptionDisabled(option)"
|
|
16
|
-
:aria-label = "props.iconOnly ? getOptionLabel(option) : void 0"
|
|
17
|
-
:tooltip = "props.iconOnly ? getOptionLabel(option) : void 0"
|
|
16
|
+
:aria-label = "props.iconOnly ? utils.getOptionLabel(option) : void 0"
|
|
17
|
+
:tooltip = "props.iconOnly ? utils.getOptionLabel(option) : void 0"
|
|
18
18
|
@click = "(pressed) => handleToggleChange(option, pressed)"
|
|
19
19
|
/>
|
|
20
20
|
</template>
|
|
@@ -32,9 +32,7 @@ export class ChangeEvent extends Event {
|
|
|
32
32
|
</script>
|
|
33
33
|
|
|
34
34
|
<script setup>
|
|
35
|
-
import {
|
|
36
|
-
import { isNumber } from "@resee-movies/utilities/numbers/is-number";
|
|
37
|
-
import { isString } from "@resee-movies/utilities/strings/is-string";
|
|
35
|
+
import { useOptionListMethods } from "../../../utils/form";
|
|
38
36
|
import ToggleButton from "../../ToggleButton.vue";
|
|
39
37
|
const props = defineProps({
|
|
40
38
|
options: { type: Array, required: true },
|
|
@@ -53,58 +51,32 @@ const props = defineProps({
|
|
|
53
51
|
});
|
|
54
52
|
const emits = defineEmits(["change"]);
|
|
55
53
|
const value = defineModel("value", { type: null, ...{ default: null } });
|
|
56
|
-
|
|
57
|
-
return String(props.optionLabel ? resolveFieldData(option, props.optionLabel) : option);
|
|
58
|
-
}
|
|
59
|
-
function getOptionValue(option) {
|
|
60
|
-
return props.optionValue ? resolveFieldData(option, props.optionValue) : option;
|
|
61
|
-
}
|
|
62
|
-
function getOptionIcon(option) {
|
|
63
|
-
return props.optionIcon ? String(resolveFieldData(option, props.optionIcon)) : void 0;
|
|
64
|
-
}
|
|
54
|
+
const utils = useOptionListMethods(props);
|
|
65
55
|
function getOptionDisabled(option) {
|
|
66
|
-
if (props.disabled || props.readonly) {
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
if (props.optionDisabled && resolveFieldData(option, props.optionDisabled)) {
|
|
56
|
+
if (props.disabled || props.readonly || utils.value.getOptionDisabled(option)) {
|
|
70
57
|
return true;
|
|
71
58
|
}
|
|
72
59
|
if (props.multiple) {
|
|
73
60
|
const limit = props.selectionLimit ?? Number.POSITIVE_INFINITY;
|
|
74
61
|
const length = Array.isArray(value.value) ? value.value.length : 0;
|
|
75
|
-
if (limit <= length &&
|
|
62
|
+
if (limit <= length && utils.value.getOptionIndex(option, value) === -1) {
|
|
76
63
|
return true;
|
|
77
64
|
}
|
|
78
65
|
}
|
|
79
66
|
return false;
|
|
80
67
|
}
|
|
81
|
-
function getOptionRenderKey(option) {
|
|
82
|
-
const result = props.optionDataKey ? resolveFieldData(option, props.optionDataKey) : getOptionLabel(option);
|
|
83
|
-
return isString(result) || isNumber(result) ? result : void 0;
|
|
84
|
-
}
|
|
85
|
-
function getSelectedOptionIndex(option) {
|
|
86
|
-
if (!value.value) {
|
|
87
|
-
return -1;
|
|
88
|
-
}
|
|
89
|
-
const equalityKey = props.optionValue ? void 0 : props.optionDataKey;
|
|
90
|
-
const optionValue = getOptionValue(option);
|
|
91
|
-
if (Array.isArray(value.value)) {
|
|
92
|
-
return value.value.findIndex((entry) => equals(entry, optionValue, equalityKey));
|
|
93
|
-
}
|
|
94
|
-
return equals(value.value, optionValue, equalityKey) ? 0 : -1;
|
|
95
|
-
}
|
|
96
68
|
function handleToggleChange(option, pressed) {
|
|
97
69
|
if (props.multiple) {
|
|
98
|
-
const selectedIndex =
|
|
70
|
+
const selectedIndex = utils.value.getOptionIndex(option, value);
|
|
99
71
|
const selectedItems = Array.isArray(value.value) ? [...value.value] : [];
|
|
100
72
|
if (selectedIndex === -1) {
|
|
101
|
-
selectedItems.push(getOptionValue(option));
|
|
73
|
+
selectedItems.push(utils.value.getOptionValue(option));
|
|
102
74
|
} else {
|
|
103
75
|
selectedItems.splice(selectedIndex, 1);
|
|
104
76
|
}
|
|
105
77
|
value.value = selectedItems.length === 0 ? null : selectedItems;
|
|
106
78
|
} else {
|
|
107
|
-
value.value = pressed ? getOptionValue(option) : null;
|
|
79
|
+
value.value = pressed ? utils.value.getOptionValue(option) : null;
|
|
108
80
|
}
|
|
109
81
|
emits("change", new ChangeEvent(value.value));
|
|
110
82
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
:show-clear = "props.showClear"
|
|
15
15
|
:show-toggle-all = "showSelectAllCheckbox"
|
|
16
16
|
:filter = "showFilter"
|
|
17
|
-
:filter-placeholder = "props.filterPlaceholder ?? locale.form.filterPlaceholder"
|
|
17
|
+
:filter-placeholder = "props.filterPlaceholder ?? reseeUx.locale.form.filterPlaceholder"
|
|
18
18
|
:loading = "props.loading"
|
|
19
19
|
:pt = "props.multiple ? multiSelectPassthroughProps : selectPassthroughProps"
|
|
20
20
|
:append-to = "TeleportId"
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<template #emptyfilter>
|
|
61
|
-
<span>{{ locale.form.filterNoResults }}</span>
|
|
61
|
+
<span>{{ reseeUx.locale.form.filterNoResults }}</span>
|
|
62
62
|
</template>
|
|
63
63
|
|
|
64
64
|
<template #empty>
|
|
65
|
-
<span>{{ locale.form.noOptionsAvailable }}</span>
|
|
65
|
+
<span>{{ reseeUx.locale.form.noOptionsAvailable }}</span>
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<template #option="{ option, selected, index }" v-if="slots.option">
|
|
@@ -76,14 +76,14 @@ import {} from "primevue/select";
|
|
|
76
76
|
</script>
|
|
77
77
|
|
|
78
78
|
<script setup>
|
|
79
|
-
import { equals, resolveFieldData } from "@primeuix/utils/object";
|
|
80
|
-
import { useBreakpoints, breakpointsTailwind } from "@vueuse/core";
|
|
81
79
|
import PrimeMultiSelect from "primevue/multiselect";
|
|
82
80
|
import PrimeSelect from "primevue/select";
|
|
83
81
|
import { computed, useSlots } from "vue";
|
|
82
|
+
import { useReseeBreakpoints } from "../../../composables/use-resee-breakpoints";
|
|
84
83
|
import { useReseeUx } from "../../../composables/use-resee-ux";
|
|
85
84
|
import { TeleportId } from "../../../constants";
|
|
86
85
|
import { blockBodyScroll } from "../../../utils/dom";
|
|
86
|
+
import { useOptionListMethods } from "../../../utils/form";
|
|
87
87
|
import { swapStringPlaceholders } from "../../../utils/string";
|
|
88
88
|
import Button from "../../Button.vue";
|
|
89
89
|
import Icon from "../../Icon.vue";
|
|
@@ -156,8 +156,9 @@ const props = defineProps({
|
|
|
156
156
|
unstyled: { type: Boolean, required: false }
|
|
157
157
|
});
|
|
158
158
|
const slots = useSlots();
|
|
159
|
-
const
|
|
160
|
-
const
|
|
159
|
+
const utils = useOptionListMethods(props);
|
|
160
|
+
const reseeUx = useReseeUx();
|
|
161
|
+
const isSmall = useReseeBreakpoints().smallerOrEqual("sm");
|
|
161
162
|
const showFilter = computed(() => {
|
|
162
163
|
return props.showOptionFilter ?? (props.options?.length ?? 0) > 20;
|
|
163
164
|
});
|
|
@@ -219,7 +220,7 @@ const multiSelectPassthroughProps = computed(() => {
|
|
|
219
220
|
},
|
|
220
221
|
input: {
|
|
221
222
|
"id": `${props.inputId}_select_all`,
|
|
222
|
-
"aria-label": locale.form.selectAllOptions
|
|
223
|
+
"aria-label": reseeUx.locale.form.selectAllOptions
|
|
223
224
|
}
|
|
224
225
|
},
|
|
225
226
|
pcOptionCheckbox: {
|
|
@@ -229,30 +230,19 @@ const multiSelectPassthroughProps = computed(() => {
|
|
|
229
230
|
}
|
|
230
231
|
};
|
|
231
232
|
});
|
|
232
|
-
function getOptionValue(option) {
|
|
233
|
-
return props.optionValue ? resolveFieldData(option, props.optionValue) : option;
|
|
234
|
-
}
|
|
235
|
-
function getOptionLabel(option) {
|
|
236
|
-
return props.optionLabel ? resolveFieldData(option, props.optionLabel) : option;
|
|
237
|
-
}
|
|
238
|
-
function findOptionByValue(value) {
|
|
239
|
-
return props.options?.find(
|
|
240
|
-
(option) => equals(getOptionValue(option), value, props.optionValue ? void 0 : props.dataKey)
|
|
241
|
-
);
|
|
242
|
-
}
|
|
243
233
|
function toLabel(value) {
|
|
244
234
|
if (!value) {
|
|
245
235
|
return void 0;
|
|
246
236
|
}
|
|
247
237
|
if (!Array.isArray(value)) {
|
|
248
|
-
return getOptionLabel(
|
|
238
|
+
return utils.value.getOptionLabel(utils.value.getOptionByValue(value, props.options));
|
|
249
239
|
}
|
|
250
240
|
if (value.length === 0) {
|
|
251
241
|
return void 0;
|
|
252
242
|
}
|
|
253
243
|
if (value.length === 1) {
|
|
254
|
-
return getOptionLabel(
|
|
244
|
+
return utils.value.getOptionLabel(utils.value.getOptionByValue(value[0], props.options));
|
|
255
245
|
}
|
|
256
|
-
return swapStringPlaceholders(locale.form.numOptionsSelected, { count: value.length });
|
|
246
|
+
return swapStringPlaceholders(reseeUx.locale.form.numOptionsSelected, { count: value.length });
|
|
257
247
|
}
|
|
258
248
|
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-way bind to URL query parameters.
|
|
3
|
+
*/
|
|
4
|
+
export declare function useQueryParameters<D extends QueryParamDefinitionMap>(params: D): UseQueryParametersReturn<D>;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a single URL query parameter.
|
|
7
|
+
*/
|
|
8
|
+
export type QueryParamDefinition = {
|
|
9
|
+
/**
|
|
10
|
+
* The data type of the query parameter's value. Since this object needs
|
|
11
|
+
* to be defined at runtime, primitive constructors are used to indicate
|
|
12
|
+
* the data type.
|
|
13
|
+
*/
|
|
14
|
+
type: StringConstructor | [StringConstructor] | BooleanConstructor;
|
|
15
|
+
/**
|
|
16
|
+
* A value that will be used if no query parameter is set.
|
|
17
|
+
*/
|
|
18
|
+
defaultValue?: unknown;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* An object wherein the keys are URL query parameter names, and the values at
|
|
22
|
+
* each key determine the (de)serialization of that parameter (and other behaviors).
|
|
23
|
+
*/
|
|
24
|
+
export type QueryParamDefinitionMap = {
|
|
25
|
+
[K: string]: QueryParamDefinition;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A mapping from runtime-available primitive constructors, to TS typings which
|
|
29
|
+
* correspond to the different data types of URL query parameters that this
|
|
30
|
+
* composable supports.
|
|
31
|
+
*/
|
|
32
|
+
export type QueryParamValueType<T extends QueryParamDefinition['type']> = T extends StringConstructor ? string | undefined : T extends [StringConstructor] ? string[] | undefined : T extends BooleanConstructor ? boolean | undefined : never;
|
|
33
|
+
/**
|
|
34
|
+
* The return type of the {@link useQueryParameters} composable.
|
|
35
|
+
*/
|
|
36
|
+
export type UseQueryParametersReturn<M extends QueryParamDefinitionMap> = {
|
|
37
|
+
[K in keyof M]: QueryParamValueType<M[K]['type']>;
|
|
38
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { useRoute, useRouter } from "#imports";
|
|
2
|
+
import { areEqual } from "@resee-movies/utilities/objects/are-equal";
|
|
3
|
+
import { isString } from "@resee-movies/utilities/strings/is-string";
|
|
4
|
+
import { slugify } from "@resee-movies/utilities/strings/slugify";
|
|
5
|
+
import { customRef, nextTick, onScopeDispose, reactive, toValue, watch } from "vue";
|
|
6
|
+
export function useQueryParameters(params) {
|
|
7
|
+
const router = useRouter();
|
|
8
|
+
const queue = getQueueForRouter(router);
|
|
9
|
+
const refs = {};
|
|
10
|
+
for (const [name, definition] of Object.entries(params)) {
|
|
11
|
+
refs[name] = getQueryRef({
|
|
12
|
+
slug: slugify(name),
|
|
13
|
+
type: definition.type,
|
|
14
|
+
setCallback: queue.add,
|
|
15
|
+
defaultValue: definition.defaultValue
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return reactive(refs);
|
|
19
|
+
}
|
|
20
|
+
const _queue = /* @__PURE__ */ new WeakMap();
|
|
21
|
+
function getQueueForRouter(router) {
|
|
22
|
+
if (!_queue.has(router)) {
|
|
23
|
+
_queue.set(router, /* @__PURE__ */ new Map());
|
|
24
|
+
}
|
|
25
|
+
const routerQueue = _queue.get(router);
|
|
26
|
+
const add = async (slug, value) => {
|
|
27
|
+
routerQueue.set(slug, value);
|
|
28
|
+
await nextTick();
|
|
29
|
+
if (routerQueue.size === 0) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const newValues = Object.fromEntries(routerQueue.entries());
|
|
33
|
+
routerQueue.clear();
|
|
34
|
+
const { params, query, hash } = router.currentRoute.value;
|
|
35
|
+
await router.replace({
|
|
36
|
+
params,
|
|
37
|
+
query: { ...query, ...newValues },
|
|
38
|
+
hash
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return { add };
|
|
42
|
+
}
|
|
43
|
+
function getQueryRef(config) {
|
|
44
|
+
const { slug, type, setCallback, defaultValue } = config;
|
|
45
|
+
if (Array.isArray(type) && type[0] === String) {
|
|
46
|
+
const defaultVal = Array.isArray(defaultValue) && defaultValue.length > 0 ? defaultValue : void 0;
|
|
47
|
+
return makeTrackingRef({
|
|
48
|
+
slug,
|
|
49
|
+
defaultValue: defaultVal,
|
|
50
|
+
setCallback,
|
|
51
|
+
getTransform: toStringArrayOrUndefined,
|
|
52
|
+
setTransform: toStringArrayOrUndefined
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (type === String) {
|
|
56
|
+
const defaultVal = isString(defaultValue) ? defaultValue : void 0;
|
|
57
|
+
return makeTrackingRef({
|
|
58
|
+
slug,
|
|
59
|
+
defaultValue: defaultVal,
|
|
60
|
+
setCallback,
|
|
61
|
+
getTransform: toStringOrUndefined,
|
|
62
|
+
setTransform: toStringOrUndefined
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
if (type === Boolean) {
|
|
66
|
+
const defaultVal = typeof defaultValue === "boolean" ? true : void 0;
|
|
67
|
+
return makeTrackingRef({
|
|
68
|
+
slug,
|
|
69
|
+
defaultValue: defaultVal,
|
|
70
|
+
setCallback,
|
|
71
|
+
getTransform: toBooleanOrUndefined,
|
|
72
|
+
setTransform: (value) => value ? null : void 0
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return void 0;
|
|
76
|
+
}
|
|
77
|
+
function toStringOrUndefined(value) {
|
|
78
|
+
return isString(value, { withContent: true }) ? value : void 0;
|
|
79
|
+
}
|
|
80
|
+
function toStringArrayOrUndefined(value) {
|
|
81
|
+
if (Array.isArray(value)) {
|
|
82
|
+
return value.length ? value : void 0;
|
|
83
|
+
}
|
|
84
|
+
return isString(value) ? [value] : void 0;
|
|
85
|
+
}
|
|
86
|
+
function toBooleanOrUndefined(value) {
|
|
87
|
+
if (isString(value)) {
|
|
88
|
+
return value.toLowerCase() === "true" || value === "" ? true : void 0;
|
|
89
|
+
}
|
|
90
|
+
return value === null ? true : void 0;
|
|
91
|
+
}
|
|
92
|
+
function makeTrackingRef(config) {
|
|
93
|
+
const route = useRoute();
|
|
94
|
+
let queryVal = route.query[config.slug];
|
|
95
|
+
let refTrigger = () => {
|
|
96
|
+
};
|
|
97
|
+
onScopeDispose(() => {
|
|
98
|
+
queryVal = void 0;
|
|
99
|
+
}, true);
|
|
100
|
+
const ref = customRef((track, trigger) => {
|
|
101
|
+
refTrigger = trigger;
|
|
102
|
+
return {
|
|
103
|
+
get() {
|
|
104
|
+
track();
|
|
105
|
+
const transformed = config.getTransform(queryVal);
|
|
106
|
+
return transformed === void 0 ? toValue(config.defaultValue) : transformed;
|
|
107
|
+
},
|
|
108
|
+
set(val) {
|
|
109
|
+
const transformed = config.setTransform(val);
|
|
110
|
+
if (areEqual(transformed, queryVal)) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const defaultVal = toValue(config.defaultValue);
|
|
114
|
+
queryVal = transformed === defaultVal ? void 0 : transformed;
|
|
115
|
+
config.setCallback(config.slug, queryVal);
|
|
116
|
+
trigger();
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
});
|
|
120
|
+
watch(
|
|
121
|
+
() => route.query[config.slug],
|
|
122
|
+
(newValue) => {
|
|
123
|
+
if (areEqual(config.getTransform(newValue), queryVal)) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
queryVal = newValue;
|
|
127
|
+
refTrigger();
|
|
128
|
+
},
|
|
129
|
+
{ flush: "sync" }
|
|
130
|
+
);
|
|
131
|
+
return ref;
|
|
132
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preconfigures the Vueuse {@link useBreakpoints} composable for use
|
|
3
|
+
* with ReSee projects. If available, the user-agent is used in SSR to
|
|
4
|
+
* try and determine the correct break to report.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useReseeBreakpoints(): Record<"sm" | "md" | "lg" | "xl" | "2xl", import("vue").ComputedRef<boolean>> & {
|
|
7
|
+
greaterOrEqual: (k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">) => import("vue").ComputedRef<boolean>;
|
|
8
|
+
smallerOrEqual: (k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">) => import("vue").ComputedRef<boolean>;
|
|
9
|
+
greater(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").ComputedRef<boolean>;
|
|
10
|
+
smaller(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").ComputedRef<boolean>;
|
|
11
|
+
between(a: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">, b: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): import("vue").ComputedRef<boolean>;
|
|
12
|
+
isGreater(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
13
|
+
isGreaterOrEqual(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
14
|
+
isSmaller(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
15
|
+
isSmallerOrEqual(k: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
16
|
+
isInBetween(a: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">, b: import("vue").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl" | "2xl">): boolean;
|
|
17
|
+
current: () => import("vue").ComputedRef<("sm" | "md" | "lg" | "xl" | "2xl")[]>;
|
|
18
|
+
active(): import("vue").ComputedRef<"" | "sm" | "md" | "lg" | "xl" | "2xl">;
|
|
19
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useDevice } from "#imports";
|
|
2
|
+
import { breakpointsTailwind, useBreakpoints } from "@vueuse/core";
|
|
3
|
+
export function useReseeBreakpoints() {
|
|
4
|
+
let ssrWidth = void 0;
|
|
5
|
+
if (import.meta.server) {
|
|
6
|
+
const device = useDevice();
|
|
7
|
+
if (device.isTablet) {
|
|
8
|
+
ssrWidth = breakpointsTailwind.md;
|
|
9
|
+
} else if (device.isMobile) {
|
|
10
|
+
ssrWidth = breakpointsTailwind.sm;
|
|
11
|
+
} else {
|
|
12
|
+
ssrWidth = breakpointsTailwind.lg;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return useBreakpoints(breakpointsTailwind, { ssrWidth });
|
|
16
|
+
}
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
@layer components{.input-label{display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none}.input-label.required:after{color:var(--color-danger);content:"*";display:inline-block;margin-inline-start:--spacing(1)}.input-label.disabled{cursor:not-allowed;opacity:.6}.input-label-pair{display:flex;flex-direction:column;gap:--spacing(1);margin-block-end:--spacing(1)}.input-label-pair.label-after,.input-label-pair.label-before{align-items:center;flex-direction:row;gap:--spacing(3)}.input-label-pair.label-after .input-label,.input-label-pair.label-below .input-label{order:2}.input-validation{color:var(--color-danger);font-size:var(--text-sm);height:0;line-clamp:2}.input-field{display:flex;flex-direction:column}.input-control{flex-grow:1;padding:--spacing(2) --spacing(3)}.input-control::-moz-placeholder{color:var(--color-global-foreground-accent)}.input-control .placeholder,.input-control::placeholder{color:var(--color-global-foreground-accent)}.input-group{align-items:center;display:flex}.input-group.input-group-loading{cursor:wait}.input-group .input-group-addon{color:var(--color-global-foreground-accent);padding:--spacing(1.5) --spacing(2)}.input-group button.input-group-addon{cursor:pointer}.input-group .input-control{outline:none}.input-control:where(:not(.input-group .input-control)),.input-group{background-color:var(--color-global-background);border-radius:--spacing(1);cursor:pointer;outline:solid 2px var(--color-background-scale-e);overflow:clip;transition:color,background-color,outline-color,box-shadow;transition-duration:calc(var(--default-transition-duration)*2);width:100%}.input-control:where(:not(.input-group .input-control)):where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))),.input-group:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)){cursor:default}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))))),.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))))){cursor:not-allowed;opacity:.6}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):focus-within,.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):hover,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):hover{outline-color:var(--color-global-foreground-accent)}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):focus-within{box-shadow:var(--shadow-heavy)}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):not(:has(>input[type=checkbox]),.input-button-bar):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):not(:has(>input[type=checkbox]),.input-button-bar):focus-within{background-color:var(--color-background-scale-b)}.input-group:where(:has(input[type=checkbox])){flex-shrink:0;height:1.5rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1.5rem}
|
|
2
|
-
|
|
3
|
-
/* !important is to overwrite what gets attached to i-* icons in the utility layer */.input-group:where(:has(input[type=checkbox])) span[class^=i-],.input-group:where(:has(input[type=checkbox])) svg{display:block!important;font-size:1rem;height:1rem!important;line-height:1;margin-left:.25rem;width:1rem!important}.input-group:where(:has(input[type=checkbox])) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;inset:0;opacity:0;position:absolute;z-index:10}.input-group:where(:has(input[type=checkbox])) input:not(:disabled,[readonly]){cursor:pointer}.input-group:where(:has(input[type=checkbox])).toggle-switch{border-radius:1rem;width:2.5rem}.input-group:where(:has(input[type=checkbox])).toggle-switch:has(:checked) .slider:before{background-color:var(--color-global-foreground);transform:translateX(1rem)}.input-group:where(:has(input[type=checkbox])).toggle-switch .slider{border-radius:1rem;inset:0;position:absolute}.input-group:where(:has(input[type=checkbox])).toggle-switch .slider:before{background-color:var(--color-background-scale-d);border-radius:var(--radius-full);box-shadow:var(--shadow-md);content:"";height:1rem;left:.25rem;position:absolute;top:.25rem;transition:transform,background-color;transition-duration:var(--default-transition-duration);width:1rem}.input-menu .input-control,.input-menu .input-group{background-color:transparent}.input-menu .input-group:where(:has(input[type=checkbox])){height:1.2rem;width:1.2rem}.input-menu .input-group:where(:has(input[type=checkbox])) span[class^=i-],.input-menu .input-group:where(:has(input[type=checkbox])) svg{margin-left:.1rem;margin-top:-.1rem}[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):focus-within,[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):hover{outline-color:var(--color-background-scale-e)!important}[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):focus-within input,[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):hover input{cursor:not-allowed!important}.input-menu-header{align-items:center;display:flex;gap:--spacing(2)}.input-menu-header .input-menu-filter{align-items:center;color:var(--color-global-foreground-accent);display:flex;flex-grow:1;transition:color var(--default-transition-duration) var(--default-transition-timing-function)}.input-menu-header .input-menu-filter input{flex-grow:1;outline:none;padding:--spacing(.5) 0}.input-menu-header .input-menu-filter input::-moz-placeholder{color:var(--color-global-foreground-accent)}.input-menu-header .input-menu-filter input::placeholder{color:var(--color-global-foreground-accent)}.input-menu-header .input-menu-filter:focus-within{color:var(--color-global-foreground)}.input-button{cursor:pointer;padding:--spacing(1.5) --spacing(2);transition:background-color var(--default-transition-duration) var(--default-transition-timing-function)}.input-button[aria-pressed=true]{background-color:var(--color-background-scale-f)}.input-button:where(.readonly .input-button){cursor:default}.input-button:where(:disabled,.disabled .input-button):not(:where(.readonly .input-button)){cursor:not-allowed;opacity:.6}.input-button:not(:disabled,:where(.disabled .input-button),:where(.readonly .input-button),[aria-pressed=true]):focus-visible,.input-button:not(:disabled,:where(.disabled .input-button),:where(.readonly .input-button),[aria-pressed=true]):hover{background-color:var(--color-background-scale-b)}.input-button-bar{gap:--spacing(.5);padding:--spacing(.5);width:-moz-fit-content;width:fit-content}.input-button-bar button:first-child{border-bottom-left-radius:var(--radius-sm);border-top-left-radius:var(--radius-sm)}.input-button-bar button:last-child{border-bottom-right-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}}
|
|
1
|
+
@layer components{.input-label{display:block;-webkit-user-select:none;-moz-user-select:none;user-select:none}.input-label.required:after{color:var(--color-danger);content:"*";display:inline-block;margin-inline-start:--spacing(1)}.input-label.disabled{cursor:not-allowed;opacity:.6}.input-label:not(fieldset .input-label,.label-before .input-label,.label-after .input-label),.input-label:where(fieldset legend.input-label){font-size:var(--text-lg)}.input-label-pair{display:flex;flex-direction:column;gap:--spacing(1);margin-block-end:--spacing(1)}.input-label-pair.label-after,.input-label-pair.label-before{align-items:center;flex-direction:row;gap:--spacing(3)}.input-label-pair.label-after .input-label,.input-label-pair.label-below .input-label{order:2}.input-validation{color:var(--color-danger);font-size:var(--text-sm);height:0;line-clamp:2}.input-field{display:flex;flex-direction:column}.input-control{flex-grow:1;padding:--spacing(2) --spacing(3)}.input-control::-moz-placeholder{color:var(--color-global-foreground-accent)}.input-control .placeholder,.input-control::placeholder{color:var(--color-global-foreground-accent)}.input-group{align-items:center;display:flex}.input-group.input-group-loading{cursor:wait}.input-group .input-group-addon{color:var(--color-global-foreground-accent);padding:--spacing(1.5) --spacing(2)}.input-group button.input-group-addon{cursor:pointer}.input-group .input-control{outline:none}.input-control:where(:not(.input-group .input-control)),.input-group{background-color:var(--color-global-background);border-radius:--spacing(1);cursor:pointer;outline:solid 2px var(--color-background-scale-e);overflow:clip;transition:color,background-color,outline-color,box-shadow;transition-duration:calc(var(--default-transition-duration)*2);width:100%}.input-control:where(:not(.input-group .input-control)):where(input[type=text],input[type=email],input[type=url],textarea),.input-group:where(input[type=text],input[type=email],input[type=url],textarea){cursor:text}.input-control:where(:not(.input-group .input-control)):where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))),.input-group:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)){cursor:default}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))))),.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))))){cursor:not-allowed;opacity:.6}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):focus-within,.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):hover,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):hover{outline-color:var(--color-global-foreground-accent)}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):focus-within{box-shadow:var(--shadow-heavy)}.input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control))))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-control:where(:not(.input-group .input-control)):not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-control:where(:not(.input-group .input-control)))))))):not(:has(>input[type=checkbox]),.input-button-bar):focus-within,.input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group))):not(:where(.disabled,:disabled:not(.p-hidden-accessible input),:is(.disabled .input-group:not(:where(.readonly,[readonly]:not(.p-hidden-accessible input),:is(.readonly .input-group)))))):not(:has(>input[type=checkbox]),.input-button-bar):focus-within{background-color:var(--color-background-scale-b)}.input-group:where(:has(input[type=checkbox])),.input-group:where(:has(input[type=radio])){flex-shrink:0;height:1.5rem;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:1.5rem}.input-group:where(:has(input[type=checkbox])):has(input[type=radio]),.input-group:where(:has(input[type=radio])):has(input[type=radio]){border-radius:var(--radius-full);height:1.2rem;width:1.2rem}.input-group:where(:has(input[type=checkbox])):has(input[type=radio])>div,.input-group:where(:has(input[type=radio])):has(input[type=radio])>div{border-radius:var(--radius-full);height:.7rem;left:.25rem;position:absolute;top:.25rem;transition:box-shadow,background-color;transition-duration:var(--default-transition-duration);width:.7rem}.input-group:where(:has(input[type=checkbox])):has(input[type=radio]):has(:checked)>div,.input-group:where(:has(input[type=radio])):has(input[type=radio]):has(:checked)>div{background-color:var(--color-global-foreground);box-shadow:var(--shadow-md)}.input-group:where(:has(input[type=checkbox])) span[class^=i-],.input-group:where(:has(input[type=checkbox])) svg,.input-group:where(:has(input[type=radio])) span[class^=i-],.input-group:where(:has(input[type=radio])) svg{display:block!important;font-size:1rem;height:1rem!important;line-height:1;margin-left:.25rem;width:1rem!important}.input-group:where(:has(input[type=checkbox])) input,.input-group:where(:has(input[type=radio])) input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:100%;inset:0;opacity:0;position:absolute;z-index:10}.input-group:where(:has(input[type=checkbox])) input:not(:disabled,[readonly]),.input-group:where(:has(input[type=radio])) input:not(:disabled,[readonly]){cursor:pointer}.input-group:where(:has(input[type=checkbox])).toggle-switch,.input-group:where(:has(input[type=radio])).toggle-switch{border-radius:1rem;width:2.5rem}.input-group:where(:has(input[type=checkbox])).toggle-switch:has(:checked) .slider:before,.input-group:where(:has(input[type=radio])).toggle-switch:has(:checked) .slider:before{background-color:var(--color-global-foreground);transform:translateX(1rem)}.input-group:where(:has(input[type=checkbox])).toggle-switch .slider,.input-group:where(:has(input[type=radio])).toggle-switch .slider{border-radius:1rem;inset:0;position:absolute}.input-group:where(:has(input[type=checkbox])).toggle-switch .slider:before,.input-group:where(:has(input[type=radio])).toggle-switch .slider:before{background-color:var(--color-background-scale-d);border-radius:var(--radius-full);box-shadow:var(--shadow-md);content:"";height:1rem;left:.25rem;position:absolute;top:.25rem;transition:transform,background-color;transition-duration:var(--default-transition-duration);width:1rem}.input-menu .input-control,.input-menu .input-group{background-color:transparent}.input-menu .input-group:where(:has(input[type=checkbox])){height:1.2rem;width:1.2rem}.input-menu .input-group:where(:has(input[type=checkbox])) span[class^=i-],.input-menu .input-group:where(:has(input[type=checkbox])) svg{margin-left:.1rem;margin-top:-.1rem}[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):focus-within,[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):hover{outline-color:var(--color-background-scale-e)!important}[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):focus-within input,[aria-disabled=true] .input-menu .input-group:where(:has(input[type=checkbox])):hover input{cursor:not-allowed!important}.input-menu-header{align-items:center;display:flex;gap:--spacing(2)}.input-menu-header .input-menu-filter{align-items:center;color:var(--color-global-foreground-accent);display:flex;flex-grow:1;transition:color var(--default-transition-duration) var(--default-transition-timing-function)}.input-menu-header .input-menu-filter input{flex-grow:1;outline:none;padding:--spacing(.5) 0}.input-menu-header .input-menu-filter input::-moz-placeholder{color:var(--color-global-foreground-accent)}.input-menu-header .input-menu-filter input::placeholder{color:var(--color-global-foreground-accent)}.input-menu-header .input-menu-filter:focus-within{color:var(--color-global-foreground)}.input-button{cursor:pointer;padding:--spacing(1.5) --spacing(2);transition:background-color var(--default-transition-duration) var(--default-transition-timing-function)}.input-button[aria-pressed=true]{background-color:var(--color-background-scale-f)}.input-button:where(.readonly .input-button){cursor:default}.input-button:where(:disabled,.disabled .input-button):not(:where(.readonly .input-button)){cursor:not-allowed;opacity:.6}.input-button:not(:disabled,:where(.disabled .input-button),:where(.readonly .input-button),[aria-pressed=true]):focus-visible,.input-button:not(:disabled,:where(.disabled .input-button),:where(.readonly .input-button),[aria-pressed=true]):hover{background-color:var(--color-background-scale-b)}.input-button-bar{gap:--spacing(.5);padding:--spacing(.5);width:-moz-fit-content;width:fit-content}.input-button-bar button:first-child{border-bottom-left-radius:var(--radius-sm);border-top-left-radius:var(--radius-sm)}.input-button-bar button:last-child{border-bottom-right-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@
|
|
1
|
+
@utility resee-text-mask{-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none}@utility resee-bg-linear-*{--resee-angle:calc(--value(integer) * 1deg);--resee-angle:--value(--gradient-direction-*);--resee-gradient:var(--colorscale-resee-linear);background-image:linear-gradient(var(--resee-angle),var(--resee-gradient));@variant dark{--resee-gradient:var(--colorscale-resee-lite-linear)}}@utility resee-bg-conic-*{--resee-angle:from calc(--value(integer) * 1deg);--resee-gradient:var(--colorscale-resee-conic);background-image:conic-gradient(var(--resee-angle),var(--resee-gradient));@variant dark{--resee-gradient:var(--colorscale-resee-lite-conic)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@custom-variant dark (&:where(.dark, .dark *));@variant dark{--color-global-background:var(--color-global-background-dark);--color-global-background-accent:var(--color-global-background-accent-dark);--color-global-foreground:var(--color-global-foreground-dark);--color-global-foreground-accent:var(--color-global-foreground-accent-dark);--color-invert-global-background:var(--color-global-background-lite);--color-invert-global-background-accent:var(--color-global-background-accent-lite);--color-invert-global-foreground:var(--color-global-foreground-lite);--color-invert-global-foreground-accent:var(--color-global-foreground-accent-lite);--color-background-scale-a:var(--color-background-scale-a-dark);--color-background-scale-b:var(--color-background-scale-b-dark);--color-background-scale-c:var(--color-background-scale-c-dark);--color-background-scale-d:var(--color-background-scale-d-dark);--color-background-scale-e:var(--color-background-scale-e-dark);--color-background-scale-f:var(--color-background-scale-f-dark);--color-background-scale-g:var(--color-background-scale-g-dark);--color-foreground-scale-a:var(--color-foreground-scale-a-dark);--color-foreground-scale-b:var(--color-foreground-scale-b-dark);--color-foreground-scale-c:var(--color-foreground-scale-c-dark);--color-foreground-scale-d:var(--color-foreground-scale-d-dark);--color-foreground-scale-e:var(--color-foreground-scale-e-dark);--color-foreground-scale-f:var(--color-foreground-scale-f-dark);--color-foreground-scale-g:var(--color-foreground-scale-g-dark);--color-invert-background-scale-a:var(--color-background-scale-a-lite);--color-invert-background-scale-b:var(--color-background-scale-b-lite);--color-invert-background-scale-c:var(--color-background-scale-c-lite);--color-invert-background-scale-d:var(--color-background-scale-d-lite);--color-invert-background-scale-e:var(--color-background-scale-e-lite);--color-invert-background-scale-f:var(--color-background-scale-f-lite);--color-invert-background-scale-g:var(--color-background-scale-g-lite);--color-invert-foreground-scale-a:var(--color-foreground-scale-a-lite);--color-invert-foreground-scale-b:var(--color-foreground-scale-b-lite);--color-invert-foreground-scale-c:var(--color-foreground-scale-c-lite);--color-invert-foreground-scale-d:var(--color-foreground-scale-d-lite);--color-invert-foreground-scale-e:var(--color-foreground-scale-e-lite);--color-invert-foreground-scale-f:var(--color-foreground-scale-f-lite);--color-invert-foreground-scale-g:var(--color-foreground-scale-g-lite);--color-info:var(--color-info-dark);--color-info-emphasis:var(--color-info-emphasis-dark);--color-info-contrast:var(--color-info-contrast-dark);--color-help:var(--color-help-dark);--color-help-emphasis:var(--color-help-emphasis-dark);--color-help-contrast:var(--color-help-contrast-dark);--color-success:var(--color-success-dark);--color-success-emphasis:var(--color-success-emphasis-dark);--color-success-contrast:var(--color-success-contrast-dark);--color-warning:var(--color-warning-dark);--color-warning-emphasis:var(--color-warning-emphasis-dark);--color-warning-contrast:var(--color-warning-contrast-dark);--color-danger:var(--color-danger-dark);--color-danger-emphasis:var(--color-danger-emphasis-dark);--color-danger-contrast:var(--color-danger-contrast-dark);--shadow-heavy:var(--shadow-heavy-dark);--shadow-heavy-right:var(--shadow-heavy-right-dark);--shadow-heavy-left:var(--shadow-heavy-left-dark);--shadow-heavy-top:var(--shadow-heavy-top-dark)}@theme{--font-sans:"Archivo",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--zero-width-space:"";--radius-full:9999px;--custom-accent-color:unset;--icon-size-small:--spacing(3.5);--icon-size-medium:--spacing(4);--icon-size-large:--spacing(6);--icon-size-jumbo:--spacing(12);--aspect-poster:2/3;--aspect-tall:4/5;--color-surface-0:oklch(100.0% 0 0);--color-surface-50:oklch(97.31% 0 0);--color-surface-100:oklch(92.80% 0 0);--color-surface-200:oklch(86.07% 0 0);--color-surface-300:oklch(75.72% 0 0);--color-surface-400:oklch(62.68% 0 0);--color-surface-500:oklch(53.48% 0 0);--color-surface-600:oklch(47.84% 0 0);--color-surface-700:oklch(42.76% 0 0);--color-surface-800:oklch(39.04% 0 0);--color-surface-850:oklch(37.53% 0 0);--color-surface-900:oklch(36.00% 0 0);--color-surface-925:oklch(28.50% 0 0);--color-surface-950:oklch(20.02% 0 0);--color-primary-50:oklch(97.94% 0.0171 103.14);--color-primary-100:oklch(94.93% 0.0459 101.86);--color-primary-200:oklch(89.80% 0.0854 99.1);--color-primary-300:oklch(83.23% 0.1222 96.48);--color-primary-400:oklch(76.65% 0.1387 91.06);--color-primary-500:oklch(71.00% 0.1307 86.56);--color-primary-600:oklch(61.31% 0.1146 77.38);--color-primary-700:oklch(50.50% 0.0943 67.44);--color-primary-800:oklch(44.38% 0.0782 62.58);--color-primary-900:oklch(39.94% 0.0661 58.15);--color-primary-950:oklch(27.10% 0.0457 53.29);--color-resee-red:oklch(57.47% 0.2229 28.19);--color-resee-orange:oklch(67.79% 0.201 41.61);--color-resee-yellow:oklch(84.78% 0.171 89.53);--color-resee-green:oklch(71.41% 0.1907 132.48);--color-resee-seaweed:oklch(59.95% 0.1179 167.71);--color-resee-aqua:oklch(74.55% 0.1224 209.96);--color-resee-blue:oklch(42.42% 0.1982 265.5);--color-resee-indigo:oklch(39.67% 0.1568 293.38);--color-resee-violet:oklch(46.25% 0.1488 353.55);--color-resee-lite-red:oklch(from var(--color-resee-red) calc(l + 0.22) c h);--color-resee-lite-orange:oklch(from var(--color-resee-orange) calc(l + 0.25) c h);--color-resee-lite-yellow:oklch(from var(--color-resee-yellow) calc(l + 0.30) calc(c - 0.03) h);--color-resee-lite-green:oklch(from var(--color-resee-green) calc(l + 0.30) calc(c + 0.02) h);--color-resee-lite-seaweed:oklch(from var(--color-resee-seaweed) calc(l + 0.20) c h);--color-resee-lite-aqua:oklch(from var(--color-resee-aqua) calc(l + 0.25) calc(c - 0.03) h);--color-resee-lite-blue:oklch(from var(--color-resee-blue) calc(l + 0.38) c h);--color-resee-lite-indigo:oklch(from var(--color-resee-indigo) calc(l + 0.45) calc(c + 0.1) h);--color-resee-lite-violet:oklch(from var(--color-resee-violet) calc(l + 0.30) calc(c - 0.05) h);--color-global-background-lite:var(--color-surface-50);--color-global-background-accent-lite:oklch(from var(--color-surface-50) calc(l - 0.15) c h);--color-global-foreground-lite:var(--color-surface-950);--color-global-foreground-accent-lite:var(--color-surface-700);--color-global-background-dark:var(--color-surface-950);--color-global-background-accent-dark:oklch(from var(--color-surface-950) calc(l + 0.15) c h);--color-global-foreground-dark:var(--color-surface-0);--color-global-foreground-accent-dark:var(--color-surface-400);--color-background-scale-a-lite:color-mix(in oklch,var(--color-surface-950) 5%,var(--color-global-background-lite));--color-background-scale-b-lite:color-mix(in oklch,var(--color-surface-950) 8%,var(--color-global-background-lite));--color-background-scale-c-lite:color-mix(in oklch,var(--color-surface-950) 11%,var(--color-global-background-lite));--color-background-scale-d-lite:color-mix(in oklch,var(--color-surface-950) 14%,var(--color-global-background-lite));--color-background-scale-e-lite:color-mix(in oklch,var(--color-surface-950) 17%,var(--color-global-background-lite));--color-background-scale-f-lite:color-mix(in oklch,var(--color-surface-950) 20%,var(--color-global-background-lite));--color-background-scale-g-lite:color-mix(in oklch,var(--color-surface-950) 29%,var(--color-global-background-lite));--color-background-scale-a-dark:color-mix(in oklch,var(--color-surface-0) 5%,var(--color-global-background-dark));--color-background-scale-b-dark:color-mix(in oklch,var(--color-surface-0) 8%,var(--color-global-background-dark));--color-background-scale-c-dark:color-mix(in oklch,var(--color-surface-0) 11%,var(--color-global-background-dark));--color-background-scale-d-dark:color-mix(in oklch,var(--color-surface-0) 14%,var(--color-global-background-dark));--color-background-scale-e-dark:color-mix(in oklch,var(--color-surface-0) 17%,var(--color-global-background-dark));--color-background-scale-f-dark:color-mix(in oklch,var(--color-surface-0) 20%,var(--color-global-background-dark));--color-background-scale-g-dark:color-mix(in oklch,var(--color-surface-0) 29%,var(--color-global-background-dark));--color-foreground-scale-a-lite:var(--color-background-scale-a-dark);--color-foreground-scale-b-lite:var(--color-background-scale-b-dark);--color-foreground-scale-c-lite:var(--color-background-scale-c-dark);--color-foreground-scale-d-lite:var(--color-background-scale-d-dark);--color-foreground-scale-e-lite:var(--color-background-scale-e-dark);--color-foreground-scale-f-lite:var(--color-background-scale-f-dark);--color-foreground-scale-g-lite:var(--color-background-scale-g-dark);--color-foreground-scale-a-dark:var(--color-background-scale-a-lite);--color-foreground-scale-b-dark:var(--color-background-scale-b-lite);--color-foreground-scale-c-dark:var(--color-background-scale-c-lite);--color-foreground-scale-d-dark:var(--color-background-scale-d-lite);--color-foreground-scale-e-dark:var(--color-background-scale-e-lite);--color-foreground-scale-f-dark:var(--color-background-scale-f-lite);--color-foreground-scale-g-dark:var(--color-background-scale-g-lite);--color-info-lite:#3b82f6;--color-info-emphasis-lite:#2563eb;--color-info-contrast-lite:#fff;--color-info-dark:var(--color-resee-aqua);--color-info-emphasis-dark:oklch(from var(--color-resee-aqua) calc(l + 0.1) c h);--color-info-contrast-dark:var(--color-surface-950);--color-help-lite:#8b5cf6;--color-help-emphasis-lite:#7c3aed;--color-help-contrast-lite:var(--color-surface-50);--color-help-dark:#c4b5fd;--color-help-emphasis-dark:#ddd6fe;--color-help-contrast-dark:var(--color-surface-950);--color-success-lite:#15803d;--color-success-emphasis-lite:#166534;--color-success-contrast-lite:var(--color-surface-50);--color-success-dark:var(--color-resee-lite-seaweed);--color-success-emphasis-dark:oklch(from var(--color-resee-lite-seaweed) calc(l + 0.02) c h);--color-success-contrast-dark:var(--color-surface-950);--color-warning-lite:#b45309;--color-warning-emphasis-lite:#92400e;--color-warning-contrast-lite:var(--color-surface-50);--color-warning-dark:#fbbf24;--color-warning-emphasis-dark:#fcd34d;--color-warning-contrast-dark:var(--color-surface-950);--color-danger-lite:#991b1b;--color-danger-emphasis-lite:#7f1d1d;--color-danger-contrast-lite:var(--color-surface-50);--color-danger-dark:#ef4444;--color-danger-emphasis-dark:#f87171;--color-danger-contrast-dark:var(--color-surface-950);--color-global-background:var(--color-global-background-lite);--color-global-background-accent:var(--color-global-background-accent-lite);--color-global-foreground:var(--color-global-foreground-lite);--color-global-foreground-accent:var(--color-global-foreground-accent-lite);--color-background-scale-a:var(--color-background-scale-a-lite);--color-background-scale-b:var(--color-background-scale-b-lite);--color-background-scale-c:var(--color-background-scale-c-lite);--color-background-scale-d:var(--color-background-scale-d-lite);--color-background-scale-e:var(--color-background-scale-e-lite);--color-background-scale-f:var(--color-background-scale-f-lite);--color-background-scale-g:var(--color-background-scale-g-lite);--color-foreground-scale-a:var(--color-foreground-scale-a-lite);--color-foreground-scale-b:var(--color-foreground-scale-b-lite);--color-foreground-scale-c:var(--color-foreground-scale-c-lite);--color-foreground-scale-d:var(--color-foreground-scale-d-lite);--color-foreground-scale-e:var(--color-foreground-scale-e-lite);--color-foreground-scale-f:var(--color-foreground-scale-f-lite);--color-foreground-scale-g:var(--color-foreground-scale-g-lite);--color-invert-global-background:var(--color-global-background-dark);--color-invert-global-background-accent:var(--color-global-background-accent-dark);--color-invert-global-foreground:var(--color-global-foreground-dark);--color-invert-global-foreground-accent:var(--color-global-foreground-accent-dark);--color-invert-background-scale-a:var(--color-background-scale-a-dark);--color-invert-background-scale-b:var(--color-background-scale-b-dark);--color-invert-background-scale-c:var(--color-background-scale-c-dark);--color-invert-background-scale-d:var(--color-background-scale-d-dark);--color-invert-background-scale-e:var(--color-background-scale-e-dark);--color-invert-background-scale-f:var(--color-background-scale-f-dark);--color-invert-background-scale-g:var(--color-background-scale-g-dark);--color-invert-foreground-scale-a:var(--color-foreground-scale-a-dark);--color-invert-foreground-scale-b:var(--color-foreground-scale-b-dark);--color-invert-foreground-scale-c:var(--color-foreground-scale-c-dark);--color-invert-foreground-scale-d:var(--color-foreground-scale-d-dark);--color-invert-foreground-scale-e:var(--color-foreground-scale-e-dark);--color-invert-foreground-scale-f:var(--color-foreground-scale-f-dark);--color-invert-foreground-scale-g:var(--color-foreground-scale-g-dark);--color-info:var(--color-info-lite);--color-info-emphasis:var(--color-info-emphasis-lite);--color-info-contrast:var(--color-info-contrast-lite);--color-help:var(--color-help-lite);--color-help-emphasis:var(--color-help-emphasis-lite);--color-help-contrast:var(--color-help-contrast-lite);--color-success:var(--color-success-lite);--color-success-emphasis:var(--color-success-emphasis-lite);--color-success-contrast:var(--color-success-contrast-lite);--color-warning:var(--color-warning-lite);--color-warning-emphasis:var(--color-warning-emphasis-lite);--color-warning-contrast:var(--color-warning-contrast-lite);--color-danger:var(--color-danger-lite);--color-danger-emphasis:var(--color-danger-emphasis-lite);--color-danger-contrast:var(--color-danger-contrast-lite);--colorscale-resee-linear:var(--color-resee-red) 0%,var(--color-resee-orange) 16.666%,var(--color-resee-yellow) 27.777%,var(--color-resee-green) 38.888%,var(--color-resee-seaweed) 49.999%,var(--color-resee-aqua) 60.000%,var(--color-resee-blue) 71.111%,var(--color-resee-indigo) 82.222%,var(--color-resee-violet) 100%;--colorscale-resee-linear-step:var(--color-resee-red) 0% 11.111%,var(--color-resee-orange) 11.111% 22.222%,var(--color-resee-yellow) 22.222% 33.333%,var(--color-resee-green) 33.333% 44.444%,var(--color-resee-seaweed) 44.444% 55.555%,var(--color-resee-aqua) 55.555% 66.666%,var(--color-resee-blue) 66.666% 77.777%,var(--color-resee-indigo) 77.777% 88.888%,var(--color-resee-violet) 88.888% 100%;--colorscale-resee-conic:var(--color-resee-violet) 18deg,var(--color-resee-red) 54deg,var(--color-resee-orange) 90deg,var(--color-resee-yellow) 126deg,var(--color-resee-green) 164deg,var(--color-resee-seaweed) 198deg,var(--color-resee-aqua) 234deg,var(--color-resee-blue) 270deg,var(--color-resee-indigo) 306deg,var(--color-resee-violet) 342deg;--colorscale-resee-conic-step:var(--color-resee-violet) 0deg 20deg,var(--color-resee-red) 20deg 60deg,var(--color-resee-orange) 60deg 100deg,var(--color-resee-yellow) 100deg 140deg,var(--color-resee-green) 140deg 180deg,var(--color-resee-seaweed) 180deg 220deg,var(--color-resee-aqua) 220deg 260deg,var(--color-resee-blue) 260deg 300deg,var(--color-resee-indigo) 300deg 340deg,var(--color-resee-violet) 340deg 360deg;--colorscale-resee-lite-linear:var(--color-resee-lite-red) 0%,var(--color-resee-lite-orange) 16.666%,var(--color-resee-lite-yellow) 27.777%,var(--color-resee-lite-green) 38.888%,var(--color-resee-lite-seaweed) 49.999%,var(--color-resee-lite-aqua) 60.000%,var(--color-resee-lite-blue) 71.111%,var(--color-resee-lite-indigo) 82.222%,var(--color-resee-lite-violet) 100%;--colorscale-resee-lite-linear-step:var(--color-resee-lite-red) 0% 11.111%,var(--color-resee-lite-orange) 11.111% 22.222%,var(--color-resee-lite-yellow) 22.222% 33.333%,var(--color-resee-lite-green) 33.333% 44.444%,var(--color-resee-lite-seaweed) 44.444% 55.555%,var(--color-resee-lite-aqua) 55.555% 66.666%,var(--color-resee-lite-blue) 66.666% 77.777%,var(--color-resee-lite-indigo) 77.777% 88.888%,var(--color-resee-lite-violet) 88.888% 100%;--colorscale-resee-lite-conic:var(--color-resee-lite-violet) 18deg,var(--color-resee-lite-red) 54deg,var(--color-resee-lite-orange) 90deg,var(--color-resee-lite-yellow) 126deg,var(--color-resee-lite-green) 164deg,var(--color-resee-lite-seaweed) 198deg,var(--color-resee-lite-aqua) 234deg,var(--color-resee-lite-blue) 270deg,var(--color-resee-lite-indigo) 306deg,var(--color-resee-lite-violet) 342deg;--colorscale-resee-lite-conic-step:var(--color-resee-lite-violet) 0deg 20deg,var(--color-resee-lite-red) 20deg 60deg,var(--color-resee-lite-orange) 60deg 100deg,var(--color-resee-lite-yellow) 100deg 140deg,var(--color-resee-lite-green) 140deg 180deg,var(--color-resee-lite-seaweed) 180deg 220deg,var(--color-resee-lite-aqua) 220deg 260deg,var(--color-resee-lite-blue) 260deg 300deg,var(--color-resee-lite-indigo) 300deg 340deg,var(--color-resee-lite-violet) 340deg 360deg;--shadow-heavy-lite:0 2px 3px rgba(0,0,0,.2);--shadow-heavy-right-lite:2px 0 3px rgba(0,0,0,.2);--shadow-heavy-left-lite:-2px 0 3px rgba(0,0,0,.2);--shadow-heavy-top-lite:0 -2px 3px rgba(0,0,0,.2);--shadow-heavy-dark:0 2px 3px rgba(0,0,0,.7);--shadow-heavy-right-dark:2px 0 3px rgba(0,0,0,.7);--shadow-heavy-left-dark:-2px 0 3px rgba(0,0,0,.7);--shadow-heavy-top-dark:0 -2px 3px rgba(0,0,0,.7);--shadow-heavy:var(--shadow-heavy-lite);--shadow-heavy-right:var(--shadow-heavy-right-lite);--shadow-heavy-left:var(--shadow-heavy-left-lite);--shadow-heavy-top:var(--shadow-heavy-top-lite)}
|
|
1
|
+
@custom-variant dark (&:where(.dark, .dark *));@variant dark{--color-global-background:var(--color-global-background-dark);--color-global-background-accent:var(--color-global-background-accent-dark);--color-global-foreground:var(--color-global-foreground-dark);--color-global-foreground-accent:var(--color-global-foreground-accent-dark);--color-invert-global-background:var(--color-global-background-lite);--color-invert-global-background-accent:var(--color-global-background-accent-lite);--color-invert-global-foreground:var(--color-global-foreground-lite);--color-invert-global-foreground-accent:var(--color-global-foreground-accent-lite);--color-background-scale-a:var(--color-background-scale-a-dark);--color-background-scale-b:var(--color-background-scale-b-dark);--color-background-scale-c:var(--color-background-scale-c-dark);--color-background-scale-d:var(--color-background-scale-d-dark);--color-background-scale-e:var(--color-background-scale-e-dark);--color-background-scale-f:var(--color-background-scale-f-dark);--color-background-scale-g:var(--color-background-scale-g-dark);--color-foreground-scale-a:var(--color-foreground-scale-a-dark);--color-foreground-scale-b:var(--color-foreground-scale-b-dark);--color-foreground-scale-c:var(--color-foreground-scale-c-dark);--color-foreground-scale-d:var(--color-foreground-scale-d-dark);--color-foreground-scale-e:var(--color-foreground-scale-e-dark);--color-foreground-scale-f:var(--color-foreground-scale-f-dark);--color-foreground-scale-g:var(--color-foreground-scale-g-dark);--color-invert-background-scale-a:var(--color-background-scale-a-lite);--color-invert-background-scale-b:var(--color-background-scale-b-lite);--color-invert-background-scale-c:var(--color-background-scale-c-lite);--color-invert-background-scale-d:var(--color-background-scale-d-lite);--color-invert-background-scale-e:var(--color-background-scale-e-lite);--color-invert-background-scale-f:var(--color-background-scale-f-lite);--color-invert-background-scale-g:var(--color-background-scale-g-lite);--color-invert-foreground-scale-a:var(--color-foreground-scale-a-lite);--color-invert-foreground-scale-b:var(--color-foreground-scale-b-lite);--color-invert-foreground-scale-c:var(--color-foreground-scale-c-lite);--color-invert-foreground-scale-d:var(--color-foreground-scale-d-lite);--color-invert-foreground-scale-e:var(--color-foreground-scale-e-lite);--color-invert-foreground-scale-f:var(--color-foreground-scale-f-lite);--color-invert-foreground-scale-g:var(--color-foreground-scale-g-lite);--color-info:var(--color-info-dark);--color-info-emphasis:var(--color-info-emphasis-dark);--color-info-contrast:var(--color-info-contrast-dark);--color-help:var(--color-help-dark);--color-help-emphasis:var(--color-help-emphasis-dark);--color-help-contrast:var(--color-help-contrast-dark);--color-success:var(--color-success-dark);--color-success-emphasis:var(--color-success-emphasis-dark);--color-success-contrast:var(--color-success-contrast-dark);--color-warning:var(--color-warning-dark);--color-warning-emphasis:var(--color-warning-emphasis-dark);--color-warning-contrast:var(--color-warning-contrast-dark);--color-danger:var(--color-danger-dark);--color-danger-emphasis:var(--color-danger-emphasis-dark);--color-danger-contrast:var(--color-danger-contrast-dark);--shadow-heavy:var(--shadow-heavy-dark);--shadow-heavy-right:var(--shadow-heavy-right-dark);--shadow-heavy-left:var(--shadow-heavy-left-dark);--shadow-heavy-top:var(--shadow-heavy-top-dark)}@theme{--font-sans:"Archivo",ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--zero-width-space:"";--radius-full:9999px;--custom-accent-color:unset;--icon-size-small:--spacing(3.5);--icon-size-medium:--spacing(4);--icon-size-large:--spacing(6);--icon-size-jumbo:--spacing(12);--aspect-poster:2/3;--aspect-tall:4/5;--color-surface-0:oklch(100.0% 0 0);--color-surface-50:oklch(97.31% 0 0);--color-surface-100:oklch(92.80% 0 0);--color-surface-200:oklch(86.07% 0 0);--color-surface-300:oklch(75.72% 0 0);--color-surface-400:oklch(62.68% 0 0);--color-surface-500:oklch(53.48% 0 0);--color-surface-600:oklch(47.84% 0 0);--color-surface-700:oklch(42.76% 0 0);--color-surface-800:oklch(39.04% 0 0);--color-surface-850:oklch(37.53% 0 0);--color-surface-900:oklch(36.00% 0 0);--color-surface-925:oklch(28.50% 0 0);--color-surface-950:oklch(20.02% 0 0);--color-primary-50:oklch(97.94% 0.0171 103.14);--color-primary-100:oklch(94.93% 0.0459 101.86);--color-primary-200:oklch(89.80% 0.0854 99.1);--color-primary-300:oklch(83.23% 0.1222 96.48);--color-primary-400:oklch(76.65% 0.1387 91.06);--color-primary-500:oklch(71.00% 0.1307 86.56);--color-primary-600:oklch(61.31% 0.1146 77.38);--color-primary-700:oklch(50.50% 0.0943 67.44);--color-primary-800:oklch(44.38% 0.0782 62.58);--color-primary-900:oklch(39.94% 0.0661 58.15);--color-primary-950:oklch(27.10% 0.0457 53.29);--color-resee-red:oklch(57.47% 0.2229 28.19);--color-resee-orange:oklch(67.79% 0.201 41.61);--color-resee-yellow:oklch(84.78% 0.171 89.53);--color-resee-green:oklch(71.41% 0.1907 132.48);--color-resee-seaweed:oklch(59.95% 0.1179 167.71);--color-resee-aqua:oklch(74.55% 0.1224 209.96);--color-resee-blue:oklch(42.42% 0.1982 265.5);--color-resee-indigo:oklch(39.67% 0.1568 293.38);--color-resee-violet:oklch(46.25% 0.1488 353.55);--color-resee-lite-red:oklch(from var(--color-resee-red) calc(l + 0.22) c h);--color-resee-lite-orange:oklch(from var(--color-resee-orange) calc(l + 0.25) c h);--color-resee-lite-yellow:oklch(from var(--color-resee-yellow) calc(l + 0.30) calc(c - 0.03) h);--color-resee-lite-green:oklch(from var(--color-resee-green) calc(l + 0.30) calc(c + 0.02) h);--color-resee-lite-seaweed:oklch(from var(--color-resee-seaweed) calc(l + 0.20) c h);--color-resee-lite-aqua:oklch(from var(--color-resee-aqua) calc(l + 0.25) calc(c - 0.03) h);--color-resee-lite-blue:oklch(from var(--color-resee-blue) calc(l + 0.38) c h);--color-resee-lite-indigo:oklch(from var(--color-resee-indigo) calc(l + 0.45) calc(c + 0.1) h);--color-resee-lite-violet:oklch(from var(--color-resee-violet) calc(l + 0.30) calc(c - 0.05) h);--color-global-background-lite:var(--color-surface-50);--color-global-background-accent-lite:oklch(from var(--color-surface-50) calc(l - 0.15) c h);--color-global-foreground-lite:var(--color-surface-950);--color-global-foreground-accent-lite:var(--color-surface-700);--color-global-background-dark:var(--color-surface-950);--color-global-background-accent-dark:oklch(from var(--color-surface-950) calc(l + 0.15) c h);--color-global-foreground-dark:var(--color-surface-0);--color-global-foreground-accent-dark:var(--color-surface-400);--color-background-scale-a-lite:color-mix(in oklch,var(--color-surface-950) 5%,var(--color-global-background-lite));--color-background-scale-b-lite:color-mix(in oklch,var(--color-surface-950) 8%,var(--color-global-background-lite));--color-background-scale-c-lite:color-mix(in oklch,var(--color-surface-950) 11%,var(--color-global-background-lite));--color-background-scale-d-lite:color-mix(in oklch,var(--color-surface-950) 14%,var(--color-global-background-lite));--color-background-scale-e-lite:color-mix(in oklch,var(--color-surface-950) 17%,var(--color-global-background-lite));--color-background-scale-f-lite:color-mix(in oklch,var(--color-surface-950) 20%,var(--color-global-background-lite));--color-background-scale-g-lite:color-mix(in oklch,var(--color-surface-950) 29%,var(--color-global-background-lite));--color-background-scale-a-dark:color-mix(in oklch,var(--color-surface-0) 5%,var(--color-global-background-dark));--color-background-scale-b-dark:color-mix(in oklch,var(--color-surface-0) 8%,var(--color-global-background-dark));--color-background-scale-c-dark:color-mix(in oklch,var(--color-surface-0) 11%,var(--color-global-background-dark));--color-background-scale-d-dark:color-mix(in oklch,var(--color-surface-0) 14%,var(--color-global-background-dark));--color-background-scale-e-dark:color-mix(in oklch,var(--color-surface-0) 17%,var(--color-global-background-dark));--color-background-scale-f-dark:color-mix(in oklch,var(--color-surface-0) 20%,var(--color-global-background-dark));--color-background-scale-g-dark:color-mix(in oklch,var(--color-surface-0) 29%,var(--color-global-background-dark));--color-foreground-scale-a-lite:var(--color-background-scale-a-dark);--color-foreground-scale-b-lite:var(--color-background-scale-b-dark);--color-foreground-scale-c-lite:var(--color-background-scale-c-dark);--color-foreground-scale-d-lite:var(--color-background-scale-d-dark);--color-foreground-scale-e-lite:var(--color-background-scale-e-dark);--color-foreground-scale-f-lite:var(--color-background-scale-f-dark);--color-foreground-scale-g-lite:var(--color-background-scale-g-dark);--color-foreground-scale-a-dark:var(--color-background-scale-a-lite);--color-foreground-scale-b-dark:var(--color-background-scale-b-lite);--color-foreground-scale-c-dark:var(--color-background-scale-c-lite);--color-foreground-scale-d-dark:var(--color-background-scale-d-lite);--color-foreground-scale-e-dark:var(--color-background-scale-e-lite);--color-foreground-scale-f-dark:var(--color-background-scale-f-lite);--color-foreground-scale-g-dark:var(--color-background-scale-g-lite);--color-info-lite:#3b82f6;--color-info-emphasis-lite:#2563eb;--color-info-contrast-lite:#fff;--color-info-dark:var(--color-resee-aqua);--color-info-emphasis-dark:oklch(from var(--color-resee-aqua) calc(l + 0.1) c h);--color-info-contrast-dark:var(--color-surface-950);--color-help-lite:#8b5cf6;--color-help-emphasis-lite:#7c3aed;--color-help-contrast-lite:var(--color-surface-50);--color-help-dark:#c4b5fd;--color-help-emphasis-dark:#ddd6fe;--color-help-contrast-dark:var(--color-surface-950);--color-success-lite:#15803d;--color-success-emphasis-lite:#166534;--color-success-contrast-lite:var(--color-surface-50);--color-success-dark:var(--color-resee-lite-seaweed);--color-success-emphasis-dark:oklch(from var(--color-resee-lite-seaweed) calc(l + 0.02) c h);--color-success-contrast-dark:var(--color-surface-950);--color-warning-lite:#b45309;--color-warning-emphasis-lite:#92400e;--color-warning-contrast-lite:var(--color-surface-50);--color-warning-dark:#fbbf24;--color-warning-emphasis-dark:#fcd34d;--color-warning-contrast-dark:var(--color-surface-950);--color-danger-lite:#991b1b;--color-danger-emphasis-lite:#7f1d1d;--color-danger-contrast-lite:var(--color-surface-50);--color-danger-dark:#ef4444;--color-danger-emphasis-dark:#f87171;--color-danger-contrast-dark:var(--color-surface-950);--color-global-background:var(--color-global-background-lite);--color-global-background-accent:var(--color-global-background-accent-lite);--color-global-foreground:var(--color-global-foreground-lite);--color-global-foreground-accent:var(--color-global-foreground-accent-lite);--color-background-scale-a:var(--color-background-scale-a-lite);--color-background-scale-b:var(--color-background-scale-b-lite);--color-background-scale-c:var(--color-background-scale-c-lite);--color-background-scale-d:var(--color-background-scale-d-lite);--color-background-scale-e:var(--color-background-scale-e-lite);--color-background-scale-f:var(--color-background-scale-f-lite);--color-background-scale-g:var(--color-background-scale-g-lite);--color-foreground-scale-a:var(--color-foreground-scale-a-lite);--color-foreground-scale-b:var(--color-foreground-scale-b-lite);--color-foreground-scale-c:var(--color-foreground-scale-c-lite);--color-foreground-scale-d:var(--color-foreground-scale-d-lite);--color-foreground-scale-e:var(--color-foreground-scale-e-lite);--color-foreground-scale-f:var(--color-foreground-scale-f-lite);--color-foreground-scale-g:var(--color-foreground-scale-g-lite);--color-invert-global-background:var(--color-global-background-dark);--color-invert-global-background-accent:var(--color-global-background-accent-dark);--color-invert-global-foreground:var(--color-global-foreground-dark);--color-invert-global-foreground-accent:var(--color-global-foreground-accent-dark);--color-invert-background-scale-a:var(--color-background-scale-a-dark);--color-invert-background-scale-b:var(--color-background-scale-b-dark);--color-invert-background-scale-c:var(--color-background-scale-c-dark);--color-invert-background-scale-d:var(--color-background-scale-d-dark);--color-invert-background-scale-e:var(--color-background-scale-e-dark);--color-invert-background-scale-f:var(--color-background-scale-f-dark);--color-invert-background-scale-g:var(--color-background-scale-g-dark);--color-invert-foreground-scale-a:var(--color-foreground-scale-a-dark);--color-invert-foreground-scale-b:var(--color-foreground-scale-b-dark);--color-invert-foreground-scale-c:var(--color-foreground-scale-c-dark);--color-invert-foreground-scale-d:var(--color-foreground-scale-d-dark);--color-invert-foreground-scale-e:var(--color-foreground-scale-e-dark);--color-invert-foreground-scale-f:var(--color-foreground-scale-f-dark);--color-invert-foreground-scale-g:var(--color-foreground-scale-g-dark);--color-info:var(--color-info-lite);--color-info-emphasis:var(--color-info-emphasis-lite);--color-info-contrast:var(--color-info-contrast-lite);--color-help:var(--color-help-lite);--color-help-emphasis:var(--color-help-emphasis-lite);--color-help-contrast:var(--color-help-contrast-lite);--color-success:var(--color-success-lite);--color-success-emphasis:var(--color-success-emphasis-lite);--color-success-contrast:var(--color-success-contrast-lite);--color-warning:var(--color-warning-lite);--color-warning-emphasis:var(--color-warning-emphasis-lite);--color-warning-contrast:var(--color-warning-contrast-lite);--color-danger:var(--color-danger-lite);--color-danger-emphasis:var(--color-danger-emphasis-lite);--color-danger-contrast:var(--color-danger-contrast-lite);--colorscale-resee-linear:var(--color-resee-red) 0%,var(--color-resee-orange) 16.666%,var(--color-resee-yellow) 27.777%,var(--color-resee-green) 38.888%,var(--color-resee-seaweed) 49.999%,var(--color-resee-aqua) 60.000%,var(--color-resee-blue) 71.111%,var(--color-resee-indigo) 82.222%,var(--color-resee-violet) 100%;--colorscale-resee-linear-step:var(--color-resee-red) 0% 11.111%,var(--color-resee-orange) 11.111% 22.222%,var(--color-resee-yellow) 22.222% 33.333%,var(--color-resee-green) 33.333% 44.444%,var(--color-resee-seaweed) 44.444% 55.555%,var(--color-resee-aqua) 55.555% 66.666%,var(--color-resee-blue) 66.666% 77.777%,var(--color-resee-indigo) 77.777% 88.888%,var(--color-resee-violet) 88.888% 100%;--colorscale-resee-conic:var(--color-resee-violet) 18deg,var(--color-resee-red) 54deg,var(--color-resee-orange) 90deg,var(--color-resee-yellow) 126deg,var(--color-resee-green) 164deg,var(--color-resee-seaweed) 198deg,var(--color-resee-aqua) 234deg,var(--color-resee-blue) 270deg,var(--color-resee-indigo) 306deg,var(--color-resee-violet) 342deg;--colorscale-resee-conic-step:var(--color-resee-violet) 0deg 20deg,var(--color-resee-red) 20deg 60deg,var(--color-resee-orange) 60deg 100deg,var(--color-resee-yellow) 100deg 140deg,var(--color-resee-green) 140deg 180deg,var(--color-resee-seaweed) 180deg 220deg,var(--color-resee-aqua) 220deg 260deg,var(--color-resee-blue) 260deg 300deg,var(--color-resee-indigo) 300deg 340deg,var(--color-resee-violet) 340deg 360deg;--colorscale-resee-lite-linear:var(--color-resee-lite-red) 0%,var(--color-resee-lite-orange) 16.666%,var(--color-resee-lite-yellow) 27.777%,var(--color-resee-lite-green) 38.888%,var(--color-resee-lite-seaweed) 49.999%,var(--color-resee-lite-aqua) 60.000%,var(--color-resee-lite-blue) 71.111%,var(--color-resee-lite-indigo) 82.222%,var(--color-resee-lite-violet) 100%;--colorscale-resee-lite-linear-step:var(--color-resee-lite-red) 0% 11.111%,var(--color-resee-lite-orange) 11.111% 22.222%,var(--color-resee-lite-yellow) 22.222% 33.333%,var(--color-resee-lite-green) 33.333% 44.444%,var(--color-resee-lite-seaweed) 44.444% 55.555%,var(--color-resee-lite-aqua) 55.555% 66.666%,var(--color-resee-lite-blue) 66.666% 77.777%,var(--color-resee-lite-indigo) 77.777% 88.888%,var(--color-resee-lite-violet) 88.888% 100%;--colorscale-resee-lite-conic:var(--color-resee-lite-violet) 18deg,var(--color-resee-lite-red) 54deg,var(--color-resee-lite-orange) 90deg,var(--color-resee-lite-yellow) 126deg,var(--color-resee-lite-green) 164deg,var(--color-resee-lite-seaweed) 198deg,var(--color-resee-lite-aqua) 234deg,var(--color-resee-lite-blue) 270deg,var(--color-resee-lite-indigo) 306deg,var(--color-resee-lite-violet) 342deg;--colorscale-resee-lite-conic-step:var(--color-resee-lite-violet) 0deg 20deg,var(--color-resee-lite-red) 20deg 60deg,var(--color-resee-lite-orange) 60deg 100deg,var(--color-resee-lite-yellow) 100deg 140deg,var(--color-resee-lite-green) 140deg 180deg,var(--color-resee-lite-seaweed) 180deg 220deg,var(--color-resee-lite-aqua) 220deg 260deg,var(--color-resee-lite-blue) 260deg 300deg,var(--color-resee-lite-indigo) 300deg 340deg,var(--color-resee-lite-violet) 340deg 360deg;--shadow-heavy-lite:0 2px 3px rgba(0,0,0,.2);--shadow-heavy-right-lite:2px 0 3px rgba(0,0,0,.2);--shadow-heavy-left-lite:-2px 0 3px rgba(0,0,0,.2);--shadow-heavy-top-lite:0 -2px 3px rgba(0,0,0,.2);--shadow-heavy-dark:0 2px 3px rgba(0,0,0,.7);--shadow-heavy-right-dark:2px 0 3px rgba(0,0,0,.7);--shadow-heavy-left-dark:-2px 0 3px rgba(0,0,0,.7);--shadow-heavy-top-dark:0 -2px 3px rgba(0,0,0,.7);--shadow-heavy:var(--shadow-heavy-lite);--shadow-heavy-right:var(--shadow-heavy-right-lite);--shadow-heavy-left:var(--shadow-heavy-left-lite);--shadow-heavy-top:var(--shadow-heavy-top-lite);--gradient-direction-to-t:to top;--gradient-direction-to-tr:to top right;--gradient-direction-to-r:to right;--gradient-direction-to-br:to bottom right;--gradient-direction-to-b:to b;--gradient-direction-to-bl:to bottom left;--gradient-direction-to-l:to left;--gradient-direction-to-tl:to top left}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FormFieldState } from '@primevue/forms';
|
|
2
|
-
import { type InjectionKey } from 'vue';
|
|
2
|
+
import { type InjectionKey, type MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import type { FormInstance, FormValues } from '../types/form.js';
|
|
4
4
|
/**
|
|
5
5
|
* The injection key for acquiring a {@link FormInstance} object within the
|
|
@@ -24,11 +24,40 @@ export declare function provideFormInstance(): FormInstance;
|
|
|
24
24
|
/**
|
|
25
25
|
* Injects the stateful object provided by an ancestor Form instance. If not
|
|
26
26
|
* available, a dummy state object is generated.
|
|
27
|
+
*
|
|
28
|
+
* @private
|
|
27
29
|
*/
|
|
28
30
|
export declare function injectFormInstance(): FormInstance;
|
|
29
31
|
/**
|
|
30
32
|
* Takes a Primevue Form's `states` object, and extracts the current values
|
|
31
33
|
* of each named property. In doing so, it will deref proxies, and create
|
|
32
34
|
* shallow clones of any arrays/objects it encounters.
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
33
37
|
*/
|
|
34
38
|
export declare function getValuesFromFormState<T extends FormValues = FormValues>(state: Record<string, FormFieldState>): T;
|
|
39
|
+
/**
|
|
40
|
+
* @private
|
|
41
|
+
*/
|
|
42
|
+
export type UseOptionListMethodsConfig = {
|
|
43
|
+
optionLabel?: string | ((data: unknown) => string);
|
|
44
|
+
optionValue?: string | ((data: unknown) => string);
|
|
45
|
+
optionIcon?: string | ((data: unknown) => string);
|
|
46
|
+
optionDisabled?: string | ((data: unknown) => boolean);
|
|
47
|
+
optionDataKey?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Creates a set of common methods for interacting with an array of "options" like what
|
|
51
|
+
* gets provided to a Select or RadioGroup.
|
|
52
|
+
*
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
export declare function useOptionListMethods(config: MaybeRefOrGetter<UseOptionListMethodsConfig>): import("vue").ComputedRef<{
|
|
56
|
+
getOptionLabel: (option: unknown) => string;
|
|
57
|
+
getOptionValue: (option: unknown) => unknown;
|
|
58
|
+
getOptionIcon: (option: unknown) => string | undefined;
|
|
59
|
+
getOptionDisabled: (option: unknown) => boolean;
|
|
60
|
+
getOptionRenderKey: (option: unknown) => string | number | undefined;
|
|
61
|
+
getOptionIndex: (needle: unknown, haystack: unknown) => number;
|
|
62
|
+
getOptionByValue: <T>(needle: unknown, haystack: MaybeRefOrGetter<T[] | undefined>) => T | undefined;
|
|
63
|
+
}>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { equals, resolveFieldData } from "@primeuix/utils/object";
|
|
2
|
+
import { isNumber } from "@resee-movies/utilities/numbers/is-number";
|
|
1
3
|
import { isObjectLike } from "@resee-movies/utilities/objects/is-object-like";
|
|
2
|
-
import {
|
|
4
|
+
import { isString } from "@resee-movies/utilities/strings/is-string";
|
|
5
|
+
import { computed, inject, provide, ref, toRaw, toValue } from "vue";
|
|
3
6
|
export const FormSymbol = Symbol("form");
|
|
4
7
|
export function createFormInstance() {
|
|
5
8
|
return {
|
|
@@ -32,3 +35,54 @@ export function getValuesFromFormState(state) {
|
|
|
32
35
|
}
|
|
33
36
|
return result;
|
|
34
37
|
}
|
|
38
|
+
export function useOptionListMethods(config) {
|
|
39
|
+
return computed(() => {
|
|
40
|
+
const {
|
|
41
|
+
optionLabel,
|
|
42
|
+
optionValue,
|
|
43
|
+
optionIcon,
|
|
44
|
+
optionDisabled,
|
|
45
|
+
optionDataKey
|
|
46
|
+
} = toValue(config);
|
|
47
|
+
const getOptionLabel = (option) => {
|
|
48
|
+
return String(optionLabel ? resolveFieldData(option, optionLabel) : option);
|
|
49
|
+
};
|
|
50
|
+
const getOptionValue = (option) => {
|
|
51
|
+
return optionValue ? resolveFieldData(option, optionValue) : option;
|
|
52
|
+
};
|
|
53
|
+
const getOptionIcon = (option) => {
|
|
54
|
+
return optionIcon ? String(resolveFieldData(option, optionIcon)) : void 0;
|
|
55
|
+
};
|
|
56
|
+
const getOptionDisabled = (option) => {
|
|
57
|
+
return Boolean(optionDisabled ? resolveFieldData(option, optionDisabled) : false);
|
|
58
|
+
};
|
|
59
|
+
const getOptionRenderKey = (option) => {
|
|
60
|
+
const result = optionDataKey ? resolveFieldData(option, optionDataKey) : getOptionLabel(option);
|
|
61
|
+
return isString(result) || isNumber(result) ? result : void 0;
|
|
62
|
+
};
|
|
63
|
+
const getOptionIndex = (needle, haystack) => {
|
|
64
|
+
const rawHaystack = toValue(haystack);
|
|
65
|
+
const optionValue2 = getOptionValue(needle);
|
|
66
|
+
const equalityKey = optionValue2 ? void 0 : optionDataKey;
|
|
67
|
+
if (Array.isArray(rawHaystack)) {
|
|
68
|
+
return rawHaystack.findIndex((entry) => equals(entry, optionValue2, equalityKey));
|
|
69
|
+
}
|
|
70
|
+
return equals(rawHaystack, optionValue2, equalityKey) ? 0 : -1;
|
|
71
|
+
};
|
|
72
|
+
const getOptionByValue = (needle, haystack) => {
|
|
73
|
+
const equalityKey = optionValue ? void 0 : optionDataKey;
|
|
74
|
+
return toValue(haystack)?.find(
|
|
75
|
+
(option) => equals(getOptionValue(option), needle, equalityKey)
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
getOptionLabel,
|
|
80
|
+
getOptionValue,
|
|
81
|
+
getOptionIcon,
|
|
82
|
+
getOptionDisabled,
|
|
83
|
+
getOptionRenderKey,
|
|
84
|
+
getOptionIndex,
|
|
85
|
+
getOptionByValue
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resee-movies/nuxt-ux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The next-gen user experience library for ReSee Movies - currently in development. ",
|
|
5
5
|
"repository": {
|
|
6
6
|
"url": "https://github.com/ReSee-Movies/nuxt-ux.git"
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"@iconify-json/simple-icons": "^1.2.61",
|
|
76
76
|
"@iconify-json/solar": "^1.2.5",
|
|
77
77
|
"@nuxt/fonts": "^0.12.1",
|
|
78
|
+
"@nuxtjs/device": "^4.0.0",
|
|
78
79
|
"@primeuix/utils": "^0.6.1",
|
|
79
80
|
"@primevue/forms": "^4.5.1",
|
|
80
81
|
"@primevue/nuxt-module": "^4.5.1",
|