bromcom-ui-next 0.1.7 → 0.1.8
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 +10 -0
- package/dist/bromcom-ui/p-0d273bac.entry.js +2 -0
- package/dist/bromcom-ui/{p-f2d8aa70.entry.js.map → p-0d273bac.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-1bf71c9b.entry.js +2 -0
- package/dist/bromcom-ui/{p-7d8ad3dd.entry.js.map → p-1bf71c9b.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-a1aae3ef.entry.js +2 -0
- package/dist/bromcom-ui/p-a1aae3ef.entry.js.map +1 -0
- package/dist/bromcom-ui/p-a3dbbeaf.entry.js +2 -0
- package/dist/bromcom-ui/{p-c2b3945e.entry.js.map → p-a3dbbeaf.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-b1b493ab.entry.js +2 -0
- package/dist/bromcom-ui/p-b1b493ab.entry.js.map +1 -0
- package/dist/bromcom-ui/p-c427ffee.entry.js +2 -0
- package/dist/bromcom-ui/{p-15829c47.entry.js.map → p-c427ffee.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-cee68279.entry.js +2 -0
- package/dist/bromcom-ui/{p-4b7294a3.entry.js.map → p-cee68279.entry.js.map} +1 -1
- package/dist/bromcom-ui/p-ddf64315.js +2 -0
- package/dist/bromcom-ui/p-ddf64315.js.map +1 -0
- package/dist/bromcom-ui/p-e7e8305f.entry.js +2 -0
- package/dist/bromcom-ui/p-e7e8305f.entry.js.map +1 -0
- package/dist/cjs/{app-globals-29edfda4.js → app-globals-e0eef2e9.js} +9 -1
- package/dist/cjs/app-globals-e0eef2e9.js.map +1 -0
- package/dist/cjs/bcm-accordion-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-accordion-group.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-avatar_4.cjs.entry.js +23 -10
- package/dist/cjs/bcm-avatar_4.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/bcm-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +21 -20
- package/dist/cjs/bcm-input.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-radio.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tabs-trigger.cjs.entry.js.map +1 -1
- package/dist/cjs/bcm-text.cjs.entry.js +1 -1
- package/dist/cjs/bcm-text.cjs.entry.js.map +1 -1
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/accordion-group/accordion-group.css +1 -1
- package/dist/collection/components/basic-badge/basic-badge.component.js +3 -3
- package/dist/collection/components/basic-badge/basic-badge.component.js.map +1 -1
- package/dist/collection/components/button/button.component.js +19 -6
- package/dist/collection/components/button/button.component.js.map +1 -1
- package/dist/collection/components/button/button.css +1 -1
- package/dist/collection/components/checkbox/checkbox.component.js +2 -2
- package/dist/collection/components/checkbox/checkbox.component.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.css +1 -1
- package/dist/collection/components/chip/chip.css +1 -1
- package/dist/collection/components/input/input.component.js +22 -10
- package/dist/collection/components/input/input.component.js.map +1 -1
- package/dist/collection/components/input/input.css +1 -1
- package/dist/collection/components/radio/radio.css +1 -1
- package/dist/collection/components/tabs/tabs-trigger.css +1 -1
- package/dist/collection/components/text/text.css +1 -1
- package/dist/collection/global/global.js +10 -0
- package/dist/components/bcm-accordion-group.js +1 -1
- package/dist/components/bcm-accordion-group.js.map +1 -1
- package/dist/components/bcm-basic-badge.js +3 -3
- package/dist/components/bcm-basic-badge.js.map +1 -1
- package/dist/components/bcm-button.js +1 -1
- package/dist/components/bcm-checkbox.js +3 -3
- package/dist/components/bcm-checkbox.js.map +1 -1
- package/dist/components/bcm-chip.js +1 -1
- package/dist/components/bcm-chip.js.map +1 -1
- package/dist/components/bcm-dropdown.js +1 -1
- package/dist/components/bcm-input.js +22 -20
- package/dist/components/bcm-input.js.map +1 -1
- package/dist/components/bcm-pop-confirm.js +1 -1
- package/dist/components/bcm-radio.js +1 -1
- package/dist/components/bcm-radio.js.map +1 -1
- package/dist/components/bcm-tabs-trigger.js +1 -1
- package/dist/components/bcm-tabs-trigger.js.map +1 -1
- package/dist/components/bcm-text.js +1 -1
- package/dist/components/bcm-text.js.map +1 -1
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-e6567774.js → p-434bf03a.js} +21 -8
- package/dist/components/p-434bf03a.js.map +1 -0
- package/dist/esm/{app-globals-bfa07b76.js → app-globals-f7994f55.js} +9 -1
- package/dist/esm/app-globals-f7994f55.js.map +1 -0
- package/dist/esm/bcm-accordion-group.entry.js +1 -1
- package/dist/esm/bcm-accordion-group.entry.js.map +1 -1
- package/dist/esm/bcm-avatar_4.entry.js +23 -10
- package/dist/esm/bcm-avatar_4.entry.js.map +1 -1
- package/dist/esm/bcm-checkbox.entry.js +3 -3
- package/dist/esm/bcm-checkbox.entry.js.map +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js.map +1 -1
- package/dist/esm/bcm-input.entry.js +21 -20
- package/dist/esm/bcm-input.entry.js.map +1 -1
- package/dist/esm/bcm-radio.entry.js +1 -1
- package/dist/esm/bcm-radio.entry.js.map +1 -1
- package/dist/esm/bcm-tabs-trigger.entry.js +1 -1
- package/dist/esm/bcm-tabs-trigger.entry.js.map +1 -1
- package/dist/esm/bcm-text.entry.js +1 -1
- package/dist/esm/bcm-text.entry.js.map +1 -1
- package/dist/esm/bromcom-ui.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/types/components/input/input.component.d.ts +4 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-15829c47.entry.js +0 -2
- package/dist/bromcom-ui/p-4b7294a3.entry.js +0 -2
- package/dist/bromcom-ui/p-729a870f.js +0 -2
- package/dist/bromcom-ui/p-729a870f.js.map +0 -1
- package/dist/bromcom-ui/p-7d8ad3dd.entry.js +0 -2
- package/dist/bromcom-ui/p-a29e61a4.entry.js +0 -2
- package/dist/bromcom-ui/p-a29e61a4.entry.js.map +0 -1
- package/dist/bromcom-ui/p-ae16edd3.entry.js +0 -2
- package/dist/bromcom-ui/p-ae16edd3.entry.js.map +0 -1
- package/dist/bromcom-ui/p-c2b3945e.entry.js +0 -2
- package/dist/bromcom-ui/p-e6025578.entry.js +0 -2
- package/dist/bromcom-ui/p-e6025578.entry.js.map +0 -1
- package/dist/bromcom-ui/p-f2d8aa70.entry.js +0 -2
- package/dist/cjs/app-globals-29edfda4.js.map +0 -1
- package/dist/components/p-e6567774.js.map +0 -1
- package/dist/esm/app-globals-bfa07b76.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"bcm-input.entry.cjs.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,gBAAgB,EAAE,8BAA8B;IAChD,UAAU,EAAE,oBAAoB;CACxB;;ACbV;;;;;;AAMO,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAAE,QAAgB;;IACrE,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,CAAC,cAAc,QAAQ,IAAI,CAAoB,CAAC;IAC9F,IAAI,CAAC,IAAI;QAA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AAC,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":["generateId","tv","setValidationMessages","defaultValidationMessages","getValidationMessage","h","classNames"],"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
|
+
{"file":"bcm-input.entry.cjs.js","mappings":";;;;;;;;;;AAAA;;;;;;AAMO,MAAM,gBAAgB,GAAG,CAAC,OAAoB,EAAE,QAAgB;;IACrE,MAAM,IAAI,GAAG,MAAA,OAAO,CAAC,UAAU,0CAAE,aAAa,CAAC,cAAc,QAAQ,IAAI,CAAoB,CAAC;IAC9F,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAExB,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;IAC3C,OAAO,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;AAClC,CAAC;;ACZD,MAAM,QAAQ,GAAG,+6OAA+6O,CAAC;AACj8O,uBAAe,QAAQ;;MCYV,QAAQ;IALrB;;;;;;;;QASW,cAAS,GAAG,KAAK,CAAC;QAElB,YAAO,GAAG,IAAI,CAAC;QACf,mBAAc,GAAgB,SAAS,CAAC;QAExC,sBAAiB,GAAG,KAAK,CAAC;;QAInC,UAAK,GAAW,EAAE,CAAC;;QAYnB,QAAG,GAAYA,qBAAU,CAAC,OAAO,CAAC,CAAC;;QAInC,SAAI,GAAc,QAAQ,CAAC;;QAI3B,WAAM,GAAgB,SA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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":["generateId","tv","h","setValidationMessages","defaultValidationMessages","getValidationMessage","classNames"],"sources":["src/utils/slot/check-slot-content.ts","src/components/input/input.scss?tag=bcm-input&encapsulation=shadow","src/components/input/input.component.tsx"],"sourcesContent":["/**\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 } 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 @State() isPasswordVisible = false;\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; // TODO: Will be implemented later\n // return defaultIcons[this.type as keyof typeof defaultIcons];\n }\n\n private togglePasswordVisibility = () => {\n this.isPasswordVisible = !this.isPasswordVisible;\n this.inputRef.type = this.isPasswordVisible ? 'text' : 'password';\n };\n\n private PasswordToggleButton = () => {\n if (this.type !== 'password' || this.disabled || this.readonly || this.value?.length === 0) return null;\n return (\n <button class=\"appearance-none flex items-center w-6 h-full justify-center\" onClick={this.togglePasswordVisibility} type=\"button\">\n <bcm-icon name={this.isPasswordVisible ? 'fa-eye-slash fa-regular' : 'fa-regular fa-eye'} size={this.iconSize}></bcm-icon>\n </button>\n );\n };\n\n private iconSize = {\n small: 14,\n medium: 16,\n large: 18,\n }[this.size];\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 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={this.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={this.iconSize}></bcm-icon>}\n </div>\n )}\n {/* {this.type === 'password' && this.value?.length > 0 && !this.disabled && ( \n // <bcm-icon\n // class=\"password-toggle-icon cursor-pointer\"\n // icon-name={this.isPasswordVisible ? 'fa-regular fa-eye-slash' : 'fa-regular fa-eye'}\n // size={iconSize}\n // onClick={this.togglePasswordVisibility}\n // ></bcm-icon>\n // )}*/}\n {this.PasswordToggleButton()}\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}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-9a2c5938.js');
|
|
6
6
|
const index$1 = require('./index-310db2a6.js');
|
|
7
7
|
|
|
8
|
-
const radioCss = ".block{display:block}:host{display:block}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.
|
|
8
|
+
const radioCss = ".block{display:block}:host{display:block}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.flex{display:flex}.inline-flex{display:inline-flex}.size-2{height:.5rem;width:.5rem}.size-2\\.5{height:.625rem;width:.625rem}.size-3{height:.75rem;width:.75rem}.size-3\\.5{height:.875rem;width:.875rem}.size-4{height:1rem;width:1rem}.size-\\[18px\\]{height:18px;width:18px}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.appearance-none{appearance:none}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.rounded-full{border-radius:var(--bcm-ui-border-radius-full,9999px)}.bg-\\[--bcm-radio-bg\\]{background-color:var(--bcm-radio-bg)}.bg-\\[--bcm-radio-checked\\]{background-color:var(--bcm-radio-checked)}.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-radio-text-color\\]{color:var(--bcm-radio-text-color)}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default)}.shadow,.shadow-\\[inset_0_0_0_1px_var\\(--bcm-radio-border\\)\\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\\[inset_0_0_0_1px_var\\(--bcm-radio-border\\)\\]{--tw-shadow:inset 0 0 0 1px var(--bcm-radio-border);--tw-shadow-colored:inset 0 0 0 1px var(--tw-shadow-color)}.shadow-\\[inset_0_0_0_3px_var\\(--bcm-radio-border\\)\\]{--tw-shadow:inset 0 0 0 3px var(--bcm-radio-border);--tw-shadow-colored:inset 0 0 0 3px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.focus-visible\\:ring:focus-visible{--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)}.group:hover .group-hover\\:shadow-\\[inset_0_0_0_1px_var\\(--bcm-radio-border-hover\\)\\]{--tw-shadow:inset 0 0 0 1px var(--bcm-radio-border-hover);--tw-shadow-colored:inset 0 0 0 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)}";
|
|
9
9
|
const BcmRadioSt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TA,kEAAK,KAAK,EAAE,YAAY,EAAE,IACtBA,kEAAK,KAAK,EAAE,GAAG,EAAE,GAAQ,CACvB,EACNA,mEAAM,KAAK,EAAE,UAAU,EAAE,IACrBA,qEAAO,IAAI,CAAC,KAAK,CAAQ,CACtB,CACH,EACV;KACL;;;;;;;","names":["tv","h"],"sources":["src/components/radio/radio.css?tag=bcm-radio&encapsulation=shadow","src/components/radio/radio.component.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","/**\n * @component BcmRadio\n * @description A customizable radio button component for forms, supporting various sizes, states, and label positioning.\n * It can be used to select a single option from a group of choices, with support for error, disabled, and readonly states.\n *\n * @example\n * <bcm-radio label=\"Option 1\" name=\"group1\" value=\"1\" size=\"medium\" label-position=\"right\">\n * Option 1\n * </bcm-radio>\n *\n * @example Radio with error state\n * <bcm-radio label=\"Error Option\" name=\"group1\" value=\"2\" error={true}>\n * Error Option\n * </bcm-radio>\n *\n * @prop {string} label - The text label to display next to the radio button.\n * @prop {string} name - The name attribute for the radio input, used to group radio buttons.\n * @prop {string} value - The value of the radio button, submitted with the form.\n * @prop {boolean} checked - Whether the radio button is selected.\n * @defaultValue false\n * @prop {RadioSize} size - Defines the size of the radio button: 'small' | 'medium' | 'large'.\n * @defaultValue 'medium'\n * @prop {boolean} disabled - Whether the radio button is disabled.\n * @defaultValue false\n * @prop {boolean} readonly - Whether the radio button is readonly.\n * @defaultValue false\n * @prop {LabelPosition} labelPosition - Position of the label relative to the radio button: 'right' | 'left'.\n * @defaultValue 'right'\n * @prop {boolean} error - Whether the radio button is in an error state.\n * @defaultValue false\n *\n * @event {EventEmitter<void>} bcmRadioChange - Emitted when the radio button's checked state changes.\n * @event {EventEmitter<FocusEvent>} bcmFocus - Emitted when the radio button gains focus.\n * @event {EventEmitter<FocusEvent>} bcmBlur - Emitted when the radio button loses focus.\n *\n * @csspart container - The root label element wrapping the radio button and label.\n * @csspart dotContainer - The container for the radio button dot.\n * @csspart dot - The inner dot of the radio button.\n * @csspart label - The label text element.\n */\n\nimport { Component, ComponentInterface, Prop, h, Element, Event, EventEmitter } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-radio',\n styleUrl: 'radio.css',\n shadow: true,\n})\nexport class BcmRadio implements ComponentInterface {\n @Element() host: HTMLBcmRadioElement;\n\n /**\n * The text label to display next to the radio button.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n label: string;\n\n /**\n * The name attribute for the radio input, used to group radio buttons.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n name: string;\n\n /**\n * The value of the radio button, submitted with the form.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n value: string;\n\n /**\n * Whether the radio button is selected.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true })\n checked: boolean = false;\n\n /**\n * Defines the size of the radio button: 'small' | 'medium' | 'large'.\n * @prop\n * @defaultValue 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Whether the radio button is disabled.\n * @prop\n * @defaultValue false\n */\n @Prop()\n disabled = false;\n\n /**\n * Whether the radio button is readonly.\n * @prop\n * @defaultValue false\n */\n @Prop()\n readonly = false;\n\n /**\n * Position of the label relative to the radio button: 'right' | 'left'.\n * @prop\n * @defaultValue 'right'\n */\n @Prop()\n labelPosition: 'right' | 'left' = 'right';\n\n /**\n * Whether the radio button is in an error state.\n * @prop\n * @defaultValue false\n */\n @Prop()\n error: boolean = false;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmRadioChange',\n })\n bcmRadioChange: EventEmitter<void>;\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 bcmFocus: EventEmitter<FocusEvent>;\n\n private handleClick(): void {\n if (this.readonly || this.disabled) return;\n if (!this.checked) {\n this.checked = true;\n this.bcmRadioChange.emit();\n }\n }\n\n private getRadioStyle() {\n const defaultStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-primary)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-primary-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n const errorStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-palette-red-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-error)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-error)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-error-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n const disabledStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-disabled-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-disabled-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-disabled)',\n };\n\n const readonlyStyle = {\n '--bcm-radio-bg': 'transparent',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n return {\n ...defaultStyle,\n ...(this.error && errorStyle),\n ...(this.disabled && disabledStyle),\n ...(this.readonly && readonlyStyle),\n };\n }\n\n private getRadioClass = tv(\n {\n slots: {\n container: 'bcm-ui-element bcm-radio group',\n dot: 'absolute rounded-full transition bg-[--bcm-radio-checked]',\n dotContainer:\n 'relative rounded-full flex items-center justify-center shadow-[inset_0_0_0_1px_var(--bcm-radio-border)] bg-[--bcm-radio-bg] transition group-hover:shadow-[inset_0_0_0_1px_var(--bcm-radio-border-hover)]',\n labelClass: 'font-medium text-[--bcm-radio-text-color]',\n },\n variants: {\n size: {\n small: {\n container: 'gap-2',\n dotContainer: 'size-3.5',\n dot: 'size-2',\n labelClass: 'text-size-4',\n },\n medium: {\n container: 'gap-2.5',\n dotContainer: 'size-4',\n dot: 'size-2.5',\n labelClass: 'text-size-5',\n },\n large: {\n container: 'gap-3',\n dotContainer: 'size-[18px]',\n dot: 'size-3',\n labelClass: 'text-size-6',\n },\n },\n checked: {\n true: {\n dot: 'opacity-100',\n },\n false: {\n dot: 'opacity-0',\n },\n },\n disabled: {\n true: {\n container: 'cursor-not-allowed',\n },\n false: {\n container: 'cursor-pointer focus-visible:ring',\n },\n },\n readonly: {\n true: {\n container: 'cursor-default pointer-events-none',\n dot: 'opacity-100',\n dotContainer: 'shadow-[inset_0_0_0_3px_var(--bcm-radio-border)]',\n },\n false: '',\n },\n labelPosition: {\n left: {\n container: 'inline-flex flex-row-reverse items-center',\n },\n right: {\n container: 'inline-flex flex-row items-center',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, dot, dotContainer, labelClass } = this.getRadioClass({\n size: this.size,\n checked: this.checked,\n disabled: this.disabled,\n readonly: this.readonly,\n labelPosition: this.labelPosition,\n });\n\n return (\n <label class={container()} style={this.getRadioStyle()}>\n <input\n aria-label={this.label}\n role=\"radio\"\n aria-checked={this.checked.toString()}\n type=\"radio\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n checked={this.checked}\n class=\"appearance-none sr-only\"\n onClick={() => this.handleClick()}\n onFocus={e => this.bcmFocus.emit(e)}\n onBlur={e => this.bcmBlur.emit(e)}\n ></input>\n <div class={dotContainer()}>\n <div class={dot()}></div>\n </div>\n <span class={labelClass()}>\n <slot>{this.label}</slot>\n </span>\n </label>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"bcm-radio.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,QAAQ,GAAG,g8GAAg8G,CAAC;AACl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CACH,EACV;KACL;;;;;;;","names":["tv","h"],"sources":["src/components/radio/radio.css?tag=bcm-radio&encapsulation=shadow","src/components/radio/radio.component.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","/**\n * @component BcmRadio\n * @description A customizable radio button component for forms, supporting various sizes, states, and label positioning.\n * It can be used to select a single option from a group of choices, with support for error, disabled, and readonly states.\n *\n * @example\n * <bcm-radio label=\"Option 1\" name=\"group1\" value=\"1\" size=\"medium\" label-position=\"right\">\n * Option 1\n * </bcm-radio>\n *\n * @example Radio with error state\n * <bcm-radio label=\"Error Option\" name=\"group1\" value=\"2\" error={true}>\n * Error Option\n * </bcm-radio>\n *\n * @prop {string} label - The text label to display next to the radio button.\n * @prop {string} name - The name attribute for the radio input, used to group radio buttons.\n * @prop {string} value - The value of the radio button, submitted with the form.\n * @prop {boolean} checked - Whether the radio button is selected.\n * @defaultValue false\n * @prop {RadioSize} size - Defines the size of the radio button: 'small' | 'medium' | 'large'.\n * @defaultValue 'medium'\n * @prop {boolean} disabled - Whether the radio button is disabled.\n * @defaultValue false\n * @prop {boolean} readonly - Whether the radio button is readonly.\n * @defaultValue false\n * @prop {LabelPosition} labelPosition - Position of the label relative to the radio button: 'right' | 'left'.\n * @defaultValue 'right'\n * @prop {boolean} error - Whether the radio button is in an error state.\n * @defaultValue false\n *\n * @event {EventEmitter<void>} bcmRadioChange - Emitted when the radio button's checked state changes.\n * @event {EventEmitter<FocusEvent>} bcmFocus - Emitted when the radio button gains focus.\n * @event {EventEmitter<FocusEvent>} bcmBlur - Emitted when the radio button loses focus.\n *\n * @csspart container - The root label element wrapping the radio button and label.\n * @csspart dotContainer - The container for the radio button dot.\n * @csspart dot - The inner dot of the radio button.\n * @csspart label - The label text element.\n */\n\nimport { Component, ComponentInterface, Prop, h, Element, Event, EventEmitter } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n@Component({\n tag: 'bcm-radio',\n styleUrl: 'radio.css',\n shadow: true,\n})\nexport class BcmRadio implements ComponentInterface {\n @Element() host: HTMLBcmRadioElement;\n\n /**\n * The text label to display next to the radio button.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n label: string;\n\n /**\n * The name attribute for the radio input, used to group radio buttons.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n name: string;\n\n /**\n * The value of the radio button, submitted with the form.\n * @prop\n * @defaultValue undefined\n */\n @Prop()\n value: string;\n\n /**\n * Whether the radio button is selected.\n * @prop\n * @defaultValue false\n */\n @Prop({ reflect: true })\n checked: boolean = false;\n\n /**\n * Defines the size of the radio button: 'small' | 'medium' | 'large'.\n * @prop\n * @defaultValue 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Whether the radio button is disabled.\n * @prop\n * @defaultValue false\n */\n @Prop()\n disabled = false;\n\n /**\n * Whether the radio button is readonly.\n * @prop\n * @defaultValue false\n */\n @Prop()\n readonly = false;\n\n /**\n * Position of the label relative to the radio button: 'right' | 'left'.\n * @prop\n * @defaultValue 'right'\n */\n @Prop()\n labelPosition: 'right' | 'left' = 'right';\n\n /**\n * Whether the radio button is in an error state.\n * @prop\n * @defaultValue false\n */\n @Prop()\n error: boolean = false;\n\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmRadioChange',\n })\n bcmRadioChange: EventEmitter<void>;\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 bcmFocus: EventEmitter<FocusEvent>;\n\n private handleClick(): void {\n if (this.readonly || this.disabled) return;\n if (!this.checked) {\n this.checked = true;\n this.bcmRadioChange.emit();\n }\n }\n\n private getRadioStyle() {\n const defaultStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-primary)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-primary-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n const errorStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-palette-red-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-error)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-error)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-error-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n const disabledStyle = {\n '--bcm-radio-bg': 'var(--bcm-ui-color-background-disabled-default)',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-disabled-default)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-disabled)',\n };\n\n const readonlyStyle = {\n '--bcm-radio-bg': 'transparent',\n '--bcm-radio-border': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-checked': 'var(--bcm-ui-color-background-default-default)',\n '--bcm-radio-border-hover': 'var(--bcm-ui-color-border-disabled)',\n '--bcm-radio-text-color': 'var(--bcm-ui-color-text-default)',\n };\n\n return {\n ...defaultStyle,\n ...(this.error && errorStyle),\n ...(this.disabled && disabledStyle),\n ...(this.readonly && readonlyStyle),\n };\n }\n\n private getRadioClass = tv(\n {\n slots: {\n container: 'bcm-ui-element bcm-radio group',\n dot: 'absolute rounded-full transition bg-[--bcm-radio-checked]',\n dotContainer:\n 'relative rounded-full flex items-center justify-center shadow-[inset_0_0_0_1px_var(--bcm-radio-border)] bg-[--bcm-radio-bg] transition group-hover:shadow-[inset_0_0_0_1px_var(--bcm-radio-border-hover)]',\n labelClass: 'font-medium text-[--bcm-radio-text-color]',\n },\n variants: {\n size: {\n small: {\n container: 'gap-2',\n dotContainer: 'size-3.5',\n dot: 'size-2',\n labelClass: 'text-size-4',\n },\n medium: {\n container: 'gap-2.5',\n dotContainer: 'size-4',\n dot: 'size-2.5',\n labelClass: 'text-size-5',\n },\n large: {\n container: 'gap-3',\n dotContainer: 'size-[18px]',\n dot: 'size-3',\n labelClass: 'text-size-6',\n },\n },\n checked: {\n true: {\n dot: 'opacity-100',\n },\n false: {\n dot: 'opacity-0',\n },\n },\n disabled: {\n true: {\n container: 'cursor-not-allowed',\n },\n false: {\n container: 'cursor-pointer focus-visible:ring',\n },\n },\n readonly: {\n true: {\n container: 'cursor-default pointer-events-none',\n dot: 'opacity-100',\n dotContainer: 'shadow-[inset_0_0_0_3px_var(--bcm-radio-border)]',\n },\n false: '',\n },\n labelPosition: {\n left: {\n container: 'inline-flex flex-row-reverse items-center',\n },\n right: {\n container: 'inline-flex flex-row items-center',\n },\n },\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { container, dot, dotContainer, labelClass } = this.getRadioClass({\n size: this.size,\n checked: this.checked,\n disabled: this.disabled,\n readonly: this.readonly,\n labelPosition: this.labelPosition,\n });\n\n return (\n <label class={container()} style={this.getRadioStyle()}>\n <input\n aria-label={this.label}\n role=\"radio\"\n aria-checked={this.checked.toString()}\n type=\"radio\"\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n readOnly={this.readonly}\n checked={this.checked}\n class=\"appearance-none sr-only\"\n onClick={() => this.handleClick()}\n onFocus={e => this.bcmFocus.emit(e)}\n onBlur={e => this.bcmBlur.emit(e)}\n ></input>\n <div class={dotContainer()}>\n <div class={dot()}></div>\n </div>\n <span class={labelClass()}>\n <slot>{this.label}</slot>\n </span>\n </label>\n );\n }\n}\n"],"version":3}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-9a2c5938.js');
|
|
6
6
|
const index$1 = require('./index-310db2a6.js');
|
|
7
7
|
|
|
8
|
-
const tabsTriggerCss = ".relative{position:relative}.block{display:block}:host{display:block;position:relative;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.flex{display:flex}.h-\\[2px\\]{height:2px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.border-none{border-style:none}.bg-\\[--bcm-ui-color-text-default\\]{background-color:var(--bcm-ui-color-text-default)}.bg-\\[--bcm-ui-color-text-disabled\\]{background-color:var(--bcm-ui-color-text-disabled)}.bg-color-primary{background-color:var(--bcm-ui-color-background-primary-default)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-center{text-align:center}.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-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:text-color-primary:hover{color:var(--bcm-ui-color-text-primary)}";
|
|
8
|
+
const tabsTriggerCss = ".relative{position:relative}.block{display:block}:host{display:block;position:relative;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.static{position:static}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.flex{display:flex}.h-\\[2px\\]{height:2px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-2\\.5{gap:.625rem}.gap-3{gap:.75rem}.border-none{border-style:none}.bg-\\[--bcm-ui-color-text-default\\]{background-color:var(--bcm-ui-color-text-default)}.bg-\\[--bcm-ui-color-text-disabled\\]{background-color:var(--bcm-ui-color-text-disabled)}.bg-color-primary{background-color:var(--bcm-ui-color-background-primary-default)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-3{padding-left:.75rem;padding-right:.75rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.text-center{text-align:center}.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-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:text-color-primary:hover{color:var(--bcm-ui-color-text-primary)}";
|
|
9
9
|
const BcmTabsTriggerStyle0 = tabsTriggerCss;
|
|
10
10
|
|
|
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,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxC;IA+CD,MAAM;QACF,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACnC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;SAC1B,CAAC,CAAC;QACH,QACIC,QAACC,UAAI,qDAAC,IAAI,EAAC,KAAK,mBAAgB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,mBAAiB,IAAI,CAAC,QAAQ,IAChFD,qEAAQ,KAAK,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAC,KAAK,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,IACvFA,oEAAQ,CACH,EACTA,kEAAK,KAAK,EAAE,UAAU,EAAE,GAAQ,CAC7B,EACT;KACL;;;;;;;","names":["tv","h","Host"],"sources":["src/components/tabs/tabs-trigger.css?tag=bcm-tabs-trigger&encapsulation=shadow","src/components/tabs/tabs-trigger.component.tsx"],"sourcesContent":[":host {\n position: relative;\n display: block;\n width: 100%;\n}\n","import { Component, Prop, h, Host, Element, Event, EventEmitter, ComponentInterface } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @description Tab trigger component that functions as a clickable tab button\n * @slot - Default slot for tab label content\n */\n@Component({\n tag: 'bcm-tabs-trigger',\n styleUrl: 'tabs-trigger.css',\n shadow: true,\n})\nexport class BcmTabsTrigger implements ComponentInterface {\n /**\n * Reference to the host element\n */\n @Element() el: HTMLElement;\n\n /**\n * Unique identifier value for the tab\n */\n @Prop({ reflect: true })\n value: string;\n\n /**\n * Whether the tab is currently active\n */\n @Prop({ reflect: true })\n active: boolean = false;\n\n /**\n * Size of the tab\n */\n @Prop({ reflect: true })\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Whether the tab is disabled\n */\n @Prop({ reflect: true })\n disabled: boolean = false;\n\n /**\n * Event emitted when this tab is selected\n */\n @Event({\n composed: false,\n bubbles: false,\n cancelable: true,\n eventName: 'bcmTabSelected',\n })\n bcmTabSelected: EventEmitter<string>;\n\n /**\n * Handles click events on the tab\n * Emits bcmTabSelected event with tab value if not disabled\n */\n private handleClick() {\n if (this.disabled) return;\n this.bcmTabSelected.emit(this.value);\n }\n\n /**\n * Tailwind variants configuration for styling\n */\n private class = tv(\n {\n slots: {\n tab: 'bcm-ui-element text-center flex flex-row justify-center items-center font-medium transition-all duration-200 ease-in-out py-1 px-3 w-full bg-white border-none',\n borderLine: 'bottom-0 w-full left-0 right-0 h-[2px] bg-color-primary transition-all duration-200 ease-in-out',\n },\n variants: {\n size: {\n small: { tab: 'text-size-4 gap-2' },\n medium: { tab: 'text-size-5 gap-2.5' },\n large: { tab: 'text-size-6 gap-3' },\n },\n active: {\n true: {\n tab: 'text-color-primary',\n },\n false: {\n tab: 'text-color',\n },\n },\n disabled: {\n true: {\n tab: 'cursor-not-allowed text-color-disabled',\n borderLine: 'bg-[--bcm-ui-color-text-disabled]',\n },\n false: {\n tab: 'cursor-pointer text-color hover:text-color-primary',\n borderLine: 'bg-[--bcm-ui-color-text-default]',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n active: false,\n disabled: false,\n },\n },\n {\n twMerge: false,\n },\n );\n\n render() {\n const { tab, borderLine } = this.class({\n size: this.size,\n active: this.active,\n disabled: this.disabled,\n });\n return (\n <Host role=\"tab\" aria-selected={this.active.toString()} aria-disabled={this.disabled}>\n <button class={tab()} disabled={this.disabled} part=\"tab\" onClick={() => this.handleClick()}>\n <slot />\n </button>\n <div class={borderLine()}></div>\n </Host>\n );\n }\n}"],"version":3}
|
|
@@ -23,7 +23,7 @@ const variantTagMap = {
|
|
|
23
23
|
infoAccent: 'p',
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
const textCss = ".m-0{margin:0}.appearance-none{appearance:none}.p-0{padding:0}.text-size-12{font-size:var(--bcm-ui-font-size-12,60px);line-height:var(--bcm-ui-line-height-12,72px)}.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)}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-color-caption{color:var(--bcm-ui-color-text-caption)}.text-color-default{color:var(--bcm-ui-color-text-default)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-header{color:var(--bcm-ui-color-text-header)}.text-color-helper{color:var(--bcm-ui-color-text-helper)}.text-color-label{color:var(--bcm-ui-color-text-label)}.text-color-placeholder{color:var(--bcm-ui-color-text-placeholder)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.underline{text-decoration-line:underline}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
|
|
26
|
+
const textCss = ".static{position:static}.m-0{margin:0}.appearance-none{appearance:none}.p-0{padding:0}.text-size-12{font-size:var(--bcm-ui-font-size-12,60px);line-height:var(--bcm-ui-line-height-12,72px)}.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)}.text-size-7{font-size:var(--bcm-ui-font-size-7,20px);line-height:var(--bcm-ui-line-height-7,28px)}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-color-caption{color:var(--bcm-ui-color-text-caption)}.text-color-default{color:var(--bcm-ui-color-text-default)}.text-color-disabled{color:var(--bcm-ui-color-text-disabled)}.text-color-header{color:var(--bcm-ui-color-text-header)}.text-color-helper{color:var(--bcm-ui-color-text-helper)}.text-color-label{color:var(--bcm-ui-color-text-label)}.text-color-placeholder{color:var(--bcm-ui-color-text-placeholder)}.text-color-primary{color:var(--bcm-ui-color-text-primary)}.underline{text-decoration-line:underline}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}";
|
|
27
27
|
const BcmTextStyle0 = textCss;
|
|
28
28
|
|
|
29
29
|
const BcmText = class {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"bcm-text.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,aAAa,GAAiC;IACzD,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,GAAG;IACX,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,GAAG;IAChB,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IACT,UAAU,EAAE,GAAG;CAChB;;AClBD,MAAM,OAAO,GAAG,
|
|
1
|
+
{"file":"bcm-text.entry.cjs.js","mappings":";;;;;;;AAEO,MAAM,aAAa,GAAiC;IACzD,OAAO,EAAE,IAA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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}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9a2c5938.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-e0eef2e9.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[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.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[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-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[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-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[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-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"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]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[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.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[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],"isPasswordVisible":[32],"setFocus":[64],"setBlur":[64],"select":[64],"setLocale":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[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-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[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-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"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]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-9a2c5938.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-e0eef2e9.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[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.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[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-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[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-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[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-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"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]}]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["bcm-dropdown.cjs",[[1,"bcm-dropdown",{"text":[1],"isReady":[32],"dropdownItems":[32]},[[2,"bcmDropDownItemChange","handleDropdownItemChange"]]]]],["bcm-pop-confirm.cjs",[[1,"bcm-pop-confirm",{"arrowColor":[1,"arrow-color"],"cancelText":[1,"cancel-text"],"confirmText":[1,"confirm-text"],"description":[1],"headerText":[1,"header-text"],"placement":[1],"size":[1],"status":[1],"statusIcon":[4,"status-icon"],"targetId":[1,"target-id"],"isOpen":[32],"currentPlacement":[32],"show":[64],"hide":[64]}]]],["bcm-accordion.cjs",[[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.cjs",[[1,"bcm-accordion-group",{"multi":[4],"accordionItems":[32],"expandAll":[64],"collapseAll":[64],"getExpandedItems":[64]},[[2,"bcmAccordionChange","handleAccordionChange"]]]]],["bcm-alert.cjs",[[1,"bcm-alert",{"status":[1],"size":[1],"kind":[1],"dismissible":[4],"showStatusIcon":[4,"show-status-icon"]}]]],["bcm-button-group.cjs",[[1,"bcm-button-group",{"kind":[1],"size":[1],"status":[1],"fullWidth":[516,"full-width"],"loading":[4],"disabled":[4],"orientation":[513]}]]],["bcm-checkbox.cjs",[[1,"bcm-checkbox",{"_id":[513,"id"],"label":[1],"name":[1],"indeterminate":[1028],"size":[1],"checked":[1028],"error":[4],"disabled":[4],"labelPosition":[1,"label-position"],"internalChecked":[32]},null,{"checked":["syncCheckedProp"],"indeterminate":["updateIndeterminateState"],"internalChecked":["updateIndeterminateState"]}]]],["bcm-chip.cjs",[[1,"bcm-chip",{"size":[1],"kind":[1],"status":[1],"dismissible":[4],"disabled":[4],"color":[1]}]]],["bcm-divider.cjs",[[1,"bcm-divider",{"direction":[1],"variant":[1],"size":[1]}]]],["bcm-dropdown-item.cjs",[[1,"bcm-dropdown-item",{"text":[1],"icon":[1],"rightIcons":[16],"selected":[516],"error":[516],"disabled":[516]}]]],["bcm-input.cjs",[[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],"isPasswordVisible":[32],"setFocus":[64],"setBlur":[64],"select":[64],"setLocale":[64]},null,{"value":["handleValueChange"],"status":["watchStatus"],"errorMessage":["watchErrorMessage"]}]]],["bcm-popover.cjs",[[1,"bcm-popover",{"size":[1],"placement":[1],"trigger":[1],"hoverDelay":[2,"hover-delay"],"open":[1028],"headerText":[1,"header-text"],"message":[1],"openPopup":[64],"closePopup":[64]}]]],["bcm-radio.cjs",[[1,"bcm-radio",{"label":[1],"name":[1],"value":[1],"checked":[516],"size":[1],"disabled":[4],"readonly":[4],"labelPosition":[1,"label-position"],"error":[4]}]]],["bcm-radio-group.cjs",[[1,"bcm-radio-group",{"name":[1],"value":[1],"disabled":[4],"required":[4],"error":[4],"label":[1],"size":[1],"direction":[1],"captionText":[1,"caption-text"],"setClear":[64],"resetCaption":[64]},[[2,"bcmRadioChange","handleRadioChange"]],{"value":["handleValueChange"]}]]],["bcm-segmented-picker.cjs",[[1,"bcm-segmented-picker",{"size":[1],"value":[1537],"disabled":[4],"fullWidth":[516,"full-width"],"options":[32],"indicatorStyles":[32]},[[0,"bcmOptionClick","handleOptionClick"]],{"value":["valueChanged"]}]]],["bcm-segmented-picker-option.cjs",[[1,"bcm-segmented-picker-option",{"value":[1],"label":[1],"size":[1],"selected":[1028],"disabled":[4],"getWidth":[64]}]]],["bcm-switch.cjs",[[1,"bcm-switch",{"checked":[1540],"disabled":[4],"name":[1],"value":[1],"label":[1],"labelPosition":[1,"label-position"],"error":[4],"caption":[1],"size":[1],"readonly":[4],"required":[4]}]]],["bcm-tabs.cjs",[[1,"bcm-tabs",{"defaultValue":[513,"default-value"],"size":[513],"activeTab":[32],"previousTab":[32],"disableTab":[64],"enableTab":[64],"disableAllTabs":[64],"enableAllTabs":[64],"getActiveTab":[64],"setActiveTab":[64]},[[9,"resize","handleResize"],[2,"bcmTabSelected","handleTabSelected"]],{"size":["handleSizeChange"]}]]],["bcm-tabs-content.cjs",[[1,"bcm-tabs-content",{"value":[513]}]]],["bcm-tabs-list.cjs",[[1,"bcm-tabs-list"]]],["bcm-tabs-trigger.cjs",[[1,"bcm-tabs-trigger",{"value":[513],"active":[516],"size":[513],"disabled":[516]}]]],["bcm-text.cjs",[[1,"bcm-text",{"text":[1],"variant":[1],"size":[1]}]]],["bcm-textarea.cjs",[[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-tooltip.cjs",[[1,"bcm-tooltip",{"trigger":[1],"placement":[1],"size":[1],"message":[1],"showDelay":[2,"show-delay"],"open":[32],"openTooltip":[64],"closeTooltip":[64]}]]],["bcm-linked.cjs",[[1,"bcm-linked",{"targetId":[513,"target-id"],"targetElement":[16],"isVisible":[32]}]]],["bcm-avatar_4.cjs",[[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-badge",{"size":[1],"variant":[1],"color":[1],"soft":[4],"blink":[4],"status":[1],"position":[1],"offset":[1],"text":[1]}],[1,"bcm-button",{"kind":[1],"size":[1],"status":[1],"variant":[1],"position":[513],"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]}]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.block{display:block}:host{--bcm-accordion-border:var(--bcm-ui-color-border-default);--bcm-accordion-radius:6px;display:block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.collapse{visibility:collapse}.
|
|
1
|
+
.block{display:block}:host{--bcm-accordion-border:var(--bcm-ui-color-border-default);--bcm-accordion-radius:6px;display:block;width:100%}.bcm-ui-element{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:Inter,sans-serif}.collapse{visibility:collapse}.flex{display:flex}.w-full{width:100%}.flex-col{flex-direction:column}.rounded-\[--bcm-accordion-radius\]{border-radius:var(--bcm-accordion-radius)}.border{border-width:1px}.border-solid{border-style:solid}.border-\[--bcm-accordion-border\]{border-color:var(--bcm-accordion-border)}.shadow{--tw-shadow:var(--bcm-ui-box-shadow-default);--tw-shadow-colored:var(--bcm-ui-box-shadow-default);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.filter{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)}
|
|
@@ -76,17 +76,17 @@ export class BasicBadge {
|
|
|
76
76
|
get badgeStyle() {
|
|
77
77
|
if (!this.color)
|
|
78
78
|
return {};
|
|
79
|
-
const variantType = this.soft ? '
|
|
79
|
+
const variantType = this.soft ? 'palette' : 'vivid';
|
|
80
80
|
return {
|
|
81
81
|
'--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,
|
|
82
82
|
'--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
render() {
|
|
86
|
-
return (h("span", { key: '
|
|
86
|
+
return (h("span", { key: '808cd1e3672a57596174767ce793244024a3f6c3', part: "base", role: "status", "aria-live": "polite", style: this.badgeStyle, class: this.classes({
|
|
87
87
|
size: this.size,
|
|
88
88
|
variant: this.variant,
|
|
89
|
-
}) }, this.variant === 'text' && (h("span", { key: '
|
|
89
|
+
}) }, this.variant === 'text' && (h("span", { key: 'c3b5d31649cf6177173401cafcb8c520d4cf9745', class: "badge-content" }, h("slot", { key: 'a6a902a3a2a9c2effa1fc7e0ef4267ab17b6b2ef' })))));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "bcm-basic-badge"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic-badge.component.js","sourceRoot":"","sources":["../../../src/components/basic-badge/basic-badge.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"basic-badge.component.js","sourceRoot":"","sources":["../../../src/components/basic-badge/basic-badge.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAsB,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAEvC;;;;;;;;;;;;GAYG;AAOH,MAAM,OAAO,UAAU;IALvB;QAME;;;;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ACE,IAAI,EAAC,MAAM,EACX,IAAI,EAAC,QAAQ,eACH,QAAQ,EAClB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,IAED,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,CAC1B,6DAAM,KAAK,EAAC,eAAe;YACzB,8DAAa,CACR,CACR,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, ComponentInterface, Prop, h } from '@stencil/core';\nimport { tv } from 'tailwind-variants';\n\n/**\n * @component BcmBasicBadge\n * @description A basic badge component that can be used as a status indicator or to highlight content.\n * Supports dot and text variants with different sizes and color options.\n *\n * @example Basic usage\n * <bcm-basic-badge size=\"medium\" color=\"primary\">\n * New\n * </bcm-basic-badge>\n *\n * @example Dot variant\n * <bcm-basic-badge variant=\"dot\" color=\"success\" />\n */\n\n@Component({\n tag: 'bcm-basic-badge',\n styleUrl: 'basic-badge.css',\n shadow: true,\n})\nexport class BasicBadge implements ComponentInterface {\n /**\n * Determines the size of the badge.\n * @type {'small' | 'medium' | 'large'}\n * @default 'medium'\n */\n @Prop()\n size: 'small' | 'medium' | 'large' = 'medium';\n\n /**\n * Sets the visual variant of the badge.\n * 'dot': Appears as a small dot indicator\n * 'text': Displays content as text\n * @type {'dot' | 'text'}\n * @default 'text'\n */\n @Prop()\n variant: 'dot' | 'text' = 'text';\n\n /**\n * Defines the color of the badge.\n * Uses system color variables (e.g., 'primary', 'success', 'warning', etc.)\n * @type {string}\n * @optional\n */\n @Prop()\n color?: string;\n\n /**\n * Enables soft color mode for the badge.\n * When true, uses lighter tones and pastel colors.\n * @type {boolean}\n * @default false\n */\n @Prop()\n soft: boolean = false;\n\n /**\n * Text to be displayed inside the badge.\n * Used when variant is set to 'text'.\n * @type {string}\n * @optional\n */\n @Prop()\n text?: string;\n\n private classes = tv({\n base: 'badge bcm-ui-element inline-flex items-center justify-center whitespace-nowrap select-none font-medium bg-[--bcm-badge-bg] text-[--bcm-badge-text] rounded-[--bcm-badge-radius]',\n variants: {\n size: {\n small: 'px-1 text-size-3',\n medium: 'py-0.5 px-1.5 text-size-4',\n large: 'py-1 px-2 text-size-5',\n },\n variant: {\n dot: 'gap-0 p-0 text-[0px] leading-none',\n text: '',\n },\n },\n compoundVariants: [\n {\n variant: 'dot',\n size: 'small',\n class: 'size-1',\n },\n {\n variant: 'dot',\n size: 'medium',\n class: 'size-1.5',\n },\n {\n variant: 'dot',\n size: 'large',\n class: 'size-2',\n },\n ],\n defaultVariants: {\n variant: 'text',\n size: 'medium',\n blink: false,\n },\n });\n\n private get badgeStyle() {\n if (!this.color) return {};\n const variantType = this.soft ? 'palette' : 'vivid';\n\n return {\n '--bcm-badge-bg': `var(--bcm-ui-color-background-${variantType}-${this.color}-default)`,\n '--bcm-badge-text': this.soft ? `var(--bcm-ui-color-text-palette-${this.color})` : 'var(--bcm-ui-color-text-base)',\n };\n }\n\n render() {\n return (\n <span\n part=\"base\"\n role=\"status\"\n aria-live=\"polite\"\n style={this.badgeStyle}\n class={this.classes({\n size: this.size,\n variant: this.variant,\n })}\n >\n {this.variant === 'text' && (\n <span class=\"badge-content\">\n <slot></slot>\n </span>\n )}\n </span>\n );\n }\n}\n"]}
|