@bethinkpl/design-system 26.14.4 → 26.14.5
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/demo.html +1 -0
- package/dist/design-system.umd.cjs +17 -17
- package/dist/design-system.umd.cjs.map +1 -1
- package/dist/design-system.umd.js +63093 -0
- package/dist/design-system.umd.js.map +1 -0
- package/dist/lib/js/components/BadgeScore/BadgeScore.spec.d.ts +1 -0
- package/dist/lib/js/components/BadgeScore/BadgeScore.stories.d.ts +14 -0
- package/dist/lib/js/components/Badges/Badge/Badge.consts.d.ts +4 -0
- package/dist/lib/js/components/Badges/Badge/Badge.spec.d.ts +1 -0
- package/dist/lib/js/components/Badges/Badge/Badge.stories.d.ts +5 -0
- package/dist/lib/js/components/Badges/Badge/Badge.vue.d.ts +42 -0
- package/dist/lib/js/components/Badges/Badge/index.d.ts +3 -0
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.consts.d.ts +13 -0
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.spec.d.ts +1 -0
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.stories.d.ts +14 -0
- package/dist/lib/js/components/Badges/BadgeScore/BadgeScore.vue.d.ts +66 -0
- package/dist/lib/js/components/Badges/BadgeScore/index.d.ts +3 -0
- package/dist/lib/js/components/Banner/Banner.stories.d.ts +5 -0
- package/dist/lib/js/components/Buttons/Button/Button.spec.d.ts +1 -0
- package/dist/lib/js/components/Buttons/Button/Button.stories.d.ts +5 -0
- package/dist/lib/js/components/Buttons/IconButton/IconButton.stories.d.ts +10 -0
- package/dist/lib/js/components/Cards/Card/Card.spec.d.ts +1 -0
- package/dist/lib/js/components/Cards/Card/Card.stories.d.ts +5 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.spec.d.ts +1 -0
- package/dist/lib/js/components/Cards/CardExpandable/CardExpandable.stories.d.ts +5 -0
- package/dist/lib/js/components/Chip/Chip.consts.d.ts +1 -0
- package/dist/lib/js/components/Chip/Chip.spec.d.ts +1 -0
- package/dist/lib/js/components/Chip/Chip.stories.d.ts +6 -0
- package/dist/lib/js/components/DatePickers/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/lib/js/components/DatePickers/DatePickerBox/DatePickerBox.vue.d.ts +433 -0
- package/dist/lib/js/components/DatePickers/DatePickerBox/index.d.ts +3 -0
- package/dist/lib/js/components/Divider/Divider.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/Drawer.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerContent/DrawerContent.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerDivider/DrawerDivider.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/DrawerHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerHeader/index.d.ts +2 -0
- package/dist/lib/js/components/Drawer/DrawerListItem/DrawerListItem.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerListItemGroup/DrawerListItemGroup.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerSection/DrawerSection.stories.d.ts +5 -0
- package/dist/lib/js/components/Drawer/DrawerTile/DrawerTile.stories.d.ts +5 -0
- package/dist/lib/js/components/Dropdown/Dropdown.stories.d.ts +5 -0
- package/dist/lib/js/components/Form/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/lib/js/components/Form/RadioButton/RadioButton.stories.d.ts +5 -0
- package/dist/lib/js/components/Headers/OverlayHeader/OverlayHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/Headers/PageHeader/PageHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/Headers/SectionHeader/SectionHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/IconText/IconText.stories.d.ts +5 -0
- package/dist/lib/js/components/Icons/FeatureIcon/FeatureIcon.stories.d.ts +5 -0
- package/dist/lib/js/components/Icons/Icon/Icon.stories.d.ts +6 -0
- package/dist/lib/js/components/Image/Image.stories.d.ts +5 -0
- package/dist/lib/js/components/Layouts/ThreeColumnLayout/ThreeColumnLayout.stories.d.ts +5 -0
- package/dist/lib/js/components/LoadingBar/LoadingBar.stories.d.ts +5 -0
- package/dist/lib/js/components/Modal/Modal.spec.d.ts +1 -0
- package/dist/lib/js/components/Modals/Modal/Modal.stories.d.ts +8 -0
- package/dist/lib/js/components/Modals/ModalDialog/ModalDialog.stories.d.ts +7 -0
- package/dist/lib/js/components/NumberInCircle/NumberInCircle.stories.d.ts +5 -0
- package/dist/lib/js/components/Outline/OutlineDivider/OutlineDivider.stories.d.ts +5 -0
- package/dist/lib/js/components/Outline/OutlineItem/OutlineItem.stories.d.ts +5 -0
- package/dist/lib/js/components/Outline/OutlineSectionHeader/OutlineSectionHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.consts.d.ts +7 -0
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/OverlayHeader/OverlayHeader.vue.d.ts +257 -0
- package/dist/lib/js/components/OverlayHeader/index.d.ts +3 -0
- package/dist/lib/js/components/Pagination/Pagination.spec.d.ts +1 -0
- package/dist/lib/js/components/Pagination/Pagination.stories.d.ts +5 -0
- package/dist/lib/js/components/Pill/Pill.consts.d.ts +18 -0
- package/dist/lib/js/components/Pill/Pill.spec.d.ts +1 -0
- package/dist/lib/js/components/Pill/Pill.stories.d.ts +5 -0
- package/dist/lib/js/components/Pill/Pill.vue.d.ts +269 -0
- package/dist/lib/js/components/Pill/index.d.ts +3 -0
- package/dist/lib/js/components/PopOver/PopOver.stories.d.ts +6 -0
- package/dist/lib/js/components/ProgressBar/ProgressBar.stories.d.ts +9 -0
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.spec.d.ts +1 -0
- package/dist/lib/js/components/ProgressDonutChart/ProgressDonutChart.stories.d.ts +5 -0
- package/dist/lib/js/components/RichList/BasicRichListItem/BasicRichListItem.stories.d.ts +6 -0
- package/dist/lib/js/components/RichList/GroupRichListItem/GroupRichListItem.stories.d.ts +6 -0
- package/dist/lib/js/components/RichList/RichListGroupItem/RichListGroupItem.consts.d.ts +24 -0
- package/dist/lib/js/components/RichList/RichListGroupItem/RichListGroupItem.stories.d.ts +12 -0
- package/dist/lib/js/components/RichList/RichListGroupItem/RichListGroupItem.vue.d.ts +26 -0
- package/dist/lib/js/components/RichList/RichListGroupItem/index.d.ts +3 -0
- package/dist/lib/js/components/RichList/RichListItem/RichListItem.stories.d.ts +6 -0
- package/dist/lib/js/components/RichList/RichListItemBasic/RichListItemBasic.stories.d.ts +5 -0
- package/dist/lib/js/components/RichList/RichListItemBasic/RichListItemBasic.vue.d.ts +72 -0
- package/dist/lib/js/components/RichList/RichListItemBasic/index.d.ts +2 -0
- package/dist/lib/js/components/Ripple/Ripple.consts.d.ts +14 -0
- package/dist/lib/js/components/Ripple/Ripple.stories.d.ts +5 -0
- package/dist/lib/js/components/Ripple/Ripple.vue.d.ts +30 -0
- package/dist/lib/js/components/Ripple/index.d.ts +3 -0
- package/dist/lib/js/components/SectionHeader/SectionHeader.consts.d.ts +4 -0
- package/dist/lib/js/components/SectionHeader/SectionHeader.stories.d.ts +5 -0
- package/dist/lib/js/components/SectionHeader/SectionHeader.vue.d.ts +237 -0
- package/dist/lib/js/components/SectionHeader/index.d.ts +3 -0
- package/dist/lib/js/components/SectionTitle/SectionTitle.stories.d.ts +5 -0
- package/dist/lib/js/components/SelectList/SelectList.stories.d.ts +6 -0
- package/dist/lib/js/components/SelectList/SelectListItem/SelectListItem.stories.d.ts +5 -0
- package/dist/lib/js/components/SelectList/SelectListItemDivider/SelectListItemDivider.stories.d.ts +5 -0
- package/dist/lib/js/components/SelectList/SelectListItemTile/SelectListItemTile.stories.d.ts +6 -0
- package/dist/lib/js/components/SelectList/SelectListItemToggle/SelectListItemToggle.stories.d.ts +5 -0
- package/dist/lib/js/components/SelectList/SelectListSectionTitle/SelectListSectionTitle.stories.d.ts +5 -0
- package/dist/lib/js/components/SelectionTile/SelectionTile.stories.d.ts +5 -0
- package/dist/lib/js/components/Skeleton/Skeleton.stories.d.ts +5 -0
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.spec.d.ts +1 -0
- package/dist/lib/js/components/Statuses/AccessStatus/AccessStatus.stories.d.ts +5 -0
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockadeStatus.spec.d.ts +1 -0
- package/dist/lib/js/components/Statuses/BlockadeStatus/BlockedeStatus.stories.d.ts +5 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionOpenEnded/SurveyQuestionOpenEnded.stories.d.ts +5 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.spec.d.ts +1 -0
- package/dist/lib/js/components/SurveyQuestions/SurveyQuestionScale/SurveyQuestionScale.stories.d.ts +7 -0
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.spec.d.ts +1 -0
- package/dist/lib/js/components/SurveyToggle/SurveyToggle.stories.d.ts +5 -0
- package/dist/lib/js/components/Switch/Switch.stories.d.ts +5 -0
- package/dist/lib/js/components/TabItem/TabItem.spec.d.ts +1 -0
- package/dist/lib/js/components/TabItem/TabItem.stories.d.ts +5 -0
- package/dist/lib/js/components/TextGroup/TextGroup.stories.d.ts +5 -0
- package/dist/lib/js/components/Tile/Tile.spec.d.ts +1 -0
- package/dist/lib/js/components/Tile/Tile.stories.d.ts +6 -0
- package/dist/lib/js/components/Toast/Toast.stories.d.ts +5 -0
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.spec.d.ts +1 -0
- package/dist/lib/js/components/Toggles/CounterToggle/CounterToggle.stories.d.ts +5 -0
- package/dist/lib/js/components/Toggles/ToggleButton/ToggleButton.stories.d.ts +5 -0
- package/dist/lib/js/components/Tooltip/Tooltip.stories.d.ts +7 -0
- package/dist/lib/js/components/Well/Well.consts.d.ts +3 -0
- package/dist/lib/js/components/Well/Well.stories.d.ts +5 -0
- package/dist/lib/js/components/Well/Well.vue.d.ts +43 -0
- package/dist/lib/js/styles/Borders/BorderSizes.stories.d.ts +4 -0
- package/dist/lib/js/styles/Colors/Colors.stories.d.ts +5 -0
- package/dist/lib/js/styles/ColorsThemes/ColorsThemes.stories.d.ts +5 -0
- package/dist/lib/js/styles/ColorsTokensLms/ColorsTokensLms.stories.d.ts +5 -0
- package/dist/lib/js/styles/ColorsTokensPrimaryBodywork/ColorsTokensPrimaryBodywork.stories.d.ts +5 -0
- package/dist/lib/js/styles/ColorsTokensPrimaryWnl/ColorsTokensPrimaryWnl.stories.d.ts +5 -0
- package/dist/lib/js/styles/Spacings/Spacings.stories.d.ts +4 -0
- package/dist/lib/js/styles/TypographyTokensLms/TypographyTokensLms.stories.d.ts +5 -0
- package/dist/lib/js/styles/TypographyVariables/TypographyVariables.stories.d.ts +5 -0
- package/dist/lib/js/tests/emptyModule.d.ts +0 -0
- package/dist/lib/js/tests/emptyTransformer.d.ts +0 -0
- package/dist/tools/importers/helpers/modifiers.d.ts +9 -0
- package/dist/tools/importers/helpers/structures.d.ts +68 -0
- package/lib/js/components/Chip/Chip.consts.ts +2 -0
- package/lib/js/components/Chip/Chip.stories.ts +8 -2
- package/lib/js/components/Chip/Chip.vue +2 -1
- package/lib/js/components/Well/Well.consts.ts +4 -0
- package/lib/js/components/Well/Well.stories.ts +49 -4
- package/lib/js/components/Well/Well.vue +57 -22
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Tooltip from './Tooltip.vue';
|
|
2
|
+
import { Meta, StoryFn } from '@storybook/vue3';
|
|
3
|
+
declare const _default: Meta<typeof Tooltip>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Interactive: StoryFn<typeof Tooltip>;
|
|
6
|
+
export declare const OnDsSwitch: StoryFn<typeof Tooltip>;
|
|
7
|
+
export declare const OnDsButton: StoryFn<typeof Tooltip>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WellPadding } from './Well.consts';
|
|
2
|
+
import { ChipRadius, ChipColor } from '../Chip';
|
|
3
|
+
import { IconItem } from '../Icons/Icon';
|
|
4
|
+
|
|
5
|
+
declare function __VLS_template(): {
|
|
6
|
+
chipAccessory?(_: {}): any;
|
|
7
|
+
default?(_: {}): any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
10
|
+
padding?: WellPadding;
|
|
11
|
+
hasChip?: boolean;
|
|
12
|
+
chipLabel?: string;
|
|
13
|
+
chipLabelUppercase?: boolean;
|
|
14
|
+
chipLeftIcon?: IconItem;
|
|
15
|
+
chipRadius?: ChipRadius;
|
|
16
|
+
chipColor?: ChipColor;
|
|
17
|
+
chipColorHex?: string;
|
|
18
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
19
|
+
padding?: WellPadding;
|
|
20
|
+
hasChip?: boolean;
|
|
21
|
+
chipLabel?: string;
|
|
22
|
+
chipLabelUppercase?: boolean;
|
|
23
|
+
chipLeftIcon?: IconItem;
|
|
24
|
+
chipRadius?: ChipRadius;
|
|
25
|
+
chipColor?: ChipColor;
|
|
26
|
+
chipColorHex?: string;
|
|
27
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
31
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
32
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
33
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
34
|
+
} : {
|
|
35
|
+
type: import('vue').PropType<T[K]>;
|
|
36
|
+
required: true;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
40
|
+
new (): {
|
|
41
|
+
$slots: S;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const pascalCase: (str: string) => string;
|
|
2
|
+
export declare const capitalizeFirstLetter: (str: string) => string;
|
|
3
|
+
export declare const camelize: (str: string) => string;
|
|
4
|
+
export declare const kebabize: (str: any) => any;
|
|
5
|
+
export declare const cssFileFirstLine: (isTheme: boolean, themeName: string | undefined) => string;
|
|
6
|
+
export declare const cssFileRootFirstLine: () => string;
|
|
7
|
+
export declare const mixinNameLine: (token: string) => string;
|
|
8
|
+
export declare const tokenAsCssPropertyLine: (token: string) => string;
|
|
9
|
+
export declare const closeBracketLine: () => string;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface Dict<V> {
|
|
2
|
+
[key: string]: V;
|
|
3
|
+
}
|
|
4
|
+
export interface JsonAttributeValues {
|
|
5
|
+
value: string;
|
|
6
|
+
type: string;
|
|
7
|
+
}
|
|
8
|
+
export interface JsonAttribute<JsonAttributeValues> {
|
|
9
|
+
[key: string]: JsonAttributeValues;
|
|
10
|
+
}
|
|
11
|
+
export interface ITokenJsonObject {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
labelFull?: string;
|
|
15
|
+
value: string;
|
|
16
|
+
base?: number | null;
|
|
17
|
+
ratio?: number | null;
|
|
18
|
+
}
|
|
19
|
+
export interface IResultJsonObject {
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
labelFull?: string;
|
|
23
|
+
value: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TypographyBinFiles {
|
|
26
|
+
variablesRaw: {
|
|
27
|
+
destinationVariables: string;
|
|
28
|
+
destinationVariablesCss: string;
|
|
29
|
+
destinationVariablesCssJson: string;
|
|
30
|
+
};
|
|
31
|
+
tokens: {
|
|
32
|
+
destination: string;
|
|
33
|
+
destinationJson: string;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface TypographyConfigFileBin {
|
|
37
|
+
id: string;
|
|
38
|
+
files: TypographyBinFiles;
|
|
39
|
+
}
|
|
40
|
+
export interface TypographyConfigFile {
|
|
41
|
+
destinationPath: string;
|
|
42
|
+
jsonBinApiUrl: string;
|
|
43
|
+
bin: TypographyConfigFileBin;
|
|
44
|
+
}
|
|
45
|
+
export interface ColorsBinFiles {
|
|
46
|
+
variablesRaw: {
|
|
47
|
+
destination: string;
|
|
48
|
+
destinationJson: string;
|
|
49
|
+
};
|
|
50
|
+
tokens: {
|
|
51
|
+
destination: string;
|
|
52
|
+
destinationJson: string;
|
|
53
|
+
destinationVariables: string;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface ColorsConfigFileBin {
|
|
57
|
+
name: string;
|
|
58
|
+
id: string;
|
|
59
|
+
files: ColorsBinFiles;
|
|
60
|
+
isTheme: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface ITypographyToken {
|
|
63
|
+
id: string;
|
|
64
|
+
category: string;
|
|
65
|
+
token: string;
|
|
66
|
+
attributes: Array<string>;
|
|
67
|
+
attributesRaw: Array<Object>;
|
|
68
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import Chip from './Chip.vue';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
CHIP_COLORS,
|
|
4
|
+
CHIP_DEFAULT_COLOR,
|
|
5
|
+
CHIP_RADIUSES,
|
|
6
|
+
CHIP_SIZES,
|
|
7
|
+
CHIP_STATES,
|
|
8
|
+
} from './Chip.consts';
|
|
3
9
|
import { ICONS } from '../Icons/Icon';
|
|
4
10
|
import LogoBadge from '../../../images/logo-badge.svg';
|
|
5
11
|
import { Args, ArgTypes, Meta, StoryFn } from '@storybook/vue3';
|
|
@@ -55,7 +61,7 @@ const args = {
|
|
|
55
61
|
leftIcon: null,
|
|
56
62
|
radius: CHIP_RADIUSES.CAPSULE,
|
|
57
63
|
size: CHIP_SIZES.SMALL,
|
|
58
|
-
color:
|
|
64
|
+
color: CHIP_DEFAULT_COLOR,
|
|
59
65
|
colorHex: '',
|
|
60
66
|
isRemovable: false,
|
|
61
67
|
state: CHIP_STATES.DEFAULT,
|
|
@@ -251,6 +251,7 @@ import {
|
|
|
251
251
|
CHIP_RADIUSES,
|
|
252
252
|
CHIP_SIZES,
|
|
253
253
|
CHIP_STATES,
|
|
254
|
+
CHIP_DEFAULT_COLOR,
|
|
254
255
|
ChipColor,
|
|
255
256
|
ChipRadius,
|
|
256
257
|
ChipSize,
|
|
@@ -304,7 +305,7 @@ export default defineComponent({
|
|
|
304
305
|
},
|
|
305
306
|
color: {
|
|
306
307
|
type: String,
|
|
307
|
-
default:
|
|
308
|
+
default: CHIP_DEFAULT_COLOR,
|
|
308
309
|
validator(color: ChipColor) {
|
|
309
310
|
return Object.values(CHIP_COLORS).includes(color);
|
|
310
311
|
},
|
|
@@ -4,18 +4,39 @@ import { Args, ArgTypes, Meta, StoryObj } from '@storybook/vue3';
|
|
|
4
4
|
import Well from './Well.vue';
|
|
5
5
|
import { WELL_PADDINGS } from './Well.consts';
|
|
6
6
|
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
7
|
+
import { ICONS } from '../Icons/Icon';
|
|
8
|
+
import { CHIP_COLORS, CHIP_DEFAULT_COLOR, CHIP_RADIUSES } from '../Chip';
|
|
9
|
+
import DsBanner, { BANNER_COLORS } from '../Banner';
|
|
7
10
|
|
|
8
11
|
type WellProps = ComponentProps<typeof Well>;
|
|
9
12
|
|
|
13
|
+
function wrapWithContainer(template: string): string {
|
|
14
|
+
// line-height: 0; is to remove extra space below the badge (as it's an inline element)
|
|
15
|
+
return `<div style="display: inline-flex; flex-direction: column; width: 100%; gap: 20px;">${template}
|
|
16
|
+
<ds-banner :color="BANNER_COLORS.WARNING" title="Taka kombinacja jest niezgodna z design systemem!" v-if="invalidUsage" /></div>
|
|
17
|
+
`;
|
|
18
|
+
}
|
|
19
|
+
|
|
10
20
|
const meta: Meta<WellProps> = {
|
|
11
21
|
title: 'Components/Well',
|
|
12
22
|
component: Well,
|
|
13
23
|
render: (args) => ({
|
|
14
|
-
components: { Well },
|
|
24
|
+
components: { Well, DsBanner },
|
|
15
25
|
setup() {
|
|
16
|
-
return {
|
|
26
|
+
return {
|
|
27
|
+
args,
|
|
28
|
+
ICONS,
|
|
29
|
+
BANNER_COLORS,
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
template: wrapWithContainer(
|
|
33
|
+
'<well v-bind="args" :chip-left-icon="ICONS[args.chipLeftIcon]"><div v-html="args.content" /></well>',
|
|
34
|
+
),
|
|
35
|
+
computed: {
|
|
36
|
+
invalidUsage() {
|
|
37
|
+
return args.hasChip && !args.padding;
|
|
38
|
+
},
|
|
17
39
|
},
|
|
18
|
-
template: '<well v-bind="args"><div v-html="args.content" /></well>',
|
|
19
40
|
}),
|
|
20
41
|
argTypes: {
|
|
21
42
|
padding: {
|
|
@@ -29,7 +50,7 @@ const meta: Meta<WellProps> = {
|
|
|
29
50
|
parameters: {
|
|
30
51
|
design: {
|
|
31
52
|
type: 'figma',
|
|
32
|
-
url: 'https://www.figma.com/
|
|
53
|
+
url: 'https://www.figma.com/design/izQdYyiBR1GQgFkaOIfIJI/LMS---DS-Components?node-id=13194-76861&p=f&m=dev',
|
|
33
54
|
},
|
|
34
55
|
},
|
|
35
56
|
};
|
|
@@ -43,5 +64,29 @@ export const Interactive: Story = {
|
|
|
43
64
|
content:
|
|
44
65
|
'<h3 style="margin-top: 0">Content</h3>' +
|
|
45
66
|
'Voluptatem saepe suscipit optio et delectus esse sed velit. Autem maxime soluta aliquam perspiciatis quidem dolor saepe rerum.',
|
|
67
|
+
hasChip: false,
|
|
68
|
+
chipLabel: 'Chip z labelem',
|
|
69
|
+
chipLabelUppercase: false,
|
|
70
|
+
chipLeftIcon: null,
|
|
71
|
+
chipRadius: CHIP_RADIUSES.ROUNDED,
|
|
72
|
+
color: CHIP_DEFAULT_COLOR,
|
|
73
|
+
colorHex: '',
|
|
46
74
|
} as Args,
|
|
47
75
|
};
|
|
76
|
+
|
|
77
|
+
const argTypes = {
|
|
78
|
+
chipLeftIcon: {
|
|
79
|
+
control: 'select',
|
|
80
|
+
options: [null, ...Object.keys(ICONS)],
|
|
81
|
+
},
|
|
82
|
+
chipColor: {
|
|
83
|
+
control: 'select',
|
|
84
|
+
options: Object.values(CHIP_COLORS),
|
|
85
|
+
},
|
|
86
|
+
chipRadius: {
|
|
87
|
+
control: 'select',
|
|
88
|
+
options: Object.values(CHIP_RADIUSES),
|
|
89
|
+
},
|
|
90
|
+
} as ArgTypes;
|
|
91
|
+
|
|
92
|
+
Interactive.argTypes = argTypes;
|
|
@@ -6,6 +6,21 @@
|
|
|
6
6
|
'-ds-small': WELL_PADDINGS.SMALL === padding,
|
|
7
7
|
}"
|
|
8
8
|
>
|
|
9
|
+
<div v-if="hasChip" class="ds-well__chipContainer">
|
|
10
|
+
<chip
|
|
11
|
+
:label="chipLabel"
|
|
12
|
+
:is-label-uppercase="chipLabelUppercase"
|
|
13
|
+
:left-icon="chipLeftIcon"
|
|
14
|
+
:radius="chipRadius"
|
|
15
|
+
:color="chipColor"
|
|
16
|
+
:color-hex="chipColorHex"
|
|
17
|
+
>
|
|
18
|
+
<template v-if="$slots.chipAccessory" #accessory>
|
|
19
|
+
<slot name="chipAccessory" />
|
|
20
|
+
</template>
|
|
21
|
+
</chip>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
9
24
|
<slot />
|
|
10
25
|
</div>
|
|
11
26
|
</template>
|
|
@@ -16,39 +31,59 @@
|
|
|
16
31
|
@import '../../../styles/settings/colors/tokens';
|
|
17
32
|
|
|
18
33
|
.ds-well {
|
|
34
|
+
$root: &;
|
|
35
|
+
|
|
19
36
|
background-color: $color-neutral-background;
|
|
20
37
|
border-radius: $radius-m;
|
|
38
|
+
position: relative;
|
|
39
|
+
|
|
40
|
+
&__chipContainer {
|
|
41
|
+
display: flex;
|
|
42
|
+
position: absolute;
|
|
43
|
+
right: 0;
|
|
44
|
+
top: -10px;
|
|
45
|
+
}
|
|
21
46
|
|
|
22
47
|
&.-ds-medium {
|
|
23
48
|
padding: $space-s;
|
|
49
|
+
|
|
50
|
+
#{$root}__chipContainer {
|
|
51
|
+
right: $space-s;
|
|
52
|
+
}
|
|
24
53
|
}
|
|
25
54
|
|
|
26
55
|
&.-ds-small {
|
|
27
56
|
padding: $space-xs;
|
|
57
|
+
|
|
58
|
+
#{$root}__chipContainer {
|
|
59
|
+
right: $space-xs;
|
|
60
|
+
}
|
|
28
61
|
}
|
|
29
62
|
}
|
|
30
63
|
</style>
|
|
31
64
|
|
|
32
|
-
<script>
|
|
33
|
-
import { WELL_PADDINGS } from './Well.consts';
|
|
34
|
-
|
|
35
|
-
import {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
65
|
+
<script lang="ts" setup>
|
|
66
|
+
import { WELL_PADDINGS, WellPadding } from './Well.consts';
|
|
67
|
+
import Chip, { CHIP_DEFAULT_COLOR, CHIP_RADIUSES, ChipRadius, ChipColor } from '../Chip';
|
|
68
|
+
import { IconItem } from '../Icons/Icon';
|
|
69
|
+
|
|
70
|
+
const {
|
|
71
|
+
padding = null,
|
|
72
|
+
hasChip = false,
|
|
73
|
+
chipLabel,
|
|
74
|
+
chipLabelUppercase = false,
|
|
75
|
+
chipLeftIcon = null,
|
|
76
|
+
chipRadius = CHIP_RADIUSES.ROUNDED,
|
|
77
|
+
chipColor = CHIP_DEFAULT_COLOR,
|
|
78
|
+
chipColorHex,
|
|
79
|
+
} = defineProps<{
|
|
80
|
+
padding?: WellPadding;
|
|
81
|
+
hasChip?: boolean;
|
|
82
|
+
chipLabel?: string;
|
|
83
|
+
chipLabelUppercase?: boolean;
|
|
84
|
+
chipLeftIcon?: IconItem;
|
|
85
|
+
chipRadius?: ChipRadius;
|
|
86
|
+
chipColor?: ChipColor;
|
|
87
|
+
chipColorHex?: string;
|
|
88
|
+
}>();
|
|
54
89
|
</script>
|