@ya-accelerators/nextjs-framework 0.0.99 → 0.0.101
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/constants.d.ts +4 -0
- package/dist/constants.js +4 -0
- package/dist/constants.js.map +1 -1
- package/dist/env.client.d.ts +2 -2
- package/dist/env.client.js +1 -1
- package/dist/env.client.js.map +1 -1
- package/dist/env.d.ts +2 -2
- package/dist/env.js +1 -5
- package/dist/env.js.map +1 -1
- package/dist/hooks/anchor/index.d.ts +13 -0
- package/dist/hooks/anchor/index.js +65 -0
- package/dist/hooks/anchor/index.js.map +1 -0
- package/dist/hooks/date/index.js.map +1 -1
- package/dist/hooks/loading/index.jsx +1 -1
- package/dist/hooks/loading/index.jsx.map +1 -1
- package/dist/hooks/modal/index.d.ts +1 -1
- package/dist/hooks/modal/index.jsx +1 -1
- package/dist/hooks/modal/index.jsx.map +1 -1
- package/dist/hooks/mounted/index.js +0 -4
- package/dist/hooks/mounted/index.js.map +1 -1
- package/dist/hooks/toast/index.d.ts +3 -1
- package/dist/hooks/toast/index.jsx +9 -9
- package/dist/hooks/toast/index.jsx.map +1 -1
- package/dist/hooks/uploads/index.d.ts +41 -0
- package/dist/hooks/uploads/index.js +174 -0
- package/dist/hooks/uploads/index.js.map +1 -0
- package/dist/i18n/get-message-fallback.d.ts +0 -1
- package/dist/i18n/get-message-fallback.js +0 -1
- package/dist/i18n/get-message-fallback.js.map +1 -1
- package/dist/i18n/index.js +1 -4
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/strings/ja-JP.json +12 -4
- package/dist/lib/cookie/index.d.ts +1 -1
- package/dist/lib/cookie/index.js +0 -1
- package/dist/lib/cookie/index.js.map +1 -1
- package/dist/lib/next-auth/index.js +0 -11
- package/dist/lib/next-auth/index.js.map +1 -1
- package/dist/lib/trpc/index.d.ts +3 -2
- package/dist/lib/trpc/index.js +39 -11
- package/dist/lib/trpc/index.js.map +1 -1
- package/dist/lib/uploads/index.js +14 -18
- package/dist/lib/uploads/index.js.map +1 -1
- package/dist/logger/index.d.ts +2 -1
- package/dist/logger/index.js +0 -6
- package/dist/logger/index.js.map +1 -1
- package/dist/styles/globals.css +77 -0
- package/dist/styles/tailwind.config.d.ts +365 -359
- package/dist/styles/tailwind.config.js +25 -20
- package/dist/styles/tailwind.config.js.map +1 -1
- package/dist/styles/tailwind.config.ts +28 -21
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/component/button/base.d.ts +4 -4
- package/dist/ui/component/button/base.jsx +5 -5
- package/dist/ui/component/button/base.jsx.map +1 -1
- package/dist/ui/component/button/colored/index.d.ts +2 -2
- package/dist/ui/component/button/image/index.d.ts +2 -2
- package/dist/ui/component/button/index.d.ts +4 -9
- package/dist/ui/component/button/index.jsx +0 -5
- package/dist/ui/component/button/index.jsx.map +1 -1
- package/dist/ui/component/card/index.jsx +1 -1
- package/dist/ui/component/card/index.jsx.map +1 -1
- package/dist/ui/component/icon/index.d.ts +2 -2
- package/dist/ui/component/index.d.ts +72 -75
- package/dist/ui/component/index.js +4 -4
- package/dist/ui/component/index.js.map +1 -1
- package/dist/ui/component/progressBar/index.d.ts +9 -0
- package/dist/ui/component/progressBar/index.jsx +15 -0
- package/dist/ui/component/progressBar/index.jsx.map +1 -0
- package/dist/ui/component/skeleton/index.d.ts +10 -0
- package/dist/ui/component/skeleton/index.jsx +35 -0
- package/dist/ui/component/skeleton/index.jsx.map +1 -0
- package/dist/ui/component/typography/H1/index.d.ts +2 -3
- package/dist/ui/component/typography/H1/index.jsx +2 -2
- package/dist/ui/component/typography/H1/index.jsx.map +1 -1
- package/dist/ui/component/typography/H2/index.d.ts +2 -3
- package/dist/ui/component/typography/H2/index.jsx +2 -2
- package/dist/ui/component/typography/H2/index.jsx.map +1 -1
- package/dist/ui/component/typography/H3/index.d.ts +2 -3
- package/dist/ui/component/typography/H3/index.jsx +2 -2
- package/dist/ui/component/typography/H3/index.jsx.map +1 -1
- package/dist/ui/component/typography/H4/index.d.ts +2 -3
- package/dist/ui/component/typography/H4/index.jsx +2 -2
- package/dist/ui/component/typography/H4/index.jsx.map +1 -1
- package/dist/ui/component/typography/H5/index.d.ts +2 -3
- package/dist/ui/component/typography/H5/index.jsx +2 -2
- package/dist/ui/component/typography/H5/index.jsx.map +1 -1
- package/dist/ui/component/typography/H6/index.d.ts +2 -3
- package/dist/ui/component/typography/H6/index.jsx +2 -2
- package/dist/ui/component/typography/H6/index.jsx.map +1 -1
- package/dist/ui/component/typography/Label/index.d.ts +2 -3
- package/dist/ui/component/typography/Label/index.jsx +2 -2
- package/dist/ui/component/typography/Label/index.jsx.map +1 -1
- package/dist/ui/component/typography/LinkText/index.d.ts +2 -3
- package/dist/ui/component/typography/LinkText/index.jsx +2 -2
- package/dist/ui/component/typography/LinkText/index.jsx.map +1 -1
- package/dist/ui/component/typography/P/index.d.ts +2 -3
- package/dist/ui/component/typography/P/index.jsx +2 -2
- package/dist/ui/component/typography/P/index.jsx.map +1 -1
- package/dist/ui/component/typography/Pre/index.d.ts +2 -3
- package/dist/ui/component/typography/Pre/index.jsx +2 -2
- package/dist/ui/component/typography/Pre/index.jsx.map +1 -1
- package/dist/ui/component/typography/Span/index.d.ts +6 -0
- package/dist/ui/component/typography/Span/index.jsx +12 -0
- package/dist/ui/component/typography/Span/index.jsx.map +1 -0
- package/dist/ui/component/typography/index.d.ts +26 -32
- package/dist/ui/component/typography/index.jsx +2 -0
- package/dist/ui/component/typography/index.jsx.map +1 -1
- package/dist/ui/composite/accordion/index.d.ts +12 -0
- package/dist/ui/composite/accordion/index.jsx +29 -0
- package/dist/ui/composite/accordion/index.jsx.map +1 -0
- package/dist/ui/composite/alert/index.d.ts +13 -0
- package/dist/ui/composite/alert/index.jsx +35 -0
- package/dist/ui/composite/alert/index.jsx.map +1 -0
- package/dist/ui/composite/avatar/index.d.ts +9 -0
- package/dist/ui/composite/avatar/index.jsx +25 -0
- package/dist/ui/composite/avatar/index.jsx.map +1 -0
- package/dist/ui/composite/dropdown/index.d.ts +2 -2
- package/dist/ui/composite/dropdown/index.jsx +0 -1
- package/dist/ui/composite/dropdown/index.jsx.map +1 -1
- package/dist/ui/composite/emptyState/index.d.ts +9 -0
- package/dist/ui/composite/emptyState/index.jsx +18 -0
- package/dist/ui/composite/emptyState/index.jsx.map +1 -0
- package/dist/ui/{layout → composite}/form/index.d.ts +4 -5
- package/dist/ui/{layout → composite}/form/index.jsx +31 -43
- package/dist/ui/composite/form/index.jsx.map +1 -0
- package/dist/ui/{layout → composite}/form/renderItem.d.ts +1 -2
- package/dist/ui/{layout → composite}/form/renderItem.jsx +25 -30
- package/dist/ui/composite/form/renderItem.jsx.map +1 -0
- package/dist/ui/composite/index.d.ts +490 -233
- package/dist/ui/composite/index.js +30 -0
- package/dist/ui/composite/index.js.map +1 -1
- package/dist/ui/composite/input/attachment/index.d.ts +18 -0
- package/dist/ui/composite/input/attachment/index.jsx +130 -0
- package/dist/ui/composite/input/attachment/index.jsx.map +1 -0
- package/dist/ui/composite/input/checkbox/index.d.ts +2 -2
- package/dist/ui/composite/input/checkbox/index.jsx +2 -2
- package/dist/ui/composite/input/checkbox/index.jsx.map +1 -1
- package/dist/ui/composite/input/datePicker/index.d.ts +1 -1
- package/dist/ui/composite/input/datePicker/index.jsx +5 -16
- package/dist/ui/composite/input/datePicker/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateRange/index.d.ts +1 -1
- package/dist/ui/composite/input/dateRange/index.jsx +1 -3
- package/dist/ui/composite/input/dateRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateTimePicker/index.jsx +1 -8
- package/dist/ui/composite/input/dateTimePicker/index.jsx.map +1 -1
- package/dist/ui/composite/input/dateTimeRange/index.d.ts +1 -1
- package/dist/ui/composite/input/dateTimeRange/index.jsx +2 -5
- package/dist/ui/composite/input/dateTimeRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/file/index.d.ts +3 -8
- package/dist/ui/composite/input/file/index.jsx +91 -137
- package/dist/ui/composite/input/file/index.jsx.map +1 -1
- package/dist/ui/composite/input/index.d.ts +144 -128
- package/dist/ui/composite/input/index.js +4 -0
- package/dist/ui/composite/input/index.js.map +1 -1
- package/dist/ui/composite/input/list/index.jsx +3 -11
- package/dist/ui/composite/input/list/index.jsx.map +1 -1
- package/dist/ui/composite/input/radio/index.d.ts +2 -2
- package/dist/ui/composite/input/radio/index.jsx +3 -3
- package/dist/ui/composite/input/radio/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/GroupHeading/index.jsx +1 -1
- package/dist/ui/composite/input/select/GroupHeading/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Input/index.jsx +1 -4
- package/dist/ui/composite/input/select/Input/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Option/index.jsx +0 -1
- package/dist/ui/composite/input/select/Option/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/Placeholder/index.jsx +1 -1
- package/dist/ui/composite/input/select/Placeholder/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/SelectContainer/index.jsx +1 -1
- package/dist/ui/composite/input/select/SelectContainer/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/SingleValue/index.jsx +1 -1
- package/dist/ui/composite/input/select/SingleValue/index.jsx.map +1 -1
- package/dist/ui/composite/input/select/index.jsx +0 -2
- package/dist/ui/composite/input/select/index.jsx.map +1 -1
- package/dist/ui/composite/input/switch/index.d.ts +11 -0
- package/dist/ui/composite/input/switch/index.jsx +21 -0
- package/dist/ui/composite/input/switch/index.jsx.map +1 -0
- package/dist/ui/composite/input/text/index.d.ts +1 -1
- package/dist/ui/composite/input/text/index.jsx +1 -1
- package/dist/ui/composite/input/text/index.jsx.map +1 -1
- package/dist/ui/composite/input/textarea/index.d.ts +1 -1
- package/dist/ui/composite/input/textarea/index.jsx +1 -1
- package/dist/ui/composite/input/textarea/index.jsx.map +1 -1
- package/dist/ui/composite/input/timePicker/index.d.ts +1 -1
- package/dist/ui/composite/input/timeRange/index.d.ts +1 -1
- package/dist/ui/composite/input/timeRange/index.jsx +1 -1
- package/dist/ui/composite/input/timeRange/index.jsx.map +1 -1
- package/dist/ui/composite/input/weekDaysSelector/index.d.ts +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.d.ts +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.jsx +1 -1
- package/dist/ui/composite/input/weekdayPicker/index.jsx.map +1 -1
- package/dist/ui/composite/label/index.d.ts +3 -2
- package/dist/ui/composite/label/index.jsx +4 -4
- package/dist/ui/composite/label/index.jsx.map +1 -1
- package/dist/ui/composite/loading/index.jsx.map +1 -0
- package/dist/ui/composite/markdown/codeBlock.d.ts +4 -0
- package/dist/ui/composite/markdown/codeBlock.jsx +67 -0
- package/dist/ui/composite/markdown/codeBlock.jsx.map +1 -0
- package/dist/ui/composite/markdown/index.d.ts +3 -0
- package/dist/ui/composite/markdown/index.jsx +65 -0
- package/dist/ui/composite/markdown/index.jsx.map +1 -0
- package/dist/ui/{component/modal/index.d.ts → composite/modal/card.d.ts} +1 -1
- package/dist/ui/composite/modal/card.jsx +13 -0
- package/dist/ui/composite/modal/card.jsx.map +1 -0
- package/dist/ui/composite/modal/index.d.ts +2 -0
- package/dist/ui/composite/modal/index.jsx +3 -0
- package/dist/ui/composite/modal/index.jsx.map +1 -0
- package/dist/ui/{layout/modal/index.jsx → composite/modal/overlay.jsx} +4 -10
- package/dist/ui/composite/modal/overlay.jsx.map +1 -0
- package/dist/ui/{layout → composite}/object/index.d.ts +2 -3
- package/dist/ui/{layout → composite}/object/index.jsx +50 -24
- package/dist/ui/composite/object/index.jsx.map +1 -0
- package/dist/ui/composite/pageTitle/index.jsx +4 -2
- package/dist/ui/composite/pageTitle/index.jsx.map +1 -1
- package/dist/ui/composite/popover/index.d.ts +12 -0
- package/dist/ui/composite/popover/index.jsx +48 -0
- package/dist/ui/composite/popover/index.jsx.map +1 -0
- package/dist/ui/composite/stepper/index.d.ts +8 -0
- package/dist/ui/composite/stepper/index.jsx +34 -0
- package/dist/ui/composite/stepper/index.jsx.map +1 -0
- package/dist/ui/composite/table/features.d.ts +15 -0
- package/dist/ui/composite/table/features.js +10 -0
- package/dist/ui/composite/table/features.js.map +1 -0
- package/dist/ui/{layout → composite}/table/index.d.ts +4 -9
- package/dist/ui/{layout → composite}/table/index.jsx +10 -23
- package/dist/ui/composite/table/index.jsx.map +1 -0
- package/dist/ui/composite/toast/index.d.ts +18 -0
- package/dist/ui/{layout → composite}/toast/index.jsx +11 -4
- package/dist/ui/composite/toast/index.jsx.map +1 -0
- package/dist/ui/composite/tooltip/index.d.ts +11 -0
- package/dist/ui/composite/tooltip/index.jsx +29 -0
- package/dist/ui/composite/tooltip/index.jsx.map +1 -0
- package/dist/ui/functional/index.d.ts +5 -5
- package/dist/ui/functional/signInForm/index.jsx +1 -1
- package/dist/ui/functional/signInForm/index.jsx.map +1 -1
- package/dist/ui/layout/app/component.jsx +2 -2
- package/dist/ui/layout/app/component.jsx.map +1 -1
- package/dist/ui/layout/drawer/index.d.ts +11 -0
- package/dist/ui/layout/drawer/index.jsx +73 -0
- package/dist/ui/layout/drawer/index.jsx.map +1 -0
- package/dist/ui/layout/index.d.ts +38 -351
- package/dist/ui/layout/index.js +2 -12
- package/dist/ui/layout/index.js.map +1 -1
- package/dist/ui/layout/root/index.d.ts +1 -1
- package/dist/ui/layout/root/index.jsx +1 -2
- package/dist/ui/layout/root/index.jsx.map +1 -1
- package/dist/ui/layout/root/provider/index.jsx +0 -4
- package/dist/ui/layout/root/provider/index.jsx.map +1 -1
- package/dist/ui/layout/tab/component.jsx +3 -3
- package/dist/ui/layout/tab/component.jsx.map +1 -1
- package/dist/ui/layout/tab/content/index.d.ts +1 -1
- package/dist/ui/theme/border/index.d.ts +15 -15
- package/dist/ui/theme/border/index.js.map +1 -1
- package/dist/ui/theme/color/index.d.ts +24 -23
- package/dist/ui/theme/color/index.js +14 -24
- package/dist/ui/theme/color/index.js.map +1 -1
- package/dist/ui/theme/rounded/index.d.ts +6 -5
- package/dist/ui/theme/rounded/index.js +2 -0
- package/dist/ui/theme/rounded/index.js.map +1 -1
- package/dist/ui/theme/size/index.d.ts +8 -8
- package/dist/ui/theme/size/index.js +8 -8
- package/dist/ui/theme/size/index.js.map +1 -1
- package/dist/ui/types/index.d.ts +16 -2
- package/dist/ui/types/index.js +0 -1
- package/dist/ui/types/index.js.map +1 -1
- package/dist/util/date/impl.js +0 -2
- package/dist/util/date/impl.js.map +1 -1
- package/dist/util/date/index.d.ts +7 -7
- package/dist/util/index.js +8 -20
- package/dist/util/index.js.map +1 -1
- package/package.json +7 -6
- package/dist/ui/component/button/text/index.d.ts +0 -11
- package/dist/ui/component/button/text/index.jsx +0 -7
- package/dist/ui/component/button/text/index.jsx.map +0 -1
- package/dist/ui/component/markdown/index.d.ts +0 -4
- package/dist/ui/component/markdown/index.jsx +0 -61
- package/dist/ui/component/markdown/index.jsx.map +0 -1
- package/dist/ui/component/modal/index.jsx +0 -12
- package/dist/ui/component/modal/index.jsx.map +0 -1
- package/dist/ui/layout/form/index.jsx.map +0 -1
- package/dist/ui/layout/form/renderItem.jsx.map +0 -1
- package/dist/ui/layout/loading/index.jsx.map +0 -1
- package/dist/ui/layout/modal/index.jsx.map +0 -1
- package/dist/ui/layout/object/index.jsx.map +0 -1
- package/dist/ui/layout/table/index.jsx.map +0 -1
- package/dist/ui/layout/toast/index.d.ts +0 -7
- package/dist/ui/layout/toast/index.jsx.map +0 -1
- /package/dist/ui/{layout → composite}/loading/index.d.ts +0 -0
- /package/dist/ui/{layout → composite}/loading/index.jsx +0 -0
- /package/dist/ui/{layout/modal/index.d.ts → composite/modal/overlay.d.ts} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const H4 = ({ color = TextColorTypes.main,
|
|
5
|
+
export const H4 = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<h4 className={classNames(className, getTextColorTypeClassName(color
|
|
8
|
+
return (<h4 className={classNames(className, getTextColorTypeClassName(color), 'text-lg', disabled && 'opacity-50')} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</h4>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H4/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H4/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI6B,EAAE,EAAE;IACzC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,EAAE,CACD,SAAS,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,QAAQ,IAAI,YAAY,CAAC,CAAC,CACxG,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,EAAE,CAAC,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { TextColorTypes } from '../../../theme';
|
|
3
|
-
export declare const H5: ({ color,
|
|
3
|
+
export declare const H5: ({ color, disabled, className, children, ...props }: {
|
|
4
4
|
color?: TextColorTypes;
|
|
5
|
-
container?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
} & Omit<ComponentProps<
|
|
6
|
+
} & Omit<ComponentProps<'h5'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const H5 = ({ color = TextColorTypes.main,
|
|
5
|
+
export const H5 = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<h5 className={classNames(className, getTextColorTypeClassName(color
|
|
8
|
+
return (<h5 className={classNames(className, getTextColorTypeClassName(color), 'text-base', disabled && 'opacity-50')} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</h5>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H5/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H5/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI6B,EAAE,EAAE;IACzC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,EAAE,CACD,SAAS,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,QAAQ,IAAI,YAAY,CAAC,CAAC,CAC1G,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,EAAE,CAAC,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { TextColorTypes } from '../../../theme';
|
|
3
|
-
export declare const H6: ({ color,
|
|
3
|
+
export declare const H6: ({ color, disabled, className, children, ...props }: {
|
|
4
4
|
color?: TextColorTypes;
|
|
5
|
-
container?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
} & Omit<ComponentProps<
|
|
6
|
+
} & Omit<ComponentProps<'h6'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const H6 = ({ color = TextColorTypes.main,
|
|
5
|
+
export const H6 = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<h6 className={classNames(className, getTextColorTypeClassName(color
|
|
8
|
+
return (<h6 className={classNames(className, getTextColorTypeClassName(color), 'text-sm', disabled && 'opacity-50')} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</h6>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H6/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/H6/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI6B,EAAE,EAAE;IACzC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,EAAE,CACD,SAAS,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,yBAAyB,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,QAAQ,IAAI,YAAY,CAAC,CAAC,CACxG,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,EAAE,CAAC,CACN,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { TextColorTypes } from '../../../theme';
|
|
3
|
-
export declare const Label: ({ color,
|
|
3
|
+
export declare const Label: ({ color, disabled, className, children, ...props }: {
|
|
4
4
|
color?: TextColorTypes;
|
|
5
|
-
container?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
} & Omit<ComponentProps<
|
|
6
|
+
} & Omit<ComponentProps<'label'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const Label = ({ color = TextColorTypes.main,
|
|
5
|
+
export const Label = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<label className={classNames(getTextColorTypeClassName(color
|
|
8
|
+
return (<label className={classNames(getTextColorTypeClassName(color), 'text-base', 'whitespace-pre-wrap', disabled && 'opacity-50', className)} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</label>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/Label/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EACpB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/Label/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EACpB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAIgC,EAAE,EAAE;IAC5C,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,KAAK,CACJ,SAAS,CAAC,CAAC,UAAU,CACnB,yBAAyB,CAAC,KAAK,CAAC,EAChC,WAAW,EACX,qBAAqB,EACrB,QAAQ,IAAI,YAAY,EACxB,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,KAAK,CAAC,CACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import Link from 'next/link';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
import { TextColorTypes } from '../../../theme';
|
|
4
|
-
export declare const LinkText: ({ color,
|
|
4
|
+
export declare const LinkText: ({ color, disabled, className, children, ...props }: {
|
|
5
5
|
color?: TextColorTypes;
|
|
6
|
-
container?: boolean;
|
|
7
6
|
disabled?: boolean;
|
|
8
|
-
} & Omit<ComponentProps<typeof Link>,
|
|
7
|
+
} & Omit<ComponentProps<typeof Link>, 'color'>) => import("react").JSX.Element;
|
|
@@ -3,10 +3,10 @@ import classNames from 'classnames';
|
|
|
3
3
|
import Link from 'next/link';
|
|
4
4
|
import { useTranslations } from 'next-intl';
|
|
5
5
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
6
|
-
export const LinkText = ({ color = TextColorTypes.main,
|
|
6
|
+
export const LinkText = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
7
7
|
const t = useTranslations();
|
|
8
8
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
9
|
-
return (<Link className={classNames(getTextColorTypeClassName(color
|
|
9
|
+
return (<Link className={classNames(getTextColorTypeClassName(color), 'text-base', 'whitespace-pre-wrap underline', disabled ? 'pointer-events-none cursor-default opacity-50' : 'cursor-pointer hover:opacity-80', className)} {...props}>
|
|
10
10
|
{translatedChildren}
|
|
11
11
|
</Link>);
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/LinkText/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/LinkText/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAIoC,EAAE,EAAE;IAChD,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,UAAU,CACnB,yBAAyB,CAAC,KAAK,CAAC,EAChC,WAAW,EACX,+BAA+B,EAC/B,QAAQ,CAAC,CAAC,CAAC,+CAA+C,CAAC,CAAC,CAAC,iCAAiC,EAC9F,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { TextColorTypes } from '../../../theme';
|
|
3
|
-
export declare const P: ({ color,
|
|
3
|
+
export declare const P: ({ color, disabled, className, children, ...props }: {
|
|
4
4
|
color?: TextColorTypes;
|
|
5
|
-
container?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
} & Omit<ComponentProps<
|
|
6
|
+
} & Omit<ComponentProps<'p'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const P = ({ color = TextColorTypes.main,
|
|
5
|
+
export const P = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<p className={classNames(getTextColorTypeClassName(color
|
|
8
|
+
return (<p className={classNames(getTextColorTypeClassName(color), 'text-base', 'whitespace-pre-wrap', disabled && 'opacity-50', className)} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</p>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/P/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAChB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/P/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAChB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI4B,EAAE,EAAE;IACxC,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,CAAC,CACA,SAAS,CAAC,CAAC,UAAU,CACnB,yBAAyB,CAAC,KAAK,CAAC,EAChC,WAAW,EACX,qBAAqB,EACrB,QAAQ,IAAI,YAAY,EACxB,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,CAAC,CAAC,CACL,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
import { TextColorTypes } from '../../../theme';
|
|
3
|
-
export declare const Pre: ({ color,
|
|
3
|
+
export declare const Pre: ({ color, disabled, className, children, ...props }: {
|
|
4
4
|
color?: TextColorTypes;
|
|
5
|
-
container?: boolean;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
} & Omit<ComponentProps<
|
|
6
|
+
} & Omit<ComponentProps<'pre'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { useTranslations } from 'next-intl';
|
|
4
4
|
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
-
export const Pre = ({ color = TextColorTypes.main,
|
|
5
|
+
export const Pre = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
6
|
const t = useTranslations();
|
|
7
7
|
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
-
return (<pre className={classNames(getTextColorTypeClassName(color
|
|
8
|
+
return (<pre className={classNames(getTextColorTypeClassName(color), 'text-base', 'whitespace-pre-wrap', disabled && 'opacity-50', className)} {...props}>
|
|
9
9
|
{translatedChildren}
|
|
10
10
|
</pre>);
|
|
11
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/Pre/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAClB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/Pre/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAClB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI8B,EAAE,EAAE;IAC1C,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,GAAG,CACF,SAAS,CAAC,CAAC,UAAU,CACnB,yBAAyB,CAAC,KAAK,CAAC,EAChC,WAAW,EACX,qBAAqB,EACrB,QAAQ,IAAI,YAAY,EACxB,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { TextColorTypes } from '../../../theme';
|
|
3
|
+
export declare const Span: ({ color, disabled, className, children, ...props }: {
|
|
4
|
+
color?: TextColorTypes;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
} & Omit<ComponentProps<'span'>, 'color'>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { useTranslations } from 'next-intl';
|
|
4
|
+
import { getTextColorTypeClassName, TextColorTypes } from '../../../theme';
|
|
5
|
+
export const Span = ({ color = TextColorTypes.main, disabled, className, children, ...props }) => {
|
|
6
|
+
const t = useTranslations();
|
|
7
|
+
const translatedChildren = typeof children === 'string' ? t(children) : children;
|
|
8
|
+
return (<span className={classNames(getTextColorTypeClassName(color), 'text-base', 'whitespace-pre-wrap', disabled && 'opacity-50', className)} {...props}>
|
|
9
|
+
{translatedChildren}
|
|
10
|
+
</span>);
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../../src/ui/component/typography/Span/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE1E,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,KAAK,GAAG,cAAc,CAAC,IAAI,EAC3B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAI+B,EAAE,EAAE;IAC3C,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,MAAM,kBAAkB,GAAc,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IAC3F,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,UAAU,CACnB,yBAAyB,CAAC,KAAK,CAAC,EAChC,WAAW,EACX,qBAAqB,EACrB,QAAQ,IAAI,YAAY,EACxB,SAAS,CACV,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,IAAI,CAAC,CACR,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,54 +1,48 @@
|
|
|
1
1
|
export declare const Typography: {
|
|
2
|
-
|
|
2
|
+
H1: ({ color, disabled, className, children, ...props }: {
|
|
3
3
|
color?: import("../..").TextColorTypes;
|
|
4
|
-
container?: boolean;
|
|
5
4
|
disabled?: boolean;
|
|
6
|
-
} & Omit<import("react").ComponentProps<
|
|
7
|
-
|
|
5
|
+
} & Omit<import("react").ComponentProps<'h1'>, 'color'>) => import("react").JSX.Element;
|
|
6
|
+
H2: ({ color, disabled, className, children, ...props }: {
|
|
8
7
|
color?: import("../..").TextColorTypes;
|
|
9
|
-
container?: boolean;
|
|
10
8
|
disabled?: boolean;
|
|
11
|
-
} & Omit<import("react").ComponentProps<
|
|
12
|
-
|
|
9
|
+
} & Omit<import("react").ComponentProps<'h2'>, 'color'>) => import("react").JSX.Element;
|
|
10
|
+
H3: ({ color, disabled, className, children, ...props }: {
|
|
13
11
|
color?: import("../..").TextColorTypes;
|
|
14
|
-
container?: boolean;
|
|
15
12
|
disabled?: boolean;
|
|
16
|
-
} & Omit<import("react").ComponentProps<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
} & Omit<import("react").ComponentProps<'h3'>, 'color'>) => import("react").JSX.Element;
|
|
14
|
+
H4: ({ color, disabled, className, children, ...props }: {
|
|
15
|
+
color?: import("../..").TextColorTypes;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
} & Omit<import("react").ComponentProps<'h4'>, 'color'>) => import("react").JSX.Element;
|
|
18
|
+
H5: ({ color, disabled, className, children, ...props }: {
|
|
20
19
|
color?: import("../..").TextColorTypes;
|
|
21
|
-
container?: boolean;
|
|
22
20
|
disabled?: boolean;
|
|
23
|
-
} & Omit<import("react").ComponentProps<
|
|
24
|
-
H6: ({ color,
|
|
21
|
+
} & Omit<import("react").ComponentProps<'h5'>, 'color'>) => import("react").JSX.Element;
|
|
22
|
+
H6: ({ color, disabled, className, children, ...props }: {
|
|
25
23
|
color?: import("../..").TextColorTypes;
|
|
26
|
-
container?: boolean;
|
|
27
24
|
disabled?: boolean;
|
|
28
|
-
} & Omit<import("react").ComponentProps<
|
|
29
|
-
|
|
25
|
+
} & Omit<import("react").ComponentProps<'h6'>, 'color'>) => import("react").JSX.Element;
|
|
26
|
+
Label: ({ color, disabled, className, children, ...props }: {
|
|
30
27
|
color?: import("../..").TextColorTypes;
|
|
31
|
-
container?: boolean;
|
|
32
28
|
disabled?: boolean;
|
|
33
|
-
} & Omit<import("react").ComponentProps<
|
|
34
|
-
|
|
29
|
+
} & Omit<import("react").ComponentProps<'label'>, 'color'>) => import("react").JSX.Element;
|
|
30
|
+
LinkText: ({ color, disabled, className, children, ...props }: {
|
|
35
31
|
color?: import("../..").TextColorTypes;
|
|
36
|
-
container?: boolean;
|
|
37
32
|
disabled?: boolean;
|
|
38
|
-
} & Omit<import("react").ComponentProps<"
|
|
39
|
-
|
|
33
|
+
} & Omit<import("react").ComponentProps<import("react").ForwardRefExoticComponent<Omit<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, keyof import("next/link").LinkProps<any>> & import("next/link").LinkProps<any> & {
|
|
34
|
+
children?: React.ReactNode | undefined;
|
|
35
|
+
} & import("react").RefAttributes<HTMLAnchorElement>>>, 'color'>) => import("react").JSX.Element;
|
|
36
|
+
P: ({ color, disabled, className, children, ...props }: {
|
|
40
37
|
color?: import("../..").TextColorTypes;
|
|
41
|
-
container?: boolean;
|
|
42
38
|
disabled?: boolean;
|
|
43
|
-
} & Omit<import("react").ComponentProps<
|
|
44
|
-
|
|
39
|
+
} & Omit<import("react").ComponentProps<'p'>, 'color'>) => import("react").JSX.Element;
|
|
40
|
+
Pre: ({ color, disabled, className, children, ...props }: {
|
|
45
41
|
color?: import("../..").TextColorTypes;
|
|
46
|
-
container?: boolean;
|
|
47
42
|
disabled?: boolean;
|
|
48
|
-
} & Omit<import("react").ComponentProps<
|
|
49
|
-
|
|
43
|
+
} & Omit<import("react").ComponentProps<'pre'>, 'color'>) => import("react").JSX.Element;
|
|
44
|
+
Span: ({ color, disabled, className, children, ...props }: {
|
|
50
45
|
color?: import("../..").TextColorTypes;
|
|
51
|
-
container?: boolean;
|
|
52
46
|
disabled?: boolean;
|
|
53
|
-
} & Omit<import("react").ComponentProps<
|
|
47
|
+
} & Omit<import("react").ComponentProps<'span'>, 'color'>) => import("react").JSX.Element;
|
|
54
48
|
};
|
|
@@ -8,6 +8,7 @@ import * as Label from './Label';
|
|
|
8
8
|
import * as LinkText from './LinkText';
|
|
9
9
|
import * as P from './P';
|
|
10
10
|
import * as Pre from './Pre';
|
|
11
|
+
import * as Span from './Span';
|
|
11
12
|
export const Typography = {
|
|
12
13
|
...H1,
|
|
13
14
|
...H2,
|
|
@@ -19,5 +20,6 @@ export const Typography = {
|
|
|
19
20
|
...LinkText,
|
|
20
21
|
...P,
|
|
21
22
|
...Pre,
|
|
23
|
+
...Span,
|
|
22
24
|
};
|
|
23
25
|
//# sourceMappingURL=index.jsx.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/component/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/component/typography/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAA;AAChC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAA;AACtC,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AACxB,OAAO,KAAK,GAAG,MAAM,OAAO,CAAA;AAC5B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAE9B,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE;IACL,GAAG,EAAE;IACL,GAAG,EAAE;IACL,GAAG,EAAE;IACL,GAAG,EAAE;IACL,GAAG,EAAE;IACL,GAAG,KAAK;IACR,GAAG,QAAQ;IACX,GAAG,CAAC;IACJ,GAAG,GAAG;IACN,GAAG,IAAI;CACR,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { Rounded } from '../../theme';
|
|
3
|
+
export declare const Accordion: ({ items, multiple, rounded, className, }: {
|
|
4
|
+
items: {
|
|
5
|
+
label: string;
|
|
6
|
+
content: ReactNode;
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
}[];
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
rounded?: Rounded;
|
|
11
|
+
className?: string;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useTranslations } from 'next-intl';
|
|
5
|
+
import { useId, useState } from 'react';
|
|
6
|
+
import { Component } from '../../component';
|
|
7
|
+
import { BorderColorTypes, BorderWidth, getBorderColorTypeClassName, getRoundedClassName, getTextColorTypeClassName, Rounded, TextColorTypes, } from '../../theme';
|
|
8
|
+
export const Accordion = ({ items, multiple = true, rounded = Rounded.m, className, }) => {
|
|
9
|
+
const t = useTranslations();
|
|
10
|
+
const id = useId();
|
|
11
|
+
const [openIndexes, setOpenIndexes] = useState(items.flatMap((x, i) => (x.defaultOpen === true ? [i] : [])).slice(0, multiple ? undefined : 1));
|
|
12
|
+
return (<div className={classNames('flex w-full flex-col divide-y divide-outline-default overflow-hidden', getBorderColorTypeClassName({
|
|
13
|
+
color: BorderColorTypes.default,
|
|
14
|
+
container: false,
|
|
15
|
+
width: BorderWidth.base,
|
|
16
|
+
type: 'outline',
|
|
17
|
+
}), getRoundedClassName(rounded), className)}>
|
|
18
|
+
{items.map((item, i) => (<div key={i} className='flex flex-col'>
|
|
19
|
+
<button type='button' id={`${id}-header-${i}`} aria-expanded={openIndexes.includes(i)} aria-controls={`${id}-panel-${i}`} className={classNames('clickable flex w-full items-center justify-between gap-control-padding-md p-control-padding-xl text-left text-sm font-bold', getTextColorTypeClassName(TextColorTypes.main))} onClick={() => setOpenIndexes((prev) => (prev.includes(i) ? prev.filter((x) => x !== i) : multiple ? [...prev, i] : [i]))}>
|
|
20
|
+
<span>{t(item.label)}</span>
|
|
21
|
+
<Component.Icon icon={ExpandMoreIcon} className={classNames('size-control-base shrink-0 transition-transform', openIndexes.includes(i) && 'rotate-180')}/>
|
|
22
|
+
</button>
|
|
23
|
+
{openIndexes.includes(i) && (<div id={`${id}-panel-${i}`} role='region' aria-labelledby={`${id}-header-${i}`} className='px-control-padding-xl pb-control-padding-xl text-sm'>
|
|
24
|
+
{item.content}
|
|
25
|
+
</div>)}
|
|
26
|
+
</div>))}
|
|
27
|
+
</div>);
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/composite/accordion/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,cAAc,MAAM,gCAAgC,CAAA;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAC3C,OAAO,EAAkB,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,OAAO,EACP,cAAc,GACf,MAAM,aAAa,CAAA;AAEpB,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,KAAK,EACL,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,OAAO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,CAAC,CAC/C,CAAC,CACF,OAAO,CAAC,CAAC,GAAG,EAAE,CACZ,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3G,CAAC,CAED;YAAA,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAC3B;YAAA,CAAC,SAAS,CAAC,IAAI,CACb,IAAI,CAAC,CAAC,cAAc,CAAC,CACrB,SAAS,CAAC,CAAC,UAAU,CACnB,iDAAiD,EACjD,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,YAAY,CACxC,CAAC,EAEN;UAAA,EAAE,MAAM,CACR;UAAA,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAC1B,CAAC,GAAG,CACF,EAAE,CAAC,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC,CACvB,IAAI,CAAC,QAAQ,CACb,eAAe,CAAC,CAAC,GAAG,EAAE,WAAW,CAAC,EAAE,CAAC,CACrC,SAAS,CAAC,qDAAqD,CAE/D;cAAA,CAAC,IAAI,CAAC,OAAO,CACf;YAAA,EAAE,GAAG,CAAC,CACP,CACH;QAAA,EAAE,GAAG,CAAC,CACP,CAAC,CACJ;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { ColorTypes, Rounded } from '../../theme';
|
|
3
|
+
import type { IconType } from '../../types';
|
|
4
|
+
export declare const Alert: ({ color, title, icon, rounded, actions, onClickClose, className, body, }: {
|
|
5
|
+
color?: ColorTypes;
|
|
6
|
+
title?: string;
|
|
7
|
+
icon?: IconType;
|
|
8
|
+
rounded?: Rounded;
|
|
9
|
+
actions?: ReactNode;
|
|
10
|
+
onClickClose?: () => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
body?: string;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined';
|
|
3
|
+
import CloseIcon from '@mui/icons-material/Close';
|
|
4
|
+
import ErrorOutlinedIcon from '@mui/icons-material/ErrorOutlined';
|
|
5
|
+
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
6
|
+
import WarningAmberIcon from '@mui/icons-material/WarningAmber';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import { useTranslations } from 'next-intl';
|
|
9
|
+
import { Component } from '../../component';
|
|
10
|
+
import { ColorTypes, ControlSize, getColorTypeClassName, getRoundedClassName, Rounded } from '../../theme';
|
|
11
|
+
const defaultIcon = (color) => {
|
|
12
|
+
switch (color) {
|
|
13
|
+
case ColorTypes.error:
|
|
14
|
+
return ErrorOutlinedIcon;
|
|
15
|
+
case ColorTypes.warning:
|
|
16
|
+
return WarningAmberIcon;
|
|
17
|
+
case ColorTypes.success:
|
|
18
|
+
return CheckCircleOutlinedIcon;
|
|
19
|
+
default:
|
|
20
|
+
return InfoOutlinedIcon;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export const Alert = ({ color = ColorTypes.info, title, icon, rounded = Rounded.m, actions, onClickClose, className, body, }) => {
|
|
24
|
+
const t = useTranslations();
|
|
25
|
+
return (<div role={color === ColorTypes.error ? 'alert' : 'status'} className={classNames('flex w-full items-start gap-control-padding-lg p-control-padding-xl text-sm', getColorTypeClassName(color, true), getRoundedClassName(rounded), className)}>
|
|
26
|
+
<Component.Icon icon={icon ?? defaultIcon(color)} className='size-control-base shrink-0'/>
|
|
27
|
+
<div className='flex min-w-0 flex-1 flex-col gap-control-padding-base'>
|
|
28
|
+
{title !== undefined && <div className='font-bold'>{t(title)}</div>}
|
|
29
|
+
{body !== undefined && <div className='whitespace-pre-wrap'>{t(body)}</div>}
|
|
30
|
+
{actions !== undefined && <div className='flex gap-control-padding-md'>{actions}</div>}
|
|
31
|
+
</div>
|
|
32
|
+
{onClickClose !== undefined && (<Component.Button variant='colored' color={color} container={true} size={ControlSize.md} icon={CloseIcon} onClick={onClickClose} className='shrink-0'/>)}
|
|
33
|
+
</div>);
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/composite/alert/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,uBAAuB,MAAM,yCAAyC,CAAA;AAC7E,OAAO,SAAS,MAAM,2BAA2B,CAAA;AACjD,OAAO,iBAAiB,MAAM,mCAAmC,CAAA;AACjE,OAAO,gBAAgB,MAAM,kCAAkC,CAAA;AAC/D,OAAO,gBAAgB,MAAM,kCAAkC,CAAA;AAC/D,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAG1G,MAAM,WAAW,GAAG,CAAC,KAAiB,EAAY,EAAE;IAClD,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,UAAU,CAAC,KAAK;YACnB,OAAO,iBAAiB,CAAA;QAC1B,KAAK,UAAU,CAAC,OAAO;YACrB,OAAO,gBAAgB,CAAA;QACzB,KAAK,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GAAG,CACL;MAAA,CAAC,YAAY,KAAK,SAAS,IAAI,CAC7B,CAAC,SAAS,CAAC,MAAM,CACf,OAAO,CAAC,SAAS,CACjB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,IAAI,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,CACrB,IAAI,CAAC,CAAC,SAAS,CAAC,CAChB,OAAO,CAAC,CAAC,YAAY,CAAC,CACtB,SAAS,CAAC,UAAU,EACpB,CACH,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColorTypes, ControlSize, Rounded } from '../../theme';
|
|
2
|
+
export declare const Avatar: ({ src, name, color, size, rounded, className, }: {
|
|
3
|
+
src?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
color?: ColorTypes;
|
|
6
|
+
size?: ControlSize;
|
|
7
|
+
rounded?: Rounded;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PersonIcon from '@mui/icons-material/Person';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import Image from 'next/image';
|
|
5
|
+
import { Component } from '../../component';
|
|
6
|
+
import { ColorTypes, ControlSize, getColorTypeClassName, getControlSizeClassName, getRoundedClassName, Rounded, } from '../../theme';
|
|
7
|
+
const initialsOf = (name) => {
|
|
8
|
+
const words = name.trim().split(/\s+/).filter(Boolean);
|
|
9
|
+
if (words.length === 0) {
|
|
10
|
+
return '';
|
|
11
|
+
}
|
|
12
|
+
if (words.length === 1) {
|
|
13
|
+
return words[0].slice(0, 2).toUpperCase();
|
|
14
|
+
}
|
|
15
|
+
return `${words[0][0]}${words[words.length - 1][0]}`.toUpperCase();
|
|
16
|
+
};
|
|
17
|
+
export const Avatar = ({ src, name, color = ColorTypes.secondary, size = ControlSize['3xl'], rounded = Rounded.half, className, }) => {
|
|
18
|
+
const initials = name === undefined ? '' : initialsOf(name);
|
|
19
|
+
return (<div title={name} className={classNames('relative flex shrink-0 items-center justify-center overflow-hidden', (size === 'sm' || size === 'md') && 'text-xs', (size === 'base' || size === 'lg') && 'text-sm', (size === 'xl' || size === '2xl') && 'text-base', size === '3xl' && 'text-lg', getControlSizeClassName(size), getColorTypeClassName(color, true), getRoundedClassName(rounded), className)}>
|
|
20
|
+
{src !== undefined ? (<Image src={src} alt={name ?? ''} fill className='object-cover'/>) : initials !== '' ? (<span className='font-bold leading-none'>{initials}</span>) : (<div className='flex size-full items-center justify-center p-control-padding-md'>
|
|
21
|
+
<Component.Icon icon={PersonIcon} className='size-full'/>
|
|
22
|
+
</div>)}
|
|
23
|
+
</div>);
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/composite/avatar/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,UAAU,MAAM,4BAA4B,CAAA;AACnD,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACL,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,OAAO,GACR,MAAM,aAAa,CAAA;AAEpB,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE;IAClC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACtD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAA;IACX,CAAC;IACD,IAAI,KAAK,CAAC,MAA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AC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,cAAc,EAAG,CACnE,CAAC,CAAC,CAAC,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CACpB,CAAC,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAC3D,CAAC,CAAC,CAAC,CACF,CAAC,GAAG,CAAC,SAAS,CAAC,iEAAiE,CAC9E;UAAA,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,WAAW,EACzD;QAAA,EAAE,GAAG,CAAC,CACP,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -4,8 +4,8 @@ import { Rounded } from '../../theme';
|
|
|
4
4
|
import { Button } from '../button';
|
|
5
5
|
export declare const DropDown: ({ button, content, position, menuRounded, menuClassName, disabled, }: {
|
|
6
6
|
button: ComponentProps<typeof Component.Button>;
|
|
7
|
-
content: ReactNode | (ComponentProps<typeof Button> |
|
|
8
|
-
position:
|
|
7
|
+
content: ReactNode | (ComponentProps<typeof Button> | 'divider')[];
|
|
8
|
+
position: 'left' | 'center' | 'right';
|
|
9
9
|
menuRounded?: Rounded;
|
|
10
10
|
menuClassName?: string;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -40,7 +40,6 @@ export const DropDown = ({ button, content, position, menuRounded = Rounded.m, m
|
|
|
40
40
|
setPrevPathname(pathname);
|
|
41
41
|
}
|
|
42
42
|
const [mounted, setMounted] = useState(false);
|
|
43
|
-
// Mount-time side effect is a legitimate case
|
|
44
43
|
useEffect(() => setMounted(true), []);
|
|
45
44
|
if (!mounted) {
|
|
46
45
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/composite/dropdown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AA;gCAC9B,OAAO,CACL,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,sBAAsB,CAC1C;8BAAA,CAAC,MAAM,CACL,IAAI,KAAK,CAAC,CACV,SAAS,CAAC,CAAC,UAAU,CACnB,kDAAkD,EAClD,8BAA8B,EAC9B,+CAA+C,EAC/C,UAAU,EACV,mBAAmB,CAAC,WAAW,CAAC,EAChC,KAAK,CAAC,SAAS,CAChB,CAAC,CACF,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;wCACb,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;4CACvB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;wCACpB,CAAC;wCACD,IAAI,MAAM,EAAE,CAAC;4CACX,UAAU,CAAC,aAAa,EAAE,CAAC,CAAC,CAAA;wCAC9B,CAAC;6CAAM,CAAC;4CACN,aAAa,EAAE,CAAA;wCACjB,CAAC;oCACH,CAAC,CAAC,EAEN;4BAAA,EAAE,EAAE,CAAC,CACN,CAAA;4BACH,CAAC,CAAC,CACN;oBAAA,EAAE,EAAE,CAAC,CACN,CACH;gBAAA,EAAE,SAAS,CAAC,IAAI,CAClB;cAAA,EAAE,GAAG,CAAC,CACP,CACH;UAAA,GAAG,EACH,QAAQ,CAAC,IAAI,CACd,CACL;IAAA,EAAE,GAAG,CAAC,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { IconType } from '../../types';
|
|
3
|
+
export declare const EmptyState: ({ icon, title, message, action, className, }: {
|
|
4
|
+
icon?: IconType;
|
|
5
|
+
title: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
action?: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import InboxOutlinedIcon from '@mui/icons-material/InboxOutlined';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { useTranslations } from 'next-intl';
|
|
5
|
+
import { Component } from '../../component';
|
|
6
|
+
import { getTextColorTypeClassName, TextColorTypes } from '../../theme';
|
|
7
|
+
export const EmptyState = ({ icon = InboxOutlinedIcon, title, message, action, className, }) => {
|
|
8
|
+
const t = useTranslations();
|
|
9
|
+
return (<div className={classNames('flex w-full flex-col items-center justify-center gap-base p-3xl text-center', className)}>
|
|
10
|
+
<Component.Icon icon={icon} className={classNames('size-control-3xl', getTextColorTypeClassName(TextColorTypes.disabled))}/>
|
|
11
|
+
<div className={classNames('font-bold', getTextColorTypeClassName(TextColorTypes.main))}>{t(title)}</div>
|
|
12
|
+
{message !== undefined && (<div className={classNames('text-sm whitespace-pre-wrap', getTextColorTypeClassName(TextColorTypes.sub))}>
|
|
13
|
+
{t(message)}
|
|
14
|
+
</div>)}
|
|
15
|
+
{action}
|
|
16
|
+
</div>);
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.jsx","sourceRoot":"","sources":["../../../../../src/ui/composite/emptyState/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,iBAAiB,MAAM,mCAAmC,CAAA;AACjE,OAAO,UAAU,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAGvE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,GAAG,iBAAiB,EACxB,KAAK,EACL,OAAO,EACP,MAAM,EACN,SAAS,GAOV,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,eAAe,EAAE,CAAA;IAC3B,OAAO,CACL,CAAC,GAAG,C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