@aotearoan/neon 28.1.1 → 28.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/filter-bar/NeonFilterBar.cjs.js +2 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.cjs.js.map +1 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.es.js +11 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.es.js.map +1 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.vue.cjs.js +2 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.vue.cjs.js.map +1 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.vue.es.js +34 -0
- package/dist/components/layout/filter-bar/NeonFilterBar.vue.es.js.map +1 -0
- package/dist/components/presentation/header/NeonHeader.vue.cjs.js +1 -1
- package/dist/components/presentation/header/NeonHeader.vue.cjs.js.map +1 -1
- package/dist/components/presentation/header/NeonHeader.vue.es.js +12 -10
- package/dist/components/presentation/header/NeonHeader.vue.es.js.map +1 -1
- package/dist/components/user-input/filter/NeonFilter.cjs.js +2 -0
- package/dist/components/user-input/filter/NeonFilter.cjs.js.map +1 -0
- package/dist/components/user-input/filter/NeonFilter.es.js +138 -0
- package/dist/components/user-input/filter/NeonFilter.es.js.map +1 -0
- package/dist/components/user-input/filter/NeonFilter.vue.cjs.js +2 -0
- package/dist/components/user-input/filter/NeonFilter.vue.cjs.js.map +1 -0
- package/dist/components/user-input/filter/NeonFilter.vue.es.js +123 -0
- package/dist/components/user-input/filter/NeonFilter.vue.es.js.map +1 -0
- package/dist/components/user-input/number/NeonNumber.cjs.js +1 -1
- package/dist/components/user-input/number/NeonNumber.cjs.js.map +1 -1
- package/dist/components/user-input/number/NeonNumber.es.js +23 -26
- package/dist/components/user-input/number/NeonNumber.es.js.map +1 -1
- package/dist/components/user-input/search-filter/NeonSearchFilter.cjs.js +2 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.cjs.js.map +1 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.es.js +123 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.es.js.map +1 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.vue.cjs.js +2 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.vue.cjs.js.map +1 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.vue.es.js +88 -0
- package/dist/components/user-input/search-filter/NeonSearchFilter.vue.es.js.map +1 -0
- package/dist/neon.cjs.js +1 -1
- package/dist/neon.es.js +209 -203
- package/dist/neon.es.js.map +1 -1
- package/dist/src/components/layout/filter-bar/NeonFilterBar.d.ts +70 -0
- package/dist/src/components/layout/filter-bar/NeonFilterBar.vue.d.ts +2 -0
- package/dist/src/components/presentation/image-carousel/NeonImageCarousel.d.ts +1 -1
- package/dist/src/components/user-input/filter/NeonFilter.d.ts +3557 -0
- package/dist/src/components/user-input/filter/NeonFilter.vue.d.ts +2 -0
- package/dist/src/components/user-input/search-filter/NeonSearchFilter.d.ts +3288 -0
- package/dist/src/components/user-input/search-filter/NeonSearchFilter.vue.d.ts +2 -0
- package/dist/src/model/user-input/filter/NeonFilterItem.d.ts +13 -0
- package/dist/src/neon.d.ts +4 -0
- package/dist/src/utils/common/debounce/NeonDebounceUtils.d.ts +1 -1
- package/dist/utils/common/debounce/NeonDebounceUtils.cjs.js +1 -1
- package/dist/utils/common/debounce/NeonDebounceUtils.cjs.js.map +1 -1
- package/dist/utils/common/debounce/NeonDebounceUtils.es.js +1 -1
- package/dist/utils/common/debounce/NeonDebounceUtils.es.js.map +1 -1
- package/package.json +3 -1
- package/src/sass/components/_button.scss +17 -17
- package/src/sass/components/_filter-bar.scss +55 -0
- package/src/sass/components/_filter.scss +53 -0
- package/src/sass/components/_search-filter.scss +25 -0
- package/src/sass/components/_skeleton-loader.scss +1 -1
- package/src/sass/components/components.scss +3 -0
- package/src/sass/includes/_dependencies.scss +3 -0
- package/src/sass/theme.scss +12 -0
- package/src/sass/variables-global.scss +7 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonNumber.cjs.js","sources":["../../../../src/components/user-input/number/NeonNumber.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonInputMode } from '@/model/user-input/input/NeonInputMode';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\n\n/**\n * <p>\n * The <strong>NeonNumber</strong> component is the equivalent of an <strong><input type=\"number\" /></strong>\n * with -/+ spin buttons. In addition, it supports formatting as a percentage or with a provided custom template and\n * also pasting of values in the user's locale, e.g. 6,543.12.\n * </p>\n * <p><strong>NeonNumber</strong> supports all the properties found on an HTML <input>.</p>\n */\nexport default defineComponent({\n name: 'NeonNumber',\n components: {\n NeonButton,\n NeonFieldGroup,\n NeonInput,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the number input. Either a valid number or null.\n */\n modelValue: { type: Number, default: null },\n /**\n * The minimum value the input can accept.\n */\n min: { type: Number, required: false },\n /**\n * The maximum value the input can accept.\n */\n max: { type: Number, required: false },\n /**\n * The step value for the spin buttons.\n */\n step: { type: Number, required: false },\n /**\n * The component color.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The component size.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Whether the component is disabled.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Enable/disable direct editing of the value.\n */\n editable: { type: Boolean, default: true },\n /**\n * Show/hide spin buttons. NOTE: The user can still use up/down arrow keys when the input has focus.\n */\n spinButtons: { type: Boolean, default: false },\n /**\n * Automatically applies % formatting, e.g. if the value = 0.15 it will be displayed as 15%.\n */\n percentage: { type: Boolean, default: false },\n /**\n * The rounding precision for display formatting.\n */\n decimals: { type: Number, required: false },\n /**\n * A template string used for formatting the value for display. Use the placeholder {value} to reference the value in\n * the template string. e.g. value = 90, ${value} => $90.\n */\n valueTemplate: { type: String, required: false },\n /**\n * The HTML inputmode of the component. Either 'numeric' or 'decimal'.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Numeric },\n /**\n * ARIA label for the increment spinner button.\n */\n incrementLabel: { type: String, default: 'Increment' },\n /**\n * ARIA label for the decrement spinner button.\n */\n decrementLabel: { type: String, default: 'Decrement' },\n },\n emits: [\n /**\n * Emitted when the user changes the value of the number via the increment/decrement buttons or manually entering\n * the value.\n * @type {number | null} the current value or null if the value has been cleared.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const focus = ref(false);\n\n const emitValue = (value: number | null) => {\n if (!props.disabled) {\n emit('update:modelValue', value);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onBlur, onFocus, ...sanitized } = attrs;\n return sanitized;\n });\n\n const valueChanged = (value: string) => {\n const parsedValue = NeonNumberUtils.parseNumber(value);\n const newValue =\n value !== '' && value !== null\n ? Math.max(Math.min(parsedValue, props.max ?? Number.MAX_SAFE_INTEGER), props.min ?? Number.MIN_SAFE_INTEGER)\n : null;\n if (newValue === null || !isNaN(parsedValue)) {\n emitValue(newValue);\n }\n };\n\n const computedDecimals = computed(() => {\n return props.decimals ?? (props.percentage ? 0 : undefined);\n });\n\n const computedRawDecimals = computed(() => {\n return props.percentage && computedDecimals.value !== undefined\n ? computedDecimals.value + 2\n : computedDecimals.value;\n });\n\n const computedValue = computed(() => {\n const newValue = props.modelValue !== null ? +props.modelValue : props.min || 0;\n return computedRawDecimals.value !== undefined ? Number(newValue.toFixed(computedRawDecimals.value)) : newValue;\n });\n\n const formattedValue = computed(() => {\n return props.modelValue !== null &&\n (props.valueTemplate !== undefined || computedDecimals.value !== undefined || props.percentage !== undefined)\n ? NeonNumberUtils.formatNumber(\n props.modelValue,\n {\n decimals: computedDecimals.value,\n format: props.valueTemplate,\n percentage: props.percentage,\n },\n props.locale,\n )\n : props.modelValue;\n });\n\n const rawValue = computed(() => {\n return computedRawDecimals.value ? props.modelValue?.toFixed(computedRawDecimals.value) : props.modelValue;\n });\n\n const displayValue = computed(() => {\n return focus.value ? (rawValue.value ? `${rawValue.value}` : '') : formattedValue.value;\n });\n\n const computedStep = computed(() => {\n return props.step ?? (props.percentage ? 0.01 : 1);\n });\n\n const decrement = () => {\n const newValue = computedValue.value - computedStep.value;\n const emittedValue = props.min !== undefined ? Math.max(props.min, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const increment = () => {\n const newValue = computedValue.value + computedStep.value;\n const emittedValue = props.max !== undefined ? Math.min(props.max, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const onFocus = () => (focus.value = true);\n const onBlur = () => (focus.value = false);\n\n return {\n focus,\n sanitizedAttributes,\n computedDecimals,\n computedRawDecimals,\n computedValue,\n computedStep,\n displayValue,\n valueChanged,\n increment,\n decrement,\n onFocus,\n onBlur,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonFieldGroup","NeonInput","NeonFunctionalColor","NeonSize","NeonInputMode","props","emit","attrs","useAttrs","focus","ref","emitValue","value","sanitizedAttributes","computed","onBlur","onFocus","sanitized","valueChanged","parsedValue","NeonNumberUtils","newValue","computedDecimals","computedRawDecimals","computedValue","formattedValue","rawValue","_a","displayValue","computedStep","emittedValue"],"mappings":"ibAiBAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY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AO,CACL,MAAAI,EACA,oBAAAI,EACA,iBAAAS,EACA,oBAAAC,EACA,cAAAC,EACA,aAAAK,EACA,aAAAD,EACA,aAAAV,EACA,UApBgB,IAAM,CACtB,MAAMG,EAAWG,EAAc,MAAQK,EAAa,MAC9CC,EAAezB,EAAM,MAAQ,OAAY,KAAK,IAAIA,EAAM,IAAKgB,CAAQ,EAAIA,EAC3ES,IAAiBzB,EAAM,YACzBM,EAAUmB,CAAY,CAE1B,EAeE,UA7BgB,IAAM,CACtB,MAAMT,EAAWG,EAAc,MAAQK,EAAa,MAC9CC,EAAezB,EAAM,MAAQ,OAAY,KAAK,IAAIA,EAAM,IAAKgB,CAAQ,EAAIA,EAC3ES,IAAiBzB,EAAM,YACzBM,EAAUmB,CAAY,CAE1B,EAwBE,QAdc,IAAOrB,EAAM,MAAQ,GAenC,OAda,IAAOA,EAAM,MAAQ,EAclC,CAEJ,CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"NeonNumber.cjs.js","sources":["../../../../src/components/user-input/number/NeonNumber.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonInputMode } from '@/model/user-input/input/NeonInputMode';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\n\n/**\n * <p>\n * The <strong>NeonNumber</strong> component is the equivalent of an <strong><input type=\"number\" /></strong>\n * with -/+ spin buttons. In addition, it supports formatting as a percentage or with a provided custom template and\n * also pasting of values in the user's locale, e.g. 6,543.12.\n * </p>\n * <p><strong>NeonNumber</strong> supports all the properties found on an HTML <input>.</p>\n */\nexport default defineComponent({\n name: 'NeonNumber',\n components: {\n NeonButton,\n NeonFieldGroup,\n NeonInput,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the number input. Either a valid number or null.\n */\n modelValue: { type: Number, default: null },\n /**\n * The minimum value the input can accept.\n */\n min: { type: Number, required: false },\n /**\n * The maximum value the input can accept.\n */\n max: { type: Number, required: false },\n /**\n * The step value for the spin buttons.\n */\n step: { type: Number, required: false },\n /**\n * The component color.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The component size.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Whether the component is disabled.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Enable/disable direct editing of the value.\n */\n editable: { type: Boolean, default: true },\n /**\n * Show/hide spin buttons. NOTE: The user can still use up/down arrow keys when the input has focus.\n */\n spinButtons: { type: Boolean, default: false },\n /**\n * Automatically applies % formatting, e.g. if the value = 0.15 it will be displayed as 15%.\n */\n percentage: { type: Boolean, default: false },\n /**\n * The rounding precision for display formatting.\n */\n decimals: { type: Number, required: false },\n /**\n * A template string used for formatting the value for display. Use the placeholder {value} to reference the value in\n * the template string. e.g. value = 90, ${value} => $90.\n */\n valueTemplate: { type: String, required: false },\n /**\n * The HTML inputmode of the component. Either 'numeric' or 'decimal'.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Numeric },\n /**\n * ARIA label for the increment spinner button.\n */\n incrementLabel: { type: String, default: 'Increment' },\n /**\n * ARIA label for the decrement spinner button.\n */\n decrementLabel: { type: String, default: 'Decrement' },\n },\n emits: [\n /**\n * Emitted when the user changes the value of the number via the increment/decrement buttons or manually entering\n * the value.\n * @type {number | null} the current value or null if the value has been cleared.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const focus = ref(false);\n\n const emitValue = (value: number | null) => {\n if (!props.disabled) {\n emit('update:modelValue', value);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onBlur, onFocus, ...sanitized } = attrs;\n return sanitized;\n });\n\n const valueChanged = (value: string) => {\n const parsedValue = NeonNumberUtils.parseNumber(value);\n const newValue =\n value !== '' && value !== null\n ? Math.max(Math.min(parsedValue, props.max ?? Number.MAX_SAFE_INTEGER), props.min ?? Number.MIN_SAFE_INTEGER)\n : null;\n if (newValue === null || !isNaN(parsedValue)) {\n emitValue(newValue);\n }\n };\n\n const computedDecimals = computed(() => {\n return props.decimals ?? (props.percentage ? 0 : undefined);\n });\n\n const computedRawDecimals = computed(() => {\n return props.percentage && computedDecimals.value !== undefined\n ? computedDecimals.value + 2\n : computedDecimals.value;\n });\n\n const computedValue = computed(() => {\n const newValue = props.modelValue !== null ? +props.modelValue : props.min ?? 0;\n return computedRawDecimals.value !== undefined ? Number(newValue.toFixed(computedRawDecimals.value)) : newValue;\n });\n\n const formattedValue = computed(() => {\n return props.modelValue !== null &&\n (props.valueTemplate !== undefined || computedDecimals.value !== undefined || props.percentage !== undefined)\n ? NeonNumberUtils.formatNumber(\n props.modelValue,\n {\n decimals: computedDecimals.value,\n format: props.valueTemplate,\n percentage: props.percentage,\n },\n props.locale,\n )\n : props.modelValue;\n });\n\n const rawValue = computed(() => {\n return computedRawDecimals.value !== undefined && props.modelValue !== null\n ? props.modelValue.toFixed(computedRawDecimals.value)\n : props.modelValue === null\n ? ''\n : `${props.modelValue}`;\n });\n\n const displayValue = computed(() => {\n return focus.value ? (rawValue.value !== undefined ? `${rawValue.value}` : '') : formattedValue.value;\n });\n\n const computedStep = computed(() => {\n return props.step ?? (props.percentage ? 0.01 : 1);\n });\n\n const decrement = () => {\n const newValue = computedValue.value - computedStep.value;\n const emittedValue = props.min !== undefined ? Math.max(props.min, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const increment = () => {\n const newValue = computedValue.value + computedStep.value;\n const emittedValue = props.max !== undefined ? Math.min(props.max, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const onFocus = () => (focus.value = true);\n const onBlur = () => (focus.value = false);\n\n return {\n focus,\n sanitizedAttributes,\n computedDecimals,\n computedRawDecimals,\n computedValue,\n computedStep,\n displayValue,\n valueChanged,\n increment,\n decrement,\n onFocus,\n onBlur,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonFieldGroup","NeonInput","NeonFunctionalColor","NeonSize","NeonInputMode","props","emit","attrs","useAttrs","focus","ref","emitValue","value","sanitizedAttributes","computed","onBlur","onFocus","sanitized","valueChanged","parsedValue","NeonNumberUtils","newValue","computedDecimals","computedRawDecimals","computedValue","formattedValue","rawValue","displayValue","computedStep","emittedValue"],"mappings":"ibAiBAA,EAAeC,kBAAgB,CAC7B,KAAM,aACN,WAAY,CACV,WAAAC,EACA,eAAAC,EACA,UAAAC,CAAA,EAEF,MAAO,CAIL,GAAI,CAAE,KAAM,OAAQ,QAAS,IAAA,EAI7B,WAAY,CAAE,KAAM,OAAQ,QAAS,IAAA,EAIrC,IAAK,CAAE,KAAM,OAAQ,SAAU,EAAA,EAI/B,IAAK,CAAE,KAAM,OAAQ,SAAU,EAAA,EAI/B,KAAM,CAAE,KAAM,OAAQ,SAAU,EAAA,EAIhC,MAAO,CAAE,KAAM,OAAqC,QAASC,EAAAA,oBAAoB,OAAA,EAIjF,KAAM,CAAE,KAAM,OAA0B,QAASC,EAAAA,SAAS,MAAA,EAI1D,OAAQ,CAAE,KAAM,OAAQ,QAAS,IAAA,EAIjC,YAAa,CAAE,KAAM,OAAQ,QAAS,IAAA,EAItC,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,SAAU,CAAE,KAAM,QAAS,QAAS,EAAA,EAIpC,YAAa,CAAE,KAAM,QAAS,QAAS,EAAA,EAIvC,WAAY,CA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@
|
|
|
1
1
|
import { defineComponent as g, useAttrs as S, ref as B, computed as a } from "vue";
|
|
2
2
|
import { NeonFunctionalColor as F } from "../../../model/common/color/NeonFunctionalColor.es.js";
|
|
3
|
-
import { NeonSize as
|
|
4
|
-
import { NeonInputMode as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
3
|
+
import { NeonSize as x } from "../../../model/common/size/NeonSize.es.js";
|
|
4
|
+
import { NeonInputMode as M } from "../../../model/user-input/input/NeonInputMode.es.js";
|
|
5
|
+
import h from "../button/NeonButton.vue.es.js";
|
|
6
|
+
import w from "../field-group/NeonFieldGroup.vue.es.js";
|
|
7
|
+
import E from "../input/NeonInput.vue.es.js";
|
|
8
8
|
import { NeonNumberUtils as f } from "../../../utils/common/number/NeonNumberUtils.es.js";
|
|
9
|
-
const
|
|
9
|
+
const $ = g({
|
|
10
10
|
name: "NeonNumber",
|
|
11
11
|
components: {
|
|
12
|
-
NeonButton:
|
|
13
|
-
NeonFieldGroup:
|
|
14
|
-
NeonInput:
|
|
12
|
+
NeonButton: h,
|
|
13
|
+
NeonFieldGroup: w,
|
|
14
|
+
NeonInput: E
|
|
15
15
|
},
|
|
16
16
|
props: {
|
|
17
17
|
/**
|
|
@@ -41,7 +41,7 @@ const P = g({
|
|
|
41
41
|
/**
|
|
42
42
|
* The component size.
|
|
43
43
|
*/
|
|
44
|
-
size: { type: String, default:
|
|
44
|
+
size: { type: String, default: x.Medium },
|
|
45
45
|
/**
|
|
46
46
|
* The locale used for display purposes. This defaults to the browser's locale if none is provided.
|
|
47
47
|
*/
|
|
@@ -78,7 +78,7 @@ const P = g({
|
|
|
78
78
|
/**
|
|
79
79
|
* The HTML inputmode of the component. Either 'numeric' or 'decimal'.
|
|
80
80
|
*/
|
|
81
|
-
inputmode: { type: String, default:
|
|
81
|
+
inputmode: { type: String, default: M.Numeric },
|
|
82
82
|
/**
|
|
83
83
|
* ARIA label for the increment spinner button.
|
|
84
84
|
*/
|
|
@@ -97,16 +97,16 @@ const P = g({
|
|
|
97
97
|
"update:modelValue"
|
|
98
98
|
],
|
|
99
99
|
setup(e, { emit: s }) {
|
|
100
|
-
const v = S(), o = B(!1),
|
|
100
|
+
const v = S(), o = B(!1), i = (t) => {
|
|
101
101
|
e.disabled || s("update:modelValue", t);
|
|
102
102
|
}, N = a(() => {
|
|
103
103
|
const { onBlur: t, onFocus: l, ...m } = v;
|
|
104
104
|
return m;
|
|
105
105
|
}), V = (t) => {
|
|
106
106
|
const l = f.parseNumber(t), m = t !== "" && t !== null ? Math.max(Math.min(l, e.max ?? Number.MAX_SAFE_INTEGER), e.min ?? Number.MIN_SAFE_INTEGER) : null;
|
|
107
|
-
(m === null || !isNaN(l)) &&
|
|
108
|
-
}, u = a(() => e.decimals ?? (e.percentage ? 0 : void 0)), n = a(() => e.percentage && u.value !== void 0 ? u.value + 2 : u.value),
|
|
109
|
-
const t = e.modelValue !== null ? +e.modelValue : e.min
|
|
107
|
+
(m === null || !isNaN(l)) && i(m);
|
|
108
|
+
}, u = a(() => e.decimals ?? (e.percentage ? 0 : void 0)), n = a(() => e.percentage && u.value !== void 0 ? u.value + 2 : u.value), d = a(() => {
|
|
109
|
+
const t = e.modelValue !== null ? +e.modelValue : e.min ?? 0;
|
|
110
110
|
return n.value !== void 0 ? Number(t.toFixed(n.value)) : t;
|
|
111
111
|
}), y = a(() => e.modelValue !== null && (e.valueTemplate !== void 0 || u.value !== void 0 || e.percentage !== void 0) ? f.formatNumber(
|
|
112
112
|
e.modelValue,
|
|
@@ -116,26 +116,23 @@ const P = g({
|
|
|
116
116
|
percentage: e.percentage
|
|
117
117
|
},
|
|
118
118
|
e.locale
|
|
119
|
-
) : e.modelValue), c = a(() => {
|
|
120
|
-
var t;
|
|
121
|
-
return n.value ? (t = e.modelValue) == null ? void 0 : t.toFixed(n.value) : e.modelValue;
|
|
122
|
-
}), b = a(() => o.value ? c.value ? `${c.value}` : "" : y.value), d = a(() => e.step ?? (e.percentage ? 0.01 : 1));
|
|
119
|
+
) : e.modelValue), c = a(() => n.value !== void 0 && e.modelValue !== null ? e.modelValue.toFixed(n.value) : e.modelValue === null ? "" : `${e.modelValue}`), b = a(() => o.value ? c.value !== void 0 ? `${c.value}` : "" : y.value), r = a(() => e.step ?? (e.percentage ? 0.01 : 1));
|
|
123
120
|
return {
|
|
124
121
|
focus: o,
|
|
125
122
|
sanitizedAttributes: N,
|
|
126
123
|
computedDecimals: u,
|
|
127
124
|
computedRawDecimals: n,
|
|
128
|
-
computedValue:
|
|
129
|
-
computedStep:
|
|
125
|
+
computedValue: d,
|
|
126
|
+
computedStep: r,
|
|
130
127
|
displayValue: b,
|
|
131
128
|
valueChanged: V,
|
|
132
129
|
increment: () => {
|
|
133
|
-
const t =
|
|
134
|
-
l !== e.modelValue &&
|
|
130
|
+
const t = d.value + r.value, l = e.max !== void 0 ? Math.min(e.max, t) : t;
|
|
131
|
+
l !== e.modelValue && i(l);
|
|
135
132
|
},
|
|
136
133
|
decrement: () => {
|
|
137
|
-
const t =
|
|
138
|
-
l !== e.modelValue &&
|
|
134
|
+
const t = d.value - r.value, l = e.min !== void 0 ? Math.max(e.min, t) : t;
|
|
135
|
+
l !== e.modelValue && i(l);
|
|
139
136
|
},
|
|
140
137
|
onFocus: () => o.value = !0,
|
|
141
138
|
onBlur: () => o.value = !1
|
|
@@ -143,6 +140,6 @@ const P = g({
|
|
|
143
140
|
}
|
|
144
141
|
});
|
|
145
142
|
export {
|
|
146
|
-
|
|
143
|
+
$ as default
|
|
147
144
|
};
|
|
148
145
|
//# sourceMappingURL=NeonNumber.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NeonNumber.es.js","sources":["../../../../src/components/user-input/number/NeonNumber.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonInputMode } from '@/model/user-input/input/NeonInputMode';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\n\n/**\n * <p>\n * The <strong>NeonNumber</strong> component is the equivalent of an <strong><input type=\"number\" /></strong>\n * with -/+ spin buttons. In addition, it supports formatting as a percentage or with a provided custom template and\n * also pasting of values in the user's locale, e.g. 6,543.12.\n * </p>\n * <p><strong>NeonNumber</strong> supports all the properties found on an HTML <input>.</p>\n */\nexport default defineComponent({\n name: 'NeonNumber',\n components: {\n NeonButton,\n NeonFieldGroup,\n NeonInput,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the number input. Either a valid number or null.\n */\n modelValue: { type: Number, default: null },\n /**\n * The minimum value the input can accept.\n */\n min: { type: Number, required: false },\n /**\n * The maximum value the input can accept.\n */\n max: { type: Number, required: false },\n /**\n * The step value for the spin buttons.\n */\n step: { type: Number, required: false },\n /**\n * The component color.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The component size.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Whether the component is disabled.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Enable/disable direct editing of the value.\n */\n editable: { type: Boolean, default: true },\n /**\n * Show/hide spin buttons. NOTE: The user can still use up/down arrow keys when the input has focus.\n */\n spinButtons: { type: Boolean, default: false },\n /**\n * Automatically applies % formatting, e.g. if the value = 0.15 it will be displayed as 15%.\n */\n percentage: { type: Boolean, default: false },\n /**\n * The rounding precision for display formatting.\n */\n decimals: { type: Number, required: false },\n /**\n * A template string used for formatting the value for display. Use the placeholder {value} to reference the value in\n * the template string. e.g. value = 90, ${value} => $90.\n */\n valueTemplate: { type: String, required: false },\n /**\n * The HTML inputmode of the component. Either 'numeric' or 'decimal'.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Numeric },\n /**\n * ARIA label for the increment spinner button.\n */\n incrementLabel: { type: String, default: 'Increment' },\n /**\n * ARIA label for the decrement spinner button.\n */\n decrementLabel: { type: String, default: 'Decrement' },\n },\n emits: [\n /**\n * Emitted when the user changes the value of the number via the increment/decrement buttons or manually entering\n * the value.\n * @type {number | null} the current value or null if the value has been cleared.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const focus = ref(false);\n\n const emitValue = (value: number | null) => {\n if (!props.disabled) {\n emit('update:modelValue', value);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onBlur, onFocus, ...sanitized } = attrs;\n return sanitized;\n });\n\n const valueChanged = (value: string) => {\n const parsedValue = NeonNumberUtils.parseNumber(value);\n const newValue =\n value !== '' && value !== null\n ? Math.max(Math.min(parsedValue, props.max ?? Number.MAX_SAFE_INTEGER), props.min ?? Number.MIN_SAFE_INTEGER)\n : null;\n if (newValue === null || !isNaN(parsedValue)) {\n emitValue(newValue);\n }\n };\n\n const computedDecimals = computed(() => {\n return props.decimals ?? (props.percentage ? 0 : undefined);\n });\n\n const computedRawDecimals = computed(() => {\n return props.percentage && computedDecimals.value !== undefined\n ? computedDecimals.value + 2\n : computedDecimals.value;\n });\n\n const computedValue = computed(() => {\n const newValue = props.modelValue !== null ? +props.modelValue : props.min || 0;\n return computedRawDecimals.value !== undefined ? Number(newValue.toFixed(computedRawDecimals.value)) : newValue;\n });\n\n const formattedValue = computed(() => {\n return props.modelValue !== null &&\n (props.valueTemplate !== undefined || computedDecimals.value !== undefined || props.percentage !== undefined)\n ? NeonNumberUtils.formatNumber(\n props.modelValue,\n {\n decimals: computedDecimals.value,\n format: props.valueTemplate,\n percentage: props.percentage,\n },\n props.locale,\n )\n : props.modelValue;\n });\n\n const rawValue = computed(() => {\n return computedRawDecimals.value ? props.modelValue?.toFixed(computedRawDecimals.value) : props.modelValue;\n });\n\n const displayValue = computed(() => {\n return focus.value ? (rawValue.value ? `${rawValue.value}` : '') : formattedValue.value;\n });\n\n const computedStep = computed(() => {\n return props.step ?? (props.percentage ? 0.01 : 1);\n });\n\n const decrement = () => {\n const newValue = computedValue.value - computedStep.value;\n const emittedValue = props.min !== undefined ? Math.max(props.min, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const increment = () => {\n const newValue = computedValue.value + computedStep.value;\n const emittedValue = props.max !== undefined ? Math.min(props.max, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const onFocus = () => (focus.value = true);\n const onBlur = () => (focus.value = false);\n\n return {\n focus,\n sanitizedAttributes,\n computedDecimals,\n computedRawDecimals,\n computedValue,\n computedStep,\n displayValue,\n valueChanged,\n increment,\n decrement,\n onFocus,\n onBlur,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonFieldGroup","NeonInput","NeonFunctionalColor","NeonSize","NeonInputMode","props","emit","attrs","useAttrs","focus","ref","emitValue","value","sanitizedAttributes","computed","onBlur","onFocus","sanitized","valueChanged","parsedValue","NeonNumberUtils","newValue","computedDecimals","computedRawDecimals","computedValue","formattedValue","rawValue","_a","displayValue","computedStep","emittedValue"],"mappings":";;;;;;;;AAiBA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAI7B,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;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S,MAAM;;AAC9B,aAAOS,EAAoB,SAAQI,IAAAtB,EAAM,eAAN,gBAAAsB,EAAkB,QAAQJ,EAAoB,SAASlB,EAAM;AAAA,IAClG,CAAC,GAEKuB,IAAed,EAAS,MACrBL,EAAM,QAASiB,EAAS,QAAQ,GAAGA,EAAS,KAAK,KAAK,KAAMD,EAAe,KACnF,GAEKI,IAAef,EAAS,MACrBT,EAAM,SAASA,EAAM,aAAa,OAAO,EACjD;AAqBD,WAAO;AAAA,MACL,OAAAI;AAAA,MACA,qBAAAI;AAAA,MACA,kBAAAS;AAAA,MACA,qBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAK;AAAA,MACA,cAAAD;AAAA,MACA,cAAAV;AAAA,MACA,WApBgB,MAAM;AACtB,cAAMG,IAAWG,EAAc,QAAQK,EAAa,OAC9CC,IAAezB,EAAM,QAAQ,SAAY,KAAK,IAAIA,EAAM,KAAKgB,CAAQ,IAAIA;AAC/E,QAAIS,MAAiBzB,EAAM,cACzBM,EAAUmB,CAAY;AAAA,MAE1B;AAAA,MAeE,WA7BgB,MAAM;AACtB,cAAMT,IAAWG,EAAc,QAAQK,EAAa,OAC9CC,IAAezB,EAAM,QAAQ,SAAY,KAAK,IAAIA,EAAM,KAAKgB,CAAQ,IAAIA;AAC/E,QAAIS,MAAiBzB,EAAM,cACzBM,EAAUmB,CAAY;AAAA,MAE1B;AAAA,MAwBE,SAdc,MAAOrB,EAAM,QAAQ;AAAA,MAenC,QAda,MAAOA,EAAM,QAAQ;AAAA,IAclC;AAAA,EAEJ;AACF,CAAC;"}
|
|
1
|
+
{"version":3,"file":"NeonNumber.es.js","sources":["../../../../src/components/user-input/number/NeonNumber.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref, useAttrs } from 'vue';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonInputMode } from '@/model/user-input/input/NeonInputMode';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\n\n/**\n * <p>\n * The <strong>NeonNumber</strong> component is the equivalent of an <strong><input type=\"number\" /></strong>\n * with -/+ spin buttons. In addition, it supports formatting as a percentage or with a provided custom template and\n * also pasting of values in the user's locale, e.g. 6,543.12.\n * </p>\n * <p><strong>NeonNumber</strong> supports all the properties found on an HTML <input>.</p>\n */\nexport default defineComponent({\n name: 'NeonNumber',\n components: {\n NeonButton,\n NeonFieldGroup,\n NeonInput,\n },\n props: {\n /**\n * The id the input\n */\n id: { type: String, default: null },\n /**\n * The value of the number input. Either a valid number or null.\n */\n modelValue: { type: Number, default: null },\n /**\n * The minimum value the input can accept.\n */\n min: { type: Number, required: false },\n /**\n * The maximum value the input can accept.\n */\n max: { type: Number, required: false },\n /**\n * The step value for the spin buttons.\n */\n step: { type: Number, required: false },\n /**\n * The component color.\n */\n color: { type: String as () => NeonFunctionalColor, default: NeonFunctionalColor.Primary },\n /**\n * The component size.\n */\n size: { type: String as () => NeonSize, default: NeonSize.Medium },\n /**\n * The locale used for display purposes. This defaults to the browser's locale if none is provided.\n */\n locale: { type: String, default: null },\n /**\n * Placeholder text to display in the input\n */\n placeholder: { type: String, default: null },\n /**\n * Whether the component is disabled.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Enable/disable direct editing of the value.\n */\n editable: { type: Boolean, default: true },\n /**\n * Show/hide spin buttons. NOTE: The user can still use up/down arrow keys when the input has focus.\n */\n spinButtons: { type: Boolean, default: false },\n /**\n * Automatically applies % formatting, e.g. if the value = 0.15 it will be displayed as 15%.\n */\n percentage: { type: Boolean, default: false },\n /**\n * The rounding precision for display formatting.\n */\n decimals: { type: Number, required: false },\n /**\n * A template string used for formatting the value for display. Use the placeholder {value} to reference the value in\n * the template string. e.g. value = 90, ${value} => $90.\n */\n valueTemplate: { type: String, required: false },\n /**\n * The HTML inputmode of the component. Either 'numeric' or 'decimal'.\n */\n inputmode: { type: String as () => NeonInputMode, default: NeonInputMode.Numeric },\n /**\n * ARIA label for the increment spinner button.\n */\n incrementLabel: { type: String, default: 'Increment' },\n /**\n * ARIA label for the decrement spinner button.\n */\n decrementLabel: { type: String, default: 'Decrement' },\n },\n emits: [\n /**\n * Emitted when the user changes the value of the number via the increment/decrement buttons or manually entering\n * the value.\n * @type {number | null} the current value or null if the value has been cleared.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const attrs = useAttrs();\n const focus = ref(false);\n\n const emitValue = (value: number | null) => {\n if (!props.disabled) {\n emit('update:modelValue', value);\n }\n };\n\n const sanitizedAttributes = computed(() => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { onBlur, onFocus, ...sanitized } = attrs;\n return sanitized;\n });\n\n const valueChanged = (value: string) => {\n const parsedValue = NeonNumberUtils.parseNumber(value);\n const newValue =\n value !== '' && value !== null\n ? Math.max(Math.min(parsedValue, props.max ?? Number.MAX_SAFE_INTEGER), props.min ?? Number.MIN_SAFE_INTEGER)\n : null;\n if (newValue === null || !isNaN(parsedValue)) {\n emitValue(newValue);\n }\n };\n\n const computedDecimals = computed(() => {\n return props.decimals ?? (props.percentage ? 0 : undefined);\n });\n\n const computedRawDecimals = computed(() => {\n return props.percentage && computedDecimals.value !== undefined\n ? computedDecimals.value + 2\n : computedDecimals.value;\n });\n\n const computedValue = computed(() => {\n const newValue = props.modelValue !== null ? +props.modelValue : props.min ?? 0;\n return computedRawDecimals.value !== undefined ? Number(newValue.toFixed(computedRawDecimals.value)) : newValue;\n });\n\n const formattedValue = computed(() => {\n return props.modelValue !== null &&\n (props.valueTemplate !== undefined || computedDecimals.value !== undefined || props.percentage !== undefined)\n ? NeonNumberUtils.formatNumber(\n props.modelValue,\n {\n decimals: computedDecimals.value,\n format: props.valueTemplate,\n percentage: props.percentage,\n },\n props.locale,\n )\n : props.modelValue;\n });\n\n const rawValue = computed(() => {\n return computedRawDecimals.value !== undefined && props.modelValue !== null\n ? props.modelValue.toFixed(computedRawDecimals.value)\n : props.modelValue === null\n ? ''\n : `${props.modelValue}`;\n });\n\n const displayValue = computed(() => {\n return focus.value ? (rawValue.value !== undefined ? `${rawValue.value}` : '') : formattedValue.value;\n });\n\n const computedStep = computed(() => {\n return props.step ?? (props.percentage ? 0.01 : 1);\n });\n\n const decrement = () => {\n const newValue = computedValue.value - computedStep.value;\n const emittedValue = props.min !== undefined ? Math.max(props.min, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const increment = () => {\n const newValue = computedValue.value + computedStep.value;\n const emittedValue = props.max !== undefined ? Math.min(props.max, newValue) : newValue;\n if (emittedValue !== props.modelValue) {\n emitValue(emittedValue);\n }\n };\n\n const onFocus = () => (focus.value = true);\n const onBlur = () => (focus.value = false);\n\n return {\n focus,\n sanitizedAttributes,\n computedDecimals,\n computedRawDecimals,\n computedValue,\n computedStep,\n displayValue,\n valueChanged,\n increment,\n decrement,\n onFocus,\n onBlur,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonFieldGroup","NeonInput","NeonFunctionalColor","NeonSize","NeonInputMode","props","emit","attrs","useAttrs","focus","ref","emitValue","value","sanitizedAttributes","computed","onBlur","onFocus","sanitized","valueChanged","parsedValue","NeonNumberUtils","newValue","computedDecimals","computedRawDecimals","computedValue","formattedValue","rawValue","displayValue","computedStep","emittedValue"],"mappings":";;;;;;;;AAiBA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,IAAI,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA;AAAA;AAAA;AAAA,IAI7B,YAAY,EAAE,MAAM,Q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ACX,GAEKqB,IAAWZ,EAAS,MACjBS,EAAoB,UAAU,UAAalB,EAAM,eAAe,OACnEA,EAAM,WAAW,QAAQkB,EAAoB,KAAK,IAClDlB,EAAM,eAAe,OACrB,KACA,GAAGA,EAAM,UAAU,EACxB,GAEKsB,IAAeb,EAAS,MACrBL,EAAM,QAASiB,EAAS,UAAU,SAAY,GAAGA,EAAS,KAAK,KAAK,KAAMD,EAAe,KACjG,GAEKG,IAAed,EAAS,MACrBT,EAAM,SAASA,EAAM,aAAa,OAAO,EACjD;AAqBD,WAAO;AAAA,MACL,OAAAI;AAAA,MACA,qBAAAI;AAAA,MACA,kBAAAS;AAAA,MACA,qBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAI;AAAA,MACA,cAAAD;AAAA,MACA,cAAAT;AAAA,MACA,WApBgB,MAAM;AACtB,cAAMG,IAAWG,EAAc,QAAQI,EAAa,OAC9CC,IAAexB,EAAM,QAAQ,SAAY,KAAK,IAAIA,EAAM,KAAKgB,CAAQ,IAAIA;AAC/E,QAAIQ,MAAiBxB,EAAM,cACzBM,EAAUkB,CAAY;AAAA,MAE1B;AAAA,MAeE,WA7BgB,MAAM;AACtB,cAAMR,IAAWG,EAAc,QAAQI,EAAa,OAC9CC,IAAexB,EAAM,QAAQ,SAAY,KAAK,IAAIA,EAAM,KAAKgB,CAAQ,IAAIA;AAC/E,QAAIQ,MAAiBxB,EAAM,cACzBM,EAAUkB,CAAY;AAAA,MAE1B;AAAA,MAwBE,SAdc,MAAOpB,EAAM,QAAQ;AAAA,MAenC,QAda,MAAOA,EAAM,QAAQ;AAAA,IAclC;AAAA,EAEJ;AACF,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const o=require("vue"),b=require("../button/NeonButton.vue.cjs.js"),v=require("../../presentation/dropdown/NeonDropdown.vue.cjs.js"),p=require("../field-group/NeonFieldGroup.vue.cjs.js"),C=require("../input/NeonInput.vue.cjs.js"),y=require("../../layout/stack/NeonStack.vue.cjs.js"),c=require("../../../utils/common/number/NeonNumberUtils.cjs.js"),g=require("../../../model/common/size/NeonSize.cjs.js"),q=require("../../../model/common/color/NeonFunctionalColor.cjs.js"),V=o.defineComponent({name:"NeonSearchFilter",components:{NeonButton:b,NeonDropdown:v,NeonFieldGroup:p,NeonInput:C,NeonStack:y},props:{modelValue:{type:String,required:!0},searchCount:{type:Number,required:!0},label:{type:String,default:"Search"},placeholder:{type:String,default:"Search"},color:{type:String,default:()=>q.NeonFunctionalColor.HighContrast},size:{type:String,default:()=>g.NeonSize.Small},disabled:{type:Boolean,default:!1},editTitle:{type:String,default:"Edit"},clearTitle:{type:String,default:"Clear"},closeLabel:{type:String,default:"Close"},showLabel:{type:String,default:"Show {count} items | Show {count} item | Show {count} items"}},emits:["close","onSearch","update:modelValue"],setup(e,{emit:a}){const u=o.ref(!1),t=o.ref(e.modelValue),n=o.computed(()=>e.modelValue!==t.value),i=l=>{t.value=l,a("update:modelValue",t.value),r()},s=()=>{t.value=e.modelValue,u.value=!0},r=()=>{t.value=e.modelValue,u.value=!1},d=l=>{t.value=l,a("onSearch",t.value)},m=()=>{t.value!==""&&(t.value="",a("update:modelValue",t.value))},S=o.computed(()=>e.modelValue!==""?e.modelValue:e.label),h=o.computed(()=>{const f=e.showLabel.split("|").map(N=>N.trim())[e.searchCount>1?2:e.searchCount];return n.value?f.replace("{count}",c.NeonNumberUtils.formatNumber(e.searchCount)):e.closeLabel});return{open:u,search:t,computedLabel:S,computedShowLabel:h,isDirty:n,onOpen:s,onClose:r,onSearchChange:d,onSearchClear:m,updateSearch:i,formatNumber:c.NeonNumberUtils.formatNumber}}});module.exports=V;
|
|
2
|
+
//# sourceMappingURL=NeonSearchFilter.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonSearchFilter.cjs.js","sources":["../../../../src/components/user-input/search-filter/NeonSearchFilter.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonDropdown from '@/components/presentation/dropdown/NeonDropdown.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonStack from '@/components/layout/stack/NeonStack.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * A search filter component consisting of a button and a dropdown with a search input. The button either displays the\n * search label or the current search text.\n */\nexport default defineComponent({\n name: 'NeonSearchFilter',\n components: {\n NeonButton,\n NeonDropdown,\n NeonFieldGroup,\n NeonInput,\n NeonStack,\n },\n props: {\n /**\n * The filter text\n */\n modelValue: { type: String, required: true },\n /**\n * The count of results matching the current search string. NOTE: This is not the count for the search based on the\n * model value but rather the count based on the current search string in the dropdown. This allows the component\n * to display the matching count to the user BEFORE they trigger the CTA to update the search string & refresh the\n * actual data.\n */\n searchCount: { type: Number, required: true },\n /**\n * The button & dropdown label when nothing is selected.\n */\n label: { type: String, default: 'Search' },\n /**\n * The search input placeholder text.\n */\n placeholder: { type: String, default: 'Search' },\n /**\n * The color of the component.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.HighContrast },\n /**\n * The size of the dropdown button.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Small },\n /**\n * The disabled state of the buttons.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Button title when items are selected.\n */\n editTitle: { type: String, default: 'Edit' },\n /**\n * Clear button title.\n */\n clearTitle: { type: String, default: 'Clear' },\n /**\n * The close CTA label.\n */\n closeLabel: { type: String, default: 'Close' },\n /**\n * The show 'n' items CTA label. This should adhere to the vue-i18n pluralization format\n * e.g. 'Show {count} items | Show {count} item | Show {count} items'.\n * There is one placeholder: {count} - the count of items matching this filter.\n */\n showLabel: { type: String, default: 'Show {count} items | Show {count} item | Show {count} items' },\n },\n emits: [\n /**\n * Emitted when the close CTA is clicked.\n */\n 'close',\n /**\n * Emits when the user changes the search field string. It is expected that the search count is refreshed based on\n * the new search string when this is triggered. This count will be displayed in the 'Show {count} items' CTA which\n * updates the model.\n *\n * @type {string} - The new search string.\n */\n 'onSearch',\n /**\n * Emits when the 'Show' CTA is triggered.\n *\n * @type {string} - The filter text.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const open = ref<boolean>(false);\n\n const search = ref<string>(props.modelValue);\n const isDirty = computed<boolean>(() => props.modelValue !== search.value);\n\n const updateSearch = (newValue: string) => {\n search.value = newValue;\n emit('update:modelValue', search.value);\n onClose();\n };\n\n const onOpen = () => {\n search.value = props.modelValue;\n open.value = true;\n };\n\n const onClose = () => {\n search.value = props.modelValue;\n open.value = false;\n };\n\n const onSearchChange = (newValue: string) => {\n search.value = newValue;\n emit('onSearch', search.value);\n };\n\n const onSearchClear = () => {\n if (search.value !== '') {\n search.value = '';\n emit('update:modelValue', search.value);\n }\n };\n\n const computedLabel = computed<string>(() => (props.modelValue !== '' ? props.modelValue : props.label));\n\n const computedShowLabel = computed<string>(() => {\n const labels = props.showLabel.split('|').map((l) => l.trim());\n const label = labels[props.searchCount > 1 ? 2 : props.searchCount];\n return isDirty.value\n ? label.replace('{count}', NeonNumberUtils.formatNumber(props.searchCount))\n : props.closeLabel;\n });\n\n return {\n open,\n search,\n computedLabel,\n computedShowLabel,\n isDirty,\n onOpen,\n onClose,\n onSearchChange,\n onSearchClear,\n updateSearch,\n formatNumber: NeonNumberUtils.formatNumber,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonDropdown","NeonFieldGroup","NeonInput","NeonStack","NeonFunctionalColor","NeonSize","props","emit","open","ref","search","isDirty","computed","updateSearch","newValue","onClose","onOpen","onSearchChange","onSearchClear","computedLabel","computedShowLabel","label","l","NeonNumberUtils"],"mappings":"qeAcAA,EAAeC,kBAAgB,CAC7B,KAAM,mB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,GACfH,EAAK,oBAAqBG,EAAO,KAAK,EAE1C,EAEMS,EAAgBP,WAAiB,IAAON,EAAM,aAAe,GAAKA,EAAM,WAAaA,EAAM,KAAM,EAEjGc,EAAoBR,EAAAA,SAAiB,IAAM,CAE/C,MAAMS,EADSf,EAAM,UAAU,MAAM,GAAG,EAAE,IAAKgB,GAAMA,EAAE,KAAA,CAAM,EACxChB,EAAM,YAAc,EAAI,EAAIA,EAAM,WAAW,EAClE,OAAOK,EAAQ,MACXU,EAAM,QAAQ,UAAWE,kBAAgB,aAAajB,EAAM,WAAW,CAAC,EACxEA,EAAM,UACZ,CAAC,EAED,MAAO,CACL,KAAAE,EACA,OAAAE,EACA,cAAAS,EACA,kBAAAC,EACA,QAAAT,EACA,OAAAK,EACA,QAAAD,EACA,eAAAE,EACA,cAAAC,EACA,aAAAL,EACA,aAAcU,EAAAA,gBAAgB,YAAA,CAElC,CACF,CAAC"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { defineComponent as N, ref as m, computed as u } from "vue";
|
|
2
|
+
import v from "../button/NeonButton.vue.es.js";
|
|
3
|
+
import y from "../../presentation/dropdown/NeonDropdown.vue.es.js";
|
|
4
|
+
import C from "../field-group/NeonFieldGroup.vue.es.js";
|
|
5
|
+
import g from "../input/NeonInput.vue.es.js";
|
|
6
|
+
import V from "../../layout/stack/NeonStack.vue.es.js";
|
|
7
|
+
import { NeonNumberUtils as c } from "../../../utils/common/number/NeonNumberUtils.es.js";
|
|
8
|
+
import { NeonSize as w } from "../../../model/common/size/NeonSize.es.js";
|
|
9
|
+
import { NeonFunctionalColor as L } from "../../../model/common/color/NeonFunctionalColor.es.js";
|
|
10
|
+
const E = N({
|
|
11
|
+
name: "NeonSearchFilter",
|
|
12
|
+
components: {
|
|
13
|
+
NeonButton: v,
|
|
14
|
+
NeonDropdown: y,
|
|
15
|
+
NeonFieldGroup: C,
|
|
16
|
+
NeonInput: g,
|
|
17
|
+
NeonStack: V
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
/**
|
|
21
|
+
* The filter text
|
|
22
|
+
*/
|
|
23
|
+
modelValue: { type: String, required: !0 },
|
|
24
|
+
/**
|
|
25
|
+
* The count of results matching the current search string. NOTE: This is not the count for the search based on the
|
|
26
|
+
* model value but rather the count based on the current search string in the dropdown. This allows the component
|
|
27
|
+
* to display the matching count to the user BEFORE they trigger the CTA to update the search string & refresh the
|
|
28
|
+
* actual data.
|
|
29
|
+
*/
|
|
30
|
+
searchCount: { type: Number, required: !0 },
|
|
31
|
+
/**
|
|
32
|
+
* The button & dropdown label when nothing is selected.
|
|
33
|
+
*/
|
|
34
|
+
label: { type: String, default: "Search" },
|
|
35
|
+
/**
|
|
36
|
+
* The search input placeholder text.
|
|
37
|
+
*/
|
|
38
|
+
placeholder: { type: String, default: "Search" },
|
|
39
|
+
/**
|
|
40
|
+
* The color of the component.
|
|
41
|
+
*/
|
|
42
|
+
color: { type: String, default: () => L.HighContrast },
|
|
43
|
+
/**
|
|
44
|
+
* The size of the dropdown button.
|
|
45
|
+
*/
|
|
46
|
+
size: { type: String, default: () => w.Small },
|
|
47
|
+
/**
|
|
48
|
+
* The disabled state of the buttons.
|
|
49
|
+
*/
|
|
50
|
+
disabled: { type: Boolean, default: !1 },
|
|
51
|
+
/**
|
|
52
|
+
* Button title when items are selected.
|
|
53
|
+
*/
|
|
54
|
+
editTitle: { type: String, default: "Edit" },
|
|
55
|
+
/**
|
|
56
|
+
* Clear button title.
|
|
57
|
+
*/
|
|
58
|
+
clearTitle: { type: String, default: "Clear" },
|
|
59
|
+
/**
|
|
60
|
+
* The close CTA label.
|
|
61
|
+
*/
|
|
62
|
+
closeLabel: { type: String, default: "Close" },
|
|
63
|
+
/**
|
|
64
|
+
* The show 'n' items CTA label. This should adhere to the vue-i18n pluralization format
|
|
65
|
+
* e.g. 'Show {count} items | Show {count} item | Show {count} items'.
|
|
66
|
+
* There is one placeholder: {count} - the count of items matching this filter.
|
|
67
|
+
*/
|
|
68
|
+
showLabel: { type: String, default: "Show {count} items | Show {count} item | Show {count} items" }
|
|
69
|
+
},
|
|
70
|
+
emits: [
|
|
71
|
+
/**
|
|
72
|
+
* Emitted when the close CTA is clicked.
|
|
73
|
+
*/
|
|
74
|
+
"close",
|
|
75
|
+
/**
|
|
76
|
+
* Emits when the user changes the search field string. It is expected that the search count is refreshed based on
|
|
77
|
+
* the new search string when this is triggered. This count will be displayed in the 'Show {count} items' CTA which
|
|
78
|
+
* updates the model.
|
|
79
|
+
*
|
|
80
|
+
* @type {string} - The new search string.
|
|
81
|
+
*/
|
|
82
|
+
"onSearch",
|
|
83
|
+
/**
|
|
84
|
+
* Emits when the 'Show' CTA is triggered.
|
|
85
|
+
*
|
|
86
|
+
* @type {string} - The filter text.
|
|
87
|
+
*/
|
|
88
|
+
"update:modelValue"
|
|
89
|
+
],
|
|
90
|
+
setup(e, { emit: l }) {
|
|
91
|
+
const a = m(!1), t = m(e.modelValue), n = u(() => e.modelValue !== t.value), i = (o) => {
|
|
92
|
+
t.value = o, l("update:modelValue", t.value), r();
|
|
93
|
+
}, d = () => {
|
|
94
|
+
t.value = e.modelValue, a.value = !0;
|
|
95
|
+
}, r = () => {
|
|
96
|
+
t.value = e.modelValue, a.value = !1;
|
|
97
|
+
}, s = (o) => {
|
|
98
|
+
t.value = o, l("onSearch", t.value);
|
|
99
|
+
}, f = () => {
|
|
100
|
+
t.value !== "" && (t.value = "", l("update:modelValue", t.value));
|
|
101
|
+
}, S = u(() => e.modelValue !== "" ? e.modelValue : e.label), h = u(() => {
|
|
102
|
+
const p = e.showLabel.split("|").map((b) => b.trim())[e.searchCount > 1 ? 2 : e.searchCount];
|
|
103
|
+
return n.value ? p.replace("{count}", c.formatNumber(e.searchCount)) : e.closeLabel;
|
|
104
|
+
});
|
|
105
|
+
return {
|
|
106
|
+
open: a,
|
|
107
|
+
search: t,
|
|
108
|
+
computedLabel: S,
|
|
109
|
+
computedShowLabel: h,
|
|
110
|
+
isDirty: n,
|
|
111
|
+
onOpen: d,
|
|
112
|
+
onClose: r,
|
|
113
|
+
onSearchChange: s,
|
|
114
|
+
onSearchClear: f,
|
|
115
|
+
updateSearch: i,
|
|
116
|
+
formatNumber: c.formatNumber
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
export {
|
|
121
|
+
E as default
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=NeonSearchFilter.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonSearchFilter.es.js","sources":["../../../../src/components/user-input/search-filter/NeonSearchFilter.ts?vue&type=script&src=true&lang.ts"],"sourcesContent":["import { computed, defineComponent, ref } from 'vue';\nimport NeonButton from '@/components/user-input/button/NeonButton.vue';\nimport NeonDropdown from '@/components/presentation/dropdown/NeonDropdown.vue';\nimport NeonFieldGroup from '@/components/user-input/field-group/NeonFieldGroup.vue';\nimport NeonInput from '@/components/user-input/input/NeonInput.vue';\nimport NeonStack from '@/components/layout/stack/NeonStack.vue';\nimport { NeonNumberUtils } from '@/utils/common/number/NeonNumberUtils';\nimport { NeonSize } from '@/model/common/size/NeonSize';\nimport { NeonFunctionalColor } from '@/model/common/color/NeonFunctionalColor';\n\n/**\n * A search filter component consisting of a button and a dropdown with a search input. The button either displays the\n * search label or the current search text.\n */\nexport default defineComponent({\n name: 'NeonSearchFilter',\n components: {\n NeonButton,\n NeonDropdown,\n NeonFieldGroup,\n NeonInput,\n NeonStack,\n },\n props: {\n /**\n * The filter text\n */\n modelValue: { type: String, required: true },\n /**\n * The count of results matching the current search string. NOTE: This is not the count for the search based on the\n * model value but rather the count based on the current search string in the dropdown. This allows the component\n * to display the matching count to the user BEFORE they trigger the CTA to update the search string & refresh the\n * actual data.\n */\n searchCount: { type: Number, required: true },\n /**\n * The button & dropdown label when nothing is selected.\n */\n label: { type: String, default: 'Search' },\n /**\n * The search input placeholder text.\n */\n placeholder: { type: String, default: 'Search' },\n /**\n * The color of the component.\n */\n color: { type: String as () => NeonFunctionalColor, default: () => NeonFunctionalColor.HighContrast },\n /**\n * The size of the dropdown button.\n */\n size: { type: String as () => NeonSize, default: () => NeonSize.Small },\n /**\n * The disabled state of the buttons.\n */\n disabled: { type: Boolean, default: false },\n /**\n * Button title when items are selected.\n */\n editTitle: { type: String, default: 'Edit' },\n /**\n * Clear button title.\n */\n clearTitle: { type: String, default: 'Clear' },\n /**\n * The close CTA label.\n */\n closeLabel: { type: String, default: 'Close' },\n /**\n * The show 'n' items CTA label. This should adhere to the vue-i18n pluralization format\n * e.g. 'Show {count} items | Show {count} item | Show {count} items'.\n * There is one placeholder: {count} - the count of items matching this filter.\n */\n showLabel: { type: String, default: 'Show {count} items | Show {count} item | Show {count} items' },\n },\n emits: [\n /**\n * Emitted when the close CTA is clicked.\n */\n 'close',\n /**\n * Emits when the user changes the search field string. It is expected that the search count is refreshed based on\n * the new search string when this is triggered. This count will be displayed in the 'Show {count} items' CTA which\n * updates the model.\n *\n * @type {string} - The new search string.\n */\n 'onSearch',\n /**\n * Emits when the 'Show' CTA is triggered.\n *\n * @type {string} - The filter text.\n */\n 'update:modelValue',\n ],\n setup(props, { emit }) {\n const open = ref<boolean>(false);\n\n const search = ref<string>(props.modelValue);\n const isDirty = computed<boolean>(() => props.modelValue !== search.value);\n\n const updateSearch = (newValue: string) => {\n search.value = newValue;\n emit('update:modelValue', search.value);\n onClose();\n };\n\n const onOpen = () => {\n search.value = props.modelValue;\n open.value = true;\n };\n\n const onClose = () => {\n search.value = props.modelValue;\n open.value = false;\n };\n\n const onSearchChange = (newValue: string) => {\n search.value = newValue;\n emit('onSearch', search.value);\n };\n\n const onSearchClear = () => {\n if (search.value !== '') {\n search.value = '';\n emit('update:modelValue', search.value);\n }\n };\n\n const computedLabel = computed<string>(() => (props.modelValue !== '' ? props.modelValue : props.label));\n\n const computedShowLabel = computed<string>(() => {\n const labels = props.showLabel.split('|').map((l) => l.trim());\n const label = labels[props.searchCount > 1 ? 2 : props.searchCount];\n return isDirty.value\n ? label.replace('{count}', NeonNumberUtils.formatNumber(props.searchCount))\n : props.closeLabel;\n });\n\n return {\n open,\n search,\n computedLabel,\n computedShowLabel,\n isDirty,\n onOpen,\n onClose,\n onSearchChange,\n onSearchClear,\n updateSearch,\n formatNumber: NeonNumberUtils.formatNumber,\n };\n },\n});\n"],"names":["_sfc_main","defineComponent","NeonButton","NeonDropdown","NeonFieldGroup","NeonInput","NeonStack","NeonFunctionalColor","NeonSize","props","emit","open","ref","search","isDirty","computed","updateSearch","newValue","onClose","onOpen","onSearchChange","onSearchClear","computedLabel","computedShowLabel","label","l","NeonNumberUtils"],"mappings":";;;;;;;;;AAcA,MAAAA,IAAeC,EAAgB;AAAA,EAC7B,MAAM;AAAA,EACN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,EAAA;AAAA,EAEF,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,YAAY,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOtC,aAAa,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA;AAAA;AAAA;AAAA,IAIvC,OAAO,EAAE,MAAM,QAAQ,SAAS,SAAA;AAAA;AAAA;AAAA;AAAA,IAIhC,aAAa,EAAE,MAAM,QAAQ,SAAS,SAAA;AAAA;AAAA;AAAA;AAAA,IAItC,OAAO,EAAE,MAAM,QAAqC,SAAS,MAAMC,EAAoB,aAAA;AAAA;AAAA;AAAA;AAAA,IAIvF,MAAM,EAAE,MAAM,QAA0B,SAAS,MAAMC,EAAS,MAAA;AAAA;AAAA;AAAA;AAAA,IAIhE,UAAU,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,WAAW,EAAE,MAAM,QAAQ,SAAS,OAAA;AAAA;AAAA;AAAA;AAAA,IAIpC,YAAY,EAAE,MAAM,QAAQ,SA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AAClE,aAAOK,EAAQ,QACXU,EAAM,QAAQ,WAAWE,EAAgB,aAAajB,EAAM,WAAW,CAAC,IACxEA,EAAM;AAAA,IACZ,CAAC;AAED,WAAO;AAAA,MACL,MAAAE;AAAA,MACA,QAAAE;AAAA,MACA,eAAAS;AAAA,MACA,mBAAAC;AAAA,MACA,SAAAT;AAAA,MACA,QAAAK;AAAA,MACA,SAAAD;AAAA,MACA,gBAAAE;AAAA,MACA,eAAAC;AAAA,MACA,cAAAL;AAAA,MACA,cAAcU,EAAgB;AAAA,IAAA;AAAA,EAElC;AACF,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const d=require("./NeonSearchFilter.cjs.js"),o=require("vue"),c=require("../../../_virtual/_plugin-vue_export-helper.cjs.js"),u={class:"neon-search-filter__title"};function p(e,l,h,m,C,k){const n=o.resolveComponent("neon-button"),s=o.resolveComponent("neon-field-group"),i=o.resolveComponent("neon-input"),r=o.resolveComponent("neon-stack"),a=o.resolveComponent("neon-dropdown");return o.openBlock(),o.createBlock(a,{modelValue:e.open,"onUpdate:modelValue":l[3]||(l[3]=t=>e.open=t),class:"neon-search-filter"},{"dropdown-button":o.withCtx(()=>[e.modelValue!==""?(o.openBlock(),o.createBlock(s,{key:0,"indicator-style":"external"},{default:o.withCtx(()=>[o.createVNode(n,{color:e.color,disabled:e.disabled,label:e.computedLabel,size:e.size,title:e.editTitle,"button-style":"solid",onClick:e.onOpen},null,8,["color","disabled","label","size","title","onClick"]),o.createVNode(n,{color:e.color,disabled:e.disabled,size:e.size,title:e.clearTitle,"button-style":"solid",icon:"close",onClick:l[0]||(l[0]=t=>e.updateSearch(""))},null,8,["color","disabled","size","title"])]),_:1})):(o.openBlock(),o.createBlock(n,{key:1,disabled:e.disabled,label:e.label,size:e.size,"button-style":"outline",color:"high-contrast",icon:"search","icon-position":"right",onClick:e.onOpen},null,8,["disabled","label","size","onClick"]))]),default:o.withCtx(()=>[o.createVNode(r,{class:"neon-search-filter__content"},{default:o.withCtx(()=>[o.createVNode(r,{gap:"m"},{default:o.withCtx(()=>[o.createElementVNode("span",u,o.toDisplayString(e.label),1),o.createVNode(i,{ref:"searchElement",icon:e.search===""?"search":"times","model-value":e.search,placeholder:e.placeholder,color:"high-contrast",onIconClick:l[1]||(l[1]=t=>e.onSearchClear()),"onUpdate:modelValue":e.onSearchChange},null,8,["icon","model-value","placeholder","onUpdate:modelValue"])]),_:1}),o.createVNode(n,{"button-style":e.isDirty?"solid":"outline",disabled:e.searchCount===0,label:e.computedShowLabel,class:"neon-search-filter__cta",color:"high-contrast","full-width":"",onClick:l[2]||(l[2]=t=>e.updateSearch(e.search))},null,8,["button-style","disabled","label"])]),_:1})]),_:1},8,["modelValue"])}const b=c(d,[["render",p]]);module.exports=b;
|
|
2
|
+
//# sourceMappingURL=NeonSearchFilter.vue.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonSearchFilter.vue.cjs.js","sources":["../../../../src/components/user-input/search-filter/NeonSearchFilter.vue"],"sourcesContent":["<template>\n <neon-dropdown v-model=\"open\" class=\"neon-search-filter\">\n <template #dropdown-button>\n <neon-field-group v-if=\"modelValue !== ''\" indicator-style=\"external\">\n <neon-button\n :color=\"color\"\n :disabled=\"disabled\"\n :label=\"computedLabel\"\n :size=\"size\"\n :title=\"editTitle\"\n button-style=\"solid\"\n @click=\"onOpen\"\n />\n <neon-button\n :color=\"color\"\n :disabled=\"disabled\"\n :size=\"size\"\n :title=\"clearTitle\"\n button-style=\"solid\"\n icon=\"close\"\n @click=\"updateSearch('')\"\n />\n </neon-field-group>\n <neon-button\n v-else\n :disabled=\"disabled\"\n :label=\"label\"\n :size=\"size\"\n button-style=\"outline\"\n color=\"high-contrast\"\n icon=\"search\"\n icon-position=\"right\"\n @click=\"onOpen\"\n />\n </template>\n <template #default>\n <neon-stack class=\"neon-search-filter__content\">\n <neon-stack gap=\"m\">\n <span class=\"neon-search-filter__title\">{{ label }}</span>\n <neon-input\n ref=\"searchElement\"\n :icon=\"search === '' ? 'search' : 'times'\"\n :model-value=\"search\"\n :placeholder=\"placeholder\"\n color=\"high-contrast\"\n @icon-click=\"onSearchClear()\"\n @update:model-value=\"onSearchChange\"\n />\n </neon-stack>\n <neon-button\n :button-style=\"isDirty ? 'solid' : 'outline'\"\n :disabled=\"searchCount === 0\"\n :label=\"computedShowLabel\"\n class=\"neon-search-filter__cta\"\n color=\"high-contrast\"\n full-width\n @click=\"updateSearch(search)\"\n />\n </neon-stack>\n </template>\n </neon-dropdown>\n</template>\n<script lang=\"ts\" src=\"./NeonSearchFilter.ts\" />\n"],"names":["_hoisted_1","_createBlock","_component_neon_dropdown","_ctx","$event","_component_neon_field_group","_createVNode","_component_neon_button","_component_neon_stack","_createElementVNode","_toDisplayString","_component_neon_input","_cache"],"mappings":"2IAsCgBA,EAAA,CAAA,MAAM,2BAA2B,8OArC/CC,EAAAA,YA2DgBC,EAAA,YA3DQC,EAAA,0CAAAA,EAAA,KAAIC,GAAE,MAAM,uBACvB,4BACT,IAmBmB,CAnBKD,EAAA,aAAU,kBAAlCF,EAAAA,YAmBmBI,EAAA,OAnBwB,kBAAgB,+BACzD,IAQE,CARFC,EAAAA,YAQEC,EAAA,CAPC,MAAOJ,EAAA,MACP,SAAUA,EAAA,SACV,MAAOA,EAAA,cACP,KAAMA,EAAA,KACN,MAAOA,EAAA,UACR,eAAa,QACZ,QAAOA,EAAA,sEAEVG,EAAAA,YAQEC,EAAA,CAPC,MAAOJ,EAAA,MACP,SAAUA,EAAA,SACV,KAAMA,EAAA,KACN,MAAOA,EAAA,WACR,eAAa,QACb,KAAK,QACJ,uBAAOA,EAAA,aAAY,EAAA,wEAGxBF,EAAAA,YAUEM,EAAA,OARC,SAAUJ,EAAA,SACV,MAAOA,EAAA,MACP,KAAMA,EAAA,KACP,eAAa,UACb,MAAM,gBACN,KAAK,SACL,gBAAc,QACb,QAAOA,EAAA,yDAGD,kBACT,IAsBa,CAtBbG,EAAAA,YAsBaE,EAAA,CAtBD,MAAM,6BAA6B,EAAA,mBAC7C,IAWa,CAXbF,EAAAA,YAWaE,EAAA,CAXD,IAAI,GAAG,EAAA,mBACjB,IAA0D,CAA1DC,EAAAA,mBAA0D,OAA1DT,EAA0DU,EAAAA,gBAAfP,EAAA,KAAK,EAAA,CAAA,EAChDG,EAAAA,YAQEK,EAAA,CAPA,IAAI,gBACH,KAAMR,EAAA,SAAM,GAAA,SAAA,QACZ,cAAaA,EAAA,OACb,YAAaA,EAAA,YACd,MAAM,gBACL,2BAAYA,EAAA,cAAa,GACzB,sBAAoBA,EAAA,2FAGzBG,EAAAA,YAQEC,EAAA,CAPC,eAAcJ,EAAA,QAAO,QAAA,UACrB,SAAUA,EAAA,cAAW,EACrB,MAAOA,EAAA,kBACR,MAAM,0BACN,MAAM,gBACN,aAAA,GACC,QAAKS,EAAA,CAAA,IAAAA,EAAA,CAAA,EAAAR,GAAED,EAAA,aAAaA,EAAA,MAAM"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import b from "./NeonSearchFilter.es.js";
|
|
2
|
+
import { resolveComponent as n, openBlock as s, createBlock as r, withCtx as t, createVNode as l, createElementVNode as m, toDisplayString as h } from "vue";
|
|
3
|
+
import f from "../../../_virtual/_plugin-vue_export-helper.es.js";
|
|
4
|
+
const k = { class: "neon-search-filter__title" };
|
|
5
|
+
function C(e, o, y, g, z, V) {
|
|
6
|
+
const a = n("neon-button"), p = n("neon-field-group"), u = n("neon-input"), d = n("neon-stack"), c = n("neon-dropdown");
|
|
7
|
+
return s(), r(c, {
|
|
8
|
+
modelValue: e.open,
|
|
9
|
+
"onUpdate:modelValue": o[3] || (o[3] = (i) => e.open = i),
|
|
10
|
+
class: "neon-search-filter"
|
|
11
|
+
}, {
|
|
12
|
+
"dropdown-button": t(() => [
|
|
13
|
+
e.modelValue !== "" ? (s(), r(p, {
|
|
14
|
+
key: 0,
|
|
15
|
+
"indicator-style": "external"
|
|
16
|
+
}, {
|
|
17
|
+
default: t(() => [
|
|
18
|
+
l(a, {
|
|
19
|
+
color: e.color,
|
|
20
|
+
disabled: e.disabled,
|
|
21
|
+
label: e.computedLabel,
|
|
22
|
+
size: e.size,
|
|
23
|
+
title: e.editTitle,
|
|
24
|
+
"button-style": "solid",
|
|
25
|
+
onClick: e.onOpen
|
|
26
|
+
}, null, 8, ["color", "disabled", "label", "size", "title", "onClick"]),
|
|
27
|
+
l(a, {
|
|
28
|
+
color: e.color,
|
|
29
|
+
disabled: e.disabled,
|
|
30
|
+
size: e.size,
|
|
31
|
+
title: e.clearTitle,
|
|
32
|
+
"button-style": "solid",
|
|
33
|
+
icon: "close",
|
|
34
|
+
onClick: o[0] || (o[0] = (i) => e.updateSearch(""))
|
|
35
|
+
}, null, 8, ["color", "disabled", "size", "title"])
|
|
36
|
+
]),
|
|
37
|
+
_: 1
|
|
38
|
+
})) : (s(), r(a, {
|
|
39
|
+
key: 1,
|
|
40
|
+
disabled: e.disabled,
|
|
41
|
+
label: e.label,
|
|
42
|
+
size: e.size,
|
|
43
|
+
"button-style": "outline",
|
|
44
|
+
color: "high-contrast",
|
|
45
|
+
icon: "search",
|
|
46
|
+
"icon-position": "right",
|
|
47
|
+
onClick: e.onOpen
|
|
48
|
+
}, null, 8, ["disabled", "label", "size", "onClick"]))
|
|
49
|
+
]),
|
|
50
|
+
default: t(() => [
|
|
51
|
+
l(d, { class: "neon-search-filter__content" }, {
|
|
52
|
+
default: t(() => [
|
|
53
|
+
l(d, { gap: "m" }, {
|
|
54
|
+
default: t(() => [
|
|
55
|
+
m("span", k, h(e.label), 1),
|
|
56
|
+
l(u, {
|
|
57
|
+
ref: "searchElement",
|
|
58
|
+
icon: e.search === "" ? "search" : "times",
|
|
59
|
+
"model-value": e.search,
|
|
60
|
+
placeholder: e.placeholder,
|
|
61
|
+
color: "high-contrast",
|
|
62
|
+
onIconClick: o[1] || (o[1] = (i) => e.onSearchClear()),
|
|
63
|
+
"onUpdate:modelValue": e.onSearchChange
|
|
64
|
+
}, null, 8, ["icon", "model-value", "placeholder", "onUpdate:modelValue"])
|
|
65
|
+
]),
|
|
66
|
+
_: 1
|
|
67
|
+
}),
|
|
68
|
+
l(a, {
|
|
69
|
+
"button-style": e.isDirty ? "solid" : "outline",
|
|
70
|
+
disabled: e.searchCount === 0,
|
|
71
|
+
label: e.computedShowLabel,
|
|
72
|
+
class: "neon-search-filter__cta",
|
|
73
|
+
color: "high-contrast",
|
|
74
|
+
"full-width": "",
|
|
75
|
+
onClick: o[2] || (o[2] = (i) => e.updateSearch(e.search))
|
|
76
|
+
}, null, 8, ["button-style", "disabled", "label"])
|
|
77
|
+
]),
|
|
78
|
+
_: 1
|
|
79
|
+
})
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
}, 8, ["modelValue"]);
|
|
83
|
+
}
|
|
84
|
+
const w = /* @__PURE__ */ f(b, [["render", C]]);
|
|
85
|
+
export {
|
|
86
|
+
w as default
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=NeonSearchFilter.vue.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NeonSearchFilter.vue.es.js","sources":["../../../../src/components/user-input/search-filter/NeonSearchFilter.vue"],"sourcesContent":["<template>\n <neon-dropdown v-model=\"open\" class=\"neon-search-filter\">\n <template #dropdown-button>\n <neon-field-group v-if=\"modelValue !== ''\" indicator-style=\"external\">\n <neon-button\n :color=\"color\"\n :disabled=\"disabled\"\n :label=\"computedLabel\"\n :size=\"size\"\n :title=\"editTitle\"\n button-style=\"solid\"\n @click=\"onOpen\"\n />\n <neon-button\n :color=\"color\"\n :disabled=\"disabled\"\n :size=\"size\"\n :title=\"clearTitle\"\n button-style=\"solid\"\n icon=\"close\"\n @click=\"updateSearch('')\"\n />\n </neon-field-group>\n <neon-button\n v-else\n :disabled=\"disabled\"\n :label=\"label\"\n :size=\"size\"\n button-style=\"outline\"\n color=\"high-contrast\"\n icon=\"search\"\n icon-position=\"right\"\n @click=\"onOpen\"\n />\n </template>\n <template #default>\n <neon-stack class=\"neon-search-filter__content\">\n <neon-stack gap=\"m\">\n <span class=\"neon-search-filter__title\">{{ label }}</span>\n <neon-input\n ref=\"searchElement\"\n :icon=\"search === '' ? 'search' : 'times'\"\n :model-value=\"search\"\n :placeholder=\"placeholder\"\n color=\"high-contrast\"\n @icon-click=\"onSearchClear()\"\n @update:model-value=\"onSearchChange\"\n />\n </neon-stack>\n <neon-button\n :button-style=\"isDirty ? 'solid' : 'outline'\"\n :disabled=\"searchCount === 0\"\n :label=\"computedShowLabel\"\n class=\"neon-search-filter__cta\"\n color=\"high-contrast\"\n full-width\n @click=\"updateSearch(search)\"\n />\n </neon-stack>\n </template>\n </neon-dropdown>\n</template>\n<script lang=\"ts\" src=\"./NeonSearchFilter.ts\" />\n"],"names":["_hoisted_1","_createBlock","_component_neon_dropdown","_ctx","$event","_component_neon_field_group","_createVNode","_component_neon_button","_component_neon_stack","_createElementVNode","_toDisplayString","_component_neon_input","_cache"],"mappings":";;;AAsCgB,MAAAA,IAAA,EAAA,OAAM,4BAA2B;;;cArC/CC,EA2DgBC,GAAA;AAAA,gBA3DQC,EAAA;AAAA,kDAAAA,EAAA,OAAIC;AAAA,IAAE,OAAM;AAAA;IACvB,qBACT,MAmBmB;AAAA,MAnBKD,EAAA,eAAU,WAAlCF,EAmBmBI,GAAA;AAAA;QAnBwB,mBAAgB;AAAA;mBACzD,MAQE;AAAA,UARFC,EAQEC,GAAA;AAAA,YAPC,OAAOJ,EAAA;AAAA,YACP,UAAUA,EAAA;AAAA,YACV,OAAOA,EAAA;AAAA,YACP,MAAMA,EAAA;AAAA,YACN,OAAOA,EAAA;AAAA,YACR,gBAAa;AAAA,YACZ,SAAOA,EAAA;AAAA;UAEVG,EAQEC,GAAA;AAAA,YAPC,OAAOJ,EAAA;AAAA,YACP,UAAUA,EAAA;AAAA,YACV,MAAMA,EAAA;AAAA,YACN,OAAOA,EAAA;AAAA,YACR,gBAAa;AAAA,YACb,MAAK;AAAA,YACJ,gCAAOA,EAAA,aAAY,EAAA;AAAA;;;kBAGxBF,EAUEM,GAAA;AAAA;QARC,UAAUJ,EAAA;AAAA,QACV,OAAOA,EAAA;AAAA,QACP,MAAMA,EAAA;AAAA,QACP,gBAAa;AAAA,QACb,OAAM;AAAA,QACN,MAAK;AAAA,QACL,iBAAc;AAAA,QACb,SAAOA,EAAA;AAAA;;IAGD,WACT,MAsBa;AAAA,MAtBbG,EAsBaE,GAAA,EAtBD,OAAM,8BAA6B,GAAA;AAAA,mBAC7C,MAWa;AAAA,UAXbF,EAWaE,GAAA,EAXD,KAAI,IAAG,GAAA;AAAA,uBACjB,MAA0D;AAAA,cAA1DC,EAA0D,QAA1DT,GAA0DU,EAAfP,EAAA,KAAK,GAAA,CAAA;AAAA,cAChDG,EAQEK,GAAA;AAAA,gBAPA,KAAI;AAAA,gBACH,MAAMR,EAAA,WAAM,KAAA,WAAA;AAAA,gBACZ,eAAaA,EAAA;AAAA,gBACb,aAAaA,EAAA;AAAA,gBACd,OAAM;AAAA,gBACL,oCAAYA,EAAA,cAAa;AAAA,gBACzB,uBAAoBA,EAAA;AAAA;;;;UAGzBG,EAQEC,GAAA;AAAA,YAPC,gBAAcJ,EAAA,UAAO,UAAA;AAAA,YACrB,UAAUA,EAAA,gBAAW;AAAA,YACrB,OAAOA,EAAA;AAAA,YACR,OAAM;AAAA,YACN,OAAM;AAAA,YACN,cAAA;AAAA,YACC,SAAKS,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAR,MAAED,EAAA,aAAaA,EAAA,MAAM;AAAA;;;;;;;;;"}
|
package/dist/neon.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./components/navigation/action-menu/NeonActionMenu.vue.cjs.js"),n=require("./components/feedback/alert/NeonAlert.vue.cjs.js"),r=require("./components/feedback/alert/container/NeonAlertContainer.vue.cjs.js"),t=require("./components/navigation/anchor/NeonAnchor.vue.cjs.js"),i=require("./components/presentation/badge/NeonBadge.vue.cjs.js"),N=require("./components/feedback/banner/NeonBanner.vue.cjs.js"),s=require("./components/navigation/breadcrumbs/NeonBreadcrumbs.vue.cjs.js"),c=require("./components/user-input/button/NeonButton.vue.cjs.js"),l=require("./components/layout/card/NeonCard.vue.cjs.js"),u=require("./components/layout/card/body/NeonCardBody.vue.cjs.js"),a=require("./components/layout/card/footer/NeonCardFooter.vue.cjs.js"),q=require("./components/layout/card/header/NeonCardHeader.vue.cjs.js"),S=require("./components/layout/card-list/NeonCardList.vue.cjs.js"),d=require("./components/user-input/chip/NeonChip.vue.cjs.js"),p=require("./components/user-input/color/NeonColor.vue.cjs.js"),g=require("./components/user-input/date-picker/NeonDatePicker.vue.cjs.js"),C=require("./components/feedback/dialog/NeonDialog.vue.cjs.js"),P=require("./components/feedback/alert/container/NeonDialogContainer.vue.cjs.js"),T=require("./components/layout/drawer/NeonDrawer.vue.cjs.js"),y=require("./components/presentation/dropdown/NeonDropdown.vue.cjs.js"),U=require("./components/navigation/dropdown-menu/NeonDropdownMenu.vue.cjs.js"),b=require("./components/user-input/drop-zone/NeonDropZone.vue.cjs.js"),v=require("./components/presentation/expansion-indicator/NeonExpansionIndicator.vue.cjs.js"),L=require("./components/presentation/expansion-panel/NeonExpansionPanel.vue.cjs.js"),D=require("./components/user-input/field-group/NeonFieldGroup.vue.cjs.js"),I=require("./components/user-input/field/NeonField.vue.cjs.js"),m=require("./components/user-input/file/NeonFile.vue.cjs.js"),z=require("./components/user-input/filter-list/NeonFilterList.vue.cjs.js"),B=require("./components/layout/footer/NeonFooter.vue.cjs.js"),A=require("./components/layout/grid/NeonGrid.vue.cjs.js"),h=require("./components/layout/grid/grid-area/NeonGridArea.vue.cjs.js"),w=require("./components/presentation/header/NeonHeader.vue.cjs.js"),M=require("./components/presentation/icon/NeonIcon.vue.cjs.js"),R=require("./components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js"),F=require("./components/layout/inline/NeonInline.vue.cjs.js"),k=require("./components/user-input/input/NeonInput.vue.cjs.js"),H=require("./components/user-input/input-indicator/NeonInputIndicator.vue.cjs.js"),E=require("./components/presentation/label/NeonLabel.vue.cjs.js"),O=require("./components/presentation/labelled-content/NeonLabelledContent.vue.cjs.js"),G=require("./components/feedback/linear-progress/NeonLinearProgress.vue.cjs.js"),f=require("./components/navigation/link/NeonLink.vue.cjs.js"),x=require("./components/user-input/list/NeonList.vue.cjs.js"),J=require("./components/navigation/menu/NeonMenu.vue.cjs.js"),V=require("./components/navigation/mobile-menu/NeonMobileMenu.vue.cjs.js"),Z=require("./components/layout/modal/NeonModal.vue.cjs.js"),j=require("./components/feedback/note/NeonNote.vue.cjs.js"),K=require("./components/feedback/notification-counter/NeonNotificationCounter.vue.cjs.js"),Q=require("./components/user-input/number/NeonNumber.vue.cjs.js"),W=require("./components/layout/page/NeonPage.vue.cjs.js"),X=require("./components/layout/page-container/NeonPageContainer.vue.cjs.js"),Y=require("./components/navigation/pagination/NeonPagination.vue.cjs.js"),_=require("./components/user-input/password/NeonPassword.vue.cjs.js"),$=require("./components/user-input/range-slider/NeonRangeSlider.vue.cjs.js"),ee=require("./components/layout/side-nav/NeonSideNav.vue.cjs.js"),oe=require("./components/user-input/search/NeonSearch.vue.cjs.js"),ne=require("./components/user-input/select/NeonSelect.vue.cjs.js"),re=require("./components/layout/card-list/selectable-card/NeonSelectableCard.vue.cjs.js"),te=require("./components/feedback/skeleton-loader/NeonSkeletonLoader.vue.cjs.js"),ie=require("./components/user-input/slider/NeonSlider.vue.cjs.js"),Ne=require("./components/feedback/splash-loader/NeonSplashLoader.vue.cjs.js"),se=require("./components/layout/stack/NeonStack.vue.cjs.js"),ce=require("./components/navigation/stepper/NeonStepper.vue.cjs.js"),le=require("./components/layout/sticky-buttons/NeonStickyButtons.vue.cjs.js"),ue=require("./components/layout/swiper/NeonSwiper.vue.cjs.js"),ae=require("./components/user-input/switch/NeonSwitch.vue.cjs.js"),qe=require("./components/presentation/tabs/tab/NeonTab.vue.cjs.js"),Se=require("./components/presentation/tabs/NeonTabs.vue.cjs.js"),de=require("./components/feedback/alert/container/NeonToastContainer.vue.cjs.js"),pe=require("./components/user-input/toggle/NeonToggle.vue.cjs.js"),ge=require("./components/user-input/toggle-chip/NeonToggleChip.vue.cjs.js"),Ce=require("./components/feedback/tooltip/NeonTooltip.vue.cjs.js"),Pe=require("./components/layout/top-nav/NeonTopNav.vue.cjs.js"),Te=require("./components/navigation/tree-menu/NeonTreeMenu.vue.cjs.js"),ye=require("./model/feedback/alert/NeonAlertLevel.cjs.js"),Ue=require("./model/feedback/alert/NeonAlertPlacement.cjs.js"),be=require("./model/presentation/badge/NeonBadgeSize.cjs.js"),ve=require("./model/user-input/button/NeonButtonSize.cjs.js"),Le=require("./model/user-input/button/NeonButtonStyle.cjs.js"),De=require("./model/user-input/button/NeonButtonType.cjs.js"),Ie=require("./model/user-input/chip/NeonChipAction.cjs.js"),me=require("./model/presentation/dropdown/NeonDropdownPlacement.cjs.js"),ze=require("./model/presentation/dropdown/NeonDropdownStyle.cjs.js"),Be=require("./model/common/color/NeonFunctionalColor.cjs.js"),Ae=require("./model/presentation/header/NeonHeaderLevel.cjs.js"),he=require("./model/common/position/NeonHorizontalPosition.cjs.js"),we=require("./model/user-input/input-indicator/NeonInputIndicatorStyle.cjs.js"),Me=require("./model/user-input/input/NeonInputMode.cjs.js"),Re=require("./model/user-input/input/NeonInputType.cjs.js"),Fe=require("./model/presentation/label/NeonLabelSize.cjs.js"),ke=require("./model/common/layout/NeonLayoutSize.cjs.js"),He=require("./model/common/color/NeonMode.cjs.js"),Ee=require("./model/common/layout/NeonOrientation.cjs.js"),Oe=require("./model/common/accessibility/NeonOutlineStyle.cjs.js"),Ge=require("./model/layout/page/NeonPageAlignment.cjs.js"),fe=require("./model/common/position/NeonPosition.cjs.js"),xe=require("./model/common/responsive/NeonResponsive.cjs.js"),Je=require("./model/common/size/NeonSize.cjs.js"),Ve=require("./model/feedback/splash-loader/NeonSplashLoaderSize.cjs.js"),Ze=require("./model/common/state/NeonState.cjs.js"),je=require("./model/user-input/switch/NeonSwitchStyle.cjs.js"),Ke=require("./model/user-input/toggle/NeonToggleChipSize.cjs.js"),Qe=require("./model/user-input/toggle/NeonToggleStyle.cjs.js"),We=require("./model/feedback/tooltip/NeonTooltipStyle.cjs.js"),Xe=require("./model/common/position/NeonVerticalPosition.cjs.js"),Ye=require("./utils/feedback/alert/NeonAlertService.cjs.js"),_e=require("./utils/feedback/banner/NeonBannerService.cjs.js"),e=require("./utils/common/clipboard/NeonClipboardService.cjs.js"),$e=require("./utils/common/closable/NeonClosableUtils.cjs.js"),eo=require("./utils/common/date/NeonDateUtils.cjs.js"),oo=require("./utils/common/debounce/NeonDebounceUtils.cjs.js"),no=require("./utils/feedback/dialog/NeonDialogService.cjs.js"),ro=require("./utils/presentation/dropdown/NeonDropdownPlacementUtils.cjs.js"),to=require("./utils/common/event/NeonEventBus.cjs.js"),io=require("./utils/user-input/file/NeonFileUtils.cjs.js"),No=require("./utils/common/icons/NeonIconRegistry.cjs.js"),so=require("./utils/presentation/badge/NeonJazziconUtils.cjs.js"),co=require("./utils/common/color/NeonModeUtils.cjs.js"),lo=require("./utils/common/number/NeonNumberUtils.cjs.js"),uo=require("./utils/common/dom/NeonPlacementUtils.cjs.js"),ao=require("./utils/common/number/NeonRandomUtils.cjs.js"),qo=require("./utils/common/responsive/NeonResponsiveUtils.cjs.js"),So=require("./utils/common/dom/NeonScrollUtils.cjs.js"),po=require("./utils/feedback/toast/NeonToastService.cjs.js"),go=require("./utils/feedback/tooltip/NeonTooltipPlacementUtils.cjs.js"),Co=require("./utils/common/icons/RegisterIcons.cjs.js");exports.NeonActionMenu=o;exports.NeonAlert=n;exports.NeonAlertContainer=r;exports.NeonAnchor=t;exports.NeonBadge=i;exports.NeonBanner=N;exports.NeonBreadcrumbs=s;exports.NeonButton=c;exports.NeonCard=l;exports.NeonCardBody=u;exports.NeonCardFooter=a;exports.NeonCardHeader=q;exports.NeonCardList=S;exports.NeonChip=d;exports.NeonColor=p;exports.NeonDatePicker=g;exports.NeonDialog=C;exports.NeonDialogContainer=P;exports.NeonDrawer=T;exports.NeonDropdown=y;exports.NeonDropdownMenu=U;exports.NeonDropZone=b;exports.NeonExpansionIndicator=v;exports.NeonExpansionPanel=L;exports.NeonFieldGroup=D;exports.NeonField=I;exports.NeonFile=m;exports.NeonFilterList=z;exports.NeonFooter=B;exports.NeonGrid=A;exports.NeonGridArea=h;exports.NeonHeader=w;exports.NeonIcon=M;exports.NeonImageCarousel=R;exports.NeonInline=F;exports.NeonInput=k;exports.NeonInputIndicator=H;exports.NeonLabel=E;exports.NeonLabelledContent=O;exports.NeonLinearProgress=G;exports.NeonLink=f;exports.NeonList=x;exports.NeonMenu=J;exports.NeonMobileMenu=V;exports.NeonModal=Z;exports.NeonNote=j;exports.NeonNotificationCounter=K;exports.NeonNumber=Q;exports.NeonPage=W;exports.NeonPageContainer=X;exports.NeonPagination=Y;exports.NeonPassword=_;exports.NeonRangeSlider=$;exports.NeonSideNav=ee;exports.NeonSearch=oe;exports.NeonSelect=ne;exports.NeonSelectableCard=re;exports.NeonSkeletonLoader=te;exports.NeonSlider=ie;exports.NeonSplashLoader=Ne;exports.NeonStack=se;exports.NeonStepper=ce;exports.NeonStickyButtons=le;exports.NeonSwiper=ue;exports.NeonSwitch=ae;exports.NeonTab=qe;exports.NeonTabs=Se;exports.NeonToastContainer=de;exports.NeonToggle=pe;exports.NeonToggleChip=ge;exports.NeonTooltip=Ce;exports.NeonTopNav=Pe;exports.NeonTreeMenu=Te;exports.NeonAlertLevel=ye.NeonAlertLevel;exports.NeonAlertPlacement=Ue.NeonAlertPlacement;exports.NeonBadgeSize=be.NeonBadgeSize;exports.NeonButtonSize=ve.NeonButtonSize;exports.NeonButtonStyle=Le.NeonButtonStyle;exports.NeonButtonType=De.NeonButtonType;exports.NeonChipAction=Ie.NeonChipAction;exports.NeonDropdownPlacement=me.NeonDropdownPlacement;exports.NeonDropdownStyle=ze.NeonDropdownStyle;exports.NeonFunctionalColor=Be.NeonFunctionalColor;exports.NeonHeaderLevel=Ae.NeonHeaderLevel;exports.NeonHorizontalPosition=he.NeonHorizontalPosition;exports.NeonInputIndicatorStyle=we.NeonInputIndicatorStyle;exports.NeonInputMode=Me.NeonInputMode;exports.NeonInputType=Re.NeonInputType;exports.NeonLabelSize=Fe.NeonLabelSize;exports.NeonLayoutSize=ke.NeonLayoutSize;exports.NeonMode=He.NeonMode;exports.NeonOrientation=Ee.NeonOrientation;exports.NeonOutlineStyle=Oe.NeonOutlineStyle;exports.NeonPageAlignment=Ge.NeonPageAlignment;exports.NeonPosition=fe.NeonPosition;exports.NeonResponsive=xe.NeonResponsive;exports.NeonSize=Je.NeonSize;exports.NeonSplashLoaderSize=Ve.NeonSplashLoaderSize;exports.NeonState=Ze.NeonState;exports.NeonSwitchStyle=je.NeonSwitchStyle;exports.NeonToggleChipSize=Ke.NeonToggleChipSize;exports.NeonToggleStyle=Qe.NeonToggleStyle;exports.NeonTooltipStyle=We.NeonTooltipStyle;exports.NeonVerticalPosition=Xe.NeonVerticalPosition;exports.NeonAlertService=Ye.NeonAlertService;exports.NeonBannerService=_e.NeonBannerService;exports.NeonClipboardService=e.NeonClipboardService;exports.NeonClipboardSupport=e.NeonClipboardSupport;exports.NeonClosableUtils=$e.NeonClosableUtils;exports.NeonDateUtils=eo.NeonDateUtils;exports.NeonDebounceUtils=oo.NeonDebounceUtils;exports.NeonDialogService=no.NeonDialogService;exports.NeonDropdownPlacementUtils=ro.NeonDropdownPlacementUtils;exports.NeonEventBus=to.NeonEventBus;exports.fileToDataURL=io.fileToDataURL;exports.NeonIconRegistry=No.NeonIconRegistry;exports.NeonJazziconUtils=so.NeonJazziconUtils;exports.NeonModeUtils=co.NeonModeUtils;exports.NeonNumberUtils=lo.NeonNumberUtils;exports.NeonPlacementUtils=uo.NeonPlacementUtils;exports.NeonRandomUtils=ao.NeonRandomUtils;exports.NeonResponsiveUtils=qo.NeonResponsiveUtils;exports.NeonScrollUtils=So.NeonScrollUtils;exports.NeonToastService=po.NeonToastService;exports.NeonTooltipPlacementUtils=go.NeonTooltipPlacementUtils;exports.RegisterIcons=Co.RegisterIcons;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./components/navigation/action-menu/NeonActionMenu.vue.cjs.js"),n=require("./components/feedback/alert/NeonAlert.vue.cjs.js"),r=require("./components/feedback/alert/container/NeonAlertContainer.vue.cjs.js"),t=require("./components/navigation/anchor/NeonAnchor.vue.cjs.js"),i=require("./components/presentation/badge/NeonBadge.vue.cjs.js"),N=require("./components/feedback/banner/NeonBanner.vue.cjs.js"),s=require("./components/navigation/breadcrumbs/NeonBreadcrumbs.vue.cjs.js"),c=require("./components/user-input/button/NeonButton.vue.cjs.js"),l=require("./components/layout/card/NeonCard.vue.cjs.js"),u=require("./components/layout/card/body/NeonCardBody.vue.cjs.js"),a=require("./components/layout/card/footer/NeonCardFooter.vue.cjs.js"),q=require("./components/layout/card/header/NeonCardHeader.vue.cjs.js"),S=require("./components/layout/card-list/NeonCardList.vue.cjs.js"),d=require("./components/user-input/chip/NeonChip.vue.cjs.js"),p=require("./components/user-input/color/NeonColor.vue.cjs.js"),g=require("./components/user-input/date-picker/NeonDatePicker.vue.cjs.js"),C=require("./components/feedback/dialog/NeonDialog.vue.cjs.js"),P=require("./components/feedback/alert/container/NeonDialogContainer.vue.cjs.js"),T=require("./components/layout/drawer/NeonDrawer.vue.cjs.js"),y=require("./components/presentation/dropdown/NeonDropdown.vue.cjs.js"),U=require("./components/navigation/dropdown-menu/NeonDropdownMenu.vue.cjs.js"),b=require("./components/user-input/drop-zone/NeonDropZone.vue.cjs.js"),v=require("./components/presentation/expansion-indicator/NeonExpansionIndicator.vue.cjs.js"),L=require("./components/presentation/expansion-panel/NeonExpansionPanel.vue.cjs.js"),D=require("./components/user-input/field-group/NeonFieldGroup.vue.cjs.js"),B=require("./components/user-input/field/NeonField.vue.cjs.js"),I=require("./components/user-input/file/NeonFile.vue.cjs.js"),m=require("./components/user-input/filter/NeonFilter.vue.cjs.js"),z=require("./components/layout/filter-bar/NeonFilterBar.vue.cjs.js"),h=require("./components/user-input/filter-list/NeonFilterList.vue.cjs.js"),A=require("./components/layout/footer/NeonFooter.vue.cjs.js"),w=require("./components/layout/grid/NeonGrid.vue.cjs.js"),M=require("./components/layout/grid/grid-area/NeonGridArea.vue.cjs.js"),F=require("./components/presentation/header/NeonHeader.vue.cjs.js"),R=require("./components/presentation/icon/NeonIcon.vue.cjs.js"),k=require("./components/presentation/image-carousel/NeonImageCarousel.vue.cjs.js"),H=require("./components/layout/inline/NeonInline.vue.cjs.js"),E=require("./components/user-input/input/NeonInput.vue.cjs.js"),O=require("./components/user-input/input-indicator/NeonInputIndicator.vue.cjs.js"),G=require("./components/presentation/label/NeonLabel.vue.cjs.js"),f=require("./components/presentation/labelled-content/NeonLabelledContent.vue.cjs.js"),x=require("./components/feedback/linear-progress/NeonLinearProgress.vue.cjs.js"),J=require("./components/navigation/link/NeonLink.vue.cjs.js"),V=require("./components/user-input/list/NeonList.vue.cjs.js"),Z=require("./components/navigation/menu/NeonMenu.vue.cjs.js"),j=require("./components/navigation/mobile-menu/NeonMobileMenu.vue.cjs.js"),K=require("./components/layout/modal/NeonModal.vue.cjs.js"),Q=require("./components/feedback/note/NeonNote.vue.cjs.js"),W=require("./components/feedback/notification-counter/NeonNotificationCounter.vue.cjs.js"),X=require("./components/user-input/number/NeonNumber.vue.cjs.js"),Y=require("./components/layout/page/NeonPage.vue.cjs.js"),_=require("./components/layout/page-container/NeonPageContainer.vue.cjs.js"),$=require("./components/navigation/pagination/NeonPagination.vue.cjs.js"),ee=require("./components/user-input/password/NeonPassword.vue.cjs.js"),oe=require("./components/user-input/range-slider/NeonRangeSlider.vue.cjs.js"),ne=require("./components/layout/side-nav/NeonSideNav.vue.cjs.js"),re=require("./components/user-input/search/NeonSearch.vue.cjs.js"),te=require("./components/user-input/search-filter/NeonSearchFilter.vue.cjs.js"),ie=require("./components/user-input/select/NeonSelect.vue.cjs.js"),Ne=require("./components/layout/card-list/selectable-card/NeonSelectableCard.vue.cjs.js"),se=require("./components/feedback/skeleton-loader/NeonSkeletonLoader.vue.cjs.js"),ce=require("./components/user-input/slider/NeonSlider.vue.cjs.js"),le=require("./components/feedback/splash-loader/NeonSplashLoader.vue.cjs.js"),ue=require("./components/layout/stack/NeonStack.vue.cjs.js"),ae=require("./components/navigation/stepper/NeonStepper.vue.cjs.js"),qe=require("./components/layout/sticky-buttons/NeonStickyButtons.vue.cjs.js"),Se=require("./components/layout/swiper/NeonSwiper.vue.cjs.js"),de=require("./components/user-input/switch/NeonSwitch.vue.cjs.js"),pe=require("./components/presentation/tabs/tab/NeonTab.vue.cjs.js"),ge=require("./components/presentation/tabs/NeonTabs.vue.cjs.js"),Ce=require("./components/feedback/alert/container/NeonToastContainer.vue.cjs.js"),Pe=require("./components/user-input/toggle/NeonToggle.vue.cjs.js"),Te=require("./components/user-input/toggle-chip/NeonToggleChip.vue.cjs.js"),ye=require("./components/feedback/tooltip/NeonTooltip.vue.cjs.js"),Ue=require("./components/layout/top-nav/NeonTopNav.vue.cjs.js"),be=require("./components/navigation/tree-menu/NeonTreeMenu.vue.cjs.js"),ve=require("./model/feedback/alert/NeonAlertLevel.cjs.js"),Le=require("./model/feedback/alert/NeonAlertPlacement.cjs.js"),De=require("./model/presentation/badge/NeonBadgeSize.cjs.js"),Be=require("./model/user-input/button/NeonButtonSize.cjs.js"),Ie=require("./model/user-input/button/NeonButtonStyle.cjs.js"),me=require("./model/user-input/button/NeonButtonType.cjs.js"),ze=require("./model/user-input/chip/NeonChipAction.cjs.js"),he=require("./model/presentation/dropdown/NeonDropdownPlacement.cjs.js"),Ae=require("./model/presentation/dropdown/NeonDropdownStyle.cjs.js"),we=require("./model/common/color/NeonFunctionalColor.cjs.js"),Me=require("./model/presentation/header/NeonHeaderLevel.cjs.js"),Fe=require("./model/common/position/NeonHorizontalPosition.cjs.js"),Re=require("./model/user-input/input-indicator/NeonInputIndicatorStyle.cjs.js"),ke=require("./model/user-input/input/NeonInputMode.cjs.js"),He=require("./model/user-input/input/NeonInputType.cjs.js"),Ee=require("./model/presentation/label/NeonLabelSize.cjs.js"),Oe=require("./model/common/layout/NeonLayoutSize.cjs.js"),Ge=require("./model/common/color/NeonMode.cjs.js"),fe=require("./model/common/layout/NeonOrientation.cjs.js"),xe=require("./model/common/accessibility/NeonOutlineStyle.cjs.js"),Je=require("./model/layout/page/NeonPageAlignment.cjs.js"),Ve=require("./model/common/position/NeonPosition.cjs.js"),Ze=require("./model/common/responsive/NeonResponsive.cjs.js"),je=require("./model/common/size/NeonSize.cjs.js"),Ke=require("./model/feedback/splash-loader/NeonSplashLoaderSize.cjs.js"),Qe=require("./model/common/state/NeonState.cjs.js"),We=require("./model/user-input/switch/NeonSwitchStyle.cjs.js"),Xe=require("./model/user-input/toggle/NeonToggleChipSize.cjs.js"),Ye=require("./model/user-input/toggle/NeonToggleStyle.cjs.js"),_e=require("./model/feedback/tooltip/NeonTooltipStyle.cjs.js"),$e=require("./model/common/position/NeonVerticalPosition.cjs.js"),eo=require("./utils/feedback/alert/NeonAlertService.cjs.js"),oo=require("./utils/feedback/banner/NeonBannerService.cjs.js"),e=require("./utils/common/clipboard/NeonClipboardService.cjs.js"),no=require("./utils/common/closable/NeonClosableUtils.cjs.js"),ro=require("./utils/common/date/NeonDateUtils.cjs.js"),to=require("./utils/common/debounce/NeonDebounceUtils.cjs.js"),io=require("./utils/feedback/dialog/NeonDialogService.cjs.js"),No=require("./utils/presentation/dropdown/NeonDropdownPlacementUtils.cjs.js"),so=require("./utils/common/event/NeonEventBus.cjs.js"),co=require("./utils/user-input/file/NeonFileUtils.cjs.js"),lo=require("./utils/common/icons/NeonIconRegistry.cjs.js"),uo=require("./utils/presentation/badge/NeonJazziconUtils.cjs.js"),ao=require("./utils/common/color/NeonModeUtils.cjs.js"),qo=require("./utils/common/number/NeonNumberUtils.cjs.js"),So=require("./utils/common/dom/NeonPlacementUtils.cjs.js"),po=require("./utils/common/number/NeonRandomUtils.cjs.js"),go=require("./utils/common/responsive/NeonResponsiveUtils.cjs.js"),Co=require("./utils/common/dom/NeonScrollUtils.cjs.js"),Po=require("./utils/feedback/toast/NeonToastService.cjs.js"),To=require("./utils/feedback/tooltip/NeonTooltipPlacementUtils.cjs.js"),yo=require("./utils/common/icons/RegisterIcons.cjs.js");exports.NeonActionMenu=o;exports.NeonAlert=n;exports.NeonAlertContainer=r;exports.NeonAnchor=t;exports.NeonBadge=i;exports.NeonBanner=N;exports.NeonBreadcrumbs=s;exports.NeonButton=c;exports.NeonCard=l;exports.NeonCardBody=u;exports.NeonCardFooter=a;exports.NeonCardHeader=q;exports.NeonCardList=S;exports.NeonChip=d;exports.NeonColor=p;exports.NeonDatePicker=g;exports.NeonDialog=C;exports.NeonDialogContainer=P;exports.NeonDrawer=T;exports.NeonDropdown=y;exports.NeonDropdownMenu=U;exports.NeonDropZone=b;exports.NeonExpansionIndicator=v;exports.NeonExpansionPanel=L;exports.NeonFieldGroup=D;exports.NeonField=B;exports.NeonFile=I;exports.NeonFilter=m;exports.NeonFilterBar=z;exports.NeonFilterList=h;exports.NeonFooter=A;exports.NeonGrid=w;exports.NeonGridArea=M;exports.NeonHeader=F;exports.NeonIcon=R;exports.NeonImageCarousel=k;exports.NeonInline=H;exports.NeonInput=E;exports.NeonInputIndicator=O;exports.NeonLabel=G;exports.NeonLabelledContent=f;exports.NeonLinearProgress=x;exports.NeonLink=J;exports.NeonList=V;exports.NeonMenu=Z;exports.NeonMobileMenu=j;exports.NeonModal=K;exports.NeonNote=Q;exports.NeonNotificationCounter=W;exports.NeonNumber=X;exports.NeonPage=Y;exports.NeonPageContainer=_;exports.NeonPagination=$;exports.NeonPassword=ee;exports.NeonRangeSlider=oe;exports.NeonSideNav=ne;exports.NeonSearch=re;exports.NeonSearchFilter=te;exports.NeonSelect=ie;exports.NeonSelectableCard=Ne;exports.NeonSkeletonLoader=se;exports.NeonSlider=ce;exports.NeonSplashLoader=le;exports.NeonStack=ue;exports.NeonStepper=ae;exports.NeonStickyButtons=qe;exports.NeonSwiper=Se;exports.NeonSwitch=de;exports.NeonTab=pe;exports.NeonTabs=ge;exports.NeonToastContainer=Ce;exports.NeonToggle=Pe;exports.NeonToggleChip=Te;exports.NeonTooltip=ye;exports.NeonTopNav=Ue;exports.NeonTreeMenu=be;exports.NeonAlertLevel=ve.NeonAlertLevel;exports.NeonAlertPlacement=Le.NeonAlertPlacement;exports.NeonBadgeSize=De.NeonBadgeSize;exports.NeonButtonSize=Be.NeonButtonSize;exports.NeonButtonStyle=Ie.NeonButtonStyle;exports.NeonButtonType=me.NeonButtonType;exports.NeonChipAction=ze.NeonChipAction;exports.NeonDropdownPlacement=he.NeonDropdownPlacement;exports.NeonDropdownStyle=Ae.NeonDropdownStyle;exports.NeonFunctionalColor=we.NeonFunctionalColor;exports.NeonHeaderLevel=Me.NeonHeaderLevel;exports.NeonHorizontalPosition=Fe.NeonHorizontalPosition;exports.NeonInputIndicatorStyle=Re.NeonInputIndicatorStyle;exports.NeonInputMode=ke.NeonInputMode;exports.NeonInputType=He.NeonInputType;exports.NeonLabelSize=Ee.NeonLabelSize;exports.NeonLayoutSize=Oe.NeonLayoutSize;exports.NeonMode=Ge.NeonMode;exports.NeonOrientation=fe.NeonOrientation;exports.NeonOutlineStyle=xe.NeonOutlineStyle;exports.NeonPageAlignment=Je.NeonPageAlignment;exports.NeonPosition=Ve.NeonPosition;exports.NeonResponsive=Ze.NeonResponsive;exports.NeonSize=je.NeonSize;exports.NeonSplashLoaderSize=Ke.NeonSplashLoaderSize;exports.NeonState=Qe.NeonState;exports.NeonSwitchStyle=We.NeonSwitchStyle;exports.NeonToggleChipSize=Xe.NeonToggleChipSize;exports.NeonToggleStyle=Ye.NeonToggleStyle;exports.NeonTooltipStyle=_e.NeonTooltipStyle;exports.NeonVerticalPosition=$e.NeonVerticalPosition;exports.NeonAlertService=eo.NeonAlertService;exports.NeonBannerService=oo.NeonBannerService;exports.NeonClipboardService=e.NeonClipboardService;exports.NeonClipboardSupport=e.NeonClipboardSupport;exports.NeonClosableUtils=no.NeonClosableUtils;exports.NeonDateUtils=ro.NeonDateUtils;exports.NeonDebounceUtils=to.NeonDebounceUtils;exports.NeonDialogService=io.NeonDialogService;exports.NeonDropdownPlacementUtils=No.NeonDropdownPlacementUtils;exports.NeonEventBus=so.NeonEventBus;exports.fileToDataURL=co.fileToDataURL;exports.NeonIconRegistry=lo.NeonIconRegistry;exports.NeonJazziconUtils=uo.NeonJazziconUtils;exports.NeonModeUtils=ao.NeonModeUtils;exports.NeonNumberUtils=qo.NeonNumberUtils;exports.NeonPlacementUtils=So.NeonPlacementUtils;exports.NeonRandomUtils=po.NeonRandomUtils;exports.NeonResponsiveUtils=go.NeonResponsiveUtils;exports.NeonScrollUtils=Co.NeonScrollUtils;exports.NeonToastService=Po.NeonToastService;exports.NeonTooltipPlacementUtils=To.NeonTooltipPlacementUtils;exports.RegisterIcons=yo.RegisterIcons;
|
|
2
2
|
//# sourceMappingURL=neon.cjs.js.map
|