@nubisco/ui 1.54.0 → 1.55.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.
@@ -1,4 +1,4 @@
1
- import { ESizeShort } from '../types/Size.d'
1
+ import { ESize } from '../types/Size.d'
2
2
 
3
3
  enum EButtonType {
4
4
  Button = 'button',
@@ -6,10 +6,22 @@ enum EButtonType {
6
6
  Reset = 'reset',
7
7
  }
8
8
 
9
+ /**
10
+ * The full size scale NbButton implements. Every token here is backed by a
11
+ * real `.nb-button--<size>` rule (height, inline padding, font size, icon
12
+ * size) plus a matching icon-only width, so all seven render correctly.
13
+ *
14
+ * Deliberately NOT `ESizeShort` (`sm | md | lg`): that is the narrower scale
15
+ * used by Modal, DataTable and Pagination, and typing the button with it
16
+ * rejected four sizes the component has always styled. The raw literals sit
17
+ * alongside the enum so templates can write `size="xs"` without importing it.
18
+ */
19
+ type TButtonSize = ESize | 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'
20
+
9
21
  interface IButtonProps {
10
22
  variant?: string
11
23
  outlined?: boolean
12
- size?: ESizeShort
24
+ size?: TButtonSize
13
25
  disabled?: boolean
14
26
  loading?: boolean
15
27
  /** Icon name passed directly to NbIcon. Rendered in the trailing padding area. Hidden while loading. */
@@ -32,3 +44,4 @@ interface IButtonProps {
32
44
  }
33
45
 
34
46
  export { EButtonType, IButtonProps }
47
+ export type { TButtonSize }
@@ -1,4 +1,3 @@
1
- import { ESizeShort } from '../types/Size.d';
2
1
  import { EButtonType, IButtonProps } from './Button.d';
3
2
  declare var __VLS_10: {};
4
3
  type __VLS_Slots = {} & {
@@ -10,7 +9,7 @@ declare const __VLS_base: import("vue").DefineComponent<IButtonProps, {}, {}, {}
10
9
  onClick?: ((event: MouseEvent) => any) | undefined;
11
10
  }>, {
12
11
  variant: string;
13
- size: ESizeShort;
12
+ size: import("./Button.d").TButtonSize;
14
13
  type: EButtonType;
15
14
  to: string | Record<string, unknown>;
16
15
  icon: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../src/components/Button.vue"],"names":[],"mappings":"AA4cA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAuMtD,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"Button.vue.d.ts","sourceRoot":"","sources":["../../src/components/Button.vue"],"names":[],"mappings":"AA6cA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAuMtD,QAAA,IAAI,QAAQ,IAAW,CAAE;AACzB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAKhD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}