@aotearoan/neon 8.0.3-beta.1 → 9.0.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.
- package/dist/common/utils/NeonDateUtils.cjs.js +1 -1
- package/dist/common/utils/NeonDateUtils.cjs.js.map +1 -1
- package/dist/common/utils/NeonDateUtils.d.ts +2 -1
- package/dist/common/utils/NeonDateUtils.es.js +3 -3
- package/dist/common/utils/NeonDateUtils.es.js.map +1 -1
- package/dist/components/feedback/alert/NeonAlert.cjs.js +1 -1
- package/dist/components/feedback/alert/NeonAlert.es.js +12 -12
- package/dist/components/feedback/dialog/NeonDialog.cjs.js +1 -1
- package/dist/components/feedback/dialog/NeonDialog.d.ts +1 -0
- package/dist/components/feedback/dialog/NeonDialog.es.js +7 -4
- package/dist/components/feedback/dialog/NeonDialog.es.js.map +1 -1
- package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js +1 -1
- package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js.map +1 -1
- package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js +13 -2
- package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js.map +1 -1
- package/dist/components/feedback/tooltip/NeonTooltip.cjs.js +1 -1
- package/dist/components/feedback/tooltip/NeonTooltip.es.js +7 -7
- package/dist/components/layout/drawer/NeonDrawer.cjs.js +1 -1
- package/dist/components/layout/drawer/NeonDrawer.es.js +2 -2
- package/dist/components/layout/grid/NeonGrid.cjs.js +1 -1
- package/dist/components/layout/grid/NeonGrid.es.js +2 -2
- package/dist/components/presentation/tabs/tab/NeonTab.cjs.js +1 -1
- package/dist/components/presentation/tabs/tab/NeonTab.es.js +1 -1
- package/dist/components/user-input/color/NeonColor.cjs.js +1 -1
- package/dist/components/user-input/color/NeonColor.d.ts +12 -0
- package/dist/components/user-input/color/NeonColor.es.js +2 -1
- package/dist/components/user-input/color/NeonColor.es.js.map +1 -1
- package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js +1 -1
- package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js.map +1 -1
- package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.es.js +1 -0
- package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.es.js.map +1 -1
- package/dist/components/user-input/date-picker/NeonDatePicker.ts_vue_type_script_src_dd58960a_lang.cjs.js +1 -1
- package/dist/components/user-input/date-picker/NeonDatePicker.ts_vue_type_script_src_dd58960a_lang.cjs.js.map +1 -1
- package/dist/components/user-input/date-picker/NeonDatePicker.ts_vue_type_script_src_dd58960a_lang.es.js +1 -1
- package/dist/components/user-input/date-picker/NeonDatePicker.ts_vue_type_script_src_dd58960a_lang.es.js.map +1 -1
- package/dist/components/user-input/drop-zone/NeonDropZone.cjs.js +1 -1
- package/dist/components/user-input/drop-zone/NeonDropZone.es.js +2 -2
- package/dist/components/user-input/field/NeonField.cjs.js +2 -0
- package/dist/components/user-input/field/NeonField.cjs.js.map +1 -0
- package/dist/components/user-input/field/NeonField.d.ts +114 -0
- package/dist/components/user-input/field/NeonField.es.js +37 -0
- package/dist/components/user-input/field/NeonField.es.js.map +1 -0
- package/dist/components/user-input/field/NeonField.ts_vue_type_script_src_d5c469d0_lang.cjs.js +2 -0
- package/dist/components/user-input/field/NeonField.ts_vue_type_script_src_d5c469d0_lang.cjs.js.map +1 -0
- package/dist/components/user-input/field/NeonField.ts_vue_type_script_src_d5c469d0_lang.es.js +20 -0
- package/dist/components/user-input/field/NeonField.ts_vue_type_script_src_d5c469d0_lang.es.js.map +1 -0
- package/dist/components/user-input/field/NeonField.vue.d.ts +2 -0
- package/dist/components/user-input/input/NeonInput.cjs.js +1 -1
- package/dist/components/user-input/input/NeonInput.d.ts +0 -30
- package/dist/components/user-input/input/NeonInput.es.js +2 -7
- package/dist/components/user-input/input/NeonInput.es.js.map +1 -1
- package/dist/components/user-input/input/NeonInput.ts_vue_type_script_src_1b21b690_lang.cjs.js +1 -1
- package/dist/components/user-input/input/NeonInput.ts_vue_type_script_src_1b21b690_lang.cjs.js.map +1 -1
- package/dist/components/user-input/input/NeonInput.ts_vue_type_script_src_1b21b690_lang.es.js +1 -3
- package/dist/components/user-input/input/NeonInput.ts_vue_type_script_src_1b21b690_lang.es.js.map +1 -1
- package/dist/components/user-input/range-slider/NeonRangeSlider.cjs.js +1 -1
- package/dist/components/user-input/range-slider/NeonRangeSlider.es.js +26 -26
- package/dist/components/user-input/select/NeonSelect.cjs.js +1 -1
- package/dist/components/user-input/select/NeonSelect.es.js +9 -10
- package/dist/components/user-input/select/NeonSelect.es.js.map +1 -1
- package/dist/components/user-input/slider/NeonSlider.cjs.js +1 -1
- package/dist/components/user-input/slider/NeonSlider.es.js +3 -2
- package/dist/components/user-input/slider/NeonSlider.es.js.map +1 -1
- package/dist/neon.cjs.js +1 -1
- package/dist/neon.d.ts +1 -1
- package/dist/neon.es.js +1 -1
- package/package.json +1 -1
- package/src/sass/{colors.scss → color-variables.scss} +3 -101
- package/src/sass/components/_button.scss +1 -1
- package/src/sass/components/_color.scss +1 -0
- package/src/sass/components/_date-picker.scss +1 -1
- package/src/sass/components/{_field-label.scss → _field.scss} +23 -10
- package/src/sass/components/_input.scss +0 -15
- package/src/sass/components/components.scss +1 -1
- package/src/sass/global/_base-html.scss +31 -0
- package/src/sass/global/_layout.scss +0 -6
- package/src/sass/global/_typography.scss +1 -1
- package/src/sass/includes/_dependencies.scss +1 -1
- package/src/sass/palette.scss +110 -0
- package/src/sass/theme.scss +2 -2
- package/src/sass/variables.scss +6 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class l{static stringToNeonDate(
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});class l{static stringToNeonDate(t,o,e=!1){const n=o||navigator.language,g=new Date,a=new Date(!e&&t.length===10?`${t}T${g.toISOString().split("T")[1]}`:t);let s;t.length>10&&(s=a.toLocaleString(n,t.length<=16?{hour12:!1,hour:"2-digit",minute:"2-digit"}:{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"}));const d={year:+a.toLocaleString("en-US",{year:"numeric"}),yearFormatted:a.toLocaleString(n,{year:"numeric"}),month:+a.toLocaleString("en-US",{month:"numeric"}),monthShortName:a.toLocaleString(n,{month:"short"}),monthLongName:a.toLocaleString(n,{month:"long"}),day:+a.toLocaleString("en-US",{day:"numeric"}),dayFormatted:a.toLocaleString(n,{day:"2-digit"})};return s&&(d.time=s),d}static dateToIso(t,o=!1){const e=t.toISOString();return o?e:e.split("T")[0]}static dmyToIso(t,o,e){return`${e}-${o<10?"0"+o:o}-${t<10?"0"+t:t}`}static dowNames(t){const o=t||navigator.language,e=new Date,n=[];for(;!n[e.getDay()];)n[e.getDay()]=e.toLocaleString(o,{weekday:"short"}),e.setDate(e.getDate()+1);const g=n.shift();return g&&n.push(g),n}static monthNames(t){const o=t||navigator.language;return Array.from(Array(12).keys()).map(e=>new Date(2023,e,15).toLocaleString(o,{month:"short"}))}static toCalendarConfiguration(t,o,e,n,g){const a=g||navigator.language,s=l.stringToNeonDate(l.dateToIso(new Date),a),d=t?l.stringToNeonDate(t,a,!0):void 0,h=o||s.month,f=o&&e?new Date(e,o-1,15):null,L=(f==null?void 0:f.toLocaleString(a,{month:"long"}))||s.monthLongName,u=e||s.year,T=n||Math.floor(u/10)*10,m=new Date(u,(h+11)%12,1),S=new Date(u,(h+11)%12,1);S.setDate(S.getDate()-1);const r=[];let y=1,w=!1;for(let i=0;i<6;i++){r[i]=[];for(let c=0;c<7;c++)if(i===0&&c<S.getDay())r[i][c]=null;else if(r[i][c]=m.getDate(),y=m.getDate(),m.setDate(m.getDate()+1),m.getDate()===1){for(let D=c+1;D<7;D++)r[i][D]=null;w=!0;break}if(w)break}return r[r.length-1].length===0&&delete r[r.length-1],{today:s,selected:d,pageMonth:h,pageMonthName:L,pageYear:u,pageDecadeStart:T,dowNames:l.dowNames(a),dates:r,lastDayOfMonth:y,months:l.monthNames(a)}}}exports.NeonDateUtils=l;
|
|
2
2
|
//# sourceMappingURL=NeonDateUtils.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonDateUtils.cjs.js","sources":["../../../src/common/utils/NeonDateUtils.ts"],"sourcesContent":["import type { NeonCalendarConfig } from '@/common/models/NeonCalendarConfig';\nimport type { NeonDate } from '@/common/models/NeonDate';\n\nexport class NeonDateUtils {\n /**\n * Convert an ISO 8601 formatted string to a locale formatted date with a three letter month, a 2 digit day and a locale formatted time.\n * @param date The date/time as an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> string.\n * @param locale The locale for which to convert the date for display purposes, defaults to browser locale.\n */\n public static stringToNeonDate(date: string, locale?: string): NeonDate {\n const loc = locale || navigator.language;\n const now = new Date();\n const dateObj = new Date(date.length === 10 ? `${date}T${now.toISOString().split('T')[1]}` : date);\n let time;\n if (date.length > 10) {\n time = dateObj.toLocaleString(\n loc,\n date.length <= 16\n ? { hour12: false, hour: '2-digit', minute: '2-digit' }\n : { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' },\n );\n }\n\n const result: NeonDate = {\n year: +dateObj.toLocaleString('en-US', { year: 'numeric' }),\n yearFormatted: dateObj.toLocaleString(loc, { year: 'numeric' }),\n month: +dateObj.toLocaleString('en-US', { month: 'numeric' }),\n monthShortName: dateObj.toLocaleString(loc, { month: 'short' }),\n monthLongName: dateObj.toLocaleString(loc, { month: 'long' }),\n day: +dateObj.toLocaleString('en-US', { day: 'numeric' }),\n dayFormatted: dateObj.toLocaleString(loc, { day: '2-digit' }),\n };\n\n if (time) {\n result.time = time;\n }\n\n return result;\n }\n\n public static dateToIso(date: Date, time = false): string {\n const dateString = date.toISOString();\n return time ? dateString : dateString.split('T')[0];\n }\n\n public static dmyToIso(day: number, month: number, year: number): string {\n return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;\n }\n\n public static dowNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n const date = new Date();\n\n const weekdays = [];\n while (!weekdays[date.getDay()]) {\n weekdays[date.getDay()] = date.toLocaleString(loc, { weekday: 'short' });\n date.setDate(date.getDate() + 1);\n }\n\n const sunday = weekdays.shift();\n if (sunday) {\n weekdays.push(sunday);\n }\n\n return weekdays;\n }\n\n public static monthNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n\n return Array.from(Array(12).keys()).map((key) => {\n const date = new Date(2023, key, 15);\n return date.toLocaleString(loc, { month: 'short' });\n });\n }\n\n public static toCalendarConfiguration(\n selectedDate?: string,\n currentPageMonth?: number,\n currentPageYear?: number,\n currentPageDecadeStart?: number,\n locale?: string,\n ): NeonCalendarConfig {\n const loc = locale || navigator.language;\n const today = NeonDateUtils.stringToNeonDate(NeonDateUtils.dateToIso(new Date()), loc);\n const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc) : undefined;\n // month indexed from 1-12\n const pageMonth = currentPageMonth || today.month;\n\n // month indexed from 0-11\n const pageDate = currentPageMonth && currentPageYear ? new Date(currentPageYear, currentPageMonth - 1, 15) : null;\n const pageMonthName = pageDate?.toLocaleString(loc, { month: 'long' }) || today.monthLongName;\n const pageYear = currentPageYear || today.year;\n const pageDecadeStart = currentPageDecadeStart || Math.floor(pageYear / 10) * 10;\n\n // determine dow of first day of month. Months are indexed from 0 here\n const date = new Date(pageYear, (pageMonth + 11) % 12, 1);\n const offsetDate = new Date(pageYear, (pageMonth + 11) % 12, 1);\n offsetDate.setDate(offsetDate.getDate() - 1);\n\n const dates: Array<Array<number | null>> = [];\n\n let lastDayOfMonth = 1;\n let done = false;\n\n for (let row = 0; row < 6; row++) {\n dates[row] = [];\n\n for (let col = 0; col < 7; col++) {\n if (row === 0 && col < offsetDate.getDay()) {\n dates[row][col] = null;\n } else {\n dates[row][col] = date.getDate();\n lastDayOfMonth = date.getDate();\n date.setDate(date.getDate() + 1);\n\n if (date.getDate() === 1) {\n for (let i = col + 1; i < 7; i++) {\n dates[row][i] = null;\n }\n done = true;\n break;\n }\n }\n }\n\n if (done) {\n break;\n }\n }\n\n if (dates[dates.length - 1].length === 0) {\n delete dates[dates.length - 1];\n }\n\n return {\n today,\n selected,\n pageMonth,\n pageMonthName,\n pageYear,\n pageDecadeStart,\n dowNames: NeonDateUtils.dowNames(loc),\n dates,\n lastDayOfMonth,\n months: NeonDateUtils.monthNames(loc),\n };\n }\n}\n"],"names":["NeonDateUtils","date","locale","loc","now","dateObj","time","result","dateString","day","month","year","weekdays","sunday","key","selectedDate","currentPageMonth","currentPageYear","currentPageDecadeStart","today","selected","pageMonth","pageDate","pageMonthName","pageYear","pageDecadeStart","offsetDate","dates","lastDayOfMonth","done","row","col","i"],"mappings":"4GAGO,MAAMA,CAAc,
|
|
1
|
+
{"version":3,"file":"NeonDateUtils.cjs.js","sources":["../../../src/common/utils/NeonDateUtils.ts"],"sourcesContent":["import type { NeonCalendarConfig } from '@/common/models/NeonCalendarConfig';\nimport type { NeonDate } from '@/common/models/NeonDate';\n\nexport class NeonDateUtils {\n /**\n * Convert an ISO 8601 formatted string to a locale formatted date with a three letter month, a 2 digit day and a locale formatted time.\n * @param date The date/time as an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> string.\n * @param locale The locale for which to convert the date for display purposes, defaults to browser locale.\n * @param strict Do not add time component to localise the date.\n */\n public static stringToNeonDate(date: string, locale?: string, strict = false): NeonDate {\n const loc = locale || navigator.language;\n const now = new Date();\n const dateObj = new Date(!strict && date.length === 10 ? `${date}T${now.toISOString().split('T')[1]}` : date);\n let time;\n if (date.length > 10) {\n time = dateObj.toLocaleString(\n loc,\n date.length <= 16\n ? { hour12: false, hour: '2-digit', minute: '2-digit' }\n : { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' },\n );\n }\n\n const result: NeonDate = {\n year: +dateObj.toLocaleString('en-US', { year: 'numeric' }),\n yearFormatted: dateObj.toLocaleString(loc, { year: 'numeric' }),\n month: +dateObj.toLocaleString('en-US', { month: 'numeric' }),\n monthShortName: dateObj.toLocaleString(loc, { month: 'short' }),\n monthLongName: dateObj.toLocaleString(loc, { month: 'long' }),\n day: +dateObj.toLocaleString('en-US', { day: 'numeric' }),\n dayFormatted: dateObj.toLocaleString(loc, { day: '2-digit' }),\n };\n\n if (time) {\n result.time = time;\n }\n\n return result;\n }\n\n public static dateToIso(date: Date, time = false): string {\n const dateString = date.toISOString();\n return time ? dateString : dateString.split('T')[0];\n }\n\n public static dmyToIso(day: number, month: number, year: number): string {\n return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;\n }\n\n public static dowNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n const date = new Date();\n\n const weekdays = [];\n while (!weekdays[date.getDay()]) {\n weekdays[date.getDay()] = date.toLocaleString(loc, { weekday: 'short' });\n date.setDate(date.getDate() + 1);\n }\n\n const sunday = weekdays.shift();\n if (sunday) {\n weekdays.push(sunday);\n }\n\n return weekdays;\n }\n\n public static monthNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n\n return Array.from(Array(12).keys()).map((key) => {\n const date = new Date(2023, key, 15);\n return date.toLocaleString(loc, { month: 'short' });\n });\n }\n\n public static toCalendarConfiguration(\n selectedDate?: string,\n currentPageMonth?: number,\n currentPageYear?: number,\n currentPageDecadeStart?: number,\n locale?: string,\n ): NeonCalendarConfig {\n const loc = locale || navigator.language;\n const today = NeonDateUtils.stringToNeonDate(NeonDateUtils.dateToIso(new Date()), loc);\n const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc, true) : undefined;\n // month indexed from 1-12\n const pageMonth = currentPageMonth || today.month;\n\n // month indexed from 0-11\n const pageDate = currentPageMonth && currentPageYear ? new Date(currentPageYear, currentPageMonth - 1, 15) : null;\n const pageMonthName = pageDate?.toLocaleString(loc, { month: 'long' }) || today.monthLongName;\n const pageYear = currentPageYear || today.year;\n const pageDecadeStart = currentPageDecadeStart || Math.floor(pageYear / 10) * 10;\n\n // determine dow of first day of month. Months are indexed from 0 here\n const date = new Date(pageYear, (pageMonth + 11) % 12, 1);\n const offsetDate = new Date(pageYear, (pageMonth + 11) % 12, 1);\n offsetDate.setDate(offsetDate.getDate() - 1);\n\n const dates: Array<Array<number | null>> = [];\n\n let lastDayOfMonth = 1;\n let done = false;\n\n for (let row = 0; row < 6; row++) {\n dates[row] = [];\n\n for (let col = 0; col < 7; col++) {\n if (row === 0 && col < offsetDate.getDay()) {\n dates[row][col] = null;\n } else {\n dates[row][col] = date.getDate();\n lastDayOfMonth = date.getDate();\n date.setDate(date.getDate() + 1);\n\n if (date.getDate() === 1) {\n for (let i = col + 1; i < 7; i++) {\n dates[row][i] = null;\n }\n done = true;\n break;\n }\n }\n }\n\n if (done) {\n break;\n }\n }\n\n if (dates[dates.length - 1].length === 0) {\n delete dates[dates.length - 1];\n }\n\n return {\n today,\n selected,\n pageMonth,\n pageMonthName,\n pageYear,\n pageDecadeStart,\n dowNames: NeonDateUtils.dowNames(loc),\n dates,\n lastDayOfMonth,\n months: NeonDateUtils.monthNames(loc),\n };\n }\n}\n"],"names":["NeonDateUtils","date","locale","strict","loc","now","dateObj","time","result","dateString","day","month","year","weekdays","sunday","key","selectedDate","currentPageMonth","currentPageYear","currentPageDecadeStart","today","selected","pageMonth","pageDate","pageMonthName","pageYear","pageDecadeStart","offsetDate","dates","lastDayOfMonth","done","row","col","i"],"mappings":"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"}
|
|
@@ -5,8 +5,9 @@ export declare class NeonDateUtils {
|
|
|
5
5
|
* Convert an ISO 8601 formatted string to a locale formatted date with a three letter month, a 2 digit day and a locale formatted time.
|
|
6
6
|
* @param date The date/time as an <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a> string.
|
|
7
7
|
* @param locale The locale for which to convert the date for display purposes, defaults to browser locale.
|
|
8
|
+
* @param strict Do not add time component to localise the date.
|
|
8
9
|
*/
|
|
9
|
-
static stringToNeonDate(date: string, locale?: string): NeonDate;
|
|
10
|
+
static stringToNeonDate(date: string, locale?: string, strict?: boolean): NeonDate;
|
|
10
11
|
static dateToIso(date: Date, time?: boolean): string;
|
|
11
12
|
static dmyToIso(day: number, month: number, year: number): string;
|
|
12
13
|
static dowNames(locale?: string): Array<string>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
class NeonDateUtils {
|
|
2
|
-
static stringToNeonDate(date, locale) {
|
|
2
|
+
static stringToNeonDate(date, locale, strict = false) {
|
|
3
3
|
const loc = locale || navigator.language;
|
|
4
4
|
const now = new Date();
|
|
5
|
-
const dateObj = new Date(date.length === 10 ? `${date}T${now.toISOString().split("T")[1]}` : date);
|
|
5
|
+
const dateObj = new Date(!strict && date.length === 10 ? `${date}T${now.toISOString().split("T")[1]}` : date);
|
|
6
6
|
let time;
|
|
7
7
|
if (date.length > 10) {
|
|
8
8
|
time = dateObj.toLocaleString(
|
|
@@ -55,7 +55,7 @@ class NeonDateUtils {
|
|
|
55
55
|
static toCalendarConfiguration(selectedDate, currentPageMonth, currentPageYear, currentPageDecadeStart, locale) {
|
|
56
56
|
const loc = locale || navigator.language;
|
|
57
57
|
const today = NeonDateUtils.stringToNeonDate(NeonDateUtils.dateToIso(new Date()), loc);
|
|
58
|
-
const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc) : void 0;
|
|
58
|
+
const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc, true) : void 0;
|
|
59
59
|
const pageMonth = currentPageMonth || today.month;
|
|
60
60
|
const pageDate = currentPageMonth && currentPageYear ? new Date(currentPageYear, currentPageMonth - 1, 15) : null;
|
|
61
61
|
const pageMonthName = (pageDate == null ? void 0 : pageDate.toLocaleString(loc, { month: "long" })) || today.monthLongName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonDateUtils.es.js","sources":["../../../src/common/utils/NeonDateUtils.ts"],"sourcesContent":["import type { NeonCalendarConfig } from '@/common/models/NeonCalendarConfig';\nimport type { NeonDate } from '@/common/models/NeonDate';\n\nexport class NeonDateUtils {\n /**\n * Convert an ISO 8601 formatted string to a locale formatted date with a three letter month, a 2 digit day and a locale formatted time.\n * @param date The date/time as an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> string.\n * @param locale The locale for which to convert the date for display purposes, defaults to browser locale.\n */\n public static stringToNeonDate(date: string, locale?: string): NeonDate {\n const loc = locale || navigator.language;\n const now = new Date();\n const dateObj = new Date(date.length === 10 ? `${date}T${now.toISOString().split('T')[1]}` : date);\n let time;\n if (date.length > 10) {\n time = dateObj.toLocaleString(\n loc,\n date.length <= 16\n ? { hour12: false, hour: '2-digit', minute: '2-digit' }\n : { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' },\n );\n }\n\n const result: NeonDate = {\n year: +dateObj.toLocaleString('en-US', { year: 'numeric' }),\n yearFormatted: dateObj.toLocaleString(loc, { year: 'numeric' }),\n month: +dateObj.toLocaleString('en-US', { month: 'numeric' }),\n monthShortName: dateObj.toLocaleString(loc, { month: 'short' }),\n monthLongName: dateObj.toLocaleString(loc, { month: 'long' }),\n day: +dateObj.toLocaleString('en-US', { day: 'numeric' }),\n dayFormatted: dateObj.toLocaleString(loc, { day: '2-digit' }),\n };\n\n if (time) {\n result.time = time;\n }\n\n return result;\n }\n\n public static dateToIso(date: Date, time = false): string {\n const dateString = date.toISOString();\n return time ? dateString : dateString.split('T')[0];\n }\n\n public static dmyToIso(day: number, month: number, year: number): string {\n return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;\n }\n\n public static dowNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n const date = new Date();\n\n const weekdays = [];\n while (!weekdays[date.getDay()]) {\n weekdays[date.getDay()] = date.toLocaleString(loc, { weekday: 'short' });\n date.setDate(date.getDate() + 1);\n }\n\n const sunday = weekdays.shift();\n if (sunday) {\n weekdays.push(sunday);\n }\n\n return weekdays;\n }\n\n public static monthNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n\n return Array.from(Array(12).keys()).map((key) => {\n const date = new Date(2023, key, 15);\n return date.toLocaleString(loc, { month: 'short' });\n });\n }\n\n public static toCalendarConfiguration(\n selectedDate?: string,\n currentPageMonth?: number,\n currentPageYear?: number,\n currentPageDecadeStart?: number,\n locale?: string,\n ): NeonCalendarConfig {\n const loc = locale || navigator.language;\n const today = NeonDateUtils.stringToNeonDate(NeonDateUtils.dateToIso(new Date()), loc);\n const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc) : undefined;\n // month indexed from 1-12\n const pageMonth = currentPageMonth || today.month;\n\n // month indexed from 0-11\n const pageDate = currentPageMonth && currentPageYear ? new Date(currentPageYear, currentPageMonth - 1, 15) : null;\n const pageMonthName = pageDate?.toLocaleString(loc, { month: 'long' }) || today.monthLongName;\n const pageYear = currentPageYear || today.year;\n const pageDecadeStart = currentPageDecadeStart || Math.floor(pageYear / 10) * 10;\n\n // determine dow of first day of month. Months are indexed from 0 here\n const date = new Date(pageYear, (pageMonth + 11) % 12, 1);\n const offsetDate = new Date(pageYear, (pageMonth + 11) % 12, 1);\n offsetDate.setDate(offsetDate.getDate() - 1);\n\n const dates: Array<Array<number | null>> = [];\n\n let lastDayOfMonth = 1;\n let done = false;\n\n for (let row = 0; row < 6; row++) {\n dates[row] = [];\n\n for (let col = 0; col < 7; col++) {\n if (row === 0 && col < offsetDate.getDay()) {\n dates[row][col] = null;\n } else {\n dates[row][col] = date.getDate();\n lastDayOfMonth = date.getDate();\n date.setDate(date.getDate() + 1);\n\n if (date.getDate() === 1) {\n for (let i = col + 1; i < 7; i++) {\n dates[row][i] = null;\n }\n done = true;\n break;\n }\n }\n }\n\n if (done) {\n break;\n }\n }\n\n if (dates[dates.length - 1].length === 0) {\n delete dates[dates.length - 1];\n }\n\n return {\n today,\n selected,\n pageMonth,\n pageMonthName,\n pageYear,\n pageDecadeStart,\n dowNames: NeonDateUtils.dowNames(loc),\n dates,\n lastDayOfMonth,\n months: NeonDateUtils.monthNames(loc),\n };\n }\n}\n"],"names":[],"mappings":"AAGO,MAAM,cAAc;AAAA,
|
|
1
|
+
{"version":3,"file":"NeonDateUtils.es.js","sources":["../../../src/common/utils/NeonDateUtils.ts"],"sourcesContent":["import type { NeonCalendarConfig } from '@/common/models/NeonCalendarConfig';\nimport type { NeonDate } from '@/common/models/NeonDate';\n\nexport class NeonDateUtils {\n /**\n * Convert an ISO 8601 formatted string to a locale formatted date with a three letter month, a 2 digit day and a locale formatted time.\n * @param date The date/time as an <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> string.\n * @param locale The locale for which to convert the date for display purposes, defaults to browser locale.\n * @param strict Do not add time component to localise the date.\n */\n public static stringToNeonDate(date: string, locale?: string, strict = false): NeonDate {\n const loc = locale || navigator.language;\n const now = new Date();\n const dateObj = new Date(!strict && date.length === 10 ? `${date}T${now.toISOString().split('T')[1]}` : date);\n let time;\n if (date.length > 10) {\n time = dateObj.toLocaleString(\n loc,\n date.length <= 16\n ? { hour12: false, hour: '2-digit', minute: '2-digit' }\n : { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' },\n );\n }\n\n const result: NeonDate = {\n year: +dateObj.toLocaleString('en-US', { year: 'numeric' }),\n yearFormatted: dateObj.toLocaleString(loc, { year: 'numeric' }),\n month: +dateObj.toLocaleString('en-US', { month: 'numeric' }),\n monthShortName: dateObj.toLocaleString(loc, { month: 'short' }),\n monthLongName: dateObj.toLocaleString(loc, { month: 'long' }),\n day: +dateObj.toLocaleString('en-US', { day: 'numeric' }),\n dayFormatted: dateObj.toLocaleString(loc, { day: '2-digit' }),\n };\n\n if (time) {\n result.time = time;\n }\n\n return result;\n }\n\n public static dateToIso(date: Date, time = false): string {\n const dateString = date.toISOString();\n return time ? dateString : dateString.split('T')[0];\n }\n\n public static dmyToIso(day: number, month: number, year: number): string {\n return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;\n }\n\n public static dowNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n const date = new Date();\n\n const weekdays = [];\n while (!weekdays[date.getDay()]) {\n weekdays[date.getDay()] = date.toLocaleString(loc, { weekday: 'short' });\n date.setDate(date.getDate() + 1);\n }\n\n const sunday = weekdays.shift();\n if (sunday) {\n weekdays.push(sunday);\n }\n\n return weekdays;\n }\n\n public static monthNames(locale?: string): Array<string> {\n const loc = locale || navigator.language;\n\n return Array.from(Array(12).keys()).map((key) => {\n const date = new Date(2023, key, 15);\n return date.toLocaleString(loc, { month: 'short' });\n });\n }\n\n public static toCalendarConfiguration(\n selectedDate?: string,\n currentPageMonth?: number,\n currentPageYear?: number,\n currentPageDecadeStart?: number,\n locale?: string,\n ): NeonCalendarConfig {\n const loc = locale || navigator.language;\n const today = NeonDateUtils.stringToNeonDate(NeonDateUtils.dateToIso(new Date()), loc);\n const selected = selectedDate ? NeonDateUtils.stringToNeonDate(selectedDate, loc, true) : undefined;\n // month indexed from 1-12\n const pageMonth = currentPageMonth || today.month;\n\n // month indexed from 0-11\n const pageDate = currentPageMonth && currentPageYear ? new Date(currentPageYear, currentPageMonth - 1, 15) : null;\n const pageMonthName = pageDate?.toLocaleString(loc, { month: 'long' }) || today.monthLongName;\n const pageYear = currentPageYear || today.year;\n const pageDecadeStart = currentPageDecadeStart || Math.floor(pageYear / 10) * 10;\n\n // determine dow of first day of month. Months are indexed from 0 here\n const date = new Date(pageYear, (pageMonth + 11) % 12, 1);\n const offsetDate = new Date(pageYear, (pageMonth + 11) % 12, 1);\n offsetDate.setDate(offsetDate.getDate() - 1);\n\n const dates: Array<Array<number | null>> = [];\n\n let lastDayOfMonth = 1;\n let done = false;\n\n for (let row = 0; row < 6; row++) {\n dates[row] = [];\n\n for (let col = 0; col < 7; col++) {\n if (row === 0 && col < offsetDate.getDay()) {\n dates[row][col] = null;\n } else {\n dates[row][col] = date.getDate();\n lastDayOfMonth = date.getDate();\n date.setDate(date.getDate() + 1);\n\n if (date.getDate() === 1) {\n for (let i = col + 1; i < 7; i++) {\n dates[row][i] = null;\n }\n done = true;\n break;\n }\n }\n }\n\n if (done) {\n break;\n }\n }\n\n if (dates[dates.length - 1].length === 0) {\n delete dates[dates.length - 1];\n }\n\n return {\n today,\n selected,\n pageMonth,\n pageMonthName,\n pageYear,\n pageDecadeStart,\n dowNames: NeonDateUtils.dowNames(loc),\n dates,\n lastDayOfMonth,\n months: NeonDateUtils.monthNames(loc),\n };\n }\n}\n"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var a=require("./NeonAlert.ts_vue_type_script_src_cfa5c5ce_lang.cjs.js"),l=require("vue"),p=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const u={class:"neon-alert__wrapper"};function m(e,o,s,V,i,v){const n=l.resolveComponent("neon-alert-container"),r=l.resolveComponent("neon-toast-container");return l.openBlock(),l.createElementBlock("div",u,[l.createVNode(n,{
|
|
1
|
+
"use strict";var a=require("./NeonAlert.ts_vue_type_script_src_cfa5c5ce_lang.cjs.js"),l=require("vue"),p=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const u={class:"neon-alert__wrapper"};function m(e,o,s,V,i,v){const n=l.resolveComponent("neon-alert-container"),r=l.resolveComponent("neon-toast-container");return l.openBlock(),l.createElementBlock("div",u,[l.createVNode(n,{modelValue:e.topLeft,"onUpdate:modelValue":o[0]||(o[0]=t=>e.topLeft=t),placement:"top-left"},null,8,["modelValue"]),l.createVNode(n,{modelValue:e.topRight,"onUpdate:modelValue":o[1]||(o[1]=t=>e.topRight=t),placement:"top-right"},null,8,["modelValue"]),l.createVNode(n,{modelValue:e.bottomLeft,"onUpdate:modelValue":o[2]||(o[2]=t=>e.bottomLeft=t),placement:"bottom-left"},null,8,["modelValue"]),l.createVNode(n,{modelValue:e.bottomRight,"onUpdate:modelValue":o[3]||(o[3]=t=>e.bottomRight=t),placement:"bottom-right"},null,8,["modelValue"]),l.createVNode(r,{modelValue:e.top,"onUpdate:modelValue":o[4]||(o[4]=t=>e.top=t),placement:"top"},null,8,["modelValue"]),l.createVNode(r,{modelValue:e.bottom,"onUpdate:modelValue":o[5]||(o[5]=t=>e.bottom=t),placement:"bottom"},null,8,["modelValue"])])}var d=p(a,[["render",m],["__file","/Users/andrew/dev/projects/neon/src/components/feedback/alert/NeonAlert.vue"]]);module.exports=d;
|
|
2
2
|
//# sourceMappingURL=NeonAlert.cjs.js.map
|
|
@@ -7,34 +7,34 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
7
7
|
const _component_neon_toast_container = resolveComponent("neon-toast-container");
|
|
8
8
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
9
9
|
createVNode(_component_neon_alert_container, {
|
|
10
|
-
placement: "top-left",
|
|
11
10
|
modelValue: _ctx.topLeft,
|
|
12
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.topLeft = $event)
|
|
11
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.topLeft = $event),
|
|
12
|
+
placement: "top-left"
|
|
13
13
|
}, null, 8, ["modelValue"]),
|
|
14
14
|
createVNode(_component_neon_alert_container, {
|
|
15
|
-
placement: "top-right",
|
|
16
15
|
modelValue: _ctx.topRight,
|
|
17
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.topRight = $event)
|
|
16
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.topRight = $event),
|
|
17
|
+
placement: "top-right"
|
|
18
18
|
}, null, 8, ["modelValue"]),
|
|
19
19
|
createVNode(_component_neon_alert_container, {
|
|
20
|
-
placement: "bottom-left",
|
|
21
20
|
modelValue: _ctx.bottomLeft,
|
|
22
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.bottomLeft = $event)
|
|
21
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.bottomLeft = $event),
|
|
22
|
+
placement: "bottom-left"
|
|
23
23
|
}, null, 8, ["modelValue"]),
|
|
24
24
|
createVNode(_component_neon_alert_container, {
|
|
25
|
-
placement: "bottom-right",
|
|
26
25
|
modelValue: _ctx.bottomRight,
|
|
27
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.bottomRight = $event)
|
|
26
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.bottomRight = $event),
|
|
27
|
+
placement: "bottom-right"
|
|
28
28
|
}, null, 8, ["modelValue"]),
|
|
29
29
|
createVNode(_component_neon_toast_container, {
|
|
30
|
-
placement: "top",
|
|
31
30
|
modelValue: _ctx.top,
|
|
32
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.top = $event)
|
|
31
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.top = $event),
|
|
32
|
+
placement: "top"
|
|
33
33
|
}, null, 8, ["modelValue"]),
|
|
34
34
|
createVNode(_component_neon_toast_container, {
|
|
35
|
-
placement: "bottom",
|
|
36
35
|
modelValue: _ctx.bottom,
|
|
37
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.bottom = $event)
|
|
36
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.bottom = $event),
|
|
37
|
+
placement: "bottom"
|
|
38
38
|
}, null, 8, ["modelValue"])
|
|
39
39
|
]);
|
|
40
40
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=require("./NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js"),e=require("vue"),c=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const
|
|
1
|
+
"use strict";var s=require("./NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js"),e=require("vue"),c=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const d={class:"neon-dialog__title"},u=["innerHTML"],p={ref:"actions"};function _(o,n,b,m,f,g){const l=e.resolveComponent("neon-button"),a=e.resolveComponent("neon-card-body"),r=e.resolveComponent("neon-card"),i=e.resolveComponent("neon-modal");return e.openBlock(),e.createBlock(i,{opaque:o.opaque,open:o.open,class:"neon-dialog",onKeydown:n[2]||(n[2]=e.withKeys(t=>o.cancel(),["esc"]))},{default:e.withCtx(()=>[e.createVNode(r,{size:"m"},{default:e.withCtx(()=>[e.createVNode(a,null,{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createElementVNode("h6",d,e.toDisplayString(o.title),1),e.createElementVNode("div",{class:"neon-dialog__question",innerHTML:o.question},null,8,u)]),e.createElementVNode("div",p,[e.createVNode(l,{"aria-label":o.cancelLabel,"full-width":!0,label:o.cancelLabel,size:"s",onClick:n[0]||(n[0]=t=>o.cancel())},null,8,["aria-label","label"]),e.createVNode(l,{"alternate-color":o.alternateColor,"aria-label":o.confirmLabel,color:o.color,"full-width":!0,label:o.confirmLabel,class:"neon-dialog__confirm-button",size:"s",onClick:n[1]||(n[1]=t=>o.confirm())},null,8,["alternate-color","aria-label","color","label"])],512)]),_:1})]),_:1})]),_:1},8,["opaque","open"])}var v=c(s,[["render",_],["__file","/Users/andrew/dev/projects/neon/src/components/feedback/dialog/NeonDialog.vue"]]);module.exports=v;
|
|
2
2
|
//# sourceMappingURL=NeonDialog.cjs.js.map
|
|
@@ -61,6 +61,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
61
61
|
default: boolean;
|
|
62
62
|
};
|
|
63
63
|
}, {
|
|
64
|
+
actions: import("vue").Ref<HTMLDivElement | null>;
|
|
64
65
|
cancel: () => void;
|
|
65
66
|
confirm: () => void;
|
|
66
67
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "confirm")[], "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _sfc_main from "./NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js";
|
|
2
|
-
import { resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, toDisplayString } from "vue";
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, withKeys, withCtx, createVNode, createElementVNode, toDisplayString } from "vue";
|
|
3
3
|
import _export_sfc from "../../../_virtual/plugin-vue_export-helper.es.js";
|
|
4
4
|
const _hoisted_1 = { class: "neon-dialog__title" };
|
|
5
5
|
const _hoisted_2 = ["innerHTML"];
|
|
6
|
+
const _hoisted_3 = { ref: "actions" };
|
|
6
7
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7
8
|
const _component_neon_button = resolveComponent("neon-button");
|
|
8
9
|
const _component_neon_card_body = resolveComponent("neon-card-body");
|
|
@@ -11,7 +12,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
11
12
|
return openBlock(), createBlock(_component_neon_modal, {
|
|
12
13
|
opaque: _ctx.opaque,
|
|
13
14
|
open: _ctx.open,
|
|
14
|
-
class: "neon-dialog"
|
|
15
|
+
class: "neon-dialog",
|
|
16
|
+
onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => _ctx.cancel(), ["esc"]))
|
|
15
17
|
}, {
|
|
16
18
|
default: withCtx(() => [
|
|
17
19
|
createVNode(_component_neon_card, { size: "m" }, {
|
|
@@ -25,7 +27,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25
27
|
innerHTML: _ctx.question
|
|
26
28
|
}, null, 8, _hoisted_2)
|
|
27
29
|
]),
|
|
28
|
-
createElementVNode("div",
|
|
30
|
+
createElementVNode("div", _hoisted_3, [
|
|
29
31
|
createVNode(_component_neon_button, {
|
|
30
32
|
"aria-label": _ctx.cancelLabel,
|
|
31
33
|
"full-width": true,
|
|
@@ -39,10 +41,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
39
41
|
color: _ctx.color,
|
|
40
42
|
"full-width": true,
|
|
41
43
|
label: _ctx.confirmLabel,
|
|
44
|
+
class: "neon-dialog__confirm-button",
|
|
42
45
|
size: "s",
|
|
43
46
|
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.confirm())
|
|
44
47
|
}, null, 8, ["alternate-color", "aria-label", "color", "label"])
|
|
45
|
-
])
|
|
48
|
+
], 512)
|
|
46
49
|
]),
|
|
47
50
|
_: 1
|
|
48
51
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonDialog.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NeonDialog.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=require("vue"),u=require("../../../common/enums/NeonFunctionalColor.cjs.js"),c=require("../../user-input/button/NeonButton.cjs.js"),i=require("../../layout/card/NeonCard.cjs.js"),s=require("../../layout/card/body/NeonCardBody.cjs.js"),d=require("../../layout/modal/NeonModal.cjs.js"),f=n.defineComponent({name:"NeonDialog",components:{NeonButton:c,NeonCard:i,NeonCardBody:s,NeonModal:d},props:{color:{type:String,default:u.NeonFunctionalColor.Primary},alternateColor:{type:String,default:null},cancelLabel:{type:String,default:"Cancel"},confirmLabel:{type:String,default:"Confirm"},title:{type:String,required:!0},question:{type:String,required:!0},open:{type:Boolean,default:!1},opaque:{type:Boolean,default:!1}},emits:["cancel","confirm"],setup(t,{emit:r}){const e=n.ref(null),a=()=>{r("cancel")},l=()=>{r("confirm")};return n.watch(()=>t.open,()=>{if(e.value){const o=e.value.querySelector(".neon-dialog__confirm-button");o==null||o.focus()}}),{actions:e,cancel:a,confirm:l}}});module.exports=f;
|
|
2
2
|
//# sourceMappingURL=NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js.map
|
package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js","sources":["../../../../src/components/feedback/dialog/NeonDialog.ts?vue&type=script&src=5f73ae8b&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonCard from '@/components/layout/card/NeonCard.vue';\nimport NeonCardBody from '@/components/layout/card/body/NeonCardBody.vue';\nimport NeonModal from '@/components/layout/modal/NeonModal.vue';\n\n/**\n * A dialog component for confirming simple actions. This will be rendered above the content of the main window and\n * present just two options to the user, one to proceed with the action and the other to cancel it.\n */\nexport default defineComponent({\n name: 'NeonDialog',\n components: {\n NeonButton,\n NeonCard,\n NeonCardBody,\n NeonModal,\n },\n props: {\n /**\n * The color of the button for the confirm (positive) action.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Alternate confirm button color for creating a gradient button. NOTE: can also be the same color as 'color'.\n */\n alternateColor: { type: String as () => NeonFunctionalColor, default: null },\n /**\n * The label of the button for the cancel (negative) action.\n */\n cancelLabel: { type: String, default: 'Cancel' },\n /**\n * The label of the button for the confirm (positive) action.\n */\n confirmLabel: { type: String, default: 'Confirm' },\n /**\n * The dialog title\n */\n title: { type: String, required: true },\n /**\n * The dialog question. Can be html (rendered using v-html).\n */\n question: { type: String, required: true },\n /**\n * Whether the dialog is open.\n */\n open: { type: Boolean, default: false },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n },\n emits: [\n /**\n * emitted when the user clicks the cancel (negative) action button.\n * @type {void}\n */\n 'cancel',\n /**\n * emitted when the user clicks the confirm (positive) action button.\n * @type {void}\n */\n 'confirm',\n ],\n setup(
|
|
1
|
+
{"version":3,"file":"NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.cjs.js","sources":["../../../../src/components/feedback/dialog/NeonDialog.ts?vue&type=script&src=5f73ae8b&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonCard from '@/components/layout/card/NeonCard.vue';\nimport NeonCardBody from '@/components/layout/card/body/NeonCardBody.vue';\nimport NeonModal from '@/components/layout/modal/NeonModal.vue';\n\n/**\n * A dialog component for confirming simple actions. This will be rendered above the content of the main window and\n * present just two options to the user, one to proceed with the action and the other to cancel it.\n */\nexport default defineComponent({\n name: 'NeonDialog',\n components: {\n NeonButton,\n NeonCard,\n NeonCardBody,\n NeonModal,\n },\n props: {\n /**\n * The color of the button for the confirm (positive) action.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Alternate confirm button color for creating a gradient button. NOTE: can also be the same color as 'color'.\n */\n alternateColor: { type: String as () => NeonFunctionalColor, default: null },\n /**\n * The label of the button for the cancel (negative) action.\n */\n cancelLabel: { type: String, default: 'Cancel' },\n /**\n * The label of the button for the confirm (positive) action.\n */\n confirmLabel: { type: String, default: 'Confirm' },\n /**\n * The dialog title\n */\n title: { type: String, required: true },\n /**\n * The dialog question. Can be html (rendered using v-html).\n */\n question: { type: String, required: true },\n /**\n * Whether the dialog is open.\n */\n open: { type: Boolean, default: false },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n },\n emits: [\n /**\n * emitted when the user clicks the cancel (negative) action button.\n * @type {void}\n */\n 'cancel',\n /**\n * emitted when the user clicks the confirm (positive) action button.\n * @type {void}\n */\n 'confirm',\n ],\n setup(props, { emit }) {\n const actions = ref<HTMLDivElement | null>(null);\n\n const cancel = () => {\n emit('cancel');\n };\n\n const confirm = () => {\n emit('confirm');\n };\n\n watch(\n () => props.open,\n () => {\n if (actions.value) {\n const button = actions.value.querySelector('.neon-dialog__confirm-button') as HTMLButtonElement;\n button?.focus();\n }\n },\n );\n\n return {\n actions,\n cancel,\n confirm,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonCard","NeonCardBody","NeonModal","NeonFunctionalColor","props","emit","actions","ref","cancel","confirm","watch","button"],"mappings":"+SAWAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,WAAAC,EACA,SAAAC,EACA,aAAAC,EACA,UAAAC,CACF,EACA,MAAO,CAIL,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,OAAQ,EAIzF,eAAgB,CAAE,KAAM,OAAqC,QAAS,IAAK,EAI3E,YAAa,CAAE,KAAM,OAAQ,QAAS,QAAS,EAI/C,aAAc,CAAE,KAAM,OAAQ,QAAS,SAAU,EAIjD,MAAO,CAAE,KAAM,OAAQ,SAAU,EAAK,EAItC,SAAU,CAAE,KAAM,OAAQ,SAAU,EAAK,EAIzC,KAAM,CAAE,KAAM,QAAS,QAAS,EAAM,EAItC,OAAQ,CAAE,KAAM,QAAS,QAAS,EAAM,CAC1C,EACA,MAAO,CAKL,SAKA,SACF,EACA,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACf,MAAAC,EAAUC,MAA2B,IAAI,EAEzCC,EAAS,IAAM,CACnBH,EAAK,QAAQ,CAAA,EAGTI,EAAU,IAAM,CACpBJ,EAAK,SAAS,CAAA,EAGhBK,OAAAA,EAAA,MACE,IAAMN,EAAM,KACZ,IAAM,CACJ,GAAIE,EAAQ,MAAO,CACjB,MAAMK,EAASL,EAAQ,MAAM,cAAc,8BAA8B,EACzEK,GAAA,MAAAA,EAAQ,OACV,CACF,CAAA,EAGK,CACL,QAAAL,EACA,OAAAE,EACA,QAAAC,CAAA,CAEJ,CACF,CAAC"}
|
package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent } from "vue";
|
|
1
|
+
import { defineComponent, ref, watch } from "vue";
|
|
2
2
|
import { NeonFunctionalColor } from "../../../common/enums/NeonFunctionalColor.es.js";
|
|
3
3
|
import NeonButton from "../../user-input/button/NeonButton.es.js";
|
|
4
4
|
import NeonCard from "../../layout/card/NeonCard.es.js";
|
|
@@ -26,14 +26,25 @@ var _sfc_main = defineComponent({
|
|
|
26
26
|
"cancel",
|
|
27
27
|
"confirm"
|
|
28
28
|
],
|
|
29
|
-
setup(
|
|
29
|
+
setup(props, { emit }) {
|
|
30
|
+
const actions = ref(null);
|
|
30
31
|
const cancel = () => {
|
|
31
32
|
emit("cancel");
|
|
32
33
|
};
|
|
33
34
|
const confirm = () => {
|
|
34
35
|
emit("confirm");
|
|
35
36
|
};
|
|
37
|
+
watch(
|
|
38
|
+
() => props.open,
|
|
39
|
+
() => {
|
|
40
|
+
if (actions.value) {
|
|
41
|
+
const button = actions.value.querySelector(".neon-dialog__confirm-button");
|
|
42
|
+
button == null ? void 0 : button.focus();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
36
46
|
return {
|
|
47
|
+
actions,
|
|
37
48
|
cancel,
|
|
38
49
|
confirm
|
|
39
50
|
};
|
package/dist/components/feedback/dialog/NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js","sources":["../../../../src/components/feedback/dialog/NeonDialog.ts?vue&type=script&src=5f73ae8b&lang.ts"],"sourcesContent":["import { defineComponent } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonCard from '@/components/layout/card/NeonCard.vue';\nimport NeonCardBody from '@/components/layout/card/body/NeonCardBody.vue';\nimport NeonModal from '@/components/layout/modal/NeonModal.vue';\n\n/**\n * A dialog component for confirming simple actions. This will be rendered above the content of the main window and\n * present just two options to the user, one to proceed with the action and the other to cancel it.\n */\nexport default defineComponent({\n name: 'NeonDialog',\n components: {\n NeonButton,\n NeonCard,\n NeonCardBody,\n NeonModal,\n },\n props: {\n /**\n * The color of the button for the confirm (positive) action.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Alternate confirm button color for creating a gradient button. NOTE: can also be the same color as 'color'.\n */\n alternateColor: { type: String as () => NeonFunctionalColor, default: null },\n /**\n * The label of the button for the cancel (negative) action.\n */\n cancelLabel: { type: String, default: 'Cancel' },\n /**\n * The label of the button for the confirm (positive) action.\n */\n confirmLabel: { type: String, default: 'Confirm' },\n /**\n * The dialog title\n */\n title: { type: String, required: true },\n /**\n * The dialog question. Can be html (rendered using v-html).\n */\n question: { type: String, required: true },\n /**\n * Whether the dialog is open.\n */\n open: { type: Boolean, default: false },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n },\n emits: [\n /**\n * emitted when the user clicks the cancel (negative) action button.\n * @type {void}\n */\n 'cancel',\n /**\n * emitted when the user clicks the confirm (positive) action button.\n * @type {void}\n */\n 'confirm',\n ],\n setup(
|
|
1
|
+
{"version":3,"file":"NeonDialog.ts_vue_type_script_src_5f73ae8b_lang.es.js","sources":["../../../../src/components/feedback/dialog/NeonDialog.ts?vue&type=script&src=5f73ae8b&lang.ts"],"sourcesContent":["import { defineComponent, ref, watch } from 'vue';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonCard from '@/components/layout/card/NeonCard.vue';\nimport NeonCardBody from '@/components/layout/card/body/NeonCardBody.vue';\nimport NeonModal from '@/components/layout/modal/NeonModal.vue';\n\n/**\n * A dialog component for confirming simple actions. This will be rendered above the content of the main window and\n * present just two options to the user, one to proceed with the action and the other to cancel it.\n */\nexport default defineComponent({\n name: 'NeonDialog',\n components: {\n NeonButton,\n NeonCard,\n NeonCardBody,\n NeonModal,\n },\n props: {\n /**\n * The color of the button for the confirm (positive) action.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * Alternate confirm button color for creating a gradient button. NOTE: can also be the same color as 'color'.\n */\n alternateColor: { type: String as () => NeonFunctionalColor, default: null },\n /**\n * The label of the button for the cancel (negative) action.\n */\n cancelLabel: { type: String, default: 'Cancel' },\n /**\n * The label of the button for the confirm (positive) action.\n */\n confirmLabel: { type: String, default: 'Confirm' },\n /**\n * The dialog title\n */\n title: { type: String, required: true },\n /**\n * The dialog question. Can be html (rendered using v-html).\n */\n question: { type: String, required: true },\n /**\n * Whether the dialog is open.\n */\n open: { type: Boolean, default: false },\n /**\n * Increase the opacity so that the page behind the modal is no longer visible\n */\n opaque: { type: Boolean, default: false },\n },\n emits: [\n /**\n * emitted when the user clicks the cancel (negative) action button.\n * @type {void}\n */\n 'cancel',\n /**\n * emitted when the user clicks the confirm (positive) action button.\n * @type {void}\n */\n 'confirm',\n ],\n setup(props, { emit }) {\n const actions = ref<HTMLDivElement | null>(null);\n\n const cancel = () => {\n emit('cancel');\n };\n\n const confirm = () => {\n emit('confirm');\n };\n\n watch(\n () => props.open,\n () => {\n if (actions.value) {\n const button = actions.value.querySelector('.neon-dialog__confirm-button') as HTMLButtonElement;\n button?.focus();\n }\n },\n );\n\n return {\n actions,\n cancel,\n confirm,\n };\n },\n});\n"],"names":[],"mappings":";;;;;;AAWA,IAAA,YAAe,gBAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,OAAO;AAAA,IAIL,OAAO,EAAE,MAAM,QAAqC,SAAS,oBAAoB,QAAQ;AAAA,IAIzF,gBAAgB,EAAE,MAAM,QAAqC,SAAS,KAAK;AAAA,IAI3E,aAAa,EAAE,MAAM,QAAQ,SAAS,SAAS;AAAA,IAI/C,cAAc,EAAE,MAAM,QAAQ,SAAS,UAAU;AAAA,IAIjD,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAItC,UAAU,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IAIzC,MAAM,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,IAItC,QAAQ,EAAE,MAAM,SAAS,SAAS,MAAM;AAAA,EAC1C;AAAA,EACA,OAAO;AAAA,IAKL;AAAA,IAKA;AAAA,EACF;AAAA,EACA,MAAM,OAAO,EAAE,QAAQ;AACf,UAAA,UAAU,IAA2B,IAAI;AAE/C,UAAM,SAAS,MAAM;AACnB,WAAK,QAAQ;AAAA,IAAA;AAGf,UAAM,UAAU,MAAM;AACpB,WAAK,SAAS;AAAA,IAAA;AAGhB;AAAA,MACE,MAAM,MAAM;AAAA,MACZ,MAAM;AACJ,YAAI,QAAQ,OAAO;AACjB,gBAAM,SAAS,QAAQ,MAAM,cAAc,8BAA8B;AACzE,2CAAQ;AAAA,QACV;AAAA,MACF;AAAA,IAAA;AAGK,WAAA;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IAAA;AAAA,EAEJ;AACF,CAAC;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var l=require("./NeonTooltip.ts_vue_type_script_src_e32f8fb2_lang.cjs.js"),e=require("vue"),i=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const r=["aria-describedby"],s={class:"neon-tooltip__content-wrapper"
|
|
1
|
+
"use strict";var l=require("./NeonTooltip.ts_vue_type_script_src_e32f8fb2_lang.cjs.js"),e=require("vue"),i=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const r=["aria-describedby"],s={ref:"content",class:"neon-tooltip__content-wrapper"},p=e.createElementVNode("div",{class:"neon-tooltip__arrow"},null,-1),d={key:0,class:"neon-tooltip__arrow-overlay"},a=["id"];function v(o,t,y,$,_,f){return e.openBlock(),e.createElementBlock("div",{ref:"tooltip",tabindex:"0",class:e.normalizeClass(["neon-tooltip",[{"neon-tooltip--open":o.open},`neon-tooltip--${o.tooltipStyle}`,`neon-tooltip--${o.tooltipPlacement}`,`neon-tooltip--outline-${o.outlineStyle}`,`neon-tooltip--outline-color-${o.outlineColor}`]]),"aria-describedby":o.id,onKeydown:[t[0]||(t[0]=e.withKeys(n=>o.toggleTooltip(),["enter"])),t[1]||(t[1]=e.withKeys(n=>o.closeTooltip(),["esc"])),t[2]||(t[2]=e.withKeys(n=>o.toggleTooltip(),["space"]))],onKeypress:t[3]||(t[3]=e.withKeys(e.withModifiers(()=>{},["prevent"]),["space"])),onMouseenter:t[4]||(t[4]=n=>o.openTooltip()),onMouseleave:t[5]||(t[5]=n=>o.closeTooltip())},[e.createElementVNode("div",s,[p,o.tooltipStyle==="popover"?(e.openBlock(),e.createElementBlock("div",d)):e.createCommentVNode("",!0),e.createElementVNode("div",{id:o.id,class:"neon-tooltip__content",role:"tooltip"},[e.renderSlot(o.$slots,"content")],8,a)],512),e.renderSlot(o.$slots,"target")],42,r)}var u=i(l,[["render",v],["__file","/Users/andrew/dev/projects/neon/src/components/feedback/tooltip/NeonTooltip.vue"]]);module.exports=u;
|
|
2
2
|
//# sourceMappingURL=NeonTooltip.cjs.js.map
|
|
@@ -3,8 +3,8 @@ import { openBlock, createElementBlock, normalizeClass, withKeys, withModifiers,
|
|
|
3
3
|
import _export_sfc from "../../../_virtual/plugin-vue_export-helper.es.js";
|
|
4
4
|
const _hoisted_1 = ["aria-describedby"];
|
|
5
5
|
const _hoisted_2 = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
ref: "content",
|
|
7
|
+
class: "neon-tooltip__content-wrapper"
|
|
8
8
|
};
|
|
9
9
|
const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "neon-tooltip__arrow" }, null, -1);
|
|
10
10
|
const _hoisted_4 = {
|
|
@@ -14,6 +14,7 @@ const _hoisted_4 = {
|
|
|
14
14
|
const _hoisted_5 = ["id"];
|
|
15
15
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
16
16
|
return openBlock(), createElementBlock("div", {
|
|
17
|
+
ref: "tooltip",
|
|
17
18
|
tabindex: "0",
|
|
18
19
|
class: normalizeClass(["neon-tooltip", [
|
|
19
20
|
{ "neon-tooltip--open": _ctx.open },
|
|
@@ -22,7 +23,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
22
23
|
`neon-tooltip--outline-${_ctx.outlineStyle}`,
|
|
23
24
|
`neon-tooltip--outline-color-${_ctx.outlineColor}`
|
|
24
25
|
]]),
|
|
25
|
-
|
|
26
|
+
"aria-describedby": _ctx.id,
|
|
26
27
|
onKeydown: [
|
|
27
28
|
_cache[0] || (_cache[0] = withKeys(($event) => _ctx.toggleTooltip(), ["enter"])),
|
|
28
29
|
_cache[1] || (_cache[1] = withKeys(($event) => _ctx.closeTooltip(), ["esc"])),
|
|
@@ -31,16 +32,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
31
32
|
onKeypress: _cache[3] || (_cache[3] = withKeys(withModifiers(() => {
|
|
32
33
|
}, ["prevent"]), ["space"])),
|
|
33
34
|
onMouseenter: _cache[4] || (_cache[4] = ($event) => _ctx.openTooltip()),
|
|
34
|
-
onMouseleave: _cache[5] || (_cache[5] = ($event) => _ctx.closeTooltip())
|
|
35
|
-
"aria-describedby": _ctx.id
|
|
35
|
+
onMouseleave: _cache[5] || (_cache[5] = ($event) => _ctx.closeTooltip())
|
|
36
36
|
}, [
|
|
37
37
|
createElementVNode("div", _hoisted_2, [
|
|
38
38
|
_hoisted_3,
|
|
39
39
|
_ctx.tooltipStyle === "popover" ? (openBlock(), createElementBlock("div", _hoisted_4)) : createCommentVNode("", true),
|
|
40
40
|
createElementVNode("div", {
|
|
41
|
+
id: _ctx.id,
|
|
41
42
|
class: "neon-tooltip__content",
|
|
42
|
-
role: "tooltip"
|
|
43
|
-
id: _ctx.id
|
|
43
|
+
role: "tooltip"
|
|
44
44
|
}, [
|
|
45
45
|
renderSlot(_ctx.$slots, "content")
|
|
46
46
|
], 8, _hoisted_5)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=require("./NeonDrawer.ts_vue_type_script_src_f2844260_lang.cjs.js"),e=require("vue"),o=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const a=e.createElementVNode("div",{class:"neon-drawer__overlay"},null,-1);function s(r,t,i,d,_,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["neon-drawer",[`neon-drawer--${r.position}`,{"neon-drawer--open":r.open,"neon-drawer--with-overlay":r.overlay}]]),role:"dialog","aria-describedby":"neonDrawerDesc"},[a,e.createElementVNode("div",{class:e.normalizeClass(["neon-drawer__container",{"neon-drawer__container--full-width":r.fullWidth}])
|
|
1
|
+
"use strict";var n=require("./NeonDrawer.ts_vue_type_script_src_f2844260_lang.cjs.js"),e=require("vue"),o=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const a=e.createElementVNode("div",{class:"neon-drawer__overlay"},null,-1);function s(r,t,i,d,_,c){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["neon-drawer",[`neon-drawer--${r.position}`,{"neon-drawer--open":r.open,"neon-drawer--with-overlay":r.overlay}]]),role:"dialog","aria-describedby":"neonDrawerDesc"},[a,e.createElementVNode("div",{id:"neonDrawerDesc",ref:"drawer",class:e.normalizeClass(["neon-drawer__container",{"neon-drawer__container--full-width":r.fullWidth}])},[e.renderSlot(r.$slots,"default")],2)],2)}var l=o(n,[["render",s],["__file","/Users/andrew/dev/projects/neon/src/components/layout/drawer/NeonDrawer.vue"]]);module.exports=l;
|
|
2
2
|
//# sourceMappingURL=NeonDrawer.cjs.js.map
|
|
@@ -16,9 +16,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
16
16
|
}, [
|
|
17
17
|
_hoisted_1,
|
|
18
18
|
createElementVNode("div", {
|
|
19
|
-
|
|
19
|
+
id: "neonDrawerDesc",
|
|
20
20
|
ref: "drawer",
|
|
21
|
-
|
|
21
|
+
class: normalizeClass(["neon-drawer__container", { "neon-drawer__container--full-width": _ctx.fullWidth }])
|
|
22
22
|
}, [
|
|
23
23
|
renderSlot(_ctx.$slots, "default")
|
|
24
24
|
], 2)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=require("./NeonGrid.ts_vue_type_script_src_79684cf0_lang.cjs.js"),e=require("vue"),t=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const n=["id"];function o(r,_,c,u,p,d){return e.openBlock(),e.createElementBlock("article",{class:"neon-grid"
|
|
1
|
+
"use strict";var s=require("./NeonGrid.ts_vue_type_script_src_79684cf0_lang.cjs.js"),e=require("vue"),t=require("../../../_virtual/plugin-vue_export-helper.cjs.js");const n=["id"];function o(r,_,c,u,p,d){return e.openBlock(),e.createElementBlock("article",{id:r.id,class:"neon-grid"},[e.renderSlot(r.$slots,"default")],8,n)}var i=t(s,[["render",o],["__file","/Users/andrew/dev/projects/neon/src/components/layout/grid/NeonGrid.vue"]]);module.exports=i;
|
|
2
2
|
//# sourceMappingURL=NeonGrid.cjs.js.map
|
|
@@ -4,8 +4,8 @@ import _export_sfc from "../../../_virtual/plugin-vue_export-helper.es.js";
|
|
|
4
4
|
const _hoisted_1 = ["id"];
|
|
5
5
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
6
|
return openBlock(), createElementBlock("article", {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
id: _ctx.id,
|
|
8
|
+
class: "neon-grid"
|
|
9
9
|
}, [
|
|
10
10
|
renderSlot(_ctx.$slots, "default")
|
|
11
11
|
], 8, _hoisted_1);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=require("./NeonTab.ts_vue_type_script_src_f0ee8bae_lang.cjs.js"),r=require("vue"),a=require("../../../../_virtual/plugin-vue_export-helper.cjs.js");const s=["id","aria-labelledby"];function t(e,l,i,d,p,u){return e.responsiveView||!e.toggleOnIf||e.toggleOnIf&&e.selected?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["neon-tab",{"neon-tab--selected":e.selected}]),role:"tabpanel",
|
|
1
|
+
"use strict";var n=require("./NeonTab.ts_vue_type_script_src_f0ee8bae_lang.cjs.js"),r=require("vue"),a=require("../../../../_virtual/plugin-vue_export-helper.cjs.js");const s=["id","aria-labelledby"];function t(e,l,i,d,p,u){return e.responsiveView||!e.toggleOnIf||e.toggleOnIf&&e.selected?(r.openBlock(),r.createElementBlock("div",{key:0,id:e.id,class:r.normalizeClass(["neon-tab",{"neon-tab--selected":e.selected}]),role:"tabpanel","aria-labelledby":e.id?`${e.id}Button`:void 0,tabindex:"0"},[r.renderSlot(e.$slots,"default")],10,s)):r.createCommentVNode("",!0)}var o=a(n,[["render",t],["__file","/Users/andrew/dev/projects/neon/src/components/presentation/tabs/tab/NeonTab.vue"]]);module.exports=o;
|
|
2
2
|
//# sourceMappingURL=NeonTab.cjs.js.map
|
|
@@ -5,9 +5,9 @@ const _hoisted_1 = ["id", "aria-labelledby"];
|
|
|
5
5
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
6
6
|
return _ctx.responsiveView || !_ctx.toggleOnIf || _ctx.toggleOnIf && _ctx.selected ? (openBlock(), createElementBlock("div", {
|
|
7
7
|
key: 0,
|
|
8
|
+
id: _ctx.id,
|
|
8
9
|
class: normalizeClass(["neon-tab", { "neon-tab--selected": _ctx.selected }]),
|
|
9
10
|
role: "tabpanel",
|
|
10
|
-
id: _ctx.id,
|
|
11
11
|
"aria-labelledby": _ctx.id ? `${_ctx.id}Button` : void 0,
|
|
12
12
|
tabindex: "0"
|
|
13
13
|
}, [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var a=require("./NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js"),o=require("vue"),s=require("../../../_virtual/plugin-vue_export-helper.cjs.js");function d(e,l,u,t,
|
|
1
|
+
"use strict";var a=require("./NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js"),o=require("vue"),s=require("../../../_virtual/plugin-vue_export-helper.cjs.js");function d(e,l,u,p,t,c){const n=o.resolveComponent("neon-input");return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass([[`neon-color--${e.size}`,`neon-color--${e.color}`,{"neon-color--disabled":e.disabled}],"neon-color"])},[e.pickerOnly?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(n,o.mergeProps({key:0,modelValue:e.localValue,"onUpdate:modelValue":l[0]||(l[0]=r=>e.localValue=r),color:e.color,disabled:e.disabled,"hide-icon":!0,pattern:"#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})",placeholder:e.placeholder,size:e.size,class:"neon-color__text-input",type:"text"},e.attrs),null,16,["modelValue","color","disabled","pattern","placeholder","size"])),o.createVNode(n,o.mergeProps({id:e.id,modelValue:e.localValue,"onUpdate:modelValue":l[1]||(l[1]=r=>e.localValue=r),color:e.color,disabled:e.disabled,"hide-icon":!0,size:e.size,class:"neon-color__input",type:"color"},e.attrs),null,16,["id","modelValue","color","disabled","size"]),o.createElementVNode("div",{style:o.normalizeStyle(`background-color:${e.modelValue||"#000000"};box-shadow: 0 0 0 2rem ${e.modelValue||"#000000"}4D`),class:"neon-color__indicator"},null,4)],2)}var i=s(a,[["render",d],["__file","/Users/andrew/dev/projects/neon/src/components/user-input/color/NeonColor.vue"]]);module.exports=i;
|
|
2
2
|
//# sourceMappingURL=NeonColor.cjs.js.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { NeonSize } from '@/common/enums/NeonSize';
|
|
2
2
|
import { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
/**
|
|
5
|
+
* Id of the input, will be attached to the native color input control.
|
|
6
|
+
*/
|
|
7
|
+
id: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
};
|
|
4
10
|
/**
|
|
5
11
|
* The Hexadecimal color code.
|
|
6
12
|
*/
|
|
@@ -49,6 +55,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
49
55
|
};
|
|
50
56
|
localValue: import("vue").WritableComputedRef<string>;
|
|
51
57
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
/**
|
|
59
|
+
* Id of the input, will be attached to the native color input control.
|
|
60
|
+
*/
|
|
61
|
+
id: {
|
|
62
|
+
type: StringConstructor;
|
|
63
|
+
};
|
|
52
64
|
/**
|
|
53
65
|
* The Hexadecimal color code.
|
|
54
66
|
*/
|
|
@@ -20,6 +20,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
20
20
|
type: "text"
|
|
21
21
|
}, _ctx.attrs), null, 16, ["modelValue", "color", "disabled", "pattern", "placeholder", "size"])) : createCommentVNode("", true),
|
|
22
22
|
createVNode(_component_neon_input, mergeProps({
|
|
23
|
+
id: _ctx.id,
|
|
23
24
|
modelValue: _ctx.localValue,
|
|
24
25
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.localValue = $event),
|
|
25
26
|
color: _ctx.color,
|
|
@@ -28,7 +29,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28
29
|
size: _ctx.size,
|
|
29
30
|
class: "neon-color__input",
|
|
30
31
|
type: "color"
|
|
31
|
-
}, _ctx.attrs), null, 16, ["modelValue", "color", "disabled", "size"]),
|
|
32
|
+
}, _ctx.attrs), null, 16, ["id", "modelValue", "color", "disabled", "size"]),
|
|
32
33
|
createElementVNode("div", {
|
|
33
34
|
style: normalizeStyle(`background-color:${_ctx.modelValue || "#000000"};box-shadow: 0 0 0 2rem ${_ctx.modelValue || "#000000"}4D`),
|
|
34
35
|
class: "neon-color__indicator"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonColor.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NeonColor.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("vue"),l=require("../../../common/enums/NeonSize.cjs.js"),a=require("../../../common/enums/NeonFunctionalColor.cjs.js"),s=require("../input/NeonInput.cjs.js"),i=e.defineComponent({name:"NeonColor",components:{NeonInput:s},props:{modelValue:{type:String,required:!0},disabled:{type:Boolean,default:!1},pickerOnly:{type:Boolean,default:!1},size:{type:String,default:l.NeonSize.Medium},color:{type:String,default:a.NeonFunctionalColor.LowContrast},placeholder:{type:String,required:!1}},setup(o,{emit:
|
|
1
|
+
"use strict";var e=require("vue"),l=require("../../../common/enums/NeonSize.cjs.js"),a=require("../../../common/enums/NeonFunctionalColor.cjs.js"),s=require("../input/NeonInput.cjs.js"),i=e.defineComponent({name:"NeonColor",components:{NeonInput:s},props:{id:{type:String},modelValue:{type:String,required:!0},disabled:{type:Boolean,default:!1},pickerOnly:{type:Boolean,default:!1},size:{type:String,default:l.NeonSize.Medium},color:{type:String,default:a.NeonFunctionalColor.LowContrast},placeholder:{type:String,required:!1}},setup(o,{emit:t}){const n=e.useAttrs(),r=e.computed({get(){return o.modelValue},set(u){t("update:modelValue",u)}});return{attrs:n,localValue:r}}});module.exports=i;
|
|
2
2
|
//# sourceMappingURL=NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js.map
|
package/dist/components/user-input/color/NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js","sources":["../../../../src/components/user-input/color/NeonColor.ts?vue&type=script&src=94e4c0ac&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\n\nexport default defineComponent({\n name: 'NeonColor',\n components: {\n NeonInput,\n },\n props: {\n /**\n * The Hexadecimal color code.\n */\n modelValue: { type: String, required: true },\n /**\n * Disable color picker\n */\n disabled: { type: Boolean, default: false },\n /**\n * Only display the color picker\n */\n pickerOnly: { type: Boolean, default: false },\n /**\n * The size of the color picker, one of NeonSize.Small | NeonSize.Medium | NeonSize.Large.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the input\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\n /**\n * This is the placeholder for the text input when no value is provided.\n */\n placeholder: { type: String, required: false },\n },\n setup(props, { emit }) {\n const attrs = useAttrs();\n const localValue = computed({\n get() {\n return props.modelValue;\n },\n set(val: string) {\n emit('update:modelValue', val);\n },\n });\n\n return {\n attrs,\n localValue,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonInput","NeonSize","NeonFunctionalColor","props","emit","attrs","useAttrs","localValue","computed","val"],"mappings":"0LAKAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,WAAY,CACV,UAAAC,CACF,EACA,MAAO,CAIL,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAK,EAI3C,SAAU,CAAE,KAAM,QAAS,QAAS,EAAM,EAI1C,WAAY,CAAE,KAAM,QAAS,QAAS,EAAM,EAI5C,KAAM,CAAE,KAAM,OAA0B,QAASC,EAAAA,SAAS,MAAO,EAIjE,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,WAAY,EAI7F,YAAa,CAAE,KAAM,OAAQ,SAAU,EAAM,CAC/C,EACA,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,WACRC,EAAaC,EAAAA,SAAS,CAC1B,KAAM,CACJ,OAAOL,EAAM,UACf,EACA,IAAIM,EAAa,CACfL,EAAK,oBAAqBK,CAAG,CAC/B,CAAA,CACD,EAEM,MAAA,CACL,MAAAJ,EACA,WAAAE,CAAA,CAEJ,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"NeonColor.ts_vue_type_script_src_94e4c0ac_lang.cjs.js","sources":["../../../../src/components/user-input/color/NeonColor.ts?vue&type=script&src=94e4c0ac&lang.ts"],"sourcesContent":["import { computed, defineComponent, useAttrs } from 'vue';\nimport { NeonSize } from '@/common/enums/NeonSize';\nimport { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\n\nexport default defineComponent({\n name: 'NeonColor',\n components: {\n NeonInput,\n },\n props: {\n /**\n * Id of the input, will be attached to the native color input control.\n */\n id: { type: String },\n /**\n * The Hexadecimal color code.\n */\n modelValue: { type: String, required: true },\n /**\n * Disable color picker\n */\n disabled: { type: Boolean, default: false },\n /**\n * Only display the color picker\n */\n pickerOnly: { type: Boolean, default: false },\n /**\n * The size of the color picker, one of NeonSize.Small | NeonSize.Medium | NeonSize.Large.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * Color of the input\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.LowContrast },\n /**\n * This is the placeholder for the text input when no value is provided.\n */\n placeholder: { type: String, required: false },\n },\n setup(props, { emit }) {\n const attrs = useAttrs();\n const localValue = computed({\n get() {\n return props.modelValue;\n },\n set(val: string) {\n emit('update:modelValue', val);\n },\n });\n\n return {\n attrs,\n localValue,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonInput","NeonSize","NeonFunctionalColor","props","emit","attrs","useAttrs","localValue","computed","val"],"mappings":"0LAKAA,EAAeC,kBAAgB,CAC7B,KAAM,YACN,WAAY,CACV,UAAAC,CACF,EACA,MAAO,CAIL,GAAI,CAAE,KAAM,MAAO,EAInB,WAAY,CAAE,KAAM,OAAQ,SAAU,EAAK,EAI3C,SAAU,CAAE,KAAM,QAAS,QAAS,EAAM,EAI1C,WAAY,CAAE,KAAM,QAAS,QAAS,EAAM,EAI5C,KAAM,CAAE,KAAM,OAA0B,QAASC,EAAAA,SAAS,MAAO,EAIjE,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,WAAY,EAI7F,YAAa,CAAE,KAAM,OAAQ,SAAU,EAAM,CAC/C,EACA,MAAMC,EAAO,CAAE,KAAAC,GAAQ,CACrB,MAAMC,EAAQC,EAAAA,WACRC,EAAaC,EAAAA,SAAS,CAC1B,KAAM,CACJ,OAAOL,EAAM,UACf,EACA,IAAIM,EAAa,CACfL,EAAK,oBAAqBK,CAAG,CAC/B,CAAA,CACD,EAEM,MAAA,CACL,MAAAJ,EACA,WAAAE,CAAA,CAEJ,CACF,CAAC"}
|