design-system-next 2.7.41 → 2.7.43
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/design-system-next.js +721 -706
- package/dist/design-system-next.js.gz +0 -0
- package/dist/package.json.d.ts +94 -0
- package/package.json +1 -1
- package/src/components/accordion/accordion.vue +4 -2
- package/src/components/calendar-cell/calendar-cell.vue +3 -2
- package/src/components/collapsible/collapsible.vue +0 -1
- package/src/components/date-picker/date-picker.ts +1 -1
- package/src/components/date-picker/date-picker.vue +5 -2
- package/src/components/date-picker/use-date-picker.ts +12 -5
- /package/dist/{main.d.ts → lib/main.d.ts} +0 -0
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
"name": "design-system-next",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.7.43",
|
|
5
|
+
"main": "./dist/design-system-next.js",
|
|
6
|
+
"module": "./dist/design-system-next.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://dev.azure.com/sproutphil/Sprout%20Design%20System/_git/Sprout%20Design%20System%20Next"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"dist/",
|
|
15
|
+
"src/",
|
|
16
|
+
"README.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/design-system-next.js",
|
|
22
|
+
"require": "./dist/design-system-next.js"
|
|
23
|
+
},
|
|
24
|
+
"./style.css": "./dist/main.css"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"dev": "vite",
|
|
28
|
+
"build": "vue-tsc && vite build",
|
|
29
|
+
"watch-build": "vue-tsc && vite build --watch",
|
|
30
|
+
"types": "vue-tsc",
|
|
31
|
+
"preview": "vite preview",
|
|
32
|
+
"lint:script": "eslint \"**/*.{js,ts,vue}\"",
|
|
33
|
+
"lint:style": "stylelint \"**/*.{vue,css}\"",
|
|
34
|
+
"fix:style": "stylelint --fix \"**/*.{vue,css}\"",
|
|
35
|
+
"lint": "npm run lint:script && npm run lint:style",
|
|
36
|
+
"prepublishOnly": "npm run build",
|
|
37
|
+
"docs:dev": "vitepress dev docs",
|
|
38
|
+
"docs:build": "vitepress build docs",
|
|
39
|
+
"docs:serve": "vitepress serve docs",
|
|
40
|
+
"docs:preview": "vitepress preview docs",
|
|
41
|
+
"clean": "rm -rf node_modules dist coverage package-lock.json && npm install"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@cloudinary/url-gen": "^1.21.0",
|
|
45
|
+
"@eslint/js": "^9.17.0",
|
|
46
|
+
"@iconify-icons/ph": "^1.2.5",
|
|
47
|
+
"@iconify/vue": "^4.3.0",
|
|
48
|
+
"classnames": "^2.5.1",
|
|
49
|
+
"countries-list": "^3.1.1",
|
|
50
|
+
"dayjs": "^1.11.13",
|
|
51
|
+
"floating-vue": "^5.2.2",
|
|
52
|
+
"libphonenumber-js": "^1.12.5",
|
|
53
|
+
"pinia": "^2.3.1",
|
|
54
|
+
"stylelint": "^16.12.0",
|
|
55
|
+
"stylelint-config-recess-order": "^5.1.1",
|
|
56
|
+
"stylelint-config-recommended": "^14.0.1",
|
|
57
|
+
"stylelint-config-recommended-vue": "^1.5.0",
|
|
58
|
+
"typescript-eslint": "^8.19.1",
|
|
59
|
+
"vite-plugin-sass": "^0.1.0",
|
|
60
|
+
"vue": "^3.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@stylistic/stylelint-plugin": "^3.1.1",
|
|
64
|
+
"@types/node": "^22.10.5",
|
|
65
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
66
|
+
"autoprefixer": "^10.4.20",
|
|
67
|
+
"eslint": "^9.17.0",
|
|
68
|
+
"eslint-config-prettier": "^9.1.0",
|
|
69
|
+
"eslint-plugin-vue": "^9.32.0",
|
|
70
|
+
"prettier": "^3.4.2",
|
|
71
|
+
"prettier-plugin-tailwindcss": "^0.6.9",
|
|
72
|
+
"rollup-plugin-gzip": "^4.0.1",
|
|
73
|
+
"sass-embedded": "^1.83.1",
|
|
74
|
+
"tailwindcss": "^3.4.17",
|
|
75
|
+
"typescript": "~5.7.2",
|
|
76
|
+
"unplugin-vue-components": "^28.0.0",
|
|
77
|
+
"vite": "^6.0.7",
|
|
78
|
+
"vite-plugin-dts": "^4.4.0",
|
|
79
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
80
|
+
"vitepress": "^1.5.0",
|
|
81
|
+
"vue-eslint-parser": "^9.4.3",
|
|
82
|
+
"vue-tsc": "^2.2.0"
|
|
83
|
+
},
|
|
84
|
+
"peerDependencies": {
|
|
85
|
+
"vue": "^3.0.0"
|
|
86
|
+
},
|
|
87
|
+
"engines": {
|
|
88
|
+
"node": ">=20.0.0",
|
|
89
|
+
"npm": ">=10.0.0"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
;
|
|
93
|
+
|
|
94
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -53,13 +53,15 @@
|
|
|
53
53
|
</div>
|
|
54
54
|
</template>
|
|
55
55
|
<script lang="ts" setup>
|
|
56
|
-
import {
|
|
56
|
+
import { Icon } from '@iconify/vue';
|
|
57
|
+
|
|
57
58
|
import { accordionPropTypes } from './accordion';
|
|
58
59
|
import { useAccordion } from './use-accordion';
|
|
60
|
+
|
|
59
61
|
import SprCollapsible from '@/components/collapsible/collapsible.vue';
|
|
60
|
-
import { Icon } from '@iconify/vue';
|
|
61
62
|
import SprButton from '@/components/button/button.vue';
|
|
62
63
|
|
|
63
64
|
const props = defineProps(accordionPropTypes);
|
|
65
|
+
|
|
64
66
|
const { collapsedState, toggleCollapse, setClickedIndex, clearIndex, clickedIndex } = useAccordion(props);
|
|
65
67
|
</script>
|
|
@@ -21,12 +21,13 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script setup lang="ts">
|
|
24
|
-
import { defineProps } from 'vue';
|
|
25
24
|
import { Icon } from '@iconify/vue';
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
import { calendarCellPropTypes, calendarCellEmitTypes } from './calendar-cell';
|
|
28
27
|
import { useCalendarCell } from './use-calendar-cell';
|
|
29
28
|
|
|
29
|
+
import SprStatus from '@/components/status/status.vue';
|
|
30
|
+
|
|
30
31
|
const props = defineProps(calendarCellPropTypes);
|
|
31
32
|
const emit = defineEmits(calendarCellEmitTypes);
|
|
32
33
|
|
|
@@ -128,7 +128,7 @@ export type MinMaxYearType = {
|
|
|
128
128
|
|
|
129
129
|
export const datePickerEmitTypes = {
|
|
130
130
|
'update:modelValue': (value: string) => typeof value === 'string',
|
|
131
|
-
getInputValue: (value: string) => typeof value === 'string',
|
|
131
|
+
getInputValue: (value: string | null) => value === null || typeof value === 'string',
|
|
132
132
|
getDateFormats: (value: Record<string, string>) => {
|
|
133
133
|
return (
|
|
134
134
|
typeof value === 'object' &&
|
|
@@ -170,13 +170,16 @@
|
|
|
170
170
|
'spr-text-color-brand-base': calendarTabIsTodayIndicator(day) && !calendarTabIsSelectedDate(day),
|
|
171
171
|
|
|
172
172
|
// Active Month Dates - only apply if not selected and not today
|
|
173
|
-
'spr-text-color-strong':
|
|
173
|
+
'spr-text-color-strong':
|
|
174
|
+
calendarTabIsActiveMonthDates(day) &&
|
|
175
|
+
!calendarTabIsSelectedDate(day) &&
|
|
176
|
+
!calendarTabIsTodayIndicator(day),
|
|
174
177
|
|
|
175
178
|
// Inactive Month Dates (Past/Future)
|
|
176
179
|
'spr-text-color-disabled': calendarTabIsInactiveMonthDates(day),
|
|
177
180
|
|
|
178
181
|
// Selected Date
|
|
179
|
-
'spr-background-color-brand-base active:spr-background-color-brand-pressed spr-text-color-inverted-strong spr-cursor-pointer
|
|
182
|
+
'spr-background-color-brand-base active:spr-background-color-brand-pressed spr-text-color-inverted-strong spr-cursor-pointer !spr-text-white-50 active:spr-scale-95':
|
|
180
183
|
calendarTabIsSelectedDate(day),
|
|
181
184
|
|
|
182
185
|
// Unselected Date
|
|
@@ -615,7 +615,7 @@ export const useDatePicker = (props: DatePickerPropTypes, emit: SetupContext<Dat
|
|
|
615
615
|
if (modelValue.value) {
|
|
616
616
|
// First try to parse with the specified format, then try default format as fallback
|
|
617
617
|
let formattedDate = dayjs(modelValue.value, format.value);
|
|
618
|
-
|
|
618
|
+
|
|
619
619
|
// If the date is not valid with the specified format, try with the default format
|
|
620
620
|
if (!formattedDate.isValid()) {
|
|
621
621
|
formattedDate = dayjs(modelValue.value, 'MM-DD-YYYY');
|
|
@@ -655,7 +655,11 @@ export const useDatePicker = (props: DatePickerPropTypes, emit: SetupContext<Dat
|
|
|
655
655
|
emitDateFormats();
|
|
656
656
|
|
|
657
657
|
// Use the specified format for the input value
|
|
658
|
-
|
|
658
|
+
if (!monthInput.value && !dateInput.value && !yearInput.value) {
|
|
659
|
+
emit('getInputValue', null);
|
|
660
|
+
} else {
|
|
661
|
+
emit('getInputValue', formattedDate.format(format.value));
|
|
662
|
+
}
|
|
659
663
|
} else {
|
|
660
664
|
console.error(`Error: Could not parse date "${modelValue.value}" with format "${format.value}"`);
|
|
661
665
|
}
|
|
@@ -879,10 +883,13 @@ export const useDatePicker = (props: DatePickerPropTypes, emit: SetupContext<Dat
|
|
|
879
883
|
|
|
880
884
|
// Format the date according to the format prop
|
|
881
885
|
const dateObj = dayjs(`${emittedMonth}-${dateInput.value}-${yearInput.value}`, 'MM-DD-YYYY');
|
|
882
|
-
|
|
886
|
+
|
|
883
887
|
// Use the specified format for the input value
|
|
884
|
-
|
|
885
|
-
|
|
888
|
+
if (!monthInput.value && !dateInput.value && !yearInput.value) {
|
|
889
|
+
emit('getInputValue', null);
|
|
890
|
+
} else {
|
|
891
|
+
emit('getInputValue', dateObj.format(format.value));
|
|
892
|
+
}
|
|
886
893
|
};
|
|
887
894
|
|
|
888
895
|
const emitMonthList = () => {
|
|
File without changes
|