@onereach/ui-components 10.4.5-beta.4384.0 → 10.4.5-beta.4387.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/bundled/v2/components/OrRatingV3/OrRating.js +15 -8
- package/dist/bundled/v2/components/OrRatingV3/OrRating.vue.d.ts +24 -0
- package/dist/bundled/v2/components/OrRatingV3/index.d.ts +1 -0
- package/dist/bundled/v2/components/OrRatingV3/index.js +1 -0
- package/dist/bundled/v2/components/OrRatingV3/styles.d.ts +2 -0
- package/dist/bundled/v2/components/OrRatingV3/styles.js +1 -18
- package/dist/bundled/v2/components/OrRatingV3/types.d.ts +4 -0
- package/dist/bundled/v2/components/index.js +1 -0
- package/dist/bundled/v2/index.js +1 -0
- package/dist/bundled/v2/styles-df8f7e15.js +30 -0
- package/dist/bundled/v3/components/OrRatingV3/OrRating.js +1 -1
- package/dist/bundled/v3/components/OrRatingV3/OrRating.vue.d.ts +20 -0
- package/dist/bundled/v3/components/OrRatingV3/index.d.ts +1 -0
- package/dist/bundled/v3/components/OrRatingV3/index.js +1 -1
- package/dist/bundled/v3/components/OrRatingV3/styles.d.ts +2 -0
- package/dist/bundled/v3/components/OrRatingV3/styles.js +1 -1
- package/dist/bundled/v3/components/OrRatingV3/types.d.ts +4 -0
- package/dist/bundled/v3/components/{OrRatingV3-82a538ca.js → OrRatingV3-7ee136ba.js} +29 -10
- package/dist/bundled/v3/components/index.js +1 -1
- package/dist/bundled/v3/index.js +1 -1
- package/dist/esm/v2/{OrRating-aa2365e9.js → OrRating-41ca0941.js} +29 -10
- package/dist/esm/v2/components/index.js +1 -1
- package/dist/esm/v2/components/or-rating-v3/OrRating.vue.d.ts +24 -0
- package/dist/esm/v2/components/or-rating-v3/index.d.ts +1 -0
- package/dist/esm/v2/components/or-rating-v3/index.js +1 -1
- package/dist/esm/v2/components/or-rating-v3/styles.d.ts +2 -0
- package/dist/esm/v2/components/or-rating-v3/types.d.ts +4 -0
- package/dist/esm/v2/index.js +1 -1
- package/dist/esm/v3/{OrRating-2abf71bd.js → OrRating-b9118e0e.js} +29 -10
- package/dist/esm/v3/components/index.js +1 -1
- package/dist/esm/v3/components/or-rating-v3/OrRating.vue.d.ts +20 -0
- package/dist/esm/v3/components/or-rating-v3/index.d.ts +1 -0
- package/dist/esm/v3/components/or-rating-v3/index.js +1 -1
- package/dist/esm/v3/components/or-rating-v3/styles.d.ts +2 -0
- package/dist/esm/v3/components/or-rating-v3/types.d.ts +4 -0
- package/dist/esm/v3/index.js +1 -1
- package/package.json +2 -2
- package/src/components/or-rating-v3/OrRating.vue +22 -10
- package/src/components/or-rating-v3/index.ts +1 -0
- package/src/components/or-rating-v3/styles.ts +14 -3
- package/src/components/or-rating-v3/types.ts +4 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
import { Rating, RatingStar } from '
|
|
1
|
+
import { defineComponent, ref, computed, inject, toRef, watch, reactive } from 'vue-demi';
|
|
2
|
+
import { R as RatingVariant, a as Rating, b as RatingVariants, c as RatingStar } from '../../styles-df8f7e15.js';
|
|
3
3
|
import __vue_component__$1 from '../OrIconV3/OrIcon.js';
|
|
4
4
|
import { useProxyModelValue } from '../../hooks/useProxyModelValue.js';
|
|
5
5
|
import { n as normalizeComponent } from '../../normalize-component-6e8e3d80.js';
|
|
@@ -19,6 +19,14 @@ var script = defineComponent({
|
|
|
19
19
|
type: Number,
|
|
20
20
|
default: 0
|
|
21
21
|
},
|
|
22
|
+
variant: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: () => RatingVariant.Default
|
|
25
|
+
},
|
|
26
|
+
readonly: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
22
30
|
disabled: {
|
|
23
31
|
type: Boolean,
|
|
24
32
|
default: false
|
|
@@ -27,13 +35,12 @@ var script = defineComponent({
|
|
|
27
35
|
emits: ['update:modelValue'],
|
|
28
36
|
expose: ['root'],
|
|
29
37
|
setup(props, context) {
|
|
38
|
+
// Refs & Styles
|
|
39
|
+
const root = ref();
|
|
40
|
+
const rootStyles = computed(() => ['or-rating-v3', ...Rating, ...RatingVariants[props.variant]]);
|
|
41
|
+
const starStyles = computed(() => [...RatingStar, ...(props.readonly ? ['interactivity-none'] : [])]);
|
|
30
42
|
// Options
|
|
31
43
|
const length = inject(RATING_LENGTH, 5);
|
|
32
|
-
// Refs
|
|
33
|
-
const root = ref();
|
|
34
|
-
// Styles
|
|
35
|
-
const rootStyles = computed(() => ['or-rating-v3', ...Rating]);
|
|
36
|
-
const starStyles = computed(() => [...RatingStar]);
|
|
37
44
|
// State
|
|
38
45
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
39
46
|
const draftModelValue = ref(proxyModelValue.value);
|
|
@@ -113,7 +120,7 @@ var __vue_render__ = function () {
|
|
|
113
120
|
attrs: {
|
|
114
121
|
"icon": _vm.draftModelValue - value + 1 === 0.5 ? 'star_half' : 'star',
|
|
115
122
|
"variant": value <= _vm.draftModelValue ? 'filled' : 'outlined',
|
|
116
|
-
"size": _vm.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
123
|
+
"size": _vm.variant === 'fitted' ? 'inherit' : _vm.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
117
124
|
}
|
|
118
125
|
})], 1);
|
|
119
126
|
}), 0);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { RatingVariant } from './types';
|
|
1
3
|
export declare const RATING_LENGTH: unique symbol;
|
|
2
4
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
3
5
|
length: number;
|
|
@@ -15,6 +17,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
15
17
|
type: NumberConstructor;
|
|
16
18
|
default: number;
|
|
17
19
|
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: PropType<"default" | "fitted">;
|
|
22
|
+
default: () => RatingVariant.Default;
|
|
23
|
+
};
|
|
24
|
+
readonly: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
18
28
|
disabled: {
|
|
19
29
|
type: BooleanConstructor;
|
|
20
30
|
default: boolean;
|
|
@@ -24,12 +34,22 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
24
34
|
type: NumberConstructor;
|
|
25
35
|
default: number;
|
|
26
36
|
};
|
|
37
|
+
variant: {
|
|
38
|
+
type: PropType<"default" | "fitted">;
|
|
39
|
+
default: () => RatingVariant.Default;
|
|
40
|
+
};
|
|
41
|
+
readonly: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
27
45
|
disabled: {
|
|
28
46
|
type: BooleanConstructor;
|
|
29
47
|
default: boolean;
|
|
30
48
|
};
|
|
31
49
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
32
50
|
modelValue: number;
|
|
51
|
+
variant: "default" | "fitted";
|
|
52
|
+
readonly: boolean;
|
|
33
53
|
disabled: boolean;
|
|
34
54
|
} & {} & {
|
|
35
55
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -46,11 +66,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
46
66
|
onMouseLeave: (event: MouseEvent, index: number) => void;
|
|
47
67
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
48
68
|
modelValue: number;
|
|
69
|
+
variant: "default" | "fitted";
|
|
70
|
+
readonly: boolean;
|
|
49
71
|
disabled: boolean;
|
|
50
72
|
} & {} & {
|
|
51
73
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
52
74
|
}, {
|
|
53
75
|
modelValue: number;
|
|
76
|
+
variant: "default" | "fitted";
|
|
77
|
+
readonly: boolean;
|
|
54
78
|
disabled: boolean;
|
|
55
79
|
}, true>);
|
|
56
80
|
export default _default;
|
|
@@ -1,18 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// Layout
|
|
3
|
-
'layout-row',
|
|
4
|
-
// Theme
|
|
5
|
-
'theme-foreground-disabled', 'dark:theme-foreground-disabled-dark'];
|
|
6
|
-
const RatingStar = [
|
|
7
|
-
// Layout
|
|
8
|
-
'layout-row justify-center',
|
|
9
|
-
// Interactivity
|
|
10
|
-
'interactivity-click',
|
|
11
|
-
// Box
|
|
12
|
-
'w-[28px] md:w-[24px]', 'h-[28px] md:h-[24px]',
|
|
13
|
-
// Theme (activated)
|
|
14
|
-
'activated:text-warning-hover', 'dark:activated:text-warning-hover-dark',
|
|
15
|
-
// Theme (disabled)
|
|
16
|
-
'disabled:text-disabled', 'dark:disabled:text-disabled-dark'];
|
|
17
|
-
|
|
18
|
-
export { Rating, RatingStar };
|
|
1
|
+
export { a as Rating, c as RatingStar, b as RatingVariants } from '../../styles-df8f7e15.js';
|
|
@@ -136,6 +136,7 @@ export { default as OrRadioGroupV3 } from './OrRadioGroupV3/OrRadioGroup.js';
|
|
|
136
136
|
export { default as OrRadioV3 } from './OrRadioV3/OrRadio.js';
|
|
137
137
|
export { default as OrRangeSliderV3 } from './OrRangeSliderV3/OrRangeSlider.js';
|
|
138
138
|
export { default as OrRatingV3 } from './OrRatingV3/OrRating.js';
|
|
139
|
+
export { R as RatingVariant } from '../styles-df8f7e15.js';
|
|
139
140
|
export { default as OrResizeablePanelV3 } from './OrResizeablePanelV3/OrResizeablePanel.js';
|
|
140
141
|
export { ResizeablePanelPadding, ResizeablePanelPlacement } from './OrResizeablePanelV3/props.js';
|
|
141
142
|
export { default as OrRichTextEditorV3 } from './OrRichTextEditorV3/OrRichTextEditor.js';
|
package/dist/bundled/v2/index.js
CHANGED
|
@@ -172,6 +172,7 @@ export { default as OrProgress } from './components/OrProgress/OrProgress.js';
|
|
|
172
172
|
export { OrProgressColors, OrProgressTypes } from './components/OrProgress/constants.js';
|
|
173
173
|
export { ProgressColor, ProgressType } from './components/OrProgressV3/props.js';
|
|
174
174
|
export { default as OrRadioV3 } from './components/OrRadioV3/OrRadio.js';
|
|
175
|
+
export { R as RatingVariant } from './styles-df8f7e15.js';
|
|
175
176
|
export { default as OrResizeablePanelV3 } from './components/OrResizeablePanelV3/OrResizeablePanel.js';
|
|
176
177
|
export { ResizeablePanelPadding, ResizeablePanelPlacement } from './components/OrResizeablePanelV3/props.js';
|
|
177
178
|
export { Formats } from './components/OrRichTextEditorV3/props.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var RatingVariant;
|
|
2
|
+
(function (RatingVariant) {
|
|
3
|
+
RatingVariant["Default"] = "default";
|
|
4
|
+
RatingVariant["Fitted"] = "fitted";
|
|
5
|
+
})(RatingVariant || (RatingVariant = {}));
|
|
6
|
+
|
|
7
|
+
const Rating = [
|
|
8
|
+
// Theme
|
|
9
|
+
'theme-foreground-disabled', 'dark:theme-foreground-disabled-dark'];
|
|
10
|
+
const RatingVariants = {
|
|
11
|
+
[RatingVariant.Default]: [
|
|
12
|
+
// Layout
|
|
13
|
+
'layout-row'],
|
|
14
|
+
[RatingVariant.Fitted]: [
|
|
15
|
+
// Layout
|
|
16
|
+
'layout-row justify-between']
|
|
17
|
+
};
|
|
18
|
+
const RatingStar = [
|
|
19
|
+
// Layout
|
|
20
|
+
'layout-row justify-center',
|
|
21
|
+
// Interactivity
|
|
22
|
+
'interactivity-click',
|
|
23
|
+
// Box
|
|
24
|
+
'w-[28px] md:w-[24px]', 'h-[28px] md:h-[24px]',
|
|
25
|
+
// Theme (activated)
|
|
26
|
+
'activated:text-warning-hover', 'dark:activated:text-warning-hover-dark',
|
|
27
|
+
// Theme (disabled)
|
|
28
|
+
'disabled:text-disabled', 'dark:disabled:text-disabled-dark'];
|
|
29
|
+
|
|
30
|
+
export { RatingVariant as R, Rating as a, RatingVariants as b, RatingStar as c };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { d as RATING_LENGTH, s as default } from '../OrRatingV3-7ee136ba.js';
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { RatingVariant } from './types';
|
|
1
3
|
export declare const RATING_LENGTH: unique symbol;
|
|
2
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
5
|
modelValue: {
|
|
4
6
|
type: NumberConstructor;
|
|
5
7
|
default: number;
|
|
6
8
|
};
|
|
9
|
+
variant: {
|
|
10
|
+
type: PropType<"default" | "fitted">;
|
|
11
|
+
default: () => RatingVariant;
|
|
12
|
+
};
|
|
13
|
+
readonly: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
7
17
|
disabled: {
|
|
8
18
|
type: BooleanConstructor;
|
|
9
19
|
default: boolean;
|
|
@@ -24,6 +34,14 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
24
34
|
type: NumberConstructor;
|
|
25
35
|
default: number;
|
|
26
36
|
};
|
|
37
|
+
variant: {
|
|
38
|
+
type: PropType<"default" | "fitted">;
|
|
39
|
+
default: () => RatingVariant;
|
|
40
|
+
};
|
|
41
|
+
readonly: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
27
45
|
disabled: {
|
|
28
46
|
type: BooleanConstructor;
|
|
29
47
|
default: boolean;
|
|
@@ -32,6 +50,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
32
50
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
51
|
}, {
|
|
34
52
|
modelValue: number;
|
|
53
|
+
variant: "default" | "fitted";
|
|
54
|
+
readonly: boolean;
|
|
35
55
|
disabled: boolean;
|
|
36
56
|
}>;
|
|
37
57
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as OrRatingV3 } from '../OrRatingV3-
|
|
1
|
+
export { s as OrRatingV3, R as RatingVariant } from '../OrRatingV3-7ee136ba.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as Rating, c as RatingStar, b as RatingVariants } from '../OrRatingV3-7ee136ba.js';
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createVNode } from 'vue';
|
|
2
|
-
import { defineComponent,
|
|
2
|
+
import { defineComponent, ref, computed, inject, toRef, watch, reactive } from 'vue-demi';
|
|
3
3
|
import { s as script$1 } from './OrIconV3-34670800.js';
|
|
4
4
|
import { useProxyModelValue } from '../hooks/useProxyModelValue.js';
|
|
5
5
|
|
|
6
|
+
var RatingVariant;
|
|
7
|
+
(function (RatingVariant) {
|
|
8
|
+
RatingVariant["Default"] = "default";
|
|
9
|
+
RatingVariant["Fitted"] = "fitted";
|
|
10
|
+
})(RatingVariant || (RatingVariant = {}));
|
|
11
|
+
|
|
6
12
|
const Rating = [
|
|
7
|
-
// Layout
|
|
8
|
-
'layout-row',
|
|
9
13
|
// Theme
|
|
10
14
|
'theme-foreground-disabled', 'dark:theme-foreground-disabled-dark'];
|
|
15
|
+
const RatingVariants = {
|
|
16
|
+
[RatingVariant.Default]: [
|
|
17
|
+
// Layout
|
|
18
|
+
'layout-row'],
|
|
19
|
+
[RatingVariant.Fitted]: [
|
|
20
|
+
// Layout
|
|
21
|
+
'layout-row justify-between']
|
|
22
|
+
};
|
|
11
23
|
const RatingStar = [
|
|
12
24
|
// Layout
|
|
13
25
|
'layout-row justify-center',
|
|
@@ -35,6 +47,14 @@ var script = defineComponent({
|
|
|
35
47
|
type: Number,
|
|
36
48
|
default: 0
|
|
37
49
|
},
|
|
50
|
+
variant: {
|
|
51
|
+
type: String,
|
|
52
|
+
default: () => RatingVariant.Default
|
|
53
|
+
},
|
|
54
|
+
readonly: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
38
58
|
disabled: {
|
|
39
59
|
type: Boolean,
|
|
40
60
|
default: false
|
|
@@ -43,13 +63,12 @@ var script = defineComponent({
|
|
|
43
63
|
emits: ['update:modelValue'],
|
|
44
64
|
expose: ['root'],
|
|
45
65
|
setup(props, context) {
|
|
66
|
+
// Refs & Styles
|
|
67
|
+
const root = ref();
|
|
68
|
+
const rootStyles = computed(() => ['or-rating-v3', ...Rating, ...RatingVariants[props.variant]]);
|
|
69
|
+
const starStyles = computed(() => [...RatingStar, ...(props.readonly ? ['interactivity-none'] : [])]);
|
|
46
70
|
// Options
|
|
47
71
|
const length = inject(RATING_LENGTH, 5);
|
|
48
|
-
// Refs
|
|
49
|
-
const root = ref();
|
|
50
|
-
// Styles
|
|
51
|
-
const rootStyles = computed(() => ['or-rating-v3', ...Rating]);
|
|
52
|
-
const starStyles = computed(() => [...RatingStar]);
|
|
53
72
|
// State
|
|
54
73
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
55
74
|
const draftModelValue = ref(proxyModelValue.value);
|
|
@@ -112,7 +131,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
112
131
|
}, [createVNode(_component_OrIcon, {
|
|
113
132
|
icon: _ctx.draftModelValue - value + 1 === 0.5 ? 'star_half' : 'star',
|
|
114
133
|
variant: value <= _ctx.draftModelValue ? 'filled' : 'outlined',
|
|
115
|
-
size: _ctx.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
134
|
+
size: _ctx.variant === 'fitted' ? 'inherit' : _ctx.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
116
135
|
}, null, 8 /* PROPS */, ["icon", "variant", "size"])], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_2);
|
|
117
136
|
}), 128 /* KEYED_FRAGMENT */))], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
118
137
|
}
|
|
@@ -120,4 +139,4 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
120
139
|
script.render = render;
|
|
121
140
|
script.__file = "src/components/or-rating-v3/OrRating.vue";
|
|
122
141
|
|
|
123
|
-
export {
|
|
142
|
+
export { RatingVariant as R, Rating as a, RatingVariants as b, RatingStar as c, RATING_LENGTH as d, script as s };
|
|
@@ -81,7 +81,7 @@ export { default as OrRadioGroup } from './OrRadioGroup/OrRadioGroup.js';
|
|
|
81
81
|
export { default as OrRadioGroupV3 } from './OrRadioGroupV3/OrRadioGroup.js';
|
|
82
82
|
export { s as OrRadioV3 } from './OrRadioV3-6c7ebd3d.js';
|
|
83
83
|
export { s as OrRangeSliderV3 } from './OrRangeSliderV3-e498c9db.js';
|
|
84
|
-
export { s as OrRatingV3 } from './OrRatingV3-
|
|
84
|
+
export { s as OrRatingV3, R as RatingVariant } from './OrRatingV3-7ee136ba.js';
|
|
85
85
|
export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from './OrResizeablePanelV3-8f104a35.js';
|
|
86
86
|
export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditorV3-5c205c36.js';
|
|
87
87
|
export { default as OrSearch } from './OrSearch/OrSearch.js';
|
package/dist/bundled/v3/index.js
CHANGED
|
@@ -44,7 +44,7 @@ export { s as OrRadio } from './components/OrRadio-29377a46.js';
|
|
|
44
44
|
export { default as OrRadioGroup } from './components/OrRadioGroup/OrRadioGroup.js';
|
|
45
45
|
export { default as OrRadioGroupV3 } from './components/OrRadioGroupV3/OrRadioGroup.js';
|
|
46
46
|
export { s as OrRangeSliderV3 } from './components/OrRangeSliderV3-e498c9db.js';
|
|
47
|
-
export { s as OrRatingV3 } from './components/OrRatingV3-
|
|
47
|
+
export { s as OrRatingV3, R as RatingVariant } from './components/OrRatingV3-7ee136ba.js';
|
|
48
48
|
export { F as Formats, s as OrRichTextEditorV3 } from './components/OrRichTextEditorV3-5c205c36.js';
|
|
49
49
|
export { s as OrSegmentedControlV3, S as SegmentedControlSize } from './components/OrSegmentedControlV3-bedef411.js';
|
|
50
50
|
export { s as OrSelect } from './components/OrSelect-f6c1a560.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, inject, toRef, watch, reactive } from 'vue-demi';
|
|
2
2
|
import './dom-53c9635b.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
@@ -8,11 +8,23 @@ import './TimeFormat-a7f5565b.js';
|
|
|
8
8
|
import { _ as __vue_component__$1 } from './OrIcon-03e3c802.js';
|
|
9
9
|
import { n as normalizeComponent } from './normalize-component-6e8e3d80.js';
|
|
10
10
|
|
|
11
|
+
var RatingVariant;
|
|
12
|
+
(function (RatingVariant) {
|
|
13
|
+
RatingVariant["Default"] = "default";
|
|
14
|
+
RatingVariant["Fitted"] = "fitted";
|
|
15
|
+
})(RatingVariant || (RatingVariant = {}));
|
|
16
|
+
|
|
11
17
|
const Rating = [
|
|
12
|
-
// Layout
|
|
13
|
-
'layout-row',
|
|
14
18
|
// Theme
|
|
15
19
|
'theme-foreground-disabled', 'dark:theme-foreground-disabled-dark'];
|
|
20
|
+
const RatingVariants = {
|
|
21
|
+
[RatingVariant.Default]: [
|
|
22
|
+
// Layout
|
|
23
|
+
'layout-row'],
|
|
24
|
+
[RatingVariant.Fitted]: [
|
|
25
|
+
// Layout
|
|
26
|
+
'layout-row justify-between']
|
|
27
|
+
};
|
|
16
28
|
const RatingStar = [
|
|
17
29
|
// Layout
|
|
18
30
|
'layout-row justify-center',
|
|
@@ -40,6 +52,14 @@ var script = defineComponent({
|
|
|
40
52
|
type: Number,
|
|
41
53
|
default: 0
|
|
42
54
|
},
|
|
55
|
+
variant: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: () => RatingVariant.Default
|
|
58
|
+
},
|
|
59
|
+
readonly: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
43
63
|
disabled: {
|
|
44
64
|
type: Boolean,
|
|
45
65
|
default: false
|
|
@@ -48,13 +68,12 @@ var script = defineComponent({
|
|
|
48
68
|
emits: ['update:modelValue'],
|
|
49
69
|
expose: ['root'],
|
|
50
70
|
setup(props, context) {
|
|
71
|
+
// Refs & Styles
|
|
72
|
+
const root = ref();
|
|
73
|
+
const rootStyles = computed(() => ['or-rating-v3', ...Rating, ...RatingVariants[props.variant]]);
|
|
74
|
+
const starStyles = computed(() => [...RatingStar, ...(props.readonly ? ['interactivity-none'] : [])]);
|
|
51
75
|
// Options
|
|
52
76
|
const length = inject(RATING_LENGTH, 5);
|
|
53
|
-
// Refs
|
|
54
|
-
const root = ref();
|
|
55
|
-
// Styles
|
|
56
|
-
const rootStyles = computed(() => ['or-rating-v3', ...Rating]);
|
|
57
|
-
const starStyles = computed(() => [...RatingStar]);
|
|
58
77
|
// State
|
|
59
78
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
60
79
|
const draftModelValue = ref(proxyModelValue.value);
|
|
@@ -134,7 +153,7 @@ var __vue_render__ = function () {
|
|
|
134
153
|
attrs: {
|
|
135
154
|
"icon": _vm.draftModelValue - value + 1 === 0.5 ? 'star_half' : 'star',
|
|
136
155
|
"variant": value <= _vm.draftModelValue ? 'filled' : 'outlined',
|
|
137
|
-
"size": _vm.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
156
|
+
"size": _vm.variant === 'fitted' ? 'inherit' : _vm.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
138
157
|
}
|
|
139
158
|
})], 1);
|
|
140
159
|
}), 0);
|
|
@@ -160,4 +179,4 @@ const __vue_component__ = /*#__PURE__*/normalizeComponent({
|
|
|
160
179
|
staticRenderFns: __vue_staticRenderFns__
|
|
161
180
|
}, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, false, undefined, undefined, undefined);
|
|
162
181
|
|
|
163
|
-
export { __vue_component__ as _ };
|
|
182
|
+
export { RatingVariant as R, __vue_component__ as _ };
|
|
@@ -100,7 +100,7 @@ export { _ as OrRadioGroup } from '../OrRadioGroup-11424644.js';
|
|
|
100
100
|
export { _ as OrRadioGroupV3 } from '../OrRadioGroup-8bb28757.js';
|
|
101
101
|
export { _ as OrRadioV3 } from '../OrRadio-d6e78d8b.js';
|
|
102
102
|
export { _ as OrRangeSliderV3 } from '../OrRangeSlider-95670fdf.js';
|
|
103
|
-
export { _ as OrRatingV3 } from '../OrRating-
|
|
103
|
+
export { _ as OrRatingV3, R as RatingVariant } from '../OrRating-41ca0941.js';
|
|
104
104
|
export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from '../OrResizeablePanel-b0cc4d2b.js';
|
|
105
105
|
export { F as Formats, _ as OrRichTextEditorV3 } from '../OrRichTextEditor-8c51a0ae.js';
|
|
106
106
|
export { _ as OrSearch } from '../OrSearch-3f55fbee.js';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { RatingVariant } from './types';
|
|
1
3
|
export declare const RATING_LENGTH: unique symbol;
|
|
2
4
|
declare const _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
|
|
3
5
|
length: number;
|
|
@@ -15,6 +17,14 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
15
17
|
type: NumberConstructor;
|
|
16
18
|
default: number;
|
|
17
19
|
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: PropType<"default" | "fitted">;
|
|
22
|
+
default: () => RatingVariant.Default;
|
|
23
|
+
};
|
|
24
|
+
readonly: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: boolean;
|
|
27
|
+
};
|
|
18
28
|
disabled: {
|
|
19
29
|
type: BooleanConstructor;
|
|
20
30
|
default: boolean;
|
|
@@ -24,12 +34,22 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
24
34
|
type: NumberConstructor;
|
|
25
35
|
default: number;
|
|
26
36
|
};
|
|
37
|
+
variant: {
|
|
38
|
+
type: PropType<"default" | "fitted">;
|
|
39
|
+
default: () => RatingVariant.Default;
|
|
40
|
+
};
|
|
41
|
+
readonly: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
27
45
|
disabled: {
|
|
28
46
|
type: BooleanConstructor;
|
|
29
47
|
default: boolean;
|
|
30
48
|
};
|
|
31
49
|
}>> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
|
|
32
50
|
modelValue: number;
|
|
51
|
+
variant: "default" | "fitted";
|
|
52
|
+
readonly: boolean;
|
|
33
53
|
disabled: boolean;
|
|
34
54
|
} & {} & {
|
|
35
55
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
@@ -46,11 +66,15 @@ declare const _default: import("vue").ComponentOptions<import("vue").default, im
|
|
|
46
66
|
onMouseLeave: (event: MouseEvent, index: number) => void;
|
|
47
67
|
}>, import("@vue/composition-api").Data, {}, {}, {}, {}, string[], {
|
|
48
68
|
modelValue: number;
|
|
69
|
+
variant: "default" | "fitted";
|
|
70
|
+
readonly: boolean;
|
|
49
71
|
disabled: boolean;
|
|
50
72
|
} & {} & {
|
|
51
73
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
52
74
|
}, {
|
|
53
75
|
modelValue: number;
|
|
76
|
+
variant: "default" | "fitted";
|
|
77
|
+
readonly: boolean;
|
|
54
78
|
disabled: boolean;
|
|
55
79
|
}, true>);
|
|
56
80
|
export default _default;
|
package/dist/esm/v2/index.js
CHANGED
|
@@ -100,7 +100,7 @@ export { _ as OrRadioGroup } from './OrRadioGroup-11424644.js';
|
|
|
100
100
|
export { _ as OrRadioGroupV3 } from './OrRadioGroup-8bb28757.js';
|
|
101
101
|
export { _ as OrRadioV3 } from './OrRadio-d6e78d8b.js';
|
|
102
102
|
export { _ as OrRangeSliderV3 } from './OrRangeSlider-95670fdf.js';
|
|
103
|
-
export { _ as OrRatingV3 } from './OrRating-
|
|
103
|
+
export { _ as OrRatingV3, R as RatingVariant } from './OrRating-41ca0941.js';
|
|
104
104
|
export { _ as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from './OrResizeablePanel-b0cc4d2b.js';
|
|
105
105
|
export { F as Formats, _ as OrRichTextEditorV3 } from './OrRichTextEditor-8c51a0ae.js';
|
|
106
106
|
export { _ as OrSearch } from './OrSearch-3f55fbee.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent,
|
|
1
|
+
import { defineComponent, ref, computed, inject, toRef, watch, reactive } from 'vue-demi';
|
|
2
2
|
import './dom-53c9635b.js';
|
|
3
3
|
import '@vueuse/core';
|
|
4
4
|
import { u as useProxyModelValue } from './useProxyModelValue-940010d2.js';
|
|
@@ -8,11 +8,23 @@ import './TimeFormat-a7f5565b.js';
|
|
|
8
8
|
import { s as script$1 } from './OrIcon-c446d072.js';
|
|
9
9
|
import { resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createVNode } from 'vue';
|
|
10
10
|
|
|
11
|
+
var RatingVariant;
|
|
12
|
+
(function (RatingVariant) {
|
|
13
|
+
RatingVariant["Default"] = "default";
|
|
14
|
+
RatingVariant["Fitted"] = "fitted";
|
|
15
|
+
})(RatingVariant || (RatingVariant = {}));
|
|
16
|
+
|
|
11
17
|
const Rating = [
|
|
12
|
-
// Layout
|
|
13
|
-
'layout-row',
|
|
14
18
|
// Theme
|
|
15
19
|
'theme-foreground-disabled', 'dark:theme-foreground-disabled-dark'];
|
|
20
|
+
const RatingVariants = {
|
|
21
|
+
[RatingVariant.Default]: [
|
|
22
|
+
// Layout
|
|
23
|
+
'layout-row'],
|
|
24
|
+
[RatingVariant.Fitted]: [
|
|
25
|
+
// Layout
|
|
26
|
+
'layout-row justify-between']
|
|
27
|
+
};
|
|
16
28
|
const RatingStar = [
|
|
17
29
|
// Layout
|
|
18
30
|
'layout-row justify-center',
|
|
@@ -40,6 +52,14 @@ var script = defineComponent({
|
|
|
40
52
|
type: Number,
|
|
41
53
|
default: 0
|
|
42
54
|
},
|
|
55
|
+
variant: {
|
|
56
|
+
type: String,
|
|
57
|
+
default: () => RatingVariant.Default
|
|
58
|
+
},
|
|
59
|
+
readonly: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
43
63
|
disabled: {
|
|
44
64
|
type: Boolean,
|
|
45
65
|
default: false
|
|
@@ -48,13 +68,12 @@ var script = defineComponent({
|
|
|
48
68
|
emits: ['update:modelValue'],
|
|
49
69
|
expose: ['root'],
|
|
50
70
|
setup(props, context) {
|
|
71
|
+
// Refs & Styles
|
|
72
|
+
const root = ref();
|
|
73
|
+
const rootStyles = computed(() => ['or-rating-v3', ...Rating, ...RatingVariants[props.variant]]);
|
|
74
|
+
const starStyles = computed(() => [...RatingStar, ...(props.readonly ? ['interactivity-none'] : [])]);
|
|
51
75
|
// Options
|
|
52
76
|
const length = inject(RATING_LENGTH, 5);
|
|
53
|
-
// Refs
|
|
54
|
-
const root = ref();
|
|
55
|
-
// Styles
|
|
56
|
-
const rootStyles = computed(() => ['or-rating-v3', ...Rating]);
|
|
57
|
-
const starStyles = computed(() => [...RatingStar]);
|
|
58
77
|
// State
|
|
59
78
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
60
79
|
const draftModelValue = ref(proxyModelValue.value);
|
|
@@ -117,7 +136,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
117
136
|
}, [createVNode(_component_OrIcon, {
|
|
118
137
|
icon: _ctx.draftModelValue - value + 1 === 0.5 ? 'star_half' : 'star',
|
|
119
138
|
variant: value <= _ctx.draftModelValue ? 'filled' : 'outlined',
|
|
120
|
-
size: _ctx.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
139
|
+
size: _ctx.variant === 'fitted' ? 'inherit' : _ctx.hoverIndex[value - 1] ? 'xl' : 'l'
|
|
121
140
|
}, null, 8 /* PROPS */, ["icon", "variant", "size"])], 42 /* CLASS, PROPS, HYDRATE_EVENTS */, _hoisted_2);
|
|
122
141
|
}), 128 /* KEYED_FRAGMENT */))], 10 /* CLASS, PROPS */, _hoisted_1);
|
|
123
142
|
}
|
|
@@ -125,4 +144,4 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
125
144
|
script.render = render;
|
|
126
145
|
script.__file = "src/components/or-rating-v3/OrRating.vue";
|
|
127
146
|
|
|
128
|
-
export { script as s };
|
|
147
|
+
export { RatingVariant as R, script as s };
|
|
@@ -97,7 +97,7 @@ export { s as OrRadioGroup } from '../OrRadioGroup-00785e41.js';
|
|
|
97
97
|
export { s as OrRadioGroupV3 } from '../OrRadioGroup-7e7b9d4c.js';
|
|
98
98
|
export { s as OrRadioV3 } from '../OrRadio-a4109ee7.js';
|
|
99
99
|
export { s as OrRangeSliderV3 } from '../OrRangeSlider-f3b389e0.js';
|
|
100
|
-
export { s as OrRatingV3 } from '../OrRating-
|
|
100
|
+
export { s as OrRatingV3, R as RatingVariant } from '../OrRating-b9118e0e.js';
|
|
101
101
|
export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from '../OrResizeablePanel-5000543d.js';
|
|
102
102
|
export { F as Formats, s as OrRichTextEditorV3 } from '../OrRichTextEditor-2ef14c64.js';
|
|
103
103
|
export { s as OrSearch } from '../OrSearch-740f931b.js';
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
import { RatingVariant } from './types';
|
|
1
3
|
export declare const RATING_LENGTH: unique symbol;
|
|
2
4
|
declare const _default: import("vue-demi").DefineComponent<{
|
|
3
5
|
modelValue: {
|
|
4
6
|
type: NumberConstructor;
|
|
5
7
|
default: number;
|
|
6
8
|
};
|
|
9
|
+
variant: {
|
|
10
|
+
type: PropType<"default" | "fitted">;
|
|
11
|
+
default: () => RatingVariant;
|
|
12
|
+
};
|
|
13
|
+
readonly: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
7
17
|
disabled: {
|
|
8
18
|
type: BooleanConstructor;
|
|
9
19
|
default: boolean;
|
|
@@ -24,6 +34,14 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
24
34
|
type: NumberConstructor;
|
|
25
35
|
default: number;
|
|
26
36
|
};
|
|
37
|
+
variant: {
|
|
38
|
+
type: PropType<"default" | "fitted">;
|
|
39
|
+
default: () => RatingVariant;
|
|
40
|
+
};
|
|
41
|
+
readonly: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
default: boolean;
|
|
44
|
+
};
|
|
27
45
|
disabled: {
|
|
28
46
|
type: BooleanConstructor;
|
|
29
47
|
default: boolean;
|
|
@@ -32,6 +50,8 @@ declare const _default: import("vue-demi").DefineComponent<{
|
|
|
32
50
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
33
51
|
}, {
|
|
34
52
|
modelValue: number;
|
|
53
|
+
variant: "default" | "fitted";
|
|
54
|
+
readonly: boolean;
|
|
35
55
|
disabled: boolean;
|
|
36
56
|
}>;
|
|
37
57
|
export default _default;
|
package/dist/esm/v3/index.js
CHANGED
|
@@ -97,7 +97,7 @@ export { s as OrRadioGroup } from './OrRadioGroup-00785e41.js';
|
|
|
97
97
|
export { s as OrRadioGroupV3 } from './OrRadioGroup-7e7b9d4c.js';
|
|
98
98
|
export { s as OrRadioV3 } from './OrRadio-a4109ee7.js';
|
|
99
99
|
export { s as OrRangeSliderV3 } from './OrRangeSlider-f3b389e0.js';
|
|
100
|
-
export { s as OrRatingV3 } from './OrRating-
|
|
100
|
+
export { s as OrRatingV3, R as RatingVariant } from './OrRating-b9118e0e.js';
|
|
101
101
|
export { s as OrResizeablePanelV3, R as ResizeablePanelPadding, a as ResizeablePanelPlacement } from './OrResizeablePanel-5000543d.js';
|
|
102
102
|
export { F as Formats, s as OrRichTextEditorV3 } from './OrRichTextEditor-2ef14c64.js';
|
|
103
103
|
export { s as OrSearch } from './OrSearch-740f931b.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components",
|
|
3
|
-
"version": "10.4.5-beta.
|
|
3
|
+
"version": "10.4.5-beta.4387.0",
|
|
4
4
|
"npmUnpacked": "4.15.2",
|
|
5
5
|
"description": "Vue components library for v2/3",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@codemirror/lang-json": "6.0.1",
|
|
41
41
|
"@codemirror/lang-markdown": "6.1.1",
|
|
42
42
|
"@floating-ui/dom": "1.4.2",
|
|
43
|
-
"@onereach/styles": "^6.9.2-beta.
|
|
43
|
+
"@onereach/styles": "^6.9.2-beta.4387.0",
|
|
44
44
|
"@splidejs/splide": "4.0.6",
|
|
45
45
|
"@tiptap/core": "2.0.3",
|
|
46
46
|
"@tiptap/extension-blockquote": "2.0.3",
|
|
@@ -19,17 +19,18 @@
|
|
|
19
19
|
<OrIcon
|
|
20
20
|
:icon="draftModelValue - value + 1 === 0.5 ? 'star_half' : 'star'"
|
|
21
21
|
:variant="value <= draftModelValue ? 'filled' : 'outlined'"
|
|
22
|
-
:size="hoverIndex[value - 1] ? 'xl' : 'l'"
|
|
22
|
+
:size="variant === 'fitted' ? 'inherit' : hoverIndex[value - 1] ? 'xl' : 'l'"
|
|
23
23
|
/>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script lang="ts">
|
|
29
|
-
import { computed, defineComponent, inject, reactive, ref, toRef, watch } from 'vue-demi';
|
|
29
|
+
import { PropType, computed, defineComponent, inject, reactive, ref, toRef, watch } from 'vue-demi';
|
|
30
30
|
import { useProxyModelValue } from '../../hooks';
|
|
31
31
|
import { OrIconV3 as OrIcon } from '../or-icon-v3';
|
|
32
|
-
import
|
|
32
|
+
import * as Styles from './styles';
|
|
33
|
+
import { RatingVariant } from './types';
|
|
33
34
|
|
|
34
35
|
export const RATING_LENGTH = Symbol();
|
|
35
36
|
|
|
@@ -51,6 +52,16 @@ export default defineComponent({
|
|
|
51
52
|
default: 0,
|
|
52
53
|
},
|
|
53
54
|
|
|
55
|
+
variant: {
|
|
56
|
+
type: String as PropType<`${RatingVariant}`>,
|
|
57
|
+
default: () => RatingVariant.Default,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
readonly: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false,
|
|
63
|
+
},
|
|
64
|
+
|
|
54
65
|
disabled: {
|
|
55
66
|
type: Boolean,
|
|
56
67
|
default: false,
|
|
@@ -66,22 +77,23 @@ export default defineComponent({
|
|
|
66
77
|
],
|
|
67
78
|
|
|
68
79
|
setup(props, context) {
|
|
69
|
-
//
|
|
70
|
-
const length = inject(RATING_LENGTH, 5);
|
|
71
|
-
|
|
72
|
-
// Refs
|
|
80
|
+
// Refs & Styles
|
|
73
81
|
const root = ref<HTMLElement>();
|
|
74
82
|
|
|
75
|
-
// Styles
|
|
76
83
|
const rootStyles = computed(() => [
|
|
77
84
|
'or-rating-v3',
|
|
78
|
-
...Rating,
|
|
85
|
+
...Styles.Rating,
|
|
86
|
+
...Styles.RatingVariants[props.variant],
|
|
79
87
|
]);
|
|
80
88
|
|
|
81
89
|
const starStyles = computed(() => [
|
|
82
|
-
...RatingStar,
|
|
90
|
+
...Styles.RatingStar,
|
|
91
|
+
...props.readonly ? ['interactivity-none'] : [],
|
|
83
92
|
]);
|
|
84
93
|
|
|
94
|
+
// Options
|
|
95
|
+
const length = inject(RATING_LENGTH, 5);
|
|
96
|
+
|
|
85
97
|
// State
|
|
86
98
|
const proxyModelValue = useProxyModelValue(toRef(props, 'modelValue'), context.emit);
|
|
87
99
|
const draftModelValue = ref(proxyModelValue.value);
|
|
@@ -1,12 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
// Layout
|
|
3
|
-
'layout-row',
|
|
1
|
+
import { RatingVariant } from './types';
|
|
4
2
|
|
|
3
|
+
export const Rating: string[] = [
|
|
5
4
|
// Theme
|
|
6
5
|
'theme-foreground-disabled',
|
|
7
6
|
'dark:theme-foreground-disabled-dark',
|
|
8
7
|
];
|
|
9
8
|
|
|
9
|
+
export const RatingVariants: Record<RatingVariant, string[]> = {
|
|
10
|
+
[RatingVariant.Default]: [
|
|
11
|
+
// Layout
|
|
12
|
+
'layout-row',
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
[RatingVariant.Fitted]: [
|
|
16
|
+
// Layout
|
|
17
|
+
'layout-row justify-between',
|
|
18
|
+
],
|
|
19
|
+
};
|
|
20
|
+
|
|
10
21
|
export const RatingStar: string[] = [
|
|
11
22
|
// Layout
|
|
12
23
|
'layout-row justify-center',
|