@proj-airi/ui 0.6.1 → 0.7.0-beta.1

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.
Files changed (33) hide show
  1. package/package.json +5 -10
  2. package/src/components/Animations/TransitionHorizontal.vue +36 -0
  3. package/src/components/Animations/index.ts +1 -0
  4. package/src/components/Form/Combobox/Combobox.vue +128 -0
  5. package/src/components/Form/Combobox/index.ts +1 -0
  6. package/src/components/Form/Field/FieldCheckbox.vue +6 -2
  7. package/src/components/Form/Field/FieldInput.vue +7 -3
  8. package/src/components/Form/Field/FieldKeyValues.vue +6 -2
  9. package/src/components/Form/Field/FieldRange.vue +13 -6
  10. package/src/components/Form/Field/FieldSelect.vue +54 -0
  11. package/src/components/Form/Field/FieldValues.vue +6 -2
  12. package/src/components/Form/Field/index.ts +1 -0
  13. package/src/components/Form/Input/BasicInputFile.vue +43 -0
  14. package/src/components/Form/Input/Input.vue +1 -1
  15. package/src/components/Form/Input/index.ts +1 -0
  16. package/src/components/Form/Range/ColorHueRange.vue +8 -8
  17. package/src/components/Form/Range/Range.vue +47 -20
  18. package/src/components/Form/Range/RoundRange.vue +277 -0
  19. package/src/components/Form/Range/index.ts +1 -0
  20. package/src/components/Form/Select/Option.vue +29 -0
  21. package/src/components/Form/Select/Select.vue +15 -86
  22. package/src/components/Form/Select/index.ts +1 -0
  23. package/src/components/Form/Textarea/Basic.vue +8 -0
  24. package/src/components/Form/index.ts +1 -0
  25. package/dist/Animations-DeJoVt_I.mjs +0 -153
  26. package/dist/Form-BXVt-kFc.css +0 -336
  27. package/dist/Form-Cy7H3Deq.mjs +0 -1237
  28. package/dist/components/animations.mjs +0 -4
  29. package/dist/components/form.mjs +0 -4
  30. package/dist/export-helper-WDd986Km.mjs +0 -9
  31. package/dist/index.mjs +0 -5
  32. package/tsdown.config.ts +0 -29
  33. package/uno.config.ts +0 -8
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@proj-airi/ui",
3
3
  "type": "module",
4
- "version": "0.6.1",
4
+ "version": "0.7.0-beta.1",
5
5
  "description": "A collection of UI components that used by Project AIRI",
6
6
  "author": {
7
7
  "name": "Moeru AI Project AIRI Team",
@@ -20,22 +20,17 @@
20
20
  "./components/form": "./src/components/Form/index.ts",
21
21
  "./*": "./*"
22
22
  },
23
- "main": "./dist/index.mjs",
24
- "module": "./dist/index.mjs",
25
23
  "dependencies": {
26
- "@vueuse/core": "^13.3.0",
24
+ "@vueuse/core": "^13.5.0",
27
25
  "floating-vue": "^5.2.2",
28
- "reka-ui": "^2.3.1",
29
- "vue": "^3.5.16"
26
+ "reka-ui": "^2.3.2",
27
+ "vue": "^3.5.17"
30
28
  },
31
29
  "devDependencies": {
32
30
  "@vue-macros/volar": "3.0.0-beta.8",
33
- "vue-tsc": "^3.0.0-alpha.10"
31
+ "vue-tsc": "^3.0.3"
34
32
  },
35
33
  "scripts": {
36
- "dev": "pnpm run build",
37
- "stub": "pnpm run build",
38
- "build": "tsdown",
39
34
  "typecheck": "vue-tsc --noEmit"
40
35
  }
41
36
  }
@@ -0,0 +1,36 @@
1
+ <script setup lang="ts">
2
+ function enter(el: any, done: any) {
3
+ el.style.transition = 'all 0.5s'
4
+ const width = el.scrollWidth
5
+ el.style.width = '0'
6
+ requestAnimationFrame(() => {
7
+ el.style.width = `${width}px`
8
+ })
9
+ el.addEventListener('transitionend', done)
10
+ }
11
+
12
+ function beforeLeave(el: any) {
13
+ el.style.transition = 'all 0.5s'
14
+ el.style.width = '0'
15
+ el.style.opacity = '0'
16
+ }
17
+
18
+ function leave(el: any, done: any) {
19
+ el.style.transition = 'all 0.5s'
20
+ el.style.width = '0'
21
+ el.style.opacity = '0'
22
+ el.addEventListener('transitionend', done)
23
+ }
24
+ </script>
25
+
26
+ <template>
27
+ <Transition
28
+ name="slide-fade"
29
+ :css="false"
30
+ @enter="enter"
31
+ @leave="leave"
32
+ @before-leave="beforeLeave"
33
+ >
34
+ <slot />
35
+ </Transition>
36
+ </template>
@@ -1 +1,2 @@
1
+ export { default as TransitionHorizontal } from './TransitionHorizontal.vue'
1
2
  export { default as TransitionVertical } from './TransitionVertical.vue'
@@ -0,0 +1,128 @@
1
+ <script setup lang="ts">
2
+ import {
3
+ ComboboxAnchor,
4
+ ComboboxContent,
5
+ ComboboxEmpty,
6
+ ComboboxGroup,
7
+ ComboboxInput,
8
+ ComboboxItem,
9
+ ComboboxItemIndicator,
10
+ ComboboxLabel,
11
+ ComboboxRoot,
12
+ ComboboxSeparator,
13
+ ComboboxTrigger,
14
+ ComboboxViewport,
15
+ } from 'reka-ui'
16
+
17
+ const props = defineProps<{
18
+ options: { groupLabel: string, children?: { label: string, value: any }[] }[]
19
+ placeholder?: string
20
+ }>()
21
+
22
+ function toDisplayValue(value: any): string {
23
+ const option = props.options.flatMap(group => group.children).find(option => option?.value === value)
24
+ return option ? option.label : props.placeholder || ''
25
+ }
26
+ </script>
27
+
28
+ <template>
29
+ <ComboboxRoot
30
+ class="relative w-full"
31
+ >
32
+ <ComboboxAnchor
33
+ :class="[
34
+ 'min-w-[160px] w-full inline-flex items-center justify-between rounded-lg border px-2 leading-none h-[35px] gap-[5px] outline-none',
35
+ 'text-xs text-neutral-700 dark:text-neutral-200 data-[placeholder]:text-neutral-200',
36
+ 'bg-white dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:disabled:bg-neutral-900 dark:hover:bg-neutral-700',
37
+ 'border-neutral-300 dark:border-neutral-800 border-solid border-2 focus:border-neutral-400 dark:focus:border-neutral-600',
38
+ 'shadow-sm focus:shadow-[0_0_0_2px] focus:shadow-black',
39
+ 'transition-colors duration-200 ease-in-out',
40
+ ]"
41
+ >
42
+ <ComboboxInput
43
+ :class="[
44
+ '!bg-transparent outline-none h-full selection:bg-grass5 placeholder-stone-400 w-full',
45
+ 'text-neutral-700 dark:text-neutral-200',
46
+ 'transition-colors duration-200 ease-in-out',
47
+ ]"
48
+ :placeholder="props.placeholder"
49
+ :display-value="(val) => toDisplayValue(val)"
50
+ />
51
+ <ComboboxTrigger>
52
+ <div
53
+ i-solar:alt-arrow-down-linear
54
+ :class="[
55
+ 'h-4 w-4',
56
+ 'text-neutral-700 dark:text-neutral-200',
57
+ 'transition-colors duration-200 ease-in-out',
58
+ ]"
59
+ />
60
+ </ComboboxTrigger>
61
+ </ComboboxAnchor>
62
+
63
+ <ComboboxContent
64
+ :avoid-collisions="true"
65
+ :class="[
66
+ 'absolute z-10 w-full mt-1 min-w-[160px] overflow-hidden rounded-lg shadow-sm border will-change-[opacity,transform] max-h-50dvh',
67
+ 'data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade',
68
+ 'bg-white dark:bg-neutral-900',
69
+ 'border-neutral-300 dark:border-neutral-800 border-solid border-2 focus:border-neutral-400 dark:focus:border-neutral-600',
70
+ ]"
71
+ >
72
+ <ComboboxViewport class="p-[2px]">
73
+ <ComboboxEmpty
74
+ :class="[
75
+ 'font-medium py-2 px-2',
76
+ 'text-xs text-neutral-700 dark:text-neutral-200',
77
+ 'transition-colors duration-200 ease-in-out',
78
+ ]"
79
+ />
80
+
81
+ <template
82
+ v-for="(group, index) in options"
83
+ :key="group.name"
84
+ >
85
+ <ComboboxGroup>
86
+ <ComboboxSeparator
87
+ v-if="index !== 0"
88
+ class="m-[5px] h-[1px] bg-neutral-400"
89
+ />
90
+
91
+ <ComboboxLabel
92
+ :class="[
93
+ 'px-[25px] text-xs leading-[25px]',
94
+ 'text-neutral-500 dark:text-neutral-400',
95
+ 'transition-colors duration-200 ease-in-out',
96
+ ]"
97
+ >
98
+ {{ group.groupLabel }}
99
+ </ComboboxLabel>
100
+
101
+ <ComboboxItem
102
+ v-for="option in group.children"
103
+ :key="option.label"
104
+ :text-value="option.label"
105
+ :value="option.value"
106
+ :class="[
107
+ 'leading-none rounded-[5px] flex items-center h-[25px] pr-[35px] pl-[25px] relative select-none data-[disabled]:pointer-events-none data-[highlighted]:outline-none',
108
+ 'data-[highlighted]:bg-neutral-100 dark:data-[highlighted]:bg-neutral-800',
109
+ 'text-xs text-neutral-700 dark:text-neutral-200 data-[disabled]:text-neutral-400 dark:data-[disabled]:text-neutral-600 data-[highlighted]:text-grass1',
110
+ 'transition-colors duration-200 ease-in-out',
111
+ 'cursor-pointer',
112
+ ]"
113
+ >
114
+ <ComboboxItemIndicator
115
+ class="absolute left-0 w-[25px] inline-flex items-center justify-center opacity-30"
116
+ >
117
+ <div i-solar:alt-arrow-right-outline />
118
+ </ComboboxItemIndicator>
119
+ <span>
120
+ {{ option.label }}
121
+ </span>
122
+ </ComboboxItem>
123
+ </ComboboxGroup>
124
+ </template>
125
+ </ComboboxViewport>
126
+ </ComboboxContent>
127
+ </ComboboxRoot>
128
+ </template>
@@ -0,0 +1 @@
1
+ export { default as Combobox } from './Combobox.vue'
@@ -14,10 +14,14 @@ const modelValue = defineModel<boolean>({ required: true })
14
14
  <div flex="~ row" items-center gap-2>
15
15
  <div flex="1">
16
16
  <div class="flex items-center gap-1 text-sm font-medium">
17
- {{ props.label }}
17
+ <slot name="label">
18
+ {{ props.label }}
19
+ </slot>
18
20
  </div>
19
21
  <div class="text-xs text-neutral-500 dark:text-neutral-400">
20
- {{ props.description }}
22
+ <slot name="description">
23
+ {{ props.description }}
24
+ </slot>
21
25
  </div>
22
26
  </div>
23
27
  <Checkbox v-model="modelValue" />
@@ -13,7 +13,7 @@ const props = withDefaults(defineProps<{
13
13
  singleLine: true,
14
14
  })
15
15
 
16
- const modelValue = defineModel<string>({ required: true })
16
+ const modelValue = defineModel<string>({ required: false })
17
17
  </script>
18
18
 
19
19
  <template>
@@ -21,11 +21,15 @@ const modelValue = defineModel<string>({ required: true })
21
21
  <label flex="~ col gap-4">
22
22
  <div>
23
23
  <div class="flex items-center gap-1 text-sm font-medium">
24
- {{ props.label }}
24
+ <slot name="label">
25
+ {{ props.label }}
26
+ </slot>
25
27
  <span v-if="props.required !== false" class="text-red-500">*</span>
26
28
  </div>
27
29
  <div class="text-xs text-neutral-500 dark:text-neutral-400" text-nowrap>
28
- {{ props.description }}
30
+ <slot name="description">
31
+ {{ props.description }}
32
+ </slot>
29
33
  </div>
30
34
  </div>
31
35
  <Input
@@ -32,11 +32,15 @@ watch([inputKey, inputValue], () => {
32
32
  <label flex="~ col gap-2">
33
33
  <div>
34
34
  <div class="flex items-center gap-1 text-sm font-medium">
35
- {{ props.label }}
35
+ <slot name="label">
36
+ {{ props.label }}
37
+ </slot>
36
38
  <span v-if="props.required !== false" class="text-red-500">*</span>
37
39
  </div>
38
40
  <div class="text-xs text-neutral-500 dark:text-neutral-400" text-nowrap>
39
- {{ props.description }}
41
+ <slot name="description">
42
+ {{ props.description }}
43
+ </slot>
40
44
  </div>
41
45
  </div>
42
46
  <div v-auto-animate flex="~ col gap-2">
@@ -1,27 +1,34 @@
1
1
  <script setup lang="ts">
2
2
  import Range from '../Range/Range.vue'
3
3
 
4
- const props = defineProps<{
4
+ const props = withDefaults(defineProps<{
5
5
  min?: number
6
6
  max?: number
7
7
  step?: number
8
8
  label?: string
9
9
  description?: string
10
10
  formatValue?: (value: number) => string
11
- }>()
11
+ as?: 'label' | 'div'
12
+ }>(), {
13
+ as: 'label',
14
+ })
12
15
 
13
16
  const modelValue = defineModel<number>({ required: true })
14
17
  </script>
15
18
 
16
19
  <template>
17
- <label flex="~ col gap-4">
20
+ <props.as flex="~ col gap-4">
18
21
  <div flex="~ row" items-center gap-2>
19
22
  <div flex="1">
20
23
  <div class="flex items-center gap-1 text-sm font-medium">
21
- {{ label }}
24
+ <slot name="label">
25
+ {{ label }}
26
+ </slot>
22
27
  </div>
23
28
  <div class="text-xs text-neutral-500 dark:text-neutral-400">
24
- {{ description }}
29
+ <slot name="description">
30
+ {{ description }}
31
+ </slot>
25
32
  </div>
26
33
  </div>
27
34
  <span font-mono>{{ props.formatValue?.(modelValue) || modelValue }}</span>
@@ -35,5 +42,5 @@ const modelValue = defineModel<number>({ required: true })
35
42
  w-full
36
43
  />
37
44
  </div>
38
- </label>
45
+ </props.as>
39
46
  </template>
@@ -0,0 +1,54 @@
1
+ <script setup lang="ts">
2
+ import { Select } from '@proj-airi/ui'
3
+
4
+ const props = withDefaults(defineProps<{
5
+ label: string
6
+ description?: string
7
+ options?: { label: string, value: string | number }[]
8
+ placeholder?: string
9
+ disabled?: boolean
10
+ layout?: 'horizontal' | 'vertical'
11
+ selectClass?: string | string[]
12
+ }>(), {
13
+ layout: 'horizontal',
14
+ })
15
+
16
+ const modelValue = defineModel<string>({ required: false })
17
+ </script>
18
+
19
+ <template>
20
+ <label flex="~ col gap-4">
21
+ <div
22
+ :class="[
23
+ props.layout === 'horizontal' ? 'flex flex-row items-center justify-between gap-2' : 'flex flex-col items-start justify-center gap-2',
24
+ ]"
25
+ >
26
+ <div class="min-w-[max-content] flex-1">
27
+ <div class="flex items-center gap-1 text-sm font-medium">
28
+ <slot name="label">
29
+ {{ props.label }}
30
+ </slot>
31
+ </div>
32
+ <div class="text-xs text-neutral-500 dark:text-neutral-400">
33
+ <slot name="description">
34
+ {{ props.description }}
35
+ </slot>
36
+ </div>
37
+ </div>
38
+ <slot>
39
+ <Select
40
+ v-model="modelValue"
41
+ :options="props.options?.filter(option => option.label && option.value) || []"
42
+ :placeholder="props.placeholder"
43
+ :disabled="props.disabled"
44
+ :title="label"
45
+ :class="props.selectClass"
46
+ >
47
+ <template #default="{ value }">
48
+ {{ props.options?.find(option => option.value === value)?.label || props.placeholder }}
49
+ </template>
50
+ </Select>
51
+ </slot>
52
+ </div>
53
+ </label>
54
+ </template>
@@ -33,11 +33,15 @@ function removeItem(index: number) {
33
33
  <label class="flex flex-col gap-2">
34
34
  <div>
35
35
  <div class="flex items-center gap-1 text-sm font-medium">
36
- {{ props.label }}
36
+ <slot name="label">
37
+ {{ props.label }}
38
+ </slot>
37
39
  <span v-if="props.required !== false" class="text-red-500">*</span>
38
40
  </div>
39
41
  <div class="text-nowrap text-xs text-neutral-500 dark:text-neutral-400">
40
- {{ props.description }}
42
+ <slot name="description">
43
+ {{ props.description }}
44
+ </slot>
41
45
  </div>
42
46
  </div>
43
47
 
@@ -2,4 +2,5 @@ export { default as FieldCheckbox } from './FieldCheckbox.vue'
2
2
  export { default as FieldInput } from './FieldInput.vue'
3
3
  export { default as FieldKeyValues } from './FieldKeyValues.vue'
4
4
  export { default as FieldRange } from './FieldRange.vue'
5
+ export { default as FieldSelect } from './FieldSelect.vue'
5
6
  export { default as FieldValues } from './FieldValues.vue'
@@ -0,0 +1,43 @@
1
+ <script setup lang="ts">
2
+ import { useDebounce } from '@vueuse/core'
3
+ import { ref } from 'vue'
4
+
5
+ defineProps<{
6
+ accept?: string
7
+ multiple?: boolean
8
+ }>()
9
+
10
+ const files = defineModel<File[]>({ required: false, default: () => [] })
11
+ const firstFile = ref<File>()
12
+
13
+ const isDragging = ref(false)
14
+ const isDraggingDebounced = useDebounce(isDragging, 150)
15
+
16
+ function handleFileChange(e: Event) {
17
+ const input = e.target as HTMLInputElement
18
+
19
+ if (input.files && input.files.length > 0) {
20
+ firstFile.value = input.files[0]
21
+ }
22
+
23
+ files.value = Array.from(input.files || [])
24
+ isDragging.value = false
25
+ }
26
+ </script>
27
+
28
+ <template>
29
+ <label
30
+ relative cursor-pointer
31
+ @dragover="isDragging = true"
32
+ @dragleave="isDragging = false"
33
+ >
34
+ <input
35
+ type="file"
36
+ :accept="accept"
37
+ :multiple="multiple"
38
+ class="absolute inset-0 h-full w-full opacity-0"
39
+ @change="handleFileChange"
40
+ >
41
+ <slot :is-dragging="isDraggingDebounced" :first-file="firstFile" :files="files" />
42
+ </label>
43
+ </template>
@@ -3,7 +3,7 @@ const props = defineProps<{
3
3
  type?: string
4
4
  }>()
5
5
 
6
- const modelValue = defineModel<string>({ required: true })
6
+ const modelValue = defineModel<string>({ required: false })
7
7
  </script>
8
8
 
9
9
  <template>
@@ -1,3 +1,4 @@
1
+ export { default as BasicInputFile } from './BasicInputFile.vue'
1
2
  export { default as Input } from './Input.vue'
2
3
  export { default as InputFile } from './InputFile.vue'
3
4
  export { default as InputKeyValue } from './InputKeyValue.vue'
@@ -39,23 +39,23 @@ const colorValue = defineModel<string>('colorValue', {
39
39
  );
40
40
 
41
41
  &::-webkit-slider-thumb {
42
- --at-apply: w-1 h-12 appearance-none rounded-md bg-neutral-600 cursor-pointer shadow-lg border-2 border-neutral-500
43
- hover: bg-neutral-800 transition-colors duration-200;
42
+ --at-apply: w-1 h-12 hover:w-2 hover:h-13 appearance-none rounded-md bg-neutral-600 cursor-pointer shadow-lg border-2 border-neutral-500
43
+ hover: bg-neutral-800 transition-colors,transform,width,height duration-200 cursor-col-resize;
44
44
  }
45
45
 
46
46
  .dark &::-webkit-slider-thumb {
47
- --at-apply: w-1 h-12 appearance-none rounded-md bg-neutral-100 cursor-pointer shadow-md border-2 border-white
48
- hover: bg-neutral-300 transition-colors duration-200;
47
+ --at-apply: w-1 h-12 hover:w-2 hover:h-13 appearance-none rounded-md bg-neutral-100 cursor-pointer shadow-md border-2 border-white
48
+ hover: bg-neutral-300 transition-colors,transform,width,height duration-200 cursor-col-resize;
49
49
  }
50
50
 
51
51
  &::-moz-range-thumb {
52
- --at-apply: w-1 h-12 appearance-none rounded-md bg-neutral-600 cursor-pointer shadow-lg border-2 border-neutral-500
53
- hover: bg-neutral-800 transition-colors duration-200;
52
+ --at-apply: w-1 h-12 hover:w-2 hover:h-13 appearance-none rounded-md bg-neutral-600 cursor-pointer shadow-lg border-2 border-neutral-500
53
+ hover: bg-neutral-800 transition-colors,transform,width,height duration-200 cursor-col-resize;
54
54
  }
55
55
 
56
56
  .dark &::-moz-range-thumb {
57
- --at-apply: w-1 h-12 appearance-none rounded-md bg-neutral-100 cursor-pointer shadow-md border-2 border-white
58
- hover: bg-neutral-300 transition-colors duration-200;
57
+ --at-apply: w-1 h-12 hover:w-2 hover:h-13 appearance-none rounded-md bg-neutral-100 cursor-pointer shadow-md border-2 border-white
58
+ hover: bg-neutral-300 transition-colors,transform,width,height duration-200 cursor-col-resize;
59
59
  }
60
60
  }
61
61
  </style>
@@ -1,5 +1,5 @@
1
1
  <script setup lang="ts">
2
- import { computed, onMounted, ref } from 'vue'
2
+ import { computed, onMounted, ref, watch } from 'vue'
3
3
 
4
4
  const props = withDefaults(defineProps<{
5
5
  min?: number
@@ -19,7 +19,7 @@ const props = withDefaults(defineProps<{
19
19
  trackValueColor: 'red',
20
20
  })
21
21
 
22
- const modelValue = defineModel<number>('modelValue', { required: true })
22
+ const modelValue = defineModel<number>({ required: true })
23
23
 
24
24
  const scaledMin = computed(() => props.min * 10000)
25
25
  const scaledMax = computed(() => props.max * 10000)
@@ -34,15 +34,16 @@ const sliderValue = computed({
34
34
  },
35
35
  })
36
36
 
37
- onMounted(() => {
38
- updateTrackColor()
39
- })
37
+ onMounted(() => updateTrackColor())
38
+ watch(sliderValue, () => updateTrackColor(), { immediate: true })
39
+ watch([scaledMin, scaledMax, scaledStep], () => updateTrackColor(), { immediate: true })
40
40
 
41
41
  function updateTrackColor() {
42
- if (!sliderRef.value)
42
+ if (!sliderRef.value) {
43
43
  return
44
+ }
44
45
 
45
- sliderRef.value.style.setProperty('--value', sliderRef.value.value)
46
+ sliderRef.value.style.setProperty('--value', sliderValue.value.toString())
46
47
  sliderRef.value.style.setProperty('--min', !sliderRef.value.min ? props.min.toString() : sliderRef.value.min)
47
48
  sliderRef.value.style.setProperty('--max', !sliderRef.value.max ? props.max.toString() : sliderRef.value.max)
48
49
  }
@@ -83,17 +84,17 @@ https://toughengineer.github.io/demo/slider-styler*/
83
84
  --thumb-box-shadow: 0 0 0px #e6e6e6;
84
85
  --thumb-border: none;
85
86
  --thumb-border-radius: 999px;
86
- --thumb-background: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
87
- --thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
88
- --thumb-background-active: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
87
+ --thumb-background: oklch(80% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
88
+ --thumb-background-hover: oklch(90% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
89
+ --thumb-background-active: oklch(70% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
89
90
 
90
91
  --track-height: calc(var(--height) - var(--track-value-padding) * 2);
91
92
  --track-box-shadow: none;
92
93
  --track-border: solid 2px rgb(238, 238, 238);
93
94
  --track-border-radius: 6px;
94
- --track-background: rgb(238, 238, 238);
95
- --track-background-hover: rgb(238, 238, 238);
96
- --track-background-active: rgb(238, 238, 238);
95
+ --track-background: rgba(238, 238, 238, 0.6);
96
+ --track-background-hover: rgba(238, 238, 238, 0.6);
97
+ --track-background-active: rgba(238, 238, 238, 0.6);
97
98
 
98
99
  --track-value-background: rgb(255, 255, 255);
99
100
  --track-value-background-hover: rgb(255, 255, 255);
@@ -102,14 +103,14 @@ https://toughengineer.github.io/demo/slider-styler*/
102
103
  }
103
104
 
104
105
  .dark .form_input-range {
105
- --thumb-background: oklch(70% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
106
- --thumb-background-hover: oklch(90% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
107
- --thumb-background-active: oklch(80% var(--theme-colors-chroma-200) calc(var(--theme-colors-hue) + 0));
106
+ --thumb-background: oklch(70% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
107
+ --thumb-background-hover: oklch(90% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
108
+ --thumb-background-active: oklch(80% var(--chromatic-chroma-200) calc(var(--chromatic-hue) + 0));
108
109
 
109
110
  --track-border: solid 2px rgb(44, 44, 44);
110
- --track-background: rgb(44, 44, 44);
111
- --track-background-hover: rgb(44, 44, 44);
112
- --track-background-active: rgb(44, 44, 44);
111
+ --track-background: rgba(44, 44, 44, 0.7);
112
+ --track-background-hover: rgba(44, 44, 44, 0.7);
113
+ --track-background-active: rgba(44, 44, 44, 0.7);
113
114
 
114
115
  --track-value-background: rgb(164, 164, 164);
115
116
  --track-value-background-hover: rgb(164, 164, 164);
@@ -143,7 +144,8 @@ https://toughengineer.github.io/demo/slider-styler*/
143
144
  background 0.2s ease-in-out,
144
145
  box-shadow 0.2s ease-in-out,
145
146
  border-color 0.2s ease-in-out,
146
- transform 0.2s ease-in-out;
147
+ transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
148
+ width 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
147
149
  }
148
150
 
149
151
  .form_input-range::-webkit-slider-runnable-track {
@@ -151,6 +153,7 @@ https://toughengineer.github.io/demo/slider-styler*/
151
153
  border: var(--track-border);
152
154
  border-radius: var(--track-border-radius);
153
155
  background: var(--track-background);
156
+ backdrop-filter: blur(8px);
154
157
  box-shadow: var(--track-box-shadow);
155
158
  position: relative;
156
159
  cursor: col-resize;
@@ -161,6 +164,9 @@ https://toughengineer.github.io/demo/slider-styler*/
161
164
 
162
165
  .form_input-range::-webkit-slider-thumb:hover {
163
166
  background: var(--thumb-background-hover);
167
+
168
+ width: calc(var(--thumb-width) * 1.6);
169
+ transform: scaleY(1.2);
164
170
  }
165
171
 
166
172
  .form_input-range:hover::-webkit-slider-runnable-track {
@@ -207,6 +213,12 @@ https://toughengineer.github.io/demo/slider-styler*/
207
213
  box-shadow: var(--thumb-box-shadow);
208
214
  cursor: col-resize;
209
215
  margin-left: calc(0 - var(--track-value-padding));
216
+ transition:
217
+ background 0.2s ease-in-out,
218
+ box-shadow 0.2s ease-in-out,
219
+ border-color 0.2s ease-in-out,
220
+ transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
221
+ width 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
210
222
  }
211
223
 
212
224
  .form_input-range::-moz-range-track {
@@ -214,6 +226,7 @@ https://toughengineer.github.io/demo/slider-styler*/
214
226
  border: var(--track-border);
215
227
  border-radius: var(--track-border-radius);
216
228
  background: var(--track-background);
229
+ backdrop-filter: blur(8px);
217
230
  box-shadow: var(--track-box-shadow);
218
231
  cursor: col-resize;
219
232
  /* Trim left and right paddings of track */
@@ -222,6 +235,9 @@ https://toughengineer.github.io/demo/slider-styler*/
222
235
 
223
236
  .form_input-range::-moz-range-thumb:hover {
224
237
  background: var(--thumb-background-hover);
238
+
239
+ width: calc(var(--thumb-width) * 1.6);
240
+ transform: scaleY(1.2);
225
241
  }
226
242
 
227
243
  .form_input-range:hover::-moz-range-track {
@@ -280,12 +296,20 @@ https://toughengineer.github.io/demo/slider-styler*/
280
296
  margin-left: calc(0 - var(--track-value-padding));
281
297
  box-sizing: border-box;
282
298
  cursor: col-resize;
299
+
300
+ transition:
301
+ background 0.2s ease-in-out,
302
+ box-shadow 0.2s ease-in-out,
303
+ border-color 0.2s ease-in-out,
304
+ transform 0.2s cubic-bezier(0.165, 0.84, 0.44, 1),
305
+ width 0.2s cubic-bezier(0.165, 0.84, 0.44, 1);
283
306
  }
284
307
 
285
308
  .form_input-range::-ms-track {
286
309
  height: var(--track-height);
287
310
  border-radius: var(--track-border-radius);
288
311
  background: var(--track-background);
312
+ backdrop-filter: blur(8px);
289
313
  border: var(--track-border);
290
314
  box-shadow: var(--track-box-shadow);
291
315
  box-sizing: border-box;
@@ -294,6 +318,9 @@ https://toughengineer.github.io/demo/slider-styler*/
294
318
 
295
319
  .form_input-range::-ms-thumb:hover {
296
320
  background: var(--thumb-background-hover);
321
+
322
+ width: calc(var(--thumb-width) * 1.6);
323
+ transform: scaleY(1.2);
297
324
  }
298
325
 
299
326
  .form_input-range:hover::-ms-track {