@bitrix24/b24ui-nuxt 0.3.5 → 0.4.1

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.
Files changed (76) hide show
  1. package/.nuxt/b24ui/button.ts +2 -1
  2. package/.nuxt/b24ui/index.ts +1 -0
  3. package/.nuxt/b24ui/modal.ts +1 -1
  4. package/.nuxt/b24ui/prose/prose-h1.ts +6 -0
  5. package/.nuxt/b24ui/prose/prose-h2.ts +16 -0
  6. package/.nuxt/b24ui/prose/prose-h3.ts +16 -0
  7. package/.nuxt/b24ui/prose/prose-li.ts +5 -0
  8. package/.nuxt/b24ui/prose/prose-ol.ts +5 -0
  9. package/.nuxt/b24ui/prose/prose-p.ts +5 -0
  10. package/.nuxt/b24ui/prose/prose-ul.ts +5 -0
  11. package/.nuxt/b24ui/slideover.ts +3 -2
  12. package/dist/meta.cjs +32842 -29748
  13. package/dist/meta.d.cts +32842 -29748
  14. package/dist/meta.d.mts +32842 -29748
  15. package/dist/meta.d.ts +32842 -29748
  16. package/dist/meta.mjs +32842 -29748
  17. package/dist/module.cjs +6 -1
  18. package/dist/module.json +1 -1
  19. package/dist/module.mjs +6 -1
  20. package/dist/runtime/components/Advice.vue +3 -0
  21. package/dist/runtime/components/Alert.vue +17 -2
  22. package/dist/runtime/components/Avatar.vue +7 -0
  23. package/dist/runtime/components/AvatarGroup.vue +3 -0
  24. package/dist/runtime/components/Badge.vue +21 -3
  25. package/dist/runtime/components/Button.vue +37 -7
  26. package/dist/runtime/components/ButtonGroup.vue +7 -1
  27. package/dist/runtime/components/Checkbox.vue +6 -0
  28. package/dist/runtime/components/Chip.vue +18 -2
  29. package/dist/runtime/components/Countdown.vue +32 -8
  30. package/dist/runtime/components/{content/DescriptionList.vue → DescriptionList.vue} +19 -8
  31. package/dist/runtime/components/DropdownMenu.vue +14 -2
  32. package/dist/runtime/components/DropdownMenuContent.vue +6 -0
  33. package/dist/runtime/components/FormField.vue +6 -0
  34. package/dist/runtime/components/Input.vue +50 -6
  35. package/dist/runtime/components/InputMenu.vue +67 -15
  36. package/dist/runtime/components/InputNumber.vue +42 -8
  37. package/dist/runtime/components/Kbd.vue +6 -0
  38. package/dist/runtime/components/Link.vue +8 -4
  39. package/dist/runtime/components/Modal.vue +9 -3
  40. package/dist/runtime/components/OverlayProvider.vue +2 -2
  41. package/dist/runtime/components/Progress.vue +19 -3
  42. package/dist/runtime/components/RadioGroup.vue +6 -0
  43. package/dist/runtime/components/Range.vue +9 -1
  44. package/dist/runtime/components/Select.vue +47 -10
  45. package/dist/runtime/components/SelectMenu.vue +52 -12
  46. package/dist/runtime/components/Separator.vue +16 -2
  47. package/dist/runtime/components/Slideover.vue +12 -2
  48. package/dist/runtime/components/Switch.vue +19 -3
  49. package/dist/runtime/components/Tabs.vue +12 -0
  50. package/dist/runtime/components/Textarea.vue +50 -6
  51. package/dist/runtime/components/Toast.vue +13 -2
  52. package/dist/runtime/components/Toaster.vue +8 -0
  53. package/dist/runtime/components/{prose → content}/TableWrapper.vue +27 -3
  54. package/dist/runtime/composables/useComponentIcons.d.ts +11 -4
  55. package/dist/runtime/composables/useOverlay.js +1 -1
  56. package/dist/runtime/index.css +1 -1
  57. package/dist/runtime/prose/ProseH1.vue +36 -0
  58. package/dist/runtime/prose/ProseH2.vue +36 -0
  59. package/dist/runtime/prose/ProseH3.vue +36 -0
  60. package/dist/runtime/prose/ProseLi.vue +36 -0
  61. package/dist/runtime/prose/ProseOl.vue +36 -0
  62. package/dist/runtime/prose/ProseP.vue +36 -0
  63. package/dist/runtime/prose/ProseUl.vue +36 -0
  64. package/dist/runtime/types/index.d.ts +9 -2
  65. package/dist/runtime/types/index.js +9 -2
  66. package/dist/runtime/utils/index.js +1 -1
  67. package/dist/runtime/vue/components/Link.vue +8 -4
  68. package/dist/shared/{b24ui-nuxt.CeQRWQD-.mjs → b24ui-nuxt.BGGwh89R.mjs} +204 -82
  69. package/dist/shared/{b24ui-nuxt.M7bz91Io.cjs → b24ui-nuxt.CnMGpwQb.cjs} +204 -82
  70. package/dist/unplugin.cjs +5 -5
  71. package/dist/unplugin.mjs +5 -5
  72. package/dist/vite.cjs +1 -1
  73. package/dist/vite.mjs +1 -1
  74. package/package.json +10 -8
  75. /package/.nuxt/b24ui/{prose → content}/table-wrapper.ts +0 -0
  76. /package/.nuxt/b24ui/{content/description-list.ts → description-list.ts} +0 -0
@@ -93,7 +93,7 @@ export interface LinkSlots {
93
93
 
94
94
  <script setup lang="ts">
95
95
  import { computed, getCurrentInstance } from 'vue'
96
- import { isEqual, diff } from 'ohash'
96
+ import { isEqual, diff } from 'ohash/utils'
97
97
  import { useForwardProps } from 'reka-ui'
98
98
  import { reactiveOmit } from '@vueuse/core'
99
99
  import { hasProtocol } from 'ufo'
@@ -144,11 +144,15 @@ const b24ui = computed(() => tv({
144
144
  function isPartiallyEqual(item1: any, item2: any) {
145
145
  const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
146
146
  if (q.type === 'added') {
147
- filtered.push(q.key)
147
+ filtered.add(q.key)
148
148
  }
149
149
  return filtered
150
- }, [] as string[])
151
- return isEqual(item1, item2, { excludeKeys: key => diffedKeys.includes(key) })
150
+ }, new Set<string>())
151
+
152
+ const item1Filtered = Object.fromEntries(Object.entries(item1).filter(([key]) => !diffedKeys.has(key)))
153
+ const item2Filtered = Object.fromEntries(Object.entries(item2).filter(([key]) => !diffedKeys.has(key)))
154
+
155
+ return isEqual(item1Filtered, item2Filtered)
152
156
  }
153
157
 
154
158
  const isExternal = computed(() => {
@@ -713,6 +713,12 @@ const badge = {
713
713
  }
714
714
  };
715
715
 
716
+ const safeList$1 = [
717
+ "h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center",
718
+ "w-[28px] h-[28px]",
719
+ "size-lg animate-spin stroke-2",
720
+ "invisible"
721
+ ].join(" ");
716
722
  const button = {
717
723
  slots: {
718
724
  base: [
@@ -730,7 +736,8 @@ const button = {
730
736
  leadingIcon: "shrink-0",
731
737
  leadingAvatar: "shrink-0",
732
738
  leadingAvatarSize: "",
733
- trailingIcon: "shrink-0"
739
+ trailingIcon: "shrink-0",
740
+ safeList: safeList$1
734
741
  },
735
742
  variants: {
736
743
  ...buttonGroupVariant,
@@ -1599,6 +1606,78 @@ const countdown = {
1599
1606
  }
1600
1607
  };
1601
1608
 
1609
+ const descriptionList = {
1610
+ slots: {
1611
+ root: "w-full shrink-0",
1612
+ legend: "font-semibold text-black dark:text-base-150",
1613
+ text: "text-base-500 dark:text-base-400",
1614
+ container: "grid grid-cols-1 sm:grid-cols-[min(50%,theme(spacing.80))_auto]",
1615
+ labelWrapper: [
1616
+ "col-start-1 border-t first:border-none sm:border-t",
1617
+ "flex flex-nowrap flex-row items-center justify-start gap-1.5",
1618
+ "border-base-950/5 text-base-500 sm:border-base-950/5",
1619
+ "dark:border-white/5 dark:text-base-400 sm:dark:border-white/5"
1620
+ ].join(" "),
1621
+ icon: "shrink-0 size-6 text-base-500 dark:text-base-400",
1622
+ avatar: "shrink-0",
1623
+ avatarSize: "",
1624
+ label: "",
1625
+ descriptionWrapper: [
1626
+ "sm:border-t sm:[&:nth-child(2)]:border-none",
1627
+ "text-base-900 sm:border-base-950/5",
1628
+ "dark:text-base-150 dark:sm:border-white/5"
1629
+ ].join(" "),
1630
+ description: "",
1631
+ actions: "flex flex-wrap gap-1.5 shrink-0",
1632
+ footer: "border-t border-base-950/5 dark:border-white/5"
1633
+ },
1634
+ variants: {
1635
+ size: {
1636
+ sm: {
1637
+ legend: "text-md",
1638
+ text: "mt-1 max-w-2/3 text-sm",
1639
+ container: "mt-2.5 text-md",
1640
+ labelWrapper: "pt-3 sm:py-3",
1641
+ avatarSize: "xs",
1642
+ label: "",
1643
+ descriptionWrapper: "pb-3 pt-1 sm:py-3",
1644
+ description: "",
1645
+ footer: "mt-2 p-2"
1646
+ },
1647
+ md: {
1648
+ legend: "text-xl",
1649
+ text: "mt-2 max-w-2/3 text-lg leading-5",
1650
+ container: "mt-3 text-lg",
1651
+ labelWrapper: "pt-3 sm:py-3",
1652
+ avatarSize: "xs",
1653
+ label: "",
1654
+ descriptionWrapper: "pb-3 pt-1 sm:py-3",
1655
+ description: "",
1656
+ footer: "mt-4 p-4"
1657
+ }
1658
+ },
1659
+ orientation: {
1660
+ horizontal: {
1661
+ descriptionWrapper: "w-full flex flex-row items-center justify-between gap-4",
1662
+ actions: "items-center"
1663
+ },
1664
+ vertical: {
1665
+ descriptionWrapper: "",
1666
+ actions: "items-start mt-2.5"
1667
+ }
1668
+ },
1669
+ title: {
1670
+ true: {
1671
+ description: "mt-1"
1672
+ }
1673
+ }
1674
+ },
1675
+ compoundVariants: [],
1676
+ defaultVariants: {
1677
+ size: "md"
1678
+ }
1679
+ };
1680
+
1602
1681
  const dropdownMenu = {
1603
1682
  slots: {
1604
1683
  content: [
@@ -3246,7 +3325,7 @@ const link = (options) => ({
3246
3325
 
3247
3326
  const modal = {
3248
3327
  slots: {
3249
- overlay: "fixed inset-0 bg-base-950/20 dark:bg-base-950/30",
3328
+ overlay: "fixed inset-0 bg-base-950/20 dark:bg-base-950/30 backdrop-blur-sm",
3250
3329
  content: [
3251
3330
  "py-md2 px-5",
3252
3331
  "fixed bg-white dark:bg-base-950",
@@ -4087,9 +4166,12 @@ const skeleton = {
4087
4166
  base: "animate-pulse rounded-md bg-gray-200 dark:bg-gray-800"
4088
4167
  };
4089
4168
 
4169
+ const safeList = [
4170
+ "group-hover:rounded-full group-hover:border-1 group-hover:border-current"
4171
+ ].join(" ");
4090
4172
  const slideover = {
4091
4173
  slots: {
4092
- overlay: "fixed inset-0 bg-base-950/20 dark:bg-base-950/30",
4174
+ overlay: "fixed inset-0 bg-base-950/20 dark:bg-base-950/30 backdrop-blur-xs",
4093
4175
  content: [
4094
4176
  "fixed",
4095
4177
  "bg-base-50 dark:bg-base-950",
@@ -4109,7 +4191,8 @@ const slideover = {
4109
4191
  footer: "bg-white dark:bg-base-950 flex items-center justify-center gap-3 py-4 border-t border-t-1 border-t-base-900/10 dark:border-t-white/20 shadow-top-md p-2 pr-(--scrollbar-width)",
4110
4192
  title: "font-b24-system font-light text-4.5xl leading-none text-base-900 dark:text-base-150",
4111
4193
  description: "mt-2 mb-1 text-base-500 dark:text-base-400 text-sm",
4112
- close: "absolute"
4194
+ close: "absolute",
4195
+ safeList
4113
4196
  },
4114
4197
  variants: {
4115
4198
  side: {
@@ -5168,6 +5251,7 @@ const theme = {
5168
5251
  chip: chip,
5169
5252
  container: container,
5170
5253
  countdown: countdown,
5254
+ descriptionList: descriptionList,
5171
5255
  dropdownMenu: dropdownMenu,
5172
5256
  form: form,
5173
5257
  formField: formField,
@@ -5193,6 +5277,121 @@ const theme = {
5193
5277
  tooltip: tooltip
5194
5278
  };
5195
5279
 
5280
+ const proseH1 = {
5281
+ slots: {
5282
+ base: [
5283
+ "mb-2",
5284
+ "text-5xl leading-3xs font-light",
5285
+ "text-base-master dark:text-base-150",
5286
+ "scroll-mt-[calc(45px+var(--b24ui-header-height))] lg:scroll-mt-(--b24ui-header-height)"
5287
+ ].join(" "),
5288
+ link: "inline-flex items-center gap-2"
5289
+ }
5290
+ };
5291
+
5292
+ const proseH2 = {
5293
+ slots: {
5294
+ base: [
5295
+ "relative mb-2",
5296
+ "text-4xl leading-2xs font-light",
5297
+ "[&>a>code]:text-xl/7 [&>a>code]:font-bold",
5298
+ "text-base-master dark:text-base-150",
5299
+ "scroll-mt-[calc(48px+45px+var(--b24ui-header-height))] lg:scroll-mt-[calc(48px+var(--b24ui-header-height))]",
5300
+ "[&>a]:focus-visible:outline-info-text hover:[&>a>code]:border-info-text",
5301
+ "hover:[&>a>code]:text-info-text",
5302
+ "[&>a>code]:border-dashed [&>a>code]:transition-colors"
5303
+ ].join(" "),
5304
+ leading: [
5305
+ "absolute -ms-8 top-1 p-1",
5306
+ "rounded-md hidden lg:flex",
5307
+ "opacity-0 group-hover:opacity-100 group-focus:opacity-100",
5308
+ "bg-base-100 dark:bg-base-900",
5309
+ "text-base-500 dark:text-base-600",
5310
+ "hover:text-outline-info-text",
5311
+ "transition"
5312
+ ],
5313
+ leadingIcon: "size-4 shrink-0",
5314
+ link: "group lg:ps-2 lg:-ms-2"
5315
+ }
5316
+ };
5317
+
5318
+ const proseH3 = {
5319
+ slots: {
5320
+ base: [
5321
+ "relative mb-2",
5322
+ "text-3xl leading-2xs font-light",
5323
+ "[&>a>code]:text-lg/7 [&>a>code]:font-bold",
5324
+ "text-base-master dark:text-base-150",
5325
+ "scroll-mt-[calc(32px+45px+var(--b24ui-header-height))] lg:scroll-mt-[calc(32px+var(--b24ui-header-height))]",
5326
+ "[&>a]:focus-visible:outline-info-text hover:[&>a>code]:border-info-text",
5327
+ "hover:[&>a>code]:text-info-text",
5328
+ "[&>a>code]:border-dashed [&>a>code]:transition-colors"
5329
+ ].join(" "),
5330
+ leading: [
5331
+ "absolute -ms-8 top-0.5 p-1",
5332
+ "rounded-md hidden lg:flex",
5333
+ "opacity-0 group-hover:opacity-100 group-focus:opacity-100",
5334
+ "bg-base-100 dark:bg-base-900",
5335
+ "text-base-500 dark:text-base-600",
5336
+ "hover:text-outline-info-text",
5337
+ "transition"
5338
+ ],
5339
+ leadingIcon: "size-4 shrink-0",
5340
+ link: "group lg:ps-2 lg:-ms-2"
5341
+ }
5342
+ };
5343
+
5344
+ const proseLi = {
5345
+ slots: {
5346
+ base: [
5347
+ "my-1.5 ps-1.5",
5348
+ "leading-relaxed",
5349
+ "[&>ul]:my-0 [&>ol]:my-0"
5350
+ ].join(" ")
5351
+ }
5352
+ };
5353
+
5354
+ const proseOl = {
5355
+ slots: {
5356
+ base: [
5357
+ "list-decimal",
5358
+ "ps-6 mb-2",
5359
+ "marker:text-base-300 dark:marker:text-base-800"
5360
+ ].join(" ")
5361
+ }
5362
+ };
5363
+
5364
+ const proseP = {
5365
+ slots: {
5366
+ base: [
5367
+ "mb-2",
5368
+ "leading-relaxed",
5369
+ "text-pretty"
5370
+ ].join(" ")
5371
+ }
5372
+ };
5373
+
5374
+ const proseUl = {
5375
+ slots: {
5376
+ base: [
5377
+ "list-disc",
5378
+ "ps-6 mb-2",
5379
+ "marker:text-base-300 dark:marker:text-base-800"
5380
+ ].join(" ")
5381
+ }
5382
+ };
5383
+
5384
+ const themeProse = {
5385
+ __proto__: null,
5386
+ proseH1: proseH1,
5387
+ proseH2: proseH2,
5388
+ proseH3: proseH3,
5389
+ proseLi: proseLi,
5390
+ proseOl: proseOl,
5391
+ proseP: proseP,
5392
+ proseUl: proseUl
5393
+ };
5394
+
5196
5395
  const variantTable = "[&>table]";
5197
5396
  const variantHeadTr = "[&>table>thead>tr]";
5198
5397
  const variantBodyTr = "[&>table>tbody>tr]";
@@ -5278,86 +5477,9 @@ const tableWrapper = {
5278
5477
  }
5279
5478
  };
5280
5479
 
5281
- const themeProse = {
5282
- __proto__: null,
5283
- tableWrapper: tableWrapper
5284
- };
5285
-
5286
- const descriptionList = {
5287
- slots: {
5288
- root: "w-full shrink-0",
5289
- legend: "font-semibold text-black dark:text-base-150",
5290
- text: "text-base-500 dark:text-base-400",
5291
- container: "grid grid-cols-1 sm:grid-cols-[min(50%,theme(spacing.80))_auto]",
5292
- labelWrapper: [
5293
- "col-start-1 border-t first:border-none sm:border-t",
5294
- "flex flex-nowrap flex-row items-center justify-start gap-1.5",
5295
- "border-base-950/5 text-base-500 sm:border-base-950/5",
5296
- "dark:border-white/5 dark:text-base-400 sm:dark:border-white/5"
5297
- ].join(" "),
5298
- icon: "shrink-0 size-6 text-base-500 dark:text-base-400",
5299
- avatar: "shrink-0",
5300
- avatarSize: "",
5301
- label: "",
5302
- descriptionWrapper: [
5303
- "sm:border-t sm:[&:nth-child(2)]:border-none",
5304
- "text-base-900 sm:border-base-950/5",
5305
- "dark:text-base-150 dark:sm:border-white/5"
5306
- ].join(" "),
5307
- description: "",
5308
- actions: "flex flex-wrap gap-1.5 shrink-0",
5309
- footer: "border-t border-base-950/5 dark:border-white/5"
5310
- },
5311
- variants: {
5312
- size: {
5313
- sm: {
5314
- legend: "text-md",
5315
- text: "mt-1 max-w-2/3 text-sm",
5316
- container: "mt-2.5 text-md",
5317
- labelWrapper: "pt-3 sm:py-3",
5318
- avatarSize: "xs",
5319
- label: "",
5320
- descriptionWrapper: "pb-3 pt-1 sm:py-3",
5321
- description: "",
5322
- footer: "mt-2 p-2"
5323
- },
5324
- md: {
5325
- legend: "text-xl",
5326
- text: "mt-2 max-w-2/3 text-lg leading-5",
5327
- container: "mt-3 text-lg",
5328
- labelWrapper: "pt-3 sm:py-3",
5329
- avatarSize: "xs",
5330
- label: "",
5331
- descriptionWrapper: "pb-3 pt-1 sm:py-3",
5332
- description: "",
5333
- footer: "mt-4 p-4"
5334
- }
5335
- },
5336
- orientation: {
5337
- horizontal: {
5338
- descriptionWrapper: "w-full flex flex-row items-center justify-between gap-4",
5339
- actions: "items-center"
5340
- },
5341
- vertical: {
5342
- descriptionWrapper: "",
5343
- actions: "items-start mt-2.5"
5344
- }
5345
- },
5346
- title: {
5347
- true: {
5348
- description: "mt-1"
5349
- }
5350
- }
5351
- },
5352
- compoundVariants: [],
5353
- defaultVariants: {
5354
- size: "md"
5355
- }
5356
- };
5357
-
5358
5480
  const themeContent = {
5359
5481
  __proto__: null,
5360
- descriptionList: descriptionList
5482
+ tableWrapper: tableWrapper
5361
5483
  };
5362
5484
 
5363
5485
  function replaceBrackets(value) {