Skip to content

Commit aa6d259

Browse files
authored
refactor(components): dlt-3196 components to pascal case (#1255)
1 parent 4cd6433 commit aa6d259

1,098 files changed

Lines changed: 76703 additions & 76702 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/dialtone-css/postcss/dialtone-docs.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function generateUtilityClassDocumentation (docs, rule) {
164164

165165
if (classNames.length === 0) return;
166166

167-
const values = rule.nodes.map(node => {
167+
const values = rule.nodes.filter(node => node.type === 'decl').map(node => {
168168
const _value = node.value;
169169
const _important = node.important ? ' !important' : '';
170170

packages/dialtone-vue/.storybook/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { setup } from '@storybook/vue3-vite';
4141
import React, { useState, useEffect } from 'react';
4242
import { DocsContainer } from '@storybook/addon-docs/blocks';
4343
import { DARK_MODE_EVENT_NAME } from '@vueless/storybook-dark-mode';
44-
import fixDefaultSlot from '../components/plugins/fixDefaultSlot';
44+
import fixDefaultSlot from '../components/Plugins/FixDefaultSlot';
4545
import { setEmojiAssetUrlSmall, setEmojiAssetUrlLarge, setCustomEmojiUrl, setCustomEmojiJson } from '@/common/emoji';
4646
import customEmojiJson from '@/common/custom-emoji.json';
4747
import { dialtoneDarkTheme, dialtoneLightTheme } from './dialtone-themes.js';
@@ -51,7 +51,7 @@ import { DtScrollbarDirective } from '@/directives/scrollbar_directive';
5151
import { DtModeDirective } from '@/directives/mode_directive';
5252
import { DtFocusgroupDirective } from '@/directives/focusgroup_directive';
5353
import { DtFocustrapDirective } from '@/directives/focustrap_directive';
54-
import { DtStack } from '@/components/stack';
54+
import { DtStack } from '@/components/Stack';
5555
import { faker } from '@faker-js/faker';
5656

5757
let currentContrast = 'default';

packages/dialtone-vue/common/mixins/input_group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { warn } from 'vue';
2-
import { DtValidationMessages } from '@/components/validation_messages';
2+
import { DtValidationMessages } from '@/components/ValidationMessages';
33
import { validationMessageValidator } from '@/common/validators';
44
import {
55
getUniqueString,

packages/dialtone-vue/common/mixins/mode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
getOppositeMode,
44
getRootContrast,
55
findParentMode,
6-
} from '@/components/mode_island/utils';
6+
} from '@/components/ModeIsland/Utils';
77

88
/**
99
* Mixin that adds a `contentMode` prop and computes `modeAttrs` for binding

packages/dialtone-vue/common/mixins/skeleton.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SKELETON_RIPPLE_DURATION } from '@/components/skeleton/skeleton_constants';
1+
import { SKELETON_RIPPLE_DURATION } from '@/components/Skeleton/SkeletonConstants';
22

33
/**
44
* @displayName Skeleton Animation Mixin

packages/dialtone-vue/common/sr_only_close_button.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<script>
1616
import { DtIconClose } from '@dialpad/dialtone-icons/vue';
17-
import { DtButton } from '@/components/button';
17+
import { DtButton } from '@/components/Button';
1818
import { DialtoneLocalization } from '@/localization';
1919
2020
export default {
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
import { createTemplateFromVueFile, getIconNames } from '@/common/storybook_utils';
2+
import DtAvatar from './Avatar.vue';
3+
import { AVATAR_SIZE_MODIFIERS, AVATAR_PRESENCE_STATES } from './AvatarConstants';
4+
import DtAvatarDefaultTemplate from './AvatarDefault.story.vue';
5+
import DtAvatarVariantsTemplate from './AvatarVariants.story.vue';
6+
import { action } from 'storybook/actions';
7+
8+
import defaultImage from '@/common/assets/avatar2.png';
9+
10+
const ICONS_LIST = getIconNames();
11+
12+
export const argsData = {
13+
onClick: action('click'),
14+
size: 300,
15+
presence: null,
16+
fullName: 'Jaqueline Nackos',
17+
imageAlt: 'profile image',
18+
imageSrc: defaultImage,
19+
seed: '',
20+
iconName: 'accessibility',
21+
iconSize: '500',
22+
};
23+
24+
export const argTypesData = {
25+
// Props
26+
avatarClass: {
27+
description: 'Pass through classes. Used to customize the avatar container',
28+
},
29+
color: {
30+
control: {
31+
type: 'text',
32+
},
33+
description: 'Legacy color prop. Use seed instead for auto-generated colors.',
34+
},
35+
iconName: {
36+
options: ICONS_LIST,
37+
control: {
38+
type: 'select',
39+
labels: {
40+
undefined: '(empty)',
41+
},
42+
},
43+
},
44+
iconSize: {
45+
defaultValue: null,
46+
},
47+
id: {
48+
table: {
49+
defaultValue: {
50+
summary: 'generated unique ID',
51+
},
52+
},
53+
},
54+
overlayClass: {
55+
description: 'Pass through classes. Used to customize the avatar overlay',
56+
},
57+
overlayIcon: {
58+
options: ICONS_LIST,
59+
control: {
60+
type: 'select',
61+
labels: {
62+
undefined: '(empty)',
63+
},
64+
},
65+
},
66+
overlayText: {
67+
description: 'The text that overlays the avatar',
68+
},
69+
presence: {
70+
defaultValue: null,
71+
control: {
72+
type: 'select',
73+
},
74+
options: Object.values(AVATAR_PRESENCE_STATES),
75+
table: {
76+
defaultValue: {
77+
summary: 'null',
78+
},
79+
},
80+
},
81+
presenceProps: {
82+
description: 'Pass through props. Used to customize the presence component',
83+
},
84+
size: {
85+
control: {
86+
type: 'select',
87+
},
88+
options: Object.keys(AVATAR_SIZE_MODIFIERS),
89+
},
90+
91+
// Action Event Handlers
92+
onClick: {
93+
table: {
94+
disable: true,
95+
},
96+
},
97+
};
98+
99+
// Story Collection
100+
export default {
101+
title: 'Components/Avatar',
102+
component: DtAvatar,
103+
args: argsData,
104+
argTypes: argTypesData,
105+
excludeStories: /.*Data$/,
106+
};
107+
108+
// Templates
109+
const DefaultTemplate = (args, { argTypes }) =>
110+
createTemplateFromVueFile(args, argTypes, DtAvatarDefaultTemplate);
111+
112+
const VariantsTemplate = (args, { argTypes }) =>
113+
createTemplateFromVueFile(args, argTypes, DtAvatarVariantsTemplate);
114+
115+
// Stories
116+
export const Default = {
117+
render: DefaultTemplate,
118+
decorators: [
119+
() => ({
120+
template: `<dt-stack direction="row"><story /></dt-stack>`,
121+
}),
122+
],
123+
};
124+
125+
export const Variants = {
126+
render: VariantsTemplate,
127+
parameters: {
128+
percy: {
129+
args: {
130+
seed: 'seed',
131+
},
132+
},
133+
options: { showPanel: false },
134+
controls: { disable: true },
135+
},
136+
};

0 commit comments

Comments
 (0)