@gpichot/spectacle-deck 1.0.2 → 1.0.4

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/index.cjs CHANGED
@@ -1124,7 +1124,7 @@ var import_spectacle6 = require("spectacle");
1124
1124
  var import_styled_components10 = __toESM(require("styled-components"));
1125
1125
  var import_react_spring = require("react-spring");
1126
1126
  function ItemsColumn(divProps) {
1127
- const { style, children, ...props } = divProps;
1127
+ const { style: style2, children, ...props } = divProps;
1128
1128
  const childrenArray = import_react15.default.Children.toArray(children);
1129
1129
  return /* @__PURE__ */ import_react15.default.createElement(import_spectacle6.Stepper, { values: childrenArray }, (value, step) => /* @__PURE__ */ import_react15.default.createElement(
1130
1130
  "div",
@@ -1134,7 +1134,7 @@ function ItemsColumn(divProps) {
1134
1134
  flexDirection: "column",
1135
1135
  alignItems: "center",
1136
1136
  height: "100%",
1137
- ...style
1137
+ ...style2
1138
1138
  },
1139
1139
  ...props
1140
1140
  },
@@ -1288,27 +1288,100 @@ function HorizontalListItem({
1288
1288
  // src/components/Timeline.tsx
1289
1289
  var import_react17 = __toESM(require("react"));
1290
1290
  var import_react_spring3 = require("react-spring");
1291
- var import_classnames = __toESM(require("classnames"));
1292
1291
  var import_spectacle8 = require("spectacle");
1293
1292
 
1294
- // src/components/Timeline.module.scss
1295
- var Timeline_module_default = {};
1293
+ // src/components/Timeline.styled.tsx
1294
+ var import_styled_components12 = __toESM(require("styled-components"));
1295
+ var TimelineItemContent = import_styled_components12.default.div`
1296
+ display: flex;
1297
+ padding: 0.7rem 0 1rem 12px;
1298
+ `;
1299
+ var TimelineItemContentPhantom = (0, import_styled_components12.default)(TimelineItemContent)`
1300
+ opacity: 0;
1301
+ `;
1302
+ var TimelineItemBody = import_styled_components12.default.div`
1303
+ &,
1304
+ & > * {
1305
+ font-size: 1.3rem !important;
1306
+ color: #ffffff !important;
1307
+ }
1308
+ `;
1309
+ var TimelineItemTitle = import_styled_components12.default.div`
1310
+ font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1311
+ font-size: 1rem;
1312
+ font-weight: bold;
1313
+ color: #ffffffbb;
1314
+ `;
1296
1315
 
1297
1316
  // src/components/Timeline.tsx
1317
+ var import_styled_components13 = __toESM(require("styled-components"));
1318
+ var TimelineItemStyled = (0, import_styled_components13.default)(import_react_spring3.animated.div)`
1319
+ flex: 1;
1320
+ flex-flow: column nowrap;
1321
+ display: inline-flex;
1322
+
1323
+ &:nth-child(odd) {
1324
+ &,
1325
+ ${TimelineItemContent} {
1326
+ flex-direction: column;
1327
+ }
1328
+ }
1329
+ &:nth-child(even) {
1330
+ &,
1331
+ ${TimelineItemContent} {
1332
+ flex-direction: column-reverse;
1333
+ }
1334
+ }
1335
+ `;
1336
+ var TimelineItemGuide = (0, import_styled_components13.default)(import_react_spring3.animated.div)`
1337
+ width: 100%;
1338
+ padding-top: 2px;
1339
+ display: flex;
1340
+ flex-flow: row;
1341
+ align-items: center;
1342
+
1343
+ svg {
1344
+ height: 28px;
1345
+ width: 28px;
1346
+ path {
1347
+ fill: #ffffff;
1348
+ }
1349
+ margin-right: 4px;
1350
+ }
1351
+ `;
1352
+ var TimelineItemGuideLine = (0, import_styled_components13.default)(import_react_spring3.animated.div)`
1353
+ border-top: 4px solid #ffffff;
1354
+ margin-right: 4px;
1355
+ `;
1356
+ var style = {
1357
+ display: "flex",
1358
+ position: "relative",
1359
+ flexFlow: "row nowrap",
1360
+ alignItems: "center"
1361
+ };
1298
1362
  function Timeline(props) {
1299
1363
  const children = import_react17.default.Children.toArray(props.children);
1300
- return /* @__PURE__ */ import_react17.default.createElement(import_spectacle8.Stepper, { ...props, values: children, className: Timeline_module_default["timeline"] }, (value, step) => {
1301
- return children.map((child, index) => {
1302
- if (!import_react17.default.isValidElement(child)) {
1303
- return child;
1304
- }
1305
- return import_react17.default.cloneElement(child, {
1306
- // @ts-expect-error cloning
1307
- isPhantom: step < index,
1308
- isLast: step === index
1364
+ return /* @__PURE__ */ import_react17.default.createElement(
1365
+ import_spectacle8.Stepper,
1366
+ {
1367
+ ...props,
1368
+ values: children,
1369
+ activeStyle: style,
1370
+ inactiveStyle: style
1371
+ },
1372
+ (value, step) => {
1373
+ return children.map((child, index) => {
1374
+ if (!import_react17.default.isValidElement(child)) {
1375
+ return child;
1376
+ }
1377
+ return import_react17.default.cloneElement(child, {
1378
+ // @ts-expect-error cloning
1379
+ isPhantom: step < index,
1380
+ isLast: step === index
1381
+ });
1309
1382
  });
1310
- });
1311
- });
1383
+ }
1384
+ );
1312
1385
  }
1313
1386
  function getItemOpacity2({
1314
1387
  isLast,
@@ -1330,33 +1403,16 @@ function TimelineItem(props) {
1330
1403
  });
1331
1404
  const colorStyles = (0, import_react_spring3.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
1332
1405
  return /* @__PURE__ */ import_react17.default.createElement(
1333
- import_react_spring3.animated.div,
1406
+ TimelineItemStyled,
1334
1407
  {
1335
1408
  ...rest,
1336
- className: Timeline_module_default["timelineItem"],
1337
1409
  style: {
1338
1410
  ...appearStyles
1339
1411
  }
1340
1412
  },
1341
- /* @__PURE__ */ import_react17.default.createElement(
1342
- "div",
1343
- {
1344
- className: (0, import_classnames.default)(
1345
- Timeline_module_default["timelineItemContent"],
1346
- Timeline_module_default["timelineItemContentPhantom"]
1347
- )
1348
- },
1349
- /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title),
1350
- /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children)
1351
- ),
1352
- /* @__PURE__ */ import_react17.default.createElement(import_react_spring3.animated.div, { className: Timeline_module_default["timelineItemGuide"], style: colorStyles }, /* @__PURE__ */ import_react17.default.createElement(Hexagon, null), /* @__PURE__ */ import_react17.default.createElement(
1353
- import_react_spring3.animated.div,
1354
- {
1355
- className: Timeline_module_default["timelineItemGuideLine"],
1356
- style: guideLineProps
1357
- }
1358
- )),
1359
- /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemContent"] }, /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title), /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children))
1413
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ import_react17.default.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ import_react17.default.createElement(TimelineItemBody, null, children)),
1414
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ import_react17.default.createElement(Hexagon, null), /* @__PURE__ */ import_react17.default.createElement(TimelineItemGuideLine, { style: guideLineProps })),
1415
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemContent, null, /* @__PURE__ */ import_react17.default.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ import_react17.default.createElement(TimelineItemBody, null, children))
1360
1416
  );
1361
1417
  }
1362
1418
  function Hexagon() {
@@ -1388,8 +1444,8 @@ function Hexagon() {
1388
1444
 
1389
1445
  // src/components/IconBox.tsx
1390
1446
  var import_react18 = __toESM(require("react"));
1391
- var import_styled_components12 = __toESM(require("styled-components"));
1392
- var IconBoxContent = import_styled_components12.default.div`
1447
+ var import_styled_components14 = __toESM(require("styled-components"));
1448
+ var IconBoxContent = import_styled_components14.default.div`
1393
1449
  * {
1394
1450
  margin: 0.2rem !important;
1395
1451
  padding: 0 !important;
package/index.mjs CHANGED
@@ -1082,7 +1082,7 @@ import { Stepper as Stepper2 } from "spectacle";
1082
1082
  import styled10 from "styled-components";
1083
1083
  import { useSpring, animated } from "react-spring";
1084
1084
  function ItemsColumn(divProps) {
1085
- const { style, children, ...props } = divProps;
1085
+ const { style: style2, children, ...props } = divProps;
1086
1086
  const childrenArray = React15.Children.toArray(children);
1087
1087
  return /* @__PURE__ */ React15.createElement(Stepper2, { values: childrenArray }, (value, step) => /* @__PURE__ */ React15.createElement(
1088
1088
  "div",
@@ -1092,7 +1092,7 @@ function ItemsColumn(divProps) {
1092
1092
  flexDirection: "column",
1093
1093
  alignItems: "center",
1094
1094
  height: "100%",
1095
- ...style
1095
+ ...style2
1096
1096
  },
1097
1097
  ...props
1098
1098
  },
@@ -1246,27 +1246,100 @@ function HorizontalListItem({
1246
1246
  // src/components/Timeline.tsx
1247
1247
  import React17 from "react";
1248
1248
  import { animated as animated3, useSpring as useSpring3 } from "react-spring";
1249
- import classnames from "classnames";
1250
1249
  import { Stepper as Stepper4 } from "spectacle";
1251
1250
 
1252
- // src/components/Timeline.module.scss
1253
- var Timeline_module_default = {};
1251
+ // src/components/Timeline.styled.tsx
1252
+ import styled12 from "styled-components";
1253
+ var TimelineItemContent = styled12.div`
1254
+ display: flex;
1255
+ padding: 0.7rem 0 1rem 12px;
1256
+ `;
1257
+ var TimelineItemContentPhantom = styled12(TimelineItemContent)`
1258
+ opacity: 0;
1259
+ `;
1260
+ var TimelineItemBody = styled12.div`
1261
+ &,
1262
+ & > * {
1263
+ font-size: 1.3rem !important;
1264
+ color: #ffffff !important;
1265
+ }
1266
+ `;
1267
+ var TimelineItemTitle = styled12.div`
1268
+ font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1269
+ font-size: 1rem;
1270
+ font-weight: bold;
1271
+ color: #ffffffbb;
1272
+ `;
1254
1273
 
1255
1274
  // src/components/Timeline.tsx
1275
+ import styled13 from "styled-components";
1276
+ var TimelineItemStyled = styled13(animated3.div)`
1277
+ flex: 1;
1278
+ flex-flow: column nowrap;
1279
+ display: inline-flex;
1280
+
1281
+ &:nth-child(odd) {
1282
+ &,
1283
+ ${TimelineItemContent} {
1284
+ flex-direction: column;
1285
+ }
1286
+ }
1287
+ &:nth-child(even) {
1288
+ &,
1289
+ ${TimelineItemContent} {
1290
+ flex-direction: column-reverse;
1291
+ }
1292
+ }
1293
+ `;
1294
+ var TimelineItemGuide = styled13(animated3.div)`
1295
+ width: 100%;
1296
+ padding-top: 2px;
1297
+ display: flex;
1298
+ flex-flow: row;
1299
+ align-items: center;
1300
+
1301
+ svg {
1302
+ height: 28px;
1303
+ width: 28px;
1304
+ path {
1305
+ fill: #ffffff;
1306
+ }
1307
+ margin-right: 4px;
1308
+ }
1309
+ `;
1310
+ var TimelineItemGuideLine = styled13(animated3.div)`
1311
+ border-top: 4px solid #ffffff;
1312
+ margin-right: 4px;
1313
+ `;
1314
+ var style = {
1315
+ display: "flex",
1316
+ position: "relative",
1317
+ flexFlow: "row nowrap",
1318
+ alignItems: "center"
1319
+ };
1256
1320
  function Timeline(props) {
1257
1321
  const children = React17.Children.toArray(props.children);
1258
- return /* @__PURE__ */ React17.createElement(Stepper4, { ...props, values: children, className: Timeline_module_default["timeline"] }, (value, step) => {
1259
- return children.map((child, index) => {
1260
- if (!React17.isValidElement(child)) {
1261
- return child;
1262
- }
1263
- return React17.cloneElement(child, {
1264
- // @ts-expect-error cloning
1265
- isPhantom: step < index,
1266
- isLast: step === index
1322
+ return /* @__PURE__ */ React17.createElement(
1323
+ Stepper4,
1324
+ {
1325
+ ...props,
1326
+ values: children,
1327
+ activeStyle: style,
1328
+ inactiveStyle: style
1329
+ },
1330
+ (value, step) => {
1331
+ return children.map((child, index) => {
1332
+ if (!React17.isValidElement(child)) {
1333
+ return child;
1334
+ }
1335
+ return React17.cloneElement(child, {
1336
+ // @ts-expect-error cloning
1337
+ isPhantom: step < index,
1338
+ isLast: step === index
1339
+ });
1267
1340
  });
1268
- });
1269
- });
1341
+ }
1342
+ );
1270
1343
  }
1271
1344
  function getItemOpacity2({
1272
1345
  isLast,
@@ -1288,33 +1361,16 @@ function TimelineItem(props) {
1288
1361
  });
1289
1362
  const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
1290
1363
  return /* @__PURE__ */ React17.createElement(
1291
- animated3.div,
1364
+ TimelineItemStyled,
1292
1365
  {
1293
1366
  ...rest,
1294
- className: Timeline_module_default["timelineItem"],
1295
1367
  style: {
1296
1368
  ...appearStyles
1297
1369
  }
1298
1370
  },
1299
- /* @__PURE__ */ React17.createElement(
1300
- "div",
1301
- {
1302
- className: classnames(
1303
- Timeline_module_default["timelineItemContent"],
1304
- Timeline_module_default["timelineItemContentPhantom"]
1305
- )
1306
- },
1307
- /* @__PURE__ */ React17.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title),
1308
- /* @__PURE__ */ React17.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children)
1309
- ),
1310
- /* @__PURE__ */ React17.createElement(animated3.div, { className: Timeline_module_default["timelineItemGuide"], style: colorStyles }, /* @__PURE__ */ React17.createElement(Hexagon, null), /* @__PURE__ */ React17.createElement(
1311
- animated3.div,
1312
- {
1313
- className: Timeline_module_default["timelineItemGuideLine"],
1314
- style: guideLineProps
1315
- }
1316
- )),
1317
- /* @__PURE__ */ React17.createElement("div", { className: Timeline_module_default["timelineItemContent"] }, /* @__PURE__ */ React17.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title), /* @__PURE__ */ React17.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children))
1371
+ /* @__PURE__ */ React17.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children)),
1372
+ /* @__PURE__ */ React17.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ React17.createElement(Hexagon, null), /* @__PURE__ */ React17.createElement(TimelineItemGuideLine, { style: guideLineProps })),
1373
+ /* @__PURE__ */ React17.createElement(TimelineItemContent, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children))
1318
1374
  );
1319
1375
  }
1320
1376
  function Hexagon() {
@@ -1346,8 +1402,8 @@ function Hexagon() {
1346
1402
 
1347
1403
  // src/components/IconBox.tsx
1348
1404
  import React18 from "react";
1349
- import styled12 from "styled-components";
1350
- var IconBoxContent = styled12.div`
1405
+ import styled14 from "styled-components";
1406
+ var IconBoxContent = styled14.div`
1351
1407
  * {
1352
1408
  margin: 0.2rem !important;
1353
1409
  padding: 0 !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gpichot/spectacle-deck",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.cjs",
@@ -19,7 +19,6 @@
19
19
  "dependencies": {
20
20
  "@fontsource/bitter": "^5.0.15",
21
21
  "@mdx-js/react": "^3.0.0",
22
- "classnames": "^2.3.2",
23
22
  "react": "^18.2.0",
24
23
  "react-dom": "^18.2.0",
25
24
  "react-is": "^18.2.0",
package/index.css DELETED
@@ -1,61 +0,0 @@
1
- /* src/components/Timeline.module.scss */
2
- .timeline {
3
- display: flex;
4
- position: relative;
5
- flex-flow: row nowrap;
6
- align-items: center;
7
- }
8
- .timelineItem {
9
- flex: 1;
10
- display: inline-flex;
11
- }
12
- .timelineItem .timelineItemContentPhantom {
13
- opacity: 0;
14
- }
15
- .timelineItem:nth-child(odd),
16
- .timelineItem:nth-child(odd) .timelineItemContent {
17
- flex-direction: column;
18
- }
19
- .timelineItem:nth-child(even),
20
- .timelineItem:nth-child(even) .timelineItemContent {
21
- flex-direction: column-reverse;
22
- }
23
- .timelineItemGuide {
24
- width: 100%;
25
- padding-top: 2px;
26
- display: flex;
27
- flex-flow: row;
28
- align-items: center;
29
- }
30
- .timelineItemGuide svg {
31
- height: 28px;
32
- width: 28px;
33
- margin-right: 4px;
34
- }
35
- .timelineItemGuide svg path {
36
- fill: #ffffff;
37
- }
38
- .timelineItemGuide .timelineItemGuideLine {
39
- border-top: 4px solid #ffffff;
40
- margin-right: 4px;
41
- }
42
- .timelineItemContent {
43
- display: flex;
44
- padding: 0.7rem 0 1rem 12px;
45
- }
46
- .timelineItemBody,
47
- .timelineItemBody > * {
48
- font-size: 1.3rem !important;
49
- color: #ffffff !important;
50
- }
51
- .timelineItemTitle {
52
- font-family:
53
- Bitter,
54
- "Helvetica Neue",
55
- Helvetica,
56
- Arial,
57
- sans-serif;
58
- font-size: 1rem;
59
- font-weight: bold;
60
- color: rgba(255, 255, 255, 0.7333333333);
61
- }