@gpichot/spectacle-deck 1.0.2 → 1.0.3

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
@@ -1288,17 +1288,75 @@ 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 TimelineStyled = import_styled_components12.default.div`
1296
+ display: flex;
1297
+ position: relative;
1298
+ flex-flow: row nowrap;
1299
+ align-items: center;
1300
+ `;
1301
+ var TimelineItemContent = import_styled_components12.default.div`
1302
+ display: flex;
1303
+ padding: 0.7rem 0 1rem 12px;
1304
+ `;
1305
+ var TimelineItemContentPhantom = (0, import_styled_components12.default)(TimelineItemContent)`
1306
+ opacity: 0;
1307
+ `;
1308
+ var TimelineItemBody = import_styled_components12.default.div`
1309
+ &,
1310
+ & > * {
1311
+ font-size: 1.3rem !important;
1312
+ color: #ffffff !important;
1313
+ }
1314
+ `;
1315
+ var TimelineItemTitle = import_styled_components12.default.div`
1316
+ font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1317
+ font-size: 1rem;
1318
+ font-weight: bold;
1319
+ color: #ffffffbb;
1320
+ `;
1296
1321
 
1297
1322
  // src/components/Timeline.tsx
1323
+ var import_styled_components13 = __toESM(require("styled-components"));
1324
+ var TimelineItemStyled = (0, import_styled_components13.default)(import_react_spring3.animated.div)`
1325
+ flex: 1;
1326
+ display: inline-flex;
1327
+
1328
+ ${({ isOdd }) => isOdd && import_styled_components13.css`
1329
+ flex-direction: column;
1330
+ `}
1331
+
1332
+ ${({ isEven }) => isEven && import_styled_components13.css`
1333
+ flex-direction: column-reverse;
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
+ `;
1298
1356
  function Timeline(props) {
1299
1357
  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) => {
1358
+ return /* @__PURE__ */ import_react17.default.createElement(import_spectacle8.Stepper, { ...props, values: children }, (value, step) => {
1359
+ return /* @__PURE__ */ import_react17.default.createElement(TimelineStyled, null, children.map((child, index) => {
1302
1360
  if (!import_react17.default.isValidElement(child)) {
1303
1361
  return child;
1304
1362
  }
@@ -1307,7 +1365,7 @@ function Timeline(props) {
1307
1365
  isPhantom: step < index,
1308
1366
  isLast: step === index
1309
1367
  });
1310
- });
1368
+ }));
1311
1369
  });
1312
1370
  }
1313
1371
  function getItemOpacity2({
@@ -1330,33 +1388,16 @@ function TimelineItem(props) {
1330
1388
  });
1331
1389
  const colorStyles = (0, import_react_spring3.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
1332
1390
  return /* @__PURE__ */ import_react17.default.createElement(
1333
- import_react_spring3.animated.div,
1391
+ TimelineItemStyled,
1334
1392
  {
1335
1393
  ...rest,
1336
- className: Timeline_module_default["timelineItem"],
1337
1394
  style: {
1338
1395
  ...appearStyles
1339
1396
  }
1340
1397
  },
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))
1398
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ import_react17.default.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ import_react17.default.createElement(TimelineItemBody, null, children)),
1399
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ import_react17.default.createElement(Hexagon, null), /* @__PURE__ */ import_react17.default.createElement(TimelineItemGuideLine, { style: guideLineProps })),
1400
+ /* @__PURE__ */ import_react17.default.createElement(TimelineItemContent, null, /* @__PURE__ */ import_react17.default.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ import_react17.default.createElement(TimelineItemBody, null, children))
1360
1401
  );
1361
1402
  }
1362
1403
  function Hexagon() {
@@ -1388,8 +1429,8 @@ function Hexagon() {
1388
1429
 
1389
1430
  // src/components/IconBox.tsx
1390
1431
  var import_react18 = __toESM(require("react"));
1391
- var import_styled_components12 = __toESM(require("styled-components"));
1392
- var IconBoxContent = import_styled_components12.default.div`
1432
+ var import_styled_components14 = __toESM(require("styled-components"));
1433
+ var IconBoxContent = import_styled_components14.default.div`
1393
1434
  * {
1394
1435
  margin: 0.2rem !important;
1395
1436
  padding: 0 !important;
package/index.mjs CHANGED
@@ -1246,17 +1246,75 @@ 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 TimelineStyled = styled12.div`
1254
+ display: flex;
1255
+ position: relative;
1256
+ flex-flow: row nowrap;
1257
+ align-items: center;
1258
+ `;
1259
+ var TimelineItemContent = styled12.div`
1260
+ display: flex;
1261
+ padding: 0.7rem 0 1rem 12px;
1262
+ `;
1263
+ var TimelineItemContentPhantom = styled12(TimelineItemContent)`
1264
+ opacity: 0;
1265
+ `;
1266
+ var TimelineItemBody = styled12.div`
1267
+ &,
1268
+ & > * {
1269
+ font-size: 1.3rem !important;
1270
+ color: #ffffff !important;
1271
+ }
1272
+ `;
1273
+ var TimelineItemTitle = styled12.div`
1274
+ font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1275
+ font-size: 1rem;
1276
+ font-weight: bold;
1277
+ color: #ffffffbb;
1278
+ `;
1254
1279
 
1255
1280
  // src/components/Timeline.tsx
1281
+ import styled13, { css } from "styled-components";
1282
+ var TimelineItemStyled = styled13(animated3.div)`
1283
+ flex: 1;
1284
+ display: inline-flex;
1285
+
1286
+ ${({ isOdd }) => isOdd && css`
1287
+ flex-direction: column;
1288
+ `}
1289
+
1290
+ ${({ isEven }) => isEven && css`
1291
+ flex-direction: column-reverse;
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
+ `;
1256
1314
  function Timeline(props) {
1257
1315
  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) => {
1316
+ return /* @__PURE__ */ React17.createElement(Stepper4, { ...props, values: children }, (value, step) => {
1317
+ return /* @__PURE__ */ React17.createElement(TimelineStyled, null, children.map((child, index) => {
1260
1318
  if (!React17.isValidElement(child)) {
1261
1319
  return child;
1262
1320
  }
@@ -1265,7 +1323,7 @@ function Timeline(props) {
1265
1323
  isPhantom: step < index,
1266
1324
  isLast: step === index
1267
1325
  });
1268
- });
1326
+ }));
1269
1327
  });
1270
1328
  }
1271
1329
  function getItemOpacity2({
@@ -1288,33 +1346,16 @@ function TimelineItem(props) {
1288
1346
  });
1289
1347
  const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
1290
1348
  return /* @__PURE__ */ React17.createElement(
1291
- animated3.div,
1349
+ TimelineItemStyled,
1292
1350
  {
1293
1351
  ...rest,
1294
- className: Timeline_module_default["timelineItem"],
1295
1352
  style: {
1296
1353
  ...appearStyles
1297
1354
  }
1298
1355
  },
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))
1356
+ /* @__PURE__ */ React17.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children)),
1357
+ /* @__PURE__ */ React17.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ React17.createElement(Hexagon, null), /* @__PURE__ */ React17.createElement(TimelineItemGuideLine, { style: guideLineProps })),
1358
+ /* @__PURE__ */ React17.createElement(TimelineItemContent, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children))
1318
1359
  );
1319
1360
  }
1320
1361
  function Hexagon() {
@@ -1346,8 +1387,8 @@ function Hexagon() {
1346
1387
 
1347
1388
  // src/components/IconBox.tsx
1348
1389
  import React18 from "react";
1349
- import styled12 from "styled-components";
1350
- var IconBoxContent = styled12.div`
1390
+ import styled14 from "styled-components";
1391
+ var IconBoxContent = styled14.div`
1351
1392
  * {
1352
1393
  margin: 0.2rem !important;
1353
1394
  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.3",
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
- }