From 96c6be1d59b48b873bc2f9778bb4306ca9c06ece Mon Sep 17 00:00:00 2001 From: GitHub Date: Sat, 4 May 2024 21:07:53 +0000 Subject: [PATCH] Fixing build (#255) --- docs/package.json | 2 + docs/src/components/alert/fb-alert.mdx | 39 +- .../components/alert/fb-alert.stories.scss | 14 +- docs/src/components/alert/fb-alert.stories.ts | 404 ++-- docs/src/components/app-bar/fb-app-bar.mdx | 9 +- .../components/app-bar/fb-app-bar.stories.ts | 66 +- docs/src/components/badge/fb-badge.mdx | 24 +- .../components/badge/fb-badge.stories.scss | 8 +- docs/src/components/badge/fb-badge.stories.ts | 274 +-- .../fb-bottom-navigation.mdx | 9 +- .../fb-bottom-navigation.stories.ts | 56 +- .../components/breadcrumb/fb-breadcrumb.mdx | 4 +- .../breadcrumb/fb-breadcrumb.stories.scss | 4 +- .../breadcrumb/fb-breadcrumb.stories.ts | 72 +- docs/src/components/button/fb-button.mdx | 64 +- .../components/button/fb-button.stories.scss | 42 +- .../components/button/fb-button.stories.ts | 804 ++++---- docs/src/components/card/fb-card.mdx | 8 +- docs/src/components/card/fb-card.stories.scss | 40 +- docs/src/components/card/fb-card.stories.ts | 532 ++--- docs/src/components/checkbox/fb-checkbox.mdx | 39 +- .../checkbox/fb-checkbox.stories.scss | 14 +- .../checkbox/fb-checkbox.stories.ts | 388 ++-- .../fb-component-loading-error.stories.ts | 66 +- .../fb-component-loading.stories.ts | 66 +- docs/src/components/divider/fb-divider.mdx | 4 +- .../divider/fb-divider.stories.scss | 8 +- .../components/divider/fb-divider.stories.ts | 214 +- docs/src/components/drawer/fb-drawer.mdx | 4 +- .../components/drawer/fb-drawer.stories.scss | 32 +- .../components/drawer/fb-drawer.stories.ts | 500 ++--- .../icon-with-child/fb-icon-with-child.mdx | 4 +- .../fb-icon-with-child.stories.scss | 22 +- .../fb-icon-with-child.stories.ts | 130 +- .../input-number/fb-input-number.mdx | 39 +- .../input-number/fb-input-number.stories.scss | 6 +- .../input-number/fb-input-number.stories.ts | 310 +-- docs/src/components/input/fb-input.mdx | 59 +- .../components/input/fb-input.stories.scss | 58 +- docs/src/components/input/fb-input.stories.ts | 482 ++--- docs/src/components/list/fb-list.mdx | 14 +- docs/src/components/list/fb-list.stories.ts | 110 +- .../components/loading-box/fb-loading-box.mdx | 14 +- .../loading-box/fb-loading-box.stories.scss | 12 +- .../loading-box/fb-loading-box.stories.ts | 238 +-- .../components/media-item/fb-media-item.mdx | 9 +- .../media-item/fb-media-item.stories.ts | 182 +- docs/src/components/menu/fb-menu.mdx | 4 +- docs/src/components/menu/fb-menu.stories.scss | 32 +- docs/src/components/menu/fb-menu.stories.ts | 274 +-- .../components/message-box/fb-message-box.mdx | 24 +- .../message-box/fb-message-box.stories.ts | 398 ++-- docs/src/components/message/fb-message.mdx | 40 +- .../components/message/fb-message.stories.ts | 334 ++-- docs/src/components/modal/fb-modal.mdx | 9 +- .../components/modal/fb-modal.stories.scss | 14 +- docs/src/components/modal/fb-modal.stories.ts | 1156 +++++------ docs/src/components/radio/fb-radio.mdx | 29 +- .../components/radio/fb-radio.stories.scss | 14 +- docs/src/components/radio/fb-radio.stories.ts | 224 +-- docs/src/components/result/fb-result.mdx | 4 +- .../components/result/fb-result.stories.ts | 226 +-- .../src/components/scrollbar/fb-scrollbar.mdx | 4 +- .../scrollbar/fb-scrollbar.stories.scss | 54 +- .../scrollbar/fb-scrollbar.stories.ts | 234 +-- docs/src/components/select/fb-select.mdx | 79 +- .../components/select/fb-select.stories.scss | 166 +- .../components/select/fb-select.stories.ts | 1766 ++++++++--------- docs/src/components/slider/fb-slider.mdx | 49 +- .../components/slider/fb-slider.stories.scss | 20 +- .../components/slider/fb-slider.stories.ts | 470 ++--- docs/src/components/spinner/fb-spinner.mdx | 4 +- .../spinner/fb-spinner.stories.scss | 16 +- .../components/spinner/fb-spinner.stories.ts | 136 +- docs/src/components/swipe/fb-swipe.mdx | 9 +- .../components/swipe/fb-swipe.stories.scss | 90 +- docs/src/components/swipe/fb-swipe.stories.ts | 98 +- docs/src/components/switch/fb-switch.mdx | 4 +- .../components/switch/fb-switch.stories.scss | 40 +- .../components/switch/fb-switch.stories.ts | 756 +++---- docs/src/components/tabs/fb-tabs.mdx | 4 +- docs/src/components/tabs/fb-tabs.stories.scss | 54 +- docs/src/components/tabs/fb-tabs.stories.ts | 674 +++---- docs/src/components/tag/fb-tag.mdx | 4 +- docs/src/components/tag/fb-tag.stories.scss | 30 +- docs/src/components/tag/fb-tag.stories.ts | 466 ++--- docs/src/components/tooltip/fb-tooltip.mdx | 8 +- .../tooltip/fb-tooltip.stories.scss | 100 +- .../components/tooltip/fb-tooltip.stories.ts | 396 ++-- docs/src/stories/colors.scss | 98 +- docs/src/stories/colors.stories.ts | 12 +- docs/src/stories/intro.mdx | 2 +- packages/theme-chalk/src/color/index.scss | 2 +- packages/theme-chalk/src/mixins/_var.scss | 3 +- packages/theme-chalk/src/mixins/function.scss | 6 +- packages/theme-chalk/src/mixins/mixins.scss | 7 +- 96 files changed, 6955 insertions(+), 7187 deletions(-) diff --git a/docs/package.json b/docs/package.json index 678b12b3..d051c37e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -57,6 +57,8 @@ "prettier": "^3.2", "remark-gfm": "^4.0", "rimraf": "^5.0", + "sass": "^1.76", + "sass-loader": "^14.2", "storybook": "^8.0", "storybook-dark-mode": "^4.0", "typescript": "^5.4", diff --git a/docs/src/components/alert/fb-alert.mdx b/docs/src/components/alert/fb-alert.mdx index 11402655..06d64c16 100644 --- a/docs/src/components/alert/fb-alert.mdx +++ b/docs/src/components/alert/fb-alert.mdx @@ -1,5 +1,5 @@ -import { Canvas, Meta, Controls } from '@storybook/blocks'; -import * as AlertStories from './fb-alert.stories'; +import { Canvas, Meta, Controls } from "@storybook/blocks"; +import * as AlertStories from "./fb-alert.stories"; @@ -15,10 +15,7 @@ Displays important alert messages. ## Basic Usage - + ## Theme @@ -26,10 +23,7 @@ Alert provide two different themes, `light` and `dark`. Set `effect` to change theme, default is `light`. - + ## Customizable Close Button @@ -39,10 +33,7 @@ Alert allows you to configure if it's closable. The close button text and closin can be closed or not. It accepts `boolean`, and the default is `false`. You can set `close-text` property to replace the default cross symbol as the close button. Be careful that `close-text` must be a string. `close` event fires when the component is closed. - + ## With Icon @@ -50,19 +41,13 @@ Displaying an icon improves readability. Setting the `show-icon` property displays an icon that corresponds with the current Alert type. - + ## Centered Text Use the `center` property to center the text. - + ## With Description @@ -71,19 +56,13 @@ Description includes a message with more detailed information. Besides the required `title` slot, you can add a `description` slot to help you describe the alert with more details. Description can only store text string, and it will word wrap automatically. - + ## With Icon and Description At last, this is an example with both icon and description. - + --- diff --git a/docs/src/components/alert/fb-alert.stories.scss b/docs/src/components/alert/fb-alert.stories.scss index e8ac3bbc..c7d1091a 100644 --- a/docs/src/components/alert/fb-alert.stories.scss +++ b/docs/src/components/alert/fb-alert.stories.scss @@ -1,11 +1,11 @@ .fb-alert-story-block { - max-width: 600px; + max-width: 600px; - .fb-alert-story-block__item { - margin-bottom: 20px; - } + .fb-alert-story-block__item { + margin-bottom: 20px; + } - .fb-alert-story-block__item:last-child { - margin-bottom: 0; - } + .fb-alert-story-block__item:last-child { + margin-bottom: 0; + } } diff --git a/docs/src/components/alert/fb-alert.stories.ts b/docs/src/components/alert/fb-alert.stories.ts index 0a7b4330..9d7dda25 100644 --- a/docs/src/components/alert/fb-alert.stories.ts +++ b/docs/src/components/alert/fb-alert.stories.ts @@ -1,118 +1,118 @@ -import { Meta, StoryObj } from '@storybook/vue3'; -import { action } from '@storybook/addon-actions'; -import { fn } from '@storybook/test'; -import { FbAlert } from '@fastybird/web-ui-components'; -import { VariantTypes, EffectTypes } from '@fastybird/web-ui-constants'; +import { Meta, StoryObj } from "@storybook/vue3"; +import { action } from "@storybook/addon-actions"; +import { fn } from "@storybook/test"; +import { FbAlert } from "@fastybird/web-ui-components"; +import { VariantTypes, EffectTypes } from "@fastybird/web-ui-constants"; -import './fb-alert.stories.scss'; +import "./fb-alert.stories.scss"; const meta: Meta = { - component: FbAlert, - title: 'Components/Feedback/Alert', - argTypes: { - title: { - type: { name: 'string', required: false }, - control: { type: 'text' }, - description: 'content of the alert title', - table: { - type: { summary: 'string' }, - defaultValue: { summary: '-' }, - }, - }, - description: { - type: { name: 'string', required: false }, - control: { type: 'text' }, - description: 'content of the alert description', - table: { - type: { summary: 'string' }, - defaultValue: { summary: '-' }, - }, - }, - icon: { - type: { name: 'string', required: false }, - control: { type: 'text' }, - description: 'slot for inserting custom icon. this slot will override default component icon', - table: { - type: { summary: 'string' }, - defaultValue: { summary: '-' }, - }, - }, - default: { - type: { name: 'string', required: false }, - control: { type: 'text' }, - description: 'slot for inserting custom content. This slot will override `title` and `description` slots', - table: { - type: { summary: 'string' }, - defaultValue: { summary: '-' }, - }, - }, - variant: { - type: { name: 'string', required: false }, - control: { type: 'select' }, - options: [VariantTypes.DEFAULT, VariantTypes.PRIMARY, VariantTypes.INFO, VariantTypes.SUCCESS, VariantTypes.WARNING, VariantTypes.ERROR], - description: 'alert variant', - table: { - type: { summary: 'string' }, - defaultValue: { summary: VariantTypes.DEFAULT }, - }, - }, - effect: { - type: { name: 'string', required: false }, - control: { type: 'select' }, - options: [EffectTypes.LIGHT, EffectTypes.DARK], - description: 'alert theme style', - table: { - type: { summary: 'string' }, - defaultValue: { summary: EffectTypes.LIGHT }, - }, - }, - center: { - type: { name: 'boolean', required: false }, - control: { type: 'boolean' }, - description: 'whether content is placed in the center', - table: { - type: { summary: 'boolean' }, - defaultValue: { summary: false }, - }, - }, - closable: { - type: { name: 'boolean', required: false }, - control: { type: 'boolean' }, - description: 'whether alert can be dismissed', - table: { - type: { summary: 'boolean' }, - defaultValue: { summary: false }, - }, - }, - closeText: { - type: { name: 'string', required: false }, - control: { type: 'text' }, - description: 'customized close button text', - table: { - type: { summary: 'string' }, - defaultValue: { summary: undefined }, - }, - }, - onClose: { - table: { - disable: true, - }, - }, - }, - args: { - description: - 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nunc massa, sollicitudin eget ex eget, pellentesque ultrices felis.', - variant: VariantTypes.DEFAULT, - effect: EffectTypes.LIGHT, - center: false, - closable: false, - onClose: fn(), - }, - excludeStories: /.*Data$/, + component: FbAlert, + title: "Components/Feedback/Alert", + argTypes: { + title: { + type: { name: "string", required: false }, + control: { type: "text" }, + description: "content of the alert title", + table: { + type: { summary: "string" }, + defaultValue: { summary: "-" }, + }, + }, + description: { + type: { name: "string", required: false }, + control: { type: "text" }, + description: "content of the alert description", + table: { + type: { summary: "string" }, + defaultValue: { summary: "-" }, + }, + }, + icon: { + type: { name: "string", required: false }, + control: { type: "text" }, + description: "slot for inserting custom icon. this slot will override default component icon", + table: { + type: { summary: "string" }, + defaultValue: { summary: "-" }, + }, + }, + default: { + type: { name: "string", required: false }, + control: { type: "text" }, + description: "slot for inserting custom content. This slot will override `title` and `description` slots", + table: { + type: { summary: "string" }, + defaultValue: { summary: "-" }, + }, + }, + variant: { + type: { name: "string", required: false }, + control: { type: "select" }, + options: [VariantTypes.DEFAULT, VariantTypes.PRIMARY, VariantTypes.INFO, VariantTypes.SUCCESS, VariantTypes.WARNING, VariantTypes.ERROR], + description: "alert variant", + table: { + type: { summary: "string" }, + defaultValue: { summary: VariantTypes.DEFAULT }, + }, + }, + effect: { + type: { name: "string", required: false }, + control: { type: "select" }, + options: [EffectTypes.LIGHT, EffectTypes.DARK], + description: "alert theme style", + table: { + type: { summary: "string" }, + defaultValue: { summary: EffectTypes.LIGHT }, + }, + }, + center: { + type: { name: "boolean", required: false }, + control: { type: "boolean" }, + description: "whether content is placed in the center", + table: { + type: { summary: "boolean" }, + defaultValue: { summary: false }, + }, + }, + closable: { + type: { name: "boolean", required: false }, + control: { type: "boolean" }, + description: "whether alert can be dismissed", + table: { + type: { summary: "boolean" }, + defaultValue: { summary: false }, + }, + }, + closeText: { + type: { name: "string", required: false }, + control: { type: "text" }, + description: "customized close button text", + table: { + type: { summary: "string" }, + defaultValue: { summary: undefined }, + }, + }, + onClose: { + table: { + disable: true, + }, + }, + }, + args: { + description: + "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus nunc massa, sollicitudin eget ex eget, pellentesque ultrices felis.", + variant: VariantTypes.DEFAULT, + effect: EffectTypes.LIGHT, + center: false, + closable: false, + onClose: fn(), + }, + excludeStories: /.*Data$/, }; export const actionsData = { - onClose: action('close'), + onClose: action("close"), }; export default meta; @@ -120,17 +120,17 @@ export default meta; type Story = StoryObj; export const Component: Story = { - tags: ['hideInSidebar'], - args: { - description: 'A simple default alert — check it out!', - }, + tags: ["hideInSidebar"], + args: { + description: "A simple default alert — check it out!", + }, }; export const BasicUsage: Story = { - parameters: { - docs: { - source: { - code: ` + parameters: { + docs: { + source: { + code: ` `, - }, - }, - }, - tags: ['hideInSidebar'], - render: () => ({ - components: { FbAlert }, - template: ` + }, + }, + }, + tags: ["hideInSidebar"], + render: () => ({ + components: { FbAlert }, + template: `
@@ -182,14 +182,14 @@ export const BasicUsage: Story = {
`, - }), + }), }; export const Dark: Story = { - parameters: { - docs: { - source: { - code: ` + parameters: { + docs: { + source: { + code: ` `, - }, - }, - }, - tags: ['hideInSidebar'], - render: () => ({ - components: { FbAlert }, - template: ` + }, + }, + }, + tags: ["hideInSidebar"], + render: () => ({ + components: { FbAlert }, + template: `
@@ -241,14 +241,14 @@ export const Dark: Story = {
`, - }), + }), }; export const CloseButton: Story = { - parameters: { - docs: { - source: { - code: ` + parameters: { + docs: { + source: { + code: `