bromcom-ui-next 0.1.3 → 0.1.4
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/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js.map +1 -1
- package/dist/bromcom-ui/global/global.js +14 -15
- package/dist/bromcom-ui/p-04f6d730.entry.js +2 -0
- package/dist/bromcom-ui/p-04f6d730.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-b36f4f44.js → p-12360e4c.js} +1 -1
- package/dist/bromcom-ui/p-15fe392b.js +3 -0
- package/dist/bromcom-ui/p-15fe392b.js.map +1 -0
- package/dist/bromcom-ui/p-1b11150b.entry.js +2 -0
- package/dist/bromcom-ui/{p-6430a887.entry.js.map → p-1b11150b.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-1d86c1cf.entry.js +2 -0
- package/dist/bromcom-ui/p-1d86c1cf.entry.js.map +1 -0
- package/dist/bromcom-ui/p-31354aaa.js +2 -0
- package/dist/bromcom-ui/p-31354aaa.js.map +1 -0
- package/dist/bromcom-ui/p-3b607038.entry.js +2 -0
- package/dist/bromcom-ui/p-3b607038.entry.js.map +1 -0
- package/dist/bromcom-ui/p-5d0838e9.entry.js +2 -0
- package/dist/bromcom-ui/{p-bde58312.entry.js.map → p-5d0838e9.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-729a870f.js +2 -0
- package/dist/bromcom-ui/p-729a870f.js.map +1 -0
- package/dist/bromcom-ui/p-a590f793.entry.js +2 -0
- package/dist/bromcom-ui/p-a590f793.entry.js.map +1 -0
- package/dist/bromcom-ui/p-cd437280.entry.js +2 -0
- package/dist/bromcom-ui/p-cd437280.entry.js.map +1 -0
- package/dist/bromcom-ui/{p-dcc13a55.entry.js → p-dcea8d62.entry.js} +2 -2
- package/dist/bromcom-ui/{p-3805363a.entry.js → p-ebed10d5.entry.js} +2 -2
- package/dist/cjs/app-globals-29edfda4.js +39 -0
- package/dist/cjs/app-globals-29edfda4.js.map +1 -0
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +7 -7
- package/dist/cjs/bcm-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar_4.cjs.entry.js +577 -0
- package/dist/cjs/bcm-avatar_4.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-chip.cjs.entry.js +4 -4
- package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-divider.cjs.entry.js +81 -0
- package/dist/cjs/bcm-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-input.cjs.entry.js +313 -0
- package/dist/cjs/bcm-input.cjs.entry.js.map +1 -0
- package/dist/cjs/bcm-text.cjs.entry.js +3 -3
- package/dist/cjs/bcm-text.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-textarea.cjs.entry.js +316 -0
- package/dist/cjs/bcm-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{index-c36002ae.js → index-4795c073.js} +13 -4
- package/dist/cjs/index-4795c073.js.map +1 -0
- package/dist/{components/p-b36f4f44.js → cjs/index-5a88e57b.js} +5 -3
- package/dist/cjs/{index-a4eea4bb.js.map → index-5a88e57b.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/validation-messages-c36e5c31.js +134 -0
- package/dist/cjs/validation-messages-c36e5c31.js.map +1 -0
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/accordion/accordion.component.js +5 -5
- package/dist/collection/components/accordion/accordion.component.js.map +1 -1
- package/dist/collection/components/accordion/accordion.css +1 -1
- package/dist/collection/components/accordion-group/accordion-group.component.js +1 -1
- package/dist/collection/components/accordion-group/accordion-group.component.js.map +1 -1
- package/dist/collection/components/accordion-group/accordion-group.css +1 -1
- package/dist/collection/components/avatar/avatar.component.js.map +1 -1
- package/dist/collection/components/avatar/avatar.css +1 -1
- package/dist/collection/components/badge/badge.component.js +373 -0
- package/dist/collection/components/badge/badge.component.js.map +1 -0
- package/dist/collection/components/badge/badge.css +1 -0
- package/dist/collection/components/basic-badge/basic-badge.component.js +236 -0
- package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -0
- package/dist/collection/components/basic-badge/basic-badge.css +1 -0
- package/dist/collection/components/button/button.component.js +2 -2
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/chip/chip.component.js +2 -2
- package/dist/collection/components/chip/chip.component.js.map +1 -1
- package/dist/collection/components/chip/chip.css +1 -1
- package/dist/collection/components/divider/divider.component.js +190 -0
- package/dist/collection/components/divider/divider.component.js.map +1 -0
- package/dist/collection/components/divider/divider.css +1 -0
- package/dist/collection/components/input/input.component.js +209 -24
- package/dist/collection/components/input/input.component.js.map +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/input/types.js +10 -1
- package/dist/collection/components/input/types.js.map +1 -1
- package/dist/collection/components/text/text.component.js +1 -1
- package/dist/collection/components/textarea/textarea.component.js +1013 -0
- package/dist/collection/components/textarea/textarea.component.js.map +1 -0
- package/dist/collection/components/textarea/textarea.css +2 -0
- package/dist/collection/components/textarea/types.js +2 -0
- package/dist/collection/components/textarea/types.js.map +1 -0
- package/dist/collection/global/global.js +14 -15
- package/dist/collection/utils/i18n.js +29 -0
- package/dist/collection/utils/i18n.js.map +1 -0
- package/dist/collection/utils/slot/check-slot-content.js +15 -0
- package/dist/collection/utils/slot/check-slot-content.js.map +1 -0
- package/dist/collection/utils/validation-messages.js +17 -0
- package/dist/collection/utils/validation-messages.js.map +1 -0
- package/dist/components/bcm-accordion-group.js +3 -3
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-accordion.js +7 -7
- package/dist/components/bcm-accordion.js.map +1 -1
- package/dist/components/bcm-alert.js +1 -1
- package/dist/components/bcm-avatar.js +13 -7
- package/dist/components/bcm-avatar.js.map +1 -1
- package/dist/components/bcm-badge.d.ts +11 -0
- package/dist/components/bcm-badge.js +8 -0
- package/dist/components/bcm-badge.js.map +1 -0
- package/dist/components/bcm-basic-badge.d.ts +11 -0
- package/dist/components/bcm-basic-badge.js +113 -0
- package/dist/components/bcm-basic-badge.js.map +1 -0
- package/dist/components/bcm-button.js +4 -4
- package/dist/components/bcm-button.js.map +1 -1
- package/dist/components/bcm-chip.js +4 -4
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-divider.d.ts +11 -0
- package/dist/components/bcm-divider.js +100 -0
- package/dist/components/bcm-divider.js.map +1 -0
- package/dist/components/bcm-input.js +168 -105
- package/dist/components/bcm-input.js.map +1 -1
- package/dist/components/bcm-text.js +3 -3
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/bcm-textarea.d.ts +11 -0
- package/dist/components/bcm-textarea.js +369 -0
- package/dist/components/bcm-textarea.js.map +1 -0
- package/dist/components/index.js +12 -16
- package/dist/components/index.js.map +1 -1
- package/dist/{esm/index-f0e9d579.js → components/p-12360e4c.js} +3 -3
- package/dist/components/{p-b36f4f44.js.map → p-12360e4c.js.map} +1 -1
- package/dist/components/{p-8ded2c73.js → p-13582168.js} +10 -2
- package/dist/components/p-13582168.js.map +1 -0
- package/dist/components/p-31354aaa.js +129 -0
- package/dist/components/p-31354aaa.js.map +1 -0
- package/dist/components/p-39637e05.js +145 -0
- package/dist/components/p-39637e05.js.map +1 -0
- package/dist/esm/app-globals-bfa07b76.js +37 -0
- package/dist/esm/app-globals-bfa07b76.js.map +1 -0
- package/dist/esm/bcm-accordion-group.entry.js +3 -3
- package/dist/esm/bcm-accordion-group.entry.js.map +1 -1
- package/dist/esm/bcm-accordion.entry.js +7 -7
- package/dist/esm/bcm-accordion.entry.js.map +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-avatar_4.entry.js +570 -0
- package/dist/esm/bcm-avatar_4.entry.js.map +1 -0
- package/dist/esm/bcm-chip.entry.js +4 -4
- package/dist/esm/bcm-chip.entry.js.map +1 -1
- package/dist/esm/bcm-divider.entry.js +77 -0
- package/dist/esm/bcm-divider.entry.js.map +1 -0
- package/dist/esm/bcm-input.entry.js +309 -0
- package/dist/esm/bcm-input.entry.js.map +1 -0
- package/dist/esm/bcm-text.entry.js +3 -3
- package/dist/esm/bcm-text.entry.js.map +1 -1
- package/dist/esm/bcm-textarea.entry.js +312 -0
- package/dist/esm/bcm-textarea.entry.js.map +1 -0
- package/dist/esm/bromcom-ui.js +4 -4
- package/dist/{cjs/index-a4eea4bb.js → esm/index-097075ad.js} +3 -5
- package/dist/esm/{index-f0e9d579.js.map → index-097075ad.js.map} +1 -1
- package/dist/esm/{index-e23ee9b0.js → index-27cc1bac.js} +13 -4
- package/dist/esm/index-27cc1bac.js.map +1 -0
- package/dist/esm/loader.js +4 -4
- package/dist/esm/validation-messages-a29d53be.js +129 -0
- package/dist/esm/validation-messages-a29d53be.js.map +1 -0
- package/dist/types/components/badge/badge.component.d.ts +87 -0
- package/dist/types/components/basic-badge/basic-badge.component.d.ts +54 -0
- package/dist/types/components/divider/divider.component.d.ts +40 -0
- package/dist/types/components/input/input.component.d.ts +19 -0
- package/dist/types/components/input/types.d.ts +10 -0
- package/dist/types/components/textarea/textarea.component.d.ts +85 -0
- package/dist/types/components/textarea/types.d.ts +7 -0
- package/dist/types/components.d.ts +643 -0
- package/dist/types/utils/i18n.d.ts +8 -0
- package/dist/types/utils/slot/check-slot-content.d.ts +7 -0
- package/dist/types/utils/validation-messages.d.ts +11 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-047e562f.entry.js +0 -2
- package/dist/bromcom-ui/p-047e562f.entry.js.map +0 -1
- package/dist/bromcom-ui/p-40643b53.js +0 -2
- package/dist/bromcom-ui/p-40643b53.js.map +0 -1
- package/dist/bromcom-ui/p-61c030c5.js +0 -3
- package/dist/bromcom-ui/p-61c030c5.js.map +0 -1
- package/dist/bromcom-ui/p-6430a887.entry.js +0 -2
- package/dist/bromcom-ui/p-9e94d920.entry.js +0 -2
- package/dist/bromcom-ui/p-9e94d920.entry.js.map +0 -1
- package/dist/bromcom-ui/p-bde58312.entry.js +0 -2
- package/dist/bromcom-ui/p-e7732b0c.entry.js +0 -2
- package/dist/bromcom-ui/p-e7732b0c.entry.js.map +0 -1
- package/dist/cjs/app-globals-e8faea0d.js +0 -43
- package/dist/cjs/app-globals-e8faea0d.js.map +0 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +0 -89
- package/dist/cjs/bcm-avatar.cjs.entry.js.map +0 -1
- package/dist/cjs/bcm-button_2.cjs.entry.js +0 -549
- package/dist/cjs/bcm-button_2.cjs.entry.js.map +0 -1
- package/dist/cjs/index-c36002ae.js.map +0 -1
- package/dist/components/p-8ded2c73.js.map +0 -1
- package/dist/esm/app-globals-f781c325.js +0 -41
- package/dist/esm/app-globals-f781c325.js.map +0 -1
- package/dist/esm/bcm-avatar.entry.js +0 -85
- package/dist/esm/bcm-avatar.entry.js.map +0 -1
- package/dist/esm/bcm-button_2.entry.js +0 -544
- package/dist/esm/bcm-button_2.entry.js.map +0 -1
- package/dist/esm/index-e23ee9b0.js.map +0 -1
- /package/dist/bromcom-ui/{p-b36f4f44.js.map → p-12360e4c.js.map} +0 -0
- /package/dist/bromcom-ui/{p-dcc13a55.entry.js.map → p-dcea8d62.entry.js.map} +0 -0
- /package/dist/bromcom-ui/{p-3805363a.entry.js.map → p-ebed10d5.entry.js.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"bcm-input.entry.js","mappings":";;;;;AAIO,MAAM,YAAY,GAAG;IAC1B,QAAQ,EAAE,gCAAgC;IAC1C,OAAO,EAAE,wBAAwB;IACjC,KAAK,EAAE,qBAAqB;IAC5B,KAAK,EAAE,oBAAoB;IAC3B,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,qBAAqB;IAC7B,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ACnF,qCAAqC,EAAE,IAAI,CAAC,QAAQ;aACrD,EACD;gBACE,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;gBACpC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;gBACrC,aAAa,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;aACrC,CACF,IAEA,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,cAAc,KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,WAAW,CACpH,CACP,CACG,EACN;KACH;;;;;;;;;;;;","names":["tv"],"sources":["src/components/input/types.ts","src/utils/slot/check-slot-content.ts","src/components/input/input.scss?tag=bcm-input&encapsulation=shadow","src/components/input/input.component.tsx"],"sourcesContent":["export type InputSize = 'small' | 'medium' | 'large';\nexport type InputStatus = 'default' | 'error' | 'success' | 'warning' | 'info';\nexport type InputType = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'search' | 'date' | 'time' | 'datetime-local';\n\nexport const defaultIcons = {\n 'search': 'fa-regular fa-magnifying-glass',\n 'email': 'fa-regular fa-envelope',\n 'tel': 'fa-regular fa-phone',\n 'url': 'fa-regular fa-link',\n 'date': 'fa-regular fa-calendar',\n 'time': 'fa-regular fa-clock',\n 'datetime-local': 'fa-regular fa-calendar-clock',\n 'password': 'fa-regular fa-lock',\n} as const;\n","/**\n * Checks if a named slot has any content\n * @param element - The host element (component instance)\n * @param slotName - Name of the slot to check\n * @returns boolean indicating if the slot has any assigned nodes\n */\nexport const checkSlotContent = (element: HTMLElement, slotName: string): boolean => {\n const slot = element.shadowRoot?.querySelector(`slot[name=\"${slotName}\"]`) as HTMLSlotElement;\n if (!slot) return false;\n\n const assignedNodes = slot.assignedNodes();\n return assignedNodes.length > 0;\n};\n",":host {\n display: inline-block;\n}\n","import { Component, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\nimport { InputSize, InputStatus, InputType, defaultIcons } from './types';\nimport { tv } from 'tailwind-variants';\nimport classNames from 'classnames';\nimport { generateId } from '../../utils/id/generate-id';\nimport { checkSlotContent } from '../../utils/slot/check-slot-content';\nimport { getValidationMessage, setValidationMessages, defaultValidationMessages } from '../../utils/validation-messages';\n\n@Component({\n tag: 'bcm-input',\n styleUrl: 'input.scss',\n shadow: true,\n})\nexport class BcmInput {\n @Element() el: HTMLElement;\n private inputRef: HTMLInputElement;\n\n @State() isFocused = false;\n @State() validationMessage: string;\n @State() isValid = true;\n @State() internalStatus: InputStatus = 'default';\n @State() internalErrorMessage: string;\n\n /** Input value */\n @Prop({ mutable: true, reflect: true })\n value: string = '';\n\n /** Input placeholder text */\n @Prop()\n placeholder?: string;\n\n /** Input name */\n @Prop()\n name?: string;\n\n /** Input id */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('input');\n\n /** Controls the input size */\n @Prop()\n size: InputSize = 'medium';\n\n /** Defines the input's status/state */\n @Prop()\n status: InputStatus = 'default';\n\n /** Full width input */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** HTML input type */\n @Prop()\n type: InputType = 'text';\n\n /** Whether the input is disabled */\n @Prop()\n disabled = false;\n\n /** Whether the input is readonly */\n @Prop()\n readonly = false;\n\n /** Whether the input is required */\n @Prop()\n required = false;\n\n /** Input autocomplete attribute */\n @Prop()\n autocomplete?: string;\n\n /** Min length for text input */\n @Prop()\n minLength?: number;\n\n /** Max length for text input */\n @Prop()\n maxLength?: number;\n\n /** Min value for number input */\n @Prop()\n min?: number;\n\n /** Max value for number input */\n @Prop()\n max?: number;\n\n /** Step value for number input */\n @Prop()\n step?: number;\n\n /** Pattern for validation */\n @Prop()\n pattern?: string;\n\n /** Input label for accessibility */\n @Prop()\n label?: string;\n\n /** Error message to display */\n @Prop()\n errorMessage?: string;\n\n /** Caption text to display below input */\n @Prop()\n captionText?: string;\n\n /** ID of associated label element */\n @Prop()\n labelledby?: string;\n\n /** ID of associated caption/error text element */\n @Prop()\n describedby?: string;\n\n /** Prefix icon class name */\n @Prop()\n prefixIcon?: string;\n\n /** Suffix icon class name */\n @Prop()\n suffixIcon?: string;\n\n /** Whether to use native form validation\n * If false, component will handle validation internally\n */\n @Prop()\n useNativeValidation = true;\n\n /** Custom validation function */\n @Prop()\n validator?: (value: string) => string | undefined;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmInput: EventEmitter<InputEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmChange: EventEmitter<Event>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyDown: EventEmitter<KeyboardEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyUp: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.inputRef) {\n this.inputRef.value = newValue;\n }\n }\n\n @Watch('status')\n watchStatus(newValue: InputStatus) {\n this.internalStatus = newValue;\n }\n\n @Watch('errorMessage')\n watchErrorMessage(newValue: string) {\n this.internalErrorMessage = newValue;\n }\n\n @Method()\n async setFocus() {\n this.inputRef?.focus();\n }\n\n @Method()\n async setBlur() {\n this.inputRef?.blur();\n }\n\n @Method()\n async select() {\n this.inputRef?.select();\n }\n\n /** Sets locale and messages for all inputs */\n @Method()\n async setLocale(locale: string, messages: Record<string, string>) {\n // Set messages and update validation immediately\n setValidationMessages(locale, messages);\n\n // Mevcut validasyon mesajını güncelle\n if (!this.isValid) {\n this.validateInput();\n }\n }\n\n componentWillLoad() {\n // I18n için default mesajları set et\n setValidationMessages('en', defaultValidationMessages);\n this.internalStatus = this.status;\n this.internalErrorMessage = this.errorMessage;\n }\n\n private validateInput(): void {\n if (!this.inputRef) return;\n\n // Reset validation state\n this.isValid = true;\n this.validationMessage = '';\n\n const value = this.inputRef.value;\n\n // Required check\n if (this.required && !value) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('required');\n this.internalStatus = 'error';\n this.internalErrorMessage = this.validationMessage;\n return;\n }\n\n // Minimum length check\n else if (this.minLength && value.length < this.minLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('minlength', { min: this.minLength });\n }\n // Maximum length check\n else if (this.maxLength && value.length > this.maxLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });\n }\n // Pattern check\n else if (this.pattern && !new RegExp(this.pattern).test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('pattern');\n }\n // Email check\n else if (this.type === 'email' && value && !/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value)) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('email');\n }\n // Number range check\n else if (this.type === 'number' && value) {\n const numValue = parseFloat(value);\n if (this.min !== undefined && numValue < this.min) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('min', { min: this.min });\n } else if (this.max !== undefined && numValue > this.max) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('max', { max: this.max });\n }\n }\n\n // Update component state\n this.internalStatus = this.isValid ? 'default' : 'error';\n this.internalErrorMessage = this.validationMessage;\n }\n\n private onInput = (event: InputEvent) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.bcmInput.emit(event);\n this.validateInput();\n };\n\n private onChange = (event: Event) => {\n this.bcmChange.emit(event);\n };\n\n private onFocus = (event: FocusEvent) => {\n this.isFocused = true;\n this.bcmFocus.emit(event);\n };\n\n private onBlur = (event: FocusEvent) => {\n this.isFocused = false;\n this.bcmBlur.emit(event);\n this.validateInput();\n };\n\n private onKeyDown = (event: KeyboardEvent) => {\n this.bcmKeyDown.emit(event);\n };\n\n private onKeyUp = (event: KeyboardEvent) => {\n this.bcmKeyUp.emit(event);\n };\n\n private hasSlotContent(slotName: string): boolean {\n return checkSlotContent(this.el, slotName);\n }\n\n private styleClass = tv(\n {\n slots: {\n base: [\n 'bcm-input bcm-input__container',\n 'bg-[--bcm-ui-color-background-base-default]',\n 'border border-solid rounded',\n 'flex items-center justify-between',\n 'transition-colors duration-200',\n 'px-2',\n ],\n inputClass: [\n 'input',\n 'w-full flex-1',\n 'border-0 outline-0 bg-transparent',\n 'appearance-none text-ellipsis',\n 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',\n 'font-sans antialiased font-medium',\n 'px-1',\n ],\n },\n variants: {\n size: {\n small: {\n base: '',\n inputClass: 'text-size-4 h-6',\n },\n medium: {\n base: '',\n inputClass: 'text-size-5 h-8',\n },\n large: {\n base: '',\n inputClass: 'text-size-6 h-10',\n },\n },\n status: {\n default: {\n base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],\n },\n error: {\n base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],\n },\n success: {\n base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],\n },\n warning: {\n base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],\n },\n info: {\n base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],\n },\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: 'disabled cursor-not-allowed',\n false: '',\n },\n focused: {\n true: {\n base: '',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'default',\n fullWidth: false,\n disabled: false,\n focused: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n private getDefaultIconForType(): string | undefined {\n return defaultIcons[this.type as keyof typeof defaultIcons];\n }\n\n render() {\n const inputId = this._id + '-input' || this.name;\n\n const { base, inputClass } = this.styleClass({\n size: this.size,\n status: this.internalStatus,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n focused: this.isFocused,\n });\n\n const iconSize = {\n small: 14,\n medium: 16,\n large: 18,\n }[this.size];\n\n return (\n <div class=\"bcm-ui-element\">\n {this.label && (\n <label\n class={classNames(\n 'input-label font-medium',\n {\n 'text-color-label': !this.disabled,\n 'text-color-disabled': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n htmlFor={inputId}\n >\n <slot name=\"label\">{this.label}</slot>\n {this.required && <span>*</span>}\n </label>\n )}\n\n <div class={base()}>\n {(this.hasSlotContent('prefix') || this.prefixIcon || this.getDefaultIconForType()) && (\n <div class=\"flex items-center gap-2 px-2\">\n {(this.prefixIcon || this.getDefaultIconForType()) && (\n <bcm-icon class=\"prefix-icon\" icon-name={this.prefixIcon || this.getDefaultIconForType()} size={iconSize}></bcm-icon>\n )}\n <slot name=\"prefix\"></slot>\n </div>\n )}\n <input\n ref={el => (this.inputRef = el)}\n id={inputId}\n class={inputClass()}\n type={this.type}\n name={this.name}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n placeholder={this.placeholder}\n autocomplete={this.autocomplete}\n minlength={this.minLength}\n maxlength={this.maxLength}\n min={this.min}\n max={this.max}\n step={this.step}\n pattern={this.pattern}\n aria-invalid={this.status === 'error'}\n aria-required={this.required}\n aria-labelledby={this.labelledby}\n aria-describedby={this.describedby}\n value={this.value}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n />\n {(this.hasSlotContent('suffix') || this.suffixIcon) && (\n <div class=\"flex items-center gap-2 px-2\">\n <slot name=\"suffix\"></slot>\n {this.suffixIcon && <bcm-icon class=\"suffix-icon\" icon-name={this.suffixIcon} size={iconSize}></bcm-icon>}\n </div>\n )}\n </div>\n {(this.captionText || this.internalErrorMessage || this.validationMessage) && (\n <div\n class={classNames(\n 'input-caption-text font-regular mt-1',\n {\n 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',\n 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),\n 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',\n 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',\n 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',\n 'text-[--bcm-ui-color-text-disabled]': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n >\n {!this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
2
|
-
import { c as
|
|
1
|
+
import { r as registerInstance, h } from './index-27cc1bac.js';
|
|
2
|
+
import { c as classNames } from './index-097075ad.js';
|
|
3
3
|
|
|
4
4
|
const variantTagMap = {
|
|
5
5
|
display: 'h1',
|
|
@@ -105,7 +105,7 @@ const BcmText = class {
|
|
|
105
105
|
render() {
|
|
106
106
|
const Tag = variantTagMap[this.variant];
|
|
107
107
|
const variantClass = this.getTextClass(this.variant, this.size);
|
|
108
|
-
return (h(Tag, { key: '
|
|
108
|
+
return (h(Tag, { key: 'a9ba5eeb50ec7e4bce324ae9f3e2ef91b6d68966', class: classNames('bcm-text appearance-none m-0 p-0', variantClass), part: "text" }, h("slot", { key: 'd656033433d725099f429978df47d119dba10727' }, this.text)));
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
Bc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MAAM,IAC3E,+DAAO,IAAI,CAAC,IAAI,CAAQ,CACpB,EACN;KACH;;;;;;","names":["cs"],"sources":["src/components/text/text.utils.ts","src/components/text/text.scss?tag=bcm-text&encapsulation=shadow","src/components/text/text.component.tsx"],"sourcesContent":["import { TextVariant, TextTag } from './text.types';\n\nexport const variantTagMap: Record<TextVariant, TextTag> = {\n display: 'h1',\n heading1: 'h2',\n heading2: 'h3',\n title1: 'h4',\n title2: 'h5',\n title3: 'h6',\n body: 'p',\n bodyAccent: 'p',\n helper: 'p',\n caption: 'p',\n label: 'label',\n placeholder: 'p',\n link: 'a',\n info: 'p',\n infoAccent: 'p',\n};\n","","import { Component, h, Prop } from '@stencil/core';\nimport cs from 'classnames';\nimport { TextVariant, TextSize } from './text.types';\nimport { variantTagMap } from './text.utils';\n\n@Component({\n tag: 'bcm-text',\n styleUrl: 'text.scss',\n shadow: true,\n})\nexport class BcmText {\n /** Text content */\n @Prop()\n text: string;\n\n /** Text variant */\n @Prop()\n variant: TextVariant = 'body';\n\n /** Text size */\n @Prop()\n size: TextSize = 'medium';\n\n private readonly variantClassMap = {\n display: 'font-semibold text-size-12 text-color-header',\n heading1: 'font-semibold text-size-7 text-color-header',\n heading2: 'font-semibold text-size-6 text-color-header',\n title1: {\n small: 'font-semibold text-size-5 text-color-header',\n medium: 'font-semibold text-size-6 text-color-header',\n large: 'font-semibold text-size-7 text-color-header',\n },\n title2: {\n small: 'font-semibold text-size-4 text-color-default',\n medium: 'font-semibold text-size-5 text-color-default',\n large: 'font-semibold text-size-6 text-color-default',\n },\n title3: {\n small: 'font-semibold text-size-3 text-color-disabled',\n medium: 'font-semibold text-size-4 text-color-disabled',\n large: 'font-semibold text-size-5 text-color-disabled',\n },\n body: {\n small: 'font-regular text-size-4 text-color-default',\n medium: 'font-regular text-size-5 text-color-default',\n large: 'font-regular text-size-6 text-color-default',\n },\n bodyAccent: {\n small: 'font-medium text-size-4 text-color-default',\n medium: 'font-medium text-size-5 text-color-default',\n large: 'font-medium text-size-6 text-color-default',\n },\n helper: {\n small: 'font-regular text-size-4 text-color-helper',\n medium: 'font-regular text-size-5 text-color-helper',\n large: 'font-regular text-size-6 text-color-helper',\n },\n caption: {\n small: 'font-regular text-size-3 text-color-caption',\n medium: 'font-regular text-size-4 text-color-caption',\n large: 'font-regular text-size-5 text-color-caption',\n },\n link: {\n small: 'font-medium text-size-4 underline text-color-primary',\n medium: 'font-medium text-size-5 underline text-color-primary',\n large: 'font-medium text-size-6 underline text-color-primary',\n },\n label: {\n small: 'font-medium text-size-3 text-color-label',\n medium: 'font-medium text-size-4 text-color-label',\n large: 'font-medium text-size-5 text-color-label',\n },\n placeholder: {\n small: 'font-regular text-size-4 text-color-placeholder',\n medium: 'font-regular text-size-5 text-color-placeholder',\n large: 'font-regular text-size-6 text-color-placeholder',\n },\n info: {\n small: 'font-regular text-size-3 text-color-default',\n medium: 'font-regular text-size-4 text-color-default',\n large: 'font-regular text-size-5 text-color-default',\n },\n infoAccent: {\n small: 'font-medium text-size-3 text-color-header',\n medium: 'font-medium text-size-4 text-color-header',\n large: 'font-medium text-size-5 text-color-header',\n },\n } as const;\n\n private getTextClass = (variant: TextVariant, size: TextSize): string => {\n const variantClasses = this.variantClassMap[variant];\n\n if (typeof variantClasses === 'string') {\n return variantClasses;\n }\n\n return variantClasses[size];\n };\n\n render() {\n const Tag = variantTagMap[this.variant];\n const variantClass = this.getTextClass(this.variant, this.size);\n\n return (\n <Tag class={cs('bcm-text appearance-none m-0 p-0', variantClass)} part=\"text\">\n <slot>{this.text}</slot>\n </Tag>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-27cc1bac.js';
|
|
2
|
+
import { c as ce } from './index-f3b17e60.js';
|
|
3
|
+
import { c as classNames } from './index-097075ad.js';
|
|
4
|
+
import { g as generateId, s as setValidationMessages, a as getValidationMessage, d as defaultValidationMessages } from './validation-messages-a29d53be.js';
|
|
5
|
+
|
|
6
|
+
const textareaCss = ".visible{visibility:visible}.collapse{visibility:collapse}.relative{position:relative}.block{display:block}.flex{display:flex}.table{display:table}.contents{display:contents}.hidden{display:none}.border-collapse{border-collapse:collapse}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize-none{resize:none;resize:none!important}.resize-y{resize:vertical;resize:vertical!important}.resize-x{resize:horizontal;resize:horizontal!important}.resize{resize:both!important;resize:both}.border{border-width:1px}.underline{text-decoration-line:underline}.outline{outline-style:solid}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid oklch(.928 .006 264.531);box-sizing:border-box}:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:Inter,sans-serif;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:oklch(.707 .022 261.325);opacity:1}input::placeholder,textarea::placeholder{color:oklch(.707 .022 261.325);opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:host{display:block;width:100%}.bcm-textarea__container{display:flex;flex-direction:column;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.mt-1{margin-top:.25rem}.min-h-0{min-height:0}.min-h-\\[3rem\\]{min-height:3rem}.min-h-\\[4rem\\]{min-height:4rem}.min-h-\\[5rem\\]{min-height:5rem}.w-full{width:100%}.grow{flex-grow:1}.cursor-not-allowed{cursor:not-allowed}.\\!resize-none{resize:none!important}.\\!resize-y{resize:vertical!important}.\\!resize-x{resize:horizontal!important}.\\!resize{resize:both!important}.appearance-none{appearance:none}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.border-0{border-width:0}.border-solid{border-style:solid}.border-\\[--bcm-ui-color-border-default\\]{border-color:var(--bcm-ui-color-border-default)}.border-\\[--bcm-ui-color-border-error\\]{border-color:var(--bcm-ui-color-border-error)}.border-\\[--bcm-ui-color-border-info\\]{border-color:var(--bcm-ui-color-border-info)}.border-\\[--bcm-ui-color-border-success\\]{border-color:var(--bcm-ui-color-border-success)}.border-\\[--bcm-ui-color-border-warning\\]{border-color:var(--bcm-ui-color-border-warning)}.bg-\\[--bcm-ui-color-background-base-default\\]{background-color:var(--bcm-ui-color-background-base-default)}.bg-transparent{background-color:transparent}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.text-right{text-align:right}.font-sans{font-family:Inter,sans-serif}.text-size-3{font-size:var(--bcm-ui-font-size-3,12px);line-height:var(--bcm-ui-line-height-3,16px)}.text-size-4{font-size:var(--bcm-ui-font-size-4,14px);line-height:var(--bcm-ui-line-height-4,20px)}.text-size-5{font-size:var(--bcm-ui-font-size-5,16px);line-height:var(--bcm-ui-line-height-5,24px)}.text-size-6{font-size:var(--bcm-ui-font-size-6,18px);line-height:var(--bcm-ui-line-height-6,24px)}.font-medium{font-weight:500}.text-\\[--bcm-ui-color-text-caption\\]{color:var(--bcm-ui-color-text-caption)}.text-\\[--bcm-ui-color-text-default\\]{color:var(--bcm-ui-color-text-default)}.text-\\[--bcm-ui-color-text-disabled\\]{color:var(--bcm-ui-color-text-disabled)}.text-\\[--bcm-ui-color-text-error\\]{color:var(--bcm-ui-color-text-error)}.text-\\[--bcm-ui-color-text-info\\]{color:var(--bcm-ui-color-text-info)}.text-\\[--bcm-ui-color-text-placeholder\\]{color:var(--bcm-ui-color-text-placeholder)}.text-\\[--bcm-ui-color-text-success\\]{color:var(--bcm-ui-color-text-success)}.text-\\[--bcm-ui-color-text-warning\\]{color:var(--bcm-ui-color-text-warning)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-label{color:var(--bcm-ui-color-text-label)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-0{outline-width:0}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-\\[--bcm-ui-color-border-primary\\]{--tw-ring-color:var(--bcm-ui-color-border-primary)}.ring-opacity-50{--tw-ring-opacity:0.5}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.placeholder\\:font-normal::placeholder{font-weight:400}.placeholder\\:text-\\[--bcm-ui-color-text-placeholder\\]::placeholder{color:var(--bcm-ui-color-text-placeholder)}.hover\\:border-\\[--bcm-ui-color-border-error\\]:hover{border-color:var(--bcm-ui-color-border-error)}.hover\\:border-\\[--bcm-ui-color-border-info\\]:hover{border-color:var(--bcm-ui-color-border-info)}.hover\\:border-\\[--bcm-ui-color-border-primary\\]:hover{border-color:var(--bcm-ui-color-border-primary)}.hover\\:border-\\[--bcm-ui-color-border-success\\]:hover{border-color:var(--bcm-ui-color-border-success)}.hover\\:border-\\[--bcm-ui-color-border-warning\\]:hover{border-color:var(--bcm-ui-color-border-warning)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-error\\]:has(:focus){border-color:var(--bcm-ui-color-border-error)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-info\\]:has(:focus){border-color:var(--bcm-ui-color-border-info)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-primary\\]:has(:focus){border-color:var(--bcm-ui-color-border-primary)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-success\\]:has(:focus){border-color:var(--bcm-ui-color-border-success)}.has-\\[\\:focus\\]\\:border-\\[--bcm-ui-color-border-warning\\]:has(:focus){border-color:var(--bcm-ui-color-border-warning)}";
|
|
7
|
+
const BcmTextareaStyle0 = textareaCss;
|
|
8
|
+
|
|
9
|
+
const BcmTextarea = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.bcmInput = createEvent(this, "bcmInput", 1);
|
|
13
|
+
this.bcmChange = createEvent(this, "bcmChange", 1);
|
|
14
|
+
this.bcmFocus = createEvent(this, "bcmFocus", 1);
|
|
15
|
+
this.bcmBlur = createEvent(this, "bcmBlur", 1);
|
|
16
|
+
this.bcmKeyDown = createEvent(this, "bcmKeyDown", 1);
|
|
17
|
+
this.bcmKeyUp = createEvent(this, "bcmKeyUp", 1);
|
|
18
|
+
this.isFocused = false;
|
|
19
|
+
this.isValid = true;
|
|
20
|
+
this.internalStatus = 'default';
|
|
21
|
+
/** Textarea value */
|
|
22
|
+
this.value = '';
|
|
23
|
+
/** Textarea rows */
|
|
24
|
+
this.rows = 3;
|
|
25
|
+
/** Resize behavior */
|
|
26
|
+
this.resize = 'none';
|
|
27
|
+
/** Auto grow height based on content */
|
|
28
|
+
this.autoGrow = false;
|
|
29
|
+
/** Input id */
|
|
30
|
+
this._id = generateId('textarea');
|
|
31
|
+
/** Controls the textarea size */
|
|
32
|
+
this.size = 'medium';
|
|
33
|
+
/** Defines the textarea's status/state */
|
|
34
|
+
this.status = 'default';
|
|
35
|
+
/** Full width textarea */
|
|
36
|
+
this.fullWidth = false;
|
|
37
|
+
/** Whether the textarea is disabled */
|
|
38
|
+
this.disabled = false;
|
|
39
|
+
/** Whether the textarea is readonly */
|
|
40
|
+
this.readonly = false;
|
|
41
|
+
/** Whether the textarea is required */
|
|
42
|
+
this.required = false;
|
|
43
|
+
/** Show character counter */
|
|
44
|
+
this.showCounter = true;
|
|
45
|
+
this.onChange = (event) => {
|
|
46
|
+
this.bcmChange.emit(event);
|
|
47
|
+
};
|
|
48
|
+
this.onFocus = (event) => {
|
|
49
|
+
this.isFocused = true;
|
|
50
|
+
this.bcmFocus.emit(event);
|
|
51
|
+
};
|
|
52
|
+
this.onBlur = (event) => {
|
|
53
|
+
this.isFocused = false;
|
|
54
|
+
this.bcmBlur.emit(event);
|
|
55
|
+
this.validateInput();
|
|
56
|
+
};
|
|
57
|
+
this.onKeyDown = (event) => {
|
|
58
|
+
this.bcmKeyDown.emit(event);
|
|
59
|
+
};
|
|
60
|
+
this.onKeyUp = (event) => {
|
|
61
|
+
this.bcmKeyUp.emit(event);
|
|
62
|
+
};
|
|
63
|
+
this.styleClass = ce({
|
|
64
|
+
slots: {
|
|
65
|
+
base: [
|
|
66
|
+
'bcm-textarea bcm-textarea__container',
|
|
67
|
+
'bg-[--bcm-ui-color-background-base-default]',
|
|
68
|
+
'border border-solid rounded',
|
|
69
|
+
'flex flex-col', // flex-col ekledik
|
|
70
|
+
'transition-colors duration-200',
|
|
71
|
+
'px-2 py-2',
|
|
72
|
+
'w-full', // w-full ekledik
|
|
73
|
+
],
|
|
74
|
+
textareaClass: [
|
|
75
|
+
'textarea',
|
|
76
|
+
'w-full',
|
|
77
|
+
'border-0 outline-0 bg-transparent',
|
|
78
|
+
'appearance-none',
|
|
79
|
+
'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',
|
|
80
|
+
'font-sans antialiased font-medium',
|
|
81
|
+
'px-1',
|
|
82
|
+
'overflow-y-auto', // overflow-y-auto ekledik
|
|
83
|
+
'min-h-0', // min-h-0 ekledik
|
|
84
|
+
],
|
|
85
|
+
counterText: ['textarea-counter-text', 'text-[--bcm-ui-color-text-placeholder]', 'text-right', 'mt-1'],
|
|
86
|
+
},
|
|
87
|
+
variants: {
|
|
88
|
+
size: {
|
|
89
|
+
small: {
|
|
90
|
+
base: '',
|
|
91
|
+
textareaClass: 'text-size-4 min-h-[3rem]',
|
|
92
|
+
counterText: 'text-size-3',
|
|
93
|
+
},
|
|
94
|
+
medium: {
|
|
95
|
+
base: '',
|
|
96
|
+
textareaClass: 'text-size-5 min-h-[4rem]',
|
|
97
|
+
counterText: 'text-size-4',
|
|
98
|
+
},
|
|
99
|
+
large: {
|
|
100
|
+
base: '',
|
|
101
|
+
textareaClass: 'text-size-6 min-h-[5rem]',
|
|
102
|
+
counterText: 'text-size-5',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
resize: {
|
|
106
|
+
none: { textareaClass: '!resize-none' },
|
|
107
|
+
both: { textareaClass: '!resize' },
|
|
108
|
+
horizontal: { textareaClass: '!resize-x' },
|
|
109
|
+
vertical: { textareaClass: '!resize-y' },
|
|
110
|
+
},
|
|
111
|
+
status: {
|
|
112
|
+
default: {
|
|
113
|
+
base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],
|
|
114
|
+
},
|
|
115
|
+
error: {
|
|
116
|
+
base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],
|
|
117
|
+
},
|
|
118
|
+
success: {
|
|
119
|
+
base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],
|
|
120
|
+
},
|
|
121
|
+
warning: {
|
|
122
|
+
base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],
|
|
123
|
+
},
|
|
124
|
+
info: {
|
|
125
|
+
base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
fullWidth: {
|
|
129
|
+
true: 'full-width w-full',
|
|
130
|
+
},
|
|
131
|
+
disabled: {
|
|
132
|
+
true: {
|
|
133
|
+
base: 'disabled cursor-not-allowed opacity-50',
|
|
134
|
+
textareaClass: '!resize-none', // disabled durumunda resize'ı engelle
|
|
135
|
+
},
|
|
136
|
+
false: '',
|
|
137
|
+
},
|
|
138
|
+
focused: {
|
|
139
|
+
true: {
|
|
140
|
+
base: 'ring-2 ring-[--bcm-ui-color-border-primary] ring-opacity-50',
|
|
141
|
+
},
|
|
142
|
+
false: '',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
defaultVariants: {
|
|
146
|
+
size: 'medium',
|
|
147
|
+
status: 'default',
|
|
148
|
+
resize: 'vertical',
|
|
149
|
+
fullWidth: false,
|
|
150
|
+
disabled: false,
|
|
151
|
+
focused: false,
|
|
152
|
+
},
|
|
153
|
+
}, {
|
|
154
|
+
twMerge: false,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
handleValueChange(newValue) {
|
|
158
|
+
if (this.textareaRef) {
|
|
159
|
+
this.textareaRef.value = newValue;
|
|
160
|
+
if (this.autoGrow) {
|
|
161
|
+
this.adjustHeight();
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
watchStatus(newValue) {
|
|
166
|
+
this.internalStatus = newValue;
|
|
167
|
+
}
|
|
168
|
+
watchErrorMessage(newValue) {
|
|
169
|
+
this.internalErrorMessage = newValue;
|
|
170
|
+
}
|
|
171
|
+
componentWillLoad() {
|
|
172
|
+
setValidationMessages('en', defaultValidationMessages);
|
|
173
|
+
this.internalStatus = this.status;
|
|
174
|
+
this.internalErrorMessage = this.errorMessage;
|
|
175
|
+
}
|
|
176
|
+
componentDidLoad() {
|
|
177
|
+
var _a;
|
|
178
|
+
if (this.autoGrow) {
|
|
179
|
+
this.adjustHeight();
|
|
180
|
+
// Input event'ini dinle
|
|
181
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.addEventListener('input', () => this.adjustHeight());
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
disconnectedCallback() {
|
|
185
|
+
// Event listener'ı temizle
|
|
186
|
+
if (this.autoGrow && this.textareaRef) {
|
|
187
|
+
this.textareaRef.removeEventListener('input', () => this.adjustHeight());
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
async setFocus() {
|
|
191
|
+
var _a;
|
|
192
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
193
|
+
}
|
|
194
|
+
async setBlur() {
|
|
195
|
+
var _a;
|
|
196
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.blur();
|
|
197
|
+
}
|
|
198
|
+
async select() {
|
|
199
|
+
var _a;
|
|
200
|
+
(_a = this.textareaRef) === null || _a === void 0 ? void 0 : _a.select();
|
|
201
|
+
}
|
|
202
|
+
adjustHeight() {
|
|
203
|
+
if (!this.autoGrow || !this.textareaRef)
|
|
204
|
+
return;
|
|
205
|
+
requestAnimationFrame(() => {
|
|
206
|
+
// Önce height'ı sıfırla ki scrollHeight doğru hesaplansın
|
|
207
|
+
this.textareaRef.style.height = '0px';
|
|
208
|
+
const computedStyle = getComputedStyle(this.textareaRef);
|
|
209
|
+
const lineHeight = parseInt(computedStyle.lineHeight);
|
|
210
|
+
const paddingTop = parseInt(computedStyle.paddingTop);
|
|
211
|
+
const paddingBottom = parseInt(computedStyle.paddingBottom);
|
|
212
|
+
const scrollHeight = this.textareaRef.scrollHeight;
|
|
213
|
+
let newHeight = scrollHeight;
|
|
214
|
+
// Min/max kontrolleri
|
|
215
|
+
if (this.minRows) {
|
|
216
|
+
const minHeight = this.minRows * lineHeight + paddingTop + paddingBottom;
|
|
217
|
+
newHeight = Math.max(newHeight, minHeight);
|
|
218
|
+
}
|
|
219
|
+
if (this.maxRows) {
|
|
220
|
+
const maxHeight = this.maxRows * lineHeight + paddingTop + paddingBottom;
|
|
221
|
+
newHeight = Math.min(newHeight, maxHeight);
|
|
222
|
+
}
|
|
223
|
+
this.textareaRef.style.height = `${newHeight}px`;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
validateInput() {
|
|
227
|
+
if (!this.textareaRef)
|
|
228
|
+
return;
|
|
229
|
+
// Reset validation state
|
|
230
|
+
this.isValid = true;
|
|
231
|
+
this.validationMessage = '';
|
|
232
|
+
const value = this.textareaRef.value;
|
|
233
|
+
// Required check
|
|
234
|
+
if (this.required && !value) {
|
|
235
|
+
this.isValid = false;
|
|
236
|
+
this.validationMessage = getValidationMessage('required');
|
|
237
|
+
this.internalStatus = 'error';
|
|
238
|
+
this.internalErrorMessage = this.validationMessage;
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
// Minimum length check
|
|
242
|
+
if (this.minLength && value.length < this.minLength) {
|
|
243
|
+
this.isValid = false;
|
|
244
|
+
this.validationMessage = getValidationMessage('minlength', { min: this.minLength });
|
|
245
|
+
}
|
|
246
|
+
// Maximum length check
|
|
247
|
+
else if (this.maxLength && value.length > this.maxLength) {
|
|
248
|
+
this.isValid = false;
|
|
249
|
+
this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });
|
|
250
|
+
}
|
|
251
|
+
// Custom validator
|
|
252
|
+
if (this.validator) {
|
|
253
|
+
const customError = this.validator(value);
|
|
254
|
+
if (customError) {
|
|
255
|
+
this.isValid = false;
|
|
256
|
+
this.validationMessage = customError;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Update component state
|
|
260
|
+
this.internalStatus = this.isValid ? 'default' : 'error';
|
|
261
|
+
this.internalErrorMessage = this.validationMessage;
|
|
262
|
+
}
|
|
263
|
+
render() {
|
|
264
|
+
const textareaId = this._id + '-textarea' || this.name;
|
|
265
|
+
const { base, textareaClass, counterText } = this.styleClass({
|
|
266
|
+
size: this.size,
|
|
267
|
+
status: this.internalStatus,
|
|
268
|
+
resize: this.resize,
|
|
269
|
+
fullWidth: this.fullWidth,
|
|
270
|
+
disabled: this.disabled,
|
|
271
|
+
focused: this.isFocused,
|
|
272
|
+
});
|
|
273
|
+
return (h("div", { key: '3b518823eafee23f5efb8fecdd1869cb0625f712', class: "bcm-ui-element" }, this.label && (h("label", { key: '17851980564ab95c9a1ac30fa494c3b4ef50f75b', class: classNames('textarea-label font-medium', {
|
|
274
|
+
'text-color-label': !this.disabled,
|
|
275
|
+
'text-color-disabled': this.disabled,
|
|
276
|
+
}, {
|
|
277
|
+
'text-size-3': this.size === 'small',
|
|
278
|
+
'text-size-4': this.size === 'medium',
|
|
279
|
+
'text-size-5': this.size === 'large',
|
|
280
|
+
}), htmlFor: textareaId }, h("slot", { key: '3a0c9c5d95ac3389f3d48d41577b88ee21dfb940', name: "label" }, this.label), this.required && h("span", { key: 'fd499a157c4ff22f17feaabcbe7c5a2d2d75e35b' }, "*"))), h("div", { key: '625e4a27c30495aaf39259e8ac68bc1d819fd506', class: base() }, h("textarea", { key: 'be30548713a724d4f535885c7b6838fb056d0b3d', ref: el => (this.textareaRef = el), id: textareaId, class: textareaClass(), name: this.name, rows: this.rows, cols: this.cols, disabled: this.disabled, readonly: this.readonly, required: this.required, placeholder: this.placeholder, minLength: this.minLength, maxLength: this.maxLength, "aria-invalid": this.status === 'error', "aria-required": this.required, "aria-labelledby": this.labelledby, "aria-describedby": this.describedby, value: this.value, onInput: event => {
|
|
281
|
+
const target = event.target;
|
|
282
|
+
this.value = target.value;
|
|
283
|
+
this.bcmInput.emit(event);
|
|
284
|
+
this.validateInput();
|
|
285
|
+
if (this.autoGrow) {
|
|
286
|
+
this.adjustHeight();
|
|
287
|
+
}
|
|
288
|
+
}, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, onKeyUp: this.onKeyUp }), this.showCounter && (h("div", { key: '1ebabb979efac47054160558fab66d4fccc603f9', class: counterText() }, this.value.length, this.maxLength ? `/${this.maxLength}` : ''))), (this.captionText || this.internalErrorMessage || this.validationMessage) && (h("div", { key: '1c7f59c0d4337c7c359dc9aea3e332e5715bf80d', class: classNames('textarea-caption-text font-regular mt-1', {
|
|
289
|
+
'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',
|
|
290
|
+
'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),
|
|
291
|
+
'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',
|
|
292
|
+
'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',
|
|
293
|
+
'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',
|
|
294
|
+
'text-[--bcm-ui-color-text-disabled]': this.disabled,
|
|
295
|
+
}, {
|
|
296
|
+
'text-size-3': this.size === 'small',
|
|
297
|
+
'text-size-4': this.size === 'medium',
|
|
298
|
+
'text-size-5': this.size === 'large',
|
|
299
|
+
}) }, !this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText))));
|
|
300
|
+
}
|
|
301
|
+
get el() { return getElement(this); }
|
|
302
|
+
static get watchers() { return {
|
|
303
|
+
"value": ["handleValueChange"],
|
|
304
|
+
"status": ["watchStatus"],
|
|
305
|
+
"errorMessage": ["watchErrorMessage"]
|
|
306
|
+
}; }
|
|
307
|
+
};
|
|
308
|
+
BcmTextarea.style = BcmTextareaStyle0;
|
|
309
|
+
|
|
310
|
+
export { BcmTextarea as bcm_textarea };
|
|
311
|
+
|
|
312
|
+
//# sourceMappingURL=bcm-textarea.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"bcm-textarea.entry.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,i4QAAi4Q,CAAC;AACt5Q,0BAAe,WAAW;;MCYb,WAAW;IALxB;;;;;;;;QASW,cAAS,GAAG,KAAK,CAAC;Q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KAAK,OAAO,GAAG,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,WAAW,CACpH,CACP,CACG,EACN;KACH;;;;;;;;;;;;","names":["tv"],"sources":["src/components/textarea/textarea.scss?tag=bcm-textarea&encapsulation=shadow","src/components/textarea/textarea.component.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n}\n\n.bcm-textarea {\n &__container {\n display: flex;\n flex-direction: column;\n width: 100%;\n }\n}\n\n// Tailwind'in resize sınıflarını override et\n.resize-none {\n resize: none !important;\n}\n\n.resize {\n resize: both !important;\n}\n\n.resize-y {\n resize: vertical !important;\n}\n\n.resize-x {\n resize: horizontal !important;\n}\n","import { Component, Prop, h, Event, EventEmitter, Method, State, Watch, Element } from '@stencil/core';\nimport { InputSize, InputStatus, TextareaResize } from './types';\nimport { tv } from 'tailwind-variants';\nimport classNames from 'classnames';\nimport { generateId } from '../../utils/id/generate-id';\n// import { checkSlotContent } from '../../utils/slot/check-slot-content';\nimport { getValidationMessage, setValidationMessages, defaultValidationMessages } from '../../utils/validation-messages';\n\n@Component({\n tag: 'bcm-textarea',\n styleUrl: 'textarea.scss',\n shadow: true,\n})\nexport class BcmTextarea {\n @Element() el: HTMLElement;\n private textareaRef: HTMLTextAreaElement;\n\n @State() isFocused = false;\n @State() validationMessage: string;\n @State() isValid = true;\n @State() internalStatus: InputStatus = 'default';\n @State() internalErrorMessage: string;\n\n /** Textarea value */\n @Prop({ mutable: true, reflect: true })\n value: string = '';\n\n /** Textarea rows */\n @Prop()\n rows?: number = 3;\n\n /** Textarea cols */\n @Prop()\n cols?: number;\n\n /** Minimum height in rows */\n @Prop()\n minRows?: number;\n\n /** Maximum height in rows */\n @Prop()\n maxRows?: number;\n\n /** Resize behavior */\n @Prop()\n resize: TextareaResize = 'none';\n\n /** Auto grow height based on content */\n @Prop()\n autoGrow = false;\n\n /** Input placeholder text */\n @Prop()\n placeholder?: string;\n\n /** Input name */\n @Prop()\n name?: string;\n\n /** Input id */\n @Prop({ attribute: 'id', reflect: true })\n _id?: string = generateId('textarea');\n\n /** Controls the textarea size */\n @Prop()\n size: InputSize = 'medium';\n\n /** Defines the textarea's status/state */\n @Prop()\n status: InputStatus = 'default';\n\n /** Full width textarea */\n @Prop({ attribute: 'full-width', reflect: true })\n fullWidth = false;\n\n /** Whether the textarea is disabled */\n @Prop()\n disabled = false;\n\n /** Whether the textarea is readonly */\n @Prop()\n readonly = false;\n\n /** Whether the textarea is required */\n @Prop()\n required = false;\n\n /** Min length for text input */\n @Prop()\n minLength?: number;\n\n /** Max length for text input */\n @Prop()\n maxLength?: number;\n\n /** Show character counter */\n @Prop()\n showCounter: boolean = true;\n\n /** Textarea label for accessibility */\n @Prop()\n label?: string;\n\n /** Error message to display */\n @Prop()\n errorMessage?: string;\n\n /** Caption text to display below textarea */\n @Prop()\n captionText?: string;\n\n /** ID of associated label element */\n @Prop()\n labelledby?: string;\n\n /** ID of associated caption/error text element */\n @Prop()\n describedby?: string;\n\n /** Custom validation function */\n @Prop()\n validator?: (value: string) => string | undefined;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmInput: EventEmitter<InputEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmChange: EventEmitter<Event>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmFocus: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmBlur: EventEmitter<FocusEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyDown: EventEmitter<KeyboardEvent>;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n })\n bcmKeyUp: EventEmitter<KeyboardEvent>;\n\n @Watch('value')\n handleValueChange(newValue: string) {\n if (this.textareaRef) {\n this.textareaRef.value = newValue;\n if (this.autoGrow) {\n this.adjustHeight();\n }\n }\n }\n\n @Watch('status')\n watchStatus(newValue: InputStatus) {\n this.internalStatus = newValue;\n }\n\n @Watch('errorMessage')\n watchErrorMessage(newValue: string) {\n this.internalErrorMessage = newValue;\n }\n\n componentWillLoad() {\n setValidationMessages('en', defaultValidationMessages);\n this.internalStatus = this.status;\n this.internalErrorMessage = this.errorMessage;\n }\n\n componentDidLoad() {\n if (this.autoGrow) {\n this.adjustHeight();\n // Input event'ini dinle\n this.textareaRef?.addEventListener('input', () => this.adjustHeight());\n }\n }\n\n disconnectedCallback() {\n // Event listener'ı temizle\n if (this.autoGrow && this.textareaRef) {\n this.textareaRef.removeEventListener('input', () => this.adjustHeight());\n }\n }\n\n @Method()\n async setFocus() {\n this.textareaRef?.focus();\n }\n\n @Method()\n async setBlur() {\n this.textareaRef?.blur();\n }\n\n @Method()\n async select() {\n this.textareaRef?.select();\n }\n\n private adjustHeight() {\n if (!this.autoGrow || !this.textareaRef) return;\n\n requestAnimationFrame(() => {\n // Önce height'ı sıfırla ki scrollHeight doğru hesaplansın\n this.textareaRef.style.height = '0px';\n\n const computedStyle = getComputedStyle(this.textareaRef);\n const lineHeight = parseInt(computedStyle.lineHeight);\n const paddingTop = parseInt(computedStyle.paddingTop);\n const paddingBottom = parseInt(computedStyle.paddingBottom);\n const scrollHeight = this.textareaRef.scrollHeight;\n\n let newHeight = scrollHeight;\n\n // Min/max kontrolleri\n if (this.minRows) {\n const minHeight = this.minRows * lineHeight + paddingTop + paddingBottom;\n newHeight = Math.max(newHeight, minHeight);\n }\n\n if (this.maxRows) {\n const maxHeight = this.maxRows * lineHeight + paddingTop + paddingBottom;\n newHeight = Math.min(newHeight, maxHeight);\n }\n\n this.textareaRef.style.height = `${newHeight}px`;\n });\n }\n\n private validateInput(): void {\n if (!this.textareaRef) return;\n\n // Reset validation state\n this.isValid = true;\n this.validationMessage = '';\n\n const value = this.textareaRef.value;\n\n // Required check\n if (this.required && !value) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('required');\n this.internalStatus = 'error';\n this.internalErrorMessage = this.validationMessage;\n return;\n }\n\n // Minimum length check\n if (this.minLength && value.length < this.minLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('minlength', { min: this.minLength });\n }\n // Maximum length check\n else if (this.maxLength && value.length > this.maxLength) {\n this.isValid = false;\n this.validationMessage = getValidationMessage('maxlength', { max: this.maxLength });\n }\n\n // Custom validator\n if (this.validator) {\n const customError = this.validator(value);\n if (customError) {\n this.isValid = false;\n this.validationMessage = customError;\n }\n }\n\n // Update component state\n this.internalStatus = this.isValid ? 'default' : 'error';\n this.internalErrorMessage = this.validationMessage;\n }\n\n private onChange = (event: Event) => {\n this.bcmChange.emit(event);\n };\n\n private onFocus = (event: FocusEvent) => {\n this.isFocused = true;\n this.bcmFocus.emit(event);\n };\n\n private onBlur = (event: FocusEvent) => {\n this.isFocused = false;\n this.bcmBlur.emit(event);\n this.validateInput();\n };\n\n private onKeyDown = (event: KeyboardEvent) => {\n this.bcmKeyDown.emit(event);\n };\n\n private onKeyUp = (event: KeyboardEvent) => {\n this.bcmKeyUp.emit(event);\n };\n\n private styleClass = tv(\n {\n slots: {\n base: [\n 'bcm-textarea bcm-textarea__container',\n 'bg-[--bcm-ui-color-background-base-default]',\n 'border border-solid rounded',\n 'flex flex-col', // flex-col ekledik\n 'transition-colors duration-200',\n 'px-2 py-2',\n 'w-full', // w-full ekledik\n ],\n textareaClass: [\n 'textarea',\n 'w-full',\n 'border-0 outline-0 bg-transparent',\n 'appearance-none',\n 'text-[--bcm-ui-color-text-default] placeholder:text-[--bcm-ui-color-text-placeholder] placeholder:font-normal',\n 'font-sans antialiased font-medium',\n 'px-1',\n 'overflow-y-auto', // overflow-y-auto ekledik\n 'min-h-0', // min-h-0 ekledik\n ],\n counterText: ['textarea-counter-text', 'text-[--bcm-ui-color-text-placeholder]', 'text-right', 'mt-1'],\n },\n variants: {\n size: {\n small: {\n base: '',\n textareaClass: 'text-size-4 min-h-[3rem]',\n counterText: 'text-size-3',\n },\n medium: {\n base: '',\n textareaClass: 'text-size-5 min-h-[4rem]',\n counterText: 'text-size-4',\n },\n large: {\n base: '',\n textareaClass: 'text-size-6 min-h-[5rem]',\n counterText: 'text-size-5',\n },\n },\n resize: {\n none: { textareaClass: '!resize-none' },\n both: { textareaClass: '!resize' },\n horizontal: { textareaClass: '!resize-x' },\n vertical: { textareaClass: '!resize-y' },\n },\n status: {\n default: {\n base: ['border-[--bcm-ui-color-border-default]', 'hover:border-[--bcm-ui-color-border-primary]', 'has-[:focus]:border-[--bcm-ui-color-border-primary]'],\n },\n error: {\n base: ['border-[--bcm-ui-color-border-error]', 'hover:border-[--bcm-ui-color-border-error]', 'has-[:focus]:border-[--bcm-ui-color-border-error]'],\n },\n success: {\n base: ['border-[--bcm-ui-color-border-success]', 'hover:border-[--bcm-ui-color-border-success]', 'has-[:focus]:border-[--bcm-ui-color-border-success]'],\n },\n warning: {\n base: ['border-[--bcm-ui-color-border-warning]', 'hover:border-[--bcm-ui-color-border-warning]', 'has-[:focus]:border-[--bcm-ui-color-border-warning]'],\n },\n info: {\n base: ['border-[--bcm-ui-color-border-info]', 'hover:border-[--bcm-ui-color-border-info]', 'has-[:focus]:border-[--bcm-ui-color-border-info]'],\n },\n },\n fullWidth: {\n true: 'full-width w-full',\n },\n disabled: {\n true: {\n base: 'disabled cursor-not-allowed opacity-50',\n textareaClass: '!resize-none', // disabled durumunda resize'ı engelle\n },\n false: '',\n },\n focused: {\n true: {\n base: 'ring-2 ring-[--bcm-ui-color-border-primary] ring-opacity-50',\n },\n false: '',\n },\n },\n defaultVariants: {\n size: 'medium',\n status: 'default',\n resize: 'vertical',\n fullWidth: false,\n disabled: false,\n focused: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const textareaId = this._id + '-textarea' || this.name;\n\n const { base, textareaClass, counterText } = this.styleClass({\n size: this.size,\n status: this.internalStatus,\n resize: this.resize,\n fullWidth: this.fullWidth,\n disabled: this.disabled,\n focused: this.isFocused,\n });\n\n return (\n <div class=\"bcm-ui-element\">\n {/* Label rendering */}\n {this.label && (\n <label\n class={classNames(\n 'textarea-label font-medium',\n {\n 'text-color-label': !this.disabled,\n 'text-color-disabled': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n htmlFor={textareaId}\n >\n <slot name=\"label\">{this.label}</slot>\n {this.required && <span>*</span>}\n </label>\n )}\n\n {/* Textarea container */}\n <div class={base()}>\n <textarea\n ref={el => (this.textareaRef = el)}\n id={textareaId}\n class={textareaClass()}\n name={this.name}\n rows={this.rows}\n cols={this.cols}\n disabled={this.disabled}\n readonly={this.readonly}\n required={this.required}\n placeholder={this.placeholder}\n minLength={this.minLength}\n maxLength={this.maxLength}\n aria-invalid={this.status === 'error'}\n aria-required={this.required}\n aria-labelledby={this.labelledby}\n aria-describedby={this.describedby}\n value={this.value}\n onInput={event => {\n const target = event.target as HTMLTextAreaElement;\n this.value = target.value;\n this.bcmInput.emit(event);\n this.validateInput();\n if (this.autoGrow) {\n this.adjustHeight();\n }\n }}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyDown={this.onKeyDown}\n onKeyUp={this.onKeyUp}\n />\n {/* buraya isteğe bağlı olarak gözüken bir karakter sayacı ekleyeceğiz. bu sayaç sağa yaslı olacak şu formatta olacak 0/120 gibi 0 mevcut karakteri 120 ise limiti gösterecek */}\n {this.showCounter && (\n <div class={counterText()}>\n {this.value.length}\n {this.maxLength ? `/${this.maxLength}` : ''}\n </div>\n )}\n </div>\n\n {/* Validation/Caption message */}\n {(this.captionText || this.internalErrorMessage || this.validationMessage) && (\n <div\n class={classNames(\n 'textarea-caption-text font-regular mt-1',\n {\n 'text-[--bcm-ui-color-text-caption]': !this.disabled && this.internalStatus === 'default',\n 'text-[--bcm-ui-color-text-error]': !this.disabled && (this.internalStatus === 'error' || !this.isValid),\n 'text-[--bcm-ui-color-text-success]': !this.disabled && this.internalStatus === 'success',\n 'text-[--bcm-ui-color-text-warning]': !this.disabled && this.internalStatus === 'warning',\n 'text-[--bcm-ui-color-text-info]': !this.disabled && this.internalStatus === 'info',\n 'text-[--bcm-ui-color-text-disabled]': this.disabled,\n },\n {\n 'text-size-3': this.size === 'small',\n 'text-size-4': this.size === 'medium',\n 'text-size-5': this.size === 'large',\n },\n )}\n >\n {!this.isValid ? this.validationMessage : this.internalStatus === 'error' ? this.internalErrorMessage : this.captionText}\n </div>\n )}\n </div>\n );\n }\n}\n"],"version":3}
|
package/dist/esm/bromcom-ui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-27cc1bac.js';
|
|
2
|
+
export { s as setNonce } from './index-27cc1bac.js';
|
|
3
|
+
import { g as globalScripts } from './app-globals-bfa07b76.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -16,7 +16,7 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["bcm-
|
|
19
|
+
return bootstrapLazy([["bcm-accordion",[[1,"bcm-accordion",{"expanded":[1540],"headerTitle":[1,"header-title"],"group":[516],"hintText":[1,"hint-text"],"hasFooterContent":[32],"toggle":[64],"expand":[64],"collapse":[64]}]]],["bcm-accordion-group",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-chip",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-input",[[1,"bcm-input",{"value":[1537],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"type":[1],"disabled":[4],"readonly":[4],"required":[4],"autocomplete":[1],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"min":[2],"max":[2],"step":[2],"pattern":[1],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"prefixIcon":[1,"prefix-icon"],"suffixIcon":[1,"suffix-icon"],"useNativeValidation":[4,"use-native-validation"],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"setFocus":[64],"setBlur":[64],"select":[64],"setLocale":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-text",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea",[[1,"bcm-textarea",{"value":[1537],"rows":[2],"cols":[2],"minRows":[2,"min-rows"],"maxRows":[2,"max-rows"],"resize":[1],"autoGrow":[4,"auto-grow"],"placeholder":[1],"name":[1],"_id":[513,"id"],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"disabled":[4],"readonly":[4],"required":[4],"minLength":[2,"min-length"],"maxLength":[2,"max-length"],"showCounter":[4,"show-counter"],"label":[1],"errorMessage":[1,"error-message"],"captionText":[1,"caption-text"],"labelledby":[1],"describedby":[1],"validator":[16],"isFocused":[32],"validationMessage":[32],"isValid":[32],"internalStatus":[32],"internalErrorMessage":[32],"setFocus":[64],"setBlur":[64],"select":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-avatar_4",[[1,"bcm-avatar",{"image":[1],"alt":[1],"shape":[1],"size":[1],"color":[1],"icon":[1],"status":[1],"blink":[4],"name":[1],"isFallback":[32]}],[1,"bcm-basic-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"icon":[1],"iconPosition":[1,"icon-position"],"iconOnly":[4,"icon-only"],"fullWidth":[516,"full-width"],"type":[1],"loading":[4],"disabled":[4],"text":[1],"active":[4],"form":[1],"value":[1],"name":[1],"label":[1],"expanded":[1],"controls":[1]}],[1,"bcm-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}]]]], options);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
//# sourceMappingURL=bromcom-ui.js.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
1
|
var classnames = {exports: {}};
|
|
4
2
|
|
|
5
3
|
/*!
|
|
@@ -77,8 +75,8 @@ var classnames = {exports: {}};
|
|
|
77
75
|
}());
|
|
78
76
|
}(classnames));
|
|
79
77
|
|
|
80
|
-
const
|
|
78
|
+
const classNames = classnames.exports;
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
export { classNames as c };
|
|
83
81
|
|
|
84
|
-
//# sourceMappingURL=index-
|
|
82
|
+
//# sourceMappingURL=index-097075ad.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index-
|
|
1
|
+
{"file":"index-097075ad.js","mappings":";;;;;;;;;AAKA;AACA;AACA,CAAC,YAAY;AAEb;AACA,CAAC,IAAI,MAAM,GAAG,EAAE,CAAC,cAAc,CAAC;AAChC;AACA,CAAC,SAAS,UAAU,IAAI;AACxB,EAAE,IAAI,OAAO,GAAG,EAAE,CAAC;AACnB;AACA,EAAE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;AAC7C,GAAG,IAAI,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;AAC1B,GAAG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AC,QAAQ,EAAE;AACjB,GAAG,OAAO,KAAK,CAAC;AAChB,GAAG;AACH;AACA,EAAE,IAAI,KAAK,EAAE;AACb,GAAG,OAAO,KAAK,GAAG,GAAG,GAAG,QAAQ,CAAC;AACjC,GAAG;AACH;AACA,EAAE,OAAO,KAAK,GAAG,QAAQ,CAAC;AAC1B,EAAE;AACF;AACA,CAAC,IAAqC,MAAM,CAAC,OAAO,EAAE;AACtD,EAAE,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC;AAClC,EAAE,iBAAiB,UAAU,CAAC;AAC9B,EAAE,MAKM;AACR,EAAE,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,EAAE;AACF,CAAC,EAAE;;;;;;;","names":[],"sources":["node_modules/classnames/index.js"],"sourcesContent":["/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n"],"version":3}
|