origam 2.9.0 → 2.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/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +6 -4
- package/dist/src/assets/css/tokens/light.css +3 -2
- package/dist/src/assets/scss/tokens/_dark.scss +3 -2
- package/dist/src/assets/scss/tokens/_light.scss +3 -2
- package/dist/src/components/App/OrigamApp.vue +7 -6
- package/dist/src/components/Avatar/OrigamAvatar.vue +1 -1
- package/dist/src/components/Btn/OrigamBtnGroup.vue +26 -10
- package/dist/src/components/Checkbox/OrigamCheckboxBtn.vue +20 -1
- package/dist/src/components/ColorPicker/OrigamColorPickerPreview.vue +1 -1
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +33 -0
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +29 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +1 -1
- package/dist/src/components/Field/OrigamField.vue +32 -3
- package/dist/src/components/Label/OrigamLabel.vue +1 -1
- package/dist/src/components/Messages/OrigamMessages.vue +1 -1
- package/dist/src/components/Radio/OrigamRadioBtn.vue +20 -1
- package/dist/src/components/SelectionControl/OrigamSelectionControl.vue +48 -4
- package/dist/src/components/SliderField/OrigamSliderField.vue +23 -12
- package/dist/src/components/Tabs/OrigamTab.vue +1 -1
- package/dist/src/components/Tabs/OrigamTabs.vue +1 -1
- package/dist/src/interfaces/SelectionControl/selection-control.interface.d.ts +13 -2
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
:is-vertical="isVertical"
|
|
45
45
|
:max="resolvedMax"
|
|
46
46
|
:min="resolvedMin"
|
|
47
|
+
:rounded="resolvedRounded"
|
|
47
48
|
:show-ticks="showTicks"
|
|
48
49
|
:start="isRange ? trackRangeStart : 0"
|
|
49
50
|
:stop="isRange ? trackRangeStop : trackStop"
|
|
@@ -273,6 +274,7 @@
|
|
|
273
274
|
:is-vertical="isVertical"
|
|
274
275
|
:max="resolvedMax"
|
|
275
276
|
:min="resolvedMin"
|
|
277
|
+
:rounded="resolvedRounded"
|
|
276
278
|
:show-ticks="showTicks"
|
|
277
279
|
:start="isRange ? trackRangeStart : 0"
|
|
278
280
|
:stop="isRange ? trackRangeStop : trackStop"
|
|
@@ -426,6 +428,7 @@ import {
|
|
|
426
428
|
useDefaults,
|
|
427
429
|
useFocus,
|
|
428
430
|
useProps,
|
|
431
|
+
useRounded,
|
|
429
432
|
useRtl,
|
|
430
433
|
useSteps,
|
|
431
434
|
useStyle,
|
|
@@ -584,12 +587,14 @@ const bufferedPercentage = computed(() => {
|
|
|
584
587
|
const clamped = clamp(props.buffered, resolvedMin.value, resolvedMax.value);
|
|
585
588
|
return toPercent(clamped);
|
|
586
589
|
});
|
|
587
|
-
const
|
|
590
|
+
const bufferedPosition = computed(() => {
|
|
588
591
|
const pct = bufferedPercentage.value;
|
|
589
|
-
if (isVertical.value) {
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
|
|
592
|
+
if (isVertical.value) return { height: `${pct}%`, bottom: "0" };
|
|
593
|
+
if (indexFromEnd.value) return { width: `${pct}%`, insetInlineEnd: "0" };
|
|
594
|
+
return { width: `${pct}%`, insetInlineStart: "0" };
|
|
595
|
+
});
|
|
596
|
+
const bufferedStyles = computed(() => {
|
|
597
|
+
return [bufferedPosition.value, roundedStyles.value];
|
|
593
598
|
});
|
|
594
599
|
const hasPeaks = computed(() => {
|
|
595
600
|
if (!isAudioVariant.value) return false;
|
|
@@ -767,6 +772,10 @@ const bgColor = computed(() => {
|
|
|
767
772
|
});
|
|
768
773
|
const { backgroundColorClasses: thumbBgClasses, backgroundColorStyles: thumbBgStyles } = useBackgroundColor(color);
|
|
769
774
|
const { textColorClasses: thumbTextClasses, textColorStyles: thumbTextStyles } = useTextColor(color);
|
|
775
|
+
const resolvedRounded = computed(() => {
|
|
776
|
+
return props.trackProps?.rounded ?? props.rounded;
|
|
777
|
+
});
|
|
778
|
+
const { roundedClasses, roundedStyles } = useRounded(resolvedRounded);
|
|
770
779
|
const inputProps = computed(() => {
|
|
771
780
|
return origamInputRef.value?.filterProps(props, ["modelValue", "class", "style", "id", "focused", "centerAffix", "color", "bgColor", "activeColor", "activeBgColor", "hoverColor", "hoverBgColor"]);
|
|
772
781
|
});
|
|
@@ -845,6 +854,7 @@ const sliderFieldClasses = computed(() => {
|
|
|
845
854
|
variantClass.value,
|
|
846
855
|
sharedStateClasses.value,
|
|
847
856
|
rtlClasses.value,
|
|
857
|
+
roundedClasses.value,
|
|
848
858
|
props.class
|
|
849
859
|
];
|
|
850
860
|
});
|
|
@@ -855,6 +865,7 @@ const bareWrapperClasses = computed(() => {
|
|
|
855
865
|
variantClass.value,
|
|
856
866
|
sharedStateClasses.value,
|
|
857
867
|
rtlClasses.value,
|
|
868
|
+
roundedClasses.value,
|
|
858
869
|
props.class
|
|
859
870
|
];
|
|
860
871
|
});
|
|
@@ -964,7 +975,7 @@ defineExpose({
|
|
|
964
975
|
pointer-events: none;
|
|
965
976
|
background: var(--origam-slider-field__buffered---background-color, color-mix(in srgb, currentColor 40%, transparent));
|
|
966
977
|
opacity: var(--origam-slider-field__buffered---opacity, 0.5);
|
|
967
|
-
border-radius: 999px;
|
|
978
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
968
979
|
top: 50%;
|
|
969
980
|
transform: translateY(-50%);
|
|
970
981
|
height: var(--origam-slider-field--variant--field---track-thickness, var(--origam-slider-field---track-size, 4px));
|
|
@@ -1187,15 +1198,15 @@ defineExpose({
|
|
|
1187
1198
|
|
|
1188
1199
|
:deep(.origam-slider-field-track) {
|
|
1189
1200
|
background: transparent;
|
|
1190
|
-
border-radius: 999px;
|
|
1201
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1191
1202
|
}
|
|
1192
1203
|
|
|
1193
1204
|
:deep(.origam-slider-field-track__background) {
|
|
1194
|
-
border-radius: 999px;
|
|
1205
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1195
1206
|
}
|
|
1196
1207
|
|
|
1197
1208
|
:deep(.origam-slider-field-track__fill) {
|
|
1198
|
-
border-radius: 999px;
|
|
1209
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1199
1210
|
}
|
|
1200
1211
|
|
|
1201
1212
|
&.origam-slider-field--horizontal {
|
|
@@ -1263,7 +1274,7 @@ defineExpose({
|
|
|
1263
1274
|
|
|
1264
1275
|
:deep(.origam-slider-field-track) {
|
|
1265
1276
|
background-color: var(--origam-slider-field--bare---track-background-color, color-mix(in srgb, currentColor 25%, transparent));
|
|
1266
|
-
border-radius: 999px;
|
|
1277
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1267
1278
|
height: var(--origam-slider-field--variant--field---track-thickness);
|
|
1268
1279
|
width: 100%;
|
|
1269
1280
|
transition: height 140ms ease;
|
|
@@ -1276,14 +1287,14 @@ defineExpose({
|
|
|
1276
1287
|
.origam-slider-field-track__fill {
|
|
1277
1288
|
background: currentColor;
|
|
1278
1289
|
height: 100%;
|
|
1279
|
-
border-radius: 999px;
|
|
1290
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1280
1291
|
}
|
|
1281
1292
|
}
|
|
1282
1293
|
|
|
1283
1294
|
.origam-slider-field__buffered {
|
|
1284
1295
|
background: var(--origam-slider-field__buffered--bare---background-color, color-mix(in srgb, currentColor 40%, transparent));
|
|
1285
1296
|
opacity: 1;
|
|
1286
|
-
border-radius: 999px;
|
|
1297
|
+
border-radius: var(--origam-slider-field---border-radius, 999px);
|
|
1287
1298
|
height: var(--origam-slider-field--variant--field---track-thickness);
|
|
1288
1299
|
z-index: 1;
|
|
1289
1300
|
}
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import type { IActiveProps, IBgColorProps, IColorProps, ICommonsComponentEmits, ICommonsComponentProps, IDensityProps, ISelectionControlGroupProps, IHoverProps } from '../../interfaces';
|
|
1
|
+
import type { IActiveProps, IBgColorProps, IBorderProps, IColorProps, ICommonsComponentEmits, ICommonsComponentProps, IDensityProps, IElevationProps, ISelectionControlGroupProps, IHoverProps, IRoundedProps } from '../../interfaces';
|
|
2
2
|
import type { TColor, TIcon } from '../../types';
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* `border` / `rounded` / `elevation` (props-first, issue #241) — declared
|
|
5
|
+
* here so `OrigamSelectionControl` (the element that owns the visible
|
|
6
|
+
* state-layer box behind the Checkbox/Radio glyph) can consume them via
|
|
7
|
+
* the standard `useBorder` / `useRounded` / `useElevation` composables,
|
|
8
|
+
* mirroring the `ISwitchTrackProps` pattern (the track owns the surface,
|
|
9
|
+
* not the outer `OrigamSwitch`). `ICheckboxBtnProps` / `IRadioBtnProps`
|
|
10
|
+
* extend this interface, so `OrigamCheckbox(Btn)` / `OrigamRadio(Btn)`
|
|
11
|
+
* forward these values down automatically through `filterProps` without
|
|
12
|
+
* any additional wiring.
|
|
13
|
+
*/
|
|
14
|
+
export interface ISelectionControlProps extends ICommonsComponentProps, Partial<Omit<ISelectionControlGroupProps, 'items'>>, IColorProps, IBgColorProps, IActiveProps, IHoverProps, IDensityProps, IBorderProps, IRoundedProps, IElevationProps {
|
|
4
15
|
label?: string;
|
|
5
16
|
trueValue?: any;
|
|
6
17
|
falseValue?: any;
|