@aotearoan/neon 7.2.0-beta.1 → 7.3.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/card/NeonCard.d.ts +37 -2
- package/dist/components/layout/card/NeonCard.js +3 -1
- package/dist/components/layout/card/NeonCard.ts_vue_type_script_src_5154d030_lang.js +5 -2
- package/dist/components/navigation/stepper/NeonStepper.js +0 -2
- package/dist/components/navigation/stepper/NeonStepper.ts_vue_type_script_src_e55bd35c_lang.js +1 -0
- package/dist/components/user-input/selectable-card/NeonSelectableCard.d.ts +79 -0
- package/dist/components/user-input/selectable-card/NeonSelectableCard.js +46 -0
- package/dist/components/user-input/selectable-card/NeonSelectableCard.ts_vue_type_script_src_3688086a_lang.js +38 -0
- package/dist/components/user-input/selectable-card/NeonSelectableCard.vue.d.ts +2 -0
- package/dist/components/user-input/switch/NeonSwitch.js +10 -9
- package/dist/neon.d.ts +1 -0
- package/dist/neon.js +1 -0
- package/package.json +1 -1
- package/src/sass/components/_card.scss +21 -4
- package/src/sass/components/_selectable-card.scss +65 -0
- package/src/sass/components/_stepper.scss +12 -5
- package/src/sass/components/components.scss +1 -0
- package/src/sass/global/_base-html.scss +46 -4
- package/src/sass/includes/_dependencies.scss +2 -2
- package/src/sass/theme.scss +4 -0
- package/src/sass/variables.scss +13 -0
|
@@ -6,7 +6,9 @@ import { NeonSize } from '@/common/enums/NeonSize';
|
|
|
6
6
|
*/
|
|
7
7
|
declare const _default: import("vue").DefineComponent<{
|
|
8
8
|
/**
|
|
9
|
-
* Change the orientation of a card to horizontal. This is useful for creating long narrow cards spanning the full
|
|
9
|
+
* Change the orientation of a card to horizontal. This is useful for creating long narrow cards spanning the full
|
|
10
|
+
* page. NOTE: For responsiveness, horizontal cards are automatically transformed to vertical cards at lower screen
|
|
11
|
+
* sizes.
|
|
10
12
|
*/
|
|
11
13
|
orientation: {
|
|
12
14
|
type: () => NeonOrientation;
|
|
@@ -19,6 +21,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
21
|
type: () => NeonSize;
|
|
20
22
|
default: NeonSize;
|
|
21
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Whether to display the internal borders between card sections for horizontal cards
|
|
26
|
+
*/
|
|
27
|
+
horizontalBorders: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
22
31
|
/**
|
|
23
32
|
* The breakpoint to switch horizontal cards to vertical cards. Accepts <em>Mobile | MobileLarge | Tablet</em> ONLY.
|
|
24
33
|
* @type NeonResponsive
|
|
@@ -27,13 +36,23 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
27
36
|
type: () => NeonResponsive;
|
|
28
37
|
default: NeonResponsive;
|
|
29
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* If true, do not implement a responsive breakpoint for a horizontal card.
|
|
41
|
+
*/
|
|
42
|
+
noBreak: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
30
46
|
}, {
|
|
31
47
|
attrs: {
|
|
32
48
|
[x: string]: unknown;
|
|
33
49
|
};
|
|
50
|
+
NeonOrientation: typeof NeonOrientation;
|
|
34
51
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
52
|
/**
|
|
36
|
-
* Change the orientation of a card to horizontal. This is useful for creating long narrow cards spanning the full
|
|
53
|
+
* Change the orientation of a card to horizontal. This is useful for creating long narrow cards spanning the full
|
|
54
|
+
* page. NOTE: For responsiveness, horizontal cards are automatically transformed to vertical cards at lower screen
|
|
55
|
+
* sizes.
|
|
37
56
|
*/
|
|
38
57
|
orientation: {
|
|
39
58
|
type: () => NeonOrientation;
|
|
@@ -46,6 +65,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
46
65
|
type: () => NeonSize;
|
|
47
66
|
default: NeonSize;
|
|
48
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Whether to display the internal borders between card sections for horizontal cards
|
|
70
|
+
*/
|
|
71
|
+
horizontalBorders: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
default: boolean;
|
|
74
|
+
};
|
|
49
75
|
/**
|
|
50
76
|
* The breakpoint to switch horizontal cards to vertical cards. Accepts <em>Mobile | MobileLarge | Tablet</em> ONLY.
|
|
51
77
|
* @type NeonResponsive
|
|
@@ -54,9 +80,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
80
|
type: () => NeonResponsive;
|
|
55
81
|
default: NeonResponsive;
|
|
56
82
|
};
|
|
83
|
+
/**
|
|
84
|
+
* If true, do not implement a responsive breakpoint for a horizontal card.
|
|
85
|
+
*/
|
|
86
|
+
noBreak: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
57
90
|
}>>, {
|
|
58
91
|
size: NeonSize;
|
|
59
92
|
orientation: NeonOrientation;
|
|
93
|
+
horizontalBorders: boolean;
|
|
60
94
|
horizontalBreakpoint: NeonResponsive;
|
|
95
|
+
noBreak: boolean;
|
|
61
96
|
}>;
|
|
62
97
|
export default _default;
|
|
@@ -6,7 +6,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6
6
|
class: [[
|
|
7
7
|
`neon-card--${_ctx.orientation}`,
|
|
8
8
|
`neon-card--${_ctx.size}`,
|
|
9
|
-
`neon-card--horizontal-breakpoint-${_ctx.horizontalBreakpoint}
|
|
9
|
+
`neon-card--horizontal-breakpoint-${_ctx.horizontalBreakpoint}`,
|
|
10
|
+
_ctx.noBreak && "neon-card--horizontal-breakpoint-no-break",
|
|
11
|
+
_ctx.orientation === _ctx.NeonOrientation.Horizontal && _ctx.horizontalBorders && "neon-card--with-horizontal-borders"
|
|
10
12
|
], "neon-card"]
|
|
11
13
|
}, _ctx.attrs), [
|
|
12
14
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -7,12 +7,15 @@ var _sfc_main = defineComponent({
|
|
|
7
7
|
props: {
|
|
8
8
|
orientation: { type: String, default: NeonOrientation.Vertical },
|
|
9
9
|
size: { type: String, default: NeonSize.Medium },
|
|
10
|
-
|
|
10
|
+
horizontalBorders: { type: Boolean, default: true },
|
|
11
|
+
horizontalBreakpoint: { type: String, default: NeonResponsive.MobileLarge },
|
|
12
|
+
noBreak: { type: Boolean, default: false }
|
|
11
13
|
},
|
|
12
14
|
setup(_props) {
|
|
13
15
|
const attrs = useAttrs();
|
|
14
16
|
return {
|
|
15
|
-
attrs
|
|
17
|
+
attrs,
|
|
18
|
+
NeonOrientation
|
|
16
19
|
};
|
|
17
20
|
}
|
|
18
21
|
});
|
|
@@ -25,12 +25,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25
25
|
createElementVNode("div", _hoisted_2, [
|
|
26
26
|
index < _ctx.completedIndex ? (openBlock(), createBlock(_component_neon_icon, {
|
|
27
27
|
key: 0,
|
|
28
|
-
inverse: true,
|
|
29
28
|
class: "neon-stepper__step-completed-icon",
|
|
30
29
|
name: "check"
|
|
31
30
|
})) : index === _ctx.completedIndex ? (openBlock(), createBlock(_component_neon_icon, {
|
|
32
31
|
key: 1,
|
|
33
|
-
inverse: true,
|
|
34
32
|
class: "neon-stepper__step-completing-icon",
|
|
35
33
|
name: "dot"
|
|
36
34
|
})) : createCommentVNode("", true)
|
package/dist/components/navigation/stepper/NeonStepper.ts_vue_type_script_src_e55bd35c_lang.js
CHANGED
|
@@ -42,6 +42,7 @@ import "../../user-input/range-slider/NeonRangeSlider.ts_vue_type_script_src_25f
|
|
|
42
42
|
import "../../layout/side-nav/NeonSideNav.ts_vue_type_script_src_18c3ed0e_lang.js";
|
|
43
43
|
import "../../user-input/search/NeonSearch.ts_vue_type_script_src_a2c54fe4_lang.js";
|
|
44
44
|
import "../../user-input/select/NeonSelect.ts_vue_type_script_src_37fb08e4_lang.js";
|
|
45
|
+
import "../../user-input/selectable-card/NeonSelectableCard.ts_vue_type_script_src_3688086a_lang.js";
|
|
45
46
|
import "../../feedback/skeleton-loader/NeonSkeletonLoader.ts_vue_type_script_src_21110188_lang.js";
|
|
46
47
|
import "../../user-input/slider/NeonSlider.ts_vue_type_script_src_e29dcb24_lang.js";
|
|
47
48
|
import "../../feedback/splash-loader/NeonSplashLoader.ts_vue_type_script_src_56a53570_lang.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { NeonSize } from '@/common/enums/NeonSize';
|
|
2
|
+
import { NeonFunctionalColor } from '@/common/enums/NeonFunctionalColor';
|
|
3
|
+
import { NeonResponsive } from '@/common/enums/NeonResponsive';
|
|
4
|
+
/**
|
|
5
|
+
* <p>
|
|
6
|
+
* <strong>NeonSelectableCard</strong> is a horizontal card that is selectable by clicking on it. It can be used in
|
|
7
|
+
* lists to easily allow users to select multiple items, providing richer content & a larger footprint for clicking on.
|
|
8
|
+
* </p>
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: import("vue").DefineComponent<{
|
|
11
|
+
/**
|
|
12
|
+
* The selected state of the card
|
|
13
|
+
*/
|
|
14
|
+
modelValue: {
|
|
15
|
+
type: BooleanConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* The size of the card.
|
|
20
|
+
*/
|
|
21
|
+
size: {
|
|
22
|
+
type: () => NeonSize;
|
|
23
|
+
default: NeonSize;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* The selection color. This will be used for the checkbox as well as borders & the background color
|
|
27
|
+
*/
|
|
28
|
+
color: {
|
|
29
|
+
type: () => NeonFunctionalColor;
|
|
30
|
+
default: NeonFunctionalColor;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* The disabled state of the card.
|
|
34
|
+
*/
|
|
35
|
+
disabled: {
|
|
36
|
+
type: BooleanConstructor;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
}, {
|
|
40
|
+
active: import("vue").Ref<boolean>;
|
|
41
|
+
clicked: () => void;
|
|
42
|
+
NeonResponsive: typeof NeonResponsive;
|
|
43
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
+
/**
|
|
45
|
+
* The selected state of the card
|
|
46
|
+
*/
|
|
47
|
+
modelValue: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
required: true;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* The size of the card.
|
|
53
|
+
*/
|
|
54
|
+
size: {
|
|
55
|
+
type: () => NeonSize;
|
|
56
|
+
default: NeonSize;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* The selection color. This will be used for the checkbox as well as borders & the background color
|
|
60
|
+
*/
|
|
61
|
+
color: {
|
|
62
|
+
type: () => NeonFunctionalColor;
|
|
63
|
+
default: NeonFunctionalColor;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* The disabled state of the card.
|
|
67
|
+
*/
|
|
68
|
+
disabled: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: boolean;
|
|
71
|
+
};
|
|
72
|
+
}>> & {
|
|
73
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
74
|
+
}, {
|
|
75
|
+
color: NeonFunctionalColor;
|
|
76
|
+
disabled: boolean;
|
|
77
|
+
size: NeonSize;
|
|
78
|
+
}>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _sfc_main from "./NeonSelectableCard.ts_vue_type_script_src_3688086a_lang.js";
|
|
2
|
+
import { resolveComponent, openBlock, createBlock, normalizeClass, withKeys, withModifiers, withCtx, createVNode, renderSlot } from "vue";
|
|
3
|
+
import _export_sfc from "../../../_virtual/plugin-vue_export-helper.js";
|
|
4
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
5
|
+
const _component_neon_switch = resolveComponent("neon-switch");
|
|
6
|
+
const _component_neon_card_header = resolveComponent("neon-card-header");
|
|
7
|
+
const _component_neon_card = resolveComponent("neon-card");
|
|
8
|
+
return openBlock(), createBlock(_component_neon_card, {
|
|
9
|
+
class: normalizeClass([[
|
|
10
|
+
`neon-selectable-card--${_ctx.color}`,
|
|
11
|
+
{ "neon-selectable-card--selected": _ctx.modelValue },
|
|
12
|
+
{ "neon-selectable-card--disabled": _ctx.disabled }
|
|
13
|
+
], "neon-selectable-card"]),
|
|
14
|
+
"horizontal-borders": false,
|
|
15
|
+
"no-break": true,
|
|
16
|
+
size: _ctx.size,
|
|
17
|
+
orientation: "horizontal",
|
|
18
|
+
tabindex: "0",
|
|
19
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.clicked()),
|
|
20
|
+
onKeydown: [
|
|
21
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.clicked(), ["stop", "prevent"]), ["enter"])),
|
|
22
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.clicked(), ["stop", "prevent"]), ["space"]))
|
|
23
|
+
]
|
|
24
|
+
}, {
|
|
25
|
+
default: withCtx(() => [
|
|
26
|
+
createVNode(_component_neon_card_header, null, {
|
|
27
|
+
default: withCtx(() => [
|
|
28
|
+
createVNode(_component_neon_switch, {
|
|
29
|
+
color: _ctx.color,
|
|
30
|
+
disabled: _ctx.disabled,
|
|
31
|
+
"model-value": _ctx.modelValue,
|
|
32
|
+
size: _ctx.size,
|
|
33
|
+
class: "neon-selectable-card__checkbox",
|
|
34
|
+
"switch-style": "checkbox",
|
|
35
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.clicked())
|
|
36
|
+
}, null, 8, ["color", "disabled", "model-value", "size"])
|
|
37
|
+
]),
|
|
38
|
+
_: 1
|
|
39
|
+
}),
|
|
40
|
+
renderSlot(_ctx.$slots, "default")
|
|
41
|
+
]),
|
|
42
|
+
_: 3
|
|
43
|
+
}, 8, ["class", "size"]);
|
|
44
|
+
}
|
|
45
|
+
var NeonSelectableCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/andrew/dev/projects/neon/src/components/user-input/selectable-card/NeonSelectableCard.vue"]]);
|
|
46
|
+
export { NeonSelectableCard as default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineComponent, ref } from "vue";
|
|
2
|
+
import { NeonSize } from "../../../common/enums/NeonSize.js";
|
|
3
|
+
import { NeonFunctionalColor } from "../../../common/enums/NeonFunctionalColor.js";
|
|
4
|
+
import NeonCard from "../../layout/card/NeonCard.js";
|
|
5
|
+
import NeonCardHeader from "../../layout/card/header/NeonCardHeader.js";
|
|
6
|
+
import NeonSwitch from "../switch/NeonSwitch.js";
|
|
7
|
+
import { NeonResponsive } from "../../../common/enums/NeonResponsive.js";
|
|
8
|
+
var _sfc_main = defineComponent({
|
|
9
|
+
name: "NeonSelectableCard",
|
|
10
|
+
components: {
|
|
11
|
+
NeonCard,
|
|
12
|
+
NeonCardHeader,
|
|
13
|
+
NeonSwitch
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
modelValue: { type: Boolean, required: true },
|
|
17
|
+
size: { type: String, default: NeonSize.Small },
|
|
18
|
+
color: { type: String, default: NeonFunctionalColor.Brand },
|
|
19
|
+
disabled: { type: Boolean, default: false }
|
|
20
|
+
},
|
|
21
|
+
emits: [
|
|
22
|
+
"update:modelValue"
|
|
23
|
+
],
|
|
24
|
+
setup(props, { emit }) {
|
|
25
|
+
const active = ref(false);
|
|
26
|
+
const clicked = () => {
|
|
27
|
+
if (!props.disabled) {
|
|
28
|
+
emit("update:modelValue", !props.modelValue);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
active,
|
|
33
|
+
clicked,
|
|
34
|
+
NeonResponsive
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export { _sfc_main as default };
|
|
@@ -8,7 +8,10 @@ const _hoisted_4 = [
|
|
|
8
8
|
_hoisted_3
|
|
9
9
|
];
|
|
10
10
|
const _hoisted_5 = ["checked", "disabled"];
|
|
11
|
-
const _hoisted_6 = {
|
|
11
|
+
const _hoisted_6 = {
|
|
12
|
+
key: 2,
|
|
13
|
+
class: "neon-switch__label"
|
|
14
|
+
};
|
|
12
15
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13
16
|
const _component_neon_icon = resolveComponent("neon-icon");
|
|
14
17
|
return openBlock(), createElementBlock("label", {
|
|
@@ -28,11 +31,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28
31
|
role: _ctx.switchStyle,
|
|
29
32
|
"data-testid": "checkbox-label",
|
|
30
33
|
tabindex: "-1",
|
|
34
|
+
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args)),
|
|
31
35
|
onKeydown: [
|
|
32
|
-
_cache[2] || (_cache[2] = withKeys((...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args), ["enter"])),
|
|
33
|
-
_cache[3] || (_cache[3] = withKeys((...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args), ["space"]))
|
|
34
|
-
_cache[4] || (_cache[4] = withKeys(withModifiers(() => {
|
|
35
|
-
}, ["prevent"]), ["space"]))
|
|
36
|
+
_cache[2] || (_cache[2] = withKeys(withModifiers((...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args), ["stop", "prevent"]), ["enter"])),
|
|
37
|
+
_cache[3] || (_cache[3] = withKeys(withModifiers((...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args), ["stop", "prevent"]), ["space"]))
|
|
36
38
|
]
|
|
37
39
|
}, [
|
|
38
40
|
_ctx.switchStyle === "checkbox" ? (openBlock(), createBlock(_component_neon_icon, {
|
|
@@ -40,7 +42,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
40
42
|
disabled: _ctx.disabled,
|
|
41
43
|
inverse: true,
|
|
42
44
|
name: _ctx.indeterminate ? "dash" : "check",
|
|
43
|
-
tabindex: !_ctx.disabled ? 0 : void 0,
|
|
45
|
+
tabindex: !_ctx.disabled && _ctx.label ? 0 : void 0,
|
|
44
46
|
class: "neon-switch__checkbox"
|
|
45
47
|
}, null, 8, ["disabled", "name", "tabindex"])) : createCommentVNode("", true),
|
|
46
48
|
_ctx.switchStyle === "switch" ? (openBlock(), createElementBlock("span", {
|
|
@@ -56,10 +58,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
56
58
|
"data-testid": "checkbox",
|
|
57
59
|
type: "checkbox"
|
|
58
60
|
}, _ctx.sanitizedAttributes, {
|
|
59
|
-
|
|
60
|
-
onInput: _cache[1] || (_cache[1] = (...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args))
|
|
61
|
+
onInput: _cache[0] || (_cache[0] = (...args) => _ctx.toggleSwitch && _ctx.toggleSwitch(...args))
|
|
61
62
|
}), null, 16, _hoisted_5),
|
|
62
|
-
|
|
63
|
+
_ctx.label ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(_ctx.label), 1)) : createCommentVNode("", true)
|
|
63
64
|
], 42, _hoisted_1);
|
|
64
65
|
}
|
|
65
66
|
var NeonSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/andrew/dev/projects/neon/src/components/user-input/switch/NeonSwitch.vue"]]);
|
package/dist/neon.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { default as NeonRangeSlider } from './components/user-input/range-slider
|
|
|
41
41
|
export { default as NeonSideNav } from './components/layout/side-nav/NeonSideNav.vue';
|
|
42
42
|
export { default as NeonSearch } from './components/user-input/search/NeonSearch.vue';
|
|
43
43
|
export { default as NeonSelect } from './components/user-input/select/NeonSelect.vue';
|
|
44
|
+
export { default as NeonSelectableCard } from './components/user-input/selectable-card/NeonSelectableCard.vue';
|
|
44
45
|
export { default as NeonSkeletonLoader } from './components/feedback/skeleton-loader/NeonSkeletonLoader.vue';
|
|
45
46
|
export { default as NeonSlider } from './components/user-input/slider/NeonSlider.vue';
|
|
46
47
|
export { default as NeonSplashLoader } from './components/feedback/splash-loader/NeonSplashLoader.vue';
|
package/dist/neon.js
CHANGED
|
@@ -41,6 +41,7 @@ export { default as NeonRangeSlider } from "./components/user-input/range-slider
|
|
|
41
41
|
export { default as NeonSideNav } from "./components/layout/side-nav/NeonSideNav.js";
|
|
42
42
|
export { default as NeonSearch } from "./components/user-input/search/NeonSearch.js";
|
|
43
43
|
export { default as NeonSelect } from "./components/user-input/select/NeonSelect.js";
|
|
44
|
+
export { default as NeonSelectableCard } from "./components/user-input/selectable-card/NeonSelectableCard.js";
|
|
44
45
|
export { default as NeonSkeletonLoader } from "./components/feedback/skeleton-loader/NeonSkeletonLoader.js";
|
|
45
46
|
export { default as NeonSlider } from "./components/user-input/slider/NeonSlider.js";
|
|
46
47
|
export { default as NeonSplashLoader } from "./components/feedback/splash-loader/NeonSplashLoader.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aotearoan/neon",
|
|
3
3
|
"description": "Neon is a lightweight design library of VueJS components with minimal dependencies. It supports light and dark modes and can be extended to support multiple themes",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.3.0-beta.1",
|
|
5
5
|
"module": "dist/neon.js",
|
|
6
6
|
"types": "dist/neon.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
.neon-card-header,
|
|
8
8
|
.neon-card-body,
|
|
9
9
|
.neon-card-footer {
|
|
10
|
-
@include layout.padding;
|
|
11
10
|
margin-bottom: 0;
|
|
12
11
|
justify-content: center;
|
|
13
12
|
|
|
@@ -130,20 +129,37 @@
|
|
|
130
129
|
&.neon-card--horizontal-breakpoint-mobile-l {
|
|
131
130
|
@include responsive.responsive(larger-than-mobile-large) {
|
|
132
131
|
@include horizontal-card-responsive;
|
|
133
|
-
|
|
132
|
+
|
|
133
|
+
&.neon-card--with-horizontal-borders {
|
|
134
|
+
@include horizontal-card-responsive-borders;
|
|
135
|
+
}
|
|
134
136
|
}
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
&.neon-card--horizontal-breakpoint-mobile {
|
|
138
140
|
@include responsive.responsive(larger-than-mobile) {
|
|
139
141
|
@include horizontal-card-responsive;
|
|
140
|
-
|
|
142
|
+
|
|
143
|
+
&.neon-card--with-horizontal-borders {
|
|
144
|
+
@include horizontal-card-responsive-borders;
|
|
145
|
+
}
|
|
141
146
|
}
|
|
142
147
|
}
|
|
143
148
|
|
|
144
149
|
&.neon-card--horizontal-breakpoint-tablet {
|
|
145
150
|
@include responsive.responsive(larger-than-tablet) {
|
|
146
151
|
@include horizontal-card-responsive;
|
|
152
|
+
|
|
153
|
+
&.neon-card--with-horizontal-borders {
|
|
154
|
+
@include horizontal-card-responsive-borders;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.neon-card--horizontal-breakpoint-no-break {
|
|
160
|
+
@include horizontal-card-responsive;
|
|
161
|
+
|
|
162
|
+
&.neon-card--with-horizontal-borders {
|
|
147
163
|
@include horizontal-card-responsive-borders;
|
|
148
164
|
}
|
|
149
165
|
}
|
|
@@ -151,6 +167,7 @@
|
|
|
151
167
|
|
|
152
168
|
.neon-card-body--full-width {
|
|
153
169
|
padding: 0;
|
|
170
|
+
width: calc(100% + 2 * var(--neon-border-width));
|
|
154
171
|
|
|
155
172
|
img {
|
|
156
173
|
margin-left: calc(-1 * var(--neon-border-width));
|
|
@@ -185,7 +202,7 @@
|
|
|
185
202
|
}
|
|
186
203
|
|
|
187
204
|
.neon-card.neon-card--vertical {
|
|
188
|
-
.neon-card-header {
|
|
205
|
+
& > .neon-card-header {
|
|
189
206
|
&:not(:last-child) {
|
|
190
207
|
padding-bottom: 0;
|
|
191
208
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use '../includes/palettes';
|
|
2
|
+
|
|
3
|
+
@mixin selectable-card {
|
|
4
|
+
.neon-selectable-card {
|
|
5
|
+
--neon-border-radius-card: var(--neon-border-radius-selectable-card);
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
user-select: none;
|
|
8
|
+
box-shadow: var(--neon-box-shadow-selectable-card);
|
|
9
|
+
transition: all var(--neon-animation-speed-fast) ease-in-out;
|
|
10
|
+
outline: none;
|
|
11
|
+
|
|
12
|
+
& > .neon-card-header,
|
|
13
|
+
& > .neon-card-body,
|
|
14
|
+
& > .neon-card-footer {
|
|
15
|
+
background-color: var(--neon-background-color-selectable-card);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__checkbox {
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
margin-left: calc(2 * var(--neon-base-space));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:not(.neon-selectable-card--disabled):active {
|
|
24
|
+
transform: scale(0.99);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@each $color in palettes.$neon-functional-colors {
|
|
28
|
+
&--#{$color} {
|
|
29
|
+
&:focus-visible {
|
|
30
|
+
border: var(--neon-border-width) var(--neon-border-style) var(--neon-color-#{$color});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:not(.neon-selectable-card--disabled) {
|
|
34
|
+
&:hover > .neon-card-header,
|
|
35
|
+
&:hover > .neon-card-body,
|
|
36
|
+
&:hover > .neon-card-footer {
|
|
37
|
+
background-color: rgba(var(--neon-rgb-#{$color}), 0.03125);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&.neon-selectable-card--selected > div {
|
|
41
|
+
background-color: rgba(var(--neon-rgb-#{$color}), 0.0625);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& + .neon-selectable-card {
|
|
48
|
+
margin-top: calc(0.25 * var(--neon-base-space));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&--disabled {
|
|
52
|
+
color: var(--neon-color-disabled-dark);
|
|
53
|
+
box-shadow: none;
|
|
54
|
+
|
|
55
|
+
.neon-card {
|
|
56
|
+
border-color: var(--neon-color-disabled-dark);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&,
|
|
60
|
+
.neon-switch {
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -54,14 +54,21 @@
|
|
|
54
54
|
background: var(--neon-color-stepper-disabled);
|
|
55
55
|
transition: all var(--neon-animation-speed-fast) ease-in-out;
|
|
56
56
|
|
|
57
|
-
.neon-stepper__step-completed-icon
|
|
58
|
-
width: calc(2.5 * var(--neon-base-space));
|
|
59
|
-
height: calc(2.5 * var(--neon-base-space));
|
|
60
|
-
}
|
|
61
|
-
|
|
57
|
+
.neon-stepper__step-completed-icon,
|
|
62
58
|
.neon-stepper__step-completing-icon {
|
|
63
59
|
width: calc(2.5 * var(--neon-base-space));
|
|
64
60
|
height: calc(2.5 * var(--neon-base-space));
|
|
61
|
+
|
|
62
|
+
svg {
|
|
63
|
+
path,
|
|
64
|
+
circle {
|
|
65
|
+
fill: var(--neon-color-stepper-indicator);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
circle {
|
|
69
|
+
stroke: var(--neon-color-stepper-indicator);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
65
72
|
}
|
|
66
73
|
}
|
|
67
74
|
|
|
@@ -32,6 +32,50 @@
|
|
|
32
32
|
@include layout.margin-vertical();
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
ol {
|
|
36
|
+
padding: 0;
|
|
37
|
+
list-style: none;
|
|
38
|
+
counter-reset: li;
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
|
|
42
|
+
> li {
|
|
43
|
+
counter-increment: li;
|
|
44
|
+
max-width: var(--neon-max-paragraph-width);
|
|
45
|
+
margin-left: calc(8 * var(--neon-base-space));
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
display: inline-flex;
|
|
49
|
+
content: counter(li);
|
|
50
|
+
margin-right: calc(4 * var(--neon-base-space));
|
|
51
|
+
width: calc(6 * var(--neon-base-space));
|
|
52
|
+
justify-content: flex-start;
|
|
53
|
+
font-variant: tabular-nums;
|
|
54
|
+
color: var(--neon-color-neutral);
|
|
55
|
+
position: absolute;
|
|
56
|
+
left: calc(6 * var(--neon-base-space));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> li:nth-child(1),
|
|
61
|
+
> li:nth-child(2),
|
|
62
|
+
> li:nth-child(3),
|
|
63
|
+
> li:nth-child(4),
|
|
64
|
+
> li:nth-child(5),
|
|
65
|
+
> li:nth-child(6),
|
|
66
|
+
> li:nth-child(7),
|
|
67
|
+
> li:nth-child(8),
|
|
68
|
+
> li:nth-child(9) {
|
|
69
|
+
&::before {
|
|
70
|
+
content: "0" counter(li);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
& + p {
|
|
75
|
+
margin-top: calc(4 * var(--neon-base-space));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
35
79
|
ul {
|
|
36
80
|
margin: 0;
|
|
37
81
|
padding-left: 0;
|
|
@@ -85,10 +129,8 @@
|
|
|
85
129
|
margin-top: 0;
|
|
86
130
|
}
|
|
87
131
|
|
|
88
|
-
p + ul
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
132
|
+
p + ul,
|
|
133
|
+
p + ol,
|
|
92
134
|
pre + p {
|
|
93
135
|
margin-top: calc(2 * var(--neon-base-space));
|
|
94
136
|
}
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
NeonToggleChip: [NeonIcon],
|
|
119
119
|
NeonTooltip: [],
|
|
120
120
|
NeonTopNav: [],
|
|
121
|
-
NeonTreeMenu: [NeonLink,
|
|
122
|
-
NeonIcon],
|
|
121
|
+
NeonTreeMenu: [NeonLink,NeonIcon],
|
|
123
122
|
NeonStepper: [NeonIcon],
|
|
123
|
+
NeonSelectableCard: [NeonCard, NeonCardHeader, NeonSwitch, NeonIcon],
|
|
124
124
|
);
|
|
125
125
|
|
|
126
126
|
$neon-flattened-components: [];
|
package/src/sass/theme.scss
CHANGED
package/src/sass/variables.scss
CHANGED
|
@@ -232,6 +232,9 @@
|
|
|
232
232
|
--neon-opacity-background-progress: 0.0625;
|
|
233
233
|
--neon-border-radius-progress-indicator: calc(2 * var(--neon-base-space));
|
|
234
234
|
|
|
235
|
+
/* selectable card */
|
|
236
|
+
--neon-border-radius-selectable-card: calc(1.5 * var(--neon-base-space));
|
|
237
|
+
|
|
235
238
|
/**********************
|
|
236
239
|
* DARK THEME VARIABLES
|
|
237
240
|
**********************/
|
|
@@ -494,7 +497,12 @@
|
|
|
494
497
|
--neon-color-input-indicator: var(--neon-color-neutral);
|
|
495
498
|
|
|
496
499
|
/* stepper */
|
|
500
|
+
--neon-color-stepper-indicator: var(--neon-color-high-contrast-d3);
|
|
497
501
|
--neon-color-stepper-disabled: var(--neon-color-disabled-light);
|
|
502
|
+
|
|
503
|
+
/* selectable card */
|
|
504
|
+
--neon-background-color-selectable-card: rgba(var(--neon-rgb-neutral-d5), 0.5);
|
|
505
|
+
--neon-box-shadow-selectable-card: 0 -2rem 4rem 0 rgba(var(--neon-rgb-neutral-d5), 0.2), 0 2rem 4rem 0 rgba(var(--neon-rgb-neutral-d5), 0.3);
|
|
498
506
|
}
|
|
499
507
|
|
|
500
508
|
/*********************
|
|
@@ -758,6 +766,11 @@
|
|
|
758
766
|
--neon-color-input-indicator: var(--neon-color-neutral);
|
|
759
767
|
|
|
760
768
|
/* stepper */
|
|
769
|
+
--neon-color-stepper-indicator: var(--neon-color-high-contrast-l5);
|
|
761
770
|
--neon-color-stepper-disabled: var(--neon-color-disabled-dark);
|
|
771
|
+
|
|
772
|
+
/* selectable card */
|
|
773
|
+
--neon-background-color-selectable-card: rgba(var(--neon-rgb-high-contrast-l4), 0.5);
|
|
774
|
+
--neon-box-shadow-selectable-card: 0 -2rem 4rem 0 rgba(var(--neon-rgb-neutral-l3), 0.1), 0 2rem 4rem 0 rgba(var(--neon-rgb-neutral-l3), 0.15);
|
|
762
775
|
}
|
|
763
776
|
}
|