@telia/teddy 0.0.24 → 0.0.26

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 (205) hide show
  1. package/dist/components/accordion/accordion-content.cjs +32 -0
  2. package/dist/components/accordion/accordion-header.cjs +33 -0
  3. package/dist/components/accordion/accordion-indicator.cjs +16 -0
  4. package/dist/components/accordion/accordion-item.cjs +32 -0
  5. package/dist/components/accordion/accordion-root.cjs +56 -0
  6. package/dist/components/accordion/accordion-root.js +11 -11
  7. package/dist/components/accordion/accordion-title.cjs +15 -0
  8. package/dist/components/accordion/accordion-trigger.cjs +37 -0
  9. package/dist/components/accordion/index.cjs +25 -0
  10. package/dist/components/accordion/index.js +7 -0
  11. package/dist/components/badge/badge.cjs +43 -0
  12. package/dist/components/badge/index.cjs +4 -0
  13. package/dist/components/box/box.cjs +17 -0
  14. package/dist/components/box/index.cjs +4 -0
  15. package/dist/components/button/button.cjs +130 -0
  16. package/dist/components/button/button.js +24 -24
  17. package/dist/components/button/index.cjs +4 -0
  18. package/dist/components/card/card.cjs +219 -0
  19. package/dist/components/card/index.cjs +4 -0
  20. package/dist/components/chip/chip-indicator.cjs +16 -0
  21. package/dist/components/chip/chip-item.cjs +45 -0
  22. package/dist/components/chip/chip.cjs +48 -0
  23. package/dist/components/chip/index.cjs +10 -0
  24. package/dist/components/drawer/drawer-close.cjs +39 -0
  25. package/dist/components/drawer/drawer-close.d.ts +0 -3
  26. package/dist/components/drawer/drawer-close.js +1 -1
  27. package/dist/components/drawer/drawer-content.cjs +42 -0
  28. package/dist/components/drawer/drawer-content.d.ts +0 -3
  29. package/dist/components/drawer/drawer-content.js +1 -1
  30. package/dist/components/drawer/drawer-description.cjs +36 -0
  31. package/dist/components/drawer/drawer-description.d.ts +0 -3
  32. package/dist/components/drawer/drawer-description.js +1 -1
  33. package/dist/components/drawer/drawer-footer.cjs +16 -0
  34. package/dist/components/drawer/drawer-footer.d.ts +0 -3
  35. package/dist/components/drawer/drawer-footer.js +1 -1
  36. package/dist/components/drawer/drawer-overlay.cjs +43 -0
  37. package/dist/components/drawer/drawer-overlay.d.ts +0 -3
  38. package/dist/components/drawer/drawer-overlay.js +1 -1
  39. package/dist/components/drawer/drawer-root.cjs +28 -0
  40. package/dist/components/drawer/drawer-root.d.ts +1 -1
  41. package/dist/components/drawer/drawer-title.cjs +34 -0
  42. package/dist/components/drawer/drawer-title.d.ts +4 -3
  43. package/dist/components/drawer/drawer-title.js +1 -1
  44. package/dist/components/drawer/drawer-trigger.cjs +27 -0
  45. package/dist/components/drawer/drawer-trigger.d.ts +5 -3
  46. package/dist/components/drawer/index.cjs +28 -0
  47. package/dist/components/drawer/index.d.ts +28 -0
  48. package/dist/components/drawer/index.js +8 -0
  49. package/dist/components/field-error-text/field-error-text.cjs +30 -0
  50. package/dist/components/field-error-text/index.cjs +4 -0
  51. package/dist/components/flex/flex.cjs +19 -0
  52. package/dist/components/flex/index.cjs +4 -0
  53. package/dist/components/grid/grid.cjs +19 -0
  54. package/dist/components/grid/index.cjs +4 -0
  55. package/dist/components/heading/heading.cjs +55 -0
  56. package/dist/components/heading/index.cjs +4 -0
  57. package/dist/components/helper-text/helper-text.cjs +21 -0
  58. package/dist/components/helper-text/helper-text.d.ts +2 -4
  59. package/dist/components/helper-text/index.cjs +4 -0
  60. package/dist/components/icon/AllIcons.cjs +1091 -0
  61. package/dist/components/icon/AllIcons.d.ts +2 -0
  62. package/dist/components/icon/AllIcons.js +1092 -0
  63. package/dist/components/icon/icon.cjs +29 -0
  64. package/dist/components/icon/index.cjs +8 -0
  65. package/dist/components/icon/index.d.ts +1 -0
  66. package/dist/components/icon/index.js +2 -0
  67. package/dist/components/image/image.cjs +17 -0
  68. package/dist/components/image/index.cjs +4 -0
  69. package/dist/components/index.cjs +66 -0
  70. package/dist/components/index.js +6 -3
  71. package/dist/components/input/index.cjs +14 -0
  72. package/dist/components/input/index.d.ts +27 -2
  73. package/dist/components/input/index.js +10 -1
  74. package/dist/components/input/input-clear-button.cjs +43 -0
  75. package/dist/components/input/input-clear-button.d.ts +6 -0
  76. package/dist/components/input/input-clear-button.js +43 -0
  77. package/dist/components/input/input-group.cjs +132 -0
  78. package/dist/components/input/input-group.d.ts +16 -0
  79. package/dist/components/input/input-group.js +132 -0
  80. package/dist/components/input/input-indicator.cjs +10 -0
  81. package/dist/components/input/input-indicator.d.ts +23 -0
  82. package/dist/components/input/input-indicator.js +10 -0
  83. package/dist/components/input/input.cjs +9 -0
  84. package/dist/components/input/input.d.ts +4 -28
  85. package/dist/components/input/input.js +7 -114
  86. package/dist/components/label/index.cjs +4 -0
  87. package/dist/components/label/label.cjs +44 -0
  88. package/dist/components/link/index.cjs +4 -0
  89. package/dist/components/link/link.cjs +37 -0
  90. package/dist/components/link/link.js +10 -10
  91. package/dist/components/modal/index.cjs +4 -0
  92. package/dist/components/modal/modal.cjs +210 -0
  93. package/dist/components/modal/modal.js +17 -16
  94. package/dist/components/navigation-menu/index.cjs +4 -0
  95. package/dist/components/navigation-menu/navigation-menu.cjs +412 -0
  96. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -0
  97. package/dist/components/navigation-menu/navigation-menu.js +24 -22
  98. package/dist/components/notification/index.cjs +4 -0
  99. package/dist/components/notification/notification.cjs +116 -0
  100. package/dist/components/notification/notification.js +8 -8
  101. package/dist/components/radio-group/index.cjs +4 -0
  102. package/dist/components/radio-group/radio-group.cjs +110 -0
  103. package/dist/components/scroll-area/index.cjs +9 -0
  104. package/dist/components/scroll-area/scroll-area-bar.cjs +175 -0
  105. package/dist/components/scroll-area/scroll-area-bar.js +8 -8
  106. package/dist/components/scroll-area/scroll-area-button.cjs +11 -0
  107. package/dist/components/scroll-area/scroll-area-corner.cjs +8 -0
  108. package/dist/components/scroll-area/scroll-area-item.cjs +42 -0
  109. package/dist/components/scroll-area/scroll-area-item.js +2 -1
  110. package/dist/components/scroll-area/scroll-area-root.cjs +11 -0
  111. package/dist/components/scroll-area/scroll-area-thumb.cjs +8 -0
  112. package/dist/components/spinner/index.cjs +4 -0
  113. package/dist/components/spinner/spinner.cjs +57 -0
  114. package/dist/components/tabs/index.cjs +16 -0
  115. package/dist/components/tabs/tabs-content.cjs +32 -0
  116. package/dist/components/tabs/tabs-list.cjs +39 -0
  117. package/dist/components/tabs/tabs-list.js +6 -4
  118. package/dist/components/tabs/tabs-root.cjs +75 -0
  119. package/dist/components/tabs/tabs-root.d.ts +4 -7
  120. package/dist/components/tabs/tabs-root.js +25 -8
  121. package/dist/components/tabs/tabs-scroll-button.cjs +15 -0
  122. package/dist/components/tabs/tabs-scroll.cjs +22 -0
  123. package/dist/components/tabs/tabs-trigger.cjs +55 -0
  124. package/dist/components/tabs/tabs-trigger.js +19 -9
  125. package/dist/components/text/index.cjs +4 -0
  126. package/dist/components/text/text.cjs +49 -0
  127. package/dist/components/text-field/index.cjs +31 -0
  128. package/dist/components/text-field/index.d.ts +63 -2
  129. package/dist/components/text-field/index.js +28 -1
  130. package/dist/components/text-field/text-field-button.cjs +31 -0
  131. package/dist/components/text-field/text-field-button.d.ts +27 -0
  132. package/dist/components/text-field/text-field-button.js +31 -0
  133. package/dist/components/text-field/text-field-clear-button.cjs +12 -0
  134. package/dist/components/text-field/text-field-clear-button.d.ts +6 -0
  135. package/dist/components/text-field/text-field-clear-button.js +12 -0
  136. package/dist/components/text-field/text-field-error-list.cjs +28 -0
  137. package/dist/components/text-field/text-field-error-list.d.ts +9 -0
  138. package/dist/components/text-field/text-field-error-list.js +28 -0
  139. package/dist/components/text-field/text-field-helper-text.cjs +19 -0
  140. package/dist/components/text-field/text-field-helper-text.d.ts +5 -0
  141. package/dist/components/text-field/text-field-helper-text.js +19 -0
  142. package/dist/components/text-field/text-field-indicator.cjs +14 -0
  143. package/dist/components/text-field/text-field-indicator.d.ts +6 -0
  144. package/dist/components/text-field/text-field-indicator.js +14 -0
  145. package/dist/components/text-field/text-field-input-group.cjs +11 -0
  146. package/dist/components/text-field/text-field-input-group.d.ts +7 -0
  147. package/dist/components/text-field/text-field-input-group.js +11 -0
  148. package/dist/components/text-field/text-field-input.cjs +27 -0
  149. package/dist/components/text-field/text-field-input.d.ts +5 -0
  150. package/dist/components/text-field/text-field-input.js +27 -0
  151. package/dist/components/text-field/text-field-label.cjs +27 -0
  152. package/dist/components/text-field/text-field-label.d.ts +8 -0
  153. package/dist/components/text-field/text-field-label.js +27 -0
  154. package/dist/components/text-field/text-field.cjs +54 -0
  155. package/dist/components/text-field/text-field.d.ts +12 -58
  156. package/dist/components/text-field/text-field.js +17 -101
  157. package/dist/components/text-field/util.cjs +4 -0
  158. package/dist/components/text-field/util.d.ts +1 -0
  159. package/dist/components/text-field/util.js +4 -0
  160. package/dist/components/text-spacing/index.cjs +4 -0
  161. package/dist/components/text-spacing/text-spacing.cjs +19 -0
  162. package/dist/components/toggle/index.cjs +4 -0
  163. package/dist/components/toggle/toggle.cjs +104 -0
  164. package/dist/components/visually-hidden/index.cjs +4 -0
  165. package/dist/components/visually-hidden/visually-hidden.cjs +26 -0
  166. package/dist/drawer.module-BxsrDZFu.js +14 -0
  167. package/dist/drawer.module-CWDhohQm.cjs +13 -0
  168. package/dist/icons/category.cjs +335 -0
  169. package/dist/icons/name.cjs +335 -0
  170. package/dist/icons/name.d.cjs +1 -0
  171. package/dist/main.cjs +374 -0
  172. package/dist/main.js +6 -3
  173. package/dist/style.css +573 -492
  174. package/dist/tokens/border/variables.cjs +20 -0
  175. package/dist/tokens/breakpoint/variables.cjs +10 -0
  176. package/dist/tokens/color/variables.cjs +454 -0
  177. package/dist/tokens/index.cjs +310 -0
  178. package/dist/tokens/motion/variables.cjs +24 -0
  179. package/dist/tokens/shadow/variables.cjs +10 -0
  180. package/dist/tokens/spacing/variables.cjs +48 -0
  181. package/dist/tokens/typography/variables.cjs +50 -0
  182. package/dist/utils/action.cjs +21 -0
  183. package/dist/utils/component-props-as.cjs +1 -0
  184. package/dist/utils/composeEventHandlers.cjs +11 -0
  185. package/dist/utils/composeRefs.cjs +18 -0
  186. package/dist/utils/generate-styling/align.cjs +32 -0
  187. package/dist/utils/generate-styling/color.cjs +12 -0
  188. package/dist/utils/generate-styling/flex.cjs +67 -0
  189. package/dist/utils/generate-styling/gap.cjs +22 -0
  190. package/dist/utils/generate-styling/grid.cjs +123 -0
  191. package/dist/utils/generate-styling/height.cjs +51 -0
  192. package/dist/utils/generate-styling/index.cjs +97 -0
  193. package/dist/utils/generate-styling/inset.cjs +33 -0
  194. package/dist/utils/generate-styling/justify.cjs +18 -0
  195. package/dist/utils/generate-styling/margin.cjs +33 -0
  196. package/dist/utils/generate-styling/object-fit.cjs +18 -0
  197. package/dist/utils/generate-styling/padding.cjs +33 -0
  198. package/dist/utils/generate-styling/position.cjs +21 -0
  199. package/dist/utils/generate-styling/util.cjs +33 -0
  200. package/dist/utils/generate-styling/width.cjs +26 -0
  201. package/dist/vite-env.d.cjs +1 -0
  202. package/package.json +6 -4
  203. package/dist/components/text-field/tex-field-label.d.ts +0 -0
  204. package/dist/components/text-field/tex-field-label.js +0 -1
  205. package/dist/drawer.module-B3QhrxH1.js +0 -14
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_generateStyling_util = require("./util.cjs");
4
+ const gridTemplateRowsValues = [...utils_generateStyling_util.numberIterator, { key: "none", value: "none" }];
5
+ const gridTemplateColumnsValues = [
6
+ ...utils_generateStyling_util.numberIterator.map((v) => ({ key: v.key, value: `repeat(${v.value}, minmax(0, 1fr))` })),
7
+ { key: "none", value: "none" }
8
+ ];
9
+ const gridColumnValues = [
10
+ ...utils_generateStyling_util.numberIterator,
11
+ {
12
+ key: "span-2",
13
+ value: "span 2"
14
+ },
15
+ {
16
+ key: "span-3",
17
+ value: "span 3"
18
+ },
19
+ {
20
+ key: "span-4",
21
+ value: "span 4"
22
+ },
23
+ {
24
+ key: "span-5",
25
+ value: "span 5"
26
+ },
27
+ {
28
+ key: "span-6",
29
+ value: "span 6"
30
+ },
31
+ {
32
+ key: "span-7",
33
+ value: "span 7"
34
+ },
35
+ {
36
+ key: "span-8",
37
+ value: "span 8"
38
+ },
39
+ {
40
+ key: "span-9",
41
+ value: "span 9"
42
+ },
43
+ {
44
+ key: "span-10",
45
+ value: "span 10"
46
+ },
47
+ {
48
+ key: "span-11",
49
+ value: "span 11"
50
+ },
51
+ {
52
+ key: "span-12",
53
+ value: "span 12"
54
+ }
55
+ ];
56
+ const gridRowValues = gridColumnValues;
57
+ const displayGridValues = [
58
+ { key: "none", value: "none" },
59
+ { key: "grid", value: "grid" },
60
+ { key: "inline-grid", value: "inline-grid" }
61
+ ];
62
+ const gridFlowValues = [
63
+ { key: "row", value: "row" },
64
+ { key: "column", value: "column" },
65
+ { key: "dense", value: "dense" },
66
+ { key: "row-dense", value: "row-dense" },
67
+ { key: "column-dense", value: "column-dense" }
68
+ ];
69
+ const gridLayout = [
70
+ { key: "display", className: "teddy-display", values: displayGridValues },
71
+ {
72
+ key: "rows",
73
+ className: "teddy-gtr",
74
+ values: gridTemplateRowsValues
75
+ },
76
+ {
77
+ key: "columns",
78
+ className: "teddy-gtc",
79
+ values: gridTemplateColumnsValues
80
+ },
81
+ {
82
+ key: "flow",
83
+ className: "teddy-gaf",
84
+ values: gridFlowValues
85
+ }
86
+ ];
87
+ const gridChildren = [
88
+ {
89
+ key: "gridColumnStart",
90
+ className: "teddy-gcs",
91
+ values: utils_generateStyling_util.numberIterator
92
+ },
93
+ {
94
+ key: "gridColumnEnd",
95
+ className: "teddy-gce",
96
+ values: utils_generateStyling_util.numberIterator
97
+ },
98
+ {
99
+ key: "gridRowStart",
100
+ className: "teddy-grs",
101
+ values: utils_generateStyling_util.numberIterator
102
+ },
103
+ {
104
+ key: "gridRowEnd",
105
+ className: "teddy-gre",
106
+ values: utils_generateStyling_util.numberIterator
107
+ },
108
+ {
109
+ key: "gridColumn",
110
+ className: "teddy-gc",
111
+ values: gridColumnValues
112
+ },
113
+ {
114
+ key: "gridRow",
115
+ className: "teddy-gr",
116
+ values: gridRowValues
117
+ }
118
+ ];
119
+ exports.displayGridValues = displayGridValues;
120
+ exports.gridChildren = gridChildren;
121
+ exports.gridLayout = gridLayout;
122
+ exports.gridTemplateColumnsValues = gridTemplateColumnsValues;
123
+ exports.gridTemplateRowsValues = gridTemplateRowsValues;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const tokens_breakpoint_variables = require("../../tokens/breakpoint/variables.cjs");
4
+ const heightValues = [
5
+ {
6
+ key: "bp-sm",
7
+ value: tokens_breakpoint_variables.teddyBreakpointSm
8
+ },
9
+ {
10
+ key: "bp-md",
11
+ value: tokens_breakpoint_variables.teddyBreakpointMd
12
+ },
13
+ {
14
+ key: "bp-lg",
15
+ value: tokens_breakpoint_variables.teddyBreakpointLg
16
+ },
17
+ {
18
+ key: "bp-xl",
19
+ value: tokens_breakpoint_variables.teddyBreakpointXl
20
+ },
21
+ {
22
+ key: "auto",
23
+ value: "auto"
24
+ },
25
+ {
26
+ key: "100%",
27
+ value: "100%"
28
+ },
29
+ {
30
+ key: "50%",
31
+ value: "50%"
32
+ }
33
+ ];
34
+ const heights = [
35
+ {
36
+ key: "height",
37
+ className: "teddy-h",
38
+ values: heightValues
39
+ },
40
+ {
41
+ key: "minHeight",
42
+ className: "teddy-min-h",
43
+ values: heightValues
44
+ },
45
+ {
46
+ key: "maxHeight",
47
+ className: "teddy-max-h",
48
+ values: heightValues
49
+ }
50
+ ];
51
+ exports.heights = heights;
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_generateStyling_margin = require("./margin.cjs");
4
+ const utils_generateStyling_flex = require("./flex.cjs");
5
+ const utils_generateStyling_width = require("./width.cjs");
6
+ const utils_generateStyling_height = require("./height.cjs");
7
+ const clsx = require("clsx");
8
+ const utils_generateStyling_align = require("./align.cjs");
9
+ const utils_generateStyling_gap = require("./gap.cjs");
10
+ const utils_generateStyling_grid = require("./grid.cjs");
11
+ const utils_generateStyling_justify = require("./justify.cjs");
12
+ const utils_generateStyling_padding = require("./padding.cjs");
13
+ const utils_generateStyling_position = require("./position.cjs");
14
+ const utils_generateStyling_inset = require("./inset.cjs");
15
+ const utils_generateStyling_color = require("./color.cjs");
16
+ const utils_generateStyling_objectFit = require("./object-fit.cjs");
17
+ const breakpoint = {
18
+ sm: "0px",
19
+ md: "600px",
20
+ lg: "1024px",
21
+ xl: "1440px"
22
+ };
23
+ const breakpoints = ["initial", ...Object.keys(breakpoint)];
24
+ const displayValues = [...utils_generateStyling_flex.displayFlexValues, ...utils_generateStyling_grid.displayGridValues];
25
+ const displayLayout = [
26
+ {
27
+ key: "display",
28
+ className: "teddy-display",
29
+ values: displayValues
30
+ }
31
+ ];
32
+ const stylings = [
33
+ ...utils_generateStyling_position.position,
34
+ ...utils_generateStyling_objectFit.objectFit,
35
+ ...utils_generateStyling_inset.inset,
36
+ ...utils_generateStyling_margin.margins,
37
+ ...utils_generateStyling_padding.paddings,
38
+ ...utils_generateStyling_width.widths,
39
+ ...utils_generateStyling_height.heights,
40
+ ...utils_generateStyling_gap.gap,
41
+ ...utils_generateStyling_color.color,
42
+ ...utils_generateStyling_align.align,
43
+ ...utils_generateStyling_justify.justify,
44
+ ...displayLayout,
45
+ ...utils_generateStyling_flex.flexChildren,
46
+ ...utils_generateStyling_flex.flexLayout,
47
+ ...utils_generateStyling_grid.gridLayout,
48
+ ...utils_generateStyling_grid.gridChildren
49
+ ];
50
+ function isResponsiveObject(obj) {
51
+ return typeof obj === "object" && Object.keys(obj).some((key) => breakpoints.includes(key));
52
+ }
53
+ function mergeStyles(...styles) {
54
+ let result = {};
55
+ for (const style of styles) {
56
+ if (style) {
57
+ result = { ...result, ...style };
58
+ }
59
+ }
60
+ return Object.keys(result).length ? result : void 0;
61
+ }
62
+ function extractProps(props) {
63
+ var _a;
64
+ const extractedProps = { ...props };
65
+ let style = extractedProps.style;
66
+ let className = extractedProps.className;
67
+ for (const key in stylings) {
68
+ const currentLayout = stylings[key];
69
+ const currentLayoutKey = currentLayout.key;
70
+ const layoutProp = extractedProps[currentLayoutKey];
71
+ if (layoutProp) {
72
+ if (isResponsiveObject(layoutProp)) {
73
+ Object.entries(layoutProp).forEach(([bp, value]) => {
74
+ var _a2;
75
+ const cssValue = ((_a2 = currentLayout.values.find((v) => v.key === value)) == null ? void 0 : _a2.value) ?? value;
76
+ style = mergeStyles(style, { [`--${currentLayout.className}-${bp}`]: cssValue });
77
+ const bpClassName = `${bp}:${currentLayout.className}`;
78
+ className = clsx(className, bpClassName);
79
+ delete extractedProps[currentLayoutKey];
80
+ });
81
+ }
82
+ if (typeof layoutProp === "string") {
83
+ const cssValue = ((_a = currentLayout.values.find((v) => v.key === layoutProp)) == null ? void 0 : _a.value) ?? layoutProp;
84
+ style = mergeStyles(style, { [`--${currentLayout.className}`]: cssValue });
85
+ const bpClassName = `${currentLayout.className}`;
86
+ className = clsx(className, bpClassName);
87
+ delete extractedProps[currentLayoutKey];
88
+ }
89
+ }
90
+ }
91
+ return { ...extractedProps, className, style };
92
+ }
93
+ exports.displayLayout = displayLayout;
94
+ exports.displayValues = displayValues;
95
+ exports.extractProps = extractProps;
96
+ exports.mergeStyles = mergeStyles;
97
+ exports.stylings = stylings;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_generateStyling_util = require("./util.cjs");
4
+ const insetValues = [...utils_generateStyling_util.spacingValues, { key: "auto", value: "auto" }];
5
+ const inset = [
6
+ {
7
+ key: "inset",
8
+ className: "teddy-inset",
9
+ values: insetValues
10
+ },
11
+ {
12
+ key: "top",
13
+ className: "teddy-top",
14
+ values: insetValues
15
+ },
16
+ {
17
+ key: "bottom",
18
+ className: "teddy-bottom",
19
+ values: insetValues
20
+ },
21
+ {
22
+ key: "left",
23
+ className: "teddy-left",
24
+ values: insetValues
25
+ },
26
+ {
27
+ key: "right",
28
+ className: "teddy-right",
29
+ values: insetValues
30
+ }
31
+ ];
32
+ exports.inset = inset;
33
+ exports.insetValues = insetValues;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const justifyValues = [
4
+ { key: "start", value: "flex-start" },
5
+ { key: "center", value: "center" },
6
+ { key: "end", value: "flex-end" },
7
+ { key: "between", value: "space-between" },
8
+ { key: "stretch", value: "stretch" }
9
+ ];
10
+ const justify = [
11
+ {
12
+ key: "justify",
13
+ className: "teddy-jc",
14
+ values: justifyValues
15
+ }
16
+ ];
17
+ exports.justify = justify;
18
+ exports.justifyValues = justifyValues;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_generateStyling_util = require("./util.cjs");
4
+ const marginValues = [...utils_generateStyling_util.spacingValues, { key: "auto", value: "auto" }];
5
+ const margins = [
6
+ {
7
+ key: "m",
8
+ className: "teddy-m",
9
+ values: marginValues
10
+ },
11
+ {
12
+ key: "mt",
13
+ className: "teddy-mt",
14
+ values: marginValues
15
+ },
16
+ {
17
+ key: "mb",
18
+ className: "teddy-mb",
19
+ values: marginValues
20
+ },
21
+ {
22
+ key: "ml",
23
+ className: "teddy-ml",
24
+ values: marginValues
25
+ },
26
+ {
27
+ key: "mr",
28
+ className: "teddy-mr",
29
+ values: marginValues
30
+ }
31
+ ];
32
+ exports.marginValues = marginValues;
33
+ exports.margins = margins;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const objectFitValues = [
4
+ { key: "fill", value: "fill" },
5
+ { key: "contain", value: "contain" },
6
+ { key: "cover", value: "cover" },
7
+ { key: "none", value: "none" },
8
+ { key: "scale-down", value: "scale-down" }
9
+ ];
10
+ const objectFit = [
11
+ {
12
+ key: "objectFit",
13
+ className: "teddy-object-fit",
14
+ values: objectFitValues
15
+ }
16
+ ];
17
+ exports.objectFit = objectFit;
18
+ exports.objectFitValues = objectFitValues;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const utils_generateStyling_util = require("./util.cjs");
4
+ const paddingValues = [...utils_generateStyling_util.spacingValues, { key: "auto", value: "auto" }];
5
+ const paddings = [
6
+ {
7
+ key: "p",
8
+ className: "teddy-p",
9
+ values: paddingValues
10
+ },
11
+ {
12
+ key: "pt",
13
+ className: "teddy-pt",
14
+ values: paddingValues
15
+ },
16
+ {
17
+ key: "pb",
18
+ className: "teddy-pb",
19
+ values: paddingValues
20
+ },
21
+ {
22
+ key: "pl",
23
+ className: "teddy-pl",
24
+ values: paddingValues
25
+ },
26
+ {
27
+ key: "pr",
28
+ className: "teddy-pr",
29
+ values: paddingValues
30
+ }
31
+ ];
32
+ exports.paddingValues = paddingValues;
33
+ exports.paddings = paddings;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const positionValues = [
4
+ { key: "relative", value: "relative" },
5
+ { key: "absolute", value: "absolute" },
6
+ { key: "fixed", value: "fixed" },
7
+ { key: "sticky", value: "sticky" },
8
+ { key: "static", value: "static" },
9
+ { key: "inherit", value: "inherit" },
10
+ { key: "initial", value: "initial" },
11
+ { key: "unset", value: "unset" }
12
+ ];
13
+ const position = [
14
+ {
15
+ key: "position",
16
+ className: "teddy-position",
17
+ values: positionValues
18
+ }
19
+ ];
20
+ exports.position = position;
21
+ exports.positionValues = positionValues;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const spacingValues = [
4
+ { key: "0", value: "var(--teddy-spacing-0)" },
5
+ { key: "10", value: "var(--teddy-spacing-10)" },
6
+ { key: "25", value: "var(--teddy-spacing-25)" },
7
+ { key: "50", value: "var(--teddy-spacing-50)" },
8
+ { key: "100", value: "var(--teddy-spacing-100)" },
9
+ { key: "150", value: "var(--teddy-spacing-150)" },
10
+ { key: "200", value: "var(--teddy-spacing-200)" },
11
+ { key: "250", value: "var(--teddy-spacing-250)" },
12
+ { key: "300", value: "var(--teddy-spacing-300)" },
13
+ { key: "400", value: "var(--teddy-spacing-400)" },
14
+ { key: "600", value: "var(--teddy-spacing-600)" },
15
+ { key: "800", value: "var(--teddy-spacing-800)" },
16
+ { key: "1000", value: "var(--teddy-spacing-1000)" },
17
+ { key: "1200", value: "var(--teddy-spacing-1200)" },
18
+ { key: "1600", value: "var(--teddy-spacing-1600)" },
19
+ { key: "gutter-sm", value: "var(--teddy-spacing-gutter-sm)" },
20
+ { key: "gutter-md", value: "var(--teddy-spacing-gutter-md)" },
21
+ { key: "gutter-lg", value: "var(--teddy-spacing-gutter-lg)" },
22
+ { key: "gutter-xl", value: "var(--teddy-spacing-gutter-xl)" },
23
+ { key: "page-padding-sm", value: "var(--teddy-spacing-page-padding-sm)" },
24
+ { key: "page-padding-md", value: "var(--teddy-spacing-page-padding-md)" },
25
+ { key: "page-padding-lg", value: "var(--teddy-spacing-page-padding-lg)" },
26
+ { key: "page-padding-xl", value: "var(--teddy-spacing-page-padding-xl)" }
27
+ ];
28
+ const numberIterator = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"].map((v) => ({
29
+ key: v,
30
+ value: v
31
+ }));
32
+ exports.numberIterator = numberIterator;
33
+ exports.spacingValues = spacingValues;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const widthValues = [
4
+ { key: "auto", value: "auto" },
5
+ { key: "100%", value: "100%" },
6
+ { key: "50%", value: "50%" }
7
+ ];
8
+ const widths = [
9
+ {
10
+ key: "width",
11
+ className: "teddy-w",
12
+ values: widthValues
13
+ },
14
+ {
15
+ key: "minWidth",
16
+ className: "teddy-min-w",
17
+ values: widthValues
18
+ },
19
+ {
20
+ key: "maxWidth",
21
+ className: "teddy-max-w",
22
+ values: widthValues
23
+ }
24
+ ];
25
+ exports.widthValues = widthValues;
26
+ exports.widths = widths;
@@ -0,0 +1 @@
1
+ "use strict";
package/package.json CHANGED
@@ -1,24 +1,26 @@
1
1
  {
2
2
  "name": "@telia/teddy",
3
- "type": "module",
4
- "main": "dist/main.js",
5
- "types": "dist/main.d.ts",
3
+ "main": "./dist/main.cjs",
4
+ "module": "./dist/main.js",
5
+ "types": "./dist/main.d.ts",
6
6
  "files": [
7
7
  "dist"
8
8
  ],
9
9
  "exports": {
10
10
  ".": {
11
11
  "import": "./dist/main.js",
12
+ "require": "./dist/main.cjs",
12
13
  "types": "./dist/main.d.ts"
13
14
  },
14
15
  "./styles.css": "./dist/style.css"
15
16
  },
17
+ "type": "module",
16
18
  "devEngines": {
17
19
  "node": "18.x || 20.x || 21.x",
18
20
  "pnpm": ">=8"
19
21
  },
20
22
  "private": false,
21
- "version": "0.0.24",
23
+ "version": "0.0.26",
22
24
  "sideEffects": [
23
25
  "**/*.css"
24
26
  ],
File without changes
@@ -1,14 +0,0 @@
1
- const styles = {
2
- "teddy-drawer__overlay": "_teddy-drawer__overlay_1sy9d_17",
3
- "teddy-drawer__overlay--container": "_teddy-drawer__overlay--container_1sy9d_29",
4
- "teddy-drawer__content": "_teddy-drawer__content_1sy9d_35",
5
- "teddy-drawer__close--floating": "_teddy-drawer__close--floating_1sy9d_50",
6
- "drawer-overlay-no-op": "_drawer-overlay-no-op_1sy9d_1",
7
- "teddy-fade-in": "_teddy-fade-in_1sy9d_1",
8
- "teddy-fade-out": "_teddy-fade-out_1sy9d_1",
9
- "drawer-content-show": "_drawer-content-show_1sy9d_1",
10
- "drawer-content-hide": "_drawer-content-hide_1sy9d_1"
11
- };
12
- export {
13
- styles as s
14
- };