@wirabyte/ui 3.0.0-beta.0 → 3.1.0
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/CHANGELOG.md +42 -0
- package/README.md +6 -6
- package/fesm2022/wirabyte-ui-accordion.mjs +4 -4
- package/fesm2022/wirabyte-ui-accordion.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-alert.mjs +2 -2
- package/fesm2022/wirabyte-ui-alert.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-asidemenu.mjs +2 -2
- package/fesm2022/wirabyte-ui-asidemenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-avatar.mjs +13 -6
- package/fesm2022/wirabyte-ui-avatar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-breadcrumb.mjs +4 -2
- package/fesm2022/wirabyte-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-button.mjs +3 -3
- package/fesm2022/wirabyte-ui-button.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-card.mjs +8 -8
- package/fesm2022/wirabyte-ui-card.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chat.mjs +391 -0
- package/fesm2022/wirabyte-ui-chat.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-config.mjs +55 -2
- package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-core.mjs +155 -2
- package/fesm2022/wirabyte-ui-core.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-datepicker.mjs +6 -5
- package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-descriptions.mjs +133 -0
- package/fesm2022/wirabyte-ui-descriptions.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-dialog.mjs +2 -2
- package/fesm2022/wirabyte-ui-dialog.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-drawer.mjs +2 -2
- package/fesm2022/wirabyte-ui-drawer.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-emptystate.mjs +2 -2
- package/fesm2022/wirabyte-ui-emptystate.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-errorpage.mjs +2 -2
- package/fesm2022/wirabyte-ui-errorpage.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-fieldset.mjs +4 -4
- package/fesm2022/wirabyte-ui-fieldset.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-metergroup.mjs +19 -5
- package/fesm2022/wirabyte-ui-metergroup.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-navbar.mjs +2 -2
- package/fesm2022/wirabyte-ui-navbar.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-panel.mjs +6 -6
- package/fesm2022/wirabyte-ui-panel.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-popover.mjs +2 -2
- package/fesm2022/wirabyte-ui-popover.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-result.mjs +2 -2
- package/fesm2022/wirabyte-ui-result.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-scheduler.mjs +505 -0
- package/fesm2022/wirabyte-ui-scheduler.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-selectbutton.mjs +25 -4
- package/fesm2022/wirabyte-ui-selectbutton.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-signaturepad.mjs +310 -0
- package/fesm2022/wirabyte-ui-signaturepad.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-sitefooter.mjs +1 -1
- package/fesm2022/wirabyte-ui-sitefooter.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-stat.mjs +149 -0
- package/fesm2022/wirabyte-ui-stat.mjs.map +1 -0
- package/fesm2022/wirabyte-ui-table.mjs +3 -3
- package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tabs.mjs +3 -3
- package/fesm2022/wirabyte-ui-tabs.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-tag.mjs +2 -2
- package/fesm2022/wirabyte-ui-tag.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-textarea.mjs +32 -0
- package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs +2 -2
- package/fesm2022/wirabyte-ui-thai.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-toolbar.mjs +6 -6
- package/fesm2022/wirabyte-ui-toolbar.mjs.map +1 -1
- package/package.json +21 -1
- package/schematics/core/catalog.cjs +22 -1
- package/schematics/core/families.cjs +42 -0
- package/schematics/core/overrides.cjs +25 -0
- package/schematics/core/thai/locale.cjs +66 -0
- package/schematics/ng-add/index.cjs +3 -1
- package/theme/_data.scss +239 -7
- package/theme/_index.scss +29 -0
- package/themes/glass/amber.css +36 -7
- package/themes/glass/blue.css +36 -7
- package/themes/glass/cyan.css +36 -7
- package/themes/glass/emerald.css +36 -7
- package/themes/glass/fuchsia.css +36 -7
- package/themes/glass/green.css +36 -7
- package/themes/glass/indigo.css +36 -7
- package/themes/glass/lime.css +36 -7
- package/themes/glass/orange.css +36 -7
- package/themes/glass/pink.css +36 -7
- package/themes/glass/purple.css +36 -7
- package/themes/glass/red.css +36 -7
- package/themes/glass/rose.css +36 -7
- package/themes/glass/sky.css +36 -7
- package/themes/glass/teal.css +36 -7
- package/themes/glass/theme.css +36 -7
- package/themes/glass/violet.css +36 -7
- package/themes/glass/wira.css +36 -7
- package/themes/glass/yellow.css +36 -7
- package/themes/lanna/amber.css +36 -7
- package/themes/lanna/blue.css +36 -7
- package/themes/lanna/cyan.css +36 -7
- package/themes/lanna/emerald.css +36 -7
- package/themes/lanna/fuchsia.css +36 -7
- package/themes/lanna/green.css +36 -7
- package/themes/lanna/indigo.css +36 -7
- package/themes/lanna/lime.css +36 -7
- package/themes/lanna/orange.css +36 -7
- package/themes/lanna/pink.css +36 -7
- package/themes/lanna/purple.css +36 -7
- package/themes/lanna/red.css +36 -7
- package/themes/lanna/rose.css +36 -7
- package/themes/lanna/sky.css +36 -7
- package/themes/lanna/teal.css +36 -7
- package/themes/lanna/theme.css +36 -7
- package/themes/lanna/violet.css +36 -7
- package/themes/lanna/wira.css +36 -7
- package/themes/lanna/yellow.css +36 -7
- package/themes/mali/amber.css +30 -1
- package/themes/mali/blue.css +30 -1
- package/themes/mali/cyan.css +30 -1
- package/themes/mali/emerald.css +30 -1
- package/themes/mali/fuchsia.css +30 -1
- package/themes/mali/green.css +30 -1
- package/themes/mali/indigo.css +30 -1
- package/themes/mali/lime.css +30 -1
- package/themes/mali/orange.css +30 -1
- package/themes/mali/pink.css +30 -1
- package/themes/mali/purple.css +30 -1
- package/themes/mali/red.css +30 -1
- package/themes/mali/rose.css +30 -1
- package/themes/mali/sky.css +30 -1
- package/themes/mali/teal.css +30 -1
- package/themes/mali/theme.css +30 -1
- package/themes/mali/violet.css +30 -1
- package/themes/mali/wira.css +30 -1
- package/themes/mali/yellow.css +30 -1
- package/themes/material/amber.css +30 -1
- package/themes/material/blue.css +30 -1
- package/themes/material/cyan.css +30 -1
- package/themes/material/emerald.css +30 -1
- package/themes/material/fuchsia.css +30 -1
- package/themes/material/green.css +30 -1
- package/themes/material/indigo.css +30 -1
- package/themes/material/lime.css +30 -1
- package/themes/material/orange.css +30 -1
- package/themes/material/pink.css +30 -1
- package/themes/material/purple.css +30 -1
- package/themes/material/red.css +30 -1
- package/themes/material/rose.css +30 -1
- package/themes/material/sky.css +30 -1
- package/themes/material/teal.css +30 -1
- package/themes/material/theme.css +30 -1
- package/themes/material/violet.css +30 -1
- package/themes/material/wira.css +30 -1
- package/themes/material/yellow.css +30 -1
- package/themes/nakhon/amber.css +36 -7
- package/themes/nakhon/blue.css +36 -7
- package/themes/nakhon/cyan.css +36 -7
- package/themes/nakhon/emerald.css +36 -7
- package/themes/nakhon/fuchsia.css +36 -7
- package/themes/nakhon/green.css +36 -7
- package/themes/nakhon/indigo.css +36 -7
- package/themes/nakhon/lime.css +36 -7
- package/themes/nakhon/orange.css +36 -7
- package/themes/nakhon/pink.css +36 -7
- package/themes/nakhon/purple.css +36 -7
- package/themes/nakhon/red.css +36 -7
- package/themes/nakhon/rose.css +36 -7
- package/themes/nakhon/sky.css +36 -7
- package/themes/nakhon/teal.css +36 -7
- package/themes/nakhon/theme.css +36 -7
- package/themes/nakhon/violet.css +36 -7
- package/themes/nakhon/wira.css +36 -7
- package/themes/nakhon/yellow.css +36 -7
- package/themes/phet/amber.css +30 -1
- package/themes/phet/blue.css +30 -1
- package/themes/phet/cyan.css +30 -1
- package/themes/phet/emerald.css +30 -1
- package/themes/phet/fuchsia.css +30 -1
- package/themes/phet/green.css +30 -1
- package/themes/phet/indigo.css +30 -1
- package/themes/phet/lime.css +30 -1
- package/themes/phet/orange.css +30 -1
- package/themes/phet/pink.css +30 -1
- package/themes/phet/purple.css +30 -1
- package/themes/phet/red.css +30 -1
- package/themes/phet/rose.css +30 -1
- package/themes/phet/sky.css +30 -1
- package/themes/phet/teal.css +30 -1
- package/themes/phet/theme.css +30 -1
- package/themes/phet/violet.css +30 -1
- package/themes/phet/wira.css +30 -1
- package/themes/phet/yellow.css +30 -1
- package/themes/siam/amber.css +36 -7
- package/themes/siam/blue.css +36 -7
- package/themes/siam/cyan.css +36 -7
- package/themes/siam/emerald.css +36 -7
- package/themes/siam/fuchsia.css +36 -7
- package/themes/siam/green.css +36 -7
- package/themes/siam/indigo.css +36 -7
- package/themes/siam/lime.css +36 -7
- package/themes/siam/orange.css +36 -7
- package/themes/siam/pink.css +36 -7
- package/themes/siam/purple.css +36 -7
- package/themes/siam/red.css +36 -7
- package/themes/siam/rose.css +36 -7
- package/themes/siam/sky.css +36 -7
- package/themes/siam/teal.css +36 -7
- package/themes/siam/theme.css +36 -7
- package/themes/siam/violet.css +36 -7
- package/themes/siam/wira.css +36 -7
- package/themes/siam/yellow.css +36 -7
- package/themes/sila/amber.css +30 -1
- package/themes/sila/blue.css +30 -1
- package/themes/sila/cyan.css +30 -1
- package/themes/sila/emerald.css +30 -1
- package/themes/sila/fuchsia.css +30 -1
- package/themes/sila/green.css +30 -1
- package/themes/sila/indigo.css +30 -1
- package/themes/sila/lime.css +30 -1
- package/themes/sila/orange.css +30 -1
- package/themes/sila/pink.css +30 -1
- package/themes/sila/purple.css +30 -1
- package/themes/sila/red.css +30 -1
- package/themes/sila/rose.css +30 -1
- package/themes/sila/sky.css +30 -1
- package/themes/sila/teal.css +30 -1
- package/themes/sila/theme.css +30 -1
- package/themes/sila/violet.css +30 -1
- package/themes/sila/wira.css +30 -1
- package/themes/sila/yellow.css +30 -1
- package/themes/wira/amber.css +45 -16
- package/themes/wira/blue.css +45 -16
- package/themes/wira/cyan.css +45 -16
- package/themes/wira/emerald.css +45 -16
- package/themes/wira/fuchsia.css +45 -16
- package/themes/wira/green.css +45 -16
- package/themes/wira/indigo.css +45 -16
- package/themes/wira/lime.css +45 -16
- package/themes/wira/orange.css +45 -16
- package/themes/wira/pink.css +45 -16
- package/themes/wira/purple.css +45 -16
- package/themes/wira/red.css +45 -16
- package/themes/wira/rose.css +45 -16
- package/themes/wira/sky.css +45 -16
- package/themes/wira/teal.css +45 -16
- package/themes/wira/theme.css +45 -16
- package/themes/wira/violet.css +45 -16
- package/themes/wira/wira.css +45 -16
- package/themes/wira/yellow.css +45 -16
- package/types/wirabyte-ui-avatar.d.ts +8 -3
- package/types/wirabyte-ui-breadcrumb.d.ts +3 -1
- package/types/wirabyte-ui-button.d.ts +1 -1
- package/types/wirabyte-ui-chat.d.ts +192 -0
- package/types/wirabyte-ui-config.d.ts +34 -0
- package/types/wirabyte-ui-core.d.ts +62 -3
- package/types/wirabyte-ui-datepicker.d.ts +3 -2
- package/types/wirabyte-ui-descriptions.d.ts +67 -0
- package/types/wirabyte-ui-metergroup.d.ts +17 -2
- package/types/wirabyte-ui-scheduler.d.ts +199 -0
- package/types/wirabyte-ui-selectbutton.d.ts +12 -1
- package/types/wirabyte-ui-signaturepad.d.ts +108 -0
- package/types/wirabyte-ui-stat.d.ts +72 -0
- package/types/wirabyte-ui-textarea.d.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-thai.mjs","sources":["../../lib/thai/thai.pipes.ts","../../lib/thai/thai.module.ts","../../lib/thai/wirabyte-ui-thai.ts"],"sourcesContent":["import { inject, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { ɵrefreshOnTranslation, WuConfig } from '@wirabyte/ui/config';\nimport {\n bahtText,\n CalendarSystem,\n datePattern,\n formatDate,\n formatThaiId,\n formatThaiPhone,\n LOCALES,\n ThaiDateFormat,\n timeAgo,\n toDateValue,\n toThaiDigits,\n} from '@wirabyte/ui/core';\n\nexport type { ThaiDateFormat };\n\n/**\n * A date in the app's language, with พ.ศ. years in Thai: `{{ born | wuDate }}` → `14 พ.ค. 2555`. Formats:\n * `short` 14/05/2555 · `medium` 14 พ.ค. 2555 (default) · `long` 14 พฤษภาคม 2555 · `full` วันจันทร์ที่ 14 พฤษภาคม พ.ศ. 2555\n * · `time` 09:30 น. · `shortDateTime` · `dateTime`, or a pattern (`'d MMM yy'`, `\"EEEE d MMMM yyyy 'เวลา' HH:mm\"`).\n * Takes a Date, a time in ms or text (`'2012-05-14'` is that day, not UTC midnight). The calendar follows\n * `provideWiraUI({ calendar })` in Thai and is Gregorian in other languages, unless given:\n * `{{ born | wuDate: 'long' : 'gregorian' }}`; a language too: `{{ born | wuDate: 'long' : null : 'en' }}`.\n * Re-renders by itself when the app's language changes (OnPush and zoneless views included).\n */\n@Pipe({ name: 'wuDate', standalone: true, pure: false })\nexport class WuDatePipe implements PipeTransform, OnDestroy {\n private readonly config = inject(WuConfig);\n private readonly i18n = ɵrefreshOnTranslation();\n private lastKey = '';\n private lastLocale: unknown = null;\n private lastValue = '';\n\n transform(value: unknown, format: ThaiDateFormat | string = 'medium', calendar?: CalendarSystem | null, lang?: string | null): string {\n const date = toDateValue(value);\n if (!date) return '';\n const own = this.config.translation;\n const language = lang || own.code || 'th';\n const cal: CalendarSystem = calendar ||
|
|
1
|
+
{"version":3,"file":"wirabyte-ui-thai.mjs","sources":["../../lib/thai/thai.pipes.ts","../../lib/thai/thai.module.ts","../../lib/thai/wirabyte-ui-thai.ts"],"sourcesContent":["import { inject, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { ɵrefreshOnTranslation, WuConfig } from '@wirabyte/ui/config';\nimport {\n bahtText,\n CalendarSystem,\n datePattern,\n formatDate,\n formatThaiId,\n formatThaiPhone,\n LOCALES,\n ThaiDateFormat,\n timeAgo,\n toDateValue,\n toThaiDigits,\n} from '@wirabyte/ui/core';\n\nexport type { ThaiDateFormat };\n\n/**\n * A date in the app's language, with พ.ศ. years in Thai: `{{ born | wuDate }}` → `14 พ.ค. 2555`. Formats:\n * `short` 14/05/2555 · `medium` 14 พ.ค. 2555 (default) · `long` 14 พฤษภาคม 2555 · `full` วันจันทร์ที่ 14 พฤษภาคม พ.ศ. 2555\n * · `time` 09:30 น. · `shortDateTime` · `dateTime`, or a pattern (`'d MMM yy'`, `\"EEEE d MMMM yyyy 'เวลา' HH:mm\"`).\n * Takes a Date, a time in ms or text (`'2012-05-14'` is that day, not UTC midnight). The calendar follows\n * `provideWiraUI({ calendar })` in Thai and is Gregorian in other languages, unless given:\n * `{{ born | wuDate: 'long' : 'gregorian' }}`; a language too: `{{ born | wuDate: 'long' : null : 'en' }}`.\n * Re-renders by itself when the app's language changes (OnPush and zoneless views included).\n */\n@Pipe({ name: 'wuDate', standalone: true, pure: false })\nexport class WuDatePipe implements PipeTransform, OnDestroy {\n private readonly config = inject(WuConfig);\n private readonly i18n = ɵrefreshOnTranslation();\n private lastKey = '';\n private lastLocale: unknown = null;\n private lastValue = '';\n\n transform(value: unknown, format: ThaiDateFormat | string = 'medium', calendar?: CalendarSystem | null, lang?: string | null): string {\n const date = toDateValue(value);\n if (!date) return '';\n const own = this.config.translation;\n const language = lang || own.code || 'th';\n const cal: CalendarSystem = calendar || this.config.calendarFor(language);\n const key = `${date.getTime()}|${format}|${cal}|${language}`;\n if (key === this.lastKey && own === this.lastLocale) return this.lastValue;\n const locale = language === own.code ? own : LOCALES[language] || own;\n this.lastKey = key;\n this.lastLocale = own;\n this.lastValue = formatDate(date, datePattern(format || 'medium', language, cal), { locale, calendar: cal });\n return this.lastValue;\n }\n\n ngOnDestroy(): void {\n this.i18n.unsubscribe();\n }\n}\n\n/** How long ago, in the app's language: `{{ sentAt | wuTimeAgo }}` → `5 นาทีที่ผ่านมา`, `เมื่อวาน`, `in 3 days`. */\n@Pipe({ name: 'wuTimeAgo', standalone: true, pure: false })\nexport class WuTimeAgoPipe implements PipeTransform, OnDestroy {\n private readonly config = inject(WuConfig);\n private readonly i18n = ɵrefreshOnTranslation();\n\n transform(value: unknown, lang?: string | null): string {\n return timeAgo(value, lang || this.config.translation.code || 'th', this.config.now());\n }\n\n ngOnDestroy(): void {\n this.i18n.unsubscribe();\n }\n}\n\n/** An amount in Thai words, as Excel's BAHTTEXT: `{{ 1250.5 | wuBahtText }}` → `หนึ่งพันสองร้อยห้าสิบบาทห้าสิบสตางค์`. */\n@Pipe({ name: 'wuBahtText', standalone: true })\nexport class WuBahtTextPipe implements PipeTransform {\n transform(value: number | string | null | undefined): string {\n return bahtText(value);\n }\n}\n\n/** A Thai phone number with dashes: `{{ '0812345678' | wuThaiPhone }}` → `081-234-5678` (`+66` too). */\n@Pipe({ name: 'wuThaiPhone', standalone: true })\nexport class WuThaiPhonePipe implements PipeTransform {\n transform(value: unknown, separator = '-'): string {\n return formatThaiPhone(value, separator);\n }\n}\n\n/** A Thai national ID with dashes: `{{ '1103702345679' | wuThaiId }}` → `1-1037-02345-67-9`. */\n@Pipe({ name: 'wuThaiId', standalone: true })\nexport class WuThaiIdPipe implements PipeTransform {\n transform(value: unknown): string {\n return value === null || value === undefined ? '' : formatThaiId(String(value));\n }\n}\n\n/** Thai digits for formal documents: `{{ '2569' | wuThaiDigits }}` → `๒๕๖๙` (works after other pipes too). */\n@Pipe({ name: 'wuThaiDigits', standalone: true })\nexport class WuThaiDigitsPipe implements PipeTransform {\n transform(value: unknown): string {\n return toThaiDigits(value);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { WuBahtTextPipe, WuDatePipe, WuThaiDigitsPipe, WuThaiIdPipe, WuThaiPhonePipe, WuTimeAgoPipe } from './thai.pipes';\n\nconst PIPES = [WuDatePipe, WuTimeAgoPipe, WuBahtTextPipe, WuThaiPhonePipe, WuThaiIdPipe, WuThaiDigitsPipe];\n\n/** For NgModule apps: every Thai pipe. Standalone apps import the pipes they use (`WuDatePipe` …). */\n@NgModule({\n imports: PIPES,\n exports: PIPES,\n})\nexport class WuThaiModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵrefreshOnTranslation"],"mappings":";;;;;;AAkBA;;;;;;;;AAQG;MAEU,UAAU,CAAA;AADvB,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC;QACzB,IAAA,CAAA,IAAI,GAAGA,qBAAqB,EAAE;QACvC,IAAA,CAAA,OAAO,GAAG,EAAE;QACZ,IAAA,CAAA,UAAU,GAAY,IAAI;QAC1B,IAAA,CAAA,SAAS,GAAG,EAAE;AAoBvB,IAAA;IAlBC,SAAS,CAAC,KAAc,EAAE,MAAA,GAAkC,QAAQ,EAAE,QAAgC,EAAE,IAAoB,EAAA;AAC1H,QAAA,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI;AAAE,YAAA,OAAO,EAAE;AACpB,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW;QACnC,MAAM,QAAQ,GAAG,IAAI,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI;AACzC,QAAA,MAAM,GAAG,GAAmB,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;AACzE,QAAA,MAAM,GAAG,GAAG,CAAA,EAAG,IAAI,CAAC,OAAO,EAAE,CAAA,CAAA,EAAI,MAAM,CAA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eAAe,EAAE,YAAY,EAAE,gBAAgB,CAAC;AAE1G;MAKa,YAAY,CAAA;+GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;gHAAZ,YAAY,EAAA,OAAA,EAAA,CAPV,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,CAAA,EAAA,OAAA,EAAA,CAA1F,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,CAAA,EAAA,CAAA,CAAA;gHAO5F,YAAY,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,KAAK;AACd,oBAAA,OAAO,EAAE,KAAK;AACf,iBAAA;;;ACTD;;AAEG;;"}
|
|
@@ -27,7 +27,7 @@ class WuToolbar {
|
|
|
27
27
|
return this.endRef || this.rightRef || _findTemplate(this.slotTemplates, 'end') || _findTemplate(this.slotTemplates, 'right');
|
|
28
28
|
}
|
|
29
29
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: WuToolbar, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
30
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: WuToolbar, isStandalone: true, selector: "wu-toolbar", inputs: { ariaLabel: "ariaLabel", styleClass: "styleClass", style: "style" }, queries: [{ propertyName: "startRef", first: true, predicate: ["start"],
|
|
30
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: WuToolbar, isStandalone: true, selector: "wu-toolbar", inputs: { ariaLabel: "ariaLabel", styleClass: "styleClass", style: "style" }, queries: [{ propertyName: "startRef", first: true, predicate: ["start"], read: TemplateRef }, { propertyName: "centerRef", first: true, predicate: ["center"], read: TemplateRef }, { propertyName: "endRef", first: true, predicate: ["end"], read: TemplateRef }, { propertyName: "leftRef", first: true, predicate: ["left"], read: TemplateRef }, { propertyName: "rightRef", first: true, predicate: ["right"], read: TemplateRef }, { propertyName: "slotTemplates", predicate: WuTemplate }], ngImport: i0, template: `<div class="wu-toolbar p-toolbar p-component" role="toolbar" [class]="styleClass || ''" [style]="hostStyle" [attr.aria-label]="ariaLabel || null">
|
|
31
31
|
<div class="wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left"><ng-content select="[wuToolbarStart]"></ng-content><ng-content></ng-content><ng-container *ngIf="startTemplate"><ng-container *ngTemplateOutlet="startTemplate"></ng-container></ng-container></div>
|
|
32
32
|
<div class="wu-toolbar-center p-toolbar-center p-toolbar-group-center"><ng-content select="[wuToolbarCenter]"></ng-content><ng-container *ngIf="centerTemplate"><ng-container *ngTemplateOutlet="centerTemplate"></ng-container></ng-container></div>
|
|
33
33
|
<div class="wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right"><ng-content select="[wuToolbarEnd]"></ng-content><ng-container *ngIf="endTemplate"><ng-container *ngTemplateOutlet="endTemplate"></ng-container></ng-container></div>
|
|
@@ -51,19 +51,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
51
51
|
args: [WuTemplate]
|
|
52
52
|
}], startRef: [{
|
|
53
53
|
type: ContentChild,
|
|
54
|
-
args: ['start', { read: TemplateRef }]
|
|
54
|
+
args: ['start', { read: TemplateRef, descendants: false }]
|
|
55
55
|
}], centerRef: [{
|
|
56
56
|
type: ContentChild,
|
|
57
|
-
args: ['center', { read: TemplateRef }]
|
|
57
|
+
args: ['center', { read: TemplateRef, descendants: false }]
|
|
58
58
|
}], endRef: [{
|
|
59
59
|
type: ContentChild,
|
|
60
|
-
args: ['end', { read: TemplateRef }]
|
|
60
|
+
args: ['end', { read: TemplateRef, descendants: false }]
|
|
61
61
|
}], leftRef: [{
|
|
62
62
|
type: ContentChild,
|
|
63
|
-
args: ['left', { read: TemplateRef }]
|
|
63
|
+
args: ['left', { read: TemplateRef, descendants: false }]
|
|
64
64
|
}], rightRef: [{
|
|
65
65
|
type: ContentChild,
|
|
66
|
-
args: ['right', { read: TemplateRef }]
|
|
66
|
+
args: ['right', { read: TemplateRef, descendants: false }]
|
|
67
67
|
}] } });
|
|
68
68
|
|
|
69
69
|
/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wirabyte-ui-toolbar.mjs","sources":["../../lib/toolbar/toolbar.component.ts","../../lib/toolbar/toolbar.module.ts","../../lib/toolbar/wirabyte-ui-toolbar.ts"],"sourcesContent":["import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵWU_SKIP_VERSION_CHECK, WuTemplate } from '@wirabyte/ui/config';\n\n/**\n * Row of actions in three groups that wrap on narrow screens:\n * `<wu-toolbar><div wuToolbarStart>…</div><div wuToolbarCenter>…</div><div wuToolbarEnd>…</div></wu-toolbar>`.\n * Unmarked content goes to the start group. The `start` / `center` / `end` templates (`left` / `right` in the older\n * names) work too.\n */\n@Component({\n selector: 'wu-toolbar',\n standalone: true,\n imports: [NgIf, NgTemplateOutlet],\n template: `<div class=\"wu-toolbar p-toolbar p-component\" role=\"toolbar\" [class]=\"styleClass || ''\" [style]=\"hostStyle\" [attr.aria-label]=\"ariaLabel || null\">\n <div class=\"wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left\"><ng-content select=\"[wuToolbarStart]\"></ng-content><ng-content></ng-content><ng-container *ngIf=\"startTemplate\"><ng-container *ngTemplateOutlet=\"startTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-center p-toolbar-center p-toolbar-group-center\"><ng-content select=\"[wuToolbarCenter]\"></ng-content><ng-container *ngIf=\"centerTemplate\"><ng-container *ngTemplateOutlet=\"centerTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right\"><ng-content select=\"[wuToolbarEnd]\"></ng-content><ng-container *ngIf=\"endTemplate\"><ng-container *ngTemplateOutlet=\"endTemplate\"></ng-container></ng-container></div>\n</div>`,\n styleUrls: ['./toolbar.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuToolbar {\n @Input() ariaLabel?: string;\n /** Classes for the element, as before. */\n @Input() styleClass?: string | null;\n /** Inline styles as an object: `[style]=\"{ width: '20rem' }\"` (a plain style attribute works as it is). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get hostStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('start', { read: TemplateRef }) protected startRef?: TemplateRef<unknown>;\n @ContentChild('center', { read: TemplateRef }) protected centerRef?: TemplateRef<unknown>;\n @ContentChild('end', { read: TemplateRef }) protected endRef?: TemplateRef<unknown>;\n @ContentChild('left', { read: TemplateRef }) protected leftRef?: TemplateRef<unknown>;\n @ContentChild('right', { read: TemplateRef }) protected rightRef?: TemplateRef<unknown>;\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get startTemplate(): TemplateRef<unknown> | null {\n return this.startRef || this.leftRef || ɵfindTemplate(this.slotTemplates, 'start') || ɵfindTemplate(this.slotTemplates, 'left');\n }\n get centerTemplate(): TemplateRef<unknown> | null {\n return this.centerRef || ɵfindTemplate(this.slotTemplates, 'center');\n }\n get endTemplate(): TemplateRef<unknown> | null {\n return this.endRef || this.rightRef || ɵfindTemplate(this.slotTemplates, 'end') || ɵfindTemplate(this.slotTemplates, 'right');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuToolbar } from './toolbar.component';\n\n/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */\n@NgModule({\n imports: [WuToolbar, WuTemplate],\n exports: [WuToolbar, WuTemplate],\n})\nexport class WuToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵfindTemplate"],"mappings":";;;;;AAIA;;;;;AAKG;MAcU,SAAS,CAAA;;AAQpB,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI;IACzE;AASA,IAAA,WAAA,GAAA;AACE,QAAAA,uBAAuB,CAAC,MAAM,CAACC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E;AAEA,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAIC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;IACjI;AACA,IAAA,IAAI,cAAc,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,SAAS,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC;IACtE;AACA,IAAA,IAAI,WAAW,GAAA;QACb,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,QAAQ,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC;IAC/H;+GA/BW,SAAS,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAT,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,SAAS,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,OAAA,EAAA,CAAA,EAAA,YAAA,EAAA,UAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,
|
|
1
|
+
{"version":3,"file":"wirabyte-ui-toolbar.mjs","sources":["../../lib/toolbar/toolbar.component.ts","../../lib/toolbar/toolbar.module.ts","../../lib/toolbar/wirabyte-ui-toolbar.ts"],"sourcesContent":["import { NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, inject, Input, QueryList, TemplateRef, ViewEncapsulation } from '@angular/core';\nimport { ɵassertSupportedAngular, ɵfindTemplate, ɵWU_SKIP_VERSION_CHECK, WuTemplate } from '@wirabyte/ui/config';\n\n/**\n * Row of actions in three groups that wrap on narrow screens:\n * `<wu-toolbar><div wuToolbarStart>…</div><div wuToolbarCenter>…</div><div wuToolbarEnd>…</div></wu-toolbar>`.\n * Unmarked content goes to the start group. The `start` / `center` / `end` templates (`left` / `right` in the older\n * names) work too.\n */\n@Component({\n selector: 'wu-toolbar',\n standalone: true,\n imports: [NgIf, NgTemplateOutlet],\n template: `<div class=\"wu-toolbar p-toolbar p-component\" role=\"toolbar\" [class]=\"styleClass || ''\" [style]=\"hostStyle\" [attr.aria-label]=\"ariaLabel || null\">\n <div class=\"wu-toolbar-start p-toolbar-start p-toolbar-group-start p-toolbar-group-left\"><ng-content select=\"[wuToolbarStart]\"></ng-content><ng-content></ng-content><ng-container *ngIf=\"startTemplate\"><ng-container *ngTemplateOutlet=\"startTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-center p-toolbar-center p-toolbar-group-center\"><ng-content select=\"[wuToolbarCenter]\"></ng-content><ng-container *ngIf=\"centerTemplate\"><ng-container *ngTemplateOutlet=\"centerTemplate\"></ng-container></ng-container></div>\n <div class=\"wu-toolbar-end p-toolbar-end p-toolbar-group-end p-toolbar-group-right\"><ng-content select=\"[wuToolbarEnd]\"></ng-content><ng-container *ngIf=\"endTemplate\"><ng-container *ngTemplateOutlet=\"endTemplate\"></ng-container></ng-container></div>\n</div>`,\n styleUrls: ['./toolbar.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class WuToolbar {\n @Input() ariaLabel?: string;\n /** Classes for the element, as before. */\n @Input() styleClass?: string | null;\n /** Inline styles as an object: `[style]=\"{ width: '20rem' }\"` (a plain style attribute works as it is). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Input() style?: Record<string, any> | string | null;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get hostStyle(): Record<string, any> | null {\n return this.style && typeof this.style === 'object' ? this.style : null;\n }\n\n @ContentChildren(WuTemplate) protected slotTemplates?: QueryList<WuTemplate>;\n @ContentChild('start', { read: TemplateRef, descendants: false }) protected startRef?: TemplateRef<unknown>;\n @ContentChild('center', { read: TemplateRef, descendants: false }) protected centerRef?: TemplateRef<unknown>;\n @ContentChild('end', { read: TemplateRef, descendants: false }) protected endRef?: TemplateRef<unknown>;\n @ContentChild('left', { read: TemplateRef, descendants: false }) protected leftRef?: TemplateRef<unknown>;\n @ContentChild('right', { read: TemplateRef, descendants: false }) protected rightRef?: TemplateRef<unknown>;\n\n constructor() {\n ɵassertSupportedAngular(inject(ɵWU_SKIP_VERSION_CHECK, { optional: true }));\n }\n\n get startTemplate(): TemplateRef<unknown> | null {\n return this.startRef || this.leftRef || ɵfindTemplate(this.slotTemplates, 'start') || ɵfindTemplate(this.slotTemplates, 'left');\n }\n get centerTemplate(): TemplateRef<unknown> | null {\n return this.centerRef || ɵfindTemplate(this.slotTemplates, 'center');\n }\n get endTemplate(): TemplateRef<unknown> | null {\n return this.endRef || this.rightRef || ɵfindTemplate(this.slotTemplates, 'end') || ɵfindTemplate(this.slotTemplates, 'right');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { WuTemplate } from '@wirabyte/ui/config';\nimport { WuToolbar } from './toolbar.component';\n\n/** For NgModule apps. Standalone apps can import `WuToolbar` directly. */\n@NgModule({\n imports: [WuToolbar, WuTemplate],\n exports: [WuToolbar, WuTemplate],\n})\nexport class WuToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵassertSupportedAngular","ɵWU_SKIP_VERSION_CHECK","ɵfindTemplate"],"mappings":";;;;;AAIA;;;;;AAKG;MAcU,SAAS,CAAA;;AAQpB,IAAA,IAAI,SAAS,GAAA;QACX,OAAO,IAAI,CAAC,KAAK,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI;IACzE;AASA,IAAA,WAAA,GAAA;AACE,QAAAA,uBAAuB,CAAC,MAAM,CAACC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E;AAEA,IAAA,IAAI,aAAa,GAAA;QACf,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,IAAIC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,IAAIA,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC;IACjI;AACA,IAAA,IAAI,cAAc,GAAA;AAChB,QAAA,OAAO,IAAI,CAAC,SAAS,IAAIA,a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E;;sBAC9D,YAAY;uBAAC,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE;;;ACpClE;MAKa,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAHhB,SAAS,EAAE,UAAU,CAAA,EAAA,OAAA,EAAA,CACrB,SAAS,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;gHAEpB,eAAe,EAAA,CAAA,CAAA;;4FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;AACjC,iBAAA;;;ACRD;;AAEG;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirabyte/ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "WiraUI UI components for Angular 21+: familiar API, Thai-first, themable with SCSS, CSS or TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://ui.wirabyte.com",
|
|
@@ -129,6 +129,10 @@
|
|
|
129
129
|
"types": "./types/wirabyte-ui-chartjs.d.ts",
|
|
130
130
|
"default": "./fesm2022/wirabyte-ui-chartjs.mjs"
|
|
131
131
|
},
|
|
132
|
+
"./chat": {
|
|
133
|
+
"types": "./types/wirabyte-ui-chat.d.ts",
|
|
134
|
+
"default": "./fesm2022/wirabyte-ui-chat.mjs"
|
|
135
|
+
},
|
|
132
136
|
"./checkbox": {
|
|
133
137
|
"types": "./types/wirabyte-ui-checkbox.d.ts",
|
|
134
138
|
"default": "./fesm2022/wirabyte-ui-checkbox.mjs"
|
|
@@ -161,6 +165,10 @@
|
|
|
161
165
|
"types": "./types/wirabyte-ui-datepicker.d.ts",
|
|
162
166
|
"default": "./fesm2022/wirabyte-ui-datepicker.mjs"
|
|
163
167
|
},
|
|
168
|
+
"./descriptions": {
|
|
169
|
+
"types": "./types/wirabyte-ui-descriptions.d.ts",
|
|
170
|
+
"default": "./fesm2022/wirabyte-ui-descriptions.mjs"
|
|
171
|
+
},
|
|
164
172
|
"./dialog": {
|
|
165
173
|
"types": "./types/wirabyte-ui-dialog.d.ts",
|
|
166
174
|
"default": "./fesm2022/wirabyte-ui-dialog.mjs"
|
|
@@ -357,6 +365,10 @@
|
|
|
357
365
|
"types": "./types/wirabyte-ui-ripple.d.ts",
|
|
358
366
|
"default": "./fesm2022/wirabyte-ui-ripple.mjs"
|
|
359
367
|
},
|
|
368
|
+
"./scheduler": {
|
|
369
|
+
"types": "./types/wirabyte-ui-scheduler.d.ts",
|
|
370
|
+
"default": "./fesm2022/wirabyte-ui-scheduler.mjs"
|
|
371
|
+
},
|
|
360
372
|
"./scroller": {
|
|
361
373
|
"types": "./types/wirabyte-ui-scroller.d.ts",
|
|
362
374
|
"default": "./fesm2022/wirabyte-ui-scroller.mjs"
|
|
@@ -373,6 +385,10 @@
|
|
|
373
385
|
"types": "./types/wirabyte-ui-selectbutton.d.ts",
|
|
374
386
|
"default": "./fesm2022/wirabyte-ui-selectbutton.mjs"
|
|
375
387
|
},
|
|
388
|
+
"./signaturepad": {
|
|
389
|
+
"types": "./types/wirabyte-ui-signaturepad.d.ts",
|
|
390
|
+
"default": "./fesm2022/wirabyte-ui-signaturepad.mjs"
|
|
391
|
+
},
|
|
376
392
|
"./sitefooter": {
|
|
377
393
|
"types": "./types/wirabyte-ui-sitefooter.d.ts",
|
|
378
394
|
"default": "./fesm2022/wirabyte-ui-sitefooter.mjs"
|
|
@@ -393,6 +409,10 @@
|
|
|
393
409
|
"types": "./types/wirabyte-ui-splitter.d.ts",
|
|
394
410
|
"default": "./fesm2022/wirabyte-ui-splitter.mjs"
|
|
395
411
|
},
|
|
412
|
+
"./stat": {
|
|
413
|
+
"types": "./types/wirabyte-ui-stat.d.ts",
|
|
414
|
+
"default": "./fesm2022/wirabyte-ui-stat.mjs"
|
|
415
|
+
},
|
|
396
416
|
"./stepper": {
|
|
397
417
|
"types": "./types/wirabyte-ui-stepper.d.ts",
|
|
398
418
|
"default": "./fesm2022/wirabyte-ui-stepper.mjs"
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/** Fixed design data. packages/themes/scripts/gen-scss-data.mjs writes the Sass copy of these tables. */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.COMPONENT_TOKENS = exports.VERSION_CATALOG = exports.CLASSIC_THEMES = exports.PRESET_NAMES = exports.PRESETS = exports.FAMILY_GENERATION = exports.SEMANTIC_DEFAULTS = exports.SEMANTIC_KEYS = exports.FOCUS_STYLES = exports.SHADOWS = exports.DENSITY = exports.FONTS = exports.SURFACES = exports.PRIMARY_SWATCHES = void 0;
|
|
5
|
+
exports.googleFontHref = googleFontHref;
|
|
5
6
|
exports.presetExportName = presetExportName;
|
|
6
7
|
exports.PRIMARY_SWATCHES = [
|
|
7
8
|
/** Wirabyte brand blue (wirabyte.com --wb-primary). */
|
|
@@ -43,6 +44,26 @@ exports.SURFACES = {
|
|
|
43
44
|
ink: ['#f6f8fc', '#eef2f9', '#e3e8f1', '#cfd7e4', '#98a5b8', '#556274', '#334155', '#2a3a52', '#1c2839', '#0e1624', '#070b14'],
|
|
44
45
|
};
|
|
45
46
|
exports.FONTS = ['Kanit', 'Sarabun', 'Prompt', 'Noto Sans Thai', 'IBM Plex Sans Thai', 'Anuphan', 'Inter', 'Roboto'];
|
|
47
|
+
/** Google Fonts families the presets, ng add and the Studio use, with the weights to ask for (the API refuses weights a family lacks). */
|
|
48
|
+
const GOOGLE_FONT_WEIGHTS = {
|
|
49
|
+
...Object.fromEntries(exports.FONTS.map((f) => [f, ':wght@400;500;600;700'])),
|
|
50
|
+
'Noto Sans Thai Looped': ':wght@400;500;600;700',
|
|
51
|
+
'Noto Serif Thai': ':wght@400;500;600;700',
|
|
52
|
+
Taviraj: ':wght@400;500;600;700',
|
|
53
|
+
Trirong: ':wght@400;500;600;700',
|
|
54
|
+
Pridi: ':wght@400;500;600;700',
|
|
55
|
+
Itim: '',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The Google Fonts stylesheet for the first family of a CSS `font-family` value (`"'Kanit', sans-serif"`), or `null` when
|
|
59
|
+
* it is not a family the themes know.
|
|
60
|
+
*/
|
|
61
|
+
function googleFontHref(fontFamily) {
|
|
62
|
+
const name = fontFamily.split(',')[0].trim().replace(/^['"]|['"]$/g, '');
|
|
63
|
+
if (!Object.prototype.hasOwnProperty.call(GOOGLE_FONT_WEIGHTS, name))
|
|
64
|
+
return null;
|
|
65
|
+
return `https://fonts.googleapis.com/css2?family=${name.replace(/ /g, '+')}${GOOGLE_FONT_WEIGHTS[name]}&display=swap`;
|
|
66
|
+
}
|
|
46
67
|
/** Density multiplies every padding a preset defines (1 = the preset's own spacing). */
|
|
47
68
|
exports.DENSITY = {
|
|
48
69
|
compact: 0.8,
|
|
@@ -125,7 +146,7 @@ exports.PRESETS = {
|
|
|
125
146
|
material: { ...styled, family: 'material', label: 'Material', fontFamily: 'Roboto', primary: '#10b981', surface: 'slate', semantic: MATERIAL_SEMANTIC, radius: 6, shadow: 'material', ripple: true, focusRing: 'inset' },
|
|
126
147
|
phet: { ...styled, family: 'phet', label: 'Phet', primary: '#10b981', surface: 'slate', semantic: PHET_SEMANTIC, radius: 6, shadow: 'phet', ripple: false, focusRing: 'bold', transition: 0 },
|
|
127
148
|
// ---- v3: WiraUI's own ----
|
|
128
|
-
wira: { family: 'wira', label: 'Wira', primary: '#1e7ae0', surface: 'ink', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Kanit', fontSize: 14, lineHeight: 1.6, radius:
|
|
149
|
+
wira: { family: 'wira', label: 'Wira', primary: '#1e7ae0', surface: 'ink', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Kanit', fontSize: 14, lineHeight: 1.6, radius: 10, density: 'normal', shadow: 'soft', ripple: false, focusRing: 'ring', transition: 150, scheme: 'light' },
|
|
129
150
|
lanna: { family: 'wira', label: 'Lanna', primary: '#0d9488', surface: 'stone', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Sarabun', fontSize: 15, lineHeight: 1.7, radius: 12, density: 'comfortable', shadow: 'soft', ripple: false, focusRing: 'ring', transition: 200, scheme: 'light' },
|
|
130
151
|
siam: { family: 'wira', label: 'Siam', primary: '#6366f1', surface: 'gray', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'Prompt', fontSize: 14, lineHeight: 1.6, radius: 4, density: 'normal', shadow: 'elevated', ripple: true, focusRing: 'outline', transition: 200, scheme: 'light' },
|
|
131
152
|
nakhon: { family: 'wira', label: 'Nakhon', primary: '#3b82f6', surface: 'zinc', semantic: exports.SEMANTIC_DEFAULTS, fontFamily: 'IBM Plex Sans Thai', fontSize: 13, lineHeight: 1.55, radius: 2, density: 'compact', shadow: 'none', ripple: false, focusRing: 'outline', transition: 100, scheme: 'light' },
|
|
@@ -77,6 +77,37 @@ function merge(...parts) {
|
|
|
77
77
|
// ---------- Mali (the styled default) is the base every family starts from ----------
|
|
78
78
|
const MALI = merge({
|
|
79
79
|
light: {
|
|
80
|
+
// Titles (card, dialog, drawer, panel, fieldset, alert, empty state, result, error page): the body font unless a
|
|
81
|
+
// theme sets $heading-font-family / semantic.headingFontFamily, e.g. Kanit titles over IBM Plex Sans Thai text.
|
|
82
|
+
'heading-font-family': v('font-family'),
|
|
83
|
+
// Components new in release 1. They follow the card, field and tag tokens, so every preset styles them.
|
|
84
|
+
'stat-gap': '0.875rem',
|
|
85
|
+
'stat-icon-size': '2.75rem',
|
|
86
|
+
'stat-label-size': '0.875rem',
|
|
87
|
+
'stat-value-size': '1.75rem',
|
|
88
|
+
'stat-value-weight': '700',
|
|
89
|
+
'descriptions-gap': '0.75rem 1.5rem',
|
|
90
|
+
'descriptions-label-color': v('text-muted'),
|
|
91
|
+
'descriptions-label-weight': '400',
|
|
92
|
+
'descriptions-label-width': '9rem',
|
|
93
|
+
'descriptions-bordered-label-bg': v('hover-bg'),
|
|
94
|
+
'signature-height': '12rem',
|
|
95
|
+
'signature-ink': v('text'),
|
|
96
|
+
'signature-line': v('border'),
|
|
97
|
+
'chat-height': '32rem',
|
|
98
|
+
'chat-bubble-radius': '1.125rem',
|
|
99
|
+
'chat-bubble-bg': v('hover-bg'),
|
|
100
|
+
'chat-bubble-color': v('text'),
|
|
101
|
+
'chat-mine-bg': v('primary-color'),
|
|
102
|
+
'chat-mine-color': v('primary-contrast'),
|
|
103
|
+
'chat-meta-color': v('text-muted'),
|
|
104
|
+
'chat-gap': '0.25rem',
|
|
105
|
+
'scheduler-hour-height': '3rem',
|
|
106
|
+
'scheduler-border': v('border'),
|
|
107
|
+
'scheduler-today-bg': 'color-mix(in srgb, var(--wu-primary-color) 7%, transparent)',
|
|
108
|
+
'scheduler-event-bg': 'color-mix(in srgb, var(--wu-primary-color) 14%, var(--wu-card-bg))',
|
|
109
|
+
'scheduler-event-color': v('primary-soft-text'),
|
|
110
|
+
'scheduler-event-bar': v('primary-color'),
|
|
80
111
|
'primary-color': p(500),
|
|
81
112
|
'primary-hover': p(600),
|
|
82
113
|
'primary-active': p(700),
|
|
@@ -186,6 +217,9 @@ const MALI = merge({
|
|
|
186
217
|
'tag-padding-x': '0.5rem',
|
|
187
218
|
'tag-gap': '0.25rem',
|
|
188
219
|
'tag-fill': '0%',
|
|
220
|
+
// The soft look is the tag's colour at this strength over whatever is behind it, so it shows on white cards and
|
|
221
|
+
// grey pages alike (a fixed pale shade nearly vanished on a grey page).
|
|
222
|
+
'tag-soft-mix': '14%',
|
|
189
223
|
'badge-size': '1.5rem',
|
|
190
224
|
'badge-font-size': '0.75rem',
|
|
191
225
|
'badge-font-weight': '700',
|
|
@@ -1729,6 +1763,14 @@ const WIRA = merge(MALI, severities([600, 700, 800, 50, 800], [400, 300, 200, 40
|
|
|
1729
1763
|
'spinner-color-2': v('primary-color'),
|
|
1730
1764
|
'spinner-color-3': v('primary-color'),
|
|
1731
1765
|
'spinner-color-4': v('primary-color'),
|
|
1766
|
+
// A lighter, current look: table heads without a band, in quiet text; the chosen menu item a soft tint of the
|
|
1767
|
+
// primary colour rather than a solid bar.
|
|
1768
|
+
'table-head-bg': 'transparent',
|
|
1769
|
+
'table-head-color': v('text-muted'),
|
|
1770
|
+
'table-head-weight': '500',
|
|
1771
|
+
'table-head-hover-bg': v('hover-bg'),
|
|
1772
|
+
'aside-menu-item-active-bg': 'color-mix(in srgb, var(--wu-primary-color) 12%, transparent)',
|
|
1773
|
+
'aside-menu-item-active-color': v('primary-color'),
|
|
1732
1774
|
},
|
|
1733
1775
|
dark: {
|
|
1734
1776
|
'primary-soft': mix(p(400), 16, s(800)),
|
|
@@ -124,6 +124,10 @@ function setTokens(set, s950) {
|
|
|
124
124
|
const f = sem.fontFamily;
|
|
125
125
|
t.light['font-family'] = /[,'"]/.test(f) ? f : `'${f}', sans-serif`;
|
|
126
126
|
}
|
|
127
|
+
if (sem.headingFontFamily !== undefined) {
|
|
128
|
+
const f = sem.headingFontFamily;
|
|
129
|
+
t.light['heading-font-family'] = /[,'"]/.test(f) ? f : `'${f}', sans-serif`;
|
|
130
|
+
}
|
|
127
131
|
if (sem.fontSize !== undefined) {
|
|
128
132
|
if (typeof sem.fontSize === 'number')
|
|
129
133
|
(0, tokens_1.mergeTokens)(t, (0, tokens_1.fontTokens)({ fontSize: sem.fontSize }));
|
|
@@ -151,8 +155,29 @@ function setTokens(set, s950) {
|
|
|
151
155
|
if (v !== undefined)
|
|
152
156
|
(0, tokens_1.mergeTokens)(t, (0, tokens_1.componentValue)(spec, v));
|
|
153
157
|
}
|
|
158
|
+
const raw = set.tokens || {};
|
|
159
|
+
for (const name of Object.keys(raw)) {
|
|
160
|
+
if (!knownToken(name))
|
|
161
|
+
throw new Error(`wiraui: unknown token ${name} (write the name without --wu-, e.g. 'table-header-bg')`);
|
|
162
|
+
t.light[name] = String(raw[name]);
|
|
163
|
+
}
|
|
154
164
|
return t;
|
|
155
165
|
}
|
|
166
|
+
let tokenNames = null;
|
|
167
|
+
/** Every token some preset defines, so a misspelt name in `tokens` is caught instead of silently doing nothing. */
|
|
168
|
+
function knownToken(name) {
|
|
169
|
+
if (!tokenNames) {
|
|
170
|
+
tokenNames = new Set();
|
|
171
|
+
for (const id of Object.keys(catalog_1.PRESETS)) {
|
|
172
|
+
const t = (0, tokens_1.computeTokens)((0, config_1.defaults)(id));
|
|
173
|
+
for (const k of Object.keys(t.light))
|
|
174
|
+
tokenNames.add(k);
|
|
175
|
+
for (const k of Object.keys(t.dark))
|
|
176
|
+
tokenNames.add(k);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return tokenNames.has(name);
|
|
180
|
+
}
|
|
156
181
|
/**
|
|
157
182
|
* Only the tokens an override set touches; derived tokens follow through `var()`.
|
|
158
183
|
* With `scheme: 'dark'` (Sayan, Ratri, sila-dark-*) the dark values are the only values.
|
|
@@ -325,6 +325,39 @@ exports.TH_LOCALE = {
|
|
|
325
325
|
characters: '{0} ตัวอักษร',
|
|
326
326
|
content: 'เนื้อหา',
|
|
327
327
|
},
|
|
328
|
+
chat: {
|
|
329
|
+
placeholder: 'พิมพ์ข้อความ',
|
|
330
|
+
send: 'ส่ง',
|
|
331
|
+
attach: 'แนบไฟล์',
|
|
332
|
+
removeFile: 'เอาไฟล์ออก',
|
|
333
|
+
typing: '{name} กำลังพิมพ์',
|
|
334
|
+
typingMany: '{count} คนกำลังพิมพ์',
|
|
335
|
+
read: 'อ่านแล้ว',
|
|
336
|
+
readBy: 'อ่านแล้ว {count}',
|
|
337
|
+
today: 'วันนี้',
|
|
338
|
+
yesterday: 'เมื่อวาน',
|
|
339
|
+
closed: 'ปิดการสนทนาแล้ว',
|
|
340
|
+
emptyTitle: 'ยังไม่มีข้อความ',
|
|
341
|
+
emptyDescription: 'เริ่มพิมพ์ข้อความด้านล่าง',
|
|
342
|
+
loadMore: 'ดูข้อความก่อนหน้า',
|
|
343
|
+
failed: 'ส่งไม่สำเร็จ',
|
|
344
|
+
retry: 'ส่งอีกครั้ง',
|
|
345
|
+
newMessages: 'ข้อความใหม่',
|
|
346
|
+
messages: 'ข้อความ',
|
|
347
|
+
},
|
|
348
|
+
signaturePad: { label: 'ช่องเซ็นชื่อ', hint: 'เซ็นชื่อในกรอบนี้', clear: 'ล้าง', undo: 'ย้อนกลับ' },
|
|
349
|
+
scheduler: {
|
|
350
|
+
today: 'วันนี้',
|
|
351
|
+
previous: 'ก่อนหน้า',
|
|
352
|
+
next: 'ถัดไป',
|
|
353
|
+
day: 'วัน',
|
|
354
|
+
week: 'สัปดาห์',
|
|
355
|
+
month: 'เดือน',
|
|
356
|
+
allDay: 'ทั้งวัน',
|
|
357
|
+
more: 'อีก {count} รายการ',
|
|
358
|
+
noEvents: 'ไม่มีนัดหมาย',
|
|
359
|
+
},
|
|
360
|
+
stat: { up: 'เพิ่มขึ้น', down: 'ลดลง', same: 'เท่าเดิม' },
|
|
328
361
|
};
|
|
329
362
|
exports.EN_LOCALE = {
|
|
330
363
|
code: 'en',
|
|
@@ -650,5 +683,38 @@ exports.EN_LOCALE = {
|
|
|
650
683
|
characters: '{0} characters',
|
|
651
684
|
content: 'Content',
|
|
652
685
|
},
|
|
686
|
+
chat: {
|
|
687
|
+
placeholder: 'Type a message',
|
|
688
|
+
send: 'Send',
|
|
689
|
+
attach: 'Attach files',
|
|
690
|
+
removeFile: 'Remove file',
|
|
691
|
+
typing: '{name} is typing',
|
|
692
|
+
typingMany: '{count} people are typing',
|
|
693
|
+
read: 'Read',
|
|
694
|
+
readBy: 'Read by {count}',
|
|
695
|
+
today: 'Today',
|
|
696
|
+
yesterday: 'Yesterday',
|
|
697
|
+
closed: 'This conversation is closed',
|
|
698
|
+
emptyTitle: 'No messages yet',
|
|
699
|
+
emptyDescription: 'Start typing below',
|
|
700
|
+
loadMore: 'Earlier messages',
|
|
701
|
+
failed: 'Not sent',
|
|
702
|
+
retry: 'Send again',
|
|
703
|
+
newMessages: 'New messages',
|
|
704
|
+
messages: 'Messages',
|
|
705
|
+
},
|
|
706
|
+
signaturePad: { label: 'Signature', hint: 'Sign in the box', clear: 'Clear', undo: 'Undo' },
|
|
707
|
+
scheduler: {
|
|
708
|
+
today: 'Today',
|
|
709
|
+
previous: 'Previous',
|
|
710
|
+
next: 'Next',
|
|
711
|
+
day: 'Day',
|
|
712
|
+
week: 'Week',
|
|
713
|
+
month: 'Month',
|
|
714
|
+
allDay: 'All day',
|
|
715
|
+
more: '+{count} more',
|
|
716
|
+
noEvents: 'No events',
|
|
717
|
+
},
|
|
718
|
+
stat: { up: 'Up', down: 'Down', same: 'No change' },
|
|
653
719
|
};
|
|
654
720
|
exports.LOCALES = { th: exports.TH_LOCALE, en: exports.EN_LOCALE };
|
|
@@ -119,7 +119,9 @@ function ngAdd(options) {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
const [locale, calendar] = options.locale === 'en' ? ['en', 'gregorian'] : options.locale === 'th-gregorian' ? ['th', 'gregorian'] : ['th', 'buddhist'];
|
|
122
|
-
|
|
122
|
+
// --font=none: the app brings its own font files, so the theme must not fetch any from Google either.
|
|
123
|
+
const fonts = options.font === 'none' ? ", fonts: 'none'" : '';
|
|
124
|
+
const provider = `provideWiraUI({ overrides: wiraOverrides, locale: '${locale}', calendar: '${calendar}', darkMode: '${options.darkMode}'${fonts} })`;
|
|
123
125
|
done.push(structure === 'module' ? addToModule(tree, project, themeDir, provider) : addToStandalone(tree, project, themeDir, provider));
|
|
124
126
|
if (options.font !== 'none')
|
|
125
127
|
done.push(addFont(tree, project, fontChoice || config.fontFamily));
|