tide-design-system 2.0.48 → 2.0.49
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/IconBunkhouse-348a1518.cjs +2 -0
- package/dist/IconBunkhouse-e7cb965d.js +16 -0
- package/dist/css/dynamic-buttons.css +0 -12
- package/dist/css/reset.css +2 -1
- package/dist/css/utilities.css +5 -5
- package/dist/style.css +1 -1
- package/dist/tide-design-system.cjs +2 -2
- package/dist/tide-design-system.esm.d.ts +16 -0
- package/dist/tide-design-system.esm.js +279 -267
- package/dist/utilities/storybook.ts +2 -5
- package/index.ts +7 -5
- package/package.json +3 -1
- package/src/assets/css/dynamic-buttons.css +0 -12
- package/src/assets/css/reset.css +2 -1
- package/src/assets/css/utilities.css +5 -5
- package/src/assets/svg/icons/IconBunkhouse.svg +3 -0
- package/src/components/TideButton.vue +12 -7
- package/src/components/TideCard.vue +12 -4
- package/src/components/TideColumns.vue +3 -1
- package/src/components/TideInputSelect.vue +1 -1
- package/src/stories/FoundationsGap.stories.ts +6 -2
- package/src/stories/TideButton.stories.ts +10 -0
- package/src/stories/TideCard.stories.ts +8 -2
- package/src/stories/TideIcon.stories.ts +1 -2
- package/src/types/Field.ts +1 -1
- package/src/types/Form.ts +1 -1
- package/src/types/Icon.ts +1 -0
- package/src/types/Size.ts +7 -0
- package/src/utilities/storybook.ts +2 -5
- package/vite-env.d.ts +2 -0
- package/vite.config.ts +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ArgTypes } from '@storybook/vue3';
|
|
1
|
+
import type { ArgTypes, StoryContext } from '@storybook/vue3';
|
|
2
2
|
|
|
3
|
-
import { BOOLEAN, BOOLEAN_UNREQUIRED } from '@/types/Storybook';
|
|
3
|
+
import { BOOLEAN, BOOLEAN_UNREQUIRED, NoneAsEmpty, NoneAsUndefined } from '@/types/Storybook';
|
|
4
4
|
import { CSS } from '@/types/Styles';
|
|
5
5
|
import { ELEMENT, ELEMENT_TEXT_AS_ICON } from '@/types/Element';
|
|
6
6
|
|
|
@@ -12,10 +12,7 @@ type KeyValueNamed = {
|
|
|
12
12
|
[key: string]: KeyValue;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
16
|
-
|
|
17
15
|
import { formatKebabCase } from '@/utilities/format';
|
|
18
|
-
import { NoneAsEmpty, NoneAsUndefined } from '@/types/Storybook';
|
|
19
16
|
|
|
20
17
|
export const lineBreak = '\r';
|
|
21
18
|
export const tab = ' ';
|
package/index.ts
CHANGED
|
@@ -48,8 +48,8 @@ import type {
|
|
|
48
48
|
SelectField,
|
|
49
49
|
StringField,
|
|
50
50
|
StringValue,
|
|
51
|
-
TextField,
|
|
52
51
|
TextareaField,
|
|
52
|
+
TextField,
|
|
53
53
|
} from '@/types/Field';
|
|
54
54
|
import type {
|
|
55
55
|
BooleanInput,
|
|
@@ -58,8 +58,8 @@ import type {
|
|
|
58
58
|
Input,
|
|
59
59
|
SelectInput,
|
|
60
60
|
StringInput,
|
|
61
|
-
TextInput,
|
|
62
61
|
TextareaInput,
|
|
62
|
+
TextInput,
|
|
63
63
|
} from '@/types/Form';
|
|
64
64
|
import type { Formatted } from '@/types/Formatted';
|
|
65
65
|
import type { Icon } from '@/types/Icon';
|
|
@@ -71,12 +71,12 @@ import type { Raw } from '@/types/Raw';
|
|
|
71
71
|
import type { Realm } from '@/types/Realm';
|
|
72
72
|
import type { RealmConfig } from '@/types/RealmConfig';
|
|
73
73
|
import type { SelectOption, SelectOptionGroup } from '@/types/Select';
|
|
74
|
-
import type { Size } from '@/types/Size';
|
|
74
|
+
import type { Size, SizeButton } from '@/types/Size';
|
|
75
75
|
import type { CssUtility } from '@/types/Styles';
|
|
76
76
|
import type { Tab } from '@/types/Tab';
|
|
77
77
|
import type { Target } from '@/types/Target';
|
|
78
78
|
import type { TextInputType } from '@/types/TextInput';
|
|
79
|
-
import type { ValidationError,
|
|
79
|
+
import type { ValidationError, ValidationLength, ValidationResult, Validator } from '@/types/Validation';
|
|
80
80
|
|
|
81
81
|
import { ALERT } from '@/types/Alert';
|
|
82
82
|
import { BADGE, BADGE_PREMIUM, BADGE_TRUSTED } from '@/types/Badge';
|
|
@@ -90,7 +90,7 @@ import { ORIENTATION } from '@/types/Orientation';
|
|
|
90
90
|
import { POSITION_CARD_ICON, TYPE_CARD } from '@/types/Card';
|
|
91
91
|
import { PRIORITY } from '@/types/Priority';
|
|
92
92
|
import { REALM } from '@/types/Realm';
|
|
93
|
-
import { SIZE } from '@/types/Size';
|
|
93
|
+
import { SIZE, SIZE_BUTTON } from '@/types/Size';
|
|
94
94
|
import { TARGET } from '@/types/Target';
|
|
95
95
|
import { TEXT_INPUT_TYPE } from '@/types/TextInput';
|
|
96
96
|
import { VALIDATOR } from '@/types/Validation';
|
|
@@ -139,6 +139,7 @@ export type {
|
|
|
139
139
|
SelectOptionGroup,
|
|
140
140
|
SelectOption,
|
|
141
141
|
Size,
|
|
142
|
+
SizeButton,
|
|
142
143
|
StringField,
|
|
143
144
|
StringInput,
|
|
144
145
|
StringValue,
|
|
@@ -177,6 +178,7 @@ export {
|
|
|
177
178
|
PRIORITY,
|
|
178
179
|
REALM,
|
|
179
180
|
SIZE,
|
|
181
|
+
SIZE_BUTTON,
|
|
180
182
|
TARGET,
|
|
181
183
|
TEXT_INPUT_TYPE,
|
|
182
184
|
TYPE_CARD,
|
package/package.json
CHANGED
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
"@vue/eslint-config-typescript": "^11.0.2",
|
|
19
19
|
"@vue/test-utils": "^2.0.0-rc.18",
|
|
20
20
|
"@vue/tsconfig": "^0.4.0",
|
|
21
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
22
|
+
"eslint-plugin-import": "^2.31.0",
|
|
21
23
|
"eslint-plugin-storybook": "^0.8.0",
|
|
22
24
|
"eslint-plugin-vue": "^9.9.0",
|
|
23
25
|
"happy-dom": "^15.10.2",
|
|
@@ -55,5 +57,5 @@
|
|
|
55
57
|
"main": "dist/tide-design-system.cjs",
|
|
56
58
|
"module": "dist/tide-design-system.esm.js",
|
|
57
59
|
"types": "dist/tide-design-system.esm.d.ts",
|
|
58
|
-
"version": "2.0.
|
|
60
|
+
"version": "2.0.49"
|
|
59
61
|
}
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
.tide-link-as-button,
|
|
2
|
-
.tide-button {
|
|
3
|
-
padding-top: 0.75rem;
|
|
4
|
-
padding-bottom: 0.75rem;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.tide-link-as-button.tide-button-quaternary,
|
|
8
|
-
.tide-button.tide-button-quaternary {
|
|
9
|
-
padding-right: 1rem;
|
|
10
|
-
padding-left: 1rem;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
1
|
/* Rest State */
|
|
14
2
|
.tide-button-primary {
|
|
15
3
|
background: var(--tide-primary);
|
package/src/assets/css/reset.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
body {
|
|
2
2
|
color: var(--tide-on-surface);
|
|
3
3
|
font-weight: 500;
|
|
4
|
+
line-height: 1.4;
|
|
4
5
|
}
|
|
5
6
|
|
|
6
7
|
*,
|
|
@@ -13,6 +14,7 @@ body {
|
|
|
13
14
|
color: inherit;
|
|
14
15
|
font-family: Montserrat;
|
|
15
16
|
font-weight: inherit;
|
|
17
|
+
line-height: inherit;
|
|
16
18
|
-webkit-font-smoothing: antialiased;
|
|
17
19
|
-moz-osx-font-smoothing: grayscale;
|
|
18
20
|
text-underline-offset: .2em;
|
|
@@ -44,7 +46,6 @@ img {
|
|
|
44
46
|
|
|
45
47
|
p {
|
|
46
48
|
max-width: 80ch;
|
|
47
|
-
line-height: 150%;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
button,
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
|
|
290
290
|
.tide-isolate {isolation: isolate;}
|
|
291
291
|
|
|
292
|
-
.tide-leading-default {line-height:
|
|
292
|
+
.tide-leading-default {line-height: 1.4;}
|
|
293
293
|
.tide-leading-normal {line-height: normal;}
|
|
294
294
|
|
|
295
295
|
.tide-list-none {list-style-type: none;}
|
|
@@ -655,7 +655,7 @@
|
|
|
655
655
|
|
|
656
656
|
.sm-tide-isolate {isolation: isolate;}
|
|
657
657
|
|
|
658
|
-
.sm-tide-leading-default {line-height:
|
|
658
|
+
.sm-tide-leading-default {line-height: 1.4;}
|
|
659
659
|
.sm-tide-leading-normal {line-height: normal;}
|
|
660
660
|
|
|
661
661
|
.sm-tide-list-none {list-style-type: none;}
|
|
@@ -1022,7 +1022,7 @@
|
|
|
1022
1022
|
|
|
1023
1023
|
.md-tide-isolate {isolation: isolate;}
|
|
1024
1024
|
|
|
1025
|
-
.md-tide-leading-default {line-height:
|
|
1025
|
+
.md-tide-leading-default {line-height: 1.4;}
|
|
1026
1026
|
.md-tide-leading-normal {line-height: normal;}
|
|
1027
1027
|
|
|
1028
1028
|
.md-tide-list-none {list-style-type: none;}
|
|
@@ -1389,7 +1389,7 @@
|
|
|
1389
1389
|
|
|
1390
1390
|
.lg-tide-isolate {isolation: isolate;}
|
|
1391
1391
|
|
|
1392
|
-
.lg-tide-leading-default {line-height:
|
|
1392
|
+
.lg-tide-leading-default {line-height: 1.4;}
|
|
1393
1393
|
.lg-tide-leading-normal {line-height: normal;}
|
|
1394
1394
|
|
|
1395
1395
|
.lg-tide-list-none {list-style-type: none;}
|
|
@@ -1756,7 +1756,7 @@
|
|
|
1756
1756
|
|
|
1757
1757
|
.xl-tide-isolate {isolation: isolate;}
|
|
1758
1758
|
|
|
1759
|
-
.xl-tide-leading-default {line-height:
|
|
1759
|
+
.xl-tide-leading-default {line-height: 1.4;}
|
|
1760
1760
|
.xl-tide-leading-normal {line-height: normal;}
|
|
1761
1761
|
|
|
1762
1762
|
.xl-tide-list-none {list-style-type: none;}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
2
|
+
<path d="M5.95 21a.87.87 0 0 1-.75-.39.94.94 0 0 1-.15-.84L9.5 3.7a.98.98 0 0 1 .35-.51.93.93 0 0 1 .58-.19c.33 0 .59.13.77.39.18.26.23.53.15.83L10.85 6h5.63l.62-2.3a.99.99 0 0 1 .95-.7c.32 0 .57.13.75.39.18.26.23.53.15.83L14.5 20.3a.98.98 0 0 1-.35.51.93.93 0 0 1-.58.19.9.9 0 0 1-.77-.39.95.95 0 0 1-.15-.84l.5-1.77H7.53l-.63 2.3a.99.99 0 0 1-.95.7Zm3.53-10h5.6l.82-3h-5.6l-.82 3ZM8.1 16h5.6l.83-3h-5.6l-.83 3Z" />
|
|
3
|
+
</svg>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { CSS } from '@/types/Styles';
|
|
8
8
|
import { ELEMENT } from '@/types/Element';
|
|
9
9
|
import { PRIORITY } from '@/types/Priority';
|
|
10
|
-
import { SIZE } from '@/types/Size';
|
|
10
|
+
import { SIZE, SIZE_BUTTON, type SizeButton } from '@/types/Size';
|
|
11
11
|
import { TARGET } from '@/types/Target';
|
|
12
12
|
|
|
13
13
|
type Props = {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
isNewTab?: boolean;
|
|
20
20
|
label: string;
|
|
21
21
|
priority?: Priority;
|
|
22
|
+
size?: SizeButton;
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
const props = withDefaults(defineProps<Props>(), {
|
|
@@ -30,19 +31,23 @@
|
|
|
30
31
|
isNewTab: false,
|
|
31
32
|
label: undefined,
|
|
32
33
|
priority: PRIORITY.PRIMARY,
|
|
34
|
+
size: SIZE_BUTTON.LARGE,
|
|
33
35
|
});
|
|
34
36
|
</script>
|
|
35
37
|
|
|
36
38
|
<template>
|
|
37
39
|
<component
|
|
38
40
|
:class="[
|
|
39
|
-
|
|
41
|
+
'tide-button',
|
|
40
42
|
props.priority && `tide-button-${props.priority}`,
|
|
41
43
|
props.element === ELEMENT.LINK ? [CSS.DISPLAY.INLINE_FLEX] : [CSS.DISPLAY.FLEX],
|
|
42
|
-
[CSS.AXIS1.CENTER, CSS.AXIS2.CENTER, CSS.GAP.HALF, CSS.BORDER.RADIUS.HALF],
|
|
43
44
|
props.element === ELEMENT.LINK ? CSS.UNDERLINE.OFF : '',
|
|
44
|
-
CSS.PADDING.
|
|
45
|
-
CSS.PADDING.X.TWO,
|
|
45
|
+
size === SIZE_BUTTON.SMALL && [CSS.FONT.ROLE.BUTTON_2, CSS.PADDING.X.ONE, CSS.PADDING.Y.HALF],
|
|
46
|
+
size === SIZE_BUTTON.LARGE && [CSS.FONT.ROLE.BUTTON_1, CSS.PADDING.X.TWO, CSS.PADDING.Y.ONE],
|
|
47
|
+
CSS.AXIS1.CENTER,
|
|
48
|
+
CSS.AXIS2.CENTER,
|
|
49
|
+
CSS.GAP.HALF,
|
|
50
|
+
CSS.BORDER.RADIUS.HALF,
|
|
46
51
|
CSS.FONT.WEIGHT.SIX_HUNDRED,
|
|
47
52
|
]"
|
|
48
53
|
:disabled="props.element === ELEMENT.BUTTON && props.disabled"
|
|
@@ -52,7 +57,7 @@
|
|
|
52
57
|
>
|
|
53
58
|
<TideIcon
|
|
54
59
|
:icon="props.iconLeading"
|
|
55
|
-
:size="SIZE.LARGE"
|
|
60
|
+
:size="size === SIZE_BUTTON.LARGE ? SIZE.LARGE : SIZE.SMALL"
|
|
56
61
|
v-if="props.iconLeading"
|
|
57
62
|
/>
|
|
58
63
|
|
|
@@ -60,7 +65,7 @@
|
|
|
60
65
|
|
|
61
66
|
<TideIcon
|
|
62
67
|
:icon="props.iconTrailing"
|
|
63
|
-
:size="SIZE.LARGE"
|
|
68
|
+
:size="size === SIZE_BUTTON.LARGE ? SIZE.LARGE : SIZE.SMALL"
|
|
64
69
|
v-if="props.iconTrailing"
|
|
65
70
|
/>
|
|
66
71
|
</component>
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import {
|
|
2
|
+
import type { CardIconPosition, CardType } from '@/types/Card';
|
|
3
3
|
import type { Icon } from '@/types/Icon';
|
|
4
|
+
|
|
5
|
+
import TideIcon from '@/components/TideIcon.vue';
|
|
4
6
|
import { CSS } from '@/types/Styles';
|
|
7
|
+
import { POSITION_CARD_ICON, TYPE_CARD } from '@/types/Card';
|
|
5
8
|
import { SIZE } from '@/types/Size';
|
|
6
|
-
import TideIcon from '@/components/TideIcon.vue';
|
|
7
9
|
|
|
8
10
|
type Props = {
|
|
9
11
|
description?: string;
|
|
@@ -12,10 +14,12 @@
|
|
|
12
14
|
iconPosition: CardIconPosition;
|
|
13
15
|
selected?: boolean;
|
|
14
16
|
type: CardType;
|
|
17
|
+
href?: string;
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
withDefaults(defineProps<Props>(), {
|
|
18
21
|
description: undefined,
|
|
22
|
+
href: undefined,
|
|
19
23
|
icon: undefined,
|
|
20
24
|
iconPosition: POSITION_CARD_ICON.LEFT,
|
|
21
25
|
selected: undefined,
|
|
@@ -41,16 +45,20 @@
|
|
|
41
45
|
type !== TYPE_CARD.INFORMATIONAL && 'hoverable',
|
|
42
46
|
type === TYPE_CARD.SELECTABLE && selected && 'selected',
|
|
43
47
|
]"
|
|
44
|
-
:
|
|
48
|
+
:href="href"
|
|
49
|
+
:is="href ? 'a' : type === TYPE_CARD.INFORMATIONAL ? 'div' : 'button'"
|
|
45
50
|
>
|
|
46
51
|
<TideIcon
|
|
52
|
+
:class="[CSS.FLEX.GROW.OFF, CSS.FLEX.SHRINK.OFF]"
|
|
47
53
|
:icon="icon"
|
|
48
54
|
:size="SIZE.SMALL"
|
|
49
55
|
v-if="icon"
|
|
50
56
|
/>
|
|
51
57
|
|
|
52
58
|
<div :class="[CSS.AXIS2.START, CSS.DISPLAY.FLEX, CSS.FLEX.DIRECTION.COLUMN, CSS.GAP.HALF]">
|
|
53
|
-
<div :class="[CSS.FONT.ROLE.LABEL_1_SEMIBOLD, CSS.FONT.COLOR.SURFACE.DEFAULT]">
|
|
59
|
+
<div :class="[CSS.FONT.ROLE.LABEL_1_SEMIBOLD, CSS.FONT.COLOR.SURFACE.DEFAULT]">
|
|
60
|
+
{{ heading }}
|
|
61
|
+
</div>
|
|
54
62
|
|
|
55
63
|
<div
|
|
56
64
|
:class="[CSS.FONT.ROLE.LABEL_2, CSS.FONT.COLOR.SURFACE.VARIANT]"
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
<template>
|
|
14
14
|
<section class="tide-columns">
|
|
15
|
-
<h2 :class="[CSS.MARGIN.BOTTOM.HALF, CSS.FONT.SIZE.SIXTEEN]">
|
|
15
|
+
<h2 :class="[CSS.MARGIN.BOTTOM.HALF, CSS.FONT.SIZE.SIXTEEN]">
|
|
16
|
+
{{ props.heading }}
|
|
17
|
+
</h2>
|
|
16
18
|
|
|
17
19
|
<ul :class="[CSS.DISPLAY.FLEX, CSS.FLEX.WRAP, CSS.GAP.TWO, CSS.LIST_BULLETS.OFF]">
|
|
18
20
|
<li class="tide-columns-column">
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import { CSS } from '@/types/Styles';
|
|
9
9
|
import { ICON } from '@/types/Icon';
|
|
10
10
|
import { SIZE } from '@/types/Size';
|
|
11
|
-
import {
|
|
11
|
+
import { getErrorMessage, getFieldHasError } from '@/utilities/validation';
|
|
12
12
|
|
|
13
13
|
interface Props extends SelectField {
|
|
14
14
|
inputId?: string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { StoryContext } from '@storybook/vue3';
|
|
2
2
|
|
|
3
3
|
import * as STYLES from '@/types/Storybook';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import {
|
|
5
|
+
argTypeBooleanUnrequired,
|
|
6
|
+
formatArgType,
|
|
7
|
+
getConstantsByValues,
|
|
8
|
+
prependNoneAsEmpty,
|
|
9
|
+
} from '@/utilities/storybook';
|
|
6
10
|
|
|
7
11
|
const FLEX_AXIS1 = prependNoneAsEmpty(STYLES.FLEX_AXIS1);
|
|
8
12
|
const FLEX_AXIS2 = prependNoneAsEmpty(STYLES.FLEX_AXIS2);
|
|
@@ -3,6 +3,7 @@ import { action } from '@storybook/addon-actions';
|
|
|
3
3
|
import * as STANDARD_ELEMENT from '@/types/Element';
|
|
4
4
|
import * as STANDARD_ICON from '@/types/Icon';
|
|
5
5
|
import * as STANDARD_PRIORITY from '@/types/Priority';
|
|
6
|
+
import * as STANDARD_SIZE_BUTTON from '@/types/Size';
|
|
6
7
|
import TideButton from '@/components/TideButton.vue';
|
|
7
8
|
import {
|
|
8
9
|
argTypeBooleanUnrequired,
|
|
@@ -17,6 +18,7 @@ import {
|
|
|
17
18
|
const ELEMENT = prependNoneAsUndefined(STANDARD_ELEMENT.ELEMENT);
|
|
18
19
|
const ICON = prependNoneAsUndefined(STANDARD_ICON.ICON);
|
|
19
20
|
const PRIORITY = prependNoneAsUndefined(STANDARD_PRIORITY.PRIORITY);
|
|
21
|
+
const SIZE_BUTTON = prependNoneAsUndefined(STANDARD_SIZE_BUTTON.SIZE_BUTTON);
|
|
20
22
|
|
|
21
23
|
const render = (args: any) => ({
|
|
22
24
|
components: { TideButton },
|
|
@@ -95,6 +97,13 @@ export default {
|
|
|
95
97
|
defaultValue: { summary: 'PRIMARY' },
|
|
96
98
|
},
|
|
97
99
|
},
|
|
100
|
+
size: {
|
|
101
|
+
...formatArgType({ SIZE_BUTTON }),
|
|
102
|
+
description: 'Determines rendered size',
|
|
103
|
+
table: {
|
|
104
|
+
defaultValue: { summary: 'LARGE' },
|
|
105
|
+
},
|
|
106
|
+
},
|
|
98
107
|
},
|
|
99
108
|
args: {
|
|
100
109
|
click: 'doSomething',
|
|
@@ -107,6 +116,7 @@ export default {
|
|
|
107
116
|
isNewTab: undefined,
|
|
108
117
|
label: 'Demo',
|
|
109
118
|
priority: undefined,
|
|
119
|
+
size: undefined,
|
|
110
120
|
},
|
|
111
121
|
component: TideButton,
|
|
112
122
|
parameters,
|
|
@@ -3,8 +3,14 @@ import { action } from '@storybook/addon-actions';
|
|
|
3
3
|
import TideCard from '@/components/TideCard.vue';
|
|
4
4
|
import { ICON } from '@/types/Icon';
|
|
5
5
|
import { POSITION_CARD_ICON as STANDARD_POSITION_CARD_ICON, TYPE_CARD as STANDARD_TYPE_CARD } from '@/types/Card';
|
|
6
|
-
import {
|
|
7
|
-
|
|
6
|
+
import {
|
|
7
|
+
argTypeBooleanUnrequired,
|
|
8
|
+
click,
|
|
9
|
+
doSomething,
|
|
10
|
+
formatArgType,
|
|
11
|
+
parameters,
|
|
12
|
+
prependNoneAsUndefined,
|
|
13
|
+
} from '@/utilities/storybook';
|
|
8
14
|
|
|
9
15
|
const TYPE_CARD = prependNoneAsUndefined(STANDARD_TYPE_CARD);
|
|
10
16
|
const POSITION_CARD_ICON = prependNoneAsUndefined(STANDARD_POSITION_CARD_ICON);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ICON as STANDARD_ICON } from '@/types/Icon';
|
|
2
|
-
import { ICON_REALM as STANDARD_ICON_REALM } from '@/types/Icon';
|
|
1
|
+
import { ICON as STANDARD_ICON, ICON_REALM as STANDARD_ICON_REALM } from '@/types/Icon';
|
|
3
2
|
import * as STANDARD_SIZE from '@/types/Size';
|
|
4
3
|
import TideIcon from '@/components/TideIcon.vue';
|
|
5
4
|
import { formatArgType, parameters, prependNoneAsUndefined } from '@/utilities/storybook';
|
package/src/types/Field.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FormValueTransformer } from '@/types/Form';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SelectOption, SelectOptionGroup } from '@/types/Select';
|
|
3
3
|
import type { TextInputType } from '@/types/TextInput';
|
|
4
4
|
import type { ValidationError, Validator } from '@/types/Validation';
|
|
5
5
|
|
package/src/types/Form.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { SelectOption, SelectOptionGroup } from '@/types/Select';
|
|
2
2
|
import type { TextInputType } from '@/types/TextInput';
|
|
3
3
|
import type { ValidationError, Validator } from '@/types/Validation';
|
|
4
4
|
|
package/src/types/Icon.ts
CHANGED
package/src/types/Size.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ArgTypes } from '@storybook/vue3';
|
|
1
|
+
import type { ArgTypes, StoryContext } from '@storybook/vue3';
|
|
2
2
|
|
|
3
|
-
import { BOOLEAN, BOOLEAN_UNREQUIRED } from '@/types/Storybook';
|
|
3
|
+
import { BOOLEAN, BOOLEAN_UNREQUIRED, NoneAsEmpty, NoneAsUndefined } from '@/types/Storybook';
|
|
4
4
|
import { CSS } from '@/types/Styles';
|
|
5
5
|
import { ELEMENT, ELEMENT_TEXT_AS_ICON } from '@/types/Element';
|
|
6
6
|
|
|
@@ -12,10 +12,7 @@ type KeyValueNamed = {
|
|
|
12
12
|
[key: string]: KeyValue;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
import type { StoryContext } from '@storybook/vue3';
|
|
16
|
-
|
|
17
15
|
import { formatKebabCase } from '@/utilities/format';
|
|
18
|
-
import { NoneAsEmpty, NoneAsUndefined } from '@/types/Storybook';
|
|
19
16
|
|
|
20
17
|
export const lineBreak = '\r';
|
|
21
18
|
export const tab = ' ';
|
package/vite-env.d.ts
ADDED
package/vite.config.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import vue from '@vitejs/plugin-vue';
|
|
2
|
+
import svgLoader from 'vite-svg-loader';
|
|
3
|
+
import ViteDts from 'vite-plugin-dts';
|
|
2
4
|
import { defineConfig } from 'vite';
|
|
3
5
|
import { fileURLToPath, URL } from 'node:url';
|
|
4
6
|
import { resolve } from 'path';
|
|
5
|
-
import svgLoader from 'vite-svg-loader';
|
|
6
|
-
import ViteDts from 'vite-plugin-dts';
|
|
7
7
|
|
|
8
8
|
// https://vitejs.dev/config/
|
|
9
9
|
export default defineConfig({
|