brd-ui-kit 0.1.75 → 0.1.76
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/brd-ui-kit.css +1 -1
- package/dist/calendar-B5QCV34E.cjs +2 -0
- package/dist/{calendar-DReGV_22.cjs.map → calendar-B5QCV34E.cjs.map} +1 -1
- package/dist/{calendar-C0DXP3T-.js → calendar-Ba3kHG6w.js} +264 -270
- package/dist/{calendar-C0DXP3T-.js.map → calendar-Ba3kHG6w.js.map} +1 -1
- package/dist/{calendar-locale-CP2pxhFK.cjs → calendar-locale-BHyNJPb2.cjs} +2 -2
- package/dist/{calendar-locale-CP2pxhFK.cjs.map → calendar-locale-BHyNJPb2.cjs.map} +1 -1
- package/dist/{calendar-locale-DJf03PI9.js → calendar-locale-DQ9wj0zF.js} +2 -2
- package/dist/{calendar-locale-DJf03PI9.js.map → calendar-locale-DQ9wj0zF.js.map} +1 -1
- package/dist/chart-9H_9wEfR.cjs +63 -0
- package/dist/{chart-C69jBlXa.cjs.map → chart-9H_9wEfR.cjs.map} +1 -1
- package/dist/{chart-CAPCe8o5.js → chart-DFbmMKiQ.js} +2956 -2951
- package/dist/{chart-CAPCe8o5.js.map → chart-DFbmMKiQ.js.map} +1 -1
- package/dist/components/basic-chart/basic-chart.d.ts +1 -1
- package/dist/components/basic-table/basic-table.d.ts +5 -5
- package/dist/components/data-table/data-table-actions-column.d.ts +3 -3
- package/dist/components/data-table/data-table-bulk-actions.d.ts +3 -3
- package/dist/components/data-table/data-table-column-visibility.d.ts +2 -2
- package/dist/components/data-table/data-table-filter.d.ts +2 -2
- package/dist/components/data-table/data-table-row-actions-column.d.ts +3 -3
- package/dist/components/data-table/use-data-table-editable-rows.d.ts +5 -5
- package/dist/components/input-field/input-field.d.ts +3 -3
- package/dist/components/input-phone/input-phone.d.ts +4 -4
- package/dist/components/popover-modal/popover-modal.d.ts +4 -4
- package/dist/components/select-field/select-field.d.ts +2 -2
- package/dist/components/ui/avatar/avatar.d.ts +7 -7
- package/dist/components/ui/badge/badge.d.ts +2 -2
- package/dist/components/ui/button/button.d.ts +3 -3
- package/dist/components/ui/calendar/calendar.d.ts +6 -6
- package/dist/components/ui/calendar/calendar.styles.d.ts +1 -1
- package/dist/components/ui/card/card.d.ts +13 -13
- package/dist/components/ui/chart/chart.d.ts +23 -21
- package/dist/components/ui/checkbox/checkbox.d.ts +4 -4
- package/dist/components/ui/combobox/combobox.d.ts +6 -6
- package/dist/components/ui/dialog/dialog.d.ts +11 -11
- package/dist/components/ui/drawer/drawer.d.ts +11 -11
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +40 -40
- package/dist/components/ui/icon/icon.d.ts +3 -3
- package/dist/components/ui/input/input.d.ts +2 -2
- package/dist/components/ui/input-group/input-group.d.ts +7 -7
- package/dist/components/ui/label/label.d.ts +4 -4
- package/dist/components/ui/pagination/pagination.d.ts +8 -8
- package/dist/components/ui/popover/popover.d.ts +8 -8
- package/dist/components/ui/progress/progress.d.ts +4 -4
- package/dist/components/ui/radio-group/radio-group.d.ts +7 -7
- package/dist/components/ui/select/select.d.ts +11 -11
- package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +4 -4
- package/dist/components/ui/separator/separator.d.ts +4 -4
- package/dist/components/ui/switch/switch.d.ts +4 -4
- package/dist/components/ui/table/table.d.ts +17 -17
- package/dist/components/ui/tabs/tabs.d.ts +8 -8
- package/dist/components/ui/tooltip/tooltip.d.ts +8 -8
- package/dist/components/ui/typography/typography.d.ts +174 -174
- package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +35 -36
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +3 -3
- package/dist/components-basic-chart-basic-chart.cjs +2 -2
- package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
- package/dist/components-basic-chart-basic-chart.js +106 -108
- package/dist/components-basic-chart-basic-chart.js.map +1 -1
- package/dist/components-basic-table-basic-table.cjs +2 -2
- package/dist/components-basic-table-basic-table.cjs.map +1 -1
- package/dist/components-basic-table-basic-table.js +232 -231
- package/dist/components-basic-table-basic-table.js.map +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-actions-column.js +5 -6
- package/dist/components-data-table-data-table-actions-column.js.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs +1 -1
- package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -1
- package/dist/components-data-table-data-table-bulk-actions.js +9 -9
- package/dist/components-data-table-data-table-bulk-actions.js.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs +1 -1
- package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -1
- package/dist/components-data-table-data-table-column-visibility.js +1 -1
- package/dist/components-data-table-data-table-column-visibility.js.map +1 -1
- package/dist/components-data-table-data-table-filter.cjs +1 -1
- package/dist/components-data-table-data-table-filter.cjs.map +1 -1
- package/dist/components-data-table-data-table-filter.js +15 -15
- package/dist/components-data-table-data-table-filter.js.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs +1 -1
- package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -1
- package/dist/components-data-table-data-table-row-actions-column.js +19 -20
- package/dist/components-data-table-data-table-row-actions-column.js.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -1
- package/dist/components-data-table-use-data-table-editable-rows.js +88 -90
- package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -1
- package/dist/components-input-contact-input-contact.cjs +1 -1
- package/dist/components-input-contact-input-contact.cjs.map +1 -1
- package/dist/components-input-contact-input-contact.js +8 -8
- package/dist/components-input-field-input-field.cjs +1 -1
- package/dist/components-input-field-input-field.cjs.map +1 -1
- package/dist/components-input-field-input-field.js +18 -19
- package/dist/components-input-field-input-field.js.map +1 -1
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +4 -4
- package/dist/components-input-phone-input-phone.cjs.map +1 -1
- package/dist/components-input-phone-input-phone.js.map +1 -1
- package/dist/components-popover-modal-popover-modal.cjs +1 -1
- package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
- package/dist/components-popover-modal-popover-modal.js +40 -29
- package/dist/components-popover-modal-popover-modal.js.map +1 -1
- package/dist/components-select-field-select-field.cjs.map +1 -1
- package/dist/components-select-field-select-field.js.map +1 -1
- package/dist/components-ui-avatar-avatar.cjs +1 -1
- package/dist/components-ui-avatar-avatar.cjs.map +1 -1
- package/dist/components-ui-avatar-avatar.js +12 -13
- package/dist/components-ui-avatar-avatar.js.map +1 -1
- package/dist/components-ui-badge-badge.cjs +1 -1
- package/dist/components-ui-badge-badge.cjs.map +1 -1
- package/dist/components-ui-badge-badge.js +10 -11
- package/dist/components-ui-badge-badge.js.map +1 -1
- package/dist/components-ui-button-button.cjs +1 -1
- package/dist/components-ui-button-button.cjs.map +1 -1
- package/dist/components-ui-button-button.js +10 -11
- package/dist/components-ui-button-button.js.map +1 -1
- package/dist/components-ui-button-button.styles.cjs +4 -4
- package/dist/components-ui-button-button.styles.cjs.map +1 -1
- package/dist/components-ui-button-button.styles.js +4 -4
- package/dist/components-ui-button-button.styles.js.map +1 -1
- package/dist/components-ui-calendar-calendar.cjs +1 -1
- package/dist/components-ui-calendar-calendar.js +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs +1 -1
- package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
- package/dist/components-ui-calendar-calendar.styles.js +1 -1
- package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
- package/dist/components-ui-calendar.cjs +1 -1
- package/dist/components-ui-calendar.js +2 -2
- package/dist/components-ui-card-card.cjs +1 -1
- package/dist/components-ui-card-card.cjs.map +1 -1
- package/dist/components-ui-card-card.js +10 -11
- package/dist/components-ui-card-card.js.map +1 -1
- package/dist/components-ui-chart-chart.cjs +1 -1
- package/dist/components-ui-chart-chart.js +1 -1
- package/dist/components-ui-chart.cjs +1 -1
- package/dist/components-ui-chart.js +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs +1 -1
- package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
- package/dist/components-ui-checkbox-checkbox.js +11 -12
- package/dist/components-ui-checkbox-checkbox.js.map +1 -1
- package/dist/components-ui-combobox-combobox.cjs +5 -5
- package/dist/components-ui-combobox-combobox.cjs.map +1 -1
- package/dist/components-ui-combobox-combobox.js +1477 -1479
- package/dist/components-ui-combobox-combobox.js.map +1 -1
- package/dist/components-ui-dialog-dialog.cjs +1 -1
- package/dist/components-ui-dialog-dialog.cjs.map +1 -1
- package/dist/components-ui-dialog-dialog.js +4 -5
- package/dist/components-ui-dialog-dialog.js.map +1 -1
- package/dist/components-ui-drawer-drawer.cjs +2 -2
- package/dist/components-ui-drawer-drawer.cjs.map +1 -1
- package/dist/components-ui-drawer-drawer.js +16 -19
- package/dist/components-ui-drawer-drawer.js.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +2 -2
- package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -1
- package/dist/components-ui-dropdown-menu-dropdown-menu.js +45 -46
- package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -1
- package/dist/components-ui-icon-icon.cjs +1 -1
- package/dist/components-ui-icon-icon.cjs.map +1 -1
- package/dist/components-ui-icon-icon.js +54 -61733
- package/dist/components-ui-icon-icon.js.map +1 -1
- package/dist/components-ui-input-group-input-group.cjs +1 -1
- package/dist/components-ui-input-group-input-group.cjs.map +1 -1
- package/dist/components-ui-input-group-input-group.js +12 -13
- package/dist/components-ui-input-group-input-group.js.map +1 -1
- package/dist/components-ui-input-input.cjs +1 -1
- package/dist/components-ui-input-input.cjs.map +1 -1
- package/dist/components-ui-input-input.js +2 -3
- package/dist/components-ui-input-input.js.map +1 -1
- package/dist/components-ui-label-label.cjs +1 -1
- package/dist/components-ui-label-label.cjs.map +1 -1
- package/dist/components-ui-label-label.js +1 -1
- package/dist/components-ui-label-label.js.map +1 -1
- package/dist/components-ui-pagination-pagination.cjs +1 -1
- package/dist/components-ui-pagination-pagination.cjs.map +1 -1
- package/dist/components-ui-pagination-pagination.js +0 -1
- package/dist/components-ui-pagination-pagination.js.map +1 -1
- package/dist/components-ui-popover-popover.cjs +1 -1
- package/dist/components-ui-popover-popover.cjs.map +1 -1
- package/dist/components-ui-popover-popover.js +14 -19
- package/dist/components-ui-popover-popover.js.map +1 -1
- package/dist/components-ui-progress-progress.cjs +1 -1
- package/dist/components-ui-progress-progress.cjs.map +1 -1
- package/dist/components-ui-progress-progress.js +1 -1
- package/dist/components-ui-progress-progress.js.map +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs +1 -1
- package/dist/components-ui-radio-group-radio-group.cjs.map +1 -1
- package/dist/components-ui-radio-group-radio-group.js +0 -1
- package/dist/components-ui-radio-group-radio-group.js.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -1
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +53 -47
- package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -1
- package/dist/components-ui-select-select.cjs +1 -1
- package/dist/components-ui-select-select.cjs.map +1 -1
- package/dist/components-ui-select-select.js +21 -22
- package/dist/components-ui-select-select.js.map +1 -1
- package/dist/components-ui-separator-separator.cjs +1 -1
- package/dist/components-ui-separator-separator.cjs.map +1 -1
- package/dist/components-ui-separator-separator.js +11 -12
- package/dist/components-ui-separator-separator.js.map +1 -1
- package/dist/components-ui-switch-switch.cjs +1 -1
- package/dist/components-ui-switch-switch.cjs.map +1 -1
- package/dist/components-ui-switch-switch.js +6 -7
- package/dist/components-ui-switch-switch.js.map +1 -1
- package/dist/components-ui-table-table.cjs +1 -1
- package/dist/components-ui-table-table.cjs.map +1 -1
- package/dist/components-ui-table-table.js +0 -1
- package/dist/components-ui-table-table.js.map +1 -1
- package/dist/components-ui-tabs-tabs.cjs +2 -2
- package/dist/components-ui-tabs-tabs.cjs.map +1 -1
- package/dist/components-ui-tabs-tabs.js +16 -16
- package/dist/components-ui-tabs-tabs.js.map +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs +1 -1
- package/dist/components-ui-tooltip-tooltip.cjs.map +1 -1
- package/dist/components-ui-tooltip-tooltip.js +9 -10
- package/dist/components-ui-tooltip-tooltip.js.map +1 -1
- package/dist/components-ui-typography-typography.cjs +1 -1
- package/dist/components-ui-typography-typography.cjs.map +1 -1
- package/dist/components-ui-typography-typography.js +7 -7
- package/dist/components-ui-typography-typography.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/calendar-DReGV_22.cjs +0 -2
- package/dist/chart-C69jBlXa.cjs +0 -63
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":"iqEAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,eAAA,EAER,CACE,MAAO,WACP,KAAM,uBAAA,EAER,CACE,MAAO,MACP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AK,SACL,UAAU,4BACV,QAASC,EAAsBD,CAAI,CAAA,CAAA,EAGpC4B,CAAA,CAAA,EAbIA,CAAA,CAgBV,CAAA,CAAA,CACH,EAEJ,CAEJ"}
|
|
@@ -2,16 +2,17 @@ import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import './brd-ui-kit.css';/* empty css */
|
|
3
3
|
import { cn as f } from "./lib-utils.js";
|
|
4
4
|
import "class-variance-authority";
|
|
5
|
-
import { useState as y, useRef as w, useEffect as P } from "react";
|
|
6
5
|
import "./components-ui-badge-badge.styles.js";
|
|
7
|
-
import { Button as
|
|
6
|
+
import { Button as y } from "./components-ui-button-button.js";
|
|
8
7
|
import "./components-ui-button-button.styles.js";
|
|
9
8
|
import "./components-ui-card-card.js";
|
|
10
9
|
import "./components-ui-checkbox-checkbox.js";
|
|
11
10
|
import { Icon as p } from "./components-ui-icon-icon.js";
|
|
12
|
-
import "./
|
|
11
|
+
import { usePopupControls as w } from "./hooks-usePopupControls.js";
|
|
12
|
+
import "./calendar-Ba3kHG6w.js";
|
|
13
13
|
import "./components-ui-combobox-combobox.js";
|
|
14
14
|
import "./components-ui-dialog-dialog.js";
|
|
15
|
+
import { useState as P, useRef as I, useEffect as N } from "react";
|
|
15
16
|
import "./components-ui-label-label.js";
|
|
16
17
|
import "./components-ui-separator-separator.js";
|
|
17
18
|
import "./components-ui-field-field.styles.js";
|
|
@@ -30,7 +31,6 @@ import "./components-ui-table-table.js";
|
|
|
30
31
|
import "./components-ui-tabs-tabs.js";
|
|
31
32
|
import "./components-ui-tooltip-tooltip.js";
|
|
32
33
|
import "./components-ui-typography-typography.styles.js";
|
|
33
|
-
import { usePopupControls as N } from "./hooks-usePopupControls.js";
|
|
34
34
|
import "./components-app-pagination-app-pagination.styles.js";
|
|
35
35
|
import "./components-app-sidebar-app-sidebar.styles.js";
|
|
36
36
|
import "./components-data-table-data-table.styles.js";
|
|
@@ -38,7 +38,7 @@ import "./components-ui-dropdown-menu-dropdown-menu.styles.js";
|
|
|
38
38
|
import { InputField as k } from "./components-input-field-input-field.js";
|
|
39
39
|
import "./components-select-field-select-field.js";
|
|
40
40
|
import "./lodash-FemA_LCk.js";
|
|
41
|
-
import "./chart-
|
|
41
|
+
import "./chart-DFbmMKiQ.js";
|
|
42
42
|
import "./index-C4iHL8Gs.js";
|
|
43
43
|
import "./index-C6N9aMq_.js";
|
|
44
44
|
import { InputPhone as z } from "./components-input-phone-input-phone.js";
|
|
@@ -89,8 +89,8 @@ const T = [
|
|
|
89
89
|
),
|
|
90
90
|
icon: "size-5 shrink-0"
|
|
91
91
|
}), Ce = (t) => {
|
|
92
|
-
const { inputProps: h, inputPhoneProps: x, onTypeChange: b, ...a } = t, [r, C] =
|
|
93
|
-
|
|
92
|
+
const { inputProps: h, inputPhoneProps: x, onTypeChange: b, ...a } = t, [r, C] = P("phone"), { isOpened: i, openPopup: c, closePopup: s } = w(), m = I(null);
|
|
93
|
+
N(() => {
|
|
94
94
|
const e = (n) => {
|
|
95
95
|
m.current && !m.current.contains(n.target) && s();
|
|
96
96
|
};
|
|
@@ -193,7 +193,7 @@ const T = [
|
|
|
193
193
|
flex-col rounded-xl border`,
|
|
194
194
|
ref: m,
|
|
195
195
|
children: T.map(({ label: e, icon: n }) => /* @__PURE__ */ d(
|
|
196
|
-
|
|
196
|
+
y,
|
|
197
197
|
{
|
|
198
198
|
variant: "ghost",
|
|
199
199
|
className: "flex w-full justify-start",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./components-ui-field-field.cjs"),j=require("./components-ui-input-input.cjs"),o=require("./components-ui-input-group-input-group.cjs"),m=({date:p=[],isValid:l,disabled:e=!1,label:s,description:c,classes:u,ref:d,...a})=>{const t={...l===!0&&!e&&{"aria-valid":!0},...l===!1&&!e&&{"aria-invalid":!0},disabled:e};return n.jsx(i.FieldSet,{className:u?.fieldset,children:n.jsx(i.FieldGroup,{className:u?.fieldgroup,children:n.jsxs(i.Field,{className:u?.field,children:[s&&n.jsx(i.FieldLabel,{...t,children:s}),p.length>0?n.jsxs(o.InputGroup,{"data-slot":!0,children:[n.jsx(o.InputGroupInput,{ref:d,...a,...t,disabled:e}),p.map(r=>n.jsx(o.InputGroupAddon,{align:r.position,children:r.component},r.id))]}):n.jsx(j.Input,{ref:d,...a,...t,disabled:e}),c&&n.jsx(i.FieldDescription,{...t,children:c})]})})})};exports.InputField=m;
|
|
2
2
|
//# sourceMappingURL=components-input-field-input-field.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Input } from \"../ui/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"../ui/input-group\";\n\nexport type DateAddon = {\n id: string | number;\n position?: \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\" | null;\n component: ReactNode;\n};\n\ntype BaseProps = {\n date?: DateAddon[];\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n };\n};\n\ntype InputFieldProps = BaseProps & ComponentPropsWithRef<\"input\">;\n\nexport const InputField = ({\n date = [],\n isValid,\n disabled = false,\n label,\n description,\n classes,\n ref,\n ...rest\n}: InputFieldProps) => {\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n return (\n <FieldSet className={classes?.fieldset}>\n <FieldGroup className={classes?.fieldgroup}>\n <Field className={classes?.field}>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n {date.length > 0 ? (\n <InputGroup data-slot>\n <InputGroupInput\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n {date.map((e) => (\n <InputGroupAddon\n key={e.id}\n align={e.position}\n >\n {e.component}\n </InputGroupAddon>\n ))}\n </InputGroup>\n ) : (\n <Input\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n )}\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\ntype InputProps = InputFieldProps;\n\nexport type { InputFieldProps, InputProps };\n"],"names":["InputField","date","isValid","disabled","label","description","classes","ref","rest","validationProps","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","InputGroup","InputGroupInput","e","InputGroupAddon","Input","FieldDescription"],"mappings":"wQAyBaA,EAAa,CAAC,CACzB,KAAAC,EAAO,CAAA,EACP,QAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,IAAAC,EACA,GAAGC,CACL,IAAuB,CACrB,MAAMC,EAAkB,CACtB,GAAIP,IAAY,IAAQ,CAACC,GAAY,CAAE,aAAc,EAAA,EACrD,GAAID,IAAY,IAAS,CAACC,GAAY,CAAE,eAAgB,EAAA,EACxD,SAAAA,CAAA,EAGF,OACEO,EAAAA,IAACC,EAAAA,SAAA,CAAS,UAAWL,GAAS,SAC5B,SAAAI,EAAAA,IAACE,aAAA,CAAW,UAAWN,GAAS,WAC9B,SAAAO,OAACC,EAAAA,MAAA,CAAM,UAAWR,GAAS,MACxB,SAAA,CAAAF,GAASM,EAAAA,IAACK,aAAA,CAAY,GAAGN,EAAkB,SAAAL,EAAM,EACjDH,EAAK,OAAS,EACbY,EAAAA,KAACG,EAAAA,WAAA,CAAW,YAAS,GACnB,SAAA,CAAAN,EAAAA,IAACO,EAAAA,gBAAA,CACC,IAAAV,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAEDF,EAAK,IAAKiB,GACTR,EAAAA,IAACS,EAAAA,gBAAA,CAEC,MAAOD,EAAE,SAER,SAAAA,EAAE,SAAA,EAHEA,EAAE,EAAA,CAKV,CAAA,CAAA,CACH,EAEAR,EAAAA,IAACU,EAAAA,MAAA,CACC,IAAAb,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAGHE,GACCK,EAAAA,IAACW,EAAAA,iBAAA,CAAkB,GAAGZ,EAAkB,SAAAJ,CAAA,CAAY,CAAA,CAAA,CAExD,EACF,EACF,CAEJ"}
|
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
import { jsx as r, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import "react";
|
|
3
2
|
import { FieldSet as c, FieldGroup as f, Field as h, FieldLabel as F, FieldDescription as I } from "./components-ui-field-field.js";
|
|
4
3
|
import { Input as s } from "./components-ui-input-input.js";
|
|
5
4
|
import { InputGroup as G, InputGroupInput as g, InputGroupAddon as v } from "./components-ui-input-group-input-group.js";
|
|
6
|
-
const
|
|
7
|
-
date:
|
|
8
|
-
isValid:
|
|
5
|
+
const D = ({
|
|
6
|
+
date: e = [],
|
|
7
|
+
isValid: p,
|
|
9
8
|
disabled: i = !1,
|
|
10
9
|
label: l,
|
|
11
10
|
description: u,
|
|
12
|
-
classes:
|
|
11
|
+
classes: o,
|
|
13
12
|
ref: m,
|
|
14
13
|
...a
|
|
15
14
|
}) => {
|
|
16
|
-
const
|
|
17
|
-
...
|
|
18
|
-
...
|
|
15
|
+
const n = {
|
|
16
|
+
...p === !0 && !i && { "aria-valid": !0 },
|
|
17
|
+
...p === !1 && !i && { "aria-invalid": !0 },
|
|
19
18
|
disabled: i
|
|
20
19
|
};
|
|
21
|
-
return /* @__PURE__ */ r(c, { className:
|
|
22
|
-
l && /* @__PURE__ */ r(F, { ...
|
|
23
|
-
|
|
20
|
+
return /* @__PURE__ */ r(c, { className: o?.fieldset, children: /* @__PURE__ */ r(f, { className: o?.fieldgroup, children: /* @__PURE__ */ d(h, { className: o?.field, children: [
|
|
21
|
+
l && /* @__PURE__ */ r(F, { ...n, children: l }),
|
|
22
|
+
e.length > 0 ? /* @__PURE__ */ d(G, { "data-slot": !0, children: [
|
|
24
23
|
/* @__PURE__ */ r(
|
|
25
24
|
g,
|
|
26
25
|
{
|
|
27
26
|
ref: m,
|
|
28
27
|
...a,
|
|
29
|
-
...
|
|
28
|
+
...n,
|
|
30
29
|
disabled: i
|
|
31
30
|
}
|
|
32
31
|
),
|
|
33
|
-
|
|
32
|
+
e.map((t) => /* @__PURE__ */ r(
|
|
34
33
|
v,
|
|
35
34
|
{
|
|
36
|
-
align:
|
|
37
|
-
children:
|
|
35
|
+
align: t.position,
|
|
36
|
+
children: t.component
|
|
38
37
|
},
|
|
39
|
-
|
|
38
|
+
t.id
|
|
40
39
|
))
|
|
41
40
|
] }) : /* @__PURE__ */ r(
|
|
42
41
|
s,
|
|
43
42
|
{
|
|
44
43
|
ref: m,
|
|
45
44
|
...a,
|
|
46
|
-
...
|
|
45
|
+
...n,
|
|
47
46
|
disabled: i
|
|
48
47
|
}
|
|
49
48
|
),
|
|
50
|
-
u && /* @__PURE__ */ r(I, { ...
|
|
49
|
+
u && /* @__PURE__ */ r(I, { ...n, children: u })
|
|
51
50
|
] }) }) });
|
|
52
51
|
};
|
|
53
52
|
export {
|
|
54
|
-
|
|
53
|
+
D as InputField
|
|
55
54
|
};
|
|
56
55
|
//# sourceMappingURL=components-input-field-input-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-field-input-field.js","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"components-input-field-input-field.js","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Input } from \"../ui/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"../ui/input-group\";\n\nexport type DateAddon = {\n id: string | number;\n position?: \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\" | null;\n component: ReactNode;\n};\n\ntype BaseProps = {\n date?: DateAddon[];\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n };\n};\n\ntype InputFieldProps = BaseProps & ComponentPropsWithRef<\"input\">;\n\nexport const InputField = ({\n date = [],\n isValid,\n disabled = false,\n label,\n description,\n classes,\n ref,\n ...rest\n}: InputFieldProps) => {\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n return (\n <FieldSet className={classes?.fieldset}>\n <FieldGroup className={classes?.fieldgroup}>\n <Field className={classes?.field}>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n {date.length > 0 ? (\n <InputGroup data-slot>\n <InputGroupInput\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n {date.map((e) => (\n <InputGroupAddon\n key={e.id}\n align={e.position}\n >\n {e.component}\n </InputGroupAddon>\n ))}\n </InputGroup>\n ) : (\n <Input\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n )}\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\ntype InputProps = InputFieldProps;\n\nexport type { InputFieldProps, InputProps };\n"],"names":["InputField","date","isValid","disabled","label","description","classes","ref","rest","validationProps","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","InputGroup","InputGroupInput","e","InputGroupAddon","Input","FieldDescription"],"mappings":";;;;AAyBO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAAC,IAAO,CAAA;AAAA,EACP,SAAAC;AAAA,EACA,UAAAC,IAAW;AA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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */require("./lib-utils.cjs");require("class-variance-authority");require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */require("./lib-utils.cjs");require("class-variance-authority");require("./components-ui-badge-badge.styles.cjs");require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const q=require("./components-ui-icon-icon.cjs"),o=require("./hooks-usePopupControls.cjs");require("./calendar-B5QCV34E.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");require("react");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-toggle-toggle.styles.cjs");require("./components-ui-toggle-group-toggle-group.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");require("./components-data-table-data-table.styles.cjs");require("./components-ui-dropdown-menu-dropdown-menu.styles.cjs");const n=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-9H_9wEfR.cjs");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");require("./components-input-phone-input-phone.cjs");const t=({...i})=>{const{isOpened:e,togglePopup:u}=o.usePopupControls();return r.jsx(n.InputField,{...i,type:e?"text":"password",date:[{id:"0",position:"inline-end",component:r.jsx(q.Icon,{type:e?"eye-slash":"eye",onClick:u,className:"cursor-pointer"})}]})};exports.InputPassword=t;
|
|
2
2
|
//# sourceMappingURL=components-input-password-input-password.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components-input-password-input-password.cjs","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-slash\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"components-input-password-input-password.cjs","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-slash\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":"ioEAIO,MAAMA,EAA8C,CAAC,CAAE,GAAGC,KAAW,CAC1E,KAAM,CAAE,SAAAC,EAAU,YAAAC,CAAA,EAAgBC,mBAAA,EAElC,OACEC,EAAAA,IAACC,EAAAA,WAAA,CACE,GAAGL,EACJ,KAAMC,EAAW,OAAS,WAC1B,KAAM,CACJ,CACE,GAAI,IACJ,SAAU,aACV,UACEG,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAML,EAAW,YAAc,MAC/B,QAASC,EACT,UAAU,gBAAA,CAAA,CACZ,CAEJ,CACF,CAAA,CAGN"}
|
|
@@ -2,16 +2,17 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import './brd-ui-kit.css';/* empty css */
|
|
3
3
|
import "./lib-utils.js";
|
|
4
4
|
import "class-variance-authority";
|
|
5
|
-
import "react";
|
|
6
5
|
import "./components-ui-badge-badge.styles.js";
|
|
7
6
|
import "./components-ui-button-button.js";
|
|
8
7
|
import "./components-ui-button-button.styles.js";
|
|
9
8
|
import "./components-ui-card-card.js";
|
|
10
9
|
import "./components-ui-checkbox-checkbox.js";
|
|
11
10
|
import { Icon as i } from "./components-ui-icon-icon.js";
|
|
12
|
-
import "./
|
|
11
|
+
import { usePopupControls as m } from "./hooks-usePopupControls.js";
|
|
12
|
+
import "./calendar-Ba3kHG6w.js";
|
|
13
13
|
import "./components-ui-combobox-combobox.js";
|
|
14
14
|
import "./components-ui-dialog-dialog.js";
|
|
15
|
+
import "react";
|
|
15
16
|
import "./components-ui-label-label.js";
|
|
16
17
|
import "./components-ui-separator-separator.js";
|
|
17
18
|
import "./components-ui-field-field.styles.js";
|
|
@@ -30,7 +31,6 @@ import "./components-ui-table-table.js";
|
|
|
30
31
|
import "./components-ui-tabs-tabs.js";
|
|
31
32
|
import "./components-ui-tooltip-tooltip.js";
|
|
32
33
|
import "./components-ui-typography-typography.styles.js";
|
|
33
|
-
import { usePopupControls as m } from "./hooks-usePopupControls.js";
|
|
34
34
|
import "./components-app-pagination-app-pagination.styles.js";
|
|
35
35
|
import "./components-app-sidebar-app-sidebar.styles.js";
|
|
36
36
|
import "./components-data-table-data-table.styles.js";
|
|
@@ -38,7 +38,7 @@ import "./components-ui-dropdown-menu-dropdown-menu.styles.js";
|
|
|
38
38
|
import { InputField as e } from "./components-input-field-input-field.js";
|
|
39
39
|
import "./components-select-field-select-field.js";
|
|
40
40
|
import "./lodash-FemA_LCk.js";
|
|
41
|
-
import "./chart-
|
|
41
|
+
import "./chart-DFbmMKiQ.js";
|
|
42
42
|
import "./index-C4iHL8Gs.js";
|
|
43
43
|
import "./index-C6N9aMq_.js";
|
|
44
44
|
import "./components-input-phone-input-phone.js";
|