vueless 0.0.581 → 0.0.582
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/composables/useUI.ts +8 -4
- package/package.json +1 -1
- package/types.ts +63 -57
- package/ui.data-table/UTableRow.vue +2 -0
- package/ui.form-calendar/UCalendarDayView.vue +2 -0
- package/ui.form-calendar/UCalendarMonthView.vue +2 -0
- package/ui.form-calendar/UCalendarYearView.vue +2 -0
- package/ui.form-date-picker-range/UDatePickerRangeInputs.vue +2 -0
- package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +2 -0
- package/ui.navigation-progress/UProgress.vue +4 -4
- package/ui.navigation-progress/{StepperProgress.vue → UStepperProgress.vue} +2 -0
- package/web-types.json +61 -61
package/composables/useUI.ts
CHANGED
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
STRATEGY_TYPE,
|
|
7
7
|
CVA_CONFIG_KEY,
|
|
8
8
|
SYSTEM_CONFIG_KEY,
|
|
9
|
-
NESTED_COMPONENT_PATTERN_REG_EXP,
|
|
10
9
|
EXTENDS_PATTERN_REG_EXP,
|
|
10
|
+
NESTED_COMPONENT_PATTERN_REG_EXP,
|
|
11
11
|
} from "../constants.js";
|
|
12
12
|
|
|
13
|
-
import type {
|
|
13
|
+
import type { Ref, ComputedRef } from "vue";
|
|
14
14
|
import type {
|
|
15
15
|
CVA,
|
|
16
16
|
UseUI,
|
|
@@ -23,6 +23,7 @@ import type {
|
|
|
23
23
|
ComponentNames,
|
|
24
24
|
ComponentConfig,
|
|
25
25
|
KeyAttrsWithConfig,
|
|
26
|
+
VuelessComponentInstance,
|
|
26
27
|
} from "../types.ts";
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -37,9 +38,12 @@ export default function useUI<T>(
|
|
|
37
38
|
mutatedProps?: MutatedProps,
|
|
38
39
|
topLevelClassKey?: string,
|
|
39
40
|
) {
|
|
40
|
-
const { type, props } = getCurrentInstance() as
|
|
41
|
+
const { type, props, parent } = getCurrentInstance() as VuelessComponentInstance;
|
|
42
|
+
|
|
43
|
+
const componentName = type?.internal
|
|
44
|
+
? (parent?.type.__name as ComponentNames)
|
|
45
|
+
: (type.__name as ComponentNames);
|
|
41
46
|
|
|
42
|
-
const componentName = type.__name as ComponentNames;
|
|
43
47
|
const globalConfig = vuelessConfig?.component?.[componentName] || {};
|
|
44
48
|
|
|
45
49
|
const vuelessStrategy = Object.values(STRATEGY_TYPE).includes(vuelessConfig.strategy || "")
|
package/package.json
CHANGED
package/types.ts
CHANGED
|
@@ -55,7 +55,7 @@ import UInputFileConfig from "./ui.form-input-file/config.ts";
|
|
|
55
55
|
import UInputMoneyConfig from "./ui.form-input-money/config.ts";
|
|
56
56
|
import UDataListConfig from "./ui.data-list/config.ts";
|
|
57
57
|
|
|
58
|
-
import type { ComputedRef, MaybeRef, Ref } from "vue";
|
|
58
|
+
import type { ComputedRef, MaybeRef, Ref, ComponentInternalInstance } from "vue";
|
|
59
59
|
import type { Props } from "tippy.js";
|
|
60
60
|
import type { LocaleOptions } from "./adatper.locale/vueless.ts";
|
|
61
61
|
|
|
@@ -170,62 +170,62 @@ export interface Directives {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
export interface Components {
|
|
173
|
-
UText
|
|
174
|
-
UAlert
|
|
175
|
-
UEmpty
|
|
176
|
-
UFile
|
|
177
|
-
UFiles
|
|
178
|
-
UMoney
|
|
179
|
-
UHeader
|
|
180
|
-
UNotify
|
|
181
|
-
UDot
|
|
182
|
-
UButton
|
|
183
|
-
ULink
|
|
184
|
-
UToggle
|
|
185
|
-
UToggleItem
|
|
186
|
-
UBadge
|
|
187
|
-
UCalendar
|
|
188
|
-
UDatePicker
|
|
189
|
-
UDatePickerRange
|
|
190
|
-
UTable
|
|
191
|
-
UDropdownBadge
|
|
192
|
-
UDropdownButton
|
|
193
|
-
UDropdownLink
|
|
194
|
-
UDropdownList
|
|
195
|
-
UAccordion
|
|
196
|
-
UCard
|
|
197
|
-
UCol
|
|
198
|
-
UDivider
|
|
199
|
-
UGroup
|
|
200
|
-
UModal
|
|
201
|
-
UModalConfirm
|
|
202
|
-
UPage
|
|
203
|
-
URow
|
|
204
|
-
ULoader
|
|
205
|
-
ULoaderOverlay
|
|
206
|
-
ULoaderProgress
|
|
207
|
-
UPagination
|
|
208
|
-
UProgress
|
|
209
|
-
UTab
|
|
210
|
-
UTabs
|
|
211
|
-
UAvatar
|
|
212
|
-
UIcon
|
|
213
|
-
UCheckbox
|
|
214
|
-
UCheckboxGroup
|
|
215
|
-
UCheckboxMultiState
|
|
216
|
-
URadio
|
|
217
|
-
URadioGroup
|
|
218
|
-
USwitch
|
|
219
|
-
UTextarea
|
|
220
|
-
ULabel
|
|
221
|
-
UColorPicker
|
|
222
|
-
UInput
|
|
223
|
-
UInputNumber
|
|
224
|
-
UInputRating
|
|
225
|
-
UInputSearch
|
|
226
|
-
UInputFile
|
|
227
|
-
UInputMoney
|
|
228
|
-
UDataList
|
|
173
|
+
UText: Partial<typeof UTextDefaultConfig>;
|
|
174
|
+
UAlert: Partial<typeof UAlertDefaultConfig>;
|
|
175
|
+
UEmpty: Partial<typeof UEmptyDefaultConfig>;
|
|
176
|
+
UFile: Partial<typeof UFileDefaultConfig>;
|
|
177
|
+
UFiles: Partial<typeof UFilesDefaultConfig>;
|
|
178
|
+
UMoney: Partial<typeof UMoneyDefaultConfig>;
|
|
179
|
+
UHeader: Partial<typeof UHeaderDefaultConfig>;
|
|
180
|
+
UNotify: Partial<typeof UNotifyDefaultConfig>;
|
|
181
|
+
UDot: Partial<typeof UDotDefaultConfig>;
|
|
182
|
+
UButton: Partial<typeof UButtonDefaultConfig>;
|
|
183
|
+
ULink: Partial<typeof ULinkDefaultConfig>;
|
|
184
|
+
UToggle: Partial<typeof UToggleDefaultConfig>;
|
|
185
|
+
UToggleItem: Partial<typeof UToggleItemDefaultConfig>;
|
|
186
|
+
UBadge: Partial<typeof UBadgeDefaultConfig>;
|
|
187
|
+
UCalendar: Partial<typeof UCalendarDefaultConfig>;
|
|
188
|
+
UDatePicker: Partial<typeof UDatePickerConfig>;
|
|
189
|
+
UDatePickerRange: Partial<typeof UDatePickerRangeConfig>;
|
|
190
|
+
UTable: Partial<typeof UDataTableConfig>;
|
|
191
|
+
UDropdownBadge: Partial<typeof UDropdownBadgeConfig>;
|
|
192
|
+
UDropdownButton: Partial<typeof UDropdownButtonConfig>;
|
|
193
|
+
UDropdownLink: Partial<typeof UDropdownLinkConfig>;
|
|
194
|
+
UDropdownList: Partial<typeof UDropdownListConfig>;
|
|
195
|
+
UAccordion: Partial<typeof UAccordionConfig>;
|
|
196
|
+
UCard: Partial<typeof UCardConfig>;
|
|
197
|
+
UCol: Partial<typeof UColConfig>;
|
|
198
|
+
UDivider: Partial<typeof UDividerConfig>;
|
|
199
|
+
UGroup: Partial<typeof UGroupConfig>;
|
|
200
|
+
UModal: Partial<typeof UModalConfig>;
|
|
201
|
+
UModalConfirm: Partial<typeof UModalConfirmConfig>;
|
|
202
|
+
UPage: Partial<typeof UPageConfig>;
|
|
203
|
+
URow: Partial<typeof URowConfig>;
|
|
204
|
+
ULoader: Partial<typeof ULoaderConfig>;
|
|
205
|
+
ULoaderOverlay: Partial<typeof ULoaderOverlayConfig>;
|
|
206
|
+
ULoaderProgress: Partial<typeof ULoaderProgressConfig>;
|
|
207
|
+
UPagination: Partial<typeof UPaginationConfig>;
|
|
208
|
+
UProgress: Partial<typeof UProgressConfig>;
|
|
209
|
+
UTab: Partial<typeof UTabConfig>;
|
|
210
|
+
UTabs: Partial<typeof UTabsConfig>;
|
|
211
|
+
UAvatar: Partial<typeof UAvatarConfig>;
|
|
212
|
+
UIcon: Partial<typeof UIconConfig>;
|
|
213
|
+
UCheckbox: Partial<typeof UCheckboxConfig>;
|
|
214
|
+
UCheckboxGroup: Partial<typeof UCheckboxGroupConfig>;
|
|
215
|
+
UCheckboxMultiState: Partial<typeof UCheckboxMultiStateConfig>;
|
|
216
|
+
URadio: Partial<typeof URadioConfig>;
|
|
217
|
+
URadioGroup: Partial<typeof URadioGroupConfig>;
|
|
218
|
+
USwitch: Partial<typeof USwitchConfig>;
|
|
219
|
+
UTextarea: Partial<typeof UTextareaConfig>;
|
|
220
|
+
ULabel: Partial<typeof ULabelConfig>;
|
|
221
|
+
UColorPicker: Partial<typeof UColorPickerConfig>;
|
|
222
|
+
UInput: Partial<typeof UInputConfig>;
|
|
223
|
+
UInputNumber: Partial<typeof UInputNumberConfig>;
|
|
224
|
+
UInputRating: Partial<typeof UInputRatingConfig>;
|
|
225
|
+
UInputSearch: Partial<typeof UInputSearchConfig>;
|
|
226
|
+
UInputFile: Partial<typeof UInputFileConfig>;
|
|
227
|
+
UInputMoney: Partial<typeof UInputMoneyConfig>;
|
|
228
|
+
UDataList: Partial<typeof UDataListConfig>;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
export type Component = {
|
|
@@ -443,6 +443,12 @@ export interface ExposeProperty {
|
|
|
443
443
|
description?: string;
|
|
444
444
|
}
|
|
445
445
|
|
|
446
|
+
export type VuelessComponentInstance = ComponentInternalInstance & {
|
|
447
|
+
type?: {
|
|
448
|
+
internal?: boolean;
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
|
|
446
452
|
/**
|
|
447
453
|
* Utility types to extract component props, slots, emit, exposed types.
|
|
448
454
|
* Original code taken from `vue-component-type-helpers` npm package.
|
|
@@ -16,6 +16,8 @@ import type { Cell, CellObject, Row, RowScopedProps, UTableRowProps } from "./ty
|
|
|
16
16
|
const NESTED_ROW_SHIFT_REM = 1;
|
|
17
17
|
const LAST_NESTED_ROW_SHIFT_REM = 1.1;
|
|
18
18
|
|
|
19
|
+
defineOptions({ internal: true });
|
|
20
|
+
|
|
19
21
|
const props = defineProps<UTableRowProps>();
|
|
20
22
|
|
|
21
23
|
const emit = defineEmits(["toggleRowVisibility", "click", "dblclick", "clickCell"]);
|
|
@@ -13,6 +13,8 @@ import type { RangeDate } from "../ui.form-calendar/types.ts";
|
|
|
13
13
|
|
|
14
14
|
type UInputRef = InstanceType<typeof UInput>;
|
|
15
15
|
|
|
16
|
+
defineOptions({ internal: true });
|
|
17
|
+
|
|
16
18
|
const props = defineProps<UDatePickerRangeInputsProps>();
|
|
17
19
|
|
|
18
20
|
const rangeInputStartRef = useTemplateRef<UInputRef>("range-input-start");
|
|
@@ -15,6 +15,8 @@ import { Period } from "./constants.ts";
|
|
|
15
15
|
import type { UDatePickerRangePeriodMenuProps, IsDatePeriodOutOfRange } from "./types.ts";
|
|
16
16
|
import type { DatePeriodRange } from "./utilDateRange.ts";
|
|
17
17
|
|
|
18
|
+
defineOptions({ internal: true });
|
|
19
|
+
|
|
18
20
|
const props = defineProps<UDatePickerRangePeriodMenuProps>();
|
|
19
21
|
|
|
20
22
|
const emit = defineEmits(["toggleMenu", "closeMenu", "clickPrev", "clickNext"]);
|
|
@@ -7,7 +7,7 @@ import { getDefaults } from "../utils/ui.ts";
|
|
|
7
7
|
import defaultConfig from "./config.ts";
|
|
8
8
|
import { UProgress, VARIANT } from "./constants.ts";
|
|
9
9
|
|
|
10
|
-
import
|
|
10
|
+
import UStepperProgress from "./UStepperProgress.vue";
|
|
11
11
|
import UHeader from "../ui.text-header/UHeader.vue";
|
|
12
12
|
|
|
13
13
|
import type { UProgressProps, HeaderSize, Config } from "./types.ts";
|
|
@@ -59,8 +59,8 @@ const progressPercent = computed(() => {
|
|
|
59
59
|
return `${currentPercent} ${maxPercent}`;
|
|
60
60
|
});
|
|
61
61
|
|
|
62
|
-
function isActiveStep(index: number) {
|
|
63
|
-
return index === props.value;
|
|
62
|
+
function isActiveStep(index: number | string) {
|
|
63
|
+
return Number(index) === props.value;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/**
|
|
@@ -111,7 +111,7 @@ const { progressAttrs, wrapperAttrs, indicatorAttrs, stepAttrs, stepperAttrs } =
|
|
|
111
111
|
</template>
|
|
112
112
|
</div>
|
|
113
113
|
|
|
114
|
-
<
|
|
114
|
+
<UStepperProgress
|
|
115
115
|
v-if="isVariant.stepper"
|
|
116
116
|
v-bind="stepperAttrs"
|
|
117
117
|
:color="color"
|
package/web-types.json
CHANGED
|
@@ -1,72 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "vue",
|
|
3
3
|
"name": "vueless",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.582",
|
|
5
5
|
"contributions": {
|
|
6
6
|
"html": {
|
|
7
7
|
"description-markup": "markdown",
|
|
8
8
|
"types-syntax": "typescript",
|
|
9
9
|
"tags": [
|
|
10
|
-
{
|
|
11
|
-
"name": "StepperProgress",
|
|
12
|
-
"description": "",
|
|
13
|
-
"attributes": [
|
|
14
|
-
{
|
|
15
|
-
"name": "progressPercent",
|
|
16
|
-
"required": true,
|
|
17
|
-
"description": "Stepper progress percent value.",
|
|
18
|
-
"value": {
|
|
19
|
-
"kind": "expression",
|
|
20
|
-
"type": "string"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"name": "value",
|
|
25
|
-
"required": true,
|
|
26
|
-
"description": "Stepper progress value (current step).",
|
|
27
|
-
"value": {
|
|
28
|
-
"kind": "expression",
|
|
29
|
-
"type": "number"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "color",
|
|
34
|
-
"required": true,
|
|
35
|
-
"description": "Stepper progress color.",
|
|
36
|
-
"value": {
|
|
37
|
-
"kind": "expression",
|
|
38
|
-
"type": "string"
|
|
39
|
-
},
|
|
40
|
-
"default": "brand"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "config",
|
|
44
|
-
"required": false,
|
|
45
|
-
"description": "Component config object.",
|
|
46
|
-
"enum": [
|
|
47
|
-
"Config"
|
|
48
|
-
],
|
|
49
|
-
"value": {
|
|
50
|
-
"kind": "expression",
|
|
51
|
-
"type": "ComponentConfig"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"name": "dataTest",
|
|
56
|
-
"required": false,
|
|
57
|
-
"description": "Data-test attribute for automated testing.",
|
|
58
|
-
"value": {
|
|
59
|
-
"kind": "expression",
|
|
60
|
-
"type": "string"
|
|
61
|
-
},
|
|
62
|
-
"default": "\"\""
|
|
63
|
-
}
|
|
64
|
-
],
|
|
65
|
-
"source": {
|
|
66
|
-
"module": "./src/ui.navigation-progress/StepperProgress.vue",
|
|
67
|
-
"symbol": "default"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
10
|
{
|
|
71
11
|
"name": "UAccordion",
|
|
72
12
|
"description": "",
|
|
@@ -10393,6 +10333,66 @@
|
|
|
10393
10333
|
"symbol": "default"
|
|
10394
10334
|
}
|
|
10395
10335
|
},
|
|
10336
|
+
{
|
|
10337
|
+
"name": "UStepperProgress",
|
|
10338
|
+
"description": "",
|
|
10339
|
+
"attributes": [
|
|
10340
|
+
{
|
|
10341
|
+
"name": "progressPercent",
|
|
10342
|
+
"required": true,
|
|
10343
|
+
"description": "Stepper progress percent value.",
|
|
10344
|
+
"value": {
|
|
10345
|
+
"kind": "expression",
|
|
10346
|
+
"type": "string"
|
|
10347
|
+
}
|
|
10348
|
+
},
|
|
10349
|
+
{
|
|
10350
|
+
"name": "value",
|
|
10351
|
+
"required": true,
|
|
10352
|
+
"description": "Stepper progress value (current step).",
|
|
10353
|
+
"value": {
|
|
10354
|
+
"kind": "expression",
|
|
10355
|
+
"type": "number"
|
|
10356
|
+
}
|
|
10357
|
+
},
|
|
10358
|
+
{
|
|
10359
|
+
"name": "color",
|
|
10360
|
+
"required": true,
|
|
10361
|
+
"description": "Stepper progress color.",
|
|
10362
|
+
"value": {
|
|
10363
|
+
"kind": "expression",
|
|
10364
|
+
"type": "string"
|
|
10365
|
+
},
|
|
10366
|
+
"default": "brand"
|
|
10367
|
+
},
|
|
10368
|
+
{
|
|
10369
|
+
"name": "config",
|
|
10370
|
+
"required": false,
|
|
10371
|
+
"description": "Component config object.",
|
|
10372
|
+
"enum": [
|
|
10373
|
+
"Config"
|
|
10374
|
+
],
|
|
10375
|
+
"value": {
|
|
10376
|
+
"kind": "expression",
|
|
10377
|
+
"type": "ComponentConfig"
|
|
10378
|
+
}
|
|
10379
|
+
},
|
|
10380
|
+
{
|
|
10381
|
+
"name": "dataTest",
|
|
10382
|
+
"required": false,
|
|
10383
|
+
"description": "Data-test attribute for automated testing.",
|
|
10384
|
+
"value": {
|
|
10385
|
+
"kind": "expression",
|
|
10386
|
+
"type": "string"
|
|
10387
|
+
},
|
|
10388
|
+
"default": "\"\""
|
|
10389
|
+
}
|
|
10390
|
+
],
|
|
10391
|
+
"source": {
|
|
10392
|
+
"module": "./src/ui.navigation-progress/UStepperProgress.vue",
|
|
10393
|
+
"symbol": "default"
|
|
10394
|
+
}
|
|
10395
|
+
},
|
|
10396
10396
|
{
|
|
10397
10397
|
"name": "USwitch",
|
|
10398
10398
|
"description": "",
|